Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 6, No. 2, 2023 26 Practical Application of Platform Comment Sentiment Binary Classification Based on Deep Learning Jihan Huang1, a 1Zhuhai College, Jilin University, Zhuhai, Guangdong, 519041, China ahuangjihan1@gmail.com Abstract: The role of product reviews is to display real product information, help users judge whether the real situation of the product is consistent with the merchant's description, and indirectly help users judge the price range of the product. At present, most commodity platforms and accommodation intermediary platforms adopt the method of user star rating, which leads to many invalid positive reviews and malicious negative reviews, thus bringing a lot of disturbing information to consumers. Therefore, this paper introduces a mechanism based on artificial intelligence to judge the emotion expressed by a machine, and further verifies the validity and accuracy of the model on the BERT Hugging face dataset. Keywords: Sentiment classification, Deep learning, Natural language processing. 1. introduction At present, mainstream commodity platforms and accommodation intermediary platforms, such as Taobao[1] and Ctrip[2], all use star ratings to assist consumers in making purchase decisions. It is no longer a good solution to this problem to distinguish whether the goods are good or bad. Because there are a lot of full-star reviews, the content is perfunctory, because many people are habitually full-star. Furthermore, when someone gives a full-star/one-star review without leaving detailed feedback, how do you understand this full-star/one-star review? Ratings given by reviews are great when there is no explanation or clarification, but they are very bad for the person reading these reviews, because the real value of the product cannot be understood from these scores. As consumers, what we need are more real and content- based evaluations. Therefore, we have introduced an evaluation method that uses content as the judgment material, and directly extracts the characteristics of the content to judge whether it is a good or bad review, without the need for people to manually score. And if the content is too little, no judgment will be made, because it is an invalid review for consumers. Figure 1. Scale of online shopping users and their usage(2017-2021) It can be seen from Table 1 that the scale of shopping by online users is increasing every year, and the overall utilization rate has reached more than 80% by December 21, which reflects people's dependence on online shopping platforms. Due to the particularity of online shopping, people will pay more attention to the reviews of products by buyers, so the sentiment classification for reviews can be said to be very important. 62.00% 64.00% 66.00% 68.00% 70.00% 72.00% 74.00% 76.00% 78.00% 80.00% 82.00% 84.00% 0 10000 20000 30000 40000 50000 60000 70000 80000 90000 2017.12 2018.12 2020.3 2020.12 2021.12 Use scale: thousand Utilization rate: % 27 Figure 2. Double 11 turnover of online shoppers(2017-2021) It can be seen from Table 2 that the transaction volume in recent years has tended to be stable, and the e-commerce platform has entered a stable period, with a huge transaction volume, which further shows the importance of review- assisted purchases. We conduct experiments in the context of artificial intelligence, and with the help of artificial intelligence technology, we can achieve various fake reviews. E- commerce platforms can use artificial intelligence to strengthen verification and filter useful reviews to resist malicious marketing. In addition, it can also help e-commerce companies realize functions such as intelligent artificial customer service. In this experiment, we also need to use artificial intelligence technology to carry out the sentimental classification of comments. In this paper, we conducted experiments to test the accuracy of the model in the BERT Hugging face dataset, and the results show that the accuracy has reached the standard for industry applications. 2. Related Word 2.1. Convolutional Neural Network The widespread application of artificial intelligence models comes from the rapid development of convolutional neural networks. Convolutional neural network is a kind of feed-forward neural network with convolution calculation and deep structure. It is a very representative algorithm of deep learning. Zhou Feiyan[3]and others conducted a review of their convolutional neural networks, and generally introduced the current status of convolutional neural networks. Zhang Shun[4]and others introduced the specific application of convolutional neural network. 2.2. Natural Language Processing Natural language processing is a specific application of neural networks, specifically studying various theories and methods for effective communication between humans and computers using natural language. Wang Canhui[5]and others summarized how to use natural processing in information retrieval, and natural language processing needs to be optimized for information retrieval to play a better role, while Xi Xuefeng[6]et al. The research was carried out, focusing on the progress of natural language processing in deep learning and its specific applications. For natural language processing, the pre-training of the model is also necessary. Li Zhoujun[7]and others made a good summary of the pre- training technology of the model, and sorted out a series of instructive technologies, including The improved model of bert used today. 2.3. Sentiment Classification In the early stage of the sentiment analysis of Internet comments, Zhang Ziqiong et al.[8] conducted a research review on it, and proposed to distinguish between subjective and objective text information, and to carry out emotional binary classification. Now text sentiment analysis is generally summarized into three main tasks, namely, emotional information extraction, emotional information classification, and emotional information retrieval and induction [9]. In the past few years, there has been a tendency to use deep learning technology to solve text classification problems. Chen Long et al[10] summarized traditional sentiment classification methods, including but not limited to methods based on sentiment dictionaries, machine learning algorithms, or both. Some methods, and methods based on deep learning. Whereas in this paper, we have used a deep learning based approach using Bert[11] for the application of sentiment classification. 3. Methods We need to know the concept of feature first, which is an independently observable attribute or characteristic of the observed object. For example, we need to identify the category of wine, and the characteristics we need to obtain are: brand, color, taste, etc. This article uses a fully connected neural network for calculations, which is one of the most basic network types in deep learning. The fully connected neural network has an input layer, a hidden layer, and an output layer, which perform input, calculation, and output respectively. Figure 3. Simple operation diagram Fully connected neural network (as shown in Figure 2): input on the left, calculation in the middle, output on the right. -30.00% -20.00% -10.00% 0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 0 500 1000 1500 2000 2500 3000 3500 4000 4500 2017 2018 2019 2020 2021 Turnover(million) Year-on-year growth 28 Figure 4. Schematic diagram of a fully connected neural network In order to solve the problem of sentiment classification, we need to extract the features of each piece of data and classify them, so we first use the pre-trained model to do a calculation, extract the features in the data, and put the extracted features into the fully connected network Go to the calculation, and the result after the calculation will form a 2- category result of 16 sentences. The optimizer can adjust the parameters of each hidden layer of the Loss Function in the backpropagation link of deep learning, and the changed parameters will cause the value of the Loss Function to continuously approach the global minimum. This is also essential for deep learning. For the optimizer, we chose the improved version of the Adam optimizer, Adamw optimizer, which has the advantages of the oAdaGrad algorithm and the RMSProp algorithm. Figure 5. Adam with L2 regularization and Adam with decoupled weight decay(AdamW) 4. Experiment 4.1. Experimental details and design For deep learning, model pre-training is essential. Broadly speaking, pre-training refers to using a large amount of training data to train and adjust the model to be trained, extracting a large number of common features from it, so that the learning burden of the used model on specific tasks is reduced, and finally in the downstream tasks fine-tuning of the data. In this article, we only get text and labels for the data, and use the pre-training model directly. The pre-training model chooses the classic Bert model. For deep learning, model pre- training is essential. Broadly speaking, pre-training refers to using a large amount of training data to train and adjust the model to be trained, extracting a large number of common features from it, so that the learning burden of the used model on specific tasks is reduced, and finally in the downstream tasks fine-tuning of the data. With the increase of the deep learning ability of the model, the feature extraction ability is improved, and the extraction ability of specific features is increased, so that the model can be generalized and widely used. Regarding the choice of optimizer, we use the AdamW optimizer with an initial learning rate of 5e-4, and in order to make full use of our computing resources, we set the batch size to 32. Regarding the loss function, we use the loss function crossentropyloss commonly used in classification problems. All experiments are implemented using Kaggle on Nvidia GTX1080Ti GPU. 4.2. Datasets As shown in Figure 4, the data set name: BERT Hugging face dataset, each sentence is an evaluation of something, the training set has a total of 9600 evaluations, the test set has a total of 1200 evaluations, and the verification set has a total of 1200 evaluations. A total of 12,000 entries. The data in the data set are all evaluations of things, such as: ('Original goods, when picking up the goods, the seals have not been opened. Because it is the first time to shop in Jingdong, pick up the goods at the door, after seeing the goods, finally Don't worry about the quality. It's definitely a genuine product. This transaction is very funny. I placed an order on the evening of the 25th, and I will check it again in the morning of the 26th. Since I found out that there is a new promotion with a cashback of 100 yuan, fortunately, I came to pick up the goods. Immediately Canceled the order on the 25th and placed another order, saving 100 yuan. Hehe.') 29 Figure 6. Dataset 4.3. Machine Learning Algorithms This article uses the Bert algorithm. The Bert algorithm is a two-way encoding representation algorithm based on the Transformer algorithm. The Transformer algorithm is based on a multi-head attention mechanism, and Bert stacks multiple Transformer models, and adjusts the bidirectional Transformer in all layers. To pre-train the bidirectional deep representation, and the pre-trained Bert model can be fine- tuned through an additional output layer, which has wider applicability and does not require more repetitive model training work. Figure 7. Schematic diagram of BERT algorithm 4.4. Neural Network Model Fully connected neural network or multi-layer perception is an artificial neural network structure with a relatively simple connection method, which belongs to a kind of feedforward neural network. It mainly consists of input layer, hidden layer and output layer, and there can be multiple neurons in each hidden layer. The input layer only receives external input and does not perform any function processing, so the number of neurons in the input layer is often the same as the number of input features. The neurons in the hidden layer and the output layer process the signal, and the final result is output by the neurons in the output layer. According to the number of hidden layers, it can be divided into single hidden layer MLP and multi hidden layer MLP. The number of neurons in each hidden layer can be changed, and there is usually no good standard for determining the number of neurons in each layer and the number of hidden layers, which has been tested and explored so far. Figure 8. Schematic diagram of a fully connected neural network 4.5. Experimental results The experimental results of the training set are shown in Table 3.( 16 sentences per group) Table 1. Training set experimental results Number of test groups LOSS function Accuracy 1 0.6831 0.6875 20 0.6375 0.7535 30 0.6150 0.6875 50 0.4962 0.9375 100 0.4558 0.8755 200 0.4121 0.9375 It can be seen that the LOSS will decrease and the accuracy rate will also decrease in the training set. In the classification problem, the previous model has not been fully trained. It is normal for this to happen occasionally. When the number of test groups is 50 to 100, LOSS It has been maintained between 0.4 and 0.5, and the accuracy rate is above 80%. It is normal for the accuracy rate to fluctuate. The experimental results of the test set are shown in Table 4. 30 Table 2. Test set experimental results Number of test groups Accuracy 1 0.8125 20 0.8645 30 0.8677 50 0.8660 100 0.8657 It can be seen that in the training results of the test set, the accuracy rate has been maintained at about 86%, which belongs to a relatively high level. The accuracy of the final test set is shown in Figure 9. Figure 9. Test results 5. Conclusion The disadvantage of the traditional simple star rating is that there are many meaningless product reviews. For example, the number of words in the review is too small to provide reference value, or the content of the full-star review expresses dissatisfaction with the product. This can be said to be Typical content does not match the title, which makes customers less trustworthy in reviews and affects people's willingness to buy to a certain extent. This situation is not conducive to the merchant's commodity purchase and is not conducive to the customer's valuation of the commodity. In the context of deep learning, we can quickly conduct sentiment analysis of reviews. Instead of relying on traditional star ratings, we can choose to use machine learning technology to distinguish the emotions of product reviews instead of letting customers decide, and we can also prevent reviews with too little content from appearing in the reviews that customers can see, so that we can Avoid comments without content, and you can also avoid comments that are not on the topic. We conducted a preliminary application of sentiment classification for comments, and proved that our method for sentiment classification of comments has a high success rate through sentiment classification experiments on the BERT Hugging face dataset. This is a preliminary application of machine learning algorithms in comment sentiment classification, and more in-depth applications need to be further carried out. References [1] Xue, Y.Z., Guo, Y.F. (2012) NGAQQWC2C Research on the Competitive Strategy of E-commerce Sellers: An Analysis Based on Taobao. Nankai Management Review, 015(005),129- 140. [2] Zhou, Y.G., Ma, Y.H. (2007)Research on Tourist Satisfaction Evaluation and Visitor Management Based on Ctrip.com's Free Reviews: A Case Study of Huangshan Scenic Area. Geography and Geo-Information Science, 23(2), 97-100. [3] Zhou, F.Y., Jin, L.P., Dong, J. (2017) A review of convolutional neural network research. Chinese Journal of Computers, 40(6), 1229-1251. [4] Zhang, S., Gong, Y.H., Wang, J.J. (2019) The development of deep convolutional neural networks and their applications in the field of computer vision. Chinese Journal of Computers, 042(003),453-482. [5] Wang, C.H., Zhang, M., Ma, S.P. (2007) A review of the application of natural language processing in information retrieval. Journal of Chinese Information Technology,(2), 35- 45. [6] Xi, X.F., Zhou, G.D. (2016) Deep learning research for natural language processing. Acta Automatica Sinica, 42(10), 1445- 1465. [7] Li, Z.J., Fan, Y., Wu, X.J. (2020) A review of pre-training techniques for natural language processing. computer science, 47(3), 162-173. [8] Zhang, Z.Q., Ye, Q., Li, Y.J. (2010) A review of sentiment analysis of Internet product reviews. Journal of Management Science, 13(6), 84-96. [9] Zhao, Y.Y., Qin, B., Liu, T. (2010)Sentiment analysis. Journal of Software, 21(8),1834−1848. [10] Chen, L., Guan, Z.Y., He, J.H., Peng, J.Y.(2017) Research progress on sentiment classification. Computer Research and Development, 54(6), 1150-1170. [11] Hoang, M., Bihorac, O.A., Rouces, J.(2019) Aspect-based sentiment analysis use bert// Proceedings of the 22nd Nordic Conference on Computational Linguistics.: 187-196. 0.80% 0.81% 0.82% 0.83% 0.84% 0.85% 0.86% 0.87% 0.88% 0.89% 0 5 10 15 20 25 30 35 abscissa:group ordinate:accuracy