Aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network

By integrating external emotional knowledge and relationships between aspects in aspect-level emotion analysis, and using interactive graph convolution network to enhance emotional feature representation, the accuracy and robustness of emotional polarity judgment in the prior art are solved, and more efficient aspect-level emotion analysis is achieved.

CN119903186AInactive Publication Date: 2025-04-29NANJING UNIV OF INFORMATION SCI & TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510364850.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-04-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing aspect-level emotion analysis technology has limitations when dealing with complex sentences, making it difficult to accurately judge emotional polarity, and lacks methods to integrate external emotional knowledge and relationships between aspects, resulting in poor accuracy and robustness in judging emotional polarity.

Method used

The aspect-level emotion analysis method based on knowledge enhancement and interactive graph convolution network is adopted to integrate Senticnet's emotional knowledge, and the syntactic dependency structure of contextual emotion knowledge is weighted to enhance the perception of emotional characteristics, and the potential emotional dependence relationship between different aspects is captured through inter-face relationship diagrams.

Benefits of technology

It improves the accuracy and stability of emotional classification, reduces the wrong prediction phenomenon caused by unclear views, and enhances the model's understanding of emotional common sense and the accuracy of emotional polarity judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903186A_ABST
    Figure CN119903186A_ABST
Patent Text Reader

Abstract

The invention discloses an aspect-level sentiment analysis method based on knowledge enhancement and an interactive graph convolutional network. The method comprises the steps of performing word embedding and coding on a to-be-analyzed text to obtain hidden state vector representation; weighting a syntactic dependency structure by utilizing the situational emotion knowledge, and obtaining an emotion knowledge enhancement graph by enhancing a given aspect; obtaining an inter-aspect relation graph by using potential relations existing among different aspects in the statement; obtaining a final context representation by using a feature fusion mechanism by using a learning emotion knowledge enhancement graph interacted by a graph convolutional network and the inter-aspect relation graph; and performing classification operation by using a Softmax function to obtain an emotion polarity prediction result. According to the invention, the accuracy and stability of emotion polarity prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sentiment analysis in natural language processing, and in particular to an aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional networks. Background Art

[0002] With the rapid development of the Internet, especially social media, a huge amount of comment data has been generated. In order to explore the application value of the data, sentiment analysis has gradually become an important research direction in the field of natural language processing (NLP). According to the granularity of text analysis, sentiment analysis tasks can be divided into three categories: document level, sentence level and aspect level. Both document-level and sentence-level sentiment analysis tasks predict the overall sentiment polarity of a given text, including positive, neutral and negative. However, traditional sentiment analysis has certain limitations when dealing with complex sentences. For example, when faced with the comment "The food was delicious but the environment was noisy", traditional sentiment analysis cannot accurately judge its sentiment polarity, so the analysis result is relatively rough. However, when focusing on the aspect level, we can clearly understand that the comment expresses a positive view on "food" and a negative view on "environment". Aspect-level sentiment analysis is a fine-grained task that can predict sentiment polarity for different given aspects in the text, and more clearly judge the multiple sentiment polarities contained in the text, so it has profound research significance.

[0003] Early aspect-level sentiment analysis tasks usually used machine learning methods. Recently, deep learning technology has attracted widespread attention due to its ability to significantly improve the performance of sentiment classification by automatically extracting features. Among them, the method based on graph convolutional network (GCN) is widely used as a method to integrate syntactic information using syntactic structure. Although most previous works have made continuous improvements in aspect-level sentiment classification tasks, there are still some problems. On the one hand, most existing works usually focus on learning dependency information from context words to aspect words based on sentence dependency trees, lacking the integration of external sentiment knowledge to enhance the model's understanding of sentiment common sense, resulting in low attention to opinion words that affect sentiment prediction, resulting in errors in sentiment polarity judgment. On the other hand, in the aspect-level sentiment analysis task, many aspect words of comments lack corresponding sentiment opinion words, and existing works fail to consider connecting aspect words without obvious sentiment expression with other aspect-valuable sentiment features, resulting in poor accuracy and robustness in sentiment polarity judgment. Summary of the invention

[0004] Purpose of the invention: The present invention aims to provide an aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional networks. The present invention explores new solutions to aspect-level sentiment analysis tasks by integrating the sentiment knowledge of Senticnet, and uses contextual sentiment knowledge to weight syntactic dependency structures to enhance the perception of sentimental features. In addition, the present invention also solves the problem of ignoring potential relationships between different aspects. By mining the relationships between aspects in sentences, the phenomenon of incorrect predictions due to unclear viewpoints in the sentiment analysis process is reduced. Finally, the present invention improves the accuracy and stability of predicting sentiment polarity by learning aspect-specific sentiment knowledge enhancement graphs and aspect relationship graphs through the designed interactive graph convolutional network.

[0005] Technical solution: The aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network described in the present invention comprises the following steps: (1) Text embedding and encoding: Use a pre-trained word embedding algorithm to map each word of the input text into a low-dimensional vector to generate a word embedding matrix; input the word embedding matrix into a bidirectional long short-term memory network (BiLSTM) to obtain the hidden state vector representation of the text; (2) Emotional knowledge enhancement: An adjacency matrix is ​​constructed based on the sentence dependency syntactic tree, and a sentiment score matrix is ​​generated by combining the sentiment scores of words from the sentiment knowledge base SenticNet. An aspect enhancement matrix is ​​introduced, and the sentiment score matrix and adjacency matrix are weighted to generate a sentiment knowledge enhancement graph. (3) Enhancement of inter-aspect relations: Analyze the potential sentiment dependencies between different aspect items in the input sentence and construct an inter-aspect relation graph; (4) Interactive graph convolution and feature fusion: The graph convolution network (GCN) is used to extract features from the sentiment knowledge enhancement graph and the aspect relationship graph, respectively, to obtain sentiment feature representation and aspect relationship feature representation; the weights of the two features are adjusted through the feature fusion mechanism to generate the final context representation; (5) Sentiment classification: Mask the final context representation and retain the aspect word features; input the masked features into the classifier and predict the sentiment polarity through the Softmax function.

[0006] Furthermore, step (1) is as follows: the word embedding algorithm is Glove, and the generated dimension is Word vector; BiLSTM generates a context vector of dimension 2d through bidirectional hidden state concatenation .

[0007] Furthermore, in step (2), the adjacency matrix construction formula is: ; in, Represents the input statementS Middle i words, if the word and If there is a dependency relationship between them, then the adjacency matrix D The corresponding element in is 1, otherwise it is 0; Furthermore, in step (2), the calculation formula of the sentiment score matrix is: ; in, Represents a word in SenticNet The sentiment score is between -1 and 1. mean is a neutral word or does not exist in SenticNet.

[0008] Furthermore, in step (2), the aspect enhancement matrix is ​​defined as: ; in, Represents the input statement S Middle i words, if the word and If there is an aspect word, it is assigned a value of 1, otherwise it is assigned a value of 0.

[0009] The calculation formula of the sentiment knowledge enhancement graph is:

[0010] in represents the adjacency matrix, represents the sentiment score matrix, Represents the aspect enhancement matrix.

[0011] Furthermore, in step (3), the formula for constructing the relationship graph between aspects is: ; in, Represents the input statement S Middle i words, is a set of words in a particular aspect, is the starting position of a specific aspect, A set of words that represent other aspects, Represents the absolute value function, the relationship diagram between aspects middle = .

[0012] Furthermore, in step (4), the interactive graph convolutional network adopts a multi-layer GCN structure, and the update formula of the l-th layer node is: ;

[0013]

[0014] in, is the linear transformation weight, is the bias term, is the hidden representation generated by the previous layer of GCN, is a function that assigns position weights, Represents the Relu activation function, which is a normalized symmetric adjacency matrix. It is in the dependency parse tree Dimensions; The calculation formula of the feature fusion mechanism is: ; in, is the coefficient used to adjust the weight of aspect features, H A Represents the features and H R Represents the features generated by the graph of relationships between aspects.

[0015] Furthermore, in step (5), masking is performed by setting the hidden states of non-aspect words to zero, retaining the vectors of aspect words; and the classifier uses an attention mechanism to calculate weights.

[0016] An electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, it implements any one of the aspect-level sentiment analysis methods based on knowledge enhancement and interactive graph convolutional networks.

[0017] A storage medium described in the present invention stores a computer program, and when the computer program is executed by a processor, it implements any one of the aspect-level sentiment analysis methods based on knowledge enhancement and interactive graph convolutional networks.

[0018] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: when processing ABSA tasks, the present invention integrates two different types of knowledge: external sentiment knowledge based on syntactic dependency structure and internal potential knowledge of the relationship between different aspects of sentences. By incorporating external sentiment information into the graph network, the accuracy of sentiment classification is effectively improved. At the same time, by exploring the potential sentiment dependency relationship between different aspects in the sentence, the phenomenon of incorrect prediction due to lack of viewpoints in the sentiment analysis process is solved; the present invention proposes a new type of graphic perception model with an interactive graph convolutional network. The interactive graph convolutional network model can not only be aware of important context and aspect words when interactively learning the sentiment characteristics of specific aspects, but also avoid the problem of incorrect prediction due to excessive learning of knowledge. In cases where it is impossible to correctly distinguish, the sentiment features extracted from different types of knowledge are integrated through an interactive learning method, which greatly improves the efficiency of processing aspect-level sentiment analysis tasks. The present invention introduces a feature fusion mechanism to obtain a richer and more comprehensive representation of contextual sentiment features. The mechanism aims to fuse features at different levels. The features of external sentiment knowledge usually contain more detailed information, while the features of internal potential knowledge contain more abstract information. By fusing these features, richer information is captured, thereby improving the performance of processing tasks. The method of the present invention is not only applicable to aspect-level sentiment analysis tasks, but can also be expanded to more complex multimodal sentiment analysis tasks by optimizing the method, thus constructing a set of novel and practical implementation means for sentiment analysis tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 It is a model framework diagram of the present invention; Figure 3 This is the influence of different GCN layers on the accuracy and F1 score of the present invention, where Figure 3 (a) is the Rest14 dataset, Figure 3 (b) is the Lap14 dataset, Figure 3 (c) in the figure is the Rest15 dataset, Figure 3 (d) in the figure is the Rest16 dataset. DETAILED DESCRIPTION

[0020] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0021] like Figure 1 As shown, the embodiment of the present invention provides an aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network, and the flowchart is shown in Figure 1As shown, it includes: using the GloVe algorithm to generate a word embedding matrix for each input sentence, and then using a bidirectional long short-term memory network to generate a contextual representation of the hidden state corresponding to the word embedding matrix; then using the Spacy tool to build a dependency tree of the input sentence and convert it into a dependency matrix, and combining the sentiment score of SenticNet to enhance the sentiment characteristics of a given aspect, and then obtaining a sentiment knowledge enhancement graph by highlighting the given aspect; at the same time, by analyzing the potential relationship between different aspects in the same sentence, an aspect relationship graph is constructed for each input sentence; then, an interactive graph convolutional network is used to learn the sentiment knowledge enhancement graph and the aspect relationship graph, and the weights of the two feature representations are adjusted through a feature fusion mechanism to obtain the final contextual representation; finally, the obtained final contextual representation is sent to the classifier, and the Softmax function is used for classification to obtain the sentiment polarity prediction result.

[0022] The method model architecture provided in this embodiment is as follows Figure 2 As shown in the figure, the model consists of five modules: (1) text embedding and encoding layer; (2) sentiment knowledge enhancement module; (3) aspect relationship enhancement module; (4) interactive graph convolution and feature fusion module; (5) sentiment classification module. The specific implementation is as follows: Text embedding and encoding layer: This layer aims to obtain the initial context features by embedding and encoding the input sentence. First, the Glove algorithm is used to map each word of the input sentence to a low-dimensional real-valued vector to form a word embedding matrix; then, the generated word embedding matrix is ​​input to the BiLSTM layer to obtain the initial hidden context features of the sentence. Specifically, for a given sentence consisting of n Sentences consisting of words S = { w 1, w 2 , ... , w a1 , w a2 , ... , w ak , ..., w n}, S Including length k Aspect word sequence A = { w a1 , w a2 , ... , w ak},in w i Indicates i context words,w ai Indicates the first i First, with the help of the pre-trained Glove embedding matrix To obtain its embedding representation h ={ h 1, h 2 , ... , h a1 , h a2 , ... , h ak , ..., h n},in h i Representing context words w i The embedding h ai Words that express aspect w ai The embedding Indicates the size of the vocabulary, Represents the dimension of word embedding. Then, BiLSTM is used to encode the embedding representation of the sentence, and two LSTMs are used to process the forward and reverse input sequences to capture the contextual information before and after the current position; the specific process is represented by the following formula: ; ; For each word w i , the hidden state vectors generated by the two LSTMs are combined to obtain the final context representation: ; in The context vector representing the hidden state generated by the BiLSTM.

[0023] Emotional knowledge enhancement module: This module aims to introduce external emotional knowledge to enhance syntactic structure dependencies and capture emotional relationships between context words. Considering the importance of syntactic structure knowledge, this module first uses the syntactic parsing tool SpaCy to obtain the dependency syntactic tree and convert it into an adjacency matrix; then, the emotional knowledge base SenticNet is used to perform sentiment analysis on each word in the sentence to obtain its sentiment score, and the sentiment scores between the two context words are added to obtain the sentiment score matrix, and finally, sentiment information is assigned to all dependencies in the adjacency matrix. At the same time, in order to highlight the given aspect, an aspect enhancement matrix is ​​introduced, and the sentiment score matrix is ​​weighted to obtain the emotional knowledge enhancement graph. Specifically, the syntactic parsing tool SpaCy is first used to obtain the dependency syntactic tree of the input sentence, and a dependency adjacency matrix is ​​constructed based on the dependency relationships in the dependency syntactic tree. , the adjacency matrix construction formula is as follows: ; in Represents the input statement S Middle i words, if the word and If there is a dependency relationship between them, then the adjacency matrix D The corresponding element in is 1, and the rest are 0.

[0024] In order to highlight the context words that are highly related to the aspect words in terms of sentiment relationship, the sentiment knowledge base SenticNet is used to obtain the sentiment score of each word in the input sentence to enhance the syntactic dependency matrix, thereby obtaining the sentiment score matrix : ; in, Represents a word in SenticNet The sentiment score is between -1 and 1. represent Is a neutral word or does not exist in SenticNet.

[0025] Considering the importance of aspect words for sentiment polarity analysis, in order to further highlight the sentiment dependency between a given aspect and its contextual words, an aspect enhancement matrix is ​​defined: : ; in Represents the input statement S Middle i words, if the word and If there is an aspect word, it is assigned a value of 1, otherwise it is assigned a value of 0; Finally, in the sentiment score matrix P Based on the introduction of aspect enhancement matrix T , while using the sentiment score matrix P is the dependency matrix D Assign sentiment information to all dependencies in the graph to obtain sentiment knowledge enhancement graph : ; in represents the adjacency matrix, represents the sentiment score matrix, Represents the aspect enhancement matrix.

[0026] Aspect Relation Enhancement Module: This module aims to explore the sentiment relationship between different aspects in a sentence. First, each input sentence is analyzed to explore the potential dependencies between other aspects in the context and the target aspect. Then, the obtained aspect relationships are used to construct an aspect relationship graph. Specifically, considering that the potential sentiment relationship between different aspect words in the input sentence helps the model perform sentiment analysis, each input sentence is analyzed, the target aspect is filtered out from the sentence, and the potential sentiment dependency relationship with other aspect items is explored. Then, the aspect relationship graph in the input sentence is constructed with the help of the discovered potential sentiment dependency. , in order to derive the contextual sentiment dependencies of these aspects, where the relationship graph between aspects is constructed as follows: ; in Represents the input statement S Middle i words, is a set of words in a particular aspect, is the starting position of a specific aspect, A set of words that represent other aspects, Represents the absolute value function, the relationship diagram between aspects middle = .

[0027] Interactive graph convolution and feature fusion module: This module aims to enhance the representation and generalization capabilities of the aspect-level sentiment analysis model. In order to solve the problem that the model cannot correctly distinguish after introducing multiple layers of knowledge, this module uses an interactive graph convolutional network model to interactively learn the sentiment knowledge enhancement graph and the aspect relationship graph, and derive aspect-specific sentiment features respectively. Then, the feature fusion mechanism is used to adjust the weights of the two feature representations to capture the sentiment features of the context and the sentiment dependency between aspects, and obtain the final context representation. Specifically, First, the sentiment knowledge enhancement graph based on the dependency tree Aand the hidden state vector generated by BiLSTM The input is fed into a graph convolutional network (GCN) to learn the sentiment dependencies between context words and specific aspects. l The first of the GCN layers i A node is represented by its neighborhood's hidden To update: ; ; ; in is the linear transformation weight, is the bias term, is the hidden representation generated by the previous layer of GCN, is a function that assigns position weights, represents the Relu activation function, is a normalized symmetric adjacency matrix, It is in the dependency parse tree Dimensions. L The feature representation obtained by learning the layer GCN based on the sentiment knowledge enhancement graph is H A .

[0028] Next, in order to solve the problem of information redundancy when the model learns different types of knowledge, an interactive graph convolutional network model is designed to fully learn multiple layers of knowledge. Specifically, the feature representation of the obtained sentiment knowledge enhancement graph is H A and aspect relationship diagram R It is fed into another GCN to interactively learn contextual sentiment features and sentiment relations between aspects. l The first of the GCN layers i A node is represented by its neighborhood's hidden To update:

[0029] in is the linear transformation weight, is the bias term, Represents the relationship diagram between aspects, Represents the Relu activation function. L The learning of layer GCN obtains the feature representation based on the relationship graph between aspects as follows: H R ; In addition, in order to improve the generalization ability of the model, a feature fusion mechanism is designed. Specifically, the feature representation generated based on the sentiment knowledge enhancement graph is firstH A and feature representation generated based on the aspect relationship graph H R The input is fed into the feature fusion mechanism, and then the interaction between the contextual sentiment dependency and the aspect dependency is extracted by adjusting the weights of the two feature representations to obtain the final feature representation. ,in , the feature fusion formula is as follows: ; in is the coefficient used to adjust the weight of the aspect feature.

[0030] Sentiment classification module: This module aims to obtain the classification results of sentiment polarity. First, the final context representation is fed into the classifier. Then, the fully connected layer and Softmax function are used to perform classification operations to obtain the sentiment polarity prediction results. Specifically, the final feature representation is first The non-aspect items in are masked to shield the hidden state vector of non-aspect words, while keeping the original state of aspect words to obtain aspect mask features ,in Next, the aspect mask features and the hidden state vector generated by BiLSTM The input to the dot product attention weighting mechanism further strengthens the feature representation of the aspect item to obtain a representation that is specific and enhanced based on the aspect feature. : ; ; ; ; in Representing words The attention weight matrix, represents the normalized attention weight matrix, Represents the enhanced representation based on aspect features after attention weighting.

[0031] Finally, the representation obtained based on aspect feature enhancement Send it to the classifier and use the fully connected layer and Softmax function to perform classification operations to obtain the probability distribution of sentiment polarity p : ; in are trainable weights, is the bias term, and softmax is the activation function for learning sentiment classification.

[0032] In order to evaluate the superior performance of the aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network proposed in an embodiment of the present invention, the following will be described in combination with specific experimental results.

[0033] This paper adopts four of the most widely used benchmark datasets in the ABSA field, including the restaurant (Rest14) and laptop (Lap14) review datasets in SemEval 2014 Task 4, the restaurant (Rest15) review dataset in SemEval 2015 Task 12, and the restaurant (Rest16) review dataset in SemEval 2016 Task 5. The statistics of the four datasets are shown in Table 1.

[0034] Table 1 Dataset information ; The experiment of the present invention uses Glove vectors and pre-trained BERT to initialize word vectors. For 300-dimensional Glove vectors, the dimension of the hidden state vector in the BiLSTM layer is set to 300. In the model parameter optimization, we used the Adam optimizer with a learning rate of 0.002. The coefficient of the L2 regularization term is 0.00001. For the pre-trained BERT model, the dimension of the word vector is 768 and the learning rate is set to 2e-5. In addition, the number of GCN layers in the model is set to 2 and the batch size is set to 16. The experimental environment is based on the Windows 10 operating system, the development language is Python 3.8, the Cuda version is 10.1, and the GPU uses Nvidia GeForce RTX 4080 super.

[0035] This paper uses the ABSA task general indicator accuracy (Accuracy) and macro-average (Macro-F1) as evaluation criteria. The specific calculation formula is as follows: ; ; ; Among them, TP represents the number of positive samples correctly predicted as positive, FN represents the number of positive samples incorrectly predicted as negative, FP represents the number of negative samples incorrectly predicted as positive, and TN represents the number of negative samples correctly predicted as negative.

[0036] As shown in Table 2, the experimental results of the method in the embodiment of the present invention on four data sets are compared with the baseline model, and the experimental results of the baseline model are derived from the data in the respective papers. Among them, the best results on each data set are indicated in bold.

[0037] Table 2 Experimental results of different models ; The experimental results show that the present invention can effectively use contextual sentiment knowledge to capture the sentiment dependency of a given aspect, and also successfully learns the dependencies between aspects in a sentence. Specifically, models based on attention mechanisms (RAM, AOA, etc.) often introduce noise, while the present invention reduces the impact of noise to a certain extent by capturing the sentiment dependency between contexts. GCN-based models (CDT, ASGCN-DT, ASGCN-DG, etc.) mainly focus on encoding syntactic information or semantic information, often ignoring the use of external knowledge, and their performance is largely affected by their ability to fit data. In contrast, the performance of the present invention on four benchmark datasets is more competitive. It is worth noting that compared with SenticGCN, the present invention not only integrates contextual sentiment knowledge into the graph network, but also considers the dependencies between different aspects in the sentence. The overall results demonstrate the superior performance of the present invention on the ABSA task.

[0038] In order to further explore the impact of the number of GCN layers on the performance of the present invention, models with 1 to 6 layers are evaluated on four benchmark datasets. The experimental results are shown in Figure 3 As shown. It can be seen from the figure that when the number of GCN layers is set to 2, the present invention achieves the best performance on all four data sets. On the one hand, when the number of GCN layers is set to 1, the model can only aggregate part of the information and thus cannot fully capture the sentiment information of specific aspects and the relationship between aspects. On the other hand, the performance of the present invention slowly decreases with the increase in the number of layers. This is because too many GCN layers will lead to gradient vanishing and information redundancy, thereby reducing the performance of the model. Specifically, when the graph convolutional network is iterated multiple times, considerable noise is introduced. In addition, multi-layer GCN also makes it difficult to fuse the sentiment features between contexts and the dependencies between aspects, thereby interfering with the results of sentiment analysis. In general, simply increasing the number of GCN layers will weaken the learning ability of the model, and setting the number of GCN layers to 2 can fully explore the performance of the present invention.

Claims

1. A method for aspect-level sentiment analysis based on knowledge enhancement and interactive graph convolutional network, characterized in that: The following steps are involved: (1) Text embedding and encoding: Use a pre-trained word embedding algorithm to map each word of the input text into a low-dimensional vector to generate a word embedding matrix; input the word embedding matrix into a bidirectional long short-term memory network (BiLSTM) to obtain the hidden state vector representation of the text; (2) Emotional knowledge enhancement: construct an adjacency matrix based on the sentence dependency syntactic tree, and generate a sentiment score matrix by combining the sentiment scores of words from the sentiment knowledge base SenticNet; By introducing an aspect enhancement matrix, the sentiment score matrix and the adjacency matrix are weighted to generate a sentiment knowledge enhancement graph; (3) Enhancement of inter-aspect relations: Analyze the potential sentiment dependencies between different aspect items in the input sentence and construct an inter-aspect relation graph; (4) Interactive graph convolution and feature fusion: The graph convolution network (GCN) is used to extract features from the sentiment knowledge enhancement graph and the aspect relationship graph, respectively, to obtain sentiment feature representation and aspect relationship feature representation; The weights of the two features are adjusted through the feature fusion mechanism to generate the final context representation; (5) Sentiment classification: Mask the final context representation and retain the aspect word features; The masked features are input into the classifier and the sentiment polarity is predicted through the Softmax function.

2. According to claim 1, the aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network is characterized in that: Step (1) is as follows: the word embedding algorithm is Glove, and the generated dimension is Word vector; BiLSTM generates a context vector of dimension 2d through bidirectional hidden state concatenation .

3. The aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network according to claim 1 is characterized in that: In step (2), the adjacency matrix construction formula is: ; in, Represents the input statement S Middle i words, if the word and If there is a dependency relationship between them, then the adjacency matrix D The corresponding element in is 1 if the value is true, otherwise it is 0.

4. The aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network according to claim 1 is characterized in that: In step (2), the calculation formula of the sentiment score matrix is: ; in, Represents a word in SenticNet The sentiment score is between -1 and 1. mean Is a neutral word or does not exist in SenticNet.

5. The aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network according to claim 1, characterized in that: In step (2), the aspect enhancement matrix is ​​defined as: ; in, Represents the input statement S Middle i words, if the word and If there is an aspect word, it is assigned a value of 1, otherwise it is assigned a value of 0; The calculation formula of the sentiment knowledge enhancement graph is: ; in represents the adjacency matrix, represents the sentiment score matrix, Represents the aspect enhancement matrix.

6. The aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network according to claim 1, characterized in that: In step (3), the formula for constructing the relationship graph between aspects is: ; in, Represents the input statement S Middle i words, is a set of words in a specific aspect, is the starting position of a specific aspect, A set of words that represent other aspects, Represents the absolute value function, the relationship diagram between aspects middle = .

7. The aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network according to claim 1, characterized in that: In step (4), the interactive graph convolutional network adopts a multi-layer GCN structure, and the update formula of the l-th layer node is: ; ; ; in, is the linear transformation weight, is the bias term, is the hidden representation generated by the previous layer of GCN, is a function that assigns position weights, represents the Relu activation function, is a normalized symmetric adjacency matrix, It is in the dependency parse tree Dimensions; The calculation formula of the feature fusion mechanism is: ; in, is the coefficient used to adjust the weight of aspect features, H A Represents the features and H R Features representing the generation of a graph of relationships between aspects.

8. The aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network according to claim 1, characterized in that: In step (5), masking is performed by setting the hidden states of non-aspect words to zero and retaining the vectors of aspect words; the classifier uses the attention mechanism to calculate the weights.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, it implements an aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network according to any one of claims 1 to 8.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, an aspect-level sentiment analysis method based on knowledge enhancement and interactive graph convolutional network is implemented according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Emotion analysis method based on association between grammar dependency types and aspects

    CN114781352A

  • Aspect-level sentiment analysis method based on sentiment knowledge and aspect interaction

    CN116822504A

  • Aspect-level sentiment analysis system based on multi-type knowledge fusion

    CN118069845A

  • Emotion analysis method of heterogeneous graph convolutional network based on dependency enhancement

    CN119621982A