# Analysis of Network Public Opinion in New Media Based on BP Neural Network Algorithm

Authors: Shi Yang
Journal: Mobile Information Systems
 (2022)

---

## Abstract

With the rapid development of Internet technology, new media is more and more favored by people and has become an important medium to control online public opinion. Social public opinion caused by new media is also more and more concerned by all walks of life. New media has the characteristics of fast information dissemination, wide dissemination range, and strong arbitrariness of news release. Positive online public voice or negative online public voice will have a very different impact on people’s lives. Some negative online public voice may even constitute a social crisis and seriously affect social public security. In order to analyze and predict the development trend of new media network public opinion, this paper presents a design of improved BP neural network model based on genetic algorithm, which is used to analyze public opinion in new media network. Experimental results show that this way has stronger processing ability and higher warning accuracy for online public opinion event index data. It can provide certain theoretical basis and data support for relevant departments to effectively prevent and manage new media network public opinion events.


---

## Body

## 1. Introduction

In the Internet era, the emergence of new media has broken the space-time limitation of public information dissemination and speech expression. It has promoted the expansion of the connotation, the expansion of the expression form, and the change of the communication form of public opinion in the cyberspace [1]. At the same time, it also poses new challenges to the scientific communication of online public opinions and the rational formulation of public decisions. This has caused many scholars to pay extensive attention to the research of network public opinion.With the development of mobile Internet technology and the popularity of new media such as Toutiao, WeChat, Weibo, and Kuaishou, the Internet has gradually become the second place for people to express their beliefs, attitudes, opinions, and emotions. It has attracted more and more attention from all walks of life. Compared with traditional media, the information transmission of new media has the characteristics of fast transmission speed, wide influence range, and strong interaction [2]. It also fundamentally changes the path relationship and information transmission mode between information spreader and receiver, promoting the network information from unidirectional depth and dispersion to multicentre network comprehensive coverage, which is easy to form the aggregation effect of the transmission mode change [3]. In the context of mobile Internet, for news events, each Internet user is both the receiver of information and the disseminator of information. They use online platforms to express their opinions and ideas in real time and interact with other internet citizens. Thus, a dynamic network communication environment is created, in which information communicators blend with each other, information communication themes are multifarious and the effects of information communication are unpredictable [4].In this context, due to the openness, immediacy, and rapidity of the network, some sudden social events or hot events can be published through the network media platform and spread rapidly in a short time. Network public opinions are easily formed under the joint promotion of some social organizations, media platforms, and netizens [5]. Network public opinion is a form of social public opinion. It is a collection of influential and tendentious opinions and views held by netizens on some hot events in real life in the Internet environment. It plays a dual role in the stability of social order and national governance [6]. From the positive effect of public opinion communication, the majority of netizens can extensively participate in the discussion of social public events through online platforms and express their attitudes, opinions, or opinions in real time. On the one hand, it improves the enthusiasm of the public to participate in social public affairs and social management. On the other hand, it provides intellectual support for the government, enterprises, and other social organizations to form valuable reference opinions based on in-depth understanding of the public sentiment. On the negative side, due to the anonymity of the Internet, it can not only promote the spread of real information but also avoid the intrusion of bad information, thus making it difficult to distinguish the truth from the false. Even “bad money” drive out “good money” phenomenon. It is easy to be infected by bad emotions or induced by bad information, which may lead to large-scale and multicentre public opinion crisis situations [7] and bring significant challenges to social stability and national governance. The construction of accurate and efficient new media network public opinion prediction model, to provide a strong reference for the guidance and governance of social public opinion, has become a problem that academic circles and government departments need to consider.After decades of development, there were a large number of researches on online public opinion based on multidisciplinary background, combined with multitheoretical methods from different perspectives.At present, studies on public opinion analysis of network events at home and abroad are mainly divided into two categories: (1) network public opinion analysis of influential factors of related events; (2) network public opinion research based on emotion analysis [8]. The first type takes the elements of public opinion events as the research object and conducts early warning research on network events by establishing index system and integrating public opinion early warning model. For example, literature [9] takes the Baidu index and Toutiao index of online public opinion events as hot indicators of public opinion and establishes an indicator system for early warning analysis of public opinion. The second type takes the network speech related to events as the research object and analyzes the emotional tendency value of speech, so as to analyze public opinion. For example, literature [10] combined with the emotional characteristics of public opinion used the emotion analysis method to achieve the public opinion research and judgment of network events. Literature [11] establishes an index system of event public opinion based on the event elements in the field of food safety and the emotional tendency of related news texts and carries out early warning analysis based on the neural network model. Its core consists of the establishment of index system and the study of network early warning algorithm model. Literature [12] points out that the number of media reports, the attention degree of consumers, the degree of controversy of information, and the information channels involved may lead to the amplification of event risk, so these event elements become an important indicator basis of the public opinion indicator system. Literature [13] takes online comments on Sina Toutiao after the forest fire as case data and uses life cycle theory, social network analysis, and crawler technology to analyze the orientation and evolution path of public opinion. Literature [14] takes the discussion related to COVID-19 vaccine on Twitter as a dataset and adopts text clustering to conduct sentiment analysis and to track and monitor public opinions on vaccination decisions in a low-cost, real-time, and fast way. Literature [15] uses GooSeeker to data crawl out the TouTiao comments related to “8 ▪12 Tianjin Explosion” and adopts the life cycle theory and LDA model to conduct thematic research on the topics between different communicators of the TouTiao public opinion events.Artificial neural network (ANN) is a computational model that simulates biological neural network. ANN approaches the target function by repeated training and has the characteristics of parallel processing, discreteness, and self-learning. This algorithm can carry out large-scale nonlinear operations on big data and is suitable for building learning and prediction models [16]. BP back propagation neural algorithm is a common method to train artificial neural network. BP algorithm is very suitable for machine learning and training model. However, when fitting nonlinear functions, BP algorithm tends to converge local optimization rather than global optimization and the convergence speed is slow, while genetic algorithm can solve nonlinear and multidimensional space optimization problems [17]. The paper proposes a new media network public opinion algorithm model based on genetic algorithm BP neural network. On the basis of the number of media reports, the attention degree of netizens and the elements of network public opinion, the public opinion index system is established by integrating emotion analysis to effectively predict public voice and offer data support for guidance and management of public voice in new media.The main innovations of this paper are as follows:(1)
integrate sentiment analysis to establish public opinion index system(2)
this model is more suitable for machine learning and training(3)
it is better to solve nonlinear and multidimensional space optimization problemsThe paper consists of 5 main parts, namely, the introduction of the first section, the related research in the second section, the new media network public opinion risk early warning model in the third section, the experiment and analysis in the fourth section, and the conclusion in the fifth section, with the abstract and reference section.


## 2. Related Research

### 2.1. BP Neural Network Model

BP algorithm model is a multilayer perceptron based on error back propagation. By adjusting weight vector through the reverse error algorithm, the nonlinear problem is well solved [18, 19]. BP layer 3 network topology is shown in Figure 1.Figure. 1
BP three-layer network structure diagram.Input vectorX=x1,x2,⋯,xn, the output vector of hidden layer is H=h1,h2,⋯,hm, the output layer vector is Y=y1,y2,⋯,yk, the expected output vector is D=d1,d2,⋯,dk, the weight matrix between the input layer and the hidden layer is represented by V:V=v11,v12,⋯,vnm, the weight matrix between the hidden layer and the output layer is expressed by W as W=w11,w12,⋯,wmk. Activation function f (x) is the sigmoid function:
(1)fi=11+e−i.The objective function used by BP algorithm is the network error. The method used to calculate the minimum of the objective function is the gradient descent method [20]. Error back propagation is the derivation of error hidden layer gradient descent layer by layer to calculate the correction weight. Through repeated learning and constant weight adjustment, the error is finally adjusted to an acceptable range to achieve the desired goal.


### 2.2. Genetic Algorithm

Genetic Algorithm (GA) is an algorithm that simulates the biological evolution process in nature and obtains the optimal value in the whole world. Firstly, a population was randomly initialized, and fitness function was used to evaluate the fitness of each individual [21–23]. Select the best with the selection function, and then cross generation, mutation of the children, repeat the cycle until the optimal solution is found. Genetic algorithm makes individuals with high fitness have a greater chance to produce offspring, and there will be more and more offspring. The fitness function is the positive correlation function of the optimal value to solve the objective function, so the optimal solution is obtained through genetic optimization generation by generation as shown in Figure 2.Figure. 2
Flow chart of genetic algorithm.


### 2.3. GA-BP Algorithm

BP algorithm has two defects, local optimum and slow convergence speed, while evaluating. In order to solve this problem, the initial weight and threshold of BP neural network algorithm can be optimized by genetic algorithm.GA-BP neural network algorithm has better prediction of target value. The specific process is as follows: generate an initial population randomly. The individuals in the population correspond to the initial weights and thresholds of the BP neural network. The difference between the output and the expectations of BP is used as fitness function, and the optimal value can be obtained by repeated cycle through selection, crossover, and variation. Thus, the parameters of BP model are obtained [24, 25]. The forward and reverse training of the optimized BP neural network is carried out to establish the prediction model.Fitness function:(2)F=1η∑x=1wabsdx−jx,where w is the number of output nodes, d is the expected output value of BP neural network, j is the actual output value, and η is the coefficient, fitness is inversely proportional to the error.Selection function:(3)u=Fx∑y=1wFy,where u is the selection probability, F is the individual fitness, and w is the number of individuals in the population, selection probability is proportional to fitness.
(4)iwl=iwl1−β+itlβ,itl=itl1−β+iwlβ,where β is a random number in the interval [0,1].Mutation operation: the mutation operation of thel-th gene xwl of the w-th individual is as follows:
(5)iwliwl+iwl−imax∗fz,r>0.5iwl+imin−iwl∗fz,r≪0.5,fz=λ1−zzmax2,where Xmax is the upper bound of gene xwl, xmin is the lower bound of gene xwl, z is the current iteration number, zmax is the maximum evolution number, r is the random number between [0,1], and λ is a random number.


## 2.1. BP Neural Network Model

BP algorithm model is a multilayer perceptron based on error back propagation. By adjusting weight vector through the reverse error algorithm, the nonlinear problem is well solved [18, 19]. BP layer 3 network topology is shown in Figure 1.Figure. 1
BP three-layer network structure diagram.Input vectorX=x1,x2,⋯,xn, the output vector of hidden layer is H=h1,h2,⋯,hm, the output layer vector is Y=y1,y2,⋯,yk, the expected output vector is D=d1,d2,⋯,dk, the weight matrix between the input layer and the hidden layer is represented by V:V=v11,v12,⋯,vnm, the weight matrix between the hidden layer and the output layer is expressed by W as W=w11,w12,⋯,wmk. Activation function f (x) is the sigmoid function:
(1)fi=11+e−i.The objective function used by BP algorithm is the network error. The method used to calculate the minimum of the objective function is the gradient descent method [20]. Error back propagation is the derivation of error hidden layer gradient descent layer by layer to calculate the correction weight. Through repeated learning and constant weight adjustment, the error is finally adjusted to an acceptable range to achieve the desired goal.


## 2.2. Genetic Algorithm

Genetic Algorithm (GA) is an algorithm that simulates the biological evolution process in nature and obtains the optimal value in the whole world. Firstly, a population was randomly initialized, and fitness function was used to evaluate the fitness of each individual [21–23]. Select the best with the selection function, and then cross generation, mutation of the children, repeat the cycle until the optimal solution is found. Genetic algorithm makes individuals with high fitness have a greater chance to produce offspring, and there will be more and more offspring. The fitness function is the positive correlation function of the optimal value to solve the objective function, so the optimal solution is obtained through genetic optimization generation by generation as shown in Figure 2.Figure. 2
Flow chart of genetic algorithm.


## 2.3. GA-BP Algorithm

BP algorithm has two defects, local optimum and slow convergence speed, while evaluating. In order to solve this problem, the initial weight and threshold of BP neural network algorithm can be optimized by genetic algorithm.GA-BP neural network algorithm has better prediction of target value. The specific process is as follows: generate an initial population randomly. The individuals in the population correspond to the initial weights and thresholds of the BP neural network. The difference between the output and the expectations of BP is used as fitness function, and the optimal value can be obtained by repeated cycle through selection, crossover, and variation. Thus, the parameters of BP model are obtained [24, 25]. The forward and reverse training of the optimized BP neural network is carried out to establish the prediction model.Fitness function:(2)F=1η∑x=1wabsdx−jx,where w is the number of output nodes, d is the expected output value of BP neural network, j is the actual output value, and η is the coefficient, fitness is inversely proportional to the error.Selection function:(3)u=Fx∑y=1wFy,where u is the selection probability, F is the individual fitness, and w is the number of individuals in the population, selection probability is proportional to fitness.
(4)iwl=iwl1−β+itlβ,itl=itl1−β+iwlβ,where β is a random number in the interval [0,1].Mutation operation: the mutation operation of thel-th gene xwl of the w-th individual is as follows:
(5)iwliwl+iwl−imax∗fz,r>0.5iwl+imin−iwl∗fz,r≪0.5,fz=λ1−zzmax2,where Xmax is the upper bound of gene xwl, xmin is the lower bound of gene xwl, z is the current iteration number, zmax is the maximum evolution number, r is the random number between [0,1], and λ is a random number.


## 3. The Early Warning Model of New Media Network Public Opinion Risk

### 3.1. Index System Construction

Based on the analysis of the characteristics of new media in network public opinion, using the web crawler to grab from the Internet public opinion data associated with the network media, construction of three media network public opinion events early warning index system, specific process is as follows: first, text clustering technique is used to obtain the basic information of the event; then, from the perspective of ordinary network users, text mining is carried out on the opinions and speeches of network events. Finally, the method of sentiment analysis is used to judge the sentiment tendency, and the collection of related index values of new media network public opinion index system is realized. Data source, with clustering algorithm in the form of news report cluster based information, as the event online speech by grabbing TouTiao related TouTiao, comments and forwarding information, eventually form based on TouTiao and news network early warning index system, including the TouTiao related six indicators, news related to four indicators. The specific indicator architecture is shown in Figure3. According to the network public opinion system in Figure 3, each indicator is explained in detail as follows:
(1)
Number of news. The number of news reports related to events, which is positively correlated with the attention of events(2)
Number of websites. The number of websites publishing or reprinting news reports related to the event, which is positively correlated with the attention of the event(3)
Number of TouTiao. The number of event-related TouTiao, which is positively correlated with the attention of events(4)
Number of TouTiao likes. The total number of likes of all event-related TouTiao, which is positively correlated with the attention of events(5)
Number of TouTiao forwarded. The total number of retweets of all event-related TouTiao, which is positively correlated with the attention of events(6)
Number of TouTiao comments. Number of comments on the TouTiao related to the event, which is positively correlated with the attention of the event(7)
Number of positive news. In the news related to events, the number of positive emotion analysis value is positive, which is positively correlated with the emotional tendency of events(8)
Number of negative news. In the news related to events, the number of negative emotion analysis value is negatively correlated with the emotion tendency of events(9)
Number of positive TouTiao. In the event-related TouTiao, the number of positive emotion analysis value is positive, which is positively correlated with the emotional tendency of the event(10)
Number of negative TouTiao. In event-related TouTiao, the number of negative sentiment analysis values is negatively correlated with the emotional tendency of the eventFigure. 3
Network public opinion analysis index system based on hierarchy structure.


### 3.2. Classification of Warning Levels

According to the National Overall Emergency Plan for Public Emergencies, the risk level of new media public opinion is segmented into four grades: I- IV [26]. Level I is severest, level II is severer, level III is severe, and level IV is generally severe. At the same time, in order to facilitate understanding, [0,1] is evenly divided into 4 intervals, which correspond to different early-warning level states from low to high [27]. See Table 1 for the classification of online public opinion risk grades.Table 1
Classification of online public opinion risk levels.
OutputWarning level[0,0.25]I[0.25,0.5]II[0.5,0.75]III[0.75,1]IV


### 3.3. GA-BP-Based Training Warning Model

Based on GA-BP model, the new media online public opinion risk prediction model is designed and trained, and the process is as follows.(1)
Genetic algorithm is used to analyze the training dataset samples to obtain the data feature components and form a new sample set sample(2)
GA-BP model is constructed. The training set was input to the GA-BP network model, and samples in step 1 were taken as the expectations output of the GA-BP network(3)
Training model. Set GA-BP network parameters and perform network training(4)
Input test data to GA-BP network, build network public opinion analysis model according to the expected output, and conduct new media network public opinion analysis


## 3.1. Index System Construction

Based on the analysis of the characteristics of new media in network public opinion, using the web crawler to grab from the Internet public opinion data associated with the network media, construction of three media network public opinion events early warning index system, specific process is as follows: first, text clustering technique is used to obtain the basic information of the event; then, from the perspective of ordinary network users, text mining is carried out on the opinions and speeches of network events. Finally, the method of sentiment analysis is used to judge the sentiment tendency, and the collection of related index values of new media network public opinion index system is realized. Data source, with clustering algorithm in the form of news report cluster based information, as the event online speech by grabbing TouTiao related TouTiao, comments and forwarding information, eventually form based on TouTiao and news network early warning index system, including the TouTiao related six indicators, news related to four indicators. The specific indicator architecture is shown in Figure3. According to the network public opinion system in Figure 3, each indicator is explained in detail as follows:
(1)
Number of news. The number of news reports related to events, which is positively correlated with the attention of events(2)
Number of websites. The number of websites publishing or reprinting news reports related to the event, which is positively correlated with the attention of the event(3)
Number of TouTiao. The number of event-related TouTiao, which is positively correlated with the attention of events(4)
Number of TouTiao likes. The total number of likes of all event-related TouTiao, which is positively correlated with the attention of events(5)
Number of TouTiao forwarded. The total number of retweets of all event-related TouTiao, which is positively correlated with the attention of events(6)
Number of TouTiao comments. Number of comments on the TouTiao related to the event, which is positively correlated with the attention of the event(7)
Number of positive news. In the news related to events, the number of positive emotion analysis value is positive, which is positively correlated with the emotional tendency of events(8)
Number of negative news. In the news related to events, the number of negative emotion analysis value is negatively correlated with the emotion tendency of events(9)
Number of positive TouTiao. In the event-related TouTiao, the number of positive emotion analysis value is positive, which is positively correlated with the emotional tendency of the event(10)
Number of negative TouTiao. In event-related TouTiao, the number of negative sentiment analysis values is negatively correlated with the emotional tendency of the eventFigure. 3
Network public opinion analysis index system based on hierarchy structure.


## 3.2. Classification of Warning Levels

According to the National Overall Emergency Plan for Public Emergencies, the risk level of new media public opinion is segmented into four grades: I- IV [26]. Level I is severest, level II is severer, level III is severe, and level IV is generally severe. At the same time, in order to facilitate understanding, [0,1] is evenly divided into 4 intervals, which correspond to different early-warning level states from low to high [27]. See Table 1 for the classification of online public opinion risk grades.Table 1
Classification of online public opinion risk levels.
OutputWarning level[0,0.25]I[0.25,0.5]II[0.5,0.75]III[0.75,1]IV


## 3.3. GA-BP-Based Training Warning Model

Based on GA-BP model, the new media online public opinion risk prediction model is designed and trained, and the process is as follows.(1)
Genetic algorithm is used to analyze the training dataset samples to obtain the data feature components and form a new sample set sample(2)
GA-BP model is constructed. The training set was input to the GA-BP network model, and samples in step 1 were taken as the expectations output of the GA-BP network(3)
Training model. Set GA-BP network parameters and perform network training(4)
Input test data to GA-BP network, build network public opinion analysis model according to the expected output, and conduct new media network public opinion analysis


## 4. Experiment and Analysis

All models in this paper were trained and tested on a computer with core I5-7500 CPU @3.40 GHz and 32GB memory. The computer system is Windows10 professional 64-bit. All models are implemented with Matlab2020a Deep Learning Toolbox framework.


### 4.1. Data Acquisition and Preprocessing

Network text related to new media network public opinion is extracted from the Internet by web crawler, and related events related to new media network public opinion are extracted by text clustering technology, and event index values are calculated according to the index system. For sentiment analysis in index data, the open source tool SnowNLP [28] is used in this paper. SnowNLP is a class library written in Python language, which is mainly used for processing Chinese text. It can realize word segmentation, part of speech tagging, emotion analysis, Chinese characters to pinyin, traditional Chinese characters to simplified Chinese characters, keyword extraction and text summary, etc. In SnowNLP, the basic model of emotion classification is the Bayesian model, which is characterized by m1, m2... for problems with c1 and c2 classifications. mn, the characteristics are independent from each other, and the calculation process of emotional tendency U is shown in Equation (6).
(6)Uc1m1,m2,∙∙∙,mt=Um1,m2,∙∙∙,mt/c1Uc1Um1,m2,∙∙∙,mt.In the formula,Um1,m2,⋯mt=Um1,m2,⋯mt/c1, Uc1+Um1,m2,⋯mt/c2Uc2.The value range of emotional inclination is [0,1]. The closer you get to 1, the more positive your emotions are. The opposite is more negative.Ten typical public opinion events were selected from the acquired data of new media online public opinion incidents, the process and results of the constructed new media network public opinion early warning model were displayed. Select events as shown in Table2. GA algorithm is used for data fusion of event-related index data. Table 3 shows the index data and the fusion results.Table 2
Typical new media network public opinion events.
NumberIncidentsNumberIncidents1Poison bean sprouts6Leather milk2COVID-197Change life by mistake3Tianjin Port explosion8Zhengzhou flood4Fake rice9Take legal action against tesla5The bride is borrowed10Digital RMBTable 3
Index system data and GA fusion results.
S/NNews quantityPositive news numberNegative news numberSite numberTouTiao numberLikes numberComment numberForwar-ding numberPositive TouTiao numberNegative TouTiao numberThe GA convergence value12381142174110748192381113527535373150.96242081744223740423521457145821562121810.8331494630863133152912414945472273880.8147085872066876887848127720504722800.26517746139144521407719218430.98641738373131583321726021460.7471465010110211415620814268440.928148499613432151940521521210.27914351901191109519913662540.861013820125924212252622300.72


### 4.2. Result Analysis

In the paper, 66 data were selected to form a sample test set to verify GA-BP, traditional AHP, BP, and RBF models. The early warning accuracy of test results is shown in Table4. Among them, GA-BP model has the best prediction accuracy of 81.4%.Table 4
Comparison between GA-BP model and traditional model.
ModelsNumber of incidentsCorrect warning numberWarning accuracy/%GA-BP665481.4AHP662740.8BP664061.7RBF663451.6Figure4 shows the prediction result curves of the four models. The predicted results of GA-BP model are basically consistent with the expected value curve, while other models have relatively large errors. For example, BP network has significantly inconsistent prediction results with expected values at sample events 7, 10, 16, 17, etc., while RBF neural network has significantly inconsistent prediction results with actual expectations at sample events 18 and 22. On the whole, the stability and validity of GA-BP model are relatively high.Figure. 4
Comparison between GA-BP warning model and traditional warning model.In terms of model training, GA-BP model can meet the training requirements within 200 times, and the error is small, the average relative error of training is 0.502%. The BP model needs 600 times to meet the training requirements with an average relative error of 1.17%, while the RBF model needs 400 times to meet the training requirements with an average relative error of 1.51%. Figure5 shows the corresponding relationship between GA-BP model training times and loss value (namely, loss function, which represents the distance between model output and real results). It can be seen that loss value decreases continuously with the increase of training times, that is, the error decreases.Figure. 5
Relationship between model training times and loss.According to the above results, GA-BP model has better early warning effect in public opinion early warning of new media network.


### 4.3. Case Discussion

The early warning results of some cases in the experiment were analyzed. Table5 shows the corresponding event numbers and corresponding analysis results.Table 5
Analysis results of some cases.
ModelPredicted valuesIncident 1Incident 2Incident 3Incident 4GA-BP0. 560. 480.870.76BP0. 570. 530. 680. 70AHP0. 240. 660.700. 68RBF0. 840. 700. 390. 69Expectations0. 480.400.940. 66LevelIIIIIVIIIIncident 1: A 23-year-old employee of Pinduoduo died suddenly. A 23-year-old employee of Pinduoduo died on his way home from work at 1 : 30 p.m. Netizens’ attention to the incident is partly due to their regret over the loss of young lives and partly due to their rejection of the overtime culture in Internet companies. In the recent capital squeeze topic especially sensitive environment, Pinduoduo released capitalist cold-blooded remarks on their Zhihu number triggered the subsequent shock of public opinion. In this event, GA-BP prediction was accurate and the deviation was small. The corresponding BP warning level is one level higher than the actual level, while the actual warning level of traditional AHP is one level lower, while the actual output of RBF is 0.84, which is two levels higher than the actual level, indicating a large deviation.Incident 2: “ Steamed egg with sea urchin” event in Sanya. A steamed egg with sea urchins sold by a restaurant in Sanya has sparked heated debate after some tourists complained that there were no sea urchins, lobster was changed and the price was too high. The negative public opinion concerning tourism consumption has a great impact on Hainan, which makes a living by tourism. The incident continued to ferment, trending on Weibo. In this event, the GA-BP output value was closest to the expected output, and the warning level was consistent. The corresponding BP and the traditional AHP early warning level are one level higher than the actual early warning level. At the same time, the actual RBF output is 0.70, the early warning level is two levels higher, and the deviation is large.Incident 3: A female Tesla owner gets on the roof of the car to protect her rights. Public opinion continues to ferment after the rights protection event of female Tesla owners at the Shanghai Auto Show. Since then, under the great pressure of public opinion, Tesla officially published driving data. But the parties involved disagree, and events seem to be entering a critical phase. GA-BP output value is closest to the expected output, and the warning level is consistent. The warning level of corresponding BP model and traditional AHP model is one level lower than the actual warning level, while RBF has a large deviation again, and the warning level is two levels lower.Incident 4: Ali female employee incident. After the victim posted an article of nearly 7,000 characters on the Intranet, the article was quickly transferred to public media platforms by means of screenshots, such as Douban and social media, which attracted the attention of media and big V’s and spread it. In this event, THE prediction result of AHP is the most accurate, while the deviation of GA-BP is larger. According to the analysis, there are few related TouTiao and news data in this event, and the time cycle is short, which is not conducive to network training.It can be seen from the above specific cases, compared with the traditional AHP model, neural network model can improve the accuracy of analysis to a certain extent, but the validity of analysis is closely related to the choice of model. For example, BP and GA-BP, in most cases, a good early warning results can be obtained, but RBF is several times larger warning deviation.


## 4.1. Data Acquisition and Preprocessing

Network text related to new media network public opinion is extracted from the Internet by web crawler, and related events related to new media network public opinion are extracted by text clustering technology, and event index values are calculated according to the index system. For sentiment analysis in index data, the open source tool SnowNLP [28] is used in this paper. SnowNLP is a class library written in Python language, which is mainly used for processing Chinese text. It can realize word segmentation, part of speech tagging, emotion analysis, Chinese characters to pinyin, traditional Chinese characters to simplified Chinese characters, keyword extraction and text summary, etc. In SnowNLP, the basic model of emotion classification is the Bayesian model, which is characterized by m1, m2... for problems with c1 and c2 classifications. mn, the characteristics are independent from each other, and the calculation process of emotional tendency U is shown in Equation (6).
(6)Uc1m1,m2,∙∙∙,mt=Um1,m2,∙∙∙,mt/c1Uc1Um1,m2,∙∙∙,mt.In the formula,Um1,m2,⋯mt=Um1,m2,⋯mt/c1, Uc1+Um1,m2,⋯mt/c2Uc2.The value range of emotional inclination is [0,1]. The closer you get to 1, the more positive your emotions are. The opposite is more negative.Ten typical public opinion events were selected from the acquired data of new media online public opinion incidents, the process and results of the constructed new media network public opinion early warning model were displayed. Select events as shown in Table2. GA algorithm is used for data fusion of event-related index data. Table 3 shows the index data and the fusion results.Table 2
Typical new media network public opinion events.
NumberIncidentsNumberIncidents1Poison bean sprouts6Leather milk2COVID-197Change life by mistake3Tianjin Port explosion8Zhengzhou flood4Fake rice9Take legal action against tesla5The bride is borrowed10Digital RMBTable 3
Index system data and GA fusion results.
S/NNews quantityPositive news numberNegative news numberSite numberTouTiao numberLikes numberComment numberForwar-ding numberPositive TouTiao numberNegative TouTiao numberThe GA convergence value12381142174110748192381113527535373150.96242081744223740423521457145821562121810.8331494630863133152912414945472273880.8147085872066876887848127720504722800.26517746139144521407719218430.98641738373131583321726021460.7471465010110211415620814268440.928148499613432151940521521210.27914351901191109519913662540.861013820125924212252622300.72


## 4.2. Result Analysis

In the paper, 66 data were selected to form a sample test set to verify GA-BP, traditional AHP, BP, and RBF models. The early warning accuracy of test results is shown in Table4. Among them, GA-BP model has the best prediction accuracy of 81.4%.Table 4
Comparison between GA-BP model and traditional model.
ModelsNumber of incidentsCorrect warning numberWarning accuracy/%GA-BP665481.4AHP662740.8BP664061.7RBF663451.6Figure4 shows the prediction result curves of the four models. The predicted results of GA-BP model are basically consistent with the expected value curve, while other models have relatively large errors. For example, BP network has significantly inconsistent prediction results with expected values at sample events 7, 10, 16, 17, etc., while RBF neural network has significantly inconsistent prediction results with actual expectations at sample events 18 and 22. On the whole, the stability and validity of GA-BP model are relatively high.Figure. 4
Comparison between GA-BP warning model and traditional warning model.In terms of model training, GA-BP model can meet the training requirements within 200 times, and the error is small, the average relative error of training is 0.502%. The BP model needs 600 times to meet the training requirements with an average relative error of 1.17%, while the RBF model needs 400 times to meet the training requirements with an average relative error of 1.51%. Figure5 shows the corresponding relationship between GA-BP model training times and loss value (namely, loss function, which represents the distance between model output and real results). It can be seen that loss value decreases continuously with the increase of training times, that is, the error decreases.Figure. 5
Relationship between model training times and loss.According to the above results, GA-BP model has better early warning effect in public opinion early warning of new media network.


## 4.3. Case Discussion

The early warning results of some cases in the experiment were analyzed. Table5 shows the corresponding event numbers and corresponding analysis results.Table 5
Analysis results of some cases.
ModelPredicted valuesIncident 1Incident 2Incident 3Incident 4GA-BP0. 560. 480.870.76BP0. 570. 530. 680. 70AHP0. 240. 660.700. 68RBF0. 840. 700. 390. 69Expectations0. 480.400.940. 66LevelIIIIIVIIIIncident 1: A 23-year-old employee of Pinduoduo died suddenly. A 23-year-old employee of Pinduoduo died on his way home from work at 1 : 30 p.m. Netizens’ attention to the incident is partly due to their regret over the loss of young lives and partly due to their rejection of the overtime culture in Internet companies. In the recent capital squeeze topic especially sensitive environment, Pinduoduo released capitalist cold-blooded remarks on their Zhihu number triggered the subsequent shock of public opinion. In this event, GA-BP prediction was accurate and the deviation was small. The corresponding BP warning level is one level higher than the actual level, while the actual warning level of traditional AHP is one level lower, while the actual output of RBF is 0.84, which is two levels higher than the actual level, indicating a large deviation.Incident 2: “ Steamed egg with sea urchin” event in Sanya. A steamed egg with sea urchins sold by a restaurant in Sanya has sparked heated debate after some tourists complained that there were no sea urchins, lobster was changed and the price was too high. The negative public opinion concerning tourism consumption has a great impact on Hainan, which makes a living by tourism. The incident continued to ferment, trending on Weibo. In this event, the GA-BP output value was closest to the expected output, and the warning level was consistent. The corresponding BP and the traditional AHP early warning level are one level higher than the actual early warning level. At the same time, the actual RBF output is 0.70, the early warning level is two levels higher, and the deviation is large.Incident 3: A female Tesla owner gets on the roof of the car to protect her rights. Public opinion continues to ferment after the rights protection event of female Tesla owners at the Shanghai Auto Show. Since then, under the great pressure of public opinion, Tesla officially published driving data. But the parties involved disagree, and events seem to be entering a critical phase. GA-BP output value is closest to the expected output, and the warning level is consistent. The warning level of corresponding BP model and traditional AHP model is one level lower than the actual warning level, while RBF has a large deviation again, and the warning level is two levels lower.Incident 4: Ali female employee incident. After the victim posted an article of nearly 7,000 characters on the Intranet, the article was quickly transferred to public media platforms by means of screenshots, such as Douban and social media, which attracted the attention of media and big V’s and spread it. In this event, THE prediction result of AHP is the most accurate, while the deviation of GA-BP is larger. According to the analysis, there are few related TouTiao and news data in this event, and the time cycle is short, which is not conducive to network training.It can be seen from the above specific cases, compared with the traditional AHP model, neural network model can improve the accuracy of analysis to a certain extent, but the validity of analysis is closely related to the choice of model. For example, BP and GA-BP, in most cases, a good early warning results can be obtained, but RBF is several times larger warning deviation.


## 5. Conclusion

According to the characteristics of new media online public opinion data, such as nonlinear, nonstructural, and complexity, comprehensively consider the evolution law of online public opinion communication, randomness, time variability, and other characteristics of public opinion data. In order to improve its overall prediction accuracy, this paper presents a new design of network public opinion prediction model, namely, GA-BP model. The model is based on BP neural network model and optimized by genetic algorithm. In order to verify the effectiveness of the model, three emergency cases are selected for empirical study. The results show that GA-BP neural network model can effectively decompose the randomness, periodicity, and other influencing factors of online public opinion data in prediction of new media network public opinion. Compared with other reference models, GA-BP model has higher prediction accuracy and convergence speed and can better fit the development trend of public opinion, and its prediction error is relatively low. However, the method in this paper is still in the exploratory stage as there are many factors affecting the evolution and dissemination of new media network public opinions, and further research is needed in the optimization and improvement of fitting prediction accuracy.



---

*Source: 3202099-2022-04-19.xml*