College network public opinion monitoring method based on confidence awareness dynamic fusion mechanism

By using a confidence-aware dynamic fusion mechanism to monitor online public opinion in universities, this method utilizes the BERT model, bidirectional gated recurrent unit network, and convolutional neural network for dynamic fusion. This solves the recognition accuracy problem of the BERT-BiLSTM model when integrating global semantics and local features, and achieves higher accuracy in identifying public opinion risks.

CN122335285APending Publication Date: 2026-07-03XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
Filing Date
2026-06-03
Publication Date
2026-07-03

Smart Images

  • Figure CN122335285A_ABST
    Figure CN122335285A_ABST
Patent Text Reader

Abstract

This invention relates to the field of online public opinion monitoring technology, and discloses a method for monitoring online public opinion in universities based on a confidence-aware dynamic fusion mechanism. This method preprocesses public opinion text data to obtain a text sequence, which is then input into a target public opinion monitoring model to obtain the public opinion risk category corresponding to the text data. The target public opinion monitoring model includes a BERT model, a bidirectional gated recurrent unit network, a convolutional neural network, a confidence-aware dynamic fusion module, and a classifier. The confidence-aware dynamic fusion module determines the sample confidence coefficient based on the contextual semantic vector sequence output by the BERT model, and dynamically weights and fuses the global contextual features output by the bidirectional gated recurrent unit network and the local phrase features output by the convolutional neural network according to the sample confidence coefficient to obtain a comprehensive sentiment feature vector. The classifier obtains the public opinion risk category based on the comprehensive sentiment feature vector.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of online public opinion monitoring technology, and relates to, but is not limited to, a method for monitoring online public opinion in universities based on a confidence-based dynamic fusion mechanism. Background Technology

[0002] With the popularization of the internet and the rise of new media platforms, online public opinion in universities has become a significant factor influencing campus management, student development, and campus culture construction. In recent years, deep learning technology has made significant progress in the field of natural language processing, providing a new technical path for the intelligent monitoring of online public opinion in universities. Existing research mainly focuses on sentiment analysis, topic detection, and risk warning, using various neural network models (such as the BERT-BiLSTM model) to automate the processing and analysis of public opinion texts. However, the BERT-BiLSTM model generally uses fixed vector concatenation or static weight allocation when integrating global semantics and local features. However, the sentiment expression in university public opinion texts is extremely uneven. For example, some texts have clear semantics and rely on global logic; others contain internet slang or locally radical vocabulary. This makes the BERT-BiLSTM model susceptible to noise interference or loss of key sentiment signals, resulting in poor recognition accuracy. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a method for monitoring online public opinion in universities based on a confidence-aware dynamic fusion mechanism, which can improve the accuracy of public opinion risk identification.

[0004] The specific technical solutions of this invention are as follows: This application provides a method for monitoring online public opinion in universities based on a confidence-aware dynamic fusion mechanism, including: Obtain text data of public opinion on university networks and preprocess the text data to obtain text sequences; Input the text sequence into the target public opinion monitoring model to obtain the public opinion risk category corresponding to the public opinion text data; The target public opinion monitoring model includes a BERT model, a bidirectional gated recurrent unit network, a convolutional neural network, a confidence-aware dynamic fusion module, and a classifier; the bidirectional gated recurrent unit network and the convolutional neural network are set in parallel; the confidence-aware dynamic fusion module is connected to the output of the BERT model, the bidirectional gated recurrent unit network, and the convolutional neural network respectively; The BERT model is used to perform deep semantic encoding on text sequences to obtain a sequence of contextual semantic vectors; a bidirectional gated recurrent unit network is used to perform temporal modeling on the sequence of contextual semantic vectors to obtain global contextual features; a convolutional neural network is used to extract local features from the sequence of contextual semantic vectors to obtain local phrase features; a confidence-aware dynamic fusion module is used to determine the sample confidence coefficient based on the sequence of contextual semantic vectors, and to dynamically weight and fuse the global contextual features and local phrase features according to the sample confidence coefficient to obtain a comprehensive sentiment feature vector; a classifier is used to classify the comprehensive sentiment feature vector to obtain the public opinion risk category.

[0005] In some embodiments, the public opinion text data is preprocessed to obtain a text sequence, including: The public opinion text data is cleaned and processed to obtain the initial text data; The initial text data is segmented to obtain a word sequence; Based on the word sequence, corresponding word vectors, segment vectors, and position vectors are generated, and the word vectors, segment vectors, and position vectors are summed to obtain the text sequence.

[0006] In some embodiments, the confidence-aware dynamic fusion module includes a first pooling layer, a linear transformation layer, and a nonlinear activation function layer; The confidence-aware dynamic fusion module is used to perform the following operations: The first pooling layer performs pooling processing on the vectors corresponding to the classification labels in the context semantic vector sequence to obtain the global semantic vector; The global semantic vector is transformed by a linear transformation layer and a nonlinear activation function layer to obtain the sample confidence coefficient; the sample confidence coefficient is used to characterize the semantic clarity of the public opinion text data. Based on the sample confidence coefficient, the global context features and local phrase features are weighted and fused to obtain a comprehensive sentiment feature vector.

[0007] In some embodiments, the bidirectional gated recurrent cell network includes a bidirectional gated recurrent cell layer and a second pooling layer; A bidirectional gated cyclic cell network is used to perform the following operations: By performing forward and backward temporal modeling on the context semantic vector sequence through a bidirectional gated recurrent unit layer, the forward and backward hidden states of each time step in the context semantic vector sequence are obtained. The forward and backward hidden states are then concatenated to obtain the bidirectional hidden states of each time step. The norm difference between the vectors of the bidirectional hidden states corresponding to adjacent time steps in the bidirectional hidden states is determined, and the norm difference is quantified to obtain the emotion transfer intensity corresponding to each time step. The intensity of emotion transfer at each time step is normalized to obtain the aggregate weight for each time step. The second pooling layer uses aggregated weights to perform a weighted summation of the bidirectional hidden states at each time step to obtain global context features.

[0008] In some embodiments, the convolutional neural network includes a convolutional module, a third pooling layer, and a fully connected layer connected in sequence; the convolutional module includes multiple one-dimensional convolutional layers with different kernel widths set in parallel. Convolutional neural networks are used to perform the following operations: Multiple feature maps are obtained by performing parallel convolution operations on the context semantic vector sequence through multiple one-dimensional convolutional layers; The third pooling layer performs pooling operations on each feature map, and the pooled feature maps are then concatenated to obtain a concatenated feature vector. Local phrase features are obtained by performing a nonlinear transformation on the concatenated feature vector through a fully connected layer.

[0009] In some embodiments, the BERT model includes a multi-layer Transformer encoder; The BERT model is used to perform the following operations: The text sequence is received by a multi-layer Transformer encoder, and the text sequence is encoded with context layer by layer. The vector sequence output by the last Transformer encoder is used as the context semantic vector sequence.

[0010] In some embodiments, the method further includes: Obtain the sample dataset, which includes sample text sequences and their corresponding real risk category labels; Based on the sample dataset, the initial public opinion monitoring model is iteratively trained using the backpropagation algorithm and the cross-entropy loss function until the initial public opinion monitoring model converges, thus obtaining the target public opinion monitoring model. During the training process, the parameters of a preset number of Transformer encoder layers near the input of the BERT model in the initial public opinion monitoring model are frozen.

[0011] In some embodiments, the method further includes: Obtain historical online public opinion data from universities; Historical online public opinion data from universities was cleaned and segmented to obtain an initial sample word sequence. Based on a preset probability, random swapping and / or random deletion operations are performed on the remaining words in the initial sample word sequence, excluding the preset words, to obtain the target sample word sequence. Based on the target sample word sequence, the sample text sequence is obtained.

[0012] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: In this embodiment of the invention, firstly, public opinion text data from university networks is acquired and preprocessed to obtain a text sequence; the text sequence is then input into a target public opinion monitoring model to obtain the public opinion risk category corresponding to the text data; wherein, the target public opinion monitoring model includes a BERT model, a bidirectional gated recurrent unit network, a convolutional neural network, a confidence-aware dynamic fusion module, and a classifier; the bidirectional gated recurrent unit network and the convolutional neural network are configured in parallel; the BERT model is used to perform deep semantic encoding on the text sequence to obtain a context semantic vector sequence; the bidirectional gated recurrent unit network is used to perform temporal modeling on the context semantic vector sequence to obtain a global... The following features are described: a convolutional neural network is used to extract local features from the context semantic vector sequence to obtain local phrase features; a confidence-aware dynamic fusion module is used to determine the sample confidence coefficient based on the context semantic vector sequence, and dynamically weights and fuses the global context features and local phrase features according to the sample confidence coefficient to obtain a comprehensive sentiment feature vector; a classifier is used to classify the comprehensive sentiment feature vector to obtain the public opinion risk category; thus, the comprehensive sentiment feature vector contains both overall semantic information and local sentiment features, and the target public opinion monitoring model can accurately determine the risk category of public opinion text data based on the comprehensive sentiment feature vector, thereby improving the recognition accuracy. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 This is a flowchart illustrating the college network public opinion monitoring method based on a confidence-aware dynamic fusion mechanism provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a public opinion monitoring model provided in an embodiment of the present invention. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0016] It should be noted that the terms "first, second, and third" used in the embodiments of the present invention are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0017] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which these embodiments of the invention pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0018] Figure 1 This is a flowchart illustrating a method for monitoring online public opinion in universities based on a confidence-aware dynamic fusion mechanism, as provided in an embodiment of the present invention. The method can be executed via a control device, which may include at least one of a personal computer, laptop computer, smartphone, tablet computer, and portable wearable device; however, this embodiment does not limit the specific device used.

[0019] like Figure 1 As shown, the college network public opinion monitoring method based on confidence perception dynamic fusion mechanism provided in this embodiment of the invention may include steps S101-S102.

[0020] S101. Obtain public opinion text data from university networks and preprocess the public opinion text data to obtain a text sequence.

[0021] In some embodiments, the public opinion text data refers to the network text content related to the study, life and management of college teachers and students.

[0022] Exemplarily, the public opinion text data can be collected from a plurality of preset social media platforms; among them, the plurality of social media platforms can include Weibo, Tieba, and forums, etc. The type of the social media platform is not limited in the embodiments of the present application.

[0023] In some embodiments, preprocessing the public opinion text data to obtain a text sequence includes: cleaning the public opinion text data to obtain initial text data; performing word segmentation on the initial text data to obtain a token sequence; based on the token sequence, generating corresponding token vectors, segment vectors and position vectors, and summing the token vectors, segment vectors and position vectors to obtain a text sequence.

[0024] In some embodiments, since the public opinion text data collected from social media platforms usually includes noise, in order to ensure the accuracy of subsequent public opinion risk identification, the public opinion text data can be cleaned to remove the noise in the public opinion text data, so as to obtain the initial text data.

[0025] Exemplarily, stop words, punctuation marks, numbers, special characters and duplicate content in the public opinion text data can be removed, and the upper and lower case of English letters in the public opinion text data can be standardized, and the continuous spaces in the public opinion text data can be unified into a single space.

[0026] In some embodiments, in order to further improve the accuracy of public opinion risk identification, the initial text data can be segmented to obtain a token sequence.

[0027] Exemplarily, the jieba word segmentation tool can be used to segment the Chinese text in the initial text data to split the continuous text string into independent word units. For example, for the Chinese text "The campus network is very stuck today", through word segmentation, a token sequence {"today", "campus", "network", "very", "stuck"} can be obtained.

[0028] In some embodiments, the token sequence is converted into a text sequence that can be received by a Bidirectional Encoder Representations from Transformers (BERT) model through an embedding layer. Among them, the embedding layer includes a word embedding sub-layer, a segment embedding sub-layer and a position embedding sub-layer.

[0029] For example, a word embedding sublayer can map the indices of each word in the word sequence to corresponding word vectors, a segment embedding sublayer can generate corresponding segment vectors, and a position embedding sublayer can generate position vectors based on the positions of each word in the word sequence. Finally, the word vectors, segment vectors, and position vectors are summed element-wise to obtain the text sequence. The text sequence is the input to the BERT model.

[0030] S102. Input the text sequence into the target public opinion monitoring model to obtain the public opinion risk category corresponding to the public opinion text data; wherein, the target public opinion monitoring model includes a BERT model, a bidirectional gated recurrent unit network, a convolutional neural network, a confidence-aware dynamic fusion module and a classifier; the bidirectional gated recurrent unit network and the convolutional neural network are set in parallel, and the confidence-aware dynamic fusion module is connected to the output of the BERT model, the bidirectional gated recurrent unit network and the convolutional neural network respectively.

[0031] In some embodiments, the BERT model is used to perform deep semantic encoding on the text sequence to obtain a context semantic vector sequence; a bidirectional gated recurrent unit network is used to perform temporal modeling on the context semantic vector sequence to obtain global context features; a convolutional neural network is used to extract local features from the context semantic vector sequence to obtain local phrase features; a confidence-aware dynamic fusion module is used to determine the sample confidence coefficient based on the context semantic vector sequence, and to dynamically weight and fuse the global context features and local phrase features according to the sample confidence coefficient to obtain a comprehensive sentiment feature vector; a classifier is used to classify the comprehensive sentiment feature vector to obtain the public opinion risk category.

[0032] In some embodiments, Figure 2 This is a schematic diagram of the structure of a public opinion monitoring model provided in an embodiment of this application. Figure 2As shown, the public opinion monitoring model includes a Bidirectional Encoder Representations from Transformers (BERT) model, a Bidirectional Gated Recurrent Unit (BiGRU) network, a Convolutional Neural Network (CNN), a confidence-aware dynamic fusion module, and a classifier. Specifically, the Bidirectional Gated Recurrent Unit network and the CNN are set in parallel after the BERT model and connected to the output of the BERT model. The confidence-aware dynamic fusion module is connected to the outputs of the BERT model, the Bidirectional Gated Recurrent Unit network, and the CNN. The classifier is set after the confidence-aware dynamic fusion module and connected to its output.

[0033] In some embodiments, the target public opinion monitoring model is the completed public opinion monitoring model, that is, the structure of the target public opinion monitoring model and... Figure 2 The public opinion monitoring model shown is the same.

[0034] In some embodiments, the BERT model includes a multi-layer Transformer encoder; the BERT model is used to perform the following operations: receiving a text sequence through the multi-layer Transformer encoder, performing context encoding on the text sequence layer by layer, and using the vector sequence output by the last Transformer encoder as a context semantic vector sequence.

[0035] In some embodiments, the BERT model is a pre-trained BERT model. The BERT model includes a multi-layer Transformer encoder, which is composed of multiple stacked Transformer encoders with the same structure; wherein each Transformer encoder layer contains a multi-head self-attention sub-layer and a feedforward neural network sub-layer, and each multi-head self-attention sub-layer and / or each feedforward neural network sub-layer is followed by a residual connection layer and a layer normalization layer.

[0036] In some application scenarios, each Transformer encoder layer computes the input sequence (such as a text sequence) through a multi-head self-attention sublayer to obtain a first vector sequence containing attention weight distributions with different positional information. Then, a feedforward neural network sublayer performs a non-linear transformation on the first vector sequence output by the multi-head self-attention sublayer to obtain a second vector sequence. Next, a residual connection layer adds the first vector sequence output by the multi-head self-attention sublayer to the input sequence of the multi-head self-attention sublayer, and / or adds the second vector sequence output by the feedforward neural network sublayer to the input sequence of the feedforward neural network sublayer (i.e., the first vector sequence output by the multi-head self-attention sublayer), obtaining the residual connection result. Finally, a layer normalization layer normalizes the residual connection result to obtain the output vector sequence. After each Transformer encoder layer obtains the output vector sequence, it outputs the output vector sequence to the next Transformer encoder layer, and so on, layer by layer, until the last Transformer encoder layer obtains the output vector sequence, which is the context semantic vector sequence.

[0037] In some embodiments, the bidirectional gated recurrent unit network includes a bidirectional gated recurrent unit layer and a second pooling layer. The bidirectional gated recurrent unit network performs the following operations: performing forward and backward temporal modeling on the context semantic vector sequence through the bidirectional gated recurrent unit layer to obtain the forward hidden state and backward hidden state at each time step in the context semantic vector sequence, and concatenating the forward hidden state and backward hidden state to obtain the bidirectional hidden state at each time step; determining the norm difference between the vectors of the bidirectional hidden states corresponding to adjacent time steps in the bidirectional hidden state, and quantizing the norm difference to obtain the emotion transfer intensity corresponding to each time step; normalizing the emotion transfer intensity corresponding to each time step to obtain the aggregate weight corresponding to each time step; and using the second pooling layer to perform weighted summation of the bidirectional hidden states at each time step based on the aggregate weight to obtain the global context features.

[0038] In some embodiments, a bidirectional gated recurrent unit network is used to perform deep feature extraction on the context semantic vector sequence output by the BERT model and to quantify the intensity of emotion evolution during the text flow process.

[0039] In some embodiments, the bidirectional gated recurrent unit layer includes a parallel forward gated recurrent unit (GRU) network and a backward GRU network. The forward and backward GRU networks have identical structures but independent parameters. The forward and backward GRU networks are used to capture the forward and backward temporal dependencies of the context semantic vector sequence, respectively.

[0040] For example, for the context semantic vector at each time step in the context semantic vector sequence, the forward GRU network in the bidirectional gated recurrent unit layer can sequentially compute from the start to the end of the context semantic vector sequence to generate the forward hidden state for each time step. Simultaneously, the backward GRU network in the bidirectional gated recurrent unit layer can sequentially compute from the end to the start of the context semantic vector sequence to generate the backward hidden state for each time step. Then, the forward and backward hidden states corresponding to each time step are concatenated to obtain the bidirectional hidden state for that time step.

[0041] In some embodiments, the forward GRU network (or backward GRU network) includes an update gate and a reset gate. The update gate is used to determine, through a sigmoid activation function, how much information from the hidden state of the previous time step in the context semantic vector sequence needs to be retained in the current time step. The reset gate is used, through a sigmoid activation function, to determine how much information from the hidden state of the previous time step in the context semantic vector sequence is used to compute a new candidate state.

[0042] In practical applications, after receiving the context semantic vector sequence, the forward GRU network (or backward GRU network) determines the update gate signal and reset gate signal corresponding to each time step in the context semantic vector sequence through update and reset gates. The update gate signal indicates how much information from the hidden state of the previous time step in the context semantic vector sequence needs to be retained in the current time step, while the reset gate signal indicates how much information from the hidden state of the previous time step in the context semantic vector sequence is used to compute the new candidate state. After obtaining the update and reset gate signals, the reset gate signal is multiplied element-wise with the hidden state of the previous time step to obtain the reset hidden state. Then, the reset hidden state is concatenated with the hidden state of the current time step to obtain the concatenated vector. The concatenated vector is multiplied by the first weight matrix and a first bias vector is added. Finally, a nonlinear transformation is performed using the hyperbolic tangent (tanh) activation function to normalize the values ​​to between -1 and 1, resulting in the candidate hidden state. The candidate hidden state includes the current input and filtered past information, representing a potential new state at the current time step. After obtaining the candidate hidden state, the update gating signal can be used as weights, and the hidden state of the previous time step and the candidate hidden state can be weighted and summed through element-wise multiplication and addition to obtain the final hidden state of the current time step, which is then passed to the next time step.

[0043] For example, updating and resetting the door can be calculated using the following formulas 1 and 2: (Formula 1); (Formula 2); in, This represents the update gating signal for time step t. This represents the reset gating signal for time step t. This represents the Sigmoid activation function. This represents the weight matrix corresponding to the update gate. This represents the weight matrix corresponding to the reset gate. This represents the hidden state at time step t-1. This represents the hidden state at time step t. To update the bias vector of the gate, This is the offset vector for resetting the gate.

[0044] The candidate hidden state can be calculated using the following formula 3: (Formula 3); in, This represents the candidate hidden state at time step t. This represents the hyperbolic tangent activation function. This represents the first weight matrix. This represents element-wise multiplication. This represents the first bias vector. This represents the reset gating signal for time step t. This represents the hidden state at time step t-1. This represents the hidden state at time step t.

[0045] The final hidden state at the current time step can be calculated using the following formula 4: (Formula 4); in, This represents the final hidden state at time step t. This represents the update gating signal for time step t. This represents element-wise multiplication. This represents the hidden state at time step t-1. This represents the candidate hidden state at time step t.

[0046] In some embodiments, after obtaining the forward hidden state and backward hidden state corresponding to each time step, the forward hidden state and backward hidden state corresponding to each time step can be concatenated using the following formula 5 to obtain the bidirectional hidden state of that time step. This bidirectional hidden state includes contextual information from the past and future.

[0047] (Formula 5); in, This represents the bidirectional hidden state at time step t. This represents the weight matrix corresponding to the forward hidden state. This represents the forward hidden state at time step t. This represents the backward hidden state at time step t. This represents the weight matrix corresponding to the backward hidden state. This represents the second bias vector.

[0048] It should be noted that the weight matrix corresponding to the update gate, the weight matrix corresponding to the reset gate, the first weight matrix, the weight matrix corresponding to the forward hidden state, the weight matrix corresponding to the backward hidden state, the bias vector of the update gate, the bias vector of the reset gate, the first bias vector, and the second bias vector are all learnable parameters.

[0049] In some embodiments, to quantify the intensity of local emotional fluctuations during text flow, after obtaining the bidirectional hidden state, the norm difference between the state vectors of adjacent time steps in the bidirectional hidden state can be calculated. The norm difference represents the displacement distance of the bidirectional hidden state corresponding to adjacent time steps in the feature space. A larger norm difference indicates a more drastic change in emotion between adjacent time steps, corresponding to emotional abrupt changes (such as irony or abuse) in the text, and a higher intensity of emotional transfer.

[0050] For example, the norm difference can be quantified using the following formula 6 to obtain the intensity of emotion transfer at each time step: (Formula 6); in, This indicates the intensity of the emotional shift at time step t. This represents the bidirectional hidden state at time step t. This represents the bidirectional hidden state at time step t-1.

[0051] In some embodiments, after obtaining the emotion transfer intensity, it can be normalized using the Softmax function to convert it into the corresponding aggregate weights. After obtaining the aggregate weights, a second pooling layer (such as a weighted pooling layer) can be used to perform a weighted summation of the bidirectional hidden states at each time step and the aggregate weight sequence to obtain the global context features.

[0052] For example, the second pooling layer can employ an average pooling strategy to calculate the average value of the bidirectional hidden states at each time step, thereby obtaining global context features. In this way, the average pooling strategy can effectively capture global information throughout the sequence while preserving key features of local emotional fluctuations, thus improving the representational power of the extracted global context features.

[0053] Understandably, bidirectional gated cyclic cell networks can effectively capture semantic relationships across long distances, providing accurate sentiment judgment and risk identification basis for target public opinion monitoring models.

[0054] In some embodiments, the convolutional neural network includes a convolutional module, a third pooling layer, and a fully connected layer connected in sequence; the convolutional module includes multiple one-dimensional convolutional layers with different kernel widths set in parallel; the convolutional neural network is used to perform the following operations: performing parallel convolution operations on the context semantic vector sequence through multiple one-dimensional convolutional layers to obtain multiple feature maps; performing pooling operations on each feature map through the third pooling layer, and concatenating the pooled feature maps to obtain a concatenated feature vector; and performing a nonlinear transformation on the concatenated feature vector through the fully connected layer to obtain local phrase features.

[0055] In some embodiments, the convolution module includes multiple one-dimensional convolutional layers with different kernel widths configured in parallel. Each one-dimensional convolutional layer uses a filter of a preset width to perform a sliding convolution operation on the received context semantic vector sequence to capture local phrase patterns of different lengths and obtain corresponding feature maps. After the multiple one-dimensional convolutional layers have completed the convolution operation, multiple feature maps are obtained, each with a different scale.

[0056] For example, the convolution operation of each one-dimensional convolutional layer can be represented by the following Equation 7: (Formula 7); in, This is the feature map output when the k-th one-dimensional convolutional layer slides to the i-th position of the context semantic vector sequence. Let be the weight coefficients of the k-th one-dimensional convolutional layer, and j be the index of the position within the convolutional kernel of the one-dimensional convolutional layer. Let be the vector at position i+j in the context semantic vector sequence, and b be the bias vector. This is the ReLU activation function. Both b and are learnable parameters.

[0057] In some embodiments, after obtaining multiple feature maps, the convolutional neural network performs a downsampling operation (i.e., pooling) on ​​each feature map output by the convolutional module through a third pooling layer (such as an adaptive max-pooling layer) to compress the feature map into a fixed-length scalar value, resulting in a pooled feature map. This downsampling operation is defined as taking the maximum value of the feature map. This ensures that regardless of the length of the text sequence, each feature map is ultimately pooled into a single, highly representative feature value. Then, the pooled feature maps corresponding to all the feature maps are concatenated to obtain a concatenated feature vector.

[0058] In some embodiments, after obtaining the concatenated feature vector, the concatenated feature vector is subjected to nonlinear transformation and dimension regularization by an activation function through a fully connected layer to obtain local phrase features.

[0059] In some embodiments, the confidence-aware dynamic fusion module includes a first pooling layer, a linear transformation layer, and a nonlinear activation function layer. The confidence-aware dynamic fusion module performs the following operations: pooling the vectors corresponding to the classification labels in the context semantic vector sequence through the first pooling layer to obtain a global semantic vector; transforming the global semantic vector through the linear transformation layer and the nonlinear activation function layer to obtain sample confidence coefficients; wherein, the sample confidence coefficients are used to characterize the semantic clarity of the public opinion text data; and based on the sample confidence coefficients, weighted fusion of global context features and local phrase features is performed to obtain a comprehensive sentiment feature vector.

[0060] In some embodiments, the first pooling layer (such as an average pooling layer) receives the context semantic vector sequence output by the BERT encoder and performs pooling on the output vector corresponding to the classification label at the beginning of the context semantic vector sequence to extract a global semantic vector representing the entire context semantic vector sequence. The classification label is inserted by the word segmenter during the BERT model's processing of the text sequence and is used to indicate the classification information of the entire context semantic vector sequence.

[0061] In some embodiments, after obtaining the global semantic vector, the confidence-aware dynamic fusion performs a projection transformation on the global semantic vector through a linear transformation layer to obtain the transformation result. Then, a non-linear activation function layer (such as the sigmoid function) is used to map the transformation result to compress it to between 0 and 1, thereby obtaining the sample confidence coefficient. Subsequently, the sample confidence coefficient is used as a dynamic adjustment operator to perform weighted fusion of global context features and local phrase features to obtain a comprehensive sentiment feature vector.

[0062] For example, the comprehensive sentiment feature vector can be calculated using the following formula 8: (Formula 8); in, Represents the comprehensive sentiment feature vector. This represents the sample confidence coefficient. Represents global context features, Indicates local phrase features.

[0063] It is understood that the comprehensive sentiment feature vector obtained through the embodiments of this application simultaneously includes the deep contextual semantics of the text and local phrase features, and the composition of the comprehensive sentiment feature vector can be adaptively adjusted according to the sample confidence coefficient. Thus, when the comprehensive sentiment feature vector is output to a classifier for predicting the probability of public opinion risk categories, it can solve the problem of insufficient flexibility caused by fixed-weight feature concatenation in traditional models, and improve the model's ability to analyze and adapt to complex and ever-changing online public opinion.

[0064] In some embodiments, the classifier in the target public opinion monitoring model is a multi-layer fully connected network. In practical applications, after receiving the comprehensive sentiment feature vector output by the confidence-aware dynamic fusion module, the classifier performs a linear transformation on the comprehensive sentiment feature vector through one or more fully connected layers and applies a non-linear activation function (such as the ReLU activation function). Then, the output of the fully connected layers is mapped to a probability distribution for all public opinion risk categories through the Softmax output layer.

[0065] In some embodiments, to prevent overfitting, a dropout regularization layer can be introduced after the fully connected layer to randomly drop some neurons during the training phase.

[0066] In some embodiments, public opinion risk categories can include risky public opinion and non-risky public opinion. When the public opinion risk category is risky, it means that the public opinion text data may contain information that negatively impacts the learning, life, and management of university faculty and students, such as negative evaluations, reports of breaking news, and the spread of rumors. In this case, the public opinion text data can be further analyzed to determine the category of risky public opinion. For example, based on its nature, it can be divided into political risky public opinion, social risky public opinion, academic risky public opinion, etc. Subsequently, corresponding operations are performed for the type of risky public opinion, such as early warning and guidance.

[0067] It is understood that in this embodiment, long-distance contextual dependencies are modeled through a bidirectional gated recurrent unit network, local sentiment expression patterns at the phrase level are captured through a convolutional neural network, and then global contextual features and local phrase features are dynamically fused through a confidence-aware dynamic fusion module to obtain a comprehensive sentiment feature vector that contains both overall semantic information and local sentiment features. Based on the comprehensive sentiment feature vector, the target public opinion monitoring model can accurately determine the risk category of public opinion text data and improve the recognition accuracy.

[0068] In some embodiments, the college network public opinion monitoring method based on confidence-aware dynamic fusion mechanism provided in this application further includes: acquiring a sample dataset, which includes sample text sequences and corresponding real risk category labels; based on the sample dataset, iteratively training an initial public opinion monitoring model using a backpropagation algorithm and a cross-entropy loss function until the initial public opinion monitoring model converges to obtain a target public opinion monitoring model; wherein, during the training process, the parameters of a preset number of Transformer encoder layers near the input end of the BERT model in the initial public opinion monitoring model are frozen.

[0069] In some embodiments, freezing the parameters of a preset number of Transformer encoder layers near the input in the BERT model during training preserves the rich linguistic features learned by the BERT model on general text data. This avoids unnecessary adjustments to the existing rich linguistic features of the BERT model when training the initial public opinion monitoring model, thereby accelerating the convergence speed and improving the generalization ability of the initial public opinion monitoring model. The preset number of layers can be set according to actual needs, and this embodiment does not limit this setting.

[0070] In some embodiments, the backpropagation algorithm is used to calculate the gradient of the loss function with respect to the model parameters, and the cross-entropy loss function is used to determine the difference between the predicted risk category and the actual risk category output by the initial public opinion monitoring model. Both the backpropagation algorithm and the cross-entropy loss function are existing technologies and will not be described in detail here.

[0071] In some embodiments, the university online public opinion monitoring method based on a confidence-aware dynamic fusion mechanism provided in this application further includes: acquiring historical university online public opinion text data; cleaning and segmenting the historical university online public opinion text data to obtain an initial sample word sequence; randomly swapping and / or randomly deleting the remaining words in the initial sample word sequence (excluding preset words) based on a preset probability to obtain a target sample word sequence; and obtaining a sample text sequence based on the target sample word sequence. The sentence meaning represented by the target sample word sequence is the same as the sentence meaning represented by the initial sample word sequence.

[0072] In some embodiments, the historical online public opinion text data of universities is historical public opinion text data related to universities collected from multiple channels such as university official websites, social media platforms, and forums. After obtaining the historical online public opinion text data of universities, it can be cleaned and segmented to obtain an initial sample word sequence. The method for cleaning and segmenting the historical online public opinion text data of universities is similar to the method for preprocessing public opinion text data in the above embodiments, and will not be described again here.

[0073] In some embodiments, to augment the training data, data augmentation processing can be performed on the initial sample word sequence after it has been obtained.

[0074] For example, the Easy Data Augmentation (EDA) method is used to perform random swapping and / or random deletion operations on the remaining words in the initial sample word sequence, excluding preset words, based on a preset probability. The random swapping operation involves randomly selecting two words from the initial sample word sequence and exchanging their positions, while the random deletion operation involves randomly deleting a word from the initial sample word sequence. In this way, the resulting target sample word sequence increases the diversity and richness of the data while maintaining the basic meaning of the original sentence.

[0075] In some embodiments, the method for obtaining a sample text sequence based on a target sample word sequence is similar to the method for obtaining a text sequence based on a word sequence in the above embodiments, and will not be described again here.

[0076] Understandably, the data augmentation process described above can expand the size of the sample dataset and improve the model's generalization ability.

[0077] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the invention. Therefore, the phrase "in one embodiment" or "in an embodiment" appearing in every place throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in each embodiment of the invention, the sequence number of each process described above does not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the invention. The sequence numbers of the embodiments of the invention described above are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0078] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0079] In the several embodiments provided by this invention, it should be understood that the disclosed methods can be implemented in other ways. The methods disclosed in the several method embodiments provided by this invention can be arbitrarily combined without conflict to obtain new method embodiments. The features disclosed in the several method embodiments provided by this invention can be arbitrarily combined without conflict to obtain new method embodiments.

[0080] The above description is merely an embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for monitoring online public opinion in universities based on a confidence-aware dynamic fusion mechanism, characterized in that, include: Obtain text data of public opinion on university networks and preprocess the text data to obtain text sequences; Input the text sequence into the target public opinion monitoring model to obtain the public opinion risk category corresponding to the public opinion text data; The target public opinion monitoring model includes a BERT model, a bidirectional gated recurrent unit network, a convolutional neural network, a confidence-aware dynamic fusion module, and a classifier; the bidirectional gated recurrent unit network and the convolutional neural network are set in parallel; the confidence-aware dynamic fusion module is connected to the output of the BERT model, the bidirectional gated recurrent unit network, and the convolutional neural network respectively; The BERT model is used to perform deep semantic encoding on text sequences to obtain a sequence of contextual semantic vectors; a bidirectional gated recurrent unit network is used to perform temporal modeling on the sequence of contextual semantic vectors to obtain global contextual features; a convolutional neural network is used to extract local features from the sequence of contextual semantic vectors to obtain local phrase features; a confidence-aware dynamic fusion module is used to determine the sample confidence coefficient based on the sequence of contextual semantic vectors, and to dynamically weight and fuse the global contextual features and local phrase features according to the sample confidence coefficient to obtain a comprehensive sentiment feature vector; a classifier is used to classify the comprehensive sentiment feature vector to obtain the public opinion risk category.

2. The method according to claim 1, characterized in that, Preprocessing the public opinion text data yields a text sequence, including: The public opinion text data is cleaned and processed to obtain the initial text data; The initial text data is segmented to obtain a word sequence; Based on the word sequence, corresponding word vectors, segment vectors, and position vectors are generated, and the word vectors, segment vectors, and position vectors are summed to obtain the text sequence.

3. The method according to claim 1, characterized in that, The confidence-aware dynamic fusion module includes a first pooling layer, a linear transformation layer, and a nonlinear activation function layer; The confidence-aware dynamic fusion module is used to perform the following operations: The first pooling layer performs pooling processing on the vectors corresponding to the classification labels in the context semantic vector sequence to obtain the global semantic vector; The global semantic vector is transformed by a linear transformation layer and a nonlinear activation function layer to obtain the sample confidence coefficient; the sample confidence coefficient is used to characterize the semantic clarity of the public opinion text data. Based on the sample confidence coefficient, the global context features and local phrase features are weighted and fused to obtain a comprehensive sentiment feature vector.

4. The method according to claim 1, characterized in that, The bidirectional gated recurrent unit network includes a bidirectional gated recurrent unit layer and a second pooling layer; A bidirectional gated cyclic cell network is used to perform the following operations: By performing forward and backward temporal modeling on the context semantic vector sequence through a bidirectional gated recurrent unit layer, the forward and backward hidden states of each time step in the context semantic vector sequence are obtained. The forward and backward hidden states are then concatenated to obtain the bidirectional hidden state of each time step. Determine the norm difference between the vectors of the bidirectional hidden states corresponding to adjacent time steps in the bidirectional hidden state, and quantify the norm difference to obtain the emotion transfer intensity corresponding to each time step. The intensity of emotion transfer at each time step is normalized to obtain the aggregate weight for each time step. The second pooling layer uses aggregated weights to perform a weighted summation of the bidirectional hidden states at each time step to obtain global context features.

5. The method according to claim 1, characterized in that, A convolutional neural network consists of a convolutional module, a third pooling layer, and a fully connected layer connected in sequence; the convolutional module consists of multiple one-dimensional convolutional layers with different kernel widths set in parallel. Convolutional neural networks are used to perform the following operations: Multiple feature maps are obtained by performing parallel convolution operations on the context semantic vector sequence through multiple one-dimensional convolutional layers; The third pooling layer performs pooling operations on each feature map, and the pooled feature maps are then concatenated to obtain a concatenated feature vector. Local phrase features are obtained by performing a nonlinear transformation on the concatenated feature vector through a fully connected layer.

6. The method according to claim 1, characterized in that, The BERT model includes a multi-layer Transformer encoder; The BERT model is used to perform the following operations: The text sequence is received by a multi-layer Transformer encoder, and the text sequence is encoded with context layer by layer. The vector sequence output by the last Transformer encoder is used as the context semantic vector sequence.

7. The method according to claim 1, characterized in that, The method further includes: Obtain the sample dataset, which includes sample text sequences and corresponding real risk category labels; Based on the sample dataset, the initial public opinion monitoring model is iteratively trained using the backpropagation algorithm and the cross-entropy loss function until the initial public opinion monitoring model converges, thus obtaining the target public opinion monitoring model. During the training process, the parameters of a preset number of Transformer encoder layers near the input of the BERT model in the initial public opinion monitoring model are frozen.

8. The method according to claim 7, characterized in that, The method further includes: Obtain historical online public opinion data from universities; Historical online public opinion data of universities was cleaned and segmented to obtain an initial sample word sequence. Based on a preset probability, random swapping and / or random deletion operations are performed on the remaining words in the initial sample word sequence, excluding the preset words, to obtain the target sample word sequence. Based on the target sample word sequence, the sample text sequence is obtained.