# Application Analysis of Emotional Learning Model Based on Improved Text in Campus Review and Student Public Opinion Management

Authors: Zhaofeng Weng
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In an era of rapid mobile Internet development, students are increasingly expressing their views on specific events through campus comments. In the Web 2.0 era, the concept of public media participation is widely used by students, and it is important to effectively analyze online campus public opinion comments and present the findings in a rationalized form for the management of campus public opinion. In the new era of education governance modernization, the level of public opinion management in universities has become a key indicator to improve the standard of education management in higher education institutions; therefore, this paper focuses on proposing an innovative deep learning-based research method for topic management of university public opinion. Firstly, through the improved LDA module with sentiment discrimination learning capability, the sentiment of the main arguments in the campus commentary is extracted, and then the statistical sentiment intensity of the in-depth learning module is used to analyze the sentiment intensity of the thematic arguments of different events in time series, so as to achieve the long-term tracking of the trend of the sentiment intensity of the whole event.


---

## Body

## 1. Introduction

Public opinion, as a sociological term, refers to the subjective perception of public events in a certain context. Public opinion on campus networks refers to the attitudes and possibly related behaviors of the “subjects of public opinion,” with university students being the specific group of people, toward the events they care about on the Internet [1]. As “subjects of public opinion,” university students are significantly different from other groups in expressing their views on specific events due to their age, psychology, and cognition [2]. According to the 48th Statistical Report on the Development of China's Internet released by China Internet Network Information Center (CNNIC) in Beijing on August 27, 2021, the number of Internet users in China reached 1.011 billion in June 2021, an increase of 21.75 million compared with December 2020, and the Internet penetration rate was as high as 71.6% [3]. This huge scale includes the most active group of students in colleges and universities. In the context of promoting the modernization of educational governance, the management of online public opinion in colleges and universities has become an important part of improving educational management in colleges and universities [4]. College administrators must pay attention to the influence of information technology on students' thoughts and education and strengthen public opinion management through scientific and innovative methods, and it is on this basis that this paper proposes an innovative and feasible method.Currently, for opinion analysis and management, from an algorithmic perspective, the most focus is on LDA probabilistic topic models and deep learning models. The literature [5] used LDA models with word2vec models to construct sentiment dictionaries for the temporal analysis of sentiment intensity of hot events of students' concern. In the literature [6], for public opinion comments in complex contexts, the sentiment value measurement algorithm was constructed and incorporated into the improved LDA-ARMA model for dynamic presentation and fine-grained classification of the sentiment of event opinion. In the topic detection task in the opinion analysis subtask, literature [7] proposed to extend the topic distribution obtained from the LDA model with word vectors trained by Skip-gram of word2vec as the text representation and used it as the features of the SKM algorithm for cluster analysis, while optimizing the cluster number selection of SKM with the first-order difference of distance cost function values to obtain multiple text clusters as the online opinion topics. Literature [8] used a more efficient sentiment classification model based on this, which was constructed by LSTM neural network model, and the accuracy rate was improved by about 10%. Literature [9] used dimensional sentiment analysis based on Valence-Arousal, and the sentiment classification effect was significantly improved. Literature [10, 11] used a hybrid algorithm based on LSTM. LSTM + Bi further reduced the influence of irrelevant words in long texts on the classification results, while LSTM + Bert + Bi had higher accuracy and effectively solved the sentiment classification problem in public opinion. In the literature [12, 13], a logistic curve model was used to classify the stages of public opinion, and graph attention networks were used to predict the evolution of public opinion after sentiment classification. The literature [14, 15] used softsign activation function instead of tanh activation function in the LSTM model, while using regularized LSTM input weights to effectively combine the advantages of their respective models to classify the tendency of public opinion into positive and negative sentiments for early warning purposes, and the experiments proved that the performance of the enhanced model improved significantly and effectively.The aforementioned literature applies deep learning algorithm models to various stages of opinion management from different perspectives, but from a general perspective, the following shortcomings still exist: (1) LDA models, as unsupervised machine learning techniques, adopt the bag-of-words approach to transform textual information into digital information that can be easily modeled, but the bag-of-words approach does not consider the order between words and there are difficulties in evaluating the effect; (2) word2vec, as a static approach, has strong generality but cannot be dynamically optimized for a specific task, and the problem of multiple meaning words cannot be effectively solved because the generating vector and the words are in a one-to-one relationship. Based on the above considerations, this paper improves the existing IDA model and deep learning algorithm based on the existing LDA probabilistic topic model and deep learning model from the perspectives of analysis strategy, dynamic monitoring, and effect evaluation; then combines various hybrid algorithms; and applies them to the opinion management of campus reviews. Finally, the effectiveness of the algorithmic model for campus opinion management is demonstrated with experimental validation analysis.


## 2. Related Work

As the essence of the research method proposed and applied in this paper is to use LDA models with deep learning models (word2vec, Bert), combined with sentiment dictionaries, to perform a temporal analysis of the intensity of sentiment in campus reviews, this section will focus on three parts: probabilistic topic models, neural network language models, and sentiment analysis based on sentiment dictionaries.


### 2.1. Probabilistic Topic Modeling

In probabilistic topic modeling, as one of the most common models in topic modeling methods, the core is to extract topic information from a large amount of textual information through statistical methods and theories, and it has a wide range of applications in the field of information retrieval [16]. The most initial text representation models, the TF-IDF model [16] and the spatial vector model [17], are simpler and cannot distinguish between polysemantic words. Latent Semantic Analysis (LSA) models are therefore proposed to achieve a high-dimensional to low-dimensional spatial mapping of document words [18]. Latent Dirichlet Allocation (LDA) is a more effective probabilistic topic model for identifying latent topic information in campus reviews, using a three-layer Bayesian framework, compared to the previous models [19]. However, as the traditional LDA model uses a bag-of-words approach that lacks consideration of interword order and text-to-topic links, the improved LDA model is used to extract and analyze thematic information from the text in order to optimize the results and improve the accuracy of sentiment analysis in campus reviews.


### 2.2. Neural Network Language Models

Statistical language models aim to learn the joint probability functions of words, and their main challenge is dimensional catastrophe. The emergence of neural network language models (NNLMs) has effectively addressed this problem. The first neural network language model (NNLM) [20] was systematized by Bengio. By optimizing the training model, it is possible to eliminate dimensional disasters and to understand a number of sentences with similar meanings. Two core components make up the neural network language model: distributed representation and word embedding [21]. Neural network models have evolved considerably over the last decade or so, and various models have been proposed using the NNLM as a template, including the CBOW model and the Skip-gram model [22, 23], which are simpler than the NNLM. In addition, hierarchical Softmax algorithms and negative sample algorithms have been developed to train models faster and more efficiently [24]. Google's deep learning tool, word2vec, released in 2013, is a combination of these models and algorithms and provides a fast and effective way to obtain semantic associations between words. Based on the effectiveness of word2vec and its ability to accurately capture potential semantic similarities between words, the aim of this paper is to use an improved word2vec and Bert model to calculate the sentiment intensity of topic ideas extracted from campus reviews.


### 2.3. Emotional Analysis

Sentiment analysis is mainly implemented based on corpus, lexicon, and graph approaches. The corpus-based evaluation word extraction and discrimination utilize the statistical properties of the corpus to mine and judge the polarity of corpus words, but the accuracy is more difficult to assess due to the limitations of the corpus. The lexicon-based evaluation word extraction and discrimination are mainly achieved through lexical links between words in the lexicon, and the HowNet sentiment lexicon is usually used for semantic similarity and semantic tendency of words based on semantic correlation fields. The calculation method, word-by-word matching for each comment text, finds all positive sentiment words and negative sentiment words in the text for sentiment calculation, and the sentiment scoring rule for each sentiment word is shown in the following equation specifically.(1)S=−1nVeW.The sentiment score of the sentiment word in the time period is obtained by adding the sentiment scores of the same sentiment word appearing in different comment texts in the same time period, whereS is the sentiment score of the sentiment word; n is the number of negative words; Ve represents the sentiment lexicality, with a value of 1 indicating a positive sentiment word and −1 indicating a negative sentiment word; and W is the degree weight value.Graph-based sentiment analysis is implemented by introducing an attention mechanism, which can solve the problem of information loss and accuracy degradation caused by the increase of coding intermediate vectors as the input text length increases when methods such as LSTM and word2vec are used for text classification. In this paper, a self-attentive mechanism is used to reduce the dependence on external information and improve the ability to capture data features, which in turn improves the accuracy of text de-emphasis analysis. The method is implemented by acquiring sentiment words for a certain time period of comment text and associating the comment text with the sentiment words to construct a graph structure, as shown in Figure1.Figure 1
Emotional interaction diagram.The vertices in Figure1 are the sentiment words that appear in that time step, and if there is a sentiment word w in the comment text, the comment s is attributed to the corresponding vertex v. A vertex can contain multiple comments, and a comment can be assigned to multiple vertices. The mapping relationship also implies that the more the public comment texts associated with two sentiment words, the closer the sentiment expressed. In this paper, we propose a method for constructing edges between vertices based on the union of text structure and text content. The TF-IDF text similarity of the comment text associated with vertex vi and vertex vj is Tij. If there are public comments on the associated comment text and the number of public comments is N, then an edge eij is added between these two vertices with the weight wij:(2)wij=a+Nb+N,where a and b are the numerator and denominator, respectively, after conversion to the simplest fraction. The threshold value of text similarity a is set to 0.3. If there is no common comment between two vertices but their text similarity Tij is greater than or equal to a, an edge eij is similarly added between vi and vj with the weight(3)wij=Tij.


### 2.4. Gated Circulation Units

GRU is the same improvement to recurrent neural networks as LSTM. The GRU model contains two gate structures, update gates and reset gates. The reset gate determines how new input information is combined with previous memory, and the update gate defines the amount of previous memory saved to the current time step. By having a more streamlined structure, the GRU model has a speedup in training compared to the LSTM model and is able to better characterize and model the text. Let the input be xt and the output of the GRU hidden layer be ht at moment t. The computation is shown as follows.(4)zt=αWZht−1，xt,(5)rt=αWrht−1,st,(6)¯ht=tanhWrt∗ht−1,st,(7)ht=1−zt∗ht−1+zt∗¯ht,where w is the weight matrix connecting the two layers, subscripts r and z denote the reset and update gates, and tanh and σ denote the activation functions.The model in this paper uses a two-way gate to control the cyclic unit for data extraction, which fully considers the sequence information of the text and improves the accuracy of sentiment judgment.


## 2.1. Probabilistic Topic Modeling

In probabilistic topic modeling, as one of the most common models in topic modeling methods, the core is to extract topic information from a large amount of textual information through statistical methods and theories, and it has a wide range of applications in the field of information retrieval [16]. The most initial text representation models, the TF-IDF model [16] and the spatial vector model [17], are simpler and cannot distinguish between polysemantic words. Latent Semantic Analysis (LSA) models are therefore proposed to achieve a high-dimensional to low-dimensional spatial mapping of document words [18]. Latent Dirichlet Allocation (LDA) is a more effective probabilistic topic model for identifying latent topic information in campus reviews, using a three-layer Bayesian framework, compared to the previous models [19]. However, as the traditional LDA model uses a bag-of-words approach that lacks consideration of interword order and text-to-topic links, the improved LDA model is used to extract and analyze thematic information from the text in order to optimize the results and improve the accuracy of sentiment analysis in campus reviews.


## 2.2. Neural Network Language Models

Statistical language models aim to learn the joint probability functions of words, and their main challenge is dimensional catastrophe. The emergence of neural network language models (NNLMs) has effectively addressed this problem. The first neural network language model (NNLM) [20] was systematized by Bengio. By optimizing the training model, it is possible to eliminate dimensional disasters and to understand a number of sentences with similar meanings. Two core components make up the neural network language model: distributed representation and word embedding [21]. Neural network models have evolved considerably over the last decade or so, and various models have been proposed using the NNLM as a template, including the CBOW model and the Skip-gram model [22, 23], which are simpler than the NNLM. In addition, hierarchical Softmax algorithms and negative sample algorithms have been developed to train models faster and more efficiently [24]. Google's deep learning tool, word2vec, released in 2013, is a combination of these models and algorithms and provides a fast and effective way to obtain semantic associations between words. Based on the effectiveness of word2vec and its ability to accurately capture potential semantic similarities between words, the aim of this paper is to use an improved word2vec and Bert model to calculate the sentiment intensity of topic ideas extracted from campus reviews.


## 2.3. Emotional Analysis

Sentiment analysis is mainly implemented based on corpus, lexicon, and graph approaches. The corpus-based evaluation word extraction and discrimination utilize the statistical properties of the corpus to mine and judge the polarity of corpus words, but the accuracy is more difficult to assess due to the limitations of the corpus. The lexicon-based evaluation word extraction and discrimination are mainly achieved through lexical links between words in the lexicon, and the HowNet sentiment lexicon is usually used for semantic similarity and semantic tendency of words based on semantic correlation fields. The calculation method, word-by-word matching for each comment text, finds all positive sentiment words and negative sentiment words in the text for sentiment calculation, and the sentiment scoring rule for each sentiment word is shown in the following equation specifically.(1)S=−1nVeW.The sentiment score of the sentiment word in the time period is obtained by adding the sentiment scores of the same sentiment word appearing in different comment texts in the same time period, whereS is the sentiment score of the sentiment word; n is the number of negative words; Ve represents the sentiment lexicality, with a value of 1 indicating a positive sentiment word and −1 indicating a negative sentiment word; and W is the degree weight value.Graph-based sentiment analysis is implemented by introducing an attention mechanism, which can solve the problem of information loss and accuracy degradation caused by the increase of coding intermediate vectors as the input text length increases when methods such as LSTM and word2vec are used for text classification. In this paper, a self-attentive mechanism is used to reduce the dependence on external information and improve the ability to capture data features, which in turn improves the accuracy of text de-emphasis analysis. The method is implemented by acquiring sentiment words for a certain time period of comment text and associating the comment text with the sentiment words to construct a graph structure, as shown in Figure1.Figure 1
Emotional interaction diagram.The vertices in Figure1 are the sentiment words that appear in that time step, and if there is a sentiment word w in the comment text, the comment s is attributed to the corresponding vertex v. A vertex can contain multiple comments, and a comment can be assigned to multiple vertices. The mapping relationship also implies that the more the public comment texts associated with two sentiment words, the closer the sentiment expressed. In this paper, we propose a method for constructing edges between vertices based on the union of text structure and text content. The TF-IDF text similarity of the comment text associated with vertex vi and vertex vj is Tij. If there are public comments on the associated comment text and the number of public comments is N, then an edge eij is added between these two vertices with the weight wij:(2)wij=a+Nb+N,where a and b are the numerator and denominator, respectively, after conversion to the simplest fraction. The threshold value of text similarity a is set to 0.3. If there is no common comment between two vertices but their text similarity Tij is greater than or equal to a, an edge eij is similarly added between vi and vj with the weight(3)wij=Tij.


## 2.4. Gated Circulation Units

GRU is the same improvement to recurrent neural networks as LSTM. The GRU model contains two gate structures, update gates and reset gates. The reset gate determines how new input information is combined with previous memory, and the update gate defines the amount of previous memory saved to the current time step. By having a more streamlined structure, the GRU model has a speedup in training compared to the LSTM model and is able to better characterize and model the text. Let the input be xt and the output of the GRU hidden layer be ht at moment t. The computation is shown as follows.(4)zt=αWZht−1，xt,(5)rt=αWrht−1,st,(6)¯ht=tanhWrt∗ht−1,st,(7)ht=1−zt∗ht−1+zt∗¯ht,where w is the weight matrix connecting the two layers, subscripts r and z denote the reset and update gates, and tanh and σ denote the activation functions.The model in this paper uses a two-way gate to control the cyclic unit for data extraction, which fully considers the sequence information of the text and improves the accuracy of sentiment judgment.


## 3. Research Methodology and Framework

To effectively study the changing trends of sentiment intensity of topical events in campus comments, this study combines Latent Dirichlet Allocation (LDA) and deep learning. Considering the need for high timeliness in managing public opinion in campus comments, we design a sentiment intensity analysis framework based on probabilistic topic modeling and deep learning. The framework uses LDA models to discover information related to a specific topic event from campus comments; annotates the information by topic; mines students' views and opinions on the event; implements sentiment analysis through word2vec word embedding and LSTM networks, so as to obtain the sentiment intensity of the information and apply it to the topic distribution; and finally builds up the sentiment intensity through changing it under each topic by attention networks and gated recurrent units combined to form a predictive model based on graph neural networks.


### 3.1. Potential Dirichlet Allocation Model

Probabilistic topic models (PTMs) have been used for good effect in text classification, information retrieval, and other related fields. The basic principle of a probabilistic topic model is that a document is a mixture of probability distributions of several topics, each of which is a mixture of probability distributions of words, and can be regarded as a generative model of a document. Among the various approaches to probabilistic topics, the Latent Dirichlet Allocation (LDA) model is one of the most effective [16].The traditional LDA-based topic modeling relies on a word cooccurrence model, which is necessarily less effective for short texts such as reviews. Therefore, this paper will improve the IDA to enable adaptive and short textual adaptation of the topic model.


#### 3.1.1. Model Generation Process

The LDA is a generative probabilistic model of a 3-layer Bayesian network with the graphical model shown in Figure2.Figure 2
Graphical model of IDA.Each campus review is assumed to be a mixture of topics; each topic is a probability distribution over a set of words, and each word in the document is generated from a fixed topic.The generation process is as follows:(1)
Sample a word distributionΦz∼Dirβ for any topic z.(2)
For each commentdm, sample a topic distribution θd∼Dirα.(3)
For the wordwmi in comment dm, traverse a, b.(a)
Select a subjectzmj, zmj∼Multiθd.(b)
Choose a wordwmi, wmi∼MultiΦk.M denotes the number of documents d in the corpus; z denotes the topic in the corpus; w denotes the words in the corpus; θk denotes the word distribution of topic zk; θd denotes the topic distribution of document d; wm, i denotes the i-th word of document dm; zm, j denotes the j-th topic associated with document dm; Nd denotes the number of words in document d; zd denotes the topic of document d; and α and β are hyperparameters, empirical values: α = 50/k, β = 0.0.1.In the topic model,wmnd is the known variable, α and β are the two prior parameters of the given Dirichlet distribution, and zmn is the potential topic, which is also the generating variable, so it is the document-topic distribution θmk and the topic-word distribution ϕkt that need to be estimated. Parameter estimation methods currently include the EM (expectation maximization) algorithm, GS (Gibbs sampling), variational Bayesian estimation, message passing algorithm, mean-field variational expectation maximization, and expectation propagation algorithm.This paper focuses on the collapsed Gibbs sampling algorithm for LDA. “Collapsing” in Gibbs sampling refers to the use of statistical relationships in the form of integrals to achieve estimates of the document-topic and topic-word distributions, avoiding direct computation of the implied parameters.Based on the model in Figure2 and the generation process in Section 3.1.1, the joint probability distribution of the model can be calculated.(8)pw,z|α,β=pw|z,βpz|α,pw|α,β=∫pw|z,ΦpΦ|βdΦ=∏m=1MΔnm+βΔα,pz|α=∫pz|ΘpΘ|αdΘ=∏m=1MΔnm+βΔα,nz=nztt=1V,nm=nmkk=1K,Δα=∏i=1KTαiT∑i=1Kαi.nzt is the number of times a word t appears in topic zk; nmk is the number of times a word in document dm appears in topic zk; Θ,θ are a parameter space consisting of α, β.(9)α=α1,....,αk,α1=α2=⋯=αk,β=β=β1,…,βk,β1=β2=⋯βk.Calculate the conditional posterior probability using the joint probability distribution calculated in (1).(10)pzi=k|z−i=pw,zpw,z−i,(11)pw,zpw−i|z−ipwi|z−ipz−i=pw,zpw−i,z−i.1pwi,z−i∝Δnz+βΔnz,−i+β.Δnm+αΔnm,−i,α∝⋅nk,−it+βt∑t=1Vnk,−it+βt.nm,−it+αk∑k=1Knmk+αk−1.Using the corollary of the prior distribution of the polynomial distribution, the Dirichlet distribution, and (10), the probability distribution of the target parameter can be obtained, and finally the estimation of the parameter is achieved.(12)pθm|w,z,α=∏n=1Nmpzm,n|θmpθm|α∫Θ∏n=1Nmpzm,n|θmpθm|αdθm,∏i;zi=kpwi|ΦkpΦk|β∫Θ∏i;zi=kpwi|ΦkpΦk|βdΦk=DirΦk|nk+β,Φk,t=nkt+βt∑t=1Vnkk+βt,θm,k=nmk+αk∑k=1Knmk+αk,∏n=1Nmpzm,n|θmpθm|α∫Θ∏n=1Nmpzm,n|θmpθm|αdθm=Dirθm|nm+α.


### 3.2. Word2vec

As a deep learning-based tool, word2vec provides a more efficient way of representing the semantic distance between words by calculating the cosine distance between the word vectors and obtaining the vector expressions of each word in the corpus, based on the corpus and optimization of the training model. Word2vec includes two word vector training models, CBOW and Skip-gram, both of which include an input layer, a projection layer, and an output layer, but the CBOW model predicts the current word from its context, whereas the Skip-gram model predicts the current word from its context. Similarly, word2vec includes two word vector optimization models, the Hierarchical Softmax model and the Negative Sampling model. The Hierarchical Softmax optimization method constructs a binary tree using the frequency of words in the corpus as weights and maps the leaf nodes to all words, while the Negative Sampling optimization method uses relatively simple resampling to improve the speed of word vector training. By combining the two training models with the two optimization methods, a total of four frameworks for training word vectors can be obtained. As a tool for training word vectors, it can quickly and efficiently represent words in a corpus as vectors and capture the semantic features and similarities between words for use in other related application studies. The sentiment intensity of the text data is obtained and used in the correlation analysis of the change of sentiment intensity over time for each topic.


### 3.3. Specific Study Process

In this paper, we investigate a method for sentiment intensity analysis (shown in Figure3), using probabilistic topic modeling and deep learning to crawl text data from campus forums based on selected hot events and clean the data. Then, we train the model to analyze selected topics that are meaningful or need attention. Based on explicit sentiment words, we use word2vec to obtain implicit sentiment words in the text data and calculate the sentiment intensity of each text. Finally, we perform sentiment intensity time-series analysis under the selected topics.(1)
Data crawling and preprocessing. The two main tasks are text data capturing and text data preprocessing. The crawler collects and crawls time-series data related to hot events. After crawling the data, the crawled data is preprocessed by word separation, spam filtering, and deactivation of words.(2)
Topic modeling and filtering. After acquiring the data and preprocessing it, probabilistic topic modeling is carried out using the LDA model.(3)
Sentiment intensity calculation. The calculation of sentiment intensity is carried out in parallel with the LDA theme modeling. Sentiment intensity was calculated by importing the data into word2vec for word vector cosine distance calculation and then by SO-SD.Figure 3
Specific process for sentiment analysis.


#### 3.3.1. Deep Learning Sentiment Analysis Methods Incorporating Self-Attention Mechanisms

This paper further incorporates deep learning sentiment analysis with a self-attentive mechanism based on traditional methods, which can effectively improve the accuracy of temporal analysis.The model in this paper is divided into six main layers: the word embedding layer, the BGRU layer, the self-attentive layer, the multi-granularity convolutional layer, the attention-based pooling layer, and the fully connected and classified layer, as shown in Figure4.Figure 4
Deep learning sentiment analysis methods incorporating self-attentive mechanisms.The comment text is transformed into word sequences using a word separation library; i.e., the text data is pretrained to achieve word vector mapping.Implementing a word vector to a bidirectional gated cyclic unit to learn serialization features, the operation can be combined via a forward GRU and a reverse GRU, followed by the output, as shown in the following equations:(13)ht+=fGRUht−1,vt,(14)ht−=fGRUht−1,vt,(15)ht=ht+,ht−.The self-attentive mechanism is used to perform an initial screening of features after sequence analysis and extract features with high task relevance. The specific form is as follows: global information is considered, word weight valuesα are calculated, and the weights are weighted and summed with the features at each moment to obtain the highlighted new focus feature Ht. This formula is shown as follows:(16)Ht=∑αtht,where αt is the feature weight and the condition ∑αt=1 is satisfied.This layer receives the output features from the attention layer and selects convolutional kernels of different sizes for further feature extraction using the ReLU function, which speeds up the training convergence and effectively avoids problems such as gradient explosion and disappearance. The feature extraction process is shown as follows:(17)ci=fReluw.xi:i+h−1+b,where w is the convolutional kernel weight, h ∗ m denotes the convolutional kernel window granularity, and fRelu is the activation function.After the model has obtained the feature map, pooling is used to reduce the amount of training data and model parameters to further find out the factors that have the greatest impact on the final sentiment polarity classification results, and this paper uses the attention mechanism instead of the traditional pooling layer to improve the feature extraction capability, as shown in the following equation:(18)Pt=∑at′ct,where at′ is the feature weight and satisfies ∑at′=1.The feature map of the data obtained in the convolution layer is extracted by self-attentive dimensionality reduction to obtain a local feature sequence. This layer feeds the feature sequence into the fully connected layer for feature fusion and is classified by the classification layer for emotional polarity. The specific operation process is as follows: the sequence is processed through the fully connected layer to obtain the feature sequenceDfinal; the classification layer performs feature fusion analysis through Softmax and transforms Dfinal to derive the probability distribution of the two emotional polarities. The calculation formula is shown in the following equation:(19)pi=SoftmaxW.Dfinal+b,where pi is the probability distribution of sentiment polarity, W is the weight matrix of Softmax, and b is the offset.The sentiment intensity calculation is performed simultaneously with the LDA modeling, which is more complex compared to the topic modeling.The processed data were transformed into word vectors, the sentiment lexicon was combined with word2vec and LSTM networks to label sentiment word lexicality, and finally SO-SD was applied to calculate sentiment intensity. The specific calculation formula is shown as follows:(20)SO−SDword=∑poword∈PwordsSDword,pword−∑noword∈NwordsSDword,nword,where poword denotes a positive dominant sentiment word that is highly correlated with word; Powords denotes a positive dominant sentiment word that is most correlated with word; nword denotes a negative dominant sentiment word that is highly correlated with word; and Nwords denotes a negative dominant sentiment word that is most correlated with word.The specific formula is shown as follows:(21)SDword1,word2=∑k=1nx1kx2k∑knx1k2∑knx1k2,where n is the word vector dimension, x1k is the k-dimension value of the first word vector, and x2k is the k-dimension value in the second word vector.Once the SO-SD values are obtained,p and q are used as thresholds to make judgments as follows:(22)SO−SDword>pThe  Word is  a positive implicit emotion word,∈p,qThe word is neutral,<qThe word is a negative implicit emotion word.All positive and negative sentiment words are represented as +1 and −1, respectively. Finally, according to the emotional words and their corresponding emotional intensity, the evaluation is carried out in the campus comment text.


#### 3.3.2. Building Predictive Models

Existing prediction models are mainly based on graph neural networks, using them as feature extractors, embedding nodes in vectors, and implementing sequence learning with recurrent neural networks. These methods require information about the nodes over the entire time span and have limited applicability to scenarios where the nodes change frequently. Therefore, recurrent neural networks are usually used for dynamic injection into graph convolutional network parameters to form evolving sequences to solve this problem.This paper introduces an attention mechanism into graph neural networks on this basis, enabling adaptation to different neighbor weights shared across all edges in the graph, without relying on pre-access to the global graph structure and node features. The prediction model is based on a graph attention network and gated recurrent units, where the graph attention network is the basis and the gated recurrent network implements network parameter updates. The node features are convolved with the graph attention network to obtain a temporal node embedding matrix, and the weight matrix evolves over time through the gated cyclic unit, with the dynamic evolution of thel-th level of the weight parameter matrix being shown as follows:(23)Wtl=GRUHtl,Wt−1l,where Wtl and Wt−1l are the weight parameter matrices for time period t and time period t − 1, respectively; Htl is the time period t, l-layer node embedding matrix, updated in the manner shown in the following equation:(24)Htl+1=GATAt,Htl,Wtl,where At is the corresponding adjacency matrix for time period t, which is used to store the inter-vertex relationship, and the node embedding matrix for time period t and layer l + 1 is obtained by calculation. The model can predict the possible sentiment words and the corresponding scores in the next time period by the graph structure in the time period, through the multilayer perceptron MLP, with x graph structure information, and finally all scores are summed up as the sentiment words derived from the time period prediction.


## 3.1. Potential Dirichlet Allocation Model

Probabilistic topic models (PTMs) have been used for good effect in text classification, information retrieval, and other related fields. The basic principle of a probabilistic topic model is that a document is a mixture of probability distributions of several topics, each of which is a mixture of probability distributions of words, and can be regarded as a generative model of a document. Among the various approaches to probabilistic topics, the Latent Dirichlet Allocation (LDA) model is one of the most effective [16].The traditional LDA-based topic modeling relies on a word cooccurrence model, which is necessarily less effective for short texts such as reviews. Therefore, this paper will improve the IDA to enable adaptive and short textual adaptation of the topic model.


### 3.1.1. Model Generation Process

The LDA is a generative probabilistic model of a 3-layer Bayesian network with the graphical model shown in Figure2.Figure 2
Graphical model of IDA.Each campus review is assumed to be a mixture of topics; each topic is a probability distribution over a set of words, and each word in the document is generated from a fixed topic.The generation process is as follows:(1)
Sample a word distributionΦz∼Dirβ for any topic z.(2)
For each commentdm, sample a topic distribution θd∼Dirα.(3)
For the wordwmi in comment dm, traverse a, b.(a)
Select a subjectzmj, zmj∼Multiθd.(b)
Choose a wordwmi, wmi∼MultiΦk.M denotes the number of documents d in the corpus; z denotes the topic in the corpus; w denotes the words in the corpus; θk denotes the word distribution of topic zk; θd denotes the topic distribution of document d; wm, i denotes the i-th word of document dm; zm, j denotes the j-th topic associated with document dm; Nd denotes the number of words in document d; zd denotes the topic of document d; and α and β are hyperparameters, empirical values: α = 50/k, β = 0.0.1.In the topic model,wmnd is the known variable, α and β are the two prior parameters of the given Dirichlet distribution, and zmn is the potential topic, which is also the generating variable, so it is the document-topic distribution θmk and the topic-word distribution ϕkt that need to be estimated. Parameter estimation methods currently include the EM (expectation maximization) algorithm, GS (Gibbs sampling), variational Bayesian estimation, message passing algorithm, mean-field variational expectation maximization, and expectation propagation algorithm.This paper focuses on the collapsed Gibbs sampling algorithm for LDA. “Collapsing” in Gibbs sampling refers to the use of statistical relationships in the form of integrals to achieve estimates of the document-topic and topic-word distributions, avoiding direct computation of the implied parameters.Based on the model in Figure2 and the generation process in Section 3.1.1, the joint probability distribution of the model can be calculated.(8)pw,z|α,β=pw|z,βpz|α,pw|α,β=∫pw|z,ΦpΦ|βdΦ=∏m=1MΔnm+βΔα,pz|α=∫pz|ΘpΘ|αdΘ=∏m=1MΔnm+βΔα,nz=nztt=1V,nm=nmkk=1K,Δα=∏i=1KTαiT∑i=1Kαi.nzt is the number of times a word t appears in topic zk; nmk is the number of times a word in document dm appears in topic zk; Θ,θ are a parameter space consisting of α, β.(9)α=α1,....,αk,α1=α2=⋯=αk,β=β=β1,…,βk,β1=β2=⋯βk.Calculate the conditional posterior probability using the joint probability distribution calculated in (1).(10)pzi=k|z−i=pw,zpw,z−i,(11)pw,zpw−i|z−ipwi|z−ipz−i=pw,zpw−i,z−i.1pwi,z−i∝Δnz+βΔnz,−i+β.Δnm+αΔnm,−i,α∝⋅nk,−it+βt∑t=1Vnk,−it+βt.nm,−it+αk∑k=1Knmk+αk−1.Using the corollary of the prior distribution of the polynomial distribution, the Dirichlet distribution, and (10), the probability distribution of the target parameter can be obtained, and finally the estimation of the parameter is achieved.(12)pθm|w,z,α=∏n=1Nmpzm,n|θmpθm|α∫Θ∏n=1Nmpzm,n|θmpθm|αdθm,∏i;zi=kpwi|ΦkpΦk|β∫Θ∏i;zi=kpwi|ΦkpΦk|βdΦk=DirΦk|nk+β,Φk,t=nkt+βt∑t=1Vnkk+βt,θm,k=nmk+αk∑k=1Knmk+αk,∏n=1Nmpzm,n|θmpθm|α∫Θ∏n=1Nmpzm,n|θmpθm|αdθm=Dirθm|nm+α.


## 3.1.1. Model Generation Process

The LDA is a generative probabilistic model of a 3-layer Bayesian network with the graphical model shown in Figure2.Figure 2
Graphical model of IDA.Each campus review is assumed to be a mixture of topics; each topic is a probability distribution over a set of words, and each word in the document is generated from a fixed topic.The generation process is as follows:(1)
Sample a word distributionΦz∼Dirβ for any topic z.(2)
For each commentdm, sample a topic distribution θd∼Dirα.(3)
For the wordwmi in comment dm, traverse a, b.(a)
Select a subjectzmj, zmj∼Multiθd.(b)
Choose a wordwmi, wmi∼MultiΦk.M denotes the number of documents d in the corpus; z denotes the topic in the corpus; w denotes the words in the corpus; θk denotes the word distribution of topic zk; θd denotes the topic distribution of document d; wm, i denotes the i-th word of document dm; zm, j denotes the j-th topic associated with document dm; Nd denotes the number of words in document d; zd denotes the topic of document d; and α and β are hyperparameters, empirical values: α = 50/k, β = 0.0.1.In the topic model,wmnd is the known variable, α and β are the two prior parameters of the given Dirichlet distribution, and zmn is the potential topic, which is also the generating variable, so it is the document-topic distribution θmk and the topic-word distribution ϕkt that need to be estimated. Parameter estimation methods currently include the EM (expectation maximization) algorithm, GS (Gibbs sampling), variational Bayesian estimation, message passing algorithm, mean-field variational expectation maximization, and expectation propagation algorithm.This paper focuses on the collapsed Gibbs sampling algorithm for LDA. “Collapsing” in Gibbs sampling refers to the use of statistical relationships in the form of integrals to achieve estimates of the document-topic and topic-word distributions, avoiding direct computation of the implied parameters.Based on the model in Figure2 and the generation process in Section 3.1.1, the joint probability distribution of the model can be calculated.(8)pw,z|α,β=pw|z,βpz|α,pw|α,β=∫pw|z,ΦpΦ|βdΦ=∏m=1MΔnm+βΔα,pz|α=∫pz|ΘpΘ|αdΘ=∏m=1MΔnm+βΔα,nz=nztt=1V,nm=nmkk=1K,Δα=∏i=1KTαiT∑i=1Kαi.nzt is the number of times a word t appears in topic zk; nmk is the number of times a word in document dm appears in topic zk; Θ,θ are a parameter space consisting of α, β.(9)α=α1,....,αk,α1=α2=⋯=αk,β=β=β1,…,βk,β1=β2=⋯βk.Calculate the conditional posterior probability using the joint probability distribution calculated in (1).(10)pzi=k|z−i=pw,zpw,z−i,(11)pw,zpw−i|z−ipwi|z−ipz−i=pw,zpw−i,z−i.1pwi,z−i∝Δnz+βΔnz,−i+β.Δnm+αΔnm,−i,α∝⋅nk,−it+βt∑t=1Vnk,−it+βt.nm,−it+αk∑k=1Knmk+αk−1.Using the corollary of the prior distribution of the polynomial distribution, the Dirichlet distribution, and (10), the probability distribution of the target parameter can be obtained, and finally the estimation of the parameter is achieved.(12)pθm|w,z,α=∏n=1Nmpzm,n|θmpθm|α∫Θ∏n=1Nmpzm,n|θmpθm|αdθm,∏i;zi=kpwi|ΦkpΦk|β∫Θ∏i;zi=kpwi|ΦkpΦk|βdΦk=DirΦk|nk+β,Φk,t=nkt+βt∑t=1Vnkk+βt,θm,k=nmk+αk∑k=1Knmk+αk,∏n=1Nmpzm,n|θmpθm|α∫Θ∏n=1Nmpzm,n|θmpθm|αdθm=Dirθm|nm+α.


## 3.2. Word2vec

As a deep learning-based tool, word2vec provides a more efficient way of representing the semantic distance between words by calculating the cosine distance between the word vectors and obtaining the vector expressions of each word in the corpus, based on the corpus and optimization of the training model. Word2vec includes two word vector training models, CBOW and Skip-gram, both of which include an input layer, a projection layer, and an output layer, but the CBOW model predicts the current word from its context, whereas the Skip-gram model predicts the current word from its context. Similarly, word2vec includes two word vector optimization models, the Hierarchical Softmax model and the Negative Sampling model. The Hierarchical Softmax optimization method constructs a binary tree using the frequency of words in the corpus as weights and maps the leaf nodes to all words, while the Negative Sampling optimization method uses relatively simple resampling to improve the speed of word vector training. By combining the two training models with the two optimization methods, a total of four frameworks for training word vectors can be obtained. As a tool for training word vectors, it can quickly and efficiently represent words in a corpus as vectors and capture the semantic features and similarities between words for use in other related application studies. The sentiment intensity of the text data is obtained and used in the correlation analysis of the change of sentiment intensity over time for each topic.


## 3.3. Specific Study Process

In this paper, we investigate a method for sentiment intensity analysis (shown in Figure3), using probabilistic topic modeling and deep learning to crawl text data from campus forums based on selected hot events and clean the data. Then, we train the model to analyze selected topics that are meaningful or need attention. Based on explicit sentiment words, we use word2vec to obtain implicit sentiment words in the text data and calculate the sentiment intensity of each text. Finally, we perform sentiment intensity time-series analysis under the selected topics.(1)
Data crawling and preprocessing. The two main tasks are text data capturing and text data preprocessing. The crawler collects and crawls time-series data related to hot events. After crawling the data, the crawled data is preprocessed by word separation, spam filtering, and deactivation of words.(2)
Topic modeling and filtering. After acquiring the data and preprocessing it, probabilistic topic modeling is carried out using the LDA model.(3)
Sentiment intensity calculation. The calculation of sentiment intensity is carried out in parallel with the LDA theme modeling. Sentiment intensity was calculated by importing the data into word2vec for word vector cosine distance calculation and then by SO-SD.Figure 3
Specific process for sentiment analysis.


### 3.3.1. Deep Learning Sentiment Analysis Methods Incorporating Self-Attention Mechanisms

This paper further incorporates deep learning sentiment analysis with a self-attentive mechanism based on traditional methods, which can effectively improve the accuracy of temporal analysis.The model in this paper is divided into six main layers: the word embedding layer, the BGRU layer, the self-attentive layer, the multi-granularity convolutional layer, the attention-based pooling layer, and the fully connected and classified layer, as shown in Figure4.Figure 4
Deep learning sentiment analysis methods incorporating self-attentive mechanisms.The comment text is transformed into word sequences using a word separation library; i.e., the text data is pretrained to achieve word vector mapping.Implementing a word vector to a bidirectional gated cyclic unit to learn serialization features, the operation can be combined via a forward GRU and a reverse GRU, followed by the output, as shown in the following equations:(13)ht+=fGRUht−1,vt,(14)ht−=fGRUht−1,vt,(15)ht=ht+,ht−.The self-attentive mechanism is used to perform an initial screening of features after sequence analysis and extract features with high task relevance. The specific form is as follows: global information is considered, word weight valuesα are calculated, and the weights are weighted and summed with the features at each moment to obtain the highlighted new focus feature Ht. This formula is shown as follows:(16)Ht=∑αtht,where αt is the feature weight and the condition ∑αt=1 is satisfied.This layer receives the output features from the attention layer and selects convolutional kernels of different sizes for further feature extraction using the ReLU function, which speeds up the training convergence and effectively avoids problems such as gradient explosion and disappearance. The feature extraction process is shown as follows:(17)ci=fReluw.xi:i+h−1+b,where w is the convolutional kernel weight, h ∗ m denotes the convolutional kernel window granularity, and fRelu is the activation function.After the model has obtained the feature map, pooling is used to reduce the amount of training data and model parameters to further find out the factors that have the greatest impact on the final sentiment polarity classification results, and this paper uses the attention mechanism instead of the traditional pooling layer to improve the feature extraction capability, as shown in the following equation:(18)Pt=∑at′ct,where at′ is the feature weight and satisfies ∑at′=1.The feature map of the data obtained in the convolution layer is extracted by self-attentive dimensionality reduction to obtain a local feature sequence. This layer feeds the feature sequence into the fully connected layer for feature fusion and is classified by the classification layer for emotional polarity. The specific operation process is as follows: the sequence is processed through the fully connected layer to obtain the feature sequenceDfinal; the classification layer performs feature fusion analysis through Softmax and transforms Dfinal to derive the probability distribution of the two emotional polarities. The calculation formula is shown in the following equation:(19)pi=SoftmaxW.Dfinal+b,where pi is the probability distribution of sentiment polarity, W is the weight matrix of Softmax, and b is the offset.The sentiment intensity calculation is performed simultaneously with the LDA modeling, which is more complex compared to the topic modeling.The processed data were transformed into word vectors, the sentiment lexicon was combined with word2vec and LSTM networks to label sentiment word lexicality, and finally SO-SD was applied to calculate sentiment intensity. The specific calculation formula is shown as follows:(20)SO−SDword=∑poword∈PwordsSDword,pword−∑noword∈NwordsSDword,nword,where poword denotes a positive dominant sentiment word that is highly correlated with word; Powords denotes a positive dominant sentiment word that is most correlated with word; nword denotes a negative dominant sentiment word that is highly correlated with word; and Nwords denotes a negative dominant sentiment word that is most correlated with word.The specific formula is shown as follows:(21)SDword1,word2=∑k=1nx1kx2k∑knx1k2∑knx1k2,where n is the word vector dimension, x1k is the k-dimension value of the first word vector, and x2k is the k-dimension value in the second word vector.Once the SO-SD values are obtained,p and q are used as thresholds to make judgments as follows:(22)SO−SDword>pThe  Word is  a positive implicit emotion word,∈p,qThe word is neutral,<qThe word is a negative implicit emotion word.All positive and negative sentiment words are represented as +1 and −1, respectively. Finally, according to the emotional words and their corresponding emotional intensity, the evaluation is carried out in the campus comment text.


### 3.3.2. Building Predictive Models

Existing prediction models are mainly based on graph neural networks, using them as feature extractors, embedding nodes in vectors, and implementing sequence learning with recurrent neural networks. These methods require information about the nodes over the entire time span and have limited applicability to scenarios where the nodes change frequently. Therefore, recurrent neural networks are usually used for dynamic injection into graph convolutional network parameters to form evolving sequences to solve this problem.This paper introduces an attention mechanism into graph neural networks on this basis, enabling adaptation to different neighbor weights shared across all edges in the graph, without relying on pre-access to the global graph structure and node features. The prediction model is based on a graph attention network and gated recurrent units, where the graph attention network is the basis and the gated recurrent network implements network parameter updates. The node features are convolved with the graph attention network to obtain a temporal node embedding matrix, and the weight matrix evolves over time through the gated cyclic unit, with the dynamic evolution of thel-th level of the weight parameter matrix being shown as follows:(23)Wtl=GRUHtl,Wt−1l,where Wtl and Wt−1l are the weight parameter matrices for time period t and time period t − 1, respectively; Htl is the time period t, l-layer node embedding matrix, updated in the manner shown in the following equation:(24)Htl+1=GATAt,Htl,Wtl,where At is the corresponding adjacency matrix for time period t, which is used to store the inter-vertex relationship, and the node embedding matrix for time period t and layer l + 1 is obtained by calculation. The model can predict the possible sentiment words and the corresponding scores in the next time period by the graph structure in the time period, through the multilayer perceptron MLP, with x graph structure information, and finally all scores are summed up as the sentiment words derived from the time period prediction.


## 3.3.1. Deep Learning Sentiment Analysis Methods Incorporating Self-Attention Mechanisms

This paper further incorporates deep learning sentiment analysis with a self-attentive mechanism based on traditional methods, which can effectively improve the accuracy of temporal analysis.The model in this paper is divided into six main layers: the word embedding layer, the BGRU layer, the self-attentive layer, the multi-granularity convolutional layer, the attention-based pooling layer, and the fully connected and classified layer, as shown in Figure4.Figure 4
Deep learning sentiment analysis methods incorporating self-attentive mechanisms.The comment text is transformed into word sequences using a word separation library; i.e., the text data is pretrained to achieve word vector mapping.Implementing a word vector to a bidirectional gated cyclic unit to learn serialization features, the operation can be combined via a forward GRU and a reverse GRU, followed by the output, as shown in the following equations:(13)ht+=fGRUht−1,vt,(14)ht−=fGRUht−1,vt,(15)ht=ht+,ht−.The self-attentive mechanism is used to perform an initial screening of features after sequence analysis and extract features with high task relevance. The specific form is as follows: global information is considered, word weight valuesα are calculated, and the weights are weighted and summed with the features at each moment to obtain the highlighted new focus feature Ht. This formula is shown as follows:(16)Ht=∑αtht,where αt is the feature weight and the condition ∑αt=1 is satisfied.This layer receives the output features from the attention layer and selects convolutional kernels of different sizes for further feature extraction using the ReLU function, which speeds up the training convergence and effectively avoids problems such as gradient explosion and disappearance. The feature extraction process is shown as follows:(17)ci=fReluw.xi:i+h−1+b,where w is the convolutional kernel weight, h ∗ m denotes the convolutional kernel window granularity, and fRelu is the activation function.After the model has obtained the feature map, pooling is used to reduce the amount of training data and model parameters to further find out the factors that have the greatest impact on the final sentiment polarity classification results, and this paper uses the attention mechanism instead of the traditional pooling layer to improve the feature extraction capability, as shown in the following equation:(18)Pt=∑at′ct,where at′ is the feature weight and satisfies ∑at′=1.The feature map of the data obtained in the convolution layer is extracted by self-attentive dimensionality reduction to obtain a local feature sequence. This layer feeds the feature sequence into the fully connected layer for feature fusion and is classified by the classification layer for emotional polarity. The specific operation process is as follows: the sequence is processed through the fully connected layer to obtain the feature sequenceDfinal; the classification layer performs feature fusion analysis through Softmax and transforms Dfinal to derive the probability distribution of the two emotional polarities. The calculation formula is shown in the following equation:(19)pi=SoftmaxW.Dfinal+b,where pi is the probability distribution of sentiment polarity, W is the weight matrix of Softmax, and b is the offset.The sentiment intensity calculation is performed simultaneously with the LDA modeling, which is more complex compared to the topic modeling.The processed data were transformed into word vectors, the sentiment lexicon was combined with word2vec and LSTM networks to label sentiment word lexicality, and finally SO-SD was applied to calculate sentiment intensity. The specific calculation formula is shown as follows:(20)SO−SDword=∑poword∈PwordsSDword,pword−∑noword∈NwordsSDword,nword,where poword denotes a positive dominant sentiment word that is highly correlated with word; Powords denotes a positive dominant sentiment word that is most correlated with word; nword denotes a negative dominant sentiment word that is highly correlated with word; and Nwords denotes a negative dominant sentiment word that is most correlated with word.The specific formula is shown as follows:(21)SDword1,word2=∑k=1nx1kx2k∑knx1k2∑knx1k2,where n is the word vector dimension, x1k is the k-dimension value of the first word vector, and x2k is the k-dimension value in the second word vector.Once the SO-SD values are obtained,p and q are used as thresholds to make judgments as follows:(22)SO−SDword>pThe  Word is  a positive implicit emotion word,∈p,qThe word is neutral,<qThe word is a negative implicit emotion word.All positive and negative sentiment words are represented as +1 and −1, respectively. Finally, according to the emotional words and their corresponding emotional intensity, the evaluation is carried out in the campus comment text.


## 3.3.2. Building Predictive Models

Existing prediction models are mainly based on graph neural networks, using them as feature extractors, embedding nodes in vectors, and implementing sequence learning with recurrent neural networks. These methods require information about the nodes over the entire time span and have limited applicability to scenarios where the nodes change frequently. Therefore, recurrent neural networks are usually used for dynamic injection into graph convolutional network parameters to form evolving sequences to solve this problem.This paper introduces an attention mechanism into graph neural networks on this basis, enabling adaptation to different neighbor weights shared across all edges in the graph, without relying on pre-access to the global graph structure and node features. The prediction model is based on a graph attention network and gated recurrent units, where the graph attention network is the basis and the gated recurrent network implements network parameter updates. The node features are convolved with the graph attention network to obtain a temporal node embedding matrix, and the weight matrix evolves over time through the gated cyclic unit, with the dynamic evolution of thel-th level of the weight parameter matrix being shown as follows:(23)Wtl=GRUHtl,Wt−1l,where Wtl and Wt−1l are the weight parameter matrices for time period t and time period t − 1, respectively; Htl is the time period t, l-layer node embedding matrix, updated in the manner shown in the following equation:(24)Htl+1=GATAt,Htl,Wtl,where At is the corresponding adjacency matrix for time period t, which is used to store the inter-vertex relationship, and the node embedding matrix for time period t and layer l + 1 is obtained by calculation. The model can predict the possible sentiment words and the corresponding scores in the next time period by the graph structure in the time period, through the multilayer perceptron MLP, with x graph structure information, and finally all scores are summed up as the sentiment words derived from the time period prediction.


## 4. Experiments and Analysis

### 4.1. Experimental Setup

#### 4.1.1. Experimental Environment

The model was trained using Ubuntu 18.04 operating system, Python 3.8 TensorFlow 1.14 deep learning framework was used for stability considerations, and the hardware configuration is shown in Table1.Table 1
Experimental environment configuration.
HardwareConfigurationCPUIntel Core i7-10700K; main frequency: 3.8 GHzMemory (GB)16GPUNVIDIA RTX 2080 Ti; video memory: 11 GB


#### 4.1.2. Experimental Dataset

To test the ability of this model to classify sentiment polarity in the Chinese corpus, two datasets, the online_shopping_10_cats provided by Chinese NLP corpus and the collected campus review dataset, were used for this experiment.The dataset contains 2 sentiment tendency labels, 0 for negative tendency sentiment and 1 for positive tendency sentiment. The experiments used 52,783 training data items and 10,000 test data items, which were balanced so that each has 5,000 positive and 5,000 negative data items. Specific examples are shown in Table2.Table 2
Statistics for the online_shopping_10_cats dataset.
Emotional tendencyAmountAverage lengthMarkPositive31,72768.781Negative21,05654.970The campus review dataset contains 7,000 and 3,000 positive and negative disposition sentiment data items, respectively, with 9,000 training data items and 1,000 test data items being set in this experiment; the specific parameters are shown in Table3.Table 3
Statistics on the campus review dataset.
Emotional tendencyAmountAverage lengthMarkPositive7,000112.111Negative3,000169.060


#### 4.1.3. Parameter Settings

The use of moderate dimensional word embeddings preserves the deeper meaning of words and reduces the training overhead and computation. In this paper, a trained high-dimensional word vector model, Chinese Word Vectors, modified by word2vec, is used.In order to fully extract the text features, four different convolutional kernels are used for contextual information extraction, and a dropout mechanism is added to avoid the phenomenon of fitting; the specific parameter configuration is shown in Table4.Table 4
Model parameter configuration.
HyperparameterConfigurationWord vector dimension300Size of convolution kernel(2, 3, 4, 5)Layer of BGRU128Batch size50Learning rate0.0012Dropout rate0.5OptimizerAdam


### 4.2. Assessment Criteria and Comparison Experiments

#### 4.2.1. Assessment Methods

In this paper, accuracy (ACC) and cross-entropy loss (CEL) functions are used to evaluate the parameters.The formula for calculating ACC is as follows:(25)ACCi=TiN,where Ti is the number of correctly classified data entries and N is the total number of data entries.The GEL is calculated as follows:(26)GEL=−1N∑ylna+1−yln1−a,where a is the true output, y is the desired output, and N is the total number of texts.


#### 4.2.2. Comparative Experiments

To demonstrate the validity of the model, this paper also compares it with other better-performing sentiment analysis models.(1)
Text sequences were extracted using LSTM, and the comparison experiments were based on the results of the network proposed by Zaremba et al. with partial adaptations.(2)
Bi-LSTM [25] combines contextual information to improve feature extraction of text sequences.(3)
GRU improves model training speed by simpler structure.(4)
Bidirectional GRU (BGRU) enhances the combination of contextual information.(5)
ATT-BiLSTM uses an attention mechanism to differentiate the importance of the output of the BILSTM network.(6)
TextCNN uses CNN networks to extract local features from text.


### 4.3. Results and Analysis

#### 4.3.1. Test Results

The accuracy of each model is shown in Table5.Table 5
Summary of model accuracy.
ModelOnline_shopping_10_catsCampus commentsLSTM91.5884.09GRU91.7984.76Bi-LSTM91.8685.76BGRU92.2986.43ATT-BiLSTM92.3888.22TextCNN91.1187.92Models in this paper92.9492.75Because the same dataset was used, some of the algorithms used results from the existing literature.


#### 4.3.2. Accuracy Analysis

As shown in Table5, the model in this paper achieves 92.75% accuracy on the hotel review dataset, which is the best result for the reformulation group. The experimental results prove that the model in this paper has better performance in the Chinese corpus. At the same time, considering the reasonableness test of the model results, this paper also conducts ablation experiments, and the experimental results prove that the multi-granularity convolutional neural network has certain advantages in improving the model classification, especially with long text data. This paper concludes that convolutional neural networks can effectively reduce the dimensionality of data and improve the local feature extraction ability of the model.The review of the experimental data revealed that the LSTM network structure with complex results and multiple parameters is prone to overfitting in training, reducing accuracy. For recurrent neural networks, the multi-granularity approach improved the accuracy by 0.76% and 1.2% over the single convolutional kernel approach for both datasets. The results demonstrate the effectiveness of multi-scale convolutional kernel feature extraction in sentiment classification tasks, and the self-attentive mechanism further improves the model feature extraction capability and classification accuracy compared to the traditional approach.


#### 4.3.3. Analysis of Callback Parameters

The analysis of each parameter of the training process of the model in this paper, as shown in Figure5, shows that the loss function decreases rapidly with increasing number of training rounds and tends to converge.Figure 5
Training loss function of the model in this paper.On the online_shopping_10_cats dataset, after 6 rounds of training, the loss of the training model will decrease. After 13 rounds, the loss function decreased more slowly, and finally after 18 rounds, the loss function stabilized at 0.009. In the campus comments dataset, the loss function of the model decreased faster and converged after the 8th round. After the 15th round, the loss function dropped to below 0.0001, and the best fit of the model to the dataset was achieved.From Figure6, it can be seen that on the online_shopping_10_cats dataset, the test accuracy of the model is relatively short and the model fits the training data better as the number of experimental rounds increases, but the test accuracy does not change significantly. The test accuracy did not change significantly.Figure 6
Accuracy of the model in this paper on the online_shopping_10_cats dataset.As shown in Figure7, for the campus review data, the model's test accuracy gradually improved from the first five rounds, and in the 11th round the model performance stabilized.Figure 7
Accuracy of the model in this paper on the campus review dataset.As shown in Figure8, the model uses the graph neural network and the adaptive weighting method to effectively improve the performance of evolutionary prediction and achieves good results in the evolution of emotional trends of campus comments. Leveraging the campus review text's semantic relations, structural properties, transforming the text into a graph structure, and then extracting features for predictive modeling through a graph convolutional network. The final result comparison graph proves that the improved scheme is effective.Figure 8
Predicted sentiment values versus true sentiment values.The above experimental results show that the model can be stabilized with fewer training rounds, with fast convergence, high accuracy of sentiment prediction, and better performance.To further validate the effectiveness and superiority of the model, this paper randomly divides the dataset into a training set and a test set in a ratio of 8 : 2. For each dataset, the experiment is repeated three times, and the average of accuracy, precision, recall, and AUC is taken as the final result. The main configuration parameters of the LSTM model contain the maximum number of training rounds (epoch = 10) and word embedding size (embeddingSize = 100).Comparing this method with SVM and textCNN, as shown in Table6, we find that textCNN is outstanding in shallow text feature extraction but is not effective in long text areas due to modeling limitations and discourse order insensitivity. LSTM, on the other hand, can capture sequence information and is more effective in sentiment analysis. In this dataset, LSTM achieves accuracy, precision, recall, and AUC of 96.1%, 84.2%, 88.9%, and 0.904 (threshold = 0.7), which are 3.2%, 0.9%, 3.3%, and 0.053 higher than textCNN and 7.2%, 4.8%, 7.7%, and 0.0821 higher than SVM, respectively. The above data demonstrate the superiority of using LSTM models for solving text sentiment analysis problems.Table 6
Comparison of LSTM with other methods.
MethodsAccuracy (%)Precision (%)Recall (%)AUCSVM88.979.481.20.8219TextCNN92.983.385.60.8510LSTM96.184.288.90.9040In this paper, we analyze the influence of different word vector dimensions on the performance of the model. As shown in Figure9, word vector data with dimensions of 50, 100, 150, and 200 are processed, and the accuracy rate can reach 89.3%, 89.9%, 88.9%, and 88.6%, respectively, by comparing the LSTM model with the annotated text, and the results show that the accuracy is higher when the word vector dimension is 100. Therefore, the model is trained with a word vector dimension of 100.Figure 9
Effect of word vector dimensionality on accuracy.In this paper, we also consider the influence of the maximum number of training rounds of the LSTM model on the results, as shown in Figure10, the maximum number of training rounds epoch is a key parameter affecting the performance. Too many times will cause the predicted value of the fitted loss rate available estimation model to be inconsistent with the true value. The experiments were carried out with 5, 10, 15, 20, and 25 dimensions. The results showed that with the increase of dimensions, the loss rate decreased first and then increased. When the dimension was 10, the loss rate reached the best value of 16.8%. Therefore, the maximum number of training rounds in this paper was set to 10.Figure 10
Effect of maximum number of training rounds on loss rate.Overall, it can be found that the sentiment intensity analysis method based on probabilistic topic model and deep learning model proposed in this paper can obtain different views and student evaluation in public opinion based on campus comments more accurately and can reasonably and effectively analyze the change of sentiment intensity of each opinion and event over time. This method not only effectively makes up for the shortcomings of traditional opinion analysis methods in terms of not being able to obtain trends of changes in sentiment and make effective predictions for managing public opinion, but also allows for targeted sentiment analysis based on students' different views and opinions and can calculate and analyze students' public opinion and their sentiment more accurately, which is of great significance and value for monitoring and managing public opinion. The method also has a certain degree of significance in guiding students and university opinion management workers in public opinion, helping them to handle and respond to public opinion in a reasonable manner and carry out more scientific and effective opinion management.


## 4.1. Experimental Setup

### 4.1.1. Experimental Environment

The model was trained using Ubuntu 18.04 operating system, Python 3.8 TensorFlow 1.14 deep learning framework was used for stability considerations, and the hardware configuration is shown in Table1.Table 1
Experimental environment configuration.
HardwareConfigurationCPUIntel Core i7-10700K; main frequency: 3.8 GHzMemory (GB)16GPUNVIDIA RTX 2080 Ti; video memory: 11 GB


### 4.1.2. Experimental Dataset

To test the ability of this model to classify sentiment polarity in the Chinese corpus, two datasets, the online_shopping_10_cats provided by Chinese NLP corpus and the collected campus review dataset, were used for this experiment.The dataset contains 2 sentiment tendency labels, 0 for negative tendency sentiment and 1 for positive tendency sentiment. The experiments used 52,783 training data items and 10,000 test data items, which were balanced so that each has 5,000 positive and 5,000 negative data items. Specific examples are shown in Table2.Table 2
Statistics for the online_shopping_10_cats dataset.
Emotional tendencyAmountAverage lengthMarkPositive31,72768.781Negative21,05654.970The campus review dataset contains 7,000 and 3,000 positive and negative disposition sentiment data items, respectively, with 9,000 training data items and 1,000 test data items being set in this experiment; the specific parameters are shown in Table3.Table 3
Statistics on the campus review dataset.
Emotional tendencyAmountAverage lengthMarkPositive7,000112.111Negative3,000169.060


### 4.1.3. Parameter Settings

The use of moderate dimensional word embeddings preserves the deeper meaning of words and reduces the training overhead and computation. In this paper, a trained high-dimensional word vector model, Chinese Word Vectors, modified by word2vec, is used.In order to fully extract the text features, four different convolutional kernels are used for contextual information extraction, and a dropout mechanism is added to avoid the phenomenon of fitting; the specific parameter configuration is shown in Table4.Table 4
Model parameter configuration.
HyperparameterConfigurationWord vector dimension300Size of convolution kernel(2, 3, 4, 5)Layer of BGRU128Batch size50Learning rate0.0012Dropout rate0.5OptimizerAdam


## 4.1.1. Experimental Environment

The model was trained using Ubuntu 18.04 operating system, Python 3.8 TensorFlow 1.14 deep learning framework was used for stability considerations, and the hardware configuration is shown in Table1.Table 1
Experimental environment configuration.
HardwareConfigurationCPUIntel Core i7-10700K; main frequency: 3.8 GHzMemory (GB)16GPUNVIDIA RTX 2080 Ti; video memory: 11 GB


## 4.1.2. Experimental Dataset

To test the ability of this model to classify sentiment polarity in the Chinese corpus, two datasets, the online_shopping_10_cats provided by Chinese NLP corpus and the collected campus review dataset, were used for this experiment.The dataset contains 2 sentiment tendency labels, 0 for negative tendency sentiment and 1 for positive tendency sentiment. The experiments used 52,783 training data items and 10,000 test data items, which were balanced so that each has 5,000 positive and 5,000 negative data items. Specific examples are shown in Table2.Table 2
Statistics for the online_shopping_10_cats dataset.
Emotional tendencyAmountAverage lengthMarkPositive31,72768.781Negative21,05654.970The campus review dataset contains 7,000 and 3,000 positive and negative disposition sentiment data items, respectively, with 9,000 training data items and 1,000 test data items being set in this experiment; the specific parameters are shown in Table3.Table 3
Statistics on the campus review dataset.
Emotional tendencyAmountAverage lengthMarkPositive7,000112.111Negative3,000169.060


## 4.1.3. Parameter Settings

The use of moderate dimensional word embeddings preserves the deeper meaning of words and reduces the training overhead and computation. In this paper, a trained high-dimensional word vector model, Chinese Word Vectors, modified by word2vec, is used.In order to fully extract the text features, four different convolutional kernels are used for contextual information extraction, and a dropout mechanism is added to avoid the phenomenon of fitting; the specific parameter configuration is shown in Table4.Table 4
Model parameter configuration.
HyperparameterConfigurationWord vector dimension300Size of convolution kernel(2, 3, 4, 5)Layer of BGRU128Batch size50Learning rate0.0012Dropout rate0.5OptimizerAdam


## 4.2. Assessment Criteria and Comparison Experiments

### 4.2.1. Assessment Methods

In this paper, accuracy (ACC) and cross-entropy loss (CEL) functions are used to evaluate the parameters.The formula for calculating ACC is as follows:(25)ACCi=TiN,where Ti is the number of correctly classified data entries and N is the total number of data entries.The GEL is calculated as follows:(26)GEL=−1N∑ylna+1−yln1−a,where a is the true output, y is the desired output, and N is the total number of texts.


### 4.2.2. Comparative Experiments

To demonstrate the validity of the model, this paper also compares it with other better-performing sentiment analysis models.(1)
Text sequences were extracted using LSTM, and the comparison experiments were based on the results of the network proposed by Zaremba et al. with partial adaptations.(2)
Bi-LSTM [25] combines contextual information to improve feature extraction of text sequences.(3)
GRU improves model training speed by simpler structure.(4)
Bidirectional GRU (BGRU) enhances the combination of contextual information.(5)
ATT-BiLSTM uses an attention mechanism to differentiate the importance of the output of the BILSTM network.(6)
TextCNN uses CNN networks to extract local features from text.


## 4.2.1. Assessment Methods

In this paper, accuracy (ACC) and cross-entropy loss (CEL) functions are used to evaluate the parameters.The formula for calculating ACC is as follows:(25)ACCi=TiN,where Ti is the number of correctly classified data entries and N is the total number of data entries.The GEL is calculated as follows:(26)GEL=−1N∑ylna+1−yln1−a,where a is the true output, y is the desired output, and N is the total number of texts.


## 4.2.2. Comparative Experiments

To demonstrate the validity of the model, this paper also compares it with other better-performing sentiment analysis models.(1)
Text sequences were extracted using LSTM, and the comparison experiments were based on the results of the network proposed by Zaremba et al. with partial adaptations.(2)
Bi-LSTM [25] combines contextual information to improve feature extraction of text sequences.(3)
GRU improves model training speed by simpler structure.(4)
Bidirectional GRU (BGRU) enhances the combination of contextual information.(5)
ATT-BiLSTM uses an attention mechanism to differentiate the importance of the output of the BILSTM network.(6)
TextCNN uses CNN networks to extract local features from text.


## 4.3. Results and Analysis

### 4.3.1. Test Results

The accuracy of each model is shown in Table5.Table 5
Summary of model accuracy.
ModelOnline_shopping_10_catsCampus commentsLSTM91.5884.09GRU91.7984.76Bi-LSTM91.8685.76BGRU92.2986.43ATT-BiLSTM92.3888.22TextCNN91.1187.92Models in this paper92.9492.75Because the same dataset was used, some of the algorithms used results from the existing literature.


### 4.3.2. Accuracy Analysis

As shown in Table5, the model in this paper achieves 92.75% accuracy on the hotel review dataset, which is the best result for the reformulation group. The experimental results prove that the model in this paper has better performance in the Chinese corpus. At the same time, considering the reasonableness test of the model results, this paper also conducts ablation experiments, and the experimental results prove that the multi-granularity convolutional neural network has certain advantages in improving the model classification, especially with long text data. This paper concludes that convolutional neural networks can effectively reduce the dimensionality of data and improve the local feature extraction ability of the model.The review of the experimental data revealed that the LSTM network structure with complex results and multiple parameters is prone to overfitting in training, reducing accuracy. For recurrent neural networks, the multi-granularity approach improved the accuracy by 0.76% and 1.2% over the single convolutional kernel approach for both datasets. The results demonstrate the effectiveness of multi-scale convolutional kernel feature extraction in sentiment classification tasks, and the self-attentive mechanism further improves the model feature extraction capability and classification accuracy compared to the traditional approach.


### 4.3.3. Analysis of Callback Parameters

The analysis of each parameter of the training process of the model in this paper, as shown in Figure5, shows that the loss function decreases rapidly with increasing number of training rounds and tends to converge.Figure 5
Training loss function of the model in this paper.On the online_shopping_10_cats dataset, after 6 rounds of training, the loss of the training model will decrease. After 13 rounds, the loss function decreased more slowly, and finally after 18 rounds, the loss function stabilized at 0.009. In the campus comments dataset, the loss function of the model decreased faster and converged after the 8th round. After the 15th round, the loss function dropped to below 0.0001, and the best fit of the model to the dataset was achieved.From Figure6, it can be seen that on the online_shopping_10_cats dataset, the test accuracy of the model is relatively short and the model fits the training data better as the number of experimental rounds increases, but the test accuracy does not change significantly. The test accuracy did not change significantly.Figure 6
Accuracy of the model in this paper on the online_shopping_10_cats dataset.As shown in Figure7, for the campus review data, the model's test accuracy gradually improved from the first five rounds, and in the 11th round the model performance stabilized.Figure 7
Accuracy of the model in this paper on the campus review dataset.As shown in Figure8, the model uses the graph neural network and the adaptive weighting method to effectively improve the performance of evolutionary prediction and achieves good results in the evolution of emotional trends of campus comments. Leveraging the campus review text's semantic relations, structural properties, transforming the text into a graph structure, and then extracting features for predictive modeling through a graph convolutional network. The final result comparison graph proves that the improved scheme is effective.Figure 8
Predicted sentiment values versus true sentiment values.The above experimental results show that the model can be stabilized with fewer training rounds, with fast convergence, high accuracy of sentiment prediction, and better performance.To further validate the effectiveness and superiority of the model, this paper randomly divides the dataset into a training set and a test set in a ratio of 8 : 2. For each dataset, the experiment is repeated three times, and the average of accuracy, precision, recall, and AUC is taken as the final result. The main configuration parameters of the LSTM model contain the maximum number of training rounds (epoch = 10) and word embedding size (embeddingSize = 100).Comparing this method with SVM and textCNN, as shown in Table6, we find that textCNN is outstanding in shallow text feature extraction but is not effective in long text areas due to modeling limitations and discourse order insensitivity. LSTM, on the other hand, can capture sequence information and is more effective in sentiment analysis. In this dataset, LSTM achieves accuracy, precision, recall, and AUC of 96.1%, 84.2%, 88.9%, and 0.904 (threshold = 0.7), which are 3.2%, 0.9%, 3.3%, and 0.053 higher than textCNN and 7.2%, 4.8%, 7.7%, and 0.0821 higher than SVM, respectively. The above data demonstrate the superiority of using LSTM models for solving text sentiment analysis problems.Table 6
Comparison of LSTM with other methods.
MethodsAccuracy (%)Precision (%)Recall (%)AUCSVM88.979.481.20.8219TextCNN92.983.385.60.8510LSTM96.184.288.90.9040In this paper, we analyze the influence of different word vector dimensions on the performance of the model. As shown in Figure9, word vector data with dimensions of 50, 100, 150, and 200 are processed, and the accuracy rate can reach 89.3%, 89.9%, 88.9%, and 88.6%, respectively, by comparing the LSTM model with the annotated text, and the results show that the accuracy is higher when the word vector dimension is 100. Therefore, the model is trained with a word vector dimension of 100.Figure 9
Effect of word vector dimensionality on accuracy.In this paper, we also consider the influence of the maximum number of training rounds of the LSTM model on the results, as shown in Figure10, the maximum number of training rounds epoch is a key parameter affecting the performance. Too many times will cause the predicted value of the fitted loss rate available estimation model to be inconsistent with the true value. The experiments were carried out with 5, 10, 15, 20, and 25 dimensions. The results showed that with the increase of dimensions, the loss rate decreased first and then increased. When the dimension was 10, the loss rate reached the best value of 16.8%. Therefore, the maximum number of training rounds in this paper was set to 10.Figure 10
Effect of maximum number of training rounds on loss rate.Overall, it can be found that the sentiment intensity analysis method based on probabilistic topic model and deep learning model proposed in this paper can obtain different views and student evaluation in public opinion based on campus comments more accurately and can reasonably and effectively analyze the change of sentiment intensity of each opinion and event over time. This method not only effectively makes up for the shortcomings of traditional opinion analysis methods in terms of not being able to obtain trends of changes in sentiment and make effective predictions for managing public opinion, but also allows for targeted sentiment analysis based on students' different views and opinions and can calculate and analyze students' public opinion and their sentiment more accurately, which is of great significance and value for monitoring and managing public opinion. The method also has a certain degree of significance in guiding students and university opinion management workers in public opinion, helping them to handle and respond to public opinion in a reasonable manner and carry out more scientific and effective opinion management.


## 4.3.1. Test Results

The accuracy of each model is shown in Table5.Table 5
Summary of model accuracy.
ModelOnline_shopping_10_catsCampus commentsLSTM91.5884.09GRU91.7984.76Bi-LSTM91.8685.76BGRU92.2986.43ATT-BiLSTM92.3888.22TextCNN91.1187.92Models in this paper92.9492.75Because the same dataset was used, some of the algorithms used results from the existing literature.


## 4.3.2. Accuracy Analysis

As shown in Table5, the model in this paper achieves 92.75% accuracy on the hotel review dataset, which is the best result for the reformulation group. The experimental results prove that the model in this paper has better performance in the Chinese corpus. At the same time, considering the reasonableness test of the model results, this paper also conducts ablation experiments, and the experimental results prove that the multi-granularity convolutional neural network has certain advantages in improving the model classification, especially with long text data. This paper concludes that convolutional neural networks can effectively reduce the dimensionality of data and improve the local feature extraction ability of the model.The review of the experimental data revealed that the LSTM network structure with complex results and multiple parameters is prone to overfitting in training, reducing accuracy. For recurrent neural networks, the multi-granularity approach improved the accuracy by 0.76% and 1.2% over the single convolutional kernel approach for both datasets. The results demonstrate the effectiveness of multi-scale convolutional kernel feature extraction in sentiment classification tasks, and the self-attentive mechanism further improves the model feature extraction capability and classification accuracy compared to the traditional approach.


## 4.3.3. Analysis of Callback Parameters

The analysis of each parameter of the training process of the model in this paper, as shown in Figure5, shows that the loss function decreases rapidly with increasing number of training rounds and tends to converge.Figure 5
Training loss function of the model in this paper.On the online_shopping_10_cats dataset, after 6 rounds of training, the loss of the training model will decrease. After 13 rounds, the loss function decreased more slowly, and finally after 18 rounds, the loss function stabilized at 0.009. In the campus comments dataset, the loss function of the model decreased faster and converged after the 8th round. After the 15th round, the loss function dropped to below 0.0001, and the best fit of the model to the dataset was achieved.From Figure6, it can be seen that on the online_shopping_10_cats dataset, the test accuracy of the model is relatively short and the model fits the training data better as the number of experimental rounds increases, but the test accuracy does not change significantly. The test accuracy did not change significantly.Figure 6
Accuracy of the model in this paper on the online_shopping_10_cats dataset.As shown in Figure7, for the campus review data, the model's test accuracy gradually improved from the first five rounds, and in the 11th round the model performance stabilized.Figure 7
Accuracy of the model in this paper on the campus review dataset.As shown in Figure8, the model uses the graph neural network and the adaptive weighting method to effectively improve the performance of evolutionary prediction and achieves good results in the evolution of emotional trends of campus comments. Leveraging the campus review text's semantic relations, structural properties, transforming the text into a graph structure, and then extracting features for predictive modeling through a graph convolutional network. The final result comparison graph proves that the improved scheme is effective.Figure 8
Predicted sentiment values versus true sentiment values.The above experimental results show that the model can be stabilized with fewer training rounds, with fast convergence, high accuracy of sentiment prediction, and better performance.To further validate the effectiveness and superiority of the model, this paper randomly divides the dataset into a training set and a test set in a ratio of 8 : 2. For each dataset, the experiment is repeated three times, and the average of accuracy, precision, recall, and AUC is taken as the final result. The main configuration parameters of the LSTM model contain the maximum number of training rounds (epoch = 10) and word embedding size (embeddingSize = 100).Comparing this method with SVM and textCNN, as shown in Table6, we find that textCNN is outstanding in shallow text feature extraction but is not effective in long text areas due to modeling limitations and discourse order insensitivity. LSTM, on the other hand, can capture sequence information and is more effective in sentiment analysis. In this dataset, LSTM achieves accuracy, precision, recall, and AUC of 96.1%, 84.2%, 88.9%, and 0.904 (threshold = 0.7), which are 3.2%, 0.9%, 3.3%, and 0.053 higher than textCNN and 7.2%, 4.8%, 7.7%, and 0.0821 higher than SVM, respectively. The above data demonstrate the superiority of using LSTM models for solving text sentiment analysis problems.Table 6
Comparison of LSTM with other methods.
MethodsAccuracy (%)Precision (%)Recall (%)AUCSVM88.979.481.20.8219TextCNN92.983.385.60.8510LSTM96.184.288.90.9040In this paper, we analyze the influence of different word vector dimensions on the performance of the model. As shown in Figure9, word vector data with dimensions of 50, 100, 150, and 200 are processed, and the accuracy rate can reach 89.3%, 89.9%, 88.9%, and 88.6%, respectively, by comparing the LSTM model with the annotated text, and the results show that the accuracy is higher when the word vector dimension is 100. Therefore, the model is trained with a word vector dimension of 100.Figure 9
Effect of word vector dimensionality on accuracy.In this paper, we also consider the influence of the maximum number of training rounds of the LSTM model on the results, as shown in Figure10, the maximum number of training rounds epoch is a key parameter affecting the performance. Too many times will cause the predicted value of the fitted loss rate available estimation model to be inconsistent with the true value. The experiments were carried out with 5, 10, 15, 20, and 25 dimensions. The results showed that with the increase of dimensions, the loss rate decreased first and then increased. When the dimension was 10, the loss rate reached the best value of 16.8%. Therefore, the maximum number of training rounds in this paper was set to 10.Figure 10
Effect of maximum number of training rounds on loss rate.Overall, it can be found that the sentiment intensity analysis method based on probabilistic topic model and deep learning model proposed in this paper can obtain different views and student evaluation in public opinion based on campus comments more accurately and can reasonably and effectively analyze the change of sentiment intensity of each opinion and event over time. This method not only effectively makes up for the shortcomings of traditional opinion analysis methods in terms of not being able to obtain trends of changes in sentiment and make effective predictions for managing public opinion, but also allows for targeted sentiment analysis based on students' different views and opinions and can calculate and analyze students' public opinion and their sentiment more accurately, which is of great significance and value for monitoring and managing public opinion. The method also has a certain degree of significance in guiding students and university opinion management workers in public opinion, helping them to handle and respond to public opinion in a reasonable manner and carry out more scientific and effective opinion management.


## 5. Conclusion

For campus opinion analysis and management, which is essentially a text sentiment analysis task based on Chinese corpus, this paper proposes a deep learning sentiment analysis method incorporating a self-attention mechanism. The model uses a recurrent neural network structure to extract the sequence features of the text; then uses the self-attentive mechanism to highlight the sentiment classification features, which are fed into a multi-granularity convolutional neural network for higher-level feature extraction; uses the self-attentive mechanism to implement the pooling function; and finally achieves the sentiment polarity determination of the text. Experiments on two typical datasets demonstrate that the model has improved the accuracy of sentiment polarity prediction compared with the current mainstream methods. In addition, this paper demonstrates the soundness of the model structure through ablation experiments. By using a combination of convolutional neural networks and recurrent neural networks, the model achieves good results on both datasets. However, in reality, there is often a lack of high-quality training data in the target domain, and how to improve the ability of deep learning models to solve cross-domain problems from existing training datasets is worthy of further research.



---

*Source: 5135200-2022-04-23.xml*