Network public opinion emotion intensity intelligent multidimensional analysis method based on improved LeNet5 model

By improving the LeNet5 model for online public opinion sentiment analysis, the problem of insufficient multi-dimensional analysis capabilities of sentiment intensity and attribute dimensions in existing technologies is solved, and fine-grained classification of sentiment intensity and explicit labeling of attribute dimensions are achieved, which improves the accuracy and application value of the analysis.

CN120611079APending Publication Date: 2025-09-09CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510736610.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Existing technologies in online public opinion sentiment analysis have problems such as coarse-grained classification, insufficient context-dependent processing, and lack of multidimensional analysis capabilities. They are unable to effectively distinguish between sentiment intensity and attribute dimensions, resulting in insufficient refinement of analysis results.

Method used

By improving the LeNet5 model, adopting layered convolutional pooling and fully connected processing, combining word vectors and sentiment attribute annotation, we can achieve multi-level division of sentiment intensity, attribute dimension classification and refined semantic feature extraction, and construct a multi-dimensional hierarchical output module for sentiment analysis.

Benefits of technology

It implements a 7-level classification of sentiment intensity and a 0-100 continuous value scoring system, explicitly labels sentiment attribute dimensions, enhances the ability to process Chinese context, supports multi-dimensional sentiment analysis, and improves the accuracy and application value of analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611079A_ABST
    Figure CN120611079A_ABST
Patent Text Reader

Abstract

The invention relates to a public opinion emotion intensity intelligent multidimensional analysis method based on an improved LeNet5 model, and belongs to the field of natural language processing and deep learning. The method comprises the following steps: S1, capturing text data of a network platform through a web crawler, and preprocessing the text data; s2, constructing an improved LeNet5 model, and performing hierarchical convolution pooling and full connection processing on the preprocessed text data to realize step-by-step extraction and nonlinear transformation of semantic features from local to global; and S3, outputting multi-dimensional public opinion emotion intensity through an improved LeNet5 model, and analyzing a result. According to the method, the emotion intensity information of the network public opinion text can be accurately extracted, analysis is carried out from multiple dimensions, the precision and comprehensiveness of emotion analysis are remarkably improved, and powerful support is provided for the fields of network public opinion monitoring, commercial decision making and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of natural language processing and deep learning, and relates to an intelligent multidimensional analysis method for the sentiment intensity of online public opinion based on an improved LeNet5 model. Background Art

[0002] With the rapid development of Internet technology, online public opinion has become an important data source reflecting public opinions and emotional tendencies. Sentiment analysis, as one of the core tasks of natural language processing, has wide application value in the fields of public opinion monitoring, product evaluation, and user feedback analysis. Traditional sentiment analysis methods specifically include those based on rule matching or shallow machine learning models (such as support vector machines and naive Bayes), which simply divide emotions into three categories: positive, negative, and neutral. This coarse-grained classification method cannot capture the differences in the intensity of subdivided emotions such as "mild dissatisfaction" and "strong recommendation". For example, in user comments, "the price is too high" and "the price is extremely high" are both classified as negative emotions, but there is a significant difference in the emotional intensity of the two. Traditional methods fail to effectively distinguish this difference, resulting in insufficient refinement of the sentiment analysis results.

[0003] At the technical implementation level, traditional models have obvious flaws in handling the contextual dependencies of Chinese texts. The sentiment polarity of Chinese words is highly dependent on the context. For example, the presence of the negation word "not" changes the sentiment polarity of "not recommended", and "the price-performance ratio is average, but the battery life is very poor" requires a combination of transition words and multi-dimensional evaluation words to comprehensively judge the sentiment tendency. However, early convolutional neural networks (such as LeNet5) usually use fixed-size convolution kernels to extract local features when processing text, which makes it difficult to model long-distance semantic associations; although recurrent neural networks (RNNs) can theoretically handle sequence dependencies, they suffer from the problem of vanishing gradients and have low computational efficiency. In addition, existing methods generally lack explicit modeling of sentiment attributes (such as price, performance, service, etc.), and cannot cross-analyze sentiment intensity from multiple attribute dimensions, resulting in analysis results that are difficult to meet the needs of refinement and multidimensionality in practical applications.

[0004] In recent years, deep learning models have made some progress in the field of sentiment analysis. However, there are still technical bottlenecks in the segmentation of sentiment intensity and attribute dimension analysis of online public opinion texts, mainly in the following aspects:

[0005] 1. Lack of emotional intensity grading: Existing models mostly target binary or ternary classification, without multi-level classification of emotional intensity (e.g., 7 levels from -3 to +3), making it impossible to quantify the strength of emotions;

[0006] 2. Insufficient attribute dimension modeling: The attributes targeted by different sentiments in the text are not explicitly distinguished, resulting in the inability to implement multidimensional analysis functions such as "statistical analysis of sentiment intensity by attribute dimension";

[0007] 3. Insufficient semantic feature extraction: The traditional LeNet5 model directly uses the two-dimensional convolutional structure in the image field for text processing, and does not optimize the network structure for the characteristics of sequential data, resulting in insufficient efficiency in local semantic feature extraction and global feature integration capabilities.

[0008] Therefore, there is an urgent need for an intelligent analysis method that can simultaneously achieve multi-level classification of sentiment intensity, attribute dimension classification and refined semantic feature extraction, so as to solve the problems of coarse-grained classification, insufficient context-dependent processing and lack of multi-dimensional analysis capabilities in existing technologies, and improve the accuracy and application value of online public opinion sentiment analysis. Summary of the Invention

[0009] In view of this, the purpose of the present invention is to provide an intelligent multidimensional analysis method for the sentiment intensity of online public opinion based on an improved LeNet5 model. The improved LeNet5 model simultaneously realizes multi-level classification of sentiment intensity, attribute dimension classification and refined semantic feature extraction, thereby solving the problems of coarse-grained classification, insufficient context-dependent processing and lack of multidimensional analysis capabilities in the existing technology.

[0010] In order to achieve the above object, the present invention provides the following technical solutions:

[0011] An intelligent multidimensional analysis method for public opinion sentiment intensity based on an improved LeNet5 model, the method comprising:

[0012] S1. Capture text data from a network platform using a web crawler and pre-process the text data;

[0013] S2. Build an improved LeNet5 model, which performs layered convolutional pooling and full-connection processing on the preprocessed text data to achieve step-by-step extraction and nonlinear transformation of semantic features from local to global.

[0014] S3. Output multi-dimensional public opinion sentiment intensity through the improved LeNet5 model.

[0015] Furthermore, in step S1, the text data is preprocessed, including: first, the text data is segmented and stop words are removed to obtain a pure word sequence; then a word vector is generated based on the word sequence, and the sentiment attribute category is predefined, and each word is labeled with the sentiment attribute and converted into a binary vector through one-hot encoding; finally, the word vector and the binary vector are spliced ​​to form the input matrix of the improved LeNet5 model.

[0016] Generating word vectors based on word sequences includes converting each word into a 300-dimensional word vector using a pre-trained Word2Vec model. Labeling each word with sentiment attributes and converting the resulting vectors into binary vectors using one-hot encoding includes labeling each word with sentiment attributes according to predefined sentiment attribute categories and converting the attribute labels into binary vectors using one-hot encoding. The word vectors and binary vectors are concatenated to form the input matrix, where the input matrix has a shape of [number of words, 300 + number of sentiment attribute categories].

[0017] Furthermore, the improved LeNet5 model includes a first-layer convolutional pooling module, a second-layer convolutional pooling module, a first-layer fully connected layer, a second-layer fully connected layer and a multi-dimensional hierarchical output module connected in sequence.

[0018] The first convolutional pooling module includes a first convolutional layer and a maximum pooling layer; the second convolutional pooling module includes a second convolutional layer and a global maximum pooling layer. The first convolutional layer, the second convolutional layer, the first fully connected layer, and the second fully connected layer are all connected with a ReLU activation function. The multi-dimensional grading output module implements sentiment intensity grading output, sentiment attribute classification output, and intensity refinement grading output.

[0019] Furthermore, the convolution kernel size in the first convolution layer is 5×1, the number is 64, and a number of consecutive words is extracted to form local semantic features, and a first feature map is output; the maximum pooling layer reduces the dimension of the first feature map through the maximum pooling operation and retains the key features;

[0020] The convolution kernel size in the second convolution layer is 3×1, and the number is 128, which is used to extract cross-local combined features and output a second feature map; the global maximum pooling layer takes the maximum value of the second feature map through a global maximum pooling operation, compresses the sequence features into a fixed dimension, and realizes feature integration from local to global;

[0021] The first fully connected layer has an input dimension of 128 and an output dimension of 256, which performs nonlinear changes on global features and improves the dimension; the second fully connected layer has an input dimension of 256 and an output dimension of 128, which compresses features and enhances generalization capabilities.

[0022] Furthermore, the multidimensional grading output module includes an emotion intensity grading output layer, an emotion attribute classification output layer and an intensity refinement grading output layer; the emotion intensity grading output layer outputs the probability corresponding to each emotion intensity level; the emotion attribute classification output layer outputs the probability corresponding to each emotion attribute category; the intensity refinement grading output layer outputs a continuous value score to quantify the comprehensive emotion intensity.

[0023] The input dimension of the emotion intensity grading output layer is 128. The Sofetmax function is used to obtain the probability corresponding to each of the seven emotion intensity levels from -3 to +3, and the emotion intensity level with the highest probability is output.

[0024] The input dimension of the emotion attribute classification output layer is 128. The probability corresponding to each attribute category is obtained through the sigmoid function, and the emotion attribute category with the highest probability is output;

[0025] The intensity refinement hierarchical output layer has an input dimension of 128 and outputs a continuous value score through linear activation, and the continuous value score ranges from 0 to 100.

[0026] The beneficial effects of the present invention are:

[0027] (1) The present invention effectively solves the coarse-grained problem of the traditional three-classification method through a 7-level classification system (the emotional intensity level ranges from -3 to +3) and a 0-100 continuous value scoring mechanism. It can accurately distinguish the intensity differences of subdivided emotions such as "slightly negative", "moderately negative", and "strongly negative" (for example, the emotional intensity distinction between "high price" and "extremely high price"), thus realizing fine-grained emotional intensity analysis.

[0028] (2) A multi-dimensional attribute association model is proposed, which explicitly labels the attribute dimensions corresponding to emotions and supports statistical distribution of emotions by attribute dimensions to meet the multi-dimensional analysis needs in business decision-making.

[0029] (3) The present invention effectively extracts semantic features from short sequences to long-distance dependencies by adjusting the convolution kernel size of the two convolutional layers (5→3) and optimizing the pooling strategy (local pooling→global pooling), thereby enhancing the processing capability of Chinese context (such as negative words and transition words) (such as correctly identifying "not recommended" as negative).

[0030] (4) The present invention simultaneously performs intensity classification, attribute classification, and continuous scoring through a multi-dimensional output layer, improves model efficiency by sharing underlying features, and avoids the waste of resources caused by repeated training of traditional single-task models.

[0031] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:

[0033] Figure 1 This is an overall flow chart of the intelligent multidimensional analysis method for network public opinion sentiment intensity based on the improved LeNet5 model described in the present invention;

[0034] Figure 2 This is a flow chart of the data preprocessing stage;

[0035] Figure 3 Schematic diagram of the improved LeNet5 model structure;

[0036] Figure 4 This is the architecture diagram of the multi-dimensional hierarchical output layer. DETAILED DESCRIPTION

[0037] The following describes the embodiments of the present invention by means of specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0038] Among them, the accompanying drawings are only for illustrative purposes and represent only schematic diagrams rather than actual pictures, and should not be understood as limiting the present invention. In order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the dimensions of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions may be omitted in the accompanying drawings.

[0039] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "back", etc. indicating directions or positional relationships, they are based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0040] like Figure 1 As shown, an intelligent multidimensional analysis method for network public opinion sentiment intensity based on an improved LeNet5 model provided by an embodiment of the present invention includes:

[0041] 1. Collect online public opinion text data and pre-process it, such as Figure 2As shown in the figure, it includes:

[0042] (1) Word Segmentation and Stop Word Filtering

[0043] Use the jieba word segmentation tool to perform Chinese word segmentation on the input online public opinion text, and combine a custom stop word list (including invalid words without actual semantics such as common auxiliary words, prepositions, conjunctions, etc., such as "de", "le", "zai", "a", etc.) to filter out invalid words, obtaining a pure word sequence.

[0044] For example, taking the input text "This mobile phone has an excellent camera effect, but the price is really too high" as an example, after word segmentation and removing stop words, the word sequence ["this", "mobile phone", "take pictures", "effect", "excellent", "price", "really", "too high"] is obtained.

[0045] (2) Word Embedding and Attribute Annotation Fusion

[0046] ① Word Vector Generation: Use a pre-trained Word2Vec model (such as a 300-dimensional word vector trained based on Chinese Wikipedia) to convert each word into a word vector of a fixed dimension (such as 300 dimensions).

[0047] ② Sentiment Attribute Annotation: Pre-define the dimension for sentiment attribute annotation of each word, and convert the attribute annotation into a binary vector through one-hot encoding. Among them, the length of the vector increased by one-hot encoding depends on the number of categories of the categorical variable. When integrating the attribute annotation into the word vector in the form of one-hot encoding in word embedding, the increased vector length is the number of categories of the attribute annotation.

[0048] ③ Vector Concatenation: Concatenate the 300-dimensional word vector with the increased number of attribute categories n to form an input vector of 300 + n dimensions that combines semantic information and attribute information. The shape of this input vector is (number of words, 300 + n). For example, if the number of attribute categories is 3, after concatenating with the 300-dimensional word vector, a 303-dimensional input vector is formed, and the final input matrix shape is (number of words, 300 + number of attribute categories).

[0049] 2. Construct an improved LeNet5 model

[0050] In this embodiment, the LeNet5 network structure is optimized according to the characteristics of the text sequence, as Figure 3 shown, this model is divided into four core modules:

[0051] (1) The First Convolutional Pooling Module

[0052] Convolution calculation is to multiply the convolutional kernel element by element with the corresponding word vector, and then sum the results. Assume the current convolutional kernel is t and the corresponding word vector is v j,k , then the formula for convolution calculation is: Among them, tj,k Represents the element in the jth row and kth column of the convolution kernel t, v j,k Represents the kth element of the jth word vector. The summation result is an element on the output feature map.

[0053] In this embodiment, the convolution layer uses one-dimensional convolution (adapted to sequence data), the convolution kernel size is 5×1 and the number is 64, where each convolution kernel will slide on the input sequence to process 5 consecutive word vectors each time. The sliding step is 1, that is, the convolution kernel slides 1 position to the right on the input sequence each time. The activation function is ReLU, which introduces nonlinearity so that the model can learn more complex feature representations. Extract local semantic features consisting of 3 to 5 consecutive words (such as "the price is too high" and "the photo is great"), and the output feature map shape is (1, 64, the number of words - 5 + 1).

[0054] The pooling layer uses maximum pooling with a window size of 2 and a stride of 2 to reduce the dimension and retain key features. The output shape is (1, 64, (number of words - 5 + 1) / 2).

[0055] For example, the input matrix shape is (10, 300 + n) (assuming batch_size = 1 and number of words = 10). The one-dimensional convolution kernel properties are: size 5, count 64, stride 1, no padding (valid convolution), activation function ReLU, setting negative features to 0, and enhanced nonlinearity. The output feature map is calculated as: length = 10-5 + 1 = 6, and shape is (1, 64, 6) (number of channels = 64, sequence length = 6). The pooling layer is calculated as: max pooling window 2, stride 2, output length = 6 / 2 = 3, resulting in an output shape of (1, 64, 3).

[0056] (2) Second layer convolution pooling module

[0057] Convolutional layer: The input channels are 64, the convolution kernel size is adjusted to 3×1 (to avoid sequence length being too short), the number of convolution kernels is adjusted to 128, the sliding stride is 1, and the activation function is ReLU. This convolutional layer further extracts cross-local combined features (such as the transition + attribute association in "But the price is too high"), and the output feature map shape is (1, 128, (number of words - 5 + 1) / 2 - 3 + 1);

[0058] Pooling layer: Global maximum pooling is used to take the maximum value of the entire feature map (128 channels, length 1), compressing the sequence features into a fixed dimension (1,128) to achieve feature integration from local to global.

[0059] (3) Fully connected layer module

[0060] The module includes the first fully connected layer and the second fully connected layer.

[0061] Among them, the input dimension of the first fully connected layer is 128, the output dimension is 256, and the activation function is ReLU. This fully connected layer is used to perform nonlinear transformation and dimensionality improvement on global features.

[0062] The second fully connected layer has an input dimension of 256, an output dimension of 128, and an activation function of ReLU. This fully connected layer is used to further compress the feature space and remove redundant information while retaining the most critical emotional features and enhancing generalization capabilities.

[0063] It should be noted that in the improved LeNet5 model, the activation function ReLU (rectified linear unit) is applied after the convolution and full connection operations. For each element of the vector, the ReLU function formula is

[0064]

[0065] (4) Multi-dimensional hierarchical output layer module

[0066] The multi-dimensional hierarchical output layer is the key part of the improved LeNet5 model for intelligent multi-dimensional analysis of the emotional intensity of online public opinion. It can integrate the features extracted by the previous convolution, pooling and fully connected layers and output the emotional information of the text from multiple dimensions, such as Figure 4 As shown, the multi-dimensional grading output includes emotion intensity grading output, emotion attribute classification output and intensity refinement grading output. The three output submodules process the input features in parallel and finally output results of three different dimensions.

[0067] ① The specific output of emotional intensity classification is as follows: the input is the feature vector x output by the second fully connected layer, whose dimension is 128, and the output is 7 nodes (corresponding to 7 levels of emotional intensity from -3 to +3). The weight matrix form is (128, 7). After activation by the Softmax function, the probability distribution of each level is output (such as [-3: 0.1, -2: 0.2, -1: 0.1, 0: 0.05, +1: 0.15, +2: 0.2, +3: 0.2]), thereby realizing fine-grained intensity classification.

[0068] First, the input vector x is linearly transformed through a weight matrix W1∈R 128×7 and bias vector b1∈R 7 Get the original score vector z1, where z1∈R 7 , each element z 1i is the raw score corresponding to the i-th emotion intensity level (output after linear transformation). The formula is as follows:

[0069] z 1i =xW1+b1

[0070] Then use the Softmax function to convert the original score vector z1 into a probability distribution vector p1, where p1∈R 7 ,and p 1i is the probability of the i-th emotion intensity level calculated by the Softmax function, where z 1j Its meaning is the same as z 1i The same means that the raw scores corresponding to the jth emotion intensity level are the same. j is used as the summation index to avoid confusion with the numerator i. The denominator is summed for j = 1, 2, ..., 7 to ensure the probability is normalized. The formula is:

[0071]

[0072] Finally, the level with the highest probability is selected as the sentiment intensity level of the text, where i is still the category index of the sentiment intensity level (1, 2, ..., 7), argmax i p 1i Indicates finding the 1i The largest i is the emotional intensity level predicted by the model, that is:

[0073] str=argmax i p 1i ,i=1,2,…,7

[0074] Where str represents the level of sentiment intensity.

[0075] The cross entropy loss function is used to measure the difference between the predicted probability distribution and the true label y1, where y1 is a one-hot vector of length 7, representing the true emotional intensity level. i corresponds to 7 emotional intensity levels. 1i is the true label of the i-th sentiment intensity level (value is 0 or 1), p 1i is the predicted probability, the formula is:

[0076]

[0077] The formula calculates the cross entropy loss between the predicted results and the true labels by summing over i=1,2,…,7.

[0078] ② The specific output of sentiment attribute classification is as follows: the input dimension is 128, and the output dimension is equal to the number of predefined attribute categories (such as price, performance, and service). The Sigmoid activation function is used to implement multi-label classification (multiple attributes can be labeled at the same time, such as "price" and "service"), and the association probability of each attribute is output. For example, the output is [0.8, 0.6, 0.3], which means that the "price" and "performance" attributes are true.

[0079] First, the input vector x is linearly transformed by W2∈R128×m and the bias vector b2∈R m Get the original score vector z2, where m is the number of predefined emotional attribute categories, z2∈R m , each element z 2i Corresponding to the raw score of a sentiment attribute category, set the bias vector b2, the formula is:

[0080] z 2i =xW2+b2

[0081] Then, the original score vector z2 is converted into a probability vector p2 using the Sigmoid function where p2∈R m , i is the index of the emotional attribute category, and its value range is 1, 2, ..., m (m is the total number of emotional attributes), p 2i Represents the probability of the i-th emotional attribute calculated by the Sigmoid function, the formula is:

[0082]

[0083] Finally, a threshold θ is set (usually 0.5), and attributes with a probability greater than the threshold are determined to be the emotional attributes involved in the text, that is:

[0084] att={i|p 2i >θ,i=1,2,…,m}

[0085] Among them, att represents the emotional attribute, and the formula represents the probability of screening out p 2i i greater than the threshold, thereby determining which sentiment attributes the text belongs to.

[0086] The binary cross entropy loss function is used to measure the difference between the predicted probability vector and the true label y2, where y2∈R m ,y 2i Indicates whether the text belongs to the i-th sentiment attribute category (0 or 1). The formula calculates the sum of the binary cross entropy loss of each sentiment attribute in the multi-label classification task by summing i=1,2,…,m. The formula is:

[0087]

[0088] ③ The intensity-refined graded output is as follows: input dimension is 128, output is 1 node, and a continuous value score of 0-100 is output through a linear activation function (such as 75, indicating a moderately strong positive sentiment). This quantifies the sentiment intensity of the text at a finer granularity and can more accurately reflect the emotional level of the text.

[0089] First, the input vector x is linearly transformed by W3∈R 128×1 And the bias vector b3∈R to get the predicted score The formula is:

[0090]

[0091] The mean square error loss function is used to measure the predicted score The error between the true score y3 is:

[0092]

[0093] Combining the loss functions of the three dimensions, we get the total loss function L:

[0094] L=λ1L str +λ2L att +λ3L sco

[0095] Where λ1, λ2, and λ3 are the weights of the three loss terms, which are determined by tuning on the validation set. During training, the backpropagation algorithm is used to update the weight matrices W1, W2, W3 and the bias vectors b1, b2, b3 to minimize the total loss function L.

[0096] In summary, the multi-dimensional hierarchical output layer analyzes and quantifies the sentiment of online public opinion text from three different dimensions through a series of linear transformations, activation functions, and loss functions. At the same time, it optimizes the model parameters through multi-task joint training to improve the accuracy and comprehensiveness of sentiment analysis.

[0097] A specific application example of this embodiment is as follows:

[0098] 1. Get the input text "This phone takes great photos, but the price is too high. Students find it hard to accept!" and preprocess the text.

[0099] 1) Perform word segmentation and stop word filtering using the Jieba word segmentation tool to obtain the word sequence ["this type", "mobile phone", "photo", "effect", "excellent", "price", "real", "too high", "student party", "difficult", "acceptable"] (a total of 11 words);

[0100] 2) Fusion of word embedding and attribute annotation.

[0101] ① Word vector generation: Use the pre-trained 300-dimensional Word2Vec model to convert each word into a word vector.

[0102] ②Word embedding and attribute labeling: Predefined sentiment attribute categories are {price, performance, service}, and attribute labeling is performed on word sequences:

[0103] "Excellent", "Photo", and "Effect" are labeled as "Performance" attributes and are one-hot encoded as [0, 1, 0];

[0104] “Price”, “too high”, and “real” are labeled as the “price” attribute and are one-hot encoded as [1,0,0];

[0105] “Students”, “difficult”, “accept”, “mobile phone”, and “this model” are labeled as “service” attributes, and the one-hot encoding is [0, 0, 1] (Note: attribute labeling can be customized according to domain requirements).

[0106] Then, vector concatenation is performed to concatenate the 300-dimensional word vector with the 3-dimensional one-hot encoding to form a 303-dimensional input vector. The final input matrix shape is (11, 303).

[0107] 2. Computational process based on the improved LeNet5 model.

[0108] 1) First layer convolution pooling module

[0109] Input matrix: shape is (1, 11, 303) (batch_size = 1, number of words = 11, vector dimension = 303).

[0110] Convolutional layer: uses 64 one-dimensional convolution kernels (size 5×303), stride 1, no padding, and activation function ReLU.

[0111] The output feature map length is calculated as: 11-5+1=7, and the shape is (1,64,7).

[0112] Max pooling layer: pooling window size 2, stride 2, output length: [7 / 2] = 3, output shape is (1, 64, 3).

[0113] 2) Second layer convolution pooling module

[0114] Convolutional layer: 64 input channels, 128 one-dimensional convolution kernels (size 3×64), stride 1, no padding, activation function ReLU.

[0115] The output feature map length is calculated as: 3-3+1=1, and the shape is (1,128,1).

[0116] Global maximum pooling layer: takes the maximum value for each channel and outputs a fixed-dimensional feature vector with a shape of (1,128).

[0117] 3) Fully connected layer module

[0118] The first fully connected layer has an input dimension of 128, an output dimension of 256, an activation function ReLU, and an output shape of (1, 256).

[0119] The second fully connected layer has an input dimension of 256, an output dimension of 128, an activation function ReLU, and an output shape of (1,128).

[0120] 4) Multi-dimensional hierarchical output layer

[0121] Sentiment intensity grading output: 7 output nodes (Softmax activation), the output probability distribution is: [-3:5%, -2:10%, -1:15%, 0:10%, +1:20%, +2:30%, +3:10%], and the level corresponding to the maximum probability is +2 (strong positive sentiment, but negative price evaluation lowers the overall intensity).

[0122] Sentiment attribute classification output: 3 output nodes (Sigmoid activation), with output probabilities of [0.92, 0.85, 0.60], corresponding to "price" (0.92), "performance" (0.85), and "service" (0.20). According to the threshold of 0.5, it is determined that both the "price" and "performance" attributes are associated.

[0123] Strength refinement and grading output: 1 output node (linear activation), outputting a continuous value of 65 (0-100 range, indicating moderate to strong positive sentiment).

[0124] 3. Results Analysis

[0125] Sentiment Intensity: Through a seven-level classification and continuous scoring, we accurately distinguish the intensity difference between "Great photos" (strong positive) and "Too expensive price" (moderate negative). The overall score is 65, reflecting an overall positive sentiment with some negative elements.

[0126] Emotional attributes: Explicitly identifies the "price" and "performance" attributes and supports dimension-based statistics (e.g., the "performance" dimension has a sentiment intensity of +3, while the "price" dimension has a sentiment intensity of -2), meeting multi-dimensional analysis needs.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions, which should all be included in the scope of the claims of the present invention.

Claims

1. An intelligent multidimensional analysis method for public opinion sentiment intensity based on the improved LeNet5 model, characterized by: The method includes: S1. Capture text data from a network platform using a web crawler and pre-process the text data; S2. Build an improved LeNet5 model, which performs layered convolutional pooling and full-connection processing on the preprocessed text data to achieve step-by-step extraction and nonlinear transformation of semantic features from local to global. S3. Output multi-dimensional public opinion sentiment intensity through the improved LeNet5 model.

2. The method according to claim 1, characterized in that In step S1, the text data is preprocessed, including: first, the text data is segmented and stop words are removed to obtain a pure word sequence; then a word vector is generated based on the word sequence, and the sentiment attribute category is predefined, and each word is labeled with the sentiment attribute and converted into a binary vector through one-hot encoding; finally, the word vector and the binary vector are spliced ​​to form the input matrix of the improved LeNet5 model.

3. The method according to claim 2, characterized in that Generating word vectors based on word sequences includes converting each word into a 300-dimensional word vector using a pre-trained Word2Vec model; The tagging of sentiment attributes for each word and converting the tagging of sentiment attributes into a binary vector through one-hot encoding comprises tagging of sentiment attributes for each word according to the predefined sentiment attribute category and converting the tagging of sentiment attributes into a binary vector through one-hot encoding; The word vector and the binary vector are concatenated to form the input matrix, and the shape of the input matrix is ​​[number of words, 300 + number of emotion attribute categories].

4. The method according to claim 1, wherein The improved LeNet5 model includes a first-layer convolutional pooling module, a second-layer convolutional pooling module, a first-layer fully connected layer, a second-layer fully connected layer and a multi-dimensional hierarchical output module connected in sequence; the first-layer convolutional pooling module includes a first convolutional layer and a maximum pooling layer; the second-layer convolutional pooling module includes a second convolutional layer and a global maximum pooling layer; wherein, the first convolutional layer, the second convolutional layer, the first-layer fully connected layer and the second-layer fully connected layer are all connected with a ReLU activation function; the multi-dimensional hierarchical output module realizes emotional intensity hierarchical output, emotional attribute classification output and intensity refinement hierarchical output.

5. The method according to claim 4, characterized in that The convolution kernel size in the first convolution layer is 5×1, and the number is 64. A number of consecutive words are extracted to form local semantic features, and a first feature map is output. The maximum pooling layer reduces the dimension of the first feature map through the maximum pooling operation and retains the key features. The convolution kernel size in the second convolution layer is 3×1, and the number is 128, which is used to extract cross-local combined features and output a second feature map; the global maximum pooling layer takes the maximum value of the second feature map through a global maximum pooling operation, compresses the sequence features into a fixed dimension, and realizes feature integration from local to global; The first fully connected layer has an input dimension of 128 and an output dimension of 256, which performs nonlinear changes on global features and improves the dimension; the second fully connected layer has an input dimension of 256 and an output dimension of 128, which compresses features and enhances generalization capabilities.

6. The method according to claim 4, characterized in that The multidimensional grading output module includes an emotion intensity grading output layer, an emotion attribute classification output layer and an intensity refinement grading output layer; the emotion intensity grading output layer outputs the probability corresponding to each emotion intensity level; the emotion attribute classification output layer outputs the probability corresponding to each emotion attribute category; the intensity refinement grading output layer outputs a continuous value score to quantify the comprehensive emotion intensity.

7. The method according to claim 6, characterized in that The emotion intensity grading output layer obtains the probability corresponding to each of the seven emotion intensity levels from -3 to +3 through the Sofetmax function, and outputs the emotion intensity level with the greatest probability; The emotion attribute classification output layer obtains the probability corresponding to each attribute category through the sigmoid function, and outputs the emotion attribute category with the highest probability; The intensity refinement hierarchical output layer outputs a continuous value score through linear activation, and the continuous value score ranges from 0 to 100.