CN113361258A - Aspect-level emotion analysis method and system based on graph convolution network and attention selection - Google Patents

Aspect-level emotion analysis method and system based on graph convolution network and attention selection Download PDF

Info

Publication number
CN113361258A
CN113361258A CN202110534313.5A CN202110534313A CN113361258A CN 113361258 A CN113361258 A CN 113361258A CN 202110534313 A CN202110534313 A CN 202110534313A CN 113361258 A CN113361258 A CN 113361258A
Authority
CN
China
Prior art keywords
representation
attention
graph
text
emotion
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.)
Pending
Application number
CN202110534313.5A
Other languages
Chinese (zh)
Inventor
鲁燃
王雪
刘培玉
刘杰
张琼安
朱振方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Normal University
Original Assignee
Shandong Normal University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong Normal University filed Critical Shandong Normal University
Priority to CN202110534313.5A priority Critical patent/CN113361258A/en
Publication of CN113361258A publication Critical patent/CN113361258A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an aspect level emotion analysis method and system based on a graph convolution network and attention selection, comprising the following steps of: acquiring a text to be analyzed, and converting the text into word vector embedded representation; performing feature extraction on the word vector embedded representation by using a bidirectional LSTM to obtain an initial context representation of word vector embedding; inputting the initial context representation into a graph convolution network to obtain a graph characteristic representation of a text; extracting features of the graph feature representation based on a pre-trained attention selection model, and performing mask operation on the obtained features to obtain a new context representation; and splicing the initial context representation and the new context representation, and inputting the spliced vector into a pre-trained emotion prediction model to obtain an emotion polarity prediction result. By adopting the selection attention mechanism, the capability of capturing syntactic information is enhanced, the syntactic information and semantic information of sentences are effectively combined, and the accuracy and stability of judging the emotion polarity on different data sets are improved.

Description

Aspect-level emotion analysis method and system based on graph convolution network and attention selection
Technical Field
The disclosure belongs to the technical field of natural language processing, and particularly relates to a method and a system for analyzing aspect level emotion based on a graph convolution network and attention selection.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
With the rapid development of social media, the number of network comments is also increased explosively, more and more people are willing to express own attitudes and emotions on the network instead of simply browsing and accepting, and a large amount of network comment data is often accompanied with emotional information of commentators.
The aspect level emotion analysis is different from sentence level emotion analysis, and is based on a text granularity level and mainly aims at modeling the relationship between an opinion target and the context thereof. For example, "the restaurant food tastes good but the environment is bad. "taste" in this sentence is a positive emotion, and "context" is a negative emotion.
The inventors have discovered that many current methods use graph-convolution networks (GCNs) built on dependency trees for sentences to solve the long-distance multi-word dependency problem in aspect-based emotion classification using grammatical information and word dependencies. Although performing GCN on a dependency tree brings syntactic information to the representation of each word, it also limits the interaction between facet words and distant opinion words, which is important for determining emotional polarity. Therefore, it is of great significance to develop a method for analyzing emotion in aspect level of graph convolution network and selection attention mechanism.
Disclosure of Invention
The scheme solves the problem that the traditional graph volume network limits interaction between aspect words and remote opinion words, enhances the capability of capturing syntactic information by adopting a selective attention mechanism, can effectively combine syntactic information and semantic information of sentences, and improves the accuracy and stability of judging emotion polarities on different data sets.
According to a first aspect of the embodiments of the present disclosure, there is provided an aspect level emotion analysis method based on a graph volume network and attention selection, including:
acquiring a text to be analyzed, and converting the text into word vector embedded representation;
performing feature extraction on the word vector embedded representation by using a bidirectional LSTM to obtain an initial context representation of word vector embedding;
inputting the initial context representation into a graph convolution network to obtain a graph characteristic representation of a text; extracting features of the graph feature representation based on a pre-trained attention selection model, and performing mask operation on the obtained features to obtain a new context representation;
and splicing the initial context representation and the new context representation, and inputting the spliced vector into a pre-trained emotion classifier to obtain an emotion classification result.
Further, the extracting the hidden state vector of the word embedding vector by using the bidirectional LSTM specifically includes: using the bi-directional LSTM as a context editor, the word vector embedding matrix of the text is input to the bi-directional LSTM, obtaining the hidden state vector as an initial context representation of the word vector embedding matrix.
Further, the inputting the initial context representation into a graph convolution network to obtain a graph feature representation of a text specifically includes: and inputting the initial context representation into a layer of GCN, capturing grammatical relations between the aspect word nodes and the adjacent nodes thereof by using the GCN, and outputting the graph feature matrix.
Further, the selected attention model comprises a multi-head self-attention layer, a top-k selection layer and a GCN layer which are sequentially connected, wherein the multi-head self-attention layer is used for relation extraction to obtain an attention score matrix, the top-k layer is used for conducting sparse processing on the attention score matrix to obtain coefficient representation of the attention score matrix, and the GCN layer is used for obtaining updated node feature vectors.
Further, the mask operation is performed on the obtained features to obtain a new context representation, which specifically includes: and setting the context words except the aspect words in the obtained node feature vector to zero.
Further, the emotion classifier comprises a full connection layer and a softmax layer.
Further, the obtaining of the text to be analyzed and the conversion thereof are specifically: and performing word embedding training on the text to be analyzed in a GloVe embedding mode, and converting the text into word embedding vector representation.
According to a second aspect of the embodiments of the present disclosure, there is provided an aspect level emotion analysis system based on a graph volume network and attention selection, including:
the data preprocessing unit is used for acquiring a text to be analyzed and converting the text into word vector embedded representation;
a feature extraction unit, configured to perform feature extraction on the word vector embedded representation by using a bidirectional LSTM to obtain an initial context representation of word vector embedding; inputting the initial context representation into a graph convolution network to obtain a graph characteristic representation of a text; extracting features of the graph feature representation based on a pre-trained attention selection model, and performing mask operation on the obtained features to obtain a new context representation;
a feature splicing unit for splicing the initial context representation with a new context representation;
and the emotion prediction unit is used for inputting the spliced vectors into a pre-trained emotion classifier to obtain emotion classification results.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the memory, wherein the processor implements the method for analyzing emotion at an aspect level based on a graph volume network and attention selection when executing the program.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of aspect level sentiment analysis based on graph convolution networks and selection attention.
Compared with the prior art, the beneficial effect of this disclosure is:
(1) the scheme of the present disclosure performs feature extraction on the word vector embedded representation by using bidirectional LSTM to obtain an initial context representation of word vector embedding; inputting the initial context representation into a graph convolution network to obtain a graph characteristic representation of a text; extracting features of the graph feature representation based on a pre-trained attention selection model, and performing mask operation on the obtained features to obtain a new context representation; the problem that although grammar information is brought to the representation of each word by executing the traditional graph convolution network on the dependency tree, the interaction between the aspect word and the remote opinion word is limited is solved, and the emotion classification accuracy is improved.
(2) According to the scheme, the attention module is selected, the capability of capturing syntactic information is enhanced, the syntactic information and semantic information of sentences can be effectively combined, and the accuracy and stability of emotion polarity judgment on different data sets are improved.
Advantages of additional aspects of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure and are not to limit the disclosure.
Fig. 1 is a flowchart of an aspect-level emotion analysis method based on a graph-convolution network and attention selection according to a first embodiment of the disclosure.
Fig. 2 is a schematic structural diagram of an aspect-level emotion analysis network model based on a graph convolution network and attention selection in a first embodiment of the disclosure.
Fig. 3 is a schematic structural diagram of a single-layer selective attention model according to a first embodiment of the disclosure.
Detailed Description
The present disclosure is further described with reference to the following drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
The first embodiment is as follows:
the embodiment aims to provide an aspect level emotion analysis method based on a graph convolution network and attention selection.
As shown in FIG. 1, a method for analyzing emotion in aspect level based on graph convolution network and attention selection comprises the following steps:
acquiring a text to be analyzed, and converting the text into word vector embedded representation;
performing feature extraction on the word vector embedded representation by using a bidirectional LSTM to obtain an initial context representation of word vector embedding;
inputting the initial context representation into a graph convolution network to obtain a graph characteristic representation of a text; extracting features of the graph feature representation based on a pre-trained attention selection model, and performing mask operation on the obtained features to obtain a new context representation;
and splicing the initial context representation and the new context representation, and inputting the spliced vector into a pre-trained emotion classifier to obtain an emotion classification result.
Specifically, for ease of understanding, the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings:
first, an explanation is made of "aspect" in aspect-level sentiment analysis, which refers to an entity attribute of a comment object (as in restaurant comments, an aspect may be taste of food, environment, etc.).
As shown in fig. 2, an aspect level emotion analysis method based on a graph convolution network and attention selection specifically includes the following steps:
step 1: acquiring a text to be analyzed; carrying out word embedding training processing on a text to be analyzed, converting the text into word vector embedding, embedding words to obtain word vector expression of each word in the text, and adopting a GloVe embedding mode. Given text sequence
Figure BDA0003069019850000051
Comprising n words, the aspect word is m words starting from the tau word, and the sequence of the aspect word is
Figure BDA0003069019850000052
GloVe embedded matrix through pre-training
Figure BDA0003069019850000053
Matching each word to a corresponding embedded vector
Figure BDA0003069019850000054
Wherein d ismRepresents the embedding dimension of the word vector, | V | represents the vocabularyThe size of the table.
Step 2: and (4) embedding the word vectors obtained in the step (1) into context expression. For GloVe embedding, we use Bi-directional Bi-LSTM as the context editor, we input the word vector embedding matrix obtained in step 1 into Bi-directional Bi-LSTM, the output representation of the hidden state vector generated by Bi-directional Bi-LSTM
Figure BDA0003069019850000055
Represents a hidden state vector from time step t of the bi-directional LSTM, and dhIs the dimension of the hidden state vector output by the unidirectional LSTM.
And step 3: inputting the context representation obtained in the step 2 into a graph convolutional network, and firstly, entering the context representation obtained in the step 2 into a layer of GCN, and capturing aspect word nodes (a graph is represented by a dependency tree, wherein each word is regarded as a single node, the graph is represented as a node feature, and the aspect words are regarded as the aspect word nodes) and grammatical relations between adjacent nodes of the graph. The graph-rolled network layer operating on the node representation can be represented as:
Figure BDA0003069019850000061
wherein H(l)Represents the output of the L layer in the GCN,
Figure BDA0003069019850000062
representing the output of the GCN of the previous layer, WlAnd blRepresenting a parameter to be learned, AijIt is indicated whether the ith word and the jth word in the sentence are adjacent in the dependency tree. ReLU denotes an activation function.
And 4, step 4: inputting the vector obtained from the GCN layer in step 3 into a Selection Attention model (S-Att-GCN model), a plurality of S-Att-GCN (Selection Attribution based Graph Convo-conditional Network) models can be stacked to form a deep model (in this embodiment, a single-layer S-Att-GCN model shown in FIG. 3 is selected), the output of each S-Att-GCN is the input of the next S-Att-GCN layer, and each S-Att-GCN module comprises three parts, namely a multi-head self-Attention layer, a top-k Selection layer and a GCN layer.
Step 4.1: and (4) inputting the vector output obtained by the GCN layer in the step 3 into a multi-head self-attention layer for relationship extraction. Applying multi-head self-attention to obtain an attention scoring matrix
Figure BDA0003069019850000063
The obtained attention score matrix can be considered as L fully connected graphs, where each word is connected to all other context words with different attention weights. The attention score may be expressed as:
Figure BDA0003069019850000064
Figure BDA0003069019850000065
wherein the content of the first and second substances,
Figure BDA0003069019850000066
node representation, W, representing the GCN layerq、WkRepresenting a learnable weight matrix, dheadRepresenting the dimension of each head, dhThe dimensions of the input node features are represented, and L represents the number of heads of the multi-head self-attention.
Step 4.2: after obtaining the attention score matrix by multi-headed self-attention, avoiding a fully connected graph easily leads to the problem of the facet words fusing all other word information and the problem of easily introducing noise during feature aggregation in the GCN, thereby compromising emotional prediction. Therefore, we propose a top-k attention selection mechanism to shrink the fully connected graph and obtain a new sparse graph for feature aggregation of GCN. For each attention score matrix
Figure BDA0003069019850000076
We find the first k important context words of each word, effectively removing the scoring matrix
Figure BDA0003069019850000077
Some edges in the table. We select only the top k context words because a few words are sufficient to determine the emotional polarity of a facet word. Other words with lower attention scores are discarded to remove noise, and the method is beneficial to the aspect-level emotion analysis task.
For the top-k attention selection mechanism we propose two strategy options: head independent and head dependent. Head independent policy: the k context words are determined by aggregating the decisions made by all headers and arriving at the protocol between the headers. We first summarize the attention score matrix for each head element and then find the top-k context word using the mask generated by the function topk. For example, if k is set to 2, topk ([0.3,0.2,0.5]) returns [1,0,1 ]. Finally, we will apply the SoftMax operation on the updated attention score matrix. This process can be expressed as:
Figure BDA0003069019850000071
AmI=topk(As) (5)
Figure BDA0003069019850000072
wherein A issRepresenting a matrix, A, in which all heads are gatheredmIIndicating that the first k high attention scoring matrices were selected,
Figure BDA0003069019850000073
final matrix representing head independent policy "
Figure BDA0003069019850000074
"denotes multiplication by element.
Head-dependent policy: so that each head can retain its own selection of k words. And respectively finding the top k context words according to the attention score matrix of each head. We apply the softmax operation to each top-k attention matrix. This process can be expressed as:
Figure BDA0003069019850000075
Figure BDA0003069019850000081
wherein the content of the first and second substances,
Figure BDA0003069019850000082
indicating that the first k high attention scoring matrices were selected for each head,
Figure BDA0003069019850000083
a final matrix representing the head dependency policy.
Both attention selection mechanisms typically select more important context words than the head-dependent strategy, and since each head may select a different k words, there is always a total of more than k words to select.
Step 4.3: and inputting the output obtained in the step 4.2 into a layer of GCN to obtain updated node characteristics. From the top-k selection, we get L graphs based on the new attention scores and pass them to the next GCN layer. The resulting top-k score matrix A can be thought of as an adjacency matrix, where A (p, q) represents the weights of the edges connecting word p and word q. Note that a does not contain self-loops, we add one for each node. We apply a layer of GCN and get updated node characteristics, which can be expressed as:
Figure BDA0003069019850000084
Figure BDA0003069019850000085
wherein the content of the first and second substances,
Figure BDA0003069019850000086
the output of the S-Att-GCN representing the L layer is formed by connecting the outputs of the i heads in series
Figure BDA0003069019850000087
The output of each layer of S-Att-GCN is the input of the next layer of S-Att-GCN, AiAttention score matrix, W, representing i headsiRepresenting a learnable matrix.
And 5: the final sequence of S-Att-GCN layer output is represented as
Figure BDA0003069019850000088
Step 6: and (5) embedding the sequence finally obtained by the S-Att-GCN layer in the step 5 into a mask layer of a specific aspect, keeping the aspect words unchanged, and setting other context words to be zero. The output that results in the mask layer for a particular aspect is an aspect-oriented feature, and the final output is represented as
Figure BDA0003069019850000089
And 7: output H of hidden state vector generated by step 2 Bi-directional Bi-LSTMCAnd final output of step 6
Figure BDA00030690198500000810
A refined representation of the hidden state vector is generated by a new search-based attention mechanism. Important features related to the aspect word semantics of the hidden state vector are retrieved and a retrieval-based attention is set for each context. Attention weights are expressed as follows:
Figure BDA0003069019850000091
Figure BDA0003069019850000092
the dot product is used to measure semantic relevance between the facet words and context in the sentence so that a particular facet mask layer can function, as shown in equation 11.
And 8: the final representation of the prediction is:
Figure BDA0003069019850000093
and step 9: and (3) processing the output in the step (8) by using an emotion classifier (consisting of a full connection layer and a softmax layer) to obtain a final emotion polarity prediction result. Finally, the finally obtained feature vector representation is sent into a fully-connected softmax layer to obtain probability distribution
Figure BDA0003069019850000094
For example, "this restaurant food is savory but badly conditioned," in this sentence "taste" is a positive emotion and "ambience" is a negative emotion.
p=soft max(WPθ+bp) (14)
Wherein, WPAnd bpRespectively representing the weight matrix and the bias to be learned, dpThe number of categories representing the emotional polarity.
Step 10: after obtaining probability distribution p of emotion polarity, training a model through a standard gradient descent algorithm, and defining an objective function as L2The cross-entropy loss of the regularization term is expressed as:
Figure BDA0003069019850000095
wherein D represents the training data set,
Figure BDA0003069019850000096
a true-value label is shown on the label,
Figure BDA0003069019850000097
to representP in the first
Figure BDA0003069019850000098
And (4) each element. Theta denotes all parameters requiring training and lambda denotes L2Coefficients of the regularization term.
Example two:
the embodiment aims to provide an aspect level emotion analysis system based on a graph convolution network and attention selection.
An aspect level sentiment analysis system based on graph convolution networks and selection attention, comprising:
the data preprocessing unit is used for acquiring a text to be analyzed and converting the text into word vector embedded representation;
a feature extraction unit, configured to perform feature extraction on the word vector embedded representation by using a bidirectional LSTM to obtain an initial context representation of word vector embedding; inputting the initial context representation into a graph convolution network to obtain a graph characteristic representation of a text; extracting features of the graph feature representation based on a pre-trained attention selection model, and performing mask operation on the obtained features to obtain a new context representation;
a feature splicing unit for splicing the initial context representation with a new context representation;
and the emotion prediction unit is used for inputting the spliced vectors into a pre-trained emotion classifier to obtain emotion classification results.
Example three:
the emotion analysis is an important component of user behavior analysis and is a process of analyzing, processing, inducing and reasoning subjective texts with emotion colors. On one hand, the emotion analysis technology can mine opinions of users on products or services by screening and classifying user comments, and predict user behaviors based on the opinions, so that a scientific and reasonable operation strategy is formulated; on the other hand, by carrying out sentiment analysis on a large amount of texts, the network public opinion can be effectively monitored, the trend of the network public opinion can be predicted, the public opinion crisis can be timely monitored, and early warning can be given out, so that the network safety can be maintained, and a harmonious network environment can be constructed.
In this embodiment, based on the emotion analysis method provided by the present disclosure, a user behavior prediction method is provided, including:
acquiring a daily network data text of a user, and classifying emotions by using the aspect-level emotion analysis method based on the graph convolution network and the selected attention;
and predicting the user behavior in real time based on the emotion classification result, and giving an alarm according to the prediction condition.
Further, the user behavior includes purchasing behavior for a product.
In further embodiments, there is also provided:
an electronic device comprising a memory and a processor, and computer instructions stored on the memory and executed on the processor, the computer instructions when executed by the processor performing the method of embodiment one. For brevity, no further description is provided herein.
It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and so on. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include both read-only memory and random access memory, and may provide instructions and data to the processor, and a portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.
A computer readable storage medium storing computer instructions which, when executed by a processor, perform the method of embodiment one.
The method in the first embodiment may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, among other storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor. To avoid repetition, it is not described in detail here.
Those of ordinary skill in the art will appreciate that the various illustrative elements, i.e., algorithm steps, described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The aspect-level emotion analysis method and system based on the graph convolution network and the selection attention can be achieved, and have wide application prospects.
The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure, and various modifications and changes may be made to the present disclosure by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.
Although the present disclosure has been described with reference to specific embodiments, it should be understood that the scope of the present disclosure is not limited thereto, and those skilled in the art will appreciate that various modifications and changes can be made without departing from the spirit and scope of the present disclosure.

Claims (10)

1. An aspect level emotion analysis method based on a graph convolution network and attention selection is characterized by comprising the following steps:
acquiring a text to be analyzed, and converting the text into word vector embedded representation;
performing feature extraction on the word vector embedded representation by using a bidirectional LSTM to obtain an initial context representation of word vector embedding;
inputting the initial context representation into a graph convolution network to obtain a graph characteristic representation of a text; extracting features of the graph feature representation based on a pre-trained attention selection model, and performing mask operation on the obtained features to obtain a new context representation;
and splicing the initial context representation and the new context representation, and inputting the spliced vector into a pre-trained emotion classifier to obtain an emotion classification result.
2. The method of claim 1, wherein the extracting hidden state vectors of the word embedding vectors using bi-directional LSTM comprises: using the bi-directional LSTM as a context editor, the word vector embedding matrix of the text is input to the bi-directional LSTM, obtaining the hidden state vector as an initial context representation of the word vector embedding matrix.
3. The method for analyzing emotion at an aspect level based on graph convolution network and selection attention according to claim 1, wherein the inputting the initial context representation into the graph convolution network to obtain a graph feature representation of a text specifically comprises: and inputting the initial context representation into a layer of GCN, capturing grammatical relations between the aspect word nodes and the adjacent nodes thereof by using the GCN, and outputting the graph feature matrix.
4. The method as claimed in claim 1, wherein the selected attention model comprises a multi-head self-attention layer, a top-k selection layer and a GCN layer which are connected in sequence, wherein the multi-head self-attention layer is used for relationship extraction to obtain an attention score matrix, the top-k layer is used for sparse processing of the attention score matrix to obtain coefficient representation thereof, and the GCN layer is used for obtaining updated node feature vectors.
5. The method for analyzing emotion at an aspect level based on graph convolution network and attention selection according to claim 1, wherein the mask operation is performed on the obtained features to obtain a new context representation, specifically: and setting the context words except the aspect words in the obtained node feature vector to zero.
6. The method for analyzing emotion at an aspect level based on a graph and volume network and attention selection as claimed in claim 1, wherein the text to be analyzed is obtained and converted into, specifically: and performing word embedding training on the text to be analyzed in a GloVe embedding mode, and converting the text into word embedding vector representation.
7. The method of aspect-level sentiment analysis based on graph and volume networks and selection attention of claim 1 wherein the sentiment classifier comprises a fully connected layer and a softmax layer.
8. An aspect-level sentiment analysis system based on graph convolution networks and attention selection, comprising:
the data preprocessing unit is used for acquiring a text to be analyzed and converting the text into word vector embedded representation;
a feature extraction unit, configured to perform feature extraction on the word vector embedded representation by using a bidirectional LSTM to obtain an initial context representation of word vector embedding; inputting the initial context representation into a graph convolution network to obtain a graph characteristic representation of a text; extracting features of the graph feature representation based on a pre-trained attention selection model, and performing mask operation on the obtained features to obtain a new context representation;
a feature splicing unit for splicing the initial context representation with a new context representation;
and the emotion prediction unit is used for inputting the spliced vectors into a pre-trained emotion classifier to obtain emotion classification results.
9. An electronic device comprising a memory, a processor, and a computer program stored and executed on the memory, wherein the processor, when executing the program, implements a graph convolution network-based and attention-selecting aspect-level sentiment analysis method according to any one of claims 1 to 7.
10. A non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for graph convolution based network and selected attention aspect level sentiment analysis according to any one of claims 1 to 7.
CN202110534313.5A 2021-05-17 2021-05-17 Aspect-level emotion analysis method and system based on graph convolution network and attention selection Pending CN113361258A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110534313.5A CN113361258A (en) 2021-05-17 2021-05-17 Aspect-level emotion analysis method and system based on graph convolution network and attention selection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110534313.5A CN113361258A (en) 2021-05-17 2021-05-17 Aspect-level emotion analysis method and system based on graph convolution network and attention selection

Publications (1)

Publication Number Publication Date
CN113361258A true CN113361258A (en) 2021-09-07

Family

ID=77526920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110534313.5A Pending CN113361258A (en) 2021-05-17 2021-05-17 Aspect-level emotion analysis method and system based on graph convolution network and attention selection

Country Status (1)

Country Link
CN (1) CN113361258A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114580738A (en) * 2022-03-03 2022-06-03 厦门大学 Social media crisis event prediction method and system
CN114881042A (en) * 2022-06-02 2022-08-09 电子科技大学 Chinese emotion analysis method based on graph convolution network fusion syntax dependence and part of speech
CN115204183A (en) * 2022-09-19 2022-10-18 华南师范大学 Knowledge enhancement based dual-channel emotion analysis method, device and equipment
CN115936077A (en) * 2022-12-30 2023-04-07 湖北工业大学 Dependency tree based aspect level emotion analysis interactive convolution network
WO2023077562A1 (en) * 2021-11-03 2023-05-11 深圳市检验检疫科学研究院 Graph perturbation strategy-based event detection method and apparatus
CN116561323A (en) * 2023-06-30 2023-08-08 西安邮电大学 Emotion analysis method based on aspect word embedding graph convolution network
CN116721361A (en) * 2023-06-09 2023-09-08 中国测绘科学研究院 Wetland remote sensing extraction method compatible with space-time discontinuous images
CN114580738B (en) * 2022-03-03 2024-05-31 厦门大学 Social media crisis event prediction method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112528672A (en) * 2020-12-14 2021-03-19 北京邮电大学 Aspect-level emotion analysis method and device based on graph convolution neural network
CN112633010A (en) * 2020-12-29 2021-04-09 山东师范大学 Multi-head attention and graph convolution network-based aspect-level emotion analysis method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112528672A (en) * 2020-12-14 2021-03-19 北京邮电大学 Aspect-level emotion analysis method and device based on graph convolution neural network
CN112633010A (en) * 2020-12-29 2021-04-09 山东师范大学 Multi-head attention and graph convolution network-based aspect-level emotion analysis method and system

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
GUANTAO XU等: "Attention-Enhanced Graph Convolutional Networks for Aspect-Based Sentiment Classification with Multi-Head Attention", 《APPLIED SCIENCE》 *
JIE LIU等: "Graph Convolutional Networks with Bidirectional Attention for Aspect-Based Sentiment Classification", 《APPLIED SCIENCE》 *
QI DING等: "RMPD: Method for Enhancing the Robustness of Recommendations With Attack Environments", 《IEEE》 *
QIUYUE ZHANG等: "Interactive Multi-Head Attention Networks for Aspect-Level Sentiment Classification", 《IEEE》 *
XIAOCHEN HOU等: "Selective Attention Based Graph Convolutional Networks for Aspect-Level Sentiment Classification", 《ARXIV》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023077562A1 (en) * 2021-11-03 2023-05-11 深圳市检验检疫科学研究院 Graph perturbation strategy-based event detection method and apparatus
CN114580738B (en) * 2022-03-03 2024-05-31 厦门大学 Social media crisis event prediction method and system
CN114580738A (en) * 2022-03-03 2022-06-03 厦门大学 Social media crisis event prediction method and system
CN114881042B (en) * 2022-06-02 2023-05-02 电子科技大学 Chinese emotion analysis method based on graph-convolution network fusion of syntactic dependency and part of speech
CN114881042A (en) * 2022-06-02 2022-08-09 电子科技大学 Chinese emotion analysis method based on graph convolution network fusion syntax dependence and part of speech
CN115204183B (en) * 2022-09-19 2022-12-27 华南师范大学 Knowledge enhancement-based two-channel emotion analysis method, device and equipment
CN115204183A (en) * 2022-09-19 2022-10-18 华南师范大学 Knowledge enhancement based dual-channel emotion analysis method, device and equipment
CN115936077A (en) * 2022-12-30 2023-04-07 湖北工业大学 Dependency tree based aspect level emotion analysis interactive convolution network
CN115936077B (en) * 2022-12-30 2023-09-15 湖北工业大学 Dependency tree-based aspect-level emotion analysis interactive convolution network
CN116721361A (en) * 2023-06-09 2023-09-08 中国测绘科学研究院 Wetland remote sensing extraction method compatible with space-time discontinuous images
CN116721361B (en) * 2023-06-09 2024-01-02 中国测绘科学研究院 Wetland remote sensing extraction method compatible with space-time discontinuous images
CN116561323A (en) * 2023-06-30 2023-08-08 西安邮电大学 Emotion analysis method based on aspect word embedding graph convolution network
CN116561323B (en) * 2023-06-30 2023-09-19 西安邮电大学 Emotion analysis method based on aspect word embedding graph convolution network

Similar Documents

Publication Publication Date Title
CN113361258A (en) Aspect-level emotion analysis method and system based on graph convolution network and attention selection
CN108363790B (en) Method, device, equipment and storage medium for evaluating comments
CN111159395B (en) Chart neural network-based rumor standpoint detection method and device and electronic equipment
CN111881291A (en) Text emotion classification method and system
US10997369B1 (en) Systems and methods to generate sequential communication action templates by modelling communication chains and optimizing for a quantified objective
CN109597493B (en) Expression recommendation method and device
CN113094578B (en) Deep learning-based content recommendation method, device, equipment and storage medium
KR20190063978A (en) Automatic classification method of unstructured data
CN113591483A (en) Document-level event argument extraction method based on sequence labeling
CN111666409B (en) Integrated emotion intelligent classification method for complex comment text based on comprehensive deep capsule network
CN112633010A (en) Multi-head attention and graph convolution network-based aspect-level emotion analysis method and system
CN111914185A (en) Graph attention network-based text emotion analysis method in social network
CN104484815A (en) Product-oriented emotion analysis method and system based on fuzzy body
CN112232087B (en) Specific aspect emotion analysis method of multi-granularity attention model based on Transformer
Jacob Modelling speech emotion recognition using logistic regression and decision trees
CN113139134B (en) Method and device for predicting popularity of user-generated content in social network
CN113254637B (en) Grammar-fused aspect-level text emotion classification method and system
CN113449204B (en) Social event classification method and device based on local aggregation graph attention network
CN111538841B (en) Comment emotion analysis method, device and system based on knowledge mutual distillation
CN113987167A (en) Dependency perception graph convolutional network-based aspect-level emotion classification method and system
CN114218922A (en) Aspect emotion analysis method based on dual-channel graph convolution network
CN112215629B (en) Multi-target advertisement generating system and method based on construction countermeasure sample
Af'idah et al. Long short term memory convolutional neural network for Indonesian sentiment analysis towards touristic destination reviews
Liu et al. Unveiling consumer preferences in automotive reviews through aspect-based opinion generation
CN106503066A (en) Process Search Results method and apparatus based on artificial intelligence

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210907

RJ01 Rejection of invention patent application after publication