CN113239685A - Public sentiment detection method and system based on dual sentiments - Google Patents
Public sentiment detection method and system based on dual sentiments Download PDFInfo
- Publication number
- CN113239685A CN113239685A CN202110041193.5A CN202110041193A CN113239685A CN 113239685 A CN113239685 A CN 113239685A CN 202110041193 A CN202110041193 A CN 202110041193A CN 113239685 A CN113239685 A CN 113239685A
- Authority
- CN
- China
- Prior art keywords
- emotion
- emotional
- text
- public opinion
- obtaining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 80
- 230000009977 dual effect Effects 0.000 title claims abstract description 44
- 230000002996 emotional effect Effects 0.000 claims abstract description 200
- 230000008451 emotion Effects 0.000 claims description 301
- 238000012549 training Methods 0.000 claims description 39
- 230000004927 fusion Effects 0.000 claims description 20
- 238000011176 pooling Methods 0.000 claims description 14
- 238000010276 construction Methods 0.000 claims description 10
- 230000004931 aggregating effect Effects 0.000 claims description 6
- 239000000284 extract Substances 0.000 claims description 3
- 238000000034 method Methods 0.000 description 16
- 238000011160 research Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000014509 gene expression Effects 0.000 description 4
- 238000007500 overflow downdraw method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000013145 classification model Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 241001539473 Euphoria Species 0.000 description 1
- 206010015535 Euphoric mood Diseases 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000010420 art technique Methods 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000036651 mood Effects 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/237—Lexical tools
- G06F40/242—Dictionaries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Abstract
The invention provides a public sentiment detection method and system based on dual sentiments, which can be fused into the existing detection model in the field through a simple multilayer perceptron module based on the proposed dual sentiment characteristics and have strong convenience. After the dual emotional characteristics are fused, the detection accuracy, the recall rate, the F1 value and other indexes of the model can be greatly improved, and the public opinion detection performance is effectively improved.
Description
Technical Field
The invention relates to the technical field of public sentiment detection in network public sentiment, in particular to a public sentiment detection method and system based on dual sentiments.
Background
The existing research methods for public opinion detection problems at home and abroad are divided into two types from the design of detection models, one type is a machine learning method based on feature engineering, the machine learning model is designed by artificially constructing various features (such as text content features, publisher features, news theme features, propagation features and the like), great manual energy is required to be consumed, and the method belongs to a more traditional detection method; the other type is a detection method based on deep learning, which utilizes the advantages of the existing neural network model, and there are methods based on various deep models such as GRU and CNN, which have become the main line of research nowadays. In view of the use of data information, in addition to the text content of the rumor itself, various data information such as social environment information of rumor news, comment and forward information of users, and credibility information of news publishers are widely used.
The importance of emotional signals for public opinion detection has been of interest to many researchers. The modeling of the emotional polarity characteristics in the rumor text is added in the Internet public opinion detection, so that the effectiveness of the emotional signal is proved; the method comprises the step of providing a characteristic of 'emotion ratio' (the ratio of the number of negative emotion words to the number of positive emotion words in rumor text) to assist public opinion detection. However, these prior art techniques for modeling emotion signals only aim at emotion in the rumor text itself (i.e. news publisher emotion), and ignore emotion in public comments on rumors (i.e. community group emotion), as shown in FIG. 1a, a rumor microblog with emotional resonance: the news publisher emotion and the community group emotion are both 'anger'; as shown in fig. 1b, a rumor microblog with emotional differences: the news publisher is emotional as "happy" and the community group is emotional as "angry".
In the prior art, the dual emotions of community emotion and rumor cannot be taken into consideration for three reasons: (1) most of the current public opinion detection scholars come from the computer field, so that the public opinion detection scholars probably lack the attention to rumor research in the fields of social science, psychology and the like; (2) there are difficulties with respect to the characterization and modeling of affective signals; (3) it is difficult to fuse the links between dual emotions.
Disclosure of Invention
The present invention is directed to solving the three problems of the prior art. The research of the invention is established on the social theory of rumors, and proves that the double emotions are closely related to the public opinion detection through statistical significance analysis; the method is characterized in that the representation and the modeling of the emotion signals are also one of the core technologies of the invention, and the construction of the emotion characteristics is carried out by simultaneously utilizing a construction method based on an expert emotion dictionary and a representation method based on a pre-training emotion model; the method integrates the connection between double emotions, and is another technical core of the invention. According to the invention, through a large amount of experimental exploration, a difference-based dual emotion fusion method is provided, and the performance of the existing public opinion detection model can be effectively improved.
Specifically, the invention provides a public opinion detection method based on dual emotions, which comprises the following steps:
step 1, obtaining a training text, wherein the training text comprises an original text with a labeled rumor label and a comment thereof, and executing step 2 by taking the training text as a current text;
step 2, extracting the emotional characteristic of each comment in the current text, obtaining the average emotional characteristic of all comments by using an average pooling layer, obtaining the extreme emotional characteristic of all comments by using a maximum pooling layer, splicing the extreme emotional characteristic by using the average emotional characteristic to obtain the community emotional characteristic of the current text, extracting the emotional characteristic of the original text in the current text to obtain the release emotional characteristic of the original text in the current text, obtaining an emotional difference characteristic according to the emotional gap between the community emotional characteristic and the release emotional characteristic, and splicing the community emotional characteristic, the release emotional characteristic and the emotional difference characteristic to obtain the emotional fusion characteristic of the current text;
step 3, training a public opinion detection model by taking the training text and the emotion fusion characteristics thereof as training data and a rumor label of the training text as a training target to obtain a public opinion detection classifier;
and 4, acquiring a text to be detected for the public opinion, taking the text as the current text, obtaining the emotion fusion characteristics of the text to be detected for the public opinion through the step 2, inputting the text to be detected for the public opinion and the emotion fusion characteristics into the public opinion detection classifier, and obtaining the public opinion detection result of the text to be detected for the public opinion.
The double-emotion-based public opinion detection method comprises the following specific steps of extracting emotion characteristics of comments and texts in the step 2:
and extracting emotion types, emotion words, emotion intensity, emotion polarity and auxiliary emotion characteristics, and splicing the five types of emotion signals to obtain the emotion characteristics of the comments and the original text.
The double emotion-based public opinion detection method, wherein
Extracting the emotion category comprises:
given a text T, T ═ T1,t2,...,ti,tL],tiRepresenting the ith word in the text T, and an emotion classifier f, the output dimension of which is dfThen obtain the emotional category feature wherein
Extracting the emotion words comprises:
sentiment dictionary common inclusion DeKind of emotion, mark asGiven a text T, at deUnder different emotions, the emotion word characteristics of the whole text T are obtained by aggregating emotion word signals of each word wherein
Extracting the emotional intensity comprises:
given emotion E and list of emotion words WeThe emotion intensity score s' (T, E) of the text T for emotion E is obtained according to the following formula:
wherein int (t)i) Is the word tiThe intensity value of (a). If tiInt (t) is recorded by emotion dictionaryi) Can be obtained according to a lookup dictionary; if not recorded in the dictionary, int (t)i) 0; constructing the emotional word characteristics of the spliced text T by the emotional intensity scores of the spliced text T under each emotion: wherein
Extracting the emotion polarity includes:
obtaining the emotional polarity characteristics through an emotional dictionary or an open-source toolkit, wherein the dimension of the emotional polarity characteristics is dsThen obtain the emotional polarity characteristics
Extracting the auxiliary emotion comprises:
The double-emotion-based public opinion detection method comprises the following specific steps of:
the emotional differenceFeature emogapObtaining an emotion gap between the community emotion feature and the release emotion feature:
wherein ,emoTfor the issue of emotional features, emoM meanFor the average emotional characteristics, emoM maxIs the extreme emotional characteristic.
In any one of the double emotion-based public opinion detection methods, in step 3, the public opinion detection model comprises a public opinion detection model BiGRU, an MLP layer and a Softmax layer, and the public opinion detection model is trained by adopting a cross entropy loss function.
The invention also provides a public sentiment detection system based on dual sentiments, which comprises the following steps:
the module 1 is used for acquiring a training text, wherein the training text comprises an original text with a labeled rumor label and a comment thereof, and the training text is used as a current text execution module 2;
the module 2 is used for extracting the emotional characteristics of each comment in the current text, obtaining the average emotional characteristics of all comments by using an average pooling layer, obtaining the extreme emotional characteristics in all comments by using a maximum pooling layer, splicing the extreme emotional characteristics by using the average emotional characteristics to obtain the community emotional characteristics of the current text, extracting the emotional characteristics of the original text in the current text to obtain the release emotional characteristics of the original text in the current text, obtaining the emotional difference characteristics according to the emotional gap between the community emotional characteristics and the release emotional characteristics, and splicing the community emotional characteristics, the release emotional characteristics and the emotional difference characteristics to obtain the emotional fusion characteristics of the current text;
a module 3, configured to train a public opinion detection model by using the training text and the emotion fusion feature thereof as training data and using a rumor label of the training text as a training target, so as to obtain a public opinion detection classifier;
and the module 4 is used for acquiring the text to be detected for the public opinion, obtaining the emotion fusion characteristic of the text to be detected for the public opinion through the module 2 as the current text, inputting the text to be detected for the public opinion and the emotion fusion characteristic thereof into the public opinion detection classifier, and obtaining the public opinion detection result of the text to be detected for the public opinion.
7. A dual emotion-based public opinion detection system as claimed in claim 1, wherein the module 2 extracts emotion features of comments and texts, specifically comprising:
and extracting emotion types, emotion words, emotion intensity, emotion polarity and auxiliary emotion characteristics, and splicing the five types of emotion signals to obtain the emotion characteristics of the comments and the original text.
The public sentiment detection system based on dual sentiment, wherein
Extracting the emotion category comprises:
given a text T, T ═ T1,t2,...,ti,tL],tiRepresenting the ith word in the text T, and an emotion classifier f, the output dimension of which is dfThen obtain the emotional category feature wherein
Extracting the emotion words comprises:
sentiment dictionary common inclusion DeKind of emotion, mark asGiven a text T, at deUnder different emotions, the emotion word characteristics of the whole text T are obtained by aggregating emotion word signals of each word wherein
Extracting the emotional intensity comprises:
given emotion E and list of emotion words WeThe emotion intensity score s' (T, E) of the text T for emotion E is obtained according to the following formula:
wherein int (t)i) Is the word tiThe intensity value of (a). If tiInt (t) is recorded by emotion dictionaryi) Can be obtained according to a lookup dictionary; if not recorded in the dictionary, int (t)i) 0; constructing the emotional word characteristics of the spliced text T by the emotional intensity scores of the spliced text T under each emotion: wherein
Extracting the emotion polarity includes:
obtaining the emotional polarity characteristics through an emotional dictionary or an open-source toolkit, wherein the dimension of the emotional polarity characteristics is dsThen obtain the emotional polarity characteristics
Extracting the auxiliary emotion comprises:
The double-emotion-based public opinion detection system is characterized in that obtaining emotion difference characteristics in the module 2 specifically comprises:
the emotional difference characteristics emogapObtaining an emotion gap between the community emotion feature and the release emotion feature:
wherein ,emoTfor the issue of emotional features, emoM meanFor the average emotional characteristics, emoM maxIs the extreme emotional characteristic.
Any kind of public opinion detecting system based on dual emotion, wherein the public opinion detecting model in the module 3 comprises a public opinion detecting model BiGRU, an MLP layer and a Softmax layer, and the public opinion detecting model is trained by adopting a cross entropy loss function.
According to the scheme, the invention has the advantages that:
the dual emotion characteristics provided by the invention can be fused into the existing detection model in the field through the multilayer perceptron module, and have strong convenience. After the dual emotional characteristics are fused into a plurality of detection models, experiments show that: for each public opinion detection model, after the dual emotional characteristics are fused, the detection accuracy, the recall rate, the F1 value and other indexes of the model can be greatly improved, and the effectiveness of the method is proved; the method has an effect of improving the integration of dual emotional characteristics of a plurality of detection models which are widely applied in the field, and proves the compatibility and universality of the method.
Drawings
Fig. 1a and 1b are diagrams illustrating rumor microblogs with different dual emotions;
fig. 2 is a diagram of a public opinion detection framework based on dual emotions according to the present invention.
Detailed Description
Rumor studies by socially relevant scholars have shown that: rumor publishers, to instigate more people to spontaneously spread rumors, often compile rumors that can stimulate the strong moods of the masses. Therefore, besides the emotions in the rumor text itself, the public comments on rumors also have interest and research, which is the starting point of the present invention: analyzing whether the news publisher emotion of the rumor has a certain relation with community group emotion (namely, dual emotion) or not, and further assisting the public opinion detection through the relation of the dual emotion. Through statistical analysis of a large amount of data, we believe that for a single microblog (including the original and its comments), dual emotions share two manifestations: one is emotional resonance, namely, the news publisher emotion is the same as the community group emotion (as shown in fig. 1 a); secondly, the emotion difference is that the news publisher emotion is different from the community group emotion (as shown in FIG. 1 b).
The invention comprises the following key technical points:
key point 1. A method for modeling community group emotions for rumors. And modeling community group emotion according to comment area texts of rumor microblogs. Specifically, for each comment, the emotion characteristics are extracted from five aspects of emotion type, emotion words, emotion intensity, emotion polarity and auxiliary emotion characteristics (expressions, punctuation marks, degree words, negative words, pronouns and the like). After the emotional features of each comment are obtained, the average pooling layer is used for obtaining the average emotional signals of all comments, and the maximum pooling layer is used for obtaining the extreme emotional signals of all comments. And finally, splicing the extreme emotion signals by the average emotion signals to obtain community group emotion. Experiments show that: the method for modeling the community emotion of the rumor can effectively represent the emotion signals of the text of the rumor evaluation area and improve the classification performance of the public opinion detector.
Key point 2. A fusion method based on differential rumor double emotions. First, for the rumor self text, the emotional characteristics are extracted from five aspects of emotional type, emotional word, emotional intensity, emotional polarity and auxiliary emotional characteristics, and the obtained emotional characteristics are used for representing the emotion of the news publisher. We found through the analysis of the underlying data that the dual emotion of rumors has some special resonance patterns (difference patterns), so we propose a fusion method based on difference by splicing the three: (1) the difference (namely emotion gap) of double emotions of news publisher emotion (2) community group emotion (3) obtains the representation of rumor double emotion. Experiments show that: the difference-based rumor double-emotion fusion method can effectively pay attention to the similarity (difference) between rumor double emotions, so that the classification performance of a public opinion detector is improved.
In order to make the aforementioned features and effects of the present invention more comprehensible, embodiments accompanied with figures are described in detail below.
The following describes an embodiment with reference to "a public opinion detection framework diagram based on dual emotions" in fig. 2 of the accompanying drawings.
First, feature construction of news publisher emotion
And constructing the emotion of the news publisher by using the original text of the microblog, wherein the emotion comprises five types of emotion signals including emotion types, emotion words, emotion intensity, emotion polarity and auxiliary emotion characteristics. In the five types of emotion signals, the emotion type, the emotion intensity and the emotion polarity can represent global emotion information in the text, and the emotion words and auxiliary emotion characteristics can represent emotion information at word level and symbol level in the text.
Notation text T ═ T1,t2,...,ti,tL]Has a length of L, where tiRepresenting the ith word in the text T, our goal is: extracting news publisher emotion emo from text TT.
1. Emotional category characteristics
We use the pre-trained emotion classification model to obtain the emotion classification features. By inputting texts into the emotion classification model, probability values of different kinds of emotions contained in the input texts can be obtained. Namely: given a text T and an emotion classifier f, assuming that the output dimension of the emotion classifier is dfThen we can get the emotional category feature wherein
2. Emotional word features
Usually, the emotion signal in the text is embodied by a specific emotion word, so that the emotion word features are constructed by means of the existing expert emotion dictionary. In the emotion dictionary, we assume that the dictionary contains deKind of emotion, mark asSuppose that L is co-registered in the dictionary for emotion E ∈ EeAn emotional word, which is marked as
After a given text T, we are at d of the lexiconeUnder different emotions, the emotion word characteristics of the whole text T are obtained by aggregating emotion word signals of each word. Specifically, for a particular emotion e, we first compute the emotion word score s (t) for each wordiE) where t isiRepresenting the ith word in the text T. If the word tiIs recorded in a dictionary, i.e. ti∈WeWhen calculating the score, we consider not only the frequency of the word they appear, but also the context word (in the present invention, the negative word and the degree word) in their context. For example, for the sentence "i/today/not/very/happy" (containing 5 words), the word "happy" appears in the emotion dictionary, which belongs to the emotion category of "happy", and the frequency of the appearing words isAssuming we only consider the context word with a window size of 2 on the left side of the word (i.e., the word "not" is a negative word with a negative value of-1, and the word "very" is a degree word with a degree value of 2. Then, the emotional word score s (t)i"happy" e ═ hearting ") -1 x 2* In practical application, the values of the negative words and the degree words can be searched by the emotion dictionary.
From the above, we calculate the emotion word score s (t) using the following formulai,e):
Where w is the context window size to the left of the word, neg (t)i) And deg (t)i) Is the word tiNegative value and degree value of (1).
Then, we can calculate the emotion word score of the text T under the emotion e:
finally, constructing the emotion word characteristics of the text T by splicing the emotion word scores of the text T under each emotion: wherein
3. Emotional intensity characteristics
For the emotional words, the emotional intensity characteristics are constructed on the basis of the emotional words. For example, "euphoria" has greater emotional intensity than "happy" when conveying "happy" emotion. For the construction of the emotional intensity characteristics, the emotional word characteristics are similar approximately in the process, and only the factor of the intensity value needs to be considered on the basis of the emotional word characteristics. In particular, given emotion E and its list of emotion words WeWe first calculate the emotion intensity score s' (T, E) for the text T for emotion E according to the following formula:
wherein int (t)i) Is the word tiThe intensity value of (a). If tiInt (t) is recorded by emotion dictionaryi) Can be obtained according to a lookup dictionary; if not recorded in the dictionary, int (t)i)=0。
Finally, constructing the emotion word characteristics of the text T by splicing the emotion intensity scores of the text T under each emotion: wherein
4. Emotional polarity feature
In addition to fine-grained emotional features, we also model coarse-grained emotional polarity features. Generally, the emotion polarity feature includes the emotion value of a given text in positive, negative or neutral polarity, and we can calculate the emotion polarity feature through an emotion dictionary or an open-source toolkit. Assuming an emotional polarity feature dimension of dsThen we can get the emotional polarity feature
5. Auxiliary emotional features
In consideration of the specificity of language text expression in the internet environment, besides the feature extraction based on the traditional emotion dictionary, the auxiliary emotion features shown in table 1 are constructed to model some special emotion expression modes in the internet text.
TABLE 1 list of auxiliary emotional characteristics
Assuming auxiliary emotional features in common daIn this method, da11), then we can get the auxiliary emotional features
Finally, the five emotion signals are spliced to obtain the news publisher emotion emo of the text TT:
second, feature construction of community group emotion
For the community group emotional characteristics, firstly, the emotional characteristics are extracted from each comment of the microblog, and then all the comments are aggregated to obtain the whole community group emotional characteristics. All comments on the microblog are I.e. it shares LMBar review, where MiThe ith comment is shown, and our goal is: extracting community group sentiment emo from all comments MM.
Giving a comment MiWe can adopt and get emoTIn the same way, obtain its emotional characteristicsThen, the emotional characteristics of each comment are spliced in a line vector mode to obtain the emotional characteristics of each commentNamely:
is obtained byThen, we adopt two aggregation methods to obtain the overall community group emotional characteristics: obtaining average emotion signals of all comments by using an average pooling layer, obtaining extreme emotion signals of all comments by using a maximum pooling layer, and finally splicing the average emotion signals and the extreme emotion signals to obtain emoM, wherein :
third, expression of emotional gap
To capture the resonance and difference signals between dual emotions, the present invention introduces an emotion gap (labeled emo)gap) To model it. The emotion gap is obtained by the difference between the emotion of the news publisher and the emotion of the community group, specifically:
by this modeling approach, the emotion gap can measure the difference between the dual emotions. For news samples with significant resonance between dual emotions, emogapWill be approximately equal to the zero vector.
Four-step public opinion detection method based on dual emotional characteristics
Finally, the emotion differences of the news publisher emotion (1) and the community emotion (2) and the community emotion (3) are spliced to obtain dual emotion characteristics
After obtaining the dual emotional features, the dual emotional features can be fused into the existing public opinion detection model through a simple multi-layer perceptron (MLP) module. As shown in FIG. 2, we take the public opinion detection model BiGRU as an example, and assume that the output vector of the model BiGRU is BiGRUTThen we can get the vector [ BiGRU ] by splicingT,emodual]And inputting the whole into an MLP layer, and finally performing true and false prediction on news through a Softmax layer:
during model training, a cross entropy loss function is adopted to train the fused public opinion detection classifier.
The following are system examples corresponding to the above method examples, and this embodiment can be implemented in cooperation with the above embodiments. The related technical details mentioned in the above embodiments are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the above-described embodiments.
The invention also provides a public sentiment detection system based on dual sentiments, which comprises the following steps:
the module 1 is used for acquiring a training text, wherein the training text comprises an original text with a labeled rumor label and a comment thereof, and the training text is used as a current text execution module 2;
the module 2 is used for extracting the emotional characteristics of each comment in the current text, obtaining the average emotional characteristics of all comments by using an average pooling layer, obtaining the extreme emotional characteristics in all comments by using a maximum pooling layer, splicing the extreme emotional characteristics by using the average emotional characteristics to obtain the community emotional characteristics of the current text, extracting the emotional characteristics of the original text in the current text to obtain the release emotional characteristics of the original text in the current text, obtaining the emotional difference characteristics according to the emotional gap between the community emotional characteristics and the release emotional characteristics, and splicing the community emotional characteristics, the release emotional characteristics and the emotional difference characteristics to obtain the emotional fusion characteristics of the current text;
a module 3, configured to train a public opinion detection model by using the training text and the emotion fusion feature thereof as training data and using a rumor label of the training text as a training target, so as to obtain a public opinion detection classifier;
and the module 4 is used for acquiring the text to be detected for the public opinion, obtaining the emotion fusion characteristic of the text to be detected for the public opinion through the module 2 as the current text, inputting the text to be detected for the public opinion and the emotion fusion characteristic thereof into the public opinion detection classifier, and obtaining the public opinion detection result of the text to be detected for the public opinion.
7. A dual emotion-based public opinion detection system as claimed in claim 1, wherein the module 2 extracts emotion features of comments and texts, specifically comprising:
and extracting emotion types, emotion words, emotion intensity, emotion polarity and auxiliary emotion characteristics, and splicing the five types of emotion signals to obtain the emotion characteristics of the comments and the original text.
The public sentiment detection system based on dual sentiment, wherein
Extracting the emotion category comprises:
given a text T, T ═ T1,t2,...,ti,tL],tiRepresenting the ith word in the text T, and an emotion classifier f, the output dimension of which is dfThen obtain the emotional category feature wherein
Extracting the emotion words comprises:
sentiment dictionary common inclusion DeKind of emotion, mark asGiven a text T, at deUnder different emotions, the emotion word characteristics of the whole text T are obtained by aggregating emotion word signals of each word wherein
Extracting the emotional intensity comprises:
given emotion E and list of emotion words WeThe emotion intensity score s' (T, E) of the text T for emotion E is obtained according to the following formula:
wherein int (t)i) Is the word tiThe intensity value of (a). If tiInt (t) is recorded by emotion dictionaryi) Can be obtained according to a lookup dictionary; if not recorded in the dictionary, int (t)i) 0; constructing the emotional word characteristics of the spliced text T by the emotional intensity scores of the spliced text T under each emotion: wherein
Extracting the emotion polarity includes:
obtaining the emotional polarity characteristics through an emotional dictionary or an open-source toolkit, wherein the dimension of the emotional polarity characteristics is dsThen obtain the emotional polarity characteristics
Extracting the auxiliary emotion comprises:
The double-emotion-based public opinion detection system is characterized in that obtaining emotion difference characteristics in the module 2 specifically comprises:
the emotional difference characteristics emogapObtaining an emotion gap between the community emotion feature and the release emotion feature:
wherein ,emoTfor the issue of emotional features, emoM meanFor the average emotional characteristics, emoM maxIs the extreme emotional characteristic.
Any kind of public opinion detecting system based on dual emotion, wherein the public opinion detecting model in the module 3 comprises a public opinion detecting model BiGRU, an MLP layer and a Softmax layer, and the public opinion detecting model is trained by adopting a cross entropy loss function.
Claims (10)
1. A public sentiment detection method based on dual sentiments is characterized by comprising the following steps:
step 1, obtaining a training text, wherein the training text comprises an original text with a labeled rumor label and a comment thereof, and executing step 2 by taking the training text as a current text;
step 2, extracting the emotional characteristic of each comment in the current text, obtaining the average emotional characteristic of all comments by using an average pooling layer, obtaining the extreme emotional characteristic of all comments by using a maximum pooling layer, splicing the extreme emotional characteristic by using the average emotional characteristic to obtain the community emotional characteristic of the current text, extracting the emotional characteristic of the original text in the current text to obtain the release emotional characteristic of the original text in the current text, obtaining an emotional difference characteristic according to the emotional gap between the community emotional characteristic and the release emotional characteristic, and splicing the community emotional characteristic, the release emotional characteristic and the emotional difference characteristic to obtain the emotional fusion characteristic of the current text;
step 3, training a public opinion detection model by taking the training text and the emotion fusion characteristics thereof as training data and a rumor label of the training text as a training target to obtain a public opinion detection classifier;
and 4, acquiring a text to be detected for the public opinion, taking the text as the current text, obtaining the emotion fusion characteristics of the text to be detected for the public opinion through the step 2, inputting the text to be detected for the public opinion and the emotion fusion characteristics into the public opinion detection classifier, and obtaining the public opinion detection result of the text to be detected for the public opinion.
2. The dual-emotion-based public opinion detection method as claimed in claim 1, wherein the extracting of emotion characteristics of comments and texts in the step 2 specifically comprises:
and extracting emotion types, emotion words, emotion intensity, emotion polarity and auxiliary emotion characteristics, and splicing the five types of emotion signals to obtain the emotion characteristics of the comments and the original text.
3. The dual emotion-based public opinion detection method as claimed in claim 2,
extracting the emotion category comprises:
given a text T, T ═ T1,t2,...,ti,tL],tiRepresenting the ith word in the text T, and an emotion classifier f, the output dimension of which is dfThen obtain the emotional category feature wherein
Extracting the emotion words comprises:
sentiment dictionary common inclusion DeKind of emotion, mark asGiven a text T, at deUnder different emotions, the emotion word characteristics of the whole text T are obtained by aggregating emotion word signals of each word wherein
Extracting the emotional intensity comprises:
given emotion E and list of emotion words WeThe emotion intensity score s' (T, E) of the text T for emotion E is obtained according to the following formula:
wherein int (t)i) Is the word tiThe intensity value of (a). If tiInt (t) is recorded by emotion dictionaryi) Can be obtained according to a lookup dictionary; if not recorded in the dictionary, int (t)i) 0; constructing the emotional word characteristics of the spliced text T by the emotional intensity scores of the spliced text T under each emotion: wherein
Extracting the emotion polarity includes:
obtaining the emotional polarity characteristics through an emotional dictionary or an open-source toolkit, wherein the dimension of the emotional polarity characteristics is dsThen obtain the emotional polarity characteristics
Extracting the auxiliary emotion comprises:
4. The dual emotion-based public opinion detection method as claimed in claim 3, wherein the obtaining of the emotion difference feature in step 2 specifically includes:
the emotional difference characteristics emogapObtaining an emotion gap between the community emotion feature and the release emotion feature:
5. The dual emotion-based public opinion detection method as claimed in any one of claims 1 to 4, wherein the public opinion detection model in step 3 comprises a public opinion detection model BiGRU, an MLP layer and a Softmax layer, and the public opinion detection model is trained by using cross entropy loss function.
6. The utility model provides a public opinion detecting system based on dual emotion which characterized in that includes:
the module 1 is used for acquiring a training text, wherein the training text comprises an original text with a labeled rumor label and a comment thereof, and the training text is used as a current text execution module 2;
the module 2 is used for extracting the emotional characteristics of each comment in the current text, obtaining the average emotional characteristics of all comments by using an average pooling layer, obtaining the extreme emotional characteristics in all comments by using a maximum pooling layer, splicing the extreme emotional characteristics by using the average emotional characteristics to obtain the community emotional characteristics of the current text, extracting the emotional characteristics of the original text in the current text to obtain the release emotional characteristics of the original text in the current text, obtaining the emotional difference characteristics according to the emotional gap between the community emotional characteristics and the release emotional characteristics, and splicing the community emotional characteristics, the release emotional characteristics and the emotional difference characteristics to obtain the emotional fusion characteristics of the current text;
a module 3, configured to train a public opinion detection model by using the training text and the emotion fusion feature thereof as training data and using a rumor label of the training text as a training target, so as to obtain a public opinion detection classifier;
and the module 4 is used for acquiring the text to be detected for the public opinion, obtaining the emotion fusion characteristic of the text to be detected for the public opinion through the module 2 as the current text, inputting the text to be detected for the public opinion and the emotion fusion characteristic thereof into the public opinion detection classifier, and obtaining the public opinion detection result of the text to be detected for the public opinion.
7. A system for detecting dual emotions based on public opinion as claimed in claim 1, wherein the module 2 extracts emotion characteristics of comments and texts, specifically comprising:
and extracting emotion types, emotion words, emotion intensity, emotion polarity and auxiliary emotion characteristics, and splicing the five types of emotion signals to obtain the emotion characteristics of the comments and the original text.
8. The dual emotion-based public opinion detection system as claimed in claim 2,
extracting the emotion category comprises:
given a text T, T ═ T1,t2,...,ti,tL],tiRepresenting the ith word in the text T, and an emotion classifier f, the output dimension of which is dfThen obtain the emotional category feature wherein
Extracting the emotion words comprises:
sentiment dictionary common inclusion DeKind of emotion, mark asGiven a text T, at deUnder different emotions, the emotion word characteristics of the whole text T are obtained by aggregating emotion word signals of each word wherein
Extracting the emotional intensity comprises:
given emotion E and list of emotion words WeThe emotion intensity score s' (T, E) of the text T for emotion E is obtained according to the following formula:
wherein int (t)i) Is the word tiThe intensity value of (a). If tiInt (t) is recorded by emotion dictionaryi) Can be obtained according to a lookup dictionary; if not recorded in the dictionary, int (t)i) 0; constructing the emotional word characteristics of the spliced text T by the emotional intensity scores of the spliced text T under each emotion: wherein
Extracting the emotion polarity includes:
obtaining the emotional polarity characteristics through an emotional dictionary or an open-source toolkit, wherein the dimension of the emotional polarity characteristics is dsThen obtainTo emotional polarity characteristics
Extracting the auxiliary emotion comprises:
9. A system as claimed in claim 3, wherein the module 2 for obtaining the emotion difference feature includes:
the emotional difference characteristics emogapObtaining an emotion gap between the community emotion feature and the release emotion feature:
10. A dual emotion-based public opinion detection system as claimed in any one of claims 1 to 4, wherein the public opinion detection model in module 3 includes a public opinion detection model BiGRU, an MLP layer and a Softmax layer, and the public opinion detection model is trained by using cross entropy loss function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110041193.5A CN113239685B (en) | 2021-01-13 | 2021-01-13 | Public opinion detection method and system based on double emotions |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110041193.5A CN113239685B (en) | 2021-01-13 | 2021-01-13 | Public opinion detection method and system based on double emotions |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113239685A true CN113239685A (en) | 2021-08-10 |
CN113239685B CN113239685B (en) | 2023-10-31 |
Family
ID=77130076
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110041193.5A Active CN113239685B (en) | 2021-01-13 | 2021-01-13 | Public opinion detection method and system based on double emotions |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113239685B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103995853A (en) * | 2014-05-12 | 2014-08-20 | 中国科学院计算技术研究所 | Multi-language emotional data processing and classifying method and system based on key sentences |
CN109344404A (en) * | 2018-09-21 | 2019-02-15 | 中国科学技术大学 | The dual attention natural language inference method of context aware |
CN109446404A (en) * | 2018-08-30 | 2019-03-08 | 中国电子进出口有限公司 | A kind of the feeling polarities analysis method and device of network public-opinion |
WO2019080863A1 (en) * | 2017-10-26 | 2019-05-02 | 福建亿榕信息技术有限公司 | Text sentiment classification method, storage medium and computer |
CN110516067A (en) * | 2019-08-23 | 2019-11-29 | 北京工商大学 | Public sentiment monitoring method, system and storage medium based on topic detection |
WO2019227710A1 (en) * | 2018-05-31 | 2019-12-05 | 平安科技(深圳)有限公司 | Network public opinion analysis method and apparatus, and computer-readable storage medium |
CN111831824A (en) * | 2020-07-16 | 2020-10-27 | 民生科技有限责任公司 | Public opinion positive and negative face classification method |
CN111966878A (en) * | 2020-08-04 | 2020-11-20 | 厦门大学 | Public sentiment event reversal detection method based on machine learning |
CN112148832A (en) * | 2019-06-26 | 2020-12-29 | 天津大学 | Event detection method of dual self-attention network based on label perception |
CN112214991A (en) * | 2020-10-10 | 2021-01-12 | 上海海事大学 | Microblog text position detection method based on multi-feature fusion weighting |
-
2021
- 2021-01-13 CN CN202110041193.5A patent/CN113239685B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103995853A (en) * | 2014-05-12 | 2014-08-20 | 中国科学院计算技术研究所 | Multi-language emotional data processing and classifying method and system based on key sentences |
WO2019080863A1 (en) * | 2017-10-26 | 2019-05-02 | 福建亿榕信息技术有限公司 | Text sentiment classification method, storage medium and computer |
WO2019227710A1 (en) * | 2018-05-31 | 2019-12-05 | 平安科技(深圳)有限公司 | Network public opinion analysis method and apparatus, and computer-readable storage medium |
CN109446404A (en) * | 2018-08-30 | 2019-03-08 | 中国电子进出口有限公司 | A kind of the feeling polarities analysis method and device of network public-opinion |
CN109344404A (en) * | 2018-09-21 | 2019-02-15 | 中国科学技术大学 | The dual attention natural language inference method of context aware |
CN112148832A (en) * | 2019-06-26 | 2020-12-29 | 天津大学 | Event detection method of dual self-attention network based on label perception |
CN110516067A (en) * | 2019-08-23 | 2019-11-29 | 北京工商大学 | Public sentiment monitoring method, system and storage medium based on topic detection |
CN111831824A (en) * | 2020-07-16 | 2020-10-27 | 民生科技有限责任公司 | Public opinion positive and negative face classification method |
CN111966878A (en) * | 2020-08-04 | 2020-11-20 | 厦门大学 | Public sentiment event reversal detection method based on machine learning |
CN112214991A (en) * | 2020-10-10 | 2021-01-12 | 上海海事大学 | Microblog text position detection method based on multi-feature fusion weighting |
Non-Patent Citations (1)
Title |
---|
崔彦琛;张鹏;兰月新;吴立志;: "消防突发事件网络舆情情感词典构建研究", 情报杂志, no. 10 * |
Also Published As
Publication number | Publication date |
---|---|
CN113239685B (en) | 2023-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110516067B (en) | Public opinion monitoring method, system and storage medium based on topic detection | |
Lytos et al. | The evolution of argumentation mining: From models to social media and emerging tools | |
CN109766544B (en) | Document keyword extraction method and device based on LDA and word vector | |
CN111914096A (en) | Public transport passenger satisfaction evaluation method and system based on public opinion knowledge graph | |
CN102831184B (en) | According to the method and system text description of social event being predicted to social affection | |
CN110287323B (en) | Target-oriented emotion classification method | |
CN105512687A (en) | Emotion classification model training and textual emotion polarity analysis method and system | |
CN110598219A (en) | Emotion analysis method for broad-bean-net movie comment | |
Wang et al. | A multimodal feature fusion-based method for individual depression detection on sina weibo | |
Hassan et al. | Opinion within opinion: segmentation approach for urdu sentiment analysis. | |
CN112561718A (en) | Case microblog evaluation object emotion tendency analysis method based on BilSTM weight sharing | |
Xiong et al. | TRIMOON: Two-Round Inconsistency-based Multi-modal fusion Network for fake news detection | |
CN112632223B (en) | Case and event knowledge graph construction method and related equipment | |
CN113902764A (en) | Semantic-based image-text cross-modal retrieval method | |
Mehendale et al. | Cyber bullying detection for hindi-english language using machine learning | |
Jawad et al. | Combination of convolution neural networks and deep neural networks for fake news detection | |
CN113255360A (en) | Document rating method and device based on hierarchical self-attention network | |
Li et al. | Automatic classification of interactive texts in online collaborative discussion based on multi-feature fusion | |
Ghosal | Exploring the implications of artificial intelligence in various aspects of scholarly peer review | |
CN117291190A (en) | User demand calculation method based on emotion dictionary and LDA topic model | |
Qiu et al. | NeuroSPE: A neuro‐net spatial relation extractor for natural language text fusing gazetteers and pretrained models | |
CN116805010A (en) | Multi-data chain integration and fusion knowledge graph construction method oriented to equipment manufacturing | |
CN113239685B (en) | Public opinion detection method and system based on double emotions | |
Chowdhury et al. | BERT-based emotion classification approach with analysis of COVID-19 pandemic tweets | |
Ren et al. | ABML: attention-based multi-task learning for jointly humor recognition and pun detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |