Multi-level sentiment classification method and system for network public opinion

By using distributed message queues and multi-level sentiment classification methods, social media data is acquired and processed in real time. Streaming K-means and Q-learning algorithms are used to generate multi-level sentiment classification results, which solves the problem of insufficient accuracy in sentiment monitoring in existing technologies and achieves more efficient and accurate sentiment analysis.

CN120354265BActive Publication Date: 2026-03-27GUANGDONG JINWAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing methods for classifying online public opinion sentiment mainly rely on a single data source and a simple classification model, making it difficult to adapt to the rapid shift of online hot topics and the diverse expressions of emotion, resulting in reduced accuracy in sentiment monitoring.

Method used

Social media data is acquired in real time through a distributed message queue. The Streaming K-means algorithm is used for online clustering to generate an initial set of topics, construct a topic state space, and use the Q-learning algorithm to select an appropriate classification level. Combined with dependency path analysis and information entropy calculation, multi-level sentiment classification results are generated.

Benefits of technology

It enables real-time adaptation to changes in online public opinion, improves the accuracy and timeliness of sentiment classification, and can process multimodal data, providing strong technical support for public opinion analysis and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354265B_ABST
    Figure CN120354265B_ABST
Patent Text Reader

Abstract

The application relates to a multi-level sentiment classification method for network public opinion. The method realizes real-time acquisition and processing of social media data through a distributed message queue, generates an initial topic set by using a Streaming K-means algorithm for online clustering, constructs a topic state space by using a topic state analysis model, selects a suitable classification level by using a Q-learning algorithm, and constructs an information entropy value dataset by using dependency path analysis and information entropy value calculation. Finally, a multi-level sentiment classification result is generated by using a level weight prediction model and a sentiment classification model, which is used for network public opinion monitoring. The method can adapt to changes in network public opinion in real time, and improves the accuracy and timeliness of sentiment classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of online public opinion monitoring, and in particular to a multi-level sentiment classification method and system for online public opinion. Background Technology

[0002] Online sentiment classification technology plays a crucial role in online public opinion analysis. With the widespread adoption of social media, public sentiment and opinion have a profound impact on corporate brands, political decisions, and even social trends. Through Natural Language Processing (NLP) technology, we can extract valuable information from massive amounts of online text, gain insights into public sentiment, and provide data support for decision-makers.

[0003] Existing methods for classifying online public opinion sentiment mainly rely on single data sources and simple classification models. For example, some methods use only text data for sentiment analysis, ignoring the rich information contained in multimodal data such as images and videos. Furthermore, traditional classification models are often based on fixed label systems, making it difficult to adapt to the rapid shifts in online hot topics and the diverse expressions of sentiment. This leads to reduced accuracy in sentiment monitoring during online public opinion analysis, thus requiring improvement. Summary of the Invention

[0004] To improve the accuracy of sentiment monitoring in the process of online public opinion analysis, this application provides a multi-level sentiment classification method and system for online public opinion.

[0005] Firstly, the above-mentioned inventive objective of this application is achieved through the following technical solution:

[0006] A multi-level sentiment classification method for online public opinion, the method comprising the following steps:

[0007] Real-time data from social media platforms is captured through a distributed message queue. Non-textual noise data is filtered and cleaned. Based on a pre-set time window division mechanism, the real-time data from social media platforms corresponding to each time window is formed into a temporary corpus.

[0008] The pre-configured topic generation model uses the Streaming K-means algorithm to perform online clustering on a temporary corpus to generate an initial topic set.

[0009] The pre-set topic state analysis model is based on the analysis of the initial topic set to construct a topic state space, where the topic state space = (topic popularity Ht, sentiment dispersion Et, time span Δt)).

[0010] The pre-set hierarchical depth decision model selects an action space a e {three-level classification, four-level classification} through a Q-learning algorithm, wherein the hierarchical depth decision model is provided with an accuracy reward function for improving selection accuracy, the three-level classification structure is a three-layer logical relationship of topic, subtopic and emotion, and the four-level classification structure is a four-layer logical relationship of event, topic, subtopic and emotion;

[0011] The dependency path analysis is performed on the current hierarchical structure, the information entropy values of nodes are calculated, and the information entropy values of the nodes are recorded based on a pre-set time axis to construct an information entropy value dataset;

[0012] The pre-set hierarchical weight prediction model analyzes the information entropy value dataset based on a machine self-learning algorithm to generate prediction weight coefficients of each hierarchical level;

[0013] The pre-set sentiment classification model classifies topics based on the prediction weight coefficients of each hierarchical level to generate a multi-level sentiment classification result, and the sentiment classification result is used for network public opinion monitoring.

[0014] By adopting the above technical solutions, social media data is acquired and processed in real time through a distributed message queue, online clustering is performed by using a Streaming K-means algorithm to generate an initial topic set, a topic state space is constructed by using a topic state analysis model, a suitable classification level is selected by using a Q-learning algorithm, and an information entropy value dataset is constructed through dependency path analysis and information entropy value calculation. Finally, a multi-level sentiment classification result is generated by using a hierarchical weight prediction model and a sentiment classification model, which is used for network public opinion monitoring. This method can adapt to changes in network public opinion in real time, improve the accuracy and timeliness of sentiment classification, and provide strong technical support for public opinion analysis and management.

[0015] In a preferred example, the application can be further configured to include the following steps after the step of generating an initial topic set by using a pre-set topic generation model to perform online clustering on a temporary corpus set based on a Streaming K-means algorithm:

[0016] Dependency syntax trees are constructed for text data in the same initial topic set, and semantic role labels are extracted as first feature vectors;

[0017] Significant objects are detected by using YOLOv7 for associated image data in the same initial topic set, and HSV color space histograms are extracted as second feature vectors;

[0018] A pre-set feature fusion model calculates fusion features based on a cross-modal attention mechanism, and the fusion features are used for the topic state analysis model to analyze sentiment dispersion.

[0019] By adopting the technical solution, multi-modal sentiment analysis can be performed on network public opinion data, and multi-level sentiment classification results can be generated. This method can not only process text data, but also combine image data to provide more comprehensive and accurate sentiment analysis, thereby providing strong technical support for network public opinion monitoring.

[0020] In a preferred example, the application can be further configured to include the following steps in the step of selecting an action space a∈{three-level classification, four-level classification} by a Q-learning algorithm in a pre-set hierarchical depth decision model:

[0021] The hierarchical depth decision model extracts features from the topic state space, compares the topic heat with a pre-set topic heat standard value to generate a topic heat comparison result, and compares the sentiment dispersion with a pre-set sentiment dispersion standard value to generate a sentiment dispersion comparison result;

[0022] Based on the pre-set hierarchical classification rule, the topic heat comparison result and the sentiment dispersion comparison result are comprehensively analyzed to generate a selection result of the action space, and the selection result of the action space is used to determine the classification level.

[0023] By adopting the technical solution, based on the pre-set rule, the model can automatically determine and select the appropriate classification level, improve the decision efficiency, and the rule can be adjusted according to the actual demand to adapt to different types of topics and application scenarios.

[0024] In a preferred example, the application can be further configured to include the following steps after the step of comprehensively analyzing the topic heat comparison result and the sentiment dispersion comparison result based on the pre-set hierarchical classification rule to generate a selection result of the action space, and the selection result of the action space is used to determine the classification level:

[0025] The pre-set LDA topic analysis model collects topics from the initial topic set to generate a topic word set T={T1, T2,..., T k};

[0026] The pre-set sub-topic clustering analysis model performs sub-topic clustering on the topic word set based on the dynamic density clustering rule of the density clustering algorithm;

[0027] The pre-set BERT-CRF joint model analyzes the corresponding temporary corpus set in the sub-topic clustering to generate the sentiment polarity and intensity value corresponding to the sub-topic;

[0028] The subject word set, the sub-topic cluster, and the sentiment polarity and intensity value are associated to generate a three-level classification sentiment classification result.

[0029] By adopting the technical solution, the three-level classification sentiment classification result is generated, macro-to-micro sentiment analysis is provided, the classification is improved in detail, the subject, the sub-topic, and the sentiment analysis result are integrated, and comprehensive data support is provided for network public opinion monitoring.

[0030] In a preferred example, the application can be further configured to: based on the preset hierarchical classification rule, the topic heat comparison result and the sentiment dispersion comparison result are comprehensively analyzed to generate a selection result of an action space, the selection result of the action space is used after the classification hierarchical step, when the selection result of the action space is four-level classification, the steps include:

[0031] Based on the BERT-CRF joint model, event feature extraction is performed on the initial topic set to generate a set of keywords of a sudden event;

[0032] The preset topic association model associates the topics corresponding to the keywords of the sudden event based on a knowledge graph algorithm technology to construct an event-topic association matrix;

[0033] The preset event relationship reasoning model analyzes the event-topic association matrix based on a machine self-learning algorithm to generate a degree of implicit event association relevance, which is used to judge the relevance between two events and to predict and judge the public opinion direction of the event.

[0034] By adopting the technical solution, the implicit association between different events can be found, which provides a basis for public opinion prediction and judgment. By analyzing the relevance between events, the development direction of public opinion can be predicted in advance to assist decision-making.

[0035] In a preferred example, the application can be further configured to: after the step of the preset event relationship reasoning model analyzing the event-topic association matrix based on a machine self-learning algorithm to generate a degree of implicit event association relevance, the steps include:

[0036] Obtain the propagation node features of related events, and associate the node features with the events to construct an event-node dataset;

[0037] The preset node intervention model analyzes the event-node dataset to identify key nodes of event propagation, and the key nodes are used to improve the effectiveness of public opinion intervention.

[0038] By adopting the above technical solutions, multimodal sentiment analysis can be performed on online public opinion data, generating multi-level sentiment classification results. In particular, in the identification of key nodes in the spread of events, by constructing event-node datasets and node intervention models, the key nodes with the greatest impact on the spread of events can be accurately identified, providing a scientific basis for public opinion intervention. This method can not only process text data, but also combine image data to provide more comprehensive and accurate sentiment analysis, providing strong technical support for online public opinion monitoring.

[0039] In a preferred example, this application can be further configured as follows: after comprehensively analyzing the topic popularity comparison results and the sentiment dispersion comparison results based on the preset hierarchical classification rules to generate the action space selection result, and the action space selection result is used to determine the classification level, if the topic is detected to have cross-platform propagation characteristics, the four-level classification module is automatically activated.

[0040] If conflicting labels appear in the sentiment label set, the four-level classification will be forcibly enabled.

[0041] Secondly, the above-mentioned inventive objective of this application is achieved through the following technical solutions:

[0042] A multi-level sentiment classification device for online public opinion, the device comprising: a temporary corpus construction unit, used to capture real-time data from social media platforms through a distributed message queue, filter and clean non-textual noise data, and form a temporary corpus from the real-time data of social media platforms corresponding to each time window according to a pre-set time window division mechanism;

[0043] The initial topic set generation unit is used to generate an initial topic set by pre-setting a topic generation model that performs online clustering of a temporary corpus based on the Streaming K-means algorithm.

[0044] The topic state space construction unit is used to pre-set a topic state analysis model to construct a topic state space based on the analysis of the initial topic set, wherein the topic state space = (topic popularity Ht, sentiment dispersion Et, time span Δt)).

[0045] An action space selection unit is used to pre-set a hierarchical deep decision model to select an action space a∈{three-level classification, four-level classification} using the Q-learning algorithm. The hierarchical deep decision model is equipped with an accuracy reward function, which is used to improve selection accuracy. The three-level classification structure is a three-level logical relationship of topic, subtopic, and sentiment, and the four-level classification structure is a four-level logical relationship of event, topic, subtopic, and sentiment.

[0046] An information entropy value dataset construction unit is configured to perform dependency path analysis on the current hierarchical structure, calculate information entropy values of each node, and record the information entropy values of each node based on a preset time axis to construct an information entropy value dataset;

[0047] A prediction weight coefficient generation unit is configured to perform analysis on the information entropy value dataset based on a hierarchical weight prediction model with machine self-learning algorithm to generate prediction weight coefficients of each hierarchy;

[0048] An emotion classification generation unit is configured to perform classification on the topic based on the prediction weight coefficients of each hierarchy with an emotion classification model to generate a multi-hierarchy emotion classification result, which is used for network public opinion monitoring.

[0049] In a third aspect, the above-mentioned object of the present application is achieved by the following technical solution:

[0050] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned multi-hierarchy emotion classification method for network public opinion when executing the computer program.

[0051] In a fourth aspect, the above-mentioned object of the present application is achieved by the following technical solution:

[0052] A computer-readable storage medium stores a computer program, and the computer program implements the steps of the above-mentioned multi-hierarchy emotion classification method for network public opinion when executed by a processor.

[0053] In summary, the present application includes at least one of the following beneficial technical effects:

[0054] 1. Real-time acquisition and processing of social media data through a distributed message queue, online clustering using Streaming K-means algorithm to generate an initial topic set. A topic state space is constructed through a topic state analysis model, and a suitable classification hierarchy is selected using the Q-learning algorithm. An information entropy value dataset is constructed through dependency path analysis and information entropy calculation. Finally, a multi-hierarchy emotion classification result is generated through a hierarchical weight prediction model and an emotion classification model for network public opinion monitoring. This method can adapt to changes in network public opinion in real time, improve the accuracy and timeliness of emotion classification, and provide strong technical support for public opinion analysis and management;

[0055] 2. The method can perform multi-modal sentiment analysis on network public opinion data to generate a multi-hierarchy emotion classification result. This method not only processes text data, but also combines image data to provide more comprehensive and accurate sentiment analysis, providing strong technical support for network public opinion monitoring.

[0056] 3. Can discover the implicit association between different events, provide basis for public opinion prediction and judgment, and through analyzing the correlation between events, can predict the development direction of public opinion in advance, assist decision making;

[0057] 4. Can perform multi-modal sentiment analysis on network public opinion data, generate multi-level sentiment classification results, especially in the identification of key nodes in event propagation, by constructing event-node data set and node intervention model, can accurately identify the key nodes that have the greatest impact on event propagation, provide scientific basis for public opinion intervention, this method not only can process text data, but also can combine image data, provide more comprehensive and accurate sentiment analysis, provide strong technical support for network public opinion monitoring. BRIEF DESCRIPTION OF DRAWINGS

[0058] Figure 1 is a flowchart of a multi-level sentiment classification method for network public opinion in an embodiment of the present application;

[0059] Figure 2 is a principle block diagram of a multi-level sentiment classification system for network public opinion in an embodiment of the present application;

[0060] Figure 3 is a schematic diagram of an electronic device in an embodiment of the present application.

[0061] LIST OF DRAWINGS

[0062] 1, temporary corpus set construction unit; 2, initial topic set generation unit; 3, topic state space construction unit; 4, action space selection unit; 5, information entropy value data set construction unit; 6, prediction weight coefficient generation unit; 7, sentiment classification generation unit. DETAILED DESCRIPTION

[0063] The present application will be further described in detail below in combination with the drawings.

[0064] In an embodiment, as shown in Figure 1 , the present application discloses a multi-level sentiment classification method for network public opinion, specifically including the following steps:

[0065] S10: Capture social media platform real-time data through distributed message queue, filter and clean non-text noise data, and form a temporary corpus set according to the social media platform real-time data corresponding to each time window according to the pre-set time window division mechanism;

[0066] Specifically, in the embodiment of the present application, for step S10, for example:

[0067] Data Acquisition: Real-time data acquisition from social media platforms such as Weibo, WeChat, and TikTok using distributed message queues like Apache Kafka. These data include user-posted texts, images, videos, etc.

[0068] Data Preprocessing: Cleaning and denoising the acquired data, removing irrelevant non-text data (such as noise in images and videos) and repetitive content.

[0069] Time Window Division: According to the pre-set time window (such as every 10 minutes as a window), divide the real-time data into multiple temporary corpora. For example, within the 10:00-10:10 time window, all relevant data collected constitute a temporary corpus.

[0070] According to step S10, real-time social media data can be acquired and processed, ensuring the timeliness of the analysis results. Through cleaning and denoising, data quality is improved, providing a reliable data foundation for subsequent analysis. Dividing data by time window facilitates subsequent clustering and analysis.

[0071] S20: Pre-set topic generation model based on Streaming K-means algorithm for online clustering of temporary corpora, generating an initial topic set;

[0072] Specifically, the Streaming K-means algorithm is used to perform online clustering on the temporary corpus in each time window. This algorithm can dynamically adjust the clustering center to adapt to real-time data changes. It extracts keywords, topic words, and other features from the text, combines user information and posting time, and forms a comprehensive feature vector. Through the clustering result, new clusters are identified, which represent emerging topics. For example, if the clustering cluster contains a large number of discussions about "vaccine side effects", an initial topic "vaccine side effect concern" is generated.

[0073] The Streaming K-means algorithm can process data streams in real time, dynamically adjust clustering results, adapt to rapid changes in network public opinion, automatically discover emerging topics, and provide a basis for subsequent sentiment analysis. Online clustering algorithms can efficiently run on large-scale data, meeting the needs of real-time analysis.

[0074] S30: Pre-set topic state analysis model based on analysis of the initial topic set to construct a topic state space, where topic state space = (topic heat Ht, sentiment dispersion Et, time span Δt).

[0075] Specifically,

[0076] The topic heat Ht is obtained by calculating the frequency of occurrence of each topic in a specific time window and the user engagement (such as the number of likes and comments). For example, the topic "vaccine side effect concern" appeared 1000 times in the time window of 10:00-10:10, and the user engagement was 500 times, and the Ht was calculated as 0.8. The sentiment distribution Et of the text under each topic is calculated by performing sentiment analysis. For example, the sentiment distribution of the topic "vaccine side effect concern" is: positive 20%, neutral 30%, negative 50%, and Et is calculated as 0.6. The duration of the topic Δt is recorded, for example, the topic "vaccine side effect concern" appeared from 10:00 and lasted to 10:30, and Δt was 30 minutes.

[0077] By constructing a topic state space, the heat, sentiment distribution and time span of the topic are comprehensively described, providing multi-dimensional data support for subsequent analysis, accurately capturing the sentiment distribution and heat change of the topic, and improving the accuracy of the analysis. Real-time update of the topic state space to adapt to the dynamic changes of the topic.

[0078] S40: The pre-set hierarchical depth decision model selects an action space a∈{three-level classification, four-level classification} through a Q-learning algorithm, wherein the hierarchical depth decision model is provided with an accuracy reward function for improving the selection accuracy;

[0079] In the present application, the three-level classification structure is a three-layer logical relationship of topic, sub-topic and sentiment, and the four-level classification structure is a four-layer logical relationship of event, topic, sub-topic and sentiment;

[0080] Specifically, the hierarchical depth decision model is trained using the Q-learning algorithm. The model selects an action space a∈{three-level classification, four-level classification} according to the current topic state (such as heat, sentiment dispersion, and time span), and defines a reward function. When the classification level selected by the model matches the complexity of the actual data, a positive reward is given, otherwise a negative reward is given. For example, if a sudden public opinion event (such as "privacy leak") needs more detailed classification, the model selects four-level classification and obtains a positive reward. For a regular topic (such as "general discussion in daily life"), the model selects three-level classification (topic→sub-topic→emotion). For a sudden public opinion (such as "major social event"), the model selects four-level classification (event→topic→sub-topic→emotion).

[0081] The model can automatically select the appropriate classification level according to the complexity and importance of the topic, improve the flexibility and accuracy of the classification, and continuously optimize the selection strategy of the model through the Q-learning algorithm and the accuracy reward function, improve the accuracy of the classification, and adapt to different types of public opinion events, from regular topics to sudden public opinions, and provide appropriate classification structure.

[0082] S50: performing dependency path analysis on the current hierarchy, calculating information entropy values of each node, and recording the information entropy values of each node based on a pre-set timeline to construct an information entropy value dataset;

[0083] Dependency path analysis is performed on the current hierarchy (such as three-level classification or four-level classification) to determine the dependency relationship between nodes. For example, in four-level classification, the event "privacy leakage" depends on the topic "data security", the topic "data security" depends on the sub-topic "user privacy", and the sub-topic "user privacy" depends on the sentiment "concern". The information entropy value of each node is calculated to reflect the uncertainty of the node. For example, for the node "privacy leakage", the probability distribution of its occurrence in all related discussions is calculated to obtain an information entropy value of 0.5. Based on a pre-set timeline (such as recording once every 10 minutes), the information entropy values of each node are recorded to construct an information entropy value dataset.

[0084] The uncertainty of each node is quantified by the information entropy value, providing data support for subsequent weight prediction, and the changes in information entropy value are recorded in real time to reflect the dynamic characteristics of the topic.

[0085] S60: The pre-set hierarchical weight prediction model analyzes the information entropy value dataset based on a machine self-learning algorithm to generate predicted weight coefficients for each hierarchy;

[0086] Specifically, a machine self-learning algorithm (such as neural network, random forest, etc.) is used to analyze the information entropy value dataset. The model predicts the weight coefficient of each hierarchy based on the trend of the information entropy value. For example, for the node "privacy leakage", the weight coefficient in the event hierarchy is predicted to be 0.7, the weight coefficient in the topic hierarchy is 0.5, the weight coefficient in the sub-topic hierarchy is 0.3, and the weight coefficient in the sentiment hierarchy is 0.2. The predicted weight coefficients are applied to subsequent sentiment classification to improve the accuracy of classification.

[0087] The weight coefficients are dynamically predicted based on the information entropy value, reflecting the importance of each hierarchical node. Through the adjustment of weight coefficients, the accuracy of sentiment classification is improved. The model can continuously learn and optimize weight prediction to adapt to changes in data.

[0088] S70: The pre-set sentiment classification model classifies the topic based on the predicted weight coefficients of each hierarchy to generate multi-level sentiment classification results, which are used for network public opinion monitoring;

[0089] Specifically, a pre-trained sentiment classification model (such as BERT) is used in combination with the predicted weight coefficients to perform sentiment classification on each level of the topic, for example, for a four-level classification structure "event → topic → subtopic → sentiment", the model first classifies the event "privacy leak", then classifies the topic "data security", then classifies the subtopic "user privacy", and finally classifies the sentiment "concern", and the generated multi-level sentiment classification results are used for network public opinion monitoring to help relevant departments understand the public's emotional tendencies and concerns in a timely manner.

[0090] The method provides multi-level sentiment classification from macro to micro, comprehensively reflects the structure and sentiment distribution of network public opinion, accurately locates the key nodes and emotional tendencies of public opinion through multi-level classification, improves the efficiency and effectiveness of monitoring, and provides scientific basis for public opinion management, brand marketing, policy making, etc., and assists decision making.

[0091] In summary, for steps S10-S70: real-time acquisition and processing of social media data through a distributed message queue, online clustering using the Streaming K-means algorithm, and generation of an initial topic set. A topic state analysis model is used to construct a topic state space, a Q-learning algorithm is used to select the appropriate classification level, and a dependency path analysis and information entropy value calculation are used to construct an information entropy value dataset. Finally, a multi-level sentiment classification result is generated through a hierarchical weight prediction model and a sentiment classification model for network public opinion monitoring. This method can adapt to changes in network public opinion in real time, improve the accuracy and timeliness of sentiment classification, and provide strong technical support for public opinion analysis and management.

[0092] After the step of the pre-set topic generation model performing online clustering on the temporary corpus set based on the Streaming K-means algorithm to generate an initial topic set, the following steps are included:

[0093] S21: Constructing a dependency syntax tree for text data within the same initial topic set and extracting semantic role labels as the first feature vector;

[0094] Specifically, assume we have an initial topic set containing the following text data:

[0095] "Companies should strengthen data security protection to prevent privacy leaks."

[0096] "The introduction of data security regulations will help reduce privacy leak incidents."

[0097] "Users express concern about privacy leaks."

[0098] Semantic role labels such as subject (nsubj), object (dobj), and adverbial (advmod) are extracted from the dependency syntax tree to form the first feature vector. For example, for the above text, the first feature vector can be represented as:

[0099] [Company, strengthen data security protection, prevent privacy leakage]

[0100] Through the dependency syntax tree, the semantic structure of the text can be deeply understood, and the key semantic roles can be extracted to improve the accuracy of sentiment classification. Semantic role labels as feature vectors can provide rich semantic information and enhance the expression ability and classification effect of the model.

[0101] S22: Detect significant objects in the associated image data within the same initial topic set using YOLOv7, and extract HSV color space histograms as the second feature vector;

[0102] Specifically, in the same initial topic set, there are associated image data, such as user-posted pictures. We use the YOLOv7 detection algorithm to detect significant objects in these images. For example, we detect significant objects such as "group meeting", "crowd", and "employee" in the image.

[0103] Then, extract the HSV color space histogram for the detected significant object region. For example, use the OpenCV library to calculate the HSV histogram to get the distribution of each color channel. These histogram data are used as the second feature vector.

[0104] S23: The pre-set feature fusion model calculates the fusion features based on the cross-modal attention mechanism, which are used by the topic state analysis model to analyze the sentiment dispersion;

[0105] Specifically, combining image data, through significant object detection and color space analysis, the feature vector is enriched, and the comprehensiveness and accuracy of sentiment classification are improved. By detecting significant objects in images, we can better understand the user's emotional expression, especially in cases where text information is insufficient or unclear.

[0106] Assuming we have extracted the first feature vector (semantic role labels) from the text data and the second feature vector (HSV color space histogram) from the image data. The feature fusion model based on the cross-modal attention mechanism fuses these two feature vectors.

[0107] The cross-modal attention mechanism dynamically adjusts the contribution of text and image features by calculating the attention weight between them. For example, if the text feature is more important in a certain topic, the model will give it more weight; conversely, the image feature will be given more weight. The fused feature vector can be represented as:

[0108] Fusion feature = a * first feature vector + β * second feature vector

[0109] Wherein, a and β are weight coefficients calculated by attention mechanism.

[0110] The fused feature vector is used for topic state analysis model to analyze the sentiment dispersion. For example, by calculating the sentiment distribution of the fused feature, the sentiment dispersion Et is obtained.

[0111] In summary, steps S21-S23 can be used to perform multi-modal sentiment analysis on network public opinion data and generate multi-level sentiment classification results. This method not only can process text data, but also can combine image data to provide more comprehensive and accurate sentiment analysis, and provide strong technical support for network public opinion monitoring.

[0112] In S40: the pre-set hierarchical depth decision model selects the action space a∈{three-level classification, four-level classification} by Q-learning algorithm. The steps include:

[0113] S41: The hierarchical depth decision model extracts features from the topic state space, compares the topic heat with the pre-set topic heat standard value to generate a topic heat comparison result, and compares the sentiment dispersion with the pre-set sentiment dispersion standard value to generate a sentiment dispersion comparison result.

[0114] Specifically, assume that the pre-set topic heat standard value is 0.7. For a certain topic, the topic heat Ht is calculated as 0.8, and the Ht is compared with the standard value to generate a topic heat comparison result of "higher than the standard value".

[0115] Assume that the pre-set sentiment dispersion standard value is 0.5. For the same topic, the sentiment dispersion Et is calculated as 0.6. Compare Et with the standard value to generate a sentiment dispersion comparison result of "higher than the standard value".

[0116] S42: Based on the pre-set hierarchical classification rule, the topic heat comparison result and the sentiment dispersion comparison result are analyzed to generate the selection result of the action space, which is used to determine the level of classification.

[0117] Specifically, the hierarchical classification rule is as follows:

[0118] If the topic heat is higher than the standard value and the sentiment dispersion is higher than the standard value, select four-level classification.

[0119] Otherwise, select three-level classification.

[0120] For the topic in this application, since the topic heat and the sentiment dispersion are both higher than the standard value, according to the rule, the selection result of the action space is four-level classification.

[0121] For steps S41-S42, based on the preset rule, the model can automatically judge and select the appropriate classification level, improve the decision efficiency, and the rule can be adjusted according to the actual demand, adapt to different types of topics and application scenarios.

[0122] In S42: Based on the preset hierarchical classification rule, the topic heat comparison result and the sentiment dispersion comparison result are comprehensively analyzed to generate the selection result of the action space, and the selection result of the action space is used to judge the classification level after this step. When the selection result of the action space is three-level classification, the following steps are included:

[0123] S421: The preset LDA topic analysis model collects topics from the initial topic set to generate a topic word set T={T1, T2,..., T k};

[0124] Specifically, for example: Suppose we have an initial topic set containing the following text data:

[0125] "Companies should strengthen data security protection to prevent privacy leaks."

[0126] "The introduction of data security regulations will help reduce privacy leak incidents."

[0127] "Users express concern about privacy leaks."

[0128] Use the LDA topic analysis model to collect topics from these texts. First, preprocess the text, including word segmentation, stop word removal, etc. Then, convert the processed text into a bag-of-words model. Next, run the LDA model, assuming we set the number of topics to 3, and after model training, we get the following topic word set:

[0129] Topic 1: Data security, protection, privacy leaks;

[0130] Topic 2: Rules, introduction, reduce, incidents;

[0131] Topic 3: Users, concerns, issues.

[0132] The LDA model can automatically discover hidden topics in the text, reducing a large amount of text data to several topics, improving analysis efficiency, and the generated topic word set can clearly reflect the core content of each topic, providing a basis for subsequent sub-topic clustering and sentiment analysis.

[0133] S422: The pre-set sub-topic clustering analysis model performs sub-topic clustering on the set of topic words based on the dynamic density clustering rule of the density clustering algorithm;

[0134] For the generated set of topic words, sub-topic clustering is performed using a density clustering algorithm such as DBSCAN. Assume that the parameter settings of the density clustering algorithm are: eps = 0.5, min_samples = 2. Clustering the set of topic words results in the following sub-topic clustering results:

[0135] Sub-topic 1: data security, protection, privacy leakage;

[0136] Sub-topic 2: regulations, introduction, reduction, events;

[0137] Sub-topic 3: users, concerns, problems.

[0138] The density clustering algorithm can automatically divide sub-topics according to the density distribution of the data, adapt to different shapes and density of data distribution, and the dynamic density clustering rule can adjust the clustering results according to the real-time changes of the data, improving the adaptability and accuracy of the model.

[0139] S423: The pre-set BERT-CRF joint model analyzes the corresponding temporary corpus set in the sub-topic clustering to generate the sentiment polarity and intensity value corresponding to the sub-topic;

[0140] Specifically, for the above sub-topic clustering results, the BERT-CRF joint model is used to perform sentiment analysis on the corresponding temporary corpus set. For example, for sub-topic 1 (data security, protection, privacy leakage), the sentiment polarity and intensity value obtained by model analysis are as follows:

[0141] Text 1: "The company should strengthen data security protection to prevent privacy leakage." Sentiment polarity: positive, intensity value: 0.8;

[0142] Text 2: "The introduction of data security rules will help reduce privacy leakage incidents." Sentiment polarity: positive, intensity value: 0.7;

[0143] Text 3: "Users express concern about privacy leakage issues." Sentiment polarity: negative, intensity value: 0.6.

[0144] The BERT-CRF joint model can accurately identify the sentiment polarity and intensity in the text, providing detailed sentiment analysis results, generating the corresponding sentiment polarity and intensity value for each sub-topic, and helping to better understand the sentiment distribution under different sub-topics.

[0145] S424: The set of topic words, the sub-topic clustering, and the sentiment polarity and intensity value are associated to generate a three-level classification sentiment classification result;

[0146] Specifically, the above-mentioned subject word set, sub-subject cluster and sentiment polarity and intensity value are associated to generate a three-level classification sentiment classification result as follows:

[0147] Theme 1: data security, protection, privacy leakage;

[0148] Sub-theme 1: data security, protection, privacy leakage;

[0149] Sentiment polarity: positive, intensity value: 0.8;

[0150] Sentiment polarity: positive, intensity value: 0.7;

[0151] Sentiment polarity: negative, intensity value: 0.6;

[0152] Theme 2: regulations, introduction, reduction, events;

[0153] Sub-theme 2: regulations, introduction, reduction, events;

[0154] Sentiment polarity: positive, intensity value: 0.7;

[0155] Theme 3: users, concerns, problems;

[0156] Sub-theme 3: users, concerns, problems;

[0157] Sentiment polarity: negative, intensity value: 0.6.

[0158] The three-level classification sentiment classification result is generated to provide macro-to-micro sentiment analysis and improve the detailed degree of classification. The theme, sub-theme and sentiment analysis result are integrated to provide comprehensive data support for network public opinion monitoring.

[0159] It should be noted that if the theme is detected to have a cross-platform transmission feature, the four-level classification module is automatically activated;

[0160] If there is a conflict label in the sentiment label set, the four-level classification is forcibly enabled.

[0161] When the selection result of the action space is four-level classification, the following steps are included:

[0162] S425: performing event feature extraction on the initial topic set based on the BERT-CRF joint model to generate a sudden event keyword set;

[0163] Specifically, the keywords of the sudden event can be automatically identified from a large amount of text to quickly respond to public opinion changes, and the generated sudden event keyword set provides a basis for subsequent event analysis and association.

[0164] S426: The pre-set topic association model associates the topics corresponding to the emergency keywords based on knowledge graph algorithm technology to construct an event-topic association matrix.

[0165] For the above-mentioned set of emergency keywords, an event-topic association matrix is constructed using knowledge graph algorithm technology. For example, the constructed association matrix is as follows:

[0166] Privacy leakage → Topic 1 (data security, protection, privacy leakage);

[0167] Data security regulations → Topic 2 (regulations, introduction, reduction, events).

[0168] Beneficial effects: Through the knowledge graph algorithm technology, the association relationship between the emergency and the topic can be clearly shown,

[0169] Structured representation: The event-topic association matrix provides structured data support for subsequent event relationship reasoning.

[0170] S427: The pre-set event relationship reasoning model analyzes the event-topic association matrix based on machine self-learning algorithm to generate implicit event association correlation degree, which is used to judge the relevance between two events and is used for subsequent prediction and judgment of the public opinion direction of the event;

[0171] Specifically, the implicit association between different events can be found, which provides a basis for public opinion prediction and judgment. By analyzing the relevance between events, the development direction of public opinion can be predicted in advance to assist decision-making.

[0172] In summary, the present application can perform multi-modal sentiment analysis on network public opinion data and generate multi-level sentiment classification results. This method not only can process text data, but also can combine image data to provide more comprehensive and accurate sentiment analysis, providing strong technical support for network public opinion monitoring.

[0173] After the step of S427: The pre-set event relationship reasoning model analyzes the event-topic association matrix based on machine self-learning algorithm to generate implicit event association correlation degree, the following steps are included:

[0174] S4271: Obtain the propagation node features of related events and associate the node features with the events to construct an event-node data set;

[0175] Specifically, the node features include text content, publishing platform, publishing time, user interaction, etc. These node features are associated with the events to construct an event-node data set.

[0176] S4272: The pre-set node intervention model analyzes the event-node dataset to identify key nodes of event propagation, which are used to improve the effectiveness of public opinion intervention;

[0177] Specifically, the event-node dataset is analyzed using a pre-set node intervention model. The model identifies key nodes based on the following steps:

[0178] Node feature extraction: Extract the features of each node, such as the degree (number of connections), betweenness (number of shortest paths), PageRank value, etc.

[0179] Node importance evaluation: According to the extracted features, evaluate the importance of each node. For example, node A has a degree of 100, betweenness of 50, and PageRank value of 0.8; node B has a degree of 80, betweenness of 30, and PageRank value of 0.6; node C has a degree of 120, betweenness of 60, and PageRank value of 0.7.

[0180] Key node identification: According to the evaluation results, identify the key nodes that have the greatest impact on event propagation. For example, node C has the highest degree and betweenness, and a relatively high PageRank value, so it is identified as a key node.

[0181] Beneficial effects: By identifying key nodes, public opinion intervention can be accurately performed, improving the effectiveness of intervention, concentrating resources on key nodes to avoid waste of resources, improving intervention efficiency, and the node intervention model can dynamically adjust the identification of key nodes according to the real-time propagation of events, adapting to changes in public opinion.

[0182] In summary, the network public opinion data can be subjected to multi-modal sentiment analysis to generate multi-level sentiment classification results. In particular, in the identification of key nodes of event propagation, by constructing an event-node dataset and a node intervention model, the key nodes that have the greatest impact on event propagation can be accurately identified, providing a scientific basis for public opinion intervention. This method not only processes text data, but also combines image data to provide more comprehensive and accurate sentiment analysis, providing strong technical support for network public opinion monitoring.

[0183] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0184] In an embodiment, a multi-level sentiment classification device for network public opinion is provided, which corresponds to the multi-level sentiment classification method for network public opinion described above. As Figure 2As shown, the multi-level sentiment classification device for network public opinion includes a temporary corpus set construction unit 1 for capturing social media platform real-time data through a distributed message queue, filtering and cleaning non-text noise data, and forming a temporary corpus set according to a pre-set time window division mechanism corresponding to the social media platform real-time data of each time window;

[0185] An initial topic set generation unit 2 is configured to pre-set a topic generation model to perform online clustering on the temporary corpus set based on a Streaming K-means algorithm to generate an initial topic set;

[0186] A topic state space construction unit 3 is configured to pre-set a topic state analysis model to analyze the initial topic set to construct a topic state space, wherein the topic state space = (topic heat Ht, sentiment dispersion Et, time span Δt).

[0187] An action space selection unit 4 is configured to pre-set a hierarchical depth decision model to select an action space a {three-level classification, four-level classification} through a Q-learning algorithm, wherein the hierarchical depth decision model is provided with an accuracy reward function for improving selection accuracy, the three-level classification structure is a three-layer logical relationship of theme, sub-theme, and sentiment, and the four-level classification structure is a four-layer logical relationship of event, theme, sub-theme, and sentiment.

[0188] An information entropy value data set construction unit 5 is configured to perform dependency path analysis on the current hierarchical structure, calculate the information entropy value of each node, and record the information entropy value of each node based on a pre-set time axis to construct an information entropy value data set.

[0189] A prediction weight coefficient generation unit 6 is configured to pre-set a hierarchical weight prediction model to analyze the information entropy value data set based on a machine self-learning algorithm to generate a prediction weight coefficient of each level.

[0190] A sentiment classification generation unit 7 is configured to pre-set a sentiment classification model to classify topics based on the prediction weight coefficient of each level to generate a multi-level sentiment classification result, which is used for network public opinion monitoring.

[0191] The specific limitations of the multi-level sentiment classification device for network public opinion can be referred to the limitations of the multi-level sentiment classification method for network public opinion described above, which will not be repeated here. The above-mentioned modules of the multi-level sentiment classification device for network public opinion can be realized by software, hardware, and combinations thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in hardware form, or can be stored in the memory in the electronic device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0192] In one embodiment, an electronic device, which can be a server, is provided, and an internal structure diagram of the electronic device can be as shown in Figure 3 The electronic device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the electronic device is configured to store the database. The network interface of the electronic device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a multi-level sentiment classification method for network public opinion.

[0193] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:

[0194] Real-time data of a social media platform is captured through a distributed message queue, non-text noise data is filtered and cleaned, and each time window corresponding to the real-time data of the social media platform is formed into a temporary corpus set according to a pre-set time window division mechanism;

[0195] A pre-set topic generation model performs online clustering on the temporary corpus set based on a Streaming K-means algorithm to generate an initial topic set;

[0196] A pre-set topic state analysis model analyzes the initial topic set to construct a topic state space, where the topic state space = (topic heat Ht, sentiment dispersion Et, time span Δt);

[0197] A pre-set hierarchical depth decision model selects an action space a ∈ {three-level classification, four-level classification} through a Q-learning algorithm, wherein the hierarchical depth decision model is provided with an accuracy reward function for improving selection accuracy, the three-level classification structure is a three-layer logical relationship of theme, sub-theme and emotion, and the four-level classification structure is a four-layer logical relationship of event, theme, sub-theme and emotion;

[0198] Dependency path analysis is performed on the current hierarchical structure, information entropy values of each node are calculated, and the information entropy values of each node are recorded based on a pre-set time axis to construct an information entropy value data set;

[0199] The pre-set hierarchical weight prediction model analyzes the information entropy value dataset based on a machine self-learning algorithm to generate prediction weight coefficients of each hierarchy;

[0200] The pre-set sentiment classification model classifies topics based on the prediction weight coefficients of each hierarchy to generate a multi-hierarchy sentiment classification result, which is used for network public opinion monitoring.

[0201] In one embodiment, a computer readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the following steps:

[0202] Real-time data of a social media platform is captured through a distributed message queue, non-text noise data is filtered and cleaned, and each time window corresponding to the real-time data of the social media platform is formed into a temporary corpus set according to a pre-set time window division mechanism;

[0203] A pre-set topic generation model generates an initial topic set based on an online clustering of the temporary corpus set by a Streaming K-means algorithm;

[0204] A pre-set topic state analysis model analyzes the initial topic set to construct a topic state space, where the topic state space = (topic heat Ht, sentiment dispersion Et, time span Δt);

[0205] A pre-set hierarchical depth decision model selects an action space a ∈ {three-level classification, four-level classification} through a Q-learning algorithm, wherein the hierarchical depth decision model is provided with an accuracy reward function for improving selection accuracy, the three-level classification structure is a three-layer logical relationship of theme, sub-theme, and sentiment, and the four-level classification structure is a four-layer logical relationship of event, theme, sub-theme, and sentiment;

[0206] Dependence path analysis is performed on the current hierarchy structure, information entropy values of each node are calculated, and the information entropy values of each node are recorded based on a pre-set time axis to construct an information entropy value dataset;

[0207] A pre-set hierarchical weight prediction model analyzes the information entropy value dataset based on a machine self-learning algorithm to generate prediction weight coefficients of each hierarchy;

[0208] A pre-set sentiment classification model classifies topics based on the prediction weight coefficients of each hierarchy to generate a multi-hierarchy sentiment classification result, which is used for network public opinion monitoring.

[0209] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0210] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified. In actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions.

[0211] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features. Such modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A multi-level sentiment classification method for online public opinion, characterized in that, The method includes the following steps: capturing real-time data from social media platforms through a distributed message queue, filtering and cleaning non-textual noise data, and forming a temporary corpus of real-time data from social media platforms corresponding to each time window according to a pre-set time window division mechanism. The pre-configured topic generation model uses the Streaming K-means algorithm to perform online clustering on a temporary corpus to generate an initial topic set. The pre-set topic state analysis model is based on the analysis of the initial topic set to construct a topic state space, where the topic state space = (topic popularity Ht, sentiment dispersion Et, time span Δt)). The pre-set hierarchical deep decision model selects the action space a∈{tertiary classification, quaternary classification} through the Q-learning algorithm. The hierarchical deep decision model is equipped with an accuracy reward function, which is used to improve the selection accuracy. The tertiary classification structure is a three-level logical relationship of topic, subtopic, and sentiment, and the quaternary classification structure is a four-level logical relationship of event, topic, subtopic, and sentiment. Dependency path analysis is performed on the current hierarchical structure to calculate the information entropy value of each node, and the information entropy value of each node is recorded based on a preset time axis to construct an information entropy value dataset. The pre-set hierarchical weight prediction model analyzes the information entropy value dataset based on a machine self-learning algorithm to generate prediction weight coefficients for each level. A pre-set sentiment classification model classifies topics based on prediction weight coefficients at each level to generate multi-level sentiment classification results, which are used for online public opinion monitoring. Specifically, after the pre-set topic generation model performs online clustering of the temporary corpus based on the Streaming K-means algorithm to generate the initial topic set, the following steps are included: A dependency syntactic tree is constructed for text data within the same initial topic set, and semantic role labels are extracted as the first feature vector. YOLOv7 was used to detect salient objects in the associated image data within the same initial topic set, and the HSV color space histogram was extracted as the second feature vector. The pre-set feature fusion model calculates fused features based on a cross-modal attention mechanism, and the fused features are used by the topic state analysis model to analyze sentiment dispersion.

2. The multi-level sentiment classification method for online public opinion according to claim 1, characterized in that, In the step of selecting the action space a∈{third-level classification, fourth-level classification} using the Q-learning algorithm in the pre-set hierarchical deep decision model, the following steps are included: The hierarchical deep decision model extracts features from the topic state space, compares the topic popularity with a preset topic popularity standard value to generate a topic popularity comparison result, and compares the sentiment dispersion with a preset sentiment dispersion standard value to generate a sentiment dispersion comparison result. The topic popularity comparison results and the sentiment dispersion comparison results are comprehensively analyzed based on the pre-set hierarchical classification rules to generate the action space selection results, which are used to determine the classification level.

3. The multi-level sentiment classification method for online public opinion according to claim 2, characterized in that, After comprehensively analyzing the topic popularity comparison results and the sentiment dispersion comparison results based on pre-set hierarchical classification rules to generate the action space selection result, and the action space selection result is used to determine the classification level, when the action space selection result is a three-level classification, the following steps are included: A pre-configured LDA topic analysis model performs topic collection on the initial topic set to generate a topic keyword set T={ ,..., }; The pre-defined subtopic clustering analysis model performs subtopic clustering on the topic word set based on the dynamic density clustering rules of the density clustering algorithm; The pre-configured BERT-CRF joint model analyzes the temporary corpus corresponding to the subtopic clusters to generate the sentiment polarity and intensity values ​​corresponding to the subtopics; The topic word set, the subtopic clusters, and the sentiment polarity and intensity values ​​are correlated to generate a three-level sentiment classification result.

4. The multi-level sentiment classification method for online public opinion according to claim 3, characterized in that, After comprehensively analyzing the topic popularity comparison results and the sentiment dispersion comparison results based on pre-set hierarchical classification rules to generate the action space selection result, and the action space selection result is used to determine the classification level, when the action space selection result is a four-level classification, the following steps are included: Based on the BERT-CRF joint model, event features are extracted from the initial topic set to generate a set of keywords for sudden events; The pre-set topic association model uses knowledge graph algorithm technology to associate topics corresponding to the keywords of the sudden event in order to construct an event-topic association matrix; The pre-set event relationship reasoning model analyzes the event-topic association matrix based on a machine self-learning algorithm to generate a latent event correlation degree. This latent event correlation degree is used to determine the correlation between two events, and is used to predict and judge the public opinion direction of the events in the future.

5. A multi-level sentiment classification method for online public opinion according to claim 4, characterized in that, After the step of analyzing the event-topic association matrix based on a machine learning algorithm using a pre-set event relationship reasoning model to generate the degree of implicit event association relevance, the following steps are included: Obtain the propagation node features of relevant events, and associate the node features with the events to construct an event-node dataset; A pre-defined node intervention model analyzes the event-node dataset to identify key nodes in the spread of the event, which are used to improve the effectiveness of public opinion intervention.

6. A multi-level sentiment classification method for online public opinion according to claim 5, characterized in that, After comprehensively analyzing the topic popularity comparison results and the sentiment dispersion comparison results based on the preset hierarchical classification rules to generate the action space selection result, and the action space selection result is used to determine the classification level, the four-level classification module is automatically activated if the topic is detected to have cross-platform propagation characteristics. If conflicting labels appear in the sentiment label set, the four-level classification will be forcibly enabled.

7. A multi-level sentiment classification device for online public opinion, applied to the multi-level sentiment classification method for online public opinion as described in any one of claims 1-6, characterized in that, The device includes: The temporary corpus construction unit (1) is used to capture real-time data from social media platforms through a distributed message queue, filter and clean non-textual noise data, and form a temporary corpus from the real-time data of social media platforms corresponding to each time window according to a pre-set time window division mechanism. The initial topic set generation unit (2) is used to generate an initial topic set by pre-setting a topic generation model to perform online clustering of the temporary corpus based on the Streaming K-means algorithm. Topic state space construction unit (3) is used to pre-set a topic state analysis model to construct a topic state space based on the analysis of the initial topic set, wherein the topic state space = (topic popularity Ht, sentiment dispersion Et, time span Δt)). Action space selection unit (4) is used to pre-set a hierarchical deep decision model to select action space a∈{three-level classification, four-level classification} through Q-learning algorithm, wherein the hierarchical deep decision model is set with an accuracy reward function, the accuracy reward function is used to improve selection accuracy, the three-level classification structure is a three-level logical relationship of topic, subtopic, and sentiment, and the four-level classification structure is a four-level logical relationship of event, topic, subtopic, and sentiment; Information entropy value dataset construction unit (5) is used to perform dependency path analysis on the current hierarchical structure, calculate the information entropy value of each node, and record the information entropy value of each node based on a preset time axis to construct an information entropy value dataset. The prediction weight coefficient generation unit (6) is used to generate prediction weight coefficients for each level by analyzing the information entropy value dataset based on the machine self-learning algorithm of the pre-set hierarchical weight prediction model. The sentiment classification generation unit (7) is used to classify topics based on the prediction weight coefficients of each level by a pre-set sentiment classification model in order to generate multi-level sentiment classification results, which are used for online public opinion monitoring.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of a multi-level sentiment classification method for online public opinion as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of a multi-level sentiment classification method for online public opinion as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Coarse-grained emotion analysis method based on hierarchical BERT neural network

    CN110147452A

  • Automatic generation of statement-response sets from conversational text using natural language processing

    US20200279075A1