Sentence-level multi-aspect sentiment analysis method based on double-graph convolutional neural network

By using the MA-DKGCN model of dual-graph convolutional neural networks, which combines syntactic dependencies and semantic interactions, the accuracy of sentiment analysis in existing technologies is insufficient in the face of multiple co-occurrences and informal languages, thus achieving highly accurate fine-grained sentiment analysis.

CN121456136APending Publication Date: 2026-02-03DALIAN UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511345997.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing aspect-level sentiment analysis methods struggle to effectively capture grammatical structures and external sentiment knowledge when dealing with multifaceted co-occurrence and informal language in complex contexts, resulting in insufficient accuracy in user-generated content.

Method used

We employ the MA-DKGCN model based on a dual-graph convolutional neural network, combining syntactic dependencies and semantic interactions. The MA-GCN module models the relationships between multiple words, introduces an external sentiment knowledge base, uses the K-GAT module for multi-head cross-attention, and the BiAffine fusion module for feature fusion to generate sentiment feature vectors.

Benefits of technology

It improves the robustness and accuracy of sentiment analysis, especially maintaining high accuracy in multi-faceted co-occurrence and colloquial expression environments, and generates fine-grained quantitative expressions of sentiment polarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_14
    Figure SMS_14
Patent Text Reader

Abstract

The invention belongs to the technical field of algorithm models, and discloses a sentence-level multi-aspect sentiment analysis method based on a double-graph convolutional neural network. Comprising the steps of data acquisition and preprocessing, aspect identification and index system construction, model construction and training, and emotion prediction of user generated content. The multi-aspect dependency matrix is adopted, redundant dependency relations are filtered, interaction among multi-aspect words is enhanced, externally-enhanced emotional knowledge is introduced, interaction among semantics is improved, and robustness and accuracy of emotional analysis are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of algorithm model technology, specifically relating to a sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network. Background Technology

[0002] Aspect-based sentiment analysis (ABSA), as a promising Natural Language Processing (NLP) technique, has been increasingly applied to detect the sentiment polarity (positive, negative, or neutral) of specific aspects in text. Various deep learning models, such as LSTM and attention-based models, have been used for ABSA tasks.

[0003] The paper "Enhancing Aspect-Based Sentiment Analysis with BERT-Driven Context Generation and Quality Filtering" fully leverages contextual information by using BERT, particularly emphasizing the relationships between sentences. This approach effectively integrates the relationships between sentences and labels, significantly improving the performance of aspect-based sentiment classification models. However, attention-based models often neglect valuable syntactic structures such as dependency trees.

[0004] In recent years, graph convolutional networks (GCNs) have been introduced into ABSA to leverage syntactic dependency structures, demonstrating superior performance in capturing contextual relationships. However, these models still have limitations, particularly in handling noisy UGC data containing informal language, grammatical errors, or multiple elements simultaneously. Furthermore, most existing ABSA methods underutilize external sentiment knowledge, thus limiting their ability to disambiguate sentiment expression in complex contexts.

[0005] The paper "Enhancing aspect-based sentiment analysis using a dual-gated graph convolutional network via contextual affective knowledge" proposes a binary GCN that combines syntactic dependency trees with graph neural networks to enhance sentiment representation using contextual affective knowledge. However, the presence of noise in the syntactic dependency graph negatively impacts computational efficiency, and semantic information relies solely on corpus-based co-occurrence, lacking the integration of richer external knowledge.

[0006] Patent document CN119149734A proposes combining syntax trees and graph neural networks to improve the context capture capability of aspect-level sentiment analysis, which can solve the problem of traditional sequence models' difficulty in modeling long-distance dependencies to some extent. However, this method mainly focuses on the dependency relationship between a single aspect word and its context. In actual user comments, multiple aspect words often appear simultaneously, and this method fails to consider the interaction between aspects.

[0007] Patent document CN112528672B utilizes graph convolutional networks to extract aspect-level sentiment features from comment text, enabling it to model the dependency relationships between words and thus capture syntactic structural information better than traditional sequence models. However, this method has a relatively simple model structure, relying solely on graph convolutional networks to extract features from syntactic dependency relationships, lacking the incorporation of external sentiment knowledge and the fusion of multimodal features. Furthermore, this method lacks modeling of interactions between aspect words and global semantics, making it difficult to maintain high prediction accuracy in comment scenarios where multiple aspect words co-occur. Summary of the Invention

[0008] To overcome the shortcomings of existing technologies, this invention provides a sentence-level multi-aspect sentiment analysis method based on dual-graph convolutional neural networks. By combining a graph convolutional neural network model based on syntactic dependencies and semantic interactions with external knowledge, the extraction of aspect-level sentiment features is enhanced. This sentiment extraction method achieves good results on the public dataset of the ABSA task.

[0009] The above-mentioned objective of this invention is achieved through the following technical solution: a sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network, comprising the following steps: 1. Data Acquisition and Preprocessing: Acquire user comment data, clean the user comment data through optimization operations and perform Chinese word segmentation, and then extract syntactic dependency relations; 2. Aspect Identification and Indicator System Construction: Establish a three-level indicator system with progressively more precise ranges, and then extract the corresponding aspect words from the comments extracted in step 1 based on the longest matching rule, mapping the comments to specific aspects; 3. Model Construction and Training: A MA-DKGCN (Multi-Aspect Dynamic Knowledge Graph Convolutional Network) model was constructed and trained using a loss function. The MA-DKGCN model consists of three main modules: The MA-GCN (Multi-Aspect Graph Convolutional Network) module: By constructing a "multi-aspect, scale-weighted dependency matrix", it clarifies the influence relationship between multiple aspect words in the modeling sentence, strengthens the semantic interaction between aspect words, and filters redundant syntactic dependency edges; The K-GAT (Knowledge-Enhanced Graph Attention Network) module introduces a sentiment dictionary as a knowledge base on the semantic graph and uses a multi-head cross-attention mechanism to integrate the weights of sentiment words with the semantic attention weights of the sentences themselves, effectively alleviating the problems of colloquialism and non-standard emotional expression in UGC (User-Generated Content). BiAffine fusion module: fuses the feature representations output by the two modules above to generate the final sentiment feature vector, which is used for multi-level sentiment classification tasks; 4. Sentiment prediction for user-generated content: By using the MA-DKGCN model from step 3 to output prediction results of different sentiment polarities (positive, negative, neutral), we can obtain more granular aspect-level sentiment polarities.

[0010] Furthermore, the optimization operations in step 1 include noise reduction, sentence segmentation, removal of emojis and advertising content, Chinese word segmentation using the Jieba tool, and extraction of syntactic dependency relations using the LTP parser.

[0011] Furthermore, the rules for constructing the three-tiered indicator system in step 2 are as follows: Primary indicators (macro level): covering the main attribute dimensions of new energy vehicles; Secondary indicators (meso-level): These further subdivide primary indicators into more specific sub-aspects; Level 3 indicators (micro level): further refined to specific attributes or terms.

[0012] The entire indicator system can be represented as a tree:

[0013]

[0014]

[0015]

[0016] The specific operation of extracting the corresponding aspect terms from the comments extracted in step 1 based on the longest matching rule is as follows: given the comment sentence based on the dictionary's longest matching rule. ,in Let i be the i-th word. If there exist n consecutive words... With a certain aspect of words If a match is found and n is the largest, then that aspect is labeled.

[0017] Furthermore, step 3 specifically involves the following steps: 1) Input layer and semantic encoding: 2) Utilize the MA-GCN module in the MA-DKGCN model to construct and perform convolution operations on multi-faceted, scale-weighted dependency matrices. 3) Utilize the K-GAT module in the MA-DKGCN model to perform semantic attention computation that incorporates external sentiment knowledge; 4) Use the BiAffine fusion module to fuse the feature representations output from the two modules in steps 2) and 3) to generate the final sentiment feature vector; 5) Optimize the cross-entropy loss function, define the loss function for the MA-DKGCN model, set the training parameters, and train and evaluate on the dataset.

[0018] Furthermore, step 1) specifically involves: the model input being the user's comment sentence. Each word Embedded using the BERT model, a sequence of context-sensitive word vectors is generated. (n=768), serving as the initial features for subsequent construction of the graph neural network and convolutional operations. For a given sentence (Contains n words) and its aspect words (A continuous substring of length m) is shown in the following formula.

[0019] Learning Mapping

[0020] Output the emotional polarity in this aspect.

[0021] Furthermore, step 2) specifically involves: M is initialized with a zero matrix (its size is expanded in the implementation according to sentence length and aspect boundary; pseudocode is as follows). The frame position; when landing, take the position consistent with the word order length. (Valid region). In the dependency tree Above, focusing on the aspect term, collect neighbors within a maximum of L hops; and with the target term... When there is a path length d, according to Distance decay accumulates to .

[0022]

[0023] If two words If the same indicator belongs to a higher level (from the HIS hierarchical mapping), then the weight is increased accordingly. :

[0024] Smoothing and Denseening: Performed on non-special placeholder columns

[0025] To mitigate syntactic sparsity and parsing noise, the degree matrix D is then calculated and symmetric normalized:

[0026]

[0027] Complexity: Time ,space

[0028] use Using the adjacency matrix of the graph, multi-layer GCN convolution is performed on the semantic code E to obtain the syntactic branch representation. The standard level 1 update is written as: .

[0029] Furthermore, step 3) specifically involves: Attention weights are calculated at the semantic layer of a sentence using an attention mechanism. A self-attention mechanism is used to obtain the attention weight matrix, which is then used as the adjacency matrix. This self-attention mechanism enables the model to capture the semantic relationship weights between each word in the sentence and its contextual terms. The attention matrix is ​​obtained in sentence-level self-attention and is treated as the adjacency matrix of a graph. The output is given for the i-th attention head at each layer. Multi-head splicing

[0030]

[0031] At the same time, a mask matrix was constructed. This focuses on multi-faceted terms, where j is the sentence sequence length. A value of 1 is assigned if the current word belongs to the multi-faceted term category, and 0 otherwise. Constructing an emotion feature matrix from an emotion dictionary (Positive / negative strength of each token; zeroing out misses to align with the sequence), and interacts with semantic relation weights through a multi-head attention mechanism to obtain a knowledge-enhanced representation. Then, the outputs of multiple attention heads are concatenated to form the final representation:

[0032] Finally, the results are refined by integrating the sentiment corpus through a cross-attention mechanism.

[0033] Furthermore, step 4) specifically involves: based on the DualGCN model, using bidirectional biaffine transformation as a bridge, exchanging relevant features between multi-faceted SynGCN and knowledge-enhancing SemGAT, mapping the two feature representations to the same semantic space.

[0034] Then, average pooling and concatenation are performed, followed by a classifier and softmax to obtain the sentiment distribution:

[0035]

[0036] That is, the emotional polarity classification results, in which and It consists of a learnable weight matrix and a bias vector.

[0037] Furthermore, step 5) specifically involves: using the cross-entropy loss function as the optimization objective, employing the Adam optimizer for gradient updates, and determining hyperparameters such as the learning rate, batch size, and hidden dimension through a grid search method. The loss function is defined as:

[0038] The specific training parameters are set as follows: The number of training epochs is 30, meaning the entire training set is iterated 30 times. Adam was chosen as the optimizer. The learning rate is set to 2 × 10. -3 ; The batch size is 128; The maximum sequence length is set to 100. The pretrained BERT model uses bert-base-Chinese; The BERT embedding dimension (BERT dim) is 768, and the BERT dropout ratio is set to 0.3; The parameters of the semantic attention mechanism are: 4 attention heads, 3 layers, 0.5 dropout ratio, 6 top-k value, and 0.1 weight alpha. The number of syntactic layers is 2, and the dropout ratio (syn dropout) is 0.7. The dropout ratio of the biaffine layer is 0.5; Training and evaluation were performed on the publicly available ABSA dataset and the BYD Forum dataset.

[0039] The beneficial effects of this invention compared to the prior art are: (1) This invention proposes a multi-faceted sentiment analysis method, which adopts a multi-faceted dependency matrix, filters redundant dependency relations and enhances the interaction between multi-faceted words, introduces externally enhanced sentiment knowledge to improve the interaction between semantics, and effectively improves the robustness and accuracy of sentiment analysis.

[0040] (2) The method of the present invention designs a multi-faceted dual-path graph neural network structure, including a multi-faceted syntactic graph convolutional network (MA-GCN) and a knowledge-enhanced multi-faceted semantic attention graph network (K-GAT), which can extract sentiment information from the syntactic and semantic levels respectively.

[0041] (3) This invention introduces an external sentiment knowledge base and a multi-head cross-attention mechanism into the model structure, and uses the existing sentiment dictionary to enhance the model’s ability to recognize sentiment features, thereby improving the sentiment extraction effect in complex scenarios.

[0042] (4) The present invention adopts the BiAffine dual affine fusion mechanism to realize the interactive fusion of syntactic graph features and semantic graph features, ensuring that the model can maintain a high accuracy in multi-faceted co-occurrence, colloquial expression and noisy environment.

[0043] (5) The algorithm proposed in this invention can generate a sentence-aspect sentiment score matrix ( This enables the quantitative expression of emotional polarity for each aspect, providing a unified interface for subsequent customer satisfaction and attention analysis. Attached Figure Description

[0044] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Figure 1 This is a schematic diagram of the sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network, as described in this invention. Detailed Implementation

[0045] The present invention is described in detail below through specific embodiments, but this does not limit the scope of protection of the present invention. Unless otherwise specified, the experimental methods used in the present invention are all conventional methods, and the experimental equipment, materials, reagents, etc. used can all be obtained commercially.

[0046] Example 1 A sentence-level multi-aspect sentiment analysis method based on dual-graph convolutional neural networks is proposed. This method combines external knowledge with a graph convolutional neural network model based on syntactic dependencies and semantic interactions to obtain aspect-level sentiment features, as described below: (1) Description of aspect-level emotion extraction problem This invention addresses the problem of fine-grained sentiment classification of user reviews of new energy vehicles, aiming to identify the sentiment polarity related to specific aspects mentioned in sentences. This method integrates relevant information such as external sentiment knowledge bases, syntactic dependency trees, and interaction features between grammatical structures to extract aspect-level sentiment features. Through this aspect-level sentiment analysis method, businesses or users can gain access to more granular sentiment characteristics.

[0047] (2) Overall description of the proposed aspect-level emotion extraction problem method This invention proposes an innovative aspect-level sentiment extraction method. It utilizes a novel MA-DKGCN model to identify aspect-level sentiment towards new energy vehicles. The model introduces a multi-aspect, scale-based dependency matrix to filter redundant syntactic relations while capturing the interaction strength between multiple aspects. Furthermore, it combines a sentiment knowledge base and a cross-attention mechanism to enhance the extraction of sentiment-related features. The aim is to obtain more accurate sentiment feature analysis through comprehensive analysis of user-generated content on social media. The core process of this method is as follows: 1) Data Collection and Preprocessing: User review data was crawled from the "Reputation" forum of the Autohome platform, covering six BYD models: E1, E2, E3, E5, E6, and Yuan, spanning from 2015 to 2023. A total of 3,393 review posts were collected, containing 55,511 sentences. The data was cleaned through noise reduction, sentence segmentation, and removal of emojis and advertising content. Chinese word segmentation was performed using the Jieba tool, and syntactic dependency relations were extracted using an LTP parser.

[0048] 2) Aspect Identification and Indicator System Construction: A three-tiered indicator system (Hierarchical Indicator System, HIS) is established. First-level indicators include "appearance," "space," "power," and "range"; second-level indicators include passenger space, storage space, and trunk space; and third-level indicators include specific terms such as "legroom," "seat comfort," and "charging speed." Then, based on the longest matching rule, corresponding aspect terms are extracted from the extracted comments, mapping the comments to specific aspects.

[0049] 3) Model Construction and Training (MA-DKGCN): This invention proposes a novel Multi-Aspect Dynamic Knowledge Augmented Graph Convolutional Neural Network (MA-DKGCN) for aspect-level sentiment extraction. The model structure includes three main modules: MA-GCN module: By constructing a "multi-faceted, scale-weighted dependency matrix", it clarifies the influence relationship between multiple aspect words in the modeling sentence, strengthens the semantic interaction between aspect words, and filters redundant syntactic dependency edges; K-GAT module: Introduces a sentiment dictionary as a knowledge base on the semantic graph, and adopts a multi-head cross-attention mechanism to integrate the sentiment word weights with the semantic attention weights of the sentences themselves, effectively alleviating problems such as colloquialism and non-standard emotional expression in UGC; BiAffine fusion mechanism: It fuses the feature representations output by the two modules mentioned above to generate the final sentiment feature vector, which can be used for multi-level sentiment classification tasks.

[0050] 4) Sentiment prediction for user-generated content: The model can output sentiment polarity (positive, negative, neutral) for different aspects as prediction results, and can obtain more granular aspect-level sentiment polarity.

[0051] (3) Data preparation and feature extraction 1) Data Collection: User reviews of BYD pure electric vehicles were scraped from the "Reputation" channel of the Autohome forum through authorized means. The data covered six models, with reviews spanning different models, years, and configurations to ensure the diversity and representativeness of the corpus. The data was collected from October 2015 to December 2023, totaling 3393 posts and 55511 sentences. See Table 1 for details. Table 1. Statistics of User Comments

[0052] 2) Text cleaning: Remove empty comments, extremely short texts of less than 3 words, emoticons, and unstructured content (such as advertisements, marketing content, redundant symbols, URLs, emoticons, etc.); standardize the text, unify simplified and traditional Chinese characters, and remove garbled characters; delete duplicate comments to avoid sample bias, and at the same time remove template-style replies and noisy users.

[0053] 3) Text preprocessing: The “Jieba” word segmentation tool is used for Chinese text segmentation, which has a good effect on colloquial expressions; the “LTP toolkit” is used for syntactic analysis to obtain syntactic dependency relations, which provides a foundation for subsequent dependency matrix construction.

[0054] 4) Sentence segmentation strategy: Considering the long structure of Chinese sentences and the presence of multiple clauses, natural sentence segmentation markers such as periods, exclamation marks, and ellipses are used to preserve semantic integrity and ensure that sentiment semantics are not truncated. The context length of each analysis unit is guaranteed to match the maximum sequence length of BERT.

[0055] (4) Aspect Identification and Indicator System Construction 1) Establishment of a Hierarchical Indicator System (HIS) To achieve fine-grained analysis of user-generated content, this invention adopts a three-tiered indicator system: Primary indicators (macro level): cover the main attribute dimensions of new energy vehicles, such as:

[0056] Secondary indicators (meso-level): These break down primary indicators into more specific sub-aspects, for example:

[0057]

[0058] Level 3 indicators (micro-level): These are further refined to specific attributes or terms, for example:

[0059]

[0060] The entire indicator system can be represented as a tree:

[0061]

[0062]

[0063]

[0064] 2) Aspect Identification For identification within user comment text, a dictionary-based Longest Matching Rule is employed: given a comment sentence... ,in Let i be the i-th word. If there exist n consecutive words... With a certain aspect of words ∈ If a match is found and n is the largest, then that aspect is labeled. In other words, the longest aspect word in the sentence is matched to avoid conflicts when "battery" and "battery life" appear simultaneously.

[0065] (4) MA-DKGCN Model Construction and Training This invention proposes a Multi-Aspect Dynamic Knowledge Graph Convolutional Network (MA-DKGCN) model to recognize and quantify multi-faceted sentiment in forum texts. The model consists of three parts: a multi-angle syntactic graph convolutional module (MA-GCN), a knowledge-enhanced graph attention module (K-GAT), and a BiAffine feature fusion mechanism.

[0066] 1) Input layer and semantic encoding The model input is user comment sentences. Each word Embedded using the BERT model, a sequence of context-sensitive word vectors is generated. (n=768), serving as the initial features for subsequent graph neural network construction and convolution operations. For a given sentence (Contains n words) and its aspect words (A continuous substring of length 𝑚)

[0067] Learning Mapping

[0068] Output the emotional polarity (positive, negative, neutral) in this aspect.

[0069] 2) MA-GCN module: Multi-faceted, scale-weighted dependency matrix construction and convolution operations To effectively capture the interactive relationships between multiple aspects in comments, a "multi-faceted, scale-weighted dependency matrix" is constructed based on the following mechanism: First, in the current aspect words... Within the local context, dependency parsing is performed on the sentence to preserve dependency relations related to the aspect and other co-occurring aspects, suppress redundant edges, and obtain a set of dependency edges. A distance decay mechanism is used, and scaling and enhancement are performed based on the dependency distance between words and the hierarchy of indicators (HIS) to calculate the connection strength between aspect words and their neighboring words. For aspect words belonging to the same high-level indicator (such as "seat back" and "seat headrest"), interconnection edge weights are added to obtain the adjacency matrix M. The adjacency matrix M is normalized to construct a graph convolution input graph. GCN is used to propagate the node representation of the graph structure to obtain the syntactic structure encoding.

[0070] The key step is: initialize M with a zero matrix (its size is expanded in the implementation according to sentence length and aspect boundary; pseudocode is as follows). The frame position; when landing, take the position consistent with the word order length. (Valid region). In the dependency tree Above, focusing on the aspect term, collect neighbors within a maximum of L hops; and with the target term... When there is a path length d, according to Distance decay accumulates to .

[0071]

[0072] If two words If the same indicator belongs to a higher level (from the HIS hierarchical mapping), then the weight is increased accordingly. :

[0073] Smoothing and Denseening: Performed on non-special placeholder columns

[0074] To mitigate syntactic sparsity and parsing noise, the degree matrix D is then calculated and symmetric normalized:

[0075]

[0076] Complexity: Time ,space

[0077] use Using the adjacency matrix of the graph, multi-layer GCN convolution is performed on the semantic code E to obtain the syntactic branch representation. A standard level 1 update can be written as:

[0078] 3) K-GAT module: Graph attention computation incorporating external sentiment knowledge Attention weights are calculated at the semantic layer of a sentence using an attention mechanism, with a self-attention mechanism used to obtain the attention weight matrix. This self-attention mechanism enables the model to capture the semantic relationship weights between each word in the sentence and its contextual terms. The attention weight matrix is ​​obtained in sentence-level self-attention and treated as an adjacency matrix of a graph. This is then output for the i-th attention head at each layer. Multi-head splicing

[0079]

[0080] In addition, a mask matrix was constructed to address various terminology. , where j is the sentence sequence length. A '1' is assigned if the current word belongs to the aspect category, and a '0' otherwise. This mask matrix ensures that the model selectively focuses on aspect-related words while suppressing irrelevant information.

[0081] Constructing an emotion feature matrix from an emotion dictionary (Positive / negative strength of each token; zeroing out misses to align with the sequence), and interacts with semantic relation weights through a multi-head attention mechanism to obtain a knowledge-enhanced representation. Then, the outputs of multiple attention heads are concatenated to form the final representation:

[0082] This enables the model to better capture the contextual representation of emotion perception.

[0083] 4) BiAffine Fusion Module Based on the DualGCN model (Li et al., 2021), this paper utilizes biaffine transformation as a bridge to effectively exchange relevant features between multifaceted SynGCN and knowledge-enhanced SemGAT, mapping the two feature representations to the same semantic space.

[0084]

[0085] Then, average pooling and concatenation are performed, followed by a classifier and softmax to obtain the sentiment distribution.

[0086]

[0087] This refers to the sentiment polarity classification result (positive / neutral / negative). and It consists of a learnable weight matrix and a bias vector.

[0088] 5) Loss function and training settings The cross-entropy loss function is used as the optimization objective, and the Adam optimizer is used for gradient updates. Hyperparameters such as learning rate, batch size, and hidden dimension are determined through grid search. The loss function is defined as follows:

[0089] The specific training parameter settings are shown in Table 2: Table 2 Training Setting Parameter Statistics

[0090] Training and evaluation were performed on the publicly available ABSA dataset (Laptop, Restaurant, Twitter) and the BYD Forum dataset.

[0091] Key points of data preprocessing (related to model training): Jieba word segmentation and LTP dependency syntax are used for Chinese scenarios; to avoid aspect words being fragmented during syntactic parsing, the third-level aspect dictionary of HIS is used as a constraint to ensure that multi-word aspects participate in dependency graph construction as a whole.

[0092] Environment and implementation stack: PyTorch 1.13, Transformers (BERT); GPU RTX 4070Ti (12GB), CUDA 12.0.

[0093] Ablation and key effects: Removing the "scale-weighted dependency matrix", removing the "external affective knowledge", or removing the "BiAffine fusion" all significantly reduced Acc / M-F1, verifying the complementarity of the three components.

[0094] The embodiments described above are merely preferred embodiments of the present invention, and not all feasible embodiments of the present invention. Any obvious modifications made by those skilled in the art without departing from the principles and spirit of the present invention should be considered to be included within the scope of protection of the claims of the present invention.

Claims

1. A sentence-level multi-faceted sentiment analysis method based on dual-graph convolutional neural networks, characterized by the following steps: include: S1. Data Acquisition and Preprocessing: Acquire user comment data, clean the user comment data through optimization operations and perform Chinese word segmentation, and then extract dependency structures; S2. Aspect Identification and Indicator System Construction: Establish a three-level indicator system with progressively more precise ranges, and then extract the corresponding aspect words from the comments extracted in step S1 based on the longest matching rule, mapping the comments to specific aspects; S3. Model Building and Training: Construct the MA-DKGCN model and set up the training parameters according to the loss function. The MA-DKGCN model consists of three main modules: MA-GCN module: By constructing a "multi-faceted, scale-weighted dependency matrix", it clarifies the influence relationship between multiple aspect words in the modeling sentence, strengthens the semantic interaction between aspect words, and filters redundant syntactic dependency edges; K-GAT module: Introduces a sentiment dictionary as a knowledge base on the semantic graph, and adopts a multi-head cross-attention mechanism to integrate the sentiment word weights with the semantic attention weights of the sentences themselves, effectively alleviating the problems of colloquialism and non-standard emotional expression in UGC; BiAffine fusion module: fuses the feature representations output by the two modules above to generate the final sentiment feature vector, which is used for multi-level sentiment classification tasks; S4. Sentiment Prediction of User-Generated Content: By using the MA-DKGCN model from step S3 to output prediction results of different sentiment polarities, more granular aspect-level sentiment polarities are obtained, including positive, negative, and neutral.

2. The sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network according to claim 1, characterized in that, The optimization operations in step S1 include noise reduction, sentence segmentation, removal of emojis and advertising content, Chinese word segmentation using the Jieba tool, and dependency structure extraction using the LTP parser.

3. The sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network according to claim 1, characterized in that, The rules for constructing the three-tiered indicator system in step S2 are as follows: Primary indicators: covering the main attribute dimensions of new energy vehicles; Secondary indicators: These further subdivide primary indicators into more specific sub-aspects; Level 3 indicators: further refined to specific attributes or terms; The entire indicator system can be represented as a tree: ; ; ; ; The specific operation of extracting the corresponding aspect terms from the comments extracted in step 1 based on the longest matching rule is as follows: given the comment sentence based on the dictionary's longest matching rule. ,in Let i be the i-th word; if there exist n consecutive words... If a word matches a certain aspect and n is the largest, then that aspect is labeled.

4. The sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network according to claim 1, characterized in that, The specific steps of step S3 are as follows: S3.

1. Input Layer and Semantic Encoding: S3.

2. Utilize the MA-GCN module in the MA-DKGCN model to perform multi-faceted, scale-weighted dependency matrix construction and convolution operations; S3.

3. Utilize the K-GAT module in the MA-DKGCN model to perform semantic attention computation that integrates external sentiment knowledge; S3.

4. Use the BiAffine fusion module to fuse the feature representations output from the two modules in steps S3.2 and S3.3 to generate the final sentiment feature vector; S3.

5. Optimize the cross-entropy loss function, define the loss function for the MA-DKGCN model, set the training parameters, and train and evaluate on the dataset.

5. The sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network according to claim 1, characterized in that, Specifically, step S3.1 involves the model input being user comment sentences. Each word Embedded using the BERT model, a sequence of context-sensitive word vectors is generated. (n=768), serving as the initial features for subsequent graph neural network construction and convolution operations; for a given sentence : Contains n words and their aspect terms A continuous substring of length m, as shown in the following formula. ; Learning Mapping ; Output the emotional polarity in this aspect.

6. The sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network according to claim 1, characterized in that, Step S3.2 specifically includes: M is initialized with a zero matrix, and its size is expanded in the implementation according to the sentence length and aspect boundary. The pseudocode is as follows: The frame position; when landing, take the position consistent with the word order length. Valid region; in dependency tree Above, focusing on the aspect term, collect neighbors within a maximum of L hops; and with the target term... When there is a path length d, according to Distance decay accumulates to ; ; If two words If they belong to the same higher level and the same indicator, then the weighting will be increased accordingly. : ; Smoothing and Denseening: Performed on non-special placeholder columns ; To mitigate syntactic sparsity and parsing noise, the degree matrix D is then calculated and symmetric normalized: ; ; Complexity: Time ,space ; use Using the adjacency matrix of the graph, multi-layer GCN convolution is performed on the semantic code E to obtain the syntactic branch representation. Standard Level 1 update is written as: 。 7. The sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network according to claim 1, characterized in that, Step S3.3 specifically includes: Attention is computed at the semantic layer of a sentence using an attention mechanism. A self-attention mechanism is used to obtain the attention weight matrix, which is then used as the adjacency matrix. This self-attention mechanism enables the model to capture the semantic dependencies between each word in the sentence and its contextual terms. The attention weight matrix is ​​obtained in sentence-level self-attention and treated as the adjacency matrix of a graph. This is output for the i-th attention head at each layer. Multi-head splicing ; ; At the same time, a mask matrix was constructed. The function focuses on multi-faceted terms, where j is the sequence length of the sentence; if the current word belongs to the aspect term, it is represented as 1, otherwise it is represented as 0. Constructing an emotion feature matrix from an emotion dictionary Each token has a positive / negative strength; misses are set to zero to align with the sequence, and the token interacts with semantic relation weights through a multi-head attention mechanism to obtain a knowledge-enhanced representation. The outputs of multiple attention heads are then concatenated to form the final representation. ; Finally, the results are refined by integrating the sentiment corpus through a cross-attention mechanism.

8. The sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network according to claim 1, characterized in that, Step S3.4 specifically involves: based on the DualGCN model, using bidirectional biaffine transformation as a bridge, exchanging relevant features between multi-faceted SynGCN and knowledge-enhancing SemGAT, and mapping the two feature representations to the same semantic space. ; Then, average pooling and concatenation are performed, followed by a classifier and softmax to obtain the sentiment distribution: ; ; That is, the emotional polarity classification results, in which It consists of a learnable weight matrix and a bias vector.

9. The sentence-level multi-faceted sentiment analysis method based on a dual-graph convolutional neural network according to claim 1, characterized in that, Step S3.5 specifically involves: using the cross-entropy loss function as the optimization objective, employing the Adam optimizer for gradient updates, and determining hyperparameters such as the learning rate, batch size, and hidden dimension through a grid search method. The loss function is defined as: ; The specific training parameters are set as follows: The training rounds are 30, meaning the entire training set is iterated 30 times. The optimizer chosen is Adam; The learning rate is set to 2 × 10 -3 ; Batch size is 128; The maximum sequence length is set to 100; The pre-trained model uses bert-base-Chinese; The BERT embedding dimension is 768, and the BERT dropout ratio is set to 0.

3. The parameters of the semantic attention mechanism are: 4 attention heads, 3 layers, dropout ratio of 0.5, Top-k value of 6, and weight parameter of 0.

1. The syntactic graph convolution has 2 layers and a dropout ratio of 0.

7. The dropout ratio for the dual affine layers is 0.5; Training and evaluation were performed on the publicly available ABSA dataset and the BYD Forum dataset.

Citation Information

Patent Citations

  • A method and apparatus for aspect-level sentiment analysis based on graph convolutional neural networks

    CN112528672B

  • Aspect-level sentiment analysis method combining syntax tree and graph network

    CN119149734A