Method for identifying and predicting emotional tendency based on public opinion atlas

Through deep learning model and graph database technology, a public opinion matter map is constructed, combined with TextCNN and Graph2Seq-Attention framework, it can identify and predict the dynamic association and emotional evolution of network public opinion events, and solve the problem that existing technology is difficult to capture the association and emotional evolution between public opinion events. The problem has achieved the efficiency and accuracy of sentiment analysis and provided a full-process automation tool for public opinion management.

CN118917316APending Publication Date: 2024-11-08NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410891902.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately identify and predict the dynamic relationships and emotional evolution process between online public opinion events, and cannot fully reflect the complexity and dynamic nature of public emotions, and lacks the full view of the public opinion system.

Method used

The event extraction technology and relationship detection model based on deep learning model are adopted, combined with Neo4j and Gephi graph databases to realize the visualization of the factual map, and the network hotspot event conduction map is constructed through the TextCNN model and the Graph2Seq-Attention framework, and the decision tree is used to reveal the keys that affect emotional tendencies. Event sequences and simulate public opinion evolution paths through multi-agent reinforcement learning.

Benefits of technology

It has achieved an in-depth understanding of the internal logic and evolutionary laws of online public opinion events, improved the efficiency and accuracy of sentiment analysis, provided a powerful tool for public opinion management, and changed passive monitoring to active intervention plan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917316A_ABST
    Figure CN118917316A_ABST
Patent Text Reader

Abstract

The invention discloses an emotional tendency recognition and prediction method based on a public opinion atlas. The method comprises the following steps: firstly, applying an event extraction technology and a relationship detection model based on a deep learning model; secondly, by means of a Neo4j graph database and a Gephi graph database, visualization of an abstract layer and an instance layer affair graph is achieved; understanding of a network public opinion evolution mechanism is deepened through the event atlas, and the internal logic and evolution law of network public opinion events are revealed; through fusion of a TextCNN model and a Graph2Seq-Attention deep learning framework, a network hotspot event conduction map is constructed, and public emotional tendency evolution is associated; a decision tree is used for revealing a key event sequence influencing the emotional tendency, and a feasible strategy is provided for converting public opinion emotions; a multi-agent reinforcement learning public opinion evolution path optimization algorithm simulates behaviors and interaction of a multivariate subject in a complex environment, and converts passive public opinion monitoring into an active cognitive intervention scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of deep learning technology, and specifically relates to a method for identifying and predicting sentiment tendencies based on a public opinion graph. Background Art

[0002] With the rapid development of mobile Internet, social media has become the main platform for the public to share opinions and express emotions. However, due to the openness and rapidity of Internet communication, online public opinion often becomes alienated. Netizens' opinions and emotions will link seemingly unrelated events, resulting in unexpected evolution paths and uncertainties, and even triggering public opinion crises. In major events and hot issues, the spread of online public opinion brings risks and challenges to social stability that cannot be ignored. Monitoring and guiding the evolution of online public opinion has become an arduous task, especially accurately identifying the changes in the transmission path of public opinion and the public's emotional tendencies, which is of great significance for governments and enterprises to respond to the development trend of public opinion.

[0003] Existing online public opinion research often uses static analysis methods, such as keyword recognition, text clustering, and topic modeling. Although they can identify hot topics, they are difficult to capture the dynamic relationship between public opinion events and the emotional evolution process. Most studies focus on exploring online public opinion from a single dimension, lack an in-depth understanding of the formation mechanism of public sentiment, and cannot fully reflect its complexity and dynamics. Although complex networks, support vector machines, and other artificial intelligence methods can better predict the evolution of online public opinion, it is difficult to intuitively present the overall picture of the public opinion system, and often ignores the logical relationship and chronological order between events. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, the present invention provides a method for identifying and predicting sentiment tendencies based on a public opinion event graph. First, event extraction technology and relationship detection models based on deep learning models are used; secondly, with the help of Neo4j and Gephi graph databases, the visualization of the event graphs at the abstract layer and instance layer is realized; through the event graph, the understanding of the evolution mechanism of online public opinion is deepened, and the internal logic and evolution law of online public opinion events are revealed; through the fusion of the TextCNN model and the Graph2Seq-Attentions deep learning framework, a network hot event transmission graph is constructed to associate the evolution of public sentiment tendencies; the present invention also uses decision trees to reveal the key event sequence that affects sentiment tendencies, and provides a feasible strategy for transforming public opinion sentiment; the public opinion evolution path optimization algorithm of multi-agent reinforcement learning simulates the behavior and interaction of multiple subjects in a complex environment, and transforms passive public opinion monitoring into an active cognitive intervention plan.

[0005] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0006] Step 1: Data collection and preprocessing;

[0007] Step 1-1: Use web crawlers to collect news reports, text data, and public comments on specific hot search topics from media platforms;

[0008] Step 1-2: Perform preliminary cleaning on the data collected in step 1-1 and use regular expressions to complete sentence segmentation;

[0009] Step 2: Event extraction and relationship detection;

[0010] Step 2-1: Based on the ACE-2005 event extraction framework, construct argument types and relationship types suitable for public opinion data, and annotate event trigger words and their arguments and relationships in the text;

[0011] Step 2-2: Extract "event-argument" triples and "event-relation" triples from the labeled data to provide the required corpus for training the model;

[0012] Step 2-3: Use HMM, CRF, Bi-LSTM and Bi-LSTM+CRF integrated models for event extraction;

[0013] Step 2-4: Use CNN and Bi-LSTM models to extract the relationship between events;

[0014] Step 2-5: Classify and evaluate the strength of the extracted events and relations to capture the interactions between events;

[0015] Step 3: Graph construction;

[0016] Step 3-1: Integrate the "event-argument" triples and the "event-relation" triples to generate a set of public opinion event summaries; the summaries include subject-predicate-object, subject-predicate, and verb-object structures, with the trigger word as the center and the event framework constructed through argument radiation;

[0017] Step 3-2: Import the data into the Neo4j graph database and complete the visualization of the instance-level event graph by connecting the relationships between nodes;

[0018] Step 3-3: Use the Doc2Vec algorithm and K-means++ clustering algorithm to cluster the event summary set;

[0019] Step 3-4: The clustering results are visualized through t-SNE dimensionality reduction;

[0020] Step 4: Identification of individual emotional tendencies;

[0021] Step 4-1: Extract samples from the comment data of two specific topics, "epidemic situation in place A" and "epidemic situation in place B", and label them into three categories: positive, negative, and neutral;

[0022] Step 4-2: Use EDA technology to enhance the training set data;

[0023] Step 4-3: Experiment to obtain the optimized model weights;

[0024] Step 4-4: Use the TextCNN model with the optimal weight ratio to complete the individual sentiment tendency recognition of the remaining comments;

[0025] Step 5: Sentiment distribution prediction;

[0026] Step 5-1: Select the graph embedding algorithms Node2Vec and Word2Vec for directed weighted graph structures;

[0027] Step 5-2: Use the Graph2Seq-Attention model framework to process variable-length input and output sequences through a recurrent neural network, which is suitable for predicting the emotional distribution of public opinion events;

[0028] Step 5-3: Determine the optimal length of the public opinion event chain and the optimal length of sentiment distribution prediction through experiments;

[0029] Step 5-4: Analyze the performance of different graph embedding algorithms, attention mechanisms, and teacher enforcement mechanism features in sentiment distribution prediction;

[0030] Step 5-5: Use the Graph2Seq-Attention model with the optimal parameter structure to predict the sentiment distribution of public opinion events;

[0031] Step 6: Discover the path of public opinion sentiment conversion;

[0032] Step 6-1: Use decision trees to identify the key event sequence rules that lead to positive and negative emotional tendencies;

[0033] Step 6-2: Filter out the negative emotion paths that meet the decision tree rules from the data set, adjust the filtered key event sequences, and replace the negative emotion triggers with event sequence elements that can guide positive emotions discovered through the decision tree;

[0034] Step 6-3: Input the adjusted new event sequence into the Graph2Seq-Attention model and re-predict the sentiment tendency;

[0035] Step 6-4: Compare the event sequence and emotional tendencies before and after the transformation to identify key solutions for achieving a positive transformation of public opinion orientation.

[0036] Preferably, the preliminary cleaning includes deduplication, removal of blanks and sentence segmentation.

[0037] Preferably, the interactions between the events include causal, sequential and conditional relationships.

[0038] The beneficial effects of the present invention are as follows:

[0039] The present invention firstly uses event extraction technology and relationship detection model based on deep learning model to accurately capture public opinion events and their mutual relations; secondly, with the help of Neo4j and Gephi graph database, the visualization of the abstract layer and instance layer event graph is realized, which is helpful to intuitively understand the connection between different events; through the event graph, the understanding of the evolution mechanism of network public opinion is deepened, the internal logic and evolution law of network public opinion events are revealed, and a new perspective is provided for the innovation of theoretical models and analysis methods; through the fusion of TextCNN model and Graph2Seq-Attentions deep learning framework, a network hot event transmission map is constructed to associate the evolution of public sentiment tendency, provide powerful algorithm support for the dynamic prediction of sentiment state, and provide early warning for future public opinion changes; in addition, the present invention also uses decision trees to reveal the key event sequence that affects sentiment tendency, and provides feasible strategies for transforming public opinion sentiment; the public opinion evolution path optimization algorithm of multi-agent reinforcement learning simulates the behavior and interaction of multiple subjects in a complex environment, and transforms passive public opinion monitoring into an active cognitive intervention program. The entire system realizes full process automation from data collection to sentiment tendency prediction, greatly improving the efficiency and accuracy of sentiment analysis and providing a powerful tool for public opinion management and decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flow chart of the steps of the method of the present invention;

[0041] Figure 2 This is an example diagram of the visualization of the instance layer event graph in the embodiment of the present invention.

[0042] Figure 3 This is a structural diagram of the Graph2Seq-Attention model in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0044] The present invention aims to provide a method for identifying and predicting sentiment tendencies based on a public opinion event graph, which is used to deeply understand and predict the public's emotional response to specific public opinion events and achieve a positive transformation of the public opinion sentiment orientation.

[0045] Necessary steps:

[0046] 1. Data collection and preprocessing;

[0047] S1. Use web crawlers to collect news reports, text data and public comments on specific hot search topics from mainstream media platforms;

[0048] S2. Perform preliminary cleaning on the collected data, such as removing duplicates, removing blanks, and sentence segmentation, and use regular expressions to complete sentence segmentation.

[0049] 2. Event extraction and relationship detection;

[0050] S1. Based on the ACE-2005 event extraction framework, construct argument types and relationship types suitable for public opinion data, and annotate event trigger words and their arguments and relationships in the text;

[0051] S2. Extract "event-argument" triples and "event-relation" triples from the annotated data to provide the required corpus for training the model;

[0052] S3. Use HMM, CRF, Bi-LSTM and Bi-LSTM+CRF integrated models for event extraction;

[0053] S4. Use CNN and Bi-LSTM models to extract relations between events;

[0054] S5. Classify and evaluate the strength of the extracted events and relations to capture the interactions between events, such as causal, sequential, and conditional relations.

[0055] 3. Map construction;

[0056] S1. Integrate the "event-argument" triples and "event-relation" triples to generate a collection of public opinion event summaries. The summaries include subject-predicate-object, subject-predicate, verb-object and other structures. With the trigger word as the center, the event framework is constructed through argument radiation;

[0057] S2. Import the data into the Neo4j graph database and complete the visualization of the instance-level event graph through the relationship connection between nodes;

[0058] S3. Use Doc2Vec algorithm and K-means++ clustering algorithm to cluster the event summary collection and generalize events with similar topics;

[0059] S4. Clustering results are visualized through t-SNE dimensionality reduction.

[0060] 4. Identification of individual emotional tendencies;

[0061] S1. Extract samples from the comment data of the two topics and label them into three categories: positive, negative and neutral;

[0062] S2. Use EDA (easy data augmentation) technology to enhance the training set data to solve the problem of sample sentiment polarization tendency;

[0063] S3. Experiments to obtain optimized model weights;

[0064] S4. Use the TextCNN model with optimal weight ratio to complete the individual sentiment tendency recognition of the remaining comments.

[0065] 5. Sentiment distribution prediction;

[0066] S1. Select graph embedding algorithms Node2Vec and Word2Vec suitable for directed weighted graph structures;

[0067] S2. Using the Graph2Seq-Attention model framework, a recurrent neural network is used to process variable-length input and output sequences, which is suitable for predicting the emotional distribution of public opinion events;

[0068] S3. Determine the optimal length of the public opinion event chain and the optimal length of sentiment distribution prediction through experiments;

[0069] S4. Analyze the performance of different graph embedding algorithms, attention mechanisms, and teacher enforcement mechanisms in sentiment distribution prediction;

[0070] S5. Use the Graph2Seq-Attention model with optimal parameter structure to predict the sentiment distribution of public opinion events.

[0071] 6. Discovery of the path of public opinion sentiment transformation;

[0072] S1. Use decision trees to identify the key event sequence rules that lead to positive and negative emotional tendencies;

[0073] S2. Filter out the negative emotion paths that meet the decision tree rules from the data set, adjust the filtered key event sequences, and replace the negative emotion triggers with event sequence elements that can guide positive emotions discovered through the decision tree;

[0074] S3. Input the adjusted new event sequence into the Graph2Seq-Attention model and re-predict the sentiment tendency;

[0075] S4. Compare the event sequence and emotional tendencies before and after the transformation to identify the key solutions to achieve positive transformation of public opinion orientation.

[0076] Example:

[0077] 1. Public opinion data collection and preprocessing;

[0078] 1.1. Through web crawlers, we collected topics and comments related to the keywords "X-area epidemic" and "S-area epidemic" from Weibo, and collected a total of 773 topics and 47,173 comments about "X-area epidemic", and 583 topics and 51,284 comments about "S-area epidemic". ;

[0079] 1.2. We collected news reports related to the keyword "epidemic" from Baijiahao and Toutiao through web crawlers, and collected a total of 249 articles from Baijiahao and 455 articles from Toutiao;

[0080] 1.3. Clean the data set, including using regular expressions and the jieba library to remove duplicates, remove blanks, and perform sentence processing.

[0081] 2. Event extraction and relationship detection;

[0082] 2.1. Based on the ACE-2005 (Automatic Content Extraction) event extraction framework, 50% of Weibo topics and 10% of news reports were randomly selected for data annotation, event trigger words and their related arguments and relationships were annotated, and argument types and relationship types suitable for public opinion analysis were constructed;

[0083] 2.2. 7958 “event-argument” and 1319 “event-relation” triplets were extracted from the labeled data as training corpus for the machine learning model;

[0084] 2.3. To ensure the structural integrity of the extracted events and arguments, the BIOE (Begin, Inside, Outside, End) annotation method is used to serialize and annotate the events and their arguments;

[0085] 2.4. Use HMM (Hidden Markov Model), CRF (Conditional Random Field), Bi-LSTM (Bidirectional Long Short-Term Memory) and Bi-LSTM+CRF and other integrated models to automatically extract events;

[0086] 2.5. Use CNN (Convolutional Neural Network) and Bi-LSTM model to further extract the relationship between events.

[0087] 3. Map construction;

[0088] 3.1. Integrate the extracted "event-argument" triples and "event-relation" triples to generate a collection of public opinion event summaries containing subject-predicate-object, subject-predicate, and verb-object structures. Each event is centered on the trigger word and radiates through arguments;

[0089] 3.2. Use Doc2Vec algorithm and K-means++ clustering algorithm to cluster event summaries, generalize events with similar topics, and obtain 5 first-level categories and 21 second-level categories of abstract events;

[0090] 3.3. Perform t-SNE (t-distributed Stochastic Neighbor Embedding) dimension reduction visualization processing on the clustering results to intuitively display the distribution and relationship between different event categories;

[0091] 3.4. Import the data into the Neo4j graph database and use Cypher statements to set different colors to distinguish the arguments and predicates of instance events.

[0092] 4. Identification of individual emotional tendencies;

[0093] 4.1. Randomly select 5,000 samples from the data of "X epidemic" and "S epidemic", and label them with three categories of positive, negative and neutral emotions;

[0094] 4.2. To address the problem of emotional polarization in sample data, we use EDA (Exploratory Data Analysis) technology to enhance the training set data, divide the data set into training set and test set in a ratio of 8:2, and conduct emotional tendency recognition training;

[0095] 4.3. By performing synonym replacement, random insertion, random exchange and random deletion on the original data, the data samples of the training set are expanded to balance the sentiment distribution in the data set;

[0096] 4.4. Adjust the weights of different categories of the loss function in equal proportions, and fine-tune them using the F1 value of the test set to determine the weight configuration that can maximize the F1 value;

[0097] 4.5. Determine the optimal weight of the model through experiments, and use the tuned TextCNN (Text Convolutional Neural Network) model to complete the sentiment tendency recognition of the remaining unlabeled data.

[0098] 5. Sentiment distribution prediction;

[0099] 5.1. Each comment corresponds to a unique topic. Each topic is associated with 21 types of abstract events in the public opinion graph. By normalizing the sentiment data of all comments under each topic, the sentiment distribution of the topic is obtained.

[0100] 5.2. In order to exclude atypical public opinion events that cannot arouse widespread attention, topics with less than 10 comments were removed, and finally 830 topics were retained as the sentiment distribution prediction data set;

[0101] 5.3. Use Node2Vec and Word2Vec graph embedding algorithms to adapt to directed weighted graph structures, where Node2Vec is used for abstract layer event sequences and Word2Vec is used for event summary texts;

[0102] 5.4. Design the Graph2Seq-Attention model, which consists of a two-layer graph convolutional network (GCN) encoder and decoder with an attention mechanism. The model input is the event sequence adjacency matrix and graph embedding features at the abstract level. Every 8 events constitute a sequence graph, which is sorted in chronological order.

[0103] 5.5. Test the model in multiple configurations and confirm that the model performs best when using only Word2Vec as the embedding feature;

[0104] 5.6. Set the output target of the model to predict the sentiment distribution of the next n events. Use grid search technology to determine the optimal value of n as 1, and determine the optimal configuration of each parameter in the sentiment prediction task;

[0105] 5.7. The Graph2Seq-Attention model is used to predict the sentiment tendency of public opinion events. The model has high prediction accuracy and effectively supports the public opinion analysis task.

[0106] 6. Discovery of the path of public opinion sentiment transformation;

[0107] 6.1. Based on the percentage distribution of emotions, calculate the dominance of each emotional state (positive, neutral, negative). If the difference between the most dominant emotional states is obvious, it is directly marked as the dominant emotion. For emotional states with insignificant differences, use mathematical formulas to quantify their mixed emotions;

[0108] 6.2. Based on the quantitative results, the original three-dimensional emotional state is subdivided into four categories: single positive, neutral, negative, and confrontational state where both positive and negative coexist;

[0109] 6.3. Classify the sentiment data through the decision tree algorithm, and identify the key decision node combinations that affect the sentiment tendency for the data paths with positive or negative sentiment tendency;

[0110] 6.4. Example of key decision node combination: "x2:{2}; x3:{2}; x7:{4 6 15}, rule proportion: 0.99, number of matches: 104, emotional state: negative" means that the negative emotional tendency path is defined by a combination of three decision nodes, where the values ​​of the second and third nodes are 2, and the value range of the seventh node is between 4, 6, and 15. In the actual data set, there are 104 data points that meet this decision combination, and nodes with negative emotional states account for 99% of the matching data points;

[0111] 6.5. Replace the negative key nodes in the negative-oriented and positive-negative confrontation-oriented event sequences with positive emotional triggers identified by the decision tree algorithm;

[0112] 6.6. Use the Graph2Seq-Attention model to re-predict the sentiment tendency of the replaced new path;

[0113] 6.7. Compare the sentiment prediction results before and after the adjustment, quantitatively analyze the effectiveness of the positive sentiment conversion effect and the path adjustment strategy, determine the adjustment points of the key sentiment conversion path in the public opinion management strategy, and provide a strategic basis for achieving positive guidance of public opinion emotions.

Claims

1. A method for identifying and predicting sentiment tendency based on public opinion graph, characterized in that: The steps include: Step 1: Data collection and preprocessing; Step 1-1: Use web crawlers to collect news reports, text data, and public comments on specific hot search topics from media platforms; Step 1-2: Perform preliminary cleaning on the data collected in step 1-1 and use regular expressions to complete sentence segmentation; Step 2: Event extraction and relationship detection; Step 2-1: Based on the ACE-2005 event extraction framework, construct argument types and relationship types suitable for public opinion data, and annotate event trigger words and their arguments and relationships in the text; Step 2-2: Extract "event-argument" triples and "event-relation" triples from the labeled data to provide the required corpus for training the model; Step 2-3: Use HMM, CRF, Bi-LSTM and Bi-LSTM+CRF integrated models for event extraction; Step 2-4: Use CNN and Bi-LSTM models to extract the relationship between events; Step 2-5: Classify and evaluate the strength of the extracted events and relations to capture the interactions between events; Step 3: Graph construction; Step 3-1: Integrate the "event-argument" triples and "event-relation" triples to generate a set of public opinion event summaries; the summaries include subject-predicate-object, subject-predicate, and verb-object structures, with the trigger word as the center and the event framework constructed through argument radiation; Step 3-2: Import the data into the Neo4j graph database and complete the visualization of the instance-level event graph by connecting the relationships between nodes; Step 3-3: Use the Doc2Vec algorithm and K-means++ clustering algorithm to cluster the event summary set; Step 3-4: The clustering results are visualized through t-SNE dimensionality reduction; Step 4: Identification of individual emotional tendencies; Step 4-1: Extract samples from the comment data of two specific topics, "Epidemic situation in place A" and "Epidemic situation in place B", and label them into three categories: positive, negative, and neutral; Step 4-2: Use EDA technology to enhance the training set data; Step 4-3: Experiment to obtain the optimized model weights; Step 4-4: Use the TextCNN model with the optimal weight ratio to complete the individual sentiment tendency recognition of the remaining comments; Step 5: Sentiment distribution prediction; Step 5-1: Select the graph embedding algorithms Node2Vec and Word2Vec for directed weighted graph structures; Step 5-2: Use the Graph2Seq-Attention model framework to process variable-length input and output sequences through a recurrent neural network, which is suitable for predicting the emotional distribution of public opinion events; Step 5-3: Determine the optimal length of the public opinion event chain and the optimal length of sentiment distribution prediction through experiments; Step 5-4: Analyze the performance of different graph embedding algorithms, attention mechanisms, and teacher enforcement mechanism features in sentiment distribution prediction; Step 5-5: Use the Graph2Seq-Attention model with the optimal parameter structure to predict the sentiment distribution of public opinion events; Step 6: Discover the path of public opinion sentiment conversion; Step 6-1: Use decision trees to identify the key event sequence rules that lead to positive and negative emotional tendencies; Step 6-2: Filter out the negative emotion paths that meet the decision tree rules from the data set, adjust the filtered key event sequences, and replace the negative emotion triggers with event sequence elements that can guide positive emotions discovered through the decision tree; Step 6-3: Input the adjusted new event sequence into the Graph2Seq-Attention model and re-predict the sentiment tendency; Step 6-4: Compare the event sequence and emotional tendencies before and after the transformation to identify key solutions for achieving a positive transformation of public opinion orientation.

2. According to claim 1, a method for identifying and predicting sentiment tendency based on public opinion graph is characterized in that: The preliminary cleaning includes deduplication, removal of blanks and sentence segmentation.

3. According to claim 1, a method for identifying and predicting sentiment tendency based on public opinion graph is characterized in that: The interactions between the events include causal, sequential and conditional relationships.

Citation Information

Cited By

  • Potential hot content identification method based on mainstream value vertical domain knowledge base

    CN119557460A