Aspect sentiment analysis method and system based on artificial intelligence
By employing the quantum entanglement-inspired aspect sentiment analysis enhancement network QINet, and utilizing QiENet-S and a dual-graph convolutional network, the problem of modeling complex dependencies between words is solved, thereby improving the accuracy and robustness of aspect sentiment analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANQING NORMAL UNIV
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies struggle to effectively model complex dependencies between words in aspect sentiment analysis, and are particularly susceptible to noise in complex sentences, leading to incorrect aspect sentiment polarity judgments.
We employ the QINet aspect sentiment analysis enhancement network model inspired by quantum entanglement. By capturing complex relationships between words through QiENet-S and dual graph convolutional networks (SynGCN and SemGCN), and combining quantum entangled states and self-attention mechanisms, we generate aspect sentiment probability distributions.
It improves the accuracy of aspect sentiment analysis in complex sentences, reduces the impact of noise, enhances the ability to capture associations in informal and complex expressions, and makes up for the shortcomings of dependency tree methods.
Smart Images

Figure CN121835658A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aspect sentiment analysis technology, specifically to an aspect sentiment analysis method and system based on artificial intelligence. Background Technology
[0002] Aspect-oriented sentiment analysis (AES) is a fine-grained sentiment analysis task focused on entities or aspects of entities, aiming to infer the sentiment polarity of a specific aspect. A key to solving AES tasks is modeling the dependencies between aspects and their corresponding sentiment polarities. However, in practical applications, a sentence may have multiple aspects and different sentimental perspectives on those aspects. To determine the sentiment polarity of a specific aspect, attention-based methods have been proposed. Aspect-oriented sentiment analysis requires capturing the dependencies between aspect vocabulary and its sentiment vocabulary; therefore, modeling the relationships between words in a sentence is particularly important for AES tasks. Early research proposed various recurrent neural networks with attention mechanisms to generate aspect-oriented sentence representations, achieving promising results.
[0003] Graph Neural Networks (GNNs) are currently a common approach for aspect-oriented sentiment analysis, typically utilizing explicit syntactic structures in dependency trees to construct isomorphic graphs between words. These methods have proven effective in capturing the relevance of aspect words and their polarities.
[0004] In recent years, graph neural networks (GNNs), including graph convolutional networks (GCNs) and graph attention networks (GATs), have been widely used for aspect sentiment analysis modeling. These methods typically utilize the syntactic structure in dependency trees to construct isomorphic graphs between words, and they are effective in capturing the relevance of aspect words and their polarities.
[0005] The inherent limitations of attention mechanisms make attention-based models highly susceptible to sentence noise, leading to failures in aspect-oriented sentiment analysis tasks. For example, in the complex sentence "I was very satisfied with the food, but I was a little disappointed by the service," the aspect word "food" has a positive sentiment polarity, while the aspect word "service" has a negative sentiment polarity. Due to the inherent limitations of attention mechanisms, attention-based methods may misjudge the sentiment polarity of the aspect word "service" due to noise.
[0006] While dependency tree-based graph networks offer some performance improvements for aspect-oriented sentiment analysis tasks, their application to specific tasks remains limited. Due to the informality and complexity of online comments, dependency tree-based sentiment analysis may not accurately identify word dependencies, introducing noise into the aspect-oriented sentiment analysis model and leading to incorrect assessments of aspect sentiment polarity. Figure 1 As shown, the sentence "Works well, and I am extremely happy to be back to an Apple OS" is a comment about "Apple OS". "Works" and "Apple OS" are two descriptive terms, and both descriptive terms correspond to positive emotions. Figure 1 The 'a' indicates two aspects and their correct emotions, and also indicates the words that best reflect the emotional polarity of each aspect, namely "well" and "happy". Figure 1 The result of the dependency tree-based sentiment analysis is as follows: for the aspect "Works", the dependency tree model correctly assigns a positive sentiment polarity; however, for the aspect "apple OS", the sentiment analysis gives an incorrect sentiment judgment, assigning a negative sentiment instead of a positive one. This is because the distance between "apple OS" and "happy" in the sentence makes the resolution of dependencies inaccurate. How to effectively model complex dependencies between words remains a challenge for aspect sentiment analysis research based on dependency tree methods. Therefore, this paper proposes an artificial intelligence-based aspect sentiment analysis method and system. Summary of the Invention
[0007] The technical problem to be solved by this invention is: how to effectively model the complex dependencies between words, and to provide an aspect sentiment analysis method based on artificial intelligence.
[0008] like Figure 3As shown, the present invention solves the above-mentioned technical problems through the following technical solution, and the present invention includes the following steps:
[0009] S1: Obtain word embedding vectors
[0010] The input sentence is fed into the QINet network, which includes QiENet-S and a dual-graph convolutional network. The QINet network looks up the set of word embedding vectors for each word in the sentence from the word embedding lookup table.
[0011] S2: Obtain feature representation
[0012] The word embedding vector set of the sentence is input into QiENet-S and a dual-graph convolutional network respectively, and the feature representation is obtained through the QiENet-S network. Simultaneously, feature representations are obtained through a dual-graph convolutional network. ;
[0013] S3: Perform feature fusion
[0014] Feature representations obtained from QiENet-S and dual-graph convolutional networks and Perform a join operation to obtain the final feature representation used for aspect sentiment analysis. ;
[0015] S4: Emotional probability distribution in terms of acquisition
[0016] The final feature representation obtained The input is fed into a linear layer, and then the softmax function is used to generate a sentiment probability distribution for each aspect. To complete the sentiment analysis task.
[0017] Furthermore, in step S1, the specific processing procedure is as follows: From the word embedding lookup table... Search for sentences in Each word in Word embedding vector set ,in, Indicates the size of the vocabulary. This represents the dimension of the word embedding vector, each It is a sentence Chinese vocabulary Word embedding vectors, , i=1,2,…, n.
[0018] Furthermore, in step S2, feature representation is obtained. The specific processing procedure is as follows:
[0019] S211: Each word Word embedding vectors After normalization, the basic state vector of the vocabulary is represented as follows:
[0020] ;
[0021] in, , express Paradigm;
[0022] Basic state vectors of words Introducing complex-valued probability amplitude ,in Indicates amplitude. Indicates phase;
[0023] S212: Represent the lexical states of the vocabulary in the aspect sentiment analysis task as follows:
[0024] ;
[0025] in, , It is a complex space;
[0026] S213: The lexical state is represented using a lexical density matrix, thus obtaining the lexical state of each word. Vocabulary density matrix:
[0027] ;
[0028] S214: Based on the inspiration of quantum entanglement, the complex relationships between words are defined as entangled states of words; in contrast to quantum composite systems, the relationships between entangled states of words are defined as entangled states of words. and lexical voice The resulting lexical compound system is represented as follows:
[0029] ;
[0030] in, It is a tensor product operation;
[0031] S215: Lexical voice and lexical voice vocabulary density matrix and Tensor product calculation yields the result from lexical state and lexical voice The matrix of the composite system is:
[0032] ;
[0033] in, and These are lexical voices and The basic state vector of the vocabulary in the text;
[0034] S216: After generating the vocabulary density matrix for each word in the sentence, perform a two-dimensional convolution operation on the vocabulary density matrices of all words in the sentence to obtain the vocabulary association enhancement matrix for all words in the sentence. ,Right now:
[0035] ;
[0036] in, , It is a two-dimensional convolution operation function;
[0037] S217: Lexical association enhancement matrix for all words After performing average pooling along the rows, the feature representation extracted by the QiENet-S network is obtained as follows:
[0038] ;
[0039] in, It is a two-dimensional convolutional average pooling function.
[0040] Furthermore, in step S212, the amplitude parameter Through real number functions Obtained by projection mapping, i.e.:
[0041] ;
[0042] in, It is a trainable vector parameter;
[0043] Phase parameters Through the cosine function Obtained by projection mapping, i.e.:
[0044] .
[0045] Furthermore, in step S213, for any lexical state The vocabulary density matrix is defined as follows:
[0046] ;
[0047] This indicates the corresponding lexical state with a set probability. In lexical state ,in, It is a lexical state The vector representation of , i.e. .
[0048] Furthermore, in step S2, the dual-graph convolutional network comprises two graph convolutional networks, SynGCN and SemGCN, to obtain feature representations. The specific processing procedure is as follows:
[0049] S221: Using the bidirectional LSTM model BiLSTM to generate hidden vectors from the input word embedding vectors:
[0050] ;
[0051] in, , These are the elements of the hidden vector generated based on the elements in the embedding vector of each word;
[0052] S222: In the SynGCN network, the dependency probability matrix will be... As the adjacency matrix is input into the SynGCN network, the hidden vector generated by BiLSTM... Used as initial embedding vectors for graph nodes; graph representations are obtained through the SynGCN network. For aspect nodes, use Hidden vectors related to labeling;
[0053] S223: The attention score matrix computed using the self-attention mechanism in the SemGCN network. As the adjacency matrix, the initial embedding vector of the graph nodes, and the hidden vector generated by BiLSTM. Used as initial embedding vectors for graph nodes; graph representations are obtained through the SemGCN network. Aspect node usage Hidden vectors related to labeling;
[0054] S224: Perform average pooling on the aspect node representations output by the two SynGCN and SemGCN networks respectively to obtain two feature representations:
[0055] ;
[0056] ;
[0057] in, It is the average pooling function applied to the aspect node representation;
[0058] S225: Then, the feature representation obtained by the dual-graph convolutional network is obtained. .
[0059] Furthermore, in step S4, the probability distribution of sentiment regarding the aspect is as follows: Specifically as follows:
[0060] ;
[0061] in, These are learnable weights. It is a bias term.
[0062] Furthermore, the loss function of the QiNet network during training is:
[0063] ;
[0064] in, It is the cross-entropy loss function. This is the set of all sentence-aspect pairs in the sentence-level aspect sentiment analysis task. It is a sample The corresponding real tags, To represent a sentence. It refers to one aspect.
[0065] This invention also provides an artificial intelligence-based aspect sentiment analysis system, applied to the aforementioned aspect sentiment analysis method, comprising:
[0066] The word embedding vector acquisition module is used to input sentences into the QINet network. The QINet network includes QiENet-S and a dual-graph convolutional network. The QINet network looks up the set of word embedding vectors for each word in the sentence from the word embedding lookup table.
[0067] The feature representation acquisition module is used to input the word embedding vector set of the sentence into QiENet-S and the dual-graph convolutional network respectively, and obtain the feature representation through the QiENet-S network. Simultaneously, feature representations are obtained through a dual-graph convolutional network. ;
[0068] The feature fusion module is used to extract feature representations from QiENet-S and the dual-graph convolutional network. and Perform a join operation to obtain the final feature representation used for aspect sentiment analysis. ;
[0069] The aspect-based sentiment probability distribution acquisition module is used to represent the final features obtained. The input is fed into a linear layer, and then the softmax function is used to generate a sentiment probability distribution for each aspect. To complete the sentiment analysis task.
[0070] Compared with the prior art, the present invention has the following advantages: This artificial intelligence-based aspect sentiment analysis method and system proposes an aspect sentiment analysis enhancement network model based on quantum entanglement. Compared with attention-based methods, the quantum entanglement-inspired enhancement method reduces the impact of sentence noise. Compared with dependency tree-based methods, the quantum entanglement-inspired enhancement method is more effective in capturing the association between aspect words and their sentiment expressions in informal and complex expressions, thus making up for the inaccuracy of dependency tree-based methods in resolving dependencies. Attached Figure Description
[0071] Figure 1 This is a schematic diagram illustrating an example of how dependency tree isomorphism captures lexical associations in existing technologies, where a represents two aspects of the word and their correct sentiment, and b represents the sentiment analysis results based on the dependency tree.
[0072] Figure 2 This is a schematic diagram of the structure of the aspect sentiment analysis enhancement neural network QINet based on quantum entanglement inspiration in an embodiment of the present invention;
[0073] Figure 3 This is a flowchart illustrating the aspect sentiment analysis method based on artificial intelligence of the present invention. Detailed Implementation
[0074] The embodiments of the present invention are described in detail below. These embodiments are implemented based on the technical solution of the present invention, and provide detailed implementation methods and specific operation processes. However, the scope of protection of the present invention is not limited to the following embodiments.
[0075] Example 1
[0076] A sentence can be viewed as a set of all the words that make up the sentence, similar to a state in the quantum world being a superposition of multiple ground states. The superposition phenomenon in the quantum world describes the complex relationships between different ground states, providing new insights and approaches for solving aspect sentiment analysis tasks. Based on this, this invention proposes QINet, an aspect sentiment analysis enhancement neural network inspired by quantum entanglement. It is an end-to-end neural network, such as... Figure 2 As shown, it comprises a quantum entanglement-inspired augmented neural network, QiENet-S, and a dual-graph convolutional network. The QiENet-S network models the quantum entanglement-inspired representations and operations for aspect sentiment analysis. The dual-graph convolutional network extracts features from dependency relations within sentences. The quantum entanglement-inspired aspect sentiment analysis augmented neural network, QiENet, completes the specific task of aspect sentiment analysis through QiENet-S and the dual-graph convolutional network.
[0077] Aspect-based sentiment analysis tasks: Sentence-level aspect-based sentiment analysis tasks typically provide sentence-aspect pairs. ,in Let n represent a sentence. The total number of words in the text. Let i represent each word in the sentence, i = 1, 2, ..., n; It is one aspect, where 'm' indicates the number of aspect terms. Let j = 1, 2, ..., m represent each word in the aspect. From the representation of aspects and sentences, it can be seen that aspects... It is a sentence A subset of. The purpose of the sentiment analysis task is to give a sentence Every aspect Emotional tags ,in, Indicates positive emotional polarity. Indicates neutral emotional polarity. It indicates a negative emotional polarity.
[0078] The QiENet-S network is used to perform quantum entanglement-inspired aspect-based sentiment analysis on text data representations and quantum-like operations to capture lexical associations within sentences. First, it uses a word embedding lookup table... Search for sentences in Each word in Word embedding vector set ,in, Indicates the size of the vocabulary. This represents the dimension of the word embedding vector, each It is a sentence Chinese vocabulary Word embedding vectors, The connections within a sentence are based on words. As a correlation of basic units, therefore, by analogy with quantum theory, each word can be... Consider each word as a separate quantum system unit. Word embedding vectors After normalization, the basic state vector of the vocabulary is represented as follows:
[0079] (1)
[0080] in, , express Paradigm.
[0081] Basic state vectors of words Introducing complex-valued probability amplitude ,in Indicates amplitude. Indicates phase.
[0082] Analogous to the specific quantum states of a quantum system, the vocabulary can be described as a lexical state that resembles a quantum state:
[0083] Lexical state definition: Given a classical vector space ,because It is complete, therefore for any two vectors ,have And for any vector and scalar ( (Whether it is the field of real numbers or the field of complex numbers), The word embedding vectors are normalized and complex probability magnitudes are introduced. Therefore, the newly generated vector representing the vocabulary is still a unit vector, which can be used... To indicate, This is then referred to as lexical form.
[0084] Based on the definition of lexical state, the lexical states of words in the aspect sentiment analysis task are represented as follows:
[0085] (2)
[0086] in, , For complex space, the amplitude parameter in the equation It can be done through a real number function Obtained by projection mapping, i.e.:
[0087] (3)
[0088] in, It is a trainable vector parameter. For the phase parameter... Alternatively, it can be obtained using a function, namely:
[0089] (4)
[0090] phase Regarding hidden emotions, how to define them remains a pressing problem. This invention will model... function Defined as a cosine function.
[0091] In quantum systems, those that cannot be represented by definite quantum states can be represented using a quantum density matrix. Of course, for definite quantum states, their corresponding density matrix representation can also be calculated; the quantum density matrix can characterize all features of the entire quantum system. Similarly, lexical states can also be represented using a matrix similar to the quantum density matrix, called the lexical density matrix, which is defined as:
[0092] Lexical density matrix definition: any lexical state Its vocabulary density matrix can be defined as:
[0093] (5)
[0094] This indicates that the lexical state has a certain probability. In the vocabulary ,in It is a lexical state The vector representation of , i.e. .
[0095] Therefore, according to the definition of the word density matrix, each word can be obtained. vocabulary density matrix ( The trace is 1), that is:
[0096] (6)
[0097] Aspect-based sentiment analysis takes the entire sentence as a whole and captures the sentiment information of specific aspect words, requiring consideration of the interrelationships between words. This invention, inspired by quantum entanglement, defines the complex relationships between words as entangled states.
[0098] Lexical entanglement definition: Assume two lexical states are... and ,in From a set of lexical ground states constitute, From a set of lexical ground states If they constitute a lexical entanglement, then the lexical entanglement state they constitute is represented as:
[0099] (7)
[0100] Inspired by the idea of quantum entanglement It is an inseparable state and cannot be broken down into and The result of the operation. However, in natural language processing tasks of classical systems, it is impossible to describe the inseparable states such as quantum entanglement states in quantum systems. Therefore, instead of calculating the class density matrix of lexical entanglement states, the system composed of two or more words is regarded as a separable system, that is, a classical lexical composite system similar to a quantum composite system. (Compared to a quantum composite system, this relates to the lexical states...) and lexical voice The resulting lexical compound system is represented as follows:
[0101] (8)
[0102] According to formula (6), the lexical state can be... and lexical voice The constructed lexical complex system is represented by a matrix similar to a quantum density matrix, that is, the lexical state and lexical voice vocabulary matrix and Tensor product calculation yields the result from lexical state and lexical voice The matrix of the composite system is:
[0103] (9)
[0104] After generating the vocabulary density matrix for each word in a sentence, the QiENet-S network performs a two-dimensional convolution operation on the vocabulary density matrices of all words in the sentence, thus modeling a relational enhancement matrix that includes all words in the sentence. ,Right now:
[0105] (10)
[0106] in, , It is a two-dimensional convolution operation function.
[0107] The quantum entanglement-inspired lexical association enhancement matrix obtained from modeling Performing average pooling along the rows yields the feature representation captured by the QiENet-S network as follows:
[0108] (11)
[0109] in, It is a two-dimensional convolutional average pooling function.
[0110] The DualGCN (Dual Graph Convolutional Network) consists of two graph convolutional networks, SynGCN and SemGCN. First, it uses a bidirectional LSTM (BiLSTM) model to generate hidden vectors from the input word embeddings.
[0111] (12)
[0112] in, , These are the elements of the hidden vector generated from the elements in each word's embedding vector; they can be understood as... .
[0113] SynGCN's input is a dependency probability matrix designed using the DualGCN model, a dual-graph convolutional network. As the adjacency matrix of the graph, the hidden vectors generated by BiLSTM Used as the initial embedding vector for graph nodes. Graph representation is obtained through SynGCN. , For aspect nodes, you can use Hidden vectors related to labeling, For the first The first layer Each node is updated in the following way:
[0114] (13)
[0115] in, It is an activation function. It is a weight matrix. It is a bias term.
[0116] In another graph convolutional network, SemGCN, the attention score matrix is computed using a self-attention mechanism. As the adjacency matrix of the graph convolutional network, the initial embedding vectors of the graph nodes still use the hidden vectors generated by BiLSTM. .
[0117] (14)
[0118] Among them, matrix and It is the representation of the layer preceding SemGCN. and It is a learnable weight matrix. This refers to the dimension of the input node features. Graph representations are obtained through the SemGCN graph network. Aspect nodes can be used Hidden vectors related to labeling.
[0119] By performing average pooling operations on the aspect node representations output by the two graph networks SynGCN and SemGCN, we can obtain two feature representations respectively:
[0120] (15)
[0121] (16)
[0122] in, It is the average pooling function applied to the aspect node representation.
[0123] Feature representation obtained from dual-graph convolutional networks for .
[0124] The input to the quantum entanglement-inspired aspect-of-sentiment analysis augmented neural network QINet is the entire sentence. QINet uses word embedding lookup tables Search for each word in the sentence Word embedding vector set Then, QINet takes the sentence's word embedding vector set. The data are passed to the quantum entanglement-inspired augmentation network QiENet-S and the dual-graph convolutional network, respectively, and feature representations are obtained through QiENet-S. Feature representations are obtained through a dual-graph convolutional network. QINet will obtain features from QiENet-S and dual-graph convolutional networks. and Performing join operations yields the final feature representation of aspect sentiment analysis as follows: .
[0125] Finally, the obtained final feature representation is input into a linear layer, and then the softmax function is used to generate the sentiment probability distribution for the aspect. ,Right now:
[0126] (17)
[0127] in, These are learnable weights. It is a bias term.
[0128] The loss function of the aspect sentiment analysis enhancement network based on quantum entanglement inspired by this invention is as follows:
[0129] (18)
[0130] in, It is the cross-entropy loss function. This is the set of all sentence-aspect pairs in the sentence-level aspect sentiment analysis task. It is a sample The corresponding real tags.
[0131] Example 2
[0132] In this embodiment, the method in Example 1 is experimentally evaluated on three publicly available standard datasets: the Statanrant 2014 dataset, the Laptop 2014 dataset, and the Twitter 2014 dataset. These three datasets all have three sentiment polarities: positive, negative, and neutral. Each sentence in the three datasets has its aspect words and their corresponding sentiment polarities labeled accordingly. Specific data statistics for the three datasets are shown in Table 1.
[0133] Table 1. Detailed statistics of the experimental dataset
[0134]
[0135] All experiments were conducted on a workstation consisting of a machine with 128GB of RAM, two physical CPUs (a 24-core Intel® Xeon® Gold 6248R CPU @ 3.00GHz) and a GPU with 40GB of video memory (Nvidia A100).
[0136] All experiments used pre-trained 300-dimensional GloVe vectors to initialize word embeddings. The dimension of both positional embeddings and part-of-speech (POS) embeddings was set to 30, where positional embeddings represent the positional embedding of each word in a sentence relative to an aspect. The hidden vector size for both QiENet-S and BiLSTM was set to 60. To mitigate overfitting, the dropout rate for the input word embeddings was set to 0.5, and the dropout rate for the graph convolutional network was set to 0.1. The dropout rate for BiLSTM was set to 0.1, the number of hidden layers was set to 1, and the number of layers for the graph convolutional network was set to 2. The learning rate of the model was set to 0.002, and the regularization coefficients of the three datasets Restaurant2014, Laptop2014, and Twitter2014 were used. and The regularization parameters are set to (0.3, 0.3), (0.6, 0.5), and (0.3, 0.4) respectively. The value was set to 0.0001. The proposed QEEGCN model was trained for 35 epochs with a batch size of 16. For BERT, a case-insensitive English version based on the BERT base model was used, with a learning rate of 2e-5 and a temporary backoff rate of 0.3. The regularization coefficients of the three datasets Restaurant2014, Laptop2014, and Twitter2014 were also used. and Set them to (0.3, 0.5), (0.3, 0.3), and (0.5, 0.3) respectively.
[0137] Accuracy (%) and Macro-F1 score (%) were used as the main evaluation metrics, and the experimental results are shown in Table 2. In the table, both DGEDT and DualGCN models are currently considered high-performing network models. The DGEDT model relies on a graph-enhanced dual Transformer network model, which iteratively and interactively integrates the planar representations learned from it and the graph-based representations learned from the corresponding dependency graphs. The DualGCN network model includes two graph convolutional network modules that consider syntactic structural complementarity and semantic relevance. SynGCN is a grammatically rich graph network module designed to reduce dependency parsing errors, while SemGCN is a graph network module with a self-attention mechanism designed to capture semantic relevance.
[0138] Table 2 Summary of Experimental Evaluation Results for QINet Model and Comparative Models
[0139]
[0140] The QINet network model proposed in this invention has improved performance compared to current high-performing network models.
[0141] To address the complex dependencies between aspect words and their sentiment polarity expressions in complex sentences, this invention proposes a quantum entanglement-inspired aspect sentiment analysis enhancement network model, inspired by quantum phenomena such as quantum superposition, quantum entanglement, and quantum composite systems that demonstrate complex relationships between sub-quantum systems. Compared to attention-based methods, the quantum entanglement-inspired enhancement method is less affected by sentence noise. Compared to dependency tree-based methods, the quantum entanglement-inspired enhancement method is more effective at capturing the associations between aspect words and their sentiment expressions in informal and complex sentences, overcoming the inaccuracy of dependency tree-based methods in resolving dependencies.
[0142] Specifically, this invention proposes a quantum entanglement-inspired representation for aspect sentiment analysis tasks, designs a quantum entanglement-inspired enhanced neural network QiENet-S to complete all quantum entanglement-inspired representations and operations, and further proposes a quantum entanglement-inspired enhanced network model QINet to enhance the association representation between words. Experimental results on three publicly available standard datasets verify the effectiveness of the QINet network model in aspect sentiment analysis.
[0143] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. An aspect sentiment analysis method based on artificial intelligence, characterized in that, Includes the following steps: S1: Obtain word embedding vectors The input sentence is fed into the QINet network, which includes QiENet-S and a dual-graph convolutional network. The QINet network looks up the set of word embedding vectors for each word in the sentence from the word embedding lookup table. S2: Obtain feature representation The word embedding vector set of the sentence is input into QiENet-S and a dual-graph convolutional network respectively, and the feature representation is obtained through the QiENet-S network. Simultaneously, feature representations are obtained through a dual-graph convolutional network. ; S3: Perform feature fusion Feature representations obtained from QiENet-S and dual-graph convolutional networks and Perform a join operation to obtain the final feature representation used for aspect sentiment analysis. ; S4: Emotional probability distribution in terms of acquisition The final feature representation obtained The input is fed into a linear layer, and then the softmax function is used to generate a sentiment probability distribution for each aspect. To complete the sentiment analysis task.
2. The aspect sentiment analysis method based on artificial intelligence according to claim 1, characterized in that, In step S1, the specific processing procedure is as follows: From the word embedding lookup table... Search for sentences in Each word in Word embedding vector set ,in, Indicates the size of the vocabulary. This represents the dimension of the word embedding vector, each It is a sentence Chinese vocabulary Word embedding vectors, , i=1,2,…,n.
3. The aspect sentiment analysis method based on artificial intelligence according to claim 1, characterized in that, In step S2, feature representation is obtained. The specific processing procedure is as follows: S211: Each word Word embedding vectors After normalization, the basic state vector of the vocabulary is represented as follows: ; in, , express Paradigm; Basic state vectors of words Introducing complex-valued probability amplitude ,in Indicates amplitude. Indicates phase; S212: Represent the lexical states of the vocabulary in the aspect sentiment analysis task as follows: ; in, , It is a complex space; S213: The lexical state is represented using a lexical density matrix, thus obtaining the lexical state of each word. Vocabulary density matrix: ; S214: Based on the inspiration of quantum entanglement, the complex relationships between words are defined as entangled states of words; in contrast to quantum composite systems, the relationships between entangled states of words are defined as entangled states of words. and lexical voice The resulting lexical compound system is represented as follows: ; in, It is a tensor product operation; S215: Lexical voice and lexical voice vocabulary density matrix and Tensor product calculation yields the result from lexical state and lexical voice The matrix of the composite system is: ; in, and These are lexical voices and The basic state vector of the vocabulary in the text; S216: After generating the vocabulary density matrix for each word in the sentence, perform a two-dimensional convolution operation on the vocabulary density matrices of all words in the sentence to obtain the vocabulary association enhancement matrix for all words in the sentence. ,Right now: ; in, , It is a two-dimensional convolution operation function; S217: Lexical association enhancement matrix for all words After performing average pooling along the rows, the feature representation extracted by the QiENet-S network is obtained as follows: ; in, It is a two-dimensional convolutional average pooling function.
4. The aspect sentiment analysis method based on artificial intelligence according to claim 3, characterized in that, In step S212, the amplitude parameter Through real number functions Obtained by projection mapping, i.e.: ; in, It is a trainable vector parameter; Phase parameters Through the cosine function Obtained by projection mapping, i.e.: 。 5. The aspect sentiment analysis method based on artificial intelligence according to claim 3, characterized in that, In step S213, for any lexical state The vocabulary density matrix is defined as follows: ; This indicates the corresponding lexical state with a set probability. In lexical state ,in, It is a lexical state The vector representation of , i.e. .
6. The aspect sentiment analysis method based on artificial intelligence according to claim 3, characterized in that, In step S2, the dual-graph convolutional network includes two graph convolutional networks, SynGCN and SemGCN, to obtain feature representations. The specific processing procedure is as follows: S221: Using the bidirectional LSTM model BiLSTM to generate hidden vectors from the input word embedding vectors: ; in, , These are the elements of the hidden vector generated based on the elements in the embedding vector of each word; S222: In the SynGCN network, the dependency probability matrix will be... As the adjacency matrix is input into the SynGCN network, the hidden vector generated by BiLSTM... Used as initial embedding vectors for graph nodes; graph representations are obtained through the SynGCN network. For aspect nodes, use Hidden vectors related to labeling; S223: The attention score matrix computed using the self-attention mechanism in the SemGCN network. As the adjacency matrix, the initial embedding vector of the graph nodes, and the hidden vector generated by BiLSTM. Used as initial embedding vectors for graph nodes; graph representations are obtained through the SemGCN network. Aspect node usage Hidden vectors related to labeling; S224: Perform average pooling on the aspect node representations output by the two SynGCN and SemGCN networks respectively to obtain two feature representations: ; ; in, It is the average pooling function applied to the aspect node representation; S225: Then, the feature representation obtained by the dual-graph convolutional network is obtained. .
7. The aspect sentiment analysis method based on artificial intelligence according to claim 6, characterized in that, In step S4, the sentiment probability distribution regarding the aspect is as follows: Specifically as follows: ; in, These are learnable weights. It is a bias term.
8. The aspect sentiment analysis method based on artificial intelligence according to claim 1, characterized in that, The loss function of the QINet network during training is: ; in, It is the cross-entropy loss function. This is the set of all sentence-aspect pairs in the sentence-level aspect sentiment analysis task. It is a sample The corresponding real tags, To represent a sentence. It refers to one aspect.
9. An aspect sentiment analysis system based on artificial intelligence, characterized in that, The method applied to aspect sentiment analysis as described in any one of claims 1 to 8 includes: The word embedding vector acquisition module is used to input sentences into the QINet network. The QINet network includes QiENet-S and a dual-graph convolutional network. The QINet network looks up the set of word embedding vectors for each word in the sentence from the word embedding lookup table. The feature representation acquisition module is used to input the word embedding vector set of the sentence into QiENet-S and the dual-graph convolutional network respectively, and obtain the feature representation through the QiENet-S network. Simultaneously, feature representations are obtained through a dual-graph convolutional network. ; The feature fusion module is used to extract feature representations from QiENet-S and the dual-graph convolutional network. and Perform a join operation to obtain the final feature representation used for aspect sentiment analysis. ; The aspect-based sentiment probability distribution acquisition module is used to represent the final features obtained. The input is fed into a linear layer, and then the softmax function is used to generate a sentiment probability distribution for each aspect. To complete the sentiment analysis task.