Fusion bottleneck convolution-based sentiment triple extraction method and system

By incorporating a bottleneck convolution-based sentiment triple extraction method and utilizing multi-head attention and deep feature extraction techniques, this approach addresses the shortcomings of existing models in fine-grained sentiment capture and long-distance text dependency representation, thereby improving the accuracy and reliability of sentiment triple extraction.

CN121390079BActive Publication Date: 2026-03-03SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing sentiment triple extraction models lack the ability to capture fine-grained sentiment, do not fully mine the deep semantics of text, and cannot effectively represent long-distance textual dependencies.

Method used

A sentiment triple extraction method that integrates bottleneck convolution is adopted. The hidden state vector is processed by multi-head attention, residual connection, normalization and feedforward fully connected, and sentiment triples are generated by combining deep feature extraction and global semantic modeling.

Benefits of technology

It improves the reliability of sentiment triple extraction results, fully captures fine-grained text features in sentences, deeply explores long-distance text dependencies, and solves the problem of long distances and complex relationships between sentiment elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_3
    Figure SMS_3
  • Figure SMS_8
    Figure SMS_8
  • Figure SMS_19
    Figure SMS_19
Patent Text Reader

Abstract

The application relates to the technical field of semantic analysis, in particular to a sentiment triple extraction method and system fusing a bottleneck convolution; first, a sentence to be processed is acquired, a plurality of sets of label indications are added, an updated sentence is generated, hidden state vectors are obtained through multiple times of context semantic aggregation; space feature tensors are obtained through tensor reshaping of the hidden state vectors, first features and second features are obtained through deep feature extraction, the first features and the second features are multiplied, enhanced gate features are obtained through deep feature extraction, and the enhanced gate features are connected with residual errors of the space feature tensors to generate fusion features; then, global semantic features are obtained through reverse tensor reshaping and global semantic modeling of the fusion features; sentiment triples are generated by traversing all label indications; finally, all sentiment triples are aggregated, the number of occurrences of each triple is counted, and the sentiment triples with the number of occurrences not lower than a threshold value are selected as final sentiment triples. The application can accurately mine sentiment correlation information from a text, and improves the accuracy of sentiment triple extraction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of semantic analysis technology, specifically a method and system for extracting sentiment triples by incorporating bottleneck convolution. Background Technology

[0002] In the internet age, online comments have exploded. On platforms like Weibo, forums, and e-commerce, internet users offer a massive amount of opinions and comments while communicating or shopping. These opinions and comments are imbued with user emotions and are of great significance to media and businesses. Therefore, sentiment analysis techniques that accurately capture emotional tendencies have become increasingly important. Sentiment triple extraction, as one of the core tasks of fine-grained sentiment analysis, aims to extract triples composed of aspect words, opinion words, and sentiment polarity from text. Although existing research has made some progress, the sentiment triple extraction task still faces many challenges and problems, especially the fact that most existing models lack the ability to capture fine-grained sentiment, do not fully mine the deep semantics of text, and cannot effectively represent long-distance textual dependencies. Summary of the Invention

[0003] The purpose of this invention is to provide a method and system for extracting sentiment triples by incorporating bottleneck convolution.

[0004] A sentiment triple extraction method incorporating bottleneck convolution includes the following operations:

[0005] S1. Obtain the sentence to be processed, and use multiple sets of tag indicators as suffixes of the sentence to be processed to obtain the updated sentence;

[0006] S2. The updated sentence undergoes several context semantic aggregation operations to obtain the hidden state vector. Each context semantic aggregation operation includes multi-head attention processing, residual connection, normalization and feedforward fully connected processing.

[0007] S3. The hidden state vector is reshaped into a spatial feature tensor. The spatial feature tensor is then subjected to one and two deep feature extractions to obtain the first and second features. The first and second features are multiplied to generate a gated feature map. The gated feature map is then subjected to deep feature extraction to obtain an enhanced gated feature. The enhanced gated feature is then residually connected to the spatial feature tensor to obtain the fused feature.

[0008] S4. The fused features are reconstructed using an inverse tensor to obtain text sequence features. The text sequence features are then modeled using global semantics to obtain global semantic features.

[0009] S5. Generate sentiment triples based on label indications; S51. Select the first label in the first set of label indications as the first element of the sentiment triple; limit the range of candidate words according to the label type, generate a probability distribution of all candidate words through the global semantic features via an activation function, and select the candidate word with the highest probability as the content of the first element; S52. Select the next label in the label indications as the second element of the sentiment triple; update the global semantic features based on the current label, generate a new probability distribution through the activation function after the update, and select the candidate word with the highest probability as the content of the second element; repeat S52 to obtain a sentiment triple; S53. Select the first label in the next set of label indications and execute S51 until a sentiment triple is obtained based on the last set of label indications;

[0010] S6. Aggregate all sentiment triples, count the number of times each sentiment triple appears in all sentiment triples, and select the ones that appear at least once the threshold as the final sentiment triples.

[0011] The specific operation of deep feature extraction is as follows: the spatial feature tensor is subjected to bottleneck convolution, normalization and activation function to obtain the first feature and the second feature.

[0012] The bottleneck convolution operation specifically involves: spatial feature tensor The response vector is obtained by performing a linear transformation using the low-rank projection matrix and adding it to the bias term. The specific formula is as follows:

[0013]

[0014] in, , All are low-rank projection matrices. It is the transpose symbol. This is a bias term.

[0015] The specific operations of global semantic modeling are as follows: the text sequence features are linearly transformed to obtain a first fundamental matrix, a second fundamental matrix, and a state evolution factor. The first fundamental matrix and the state evolution factor are discretized into a first state matrix and a second state matrix. The second state matrix and the second fundamental matrix are then subjected to a depthwise convolution operation to obtain a first depth matrix and a second depth matrix. Initial semantic features are calculated based on the text sequence features, the first state matrix, and the first depth matrix. The initial semantic features are linearly transformed to generate semantic features and a gating signal. The gating signal is processed by an activation function and multiplied with the semantic features. After linear transformation, the optimized semantic features are obtained. The optimized semantic features are multiplied with the second depth matrix to obtain the global semantic features.

[0016] The formula for generating the probability distribution is as follows:

[0017]

[0018] in, For probability distribution, For time steps, Candidate words, Indicates the preceding The step is the candidate word sequence with the highest probability selected. For global semantic features, Indicates at time step Global semantic features Represents the weight matrix. This represents the bias term.

[0019] The specific steps for selecting the candidate word with the highest probability are as follows:

[0020]

[0021] in, The candidate word with the highest probability. Indicates in the candidate word set Inside, find the probability distribution The candidate word with the highest probability. Indicates the first The candidate word set for the step These are candidate words.

[0022] The operation of limiting the scope of candidate words based on the tag type is as follows: if the current tag is an aspect tag, the scope of candidate words is all words in the sentence; if the current tag is an opinion tag, the scope of candidate words is all words in the sentence; if the current tag is a sentiment polarity tag, the scope of candidate words is sentiment evaluation words.

[0023] The operation of updating the global semantic features is as follows: based on the current label, the global semantic features are updated through semantic analysis, which includes mask multi-head attention processing, residual connection and normalization, multi-head attention processing and feedforward fully connected processing.

[0024] The operation of multiple tag indicators is as follows: the tags for aspect words, opinion words, and sentiment polarity are A, O, and S, respectively. These tags are connected in a specified order to set multiple tag indicators.

[0025] A sentiment triple extraction system incorporating bottleneck convolution includes:

[0026] Preprocessing module: Obtains the sentence to be processed, uses multiple sets of tag indicators as suffixes of the sentence to be processed, and obtains the updated sentence;

[0027] Contextual semantic aggregation module: The updated sentence undergoes several contextual semantic aggregation operations to obtain the hidden state vector. Each contextual semantic aggregation operation includes multi-head attention processing, residual connection, normalization and feedforward fully connected processing.

[0028] Deep feature extraction module: The hidden state vector is reshaped into a spatial feature tensor. The spatial feature tensor is then subjected to one and two deep feature extractions to obtain the first and second features. The first and second features are multiplied to generate a gated feature map. The gated feature map is then subjected to deep feature extraction to obtain an enhanced gated feature. The enhanced gated feature is then residually connected to the spatial feature tensor to obtain the fused feature.

[0029] Global semantic modeling module: The fused features are reconstructed into inverse tensors to obtain text sequence features. The text sequence features are then subjected to global semantic modeling to obtain global semantic features.

[0030] Sentiment Triple Extraction Module: Generates sentiment triples based on label indications; selects the first label in the first set of label indications as the first element of the sentiment triple; limits the range of candidate words based on label type; generates a probability distribution of all candidate words from global semantic features through an activation function; selects the candidate word with the highest probability as the content of the first element; selects the next label in the label indications as the second element of the sentiment triple; updates the global semantic features based on the current label; generates a new probability distribution from the updated global semantic features through an activation function; selects the candidate word with the highest probability as the content of the second element; repeats S52 to obtain a sentiment triple; selects the first label in the next set of label indications and executes S51, until a sentiment triple is obtained based on the last set of label indications;

[0031] The sentiment triplet filtering module aggregates all sentiment triplets, counts the number of times each sentiment triplet appears in all sentiment triplets, and selects those with a frequency of at least one threshold as the final sentiment triplet.

[0032] The beneficial effects of this invention are:

[0033] This invention provides a sentiment triple extraction method based on bottleneck convolution. First, the sentence to be processed is acquired and multiple sets of labels are added to generate an updated sentence. A hidden state vector is obtained through multiple contextual semantic aggregations. The hidden state vector is then reshaped into a spatial feature tensor, which is then subjected to deep feature extraction to obtain a first and second feature. These two features are multiplied and further extracted to obtain an enhanced gating feature, which is then concatenated with the spatial feature tensor residual to generate a fused feature. Next, the fused feature is subjected to inverse tensor reshaping and global semantic modeling to obtain global semantic features. All label indicators are traversed to generate sentiment triples. Finally, all sentiment triples are aggregated, and the frequency of each triple is counted. Triples with a frequency not less than a threshold are selected as the final sentiment triples. This invention can fully capture fine-grained text features in sentences, highlight key sentiment information, deeply mine long-distance text dependencies, solve the problem of large distances and complex relationships between sentiment elements in text, and improve the reliability of sentiment triple extraction results. Detailed Implementation

[0034] This embodiment provides a sentiment triple extraction method that incorporates bottleneck convolution, including the following operations:

[0035] S1. Obtain the sentence to be processed, and use multiple sets of tag indicators as suffixes of the sentence to be processed to obtain the updated sentence.

[0036] To manage the predicted order of sentiment elements, multiple sets of label indicators are set up. The labels for aspect terms, opinion terms, and sentiment polarity are A, O, and S, respectively. These labels are connected in a specified order to obtain multiple sets of label indicators. For example, the label indicator " , indicates pressing " Arranged in the order of "", the labels indicate " , indicates pressing " Arranged in the order of "", the labels indicate " , indicates pressing " The labels are arranged in the order of "". These labels indicate what is called These tags are added to the suffix of the sentence to be processed to obtain the updated sentence. The above design can effectively guide the extraction order of the emotional triad.

[0037] The label order in the multi-set label indication is determined based on the average score of all possible permutations on the training set.

[0038] This invention is based on model implementation. Since different labels indicate different performances, it is necessary to select a suitable label arrangement order. Based on the average entropy of the candidate arrangements on the training set, the order that may perform better is selected. The specific steps are as follows: (1) All possible arrangements of labels are selected. As a candidate; (2) for the input statement and its target emotional triad, according to Construct corresponding emotional triads Replace the labels with spaces to reduce noise, query the pre-trained language model, and obtain the conditional generation score. (3) Calculation In the training set average score The calculation formula is as follows:

[0039] ,

[0040] in accordance with right Sort and select the top-ranked of Used for training.

[0041] During training, using selected , for input statement Build Different labels and target emotion triads Based on the input target pair Fine-tuning the model to minimize the negative log-likelihood loss. The specific formula is as follows:

[0042] ,

[0043] in, It is the target emotion triad Length, For the first Output of the time step (label or word). For input statements, Indicates the first Tags generated before the step.

[0044] S2. The updated sentence undergoes several context semantic aggregation operations to obtain the hidden state vector. Each context semantic aggregation operation includes multi-head attention processing, residual connection, normalization, and feedforward fully connected processing.

[0045] S3. The hidden state vector is reshaped into a spatial feature tensor. The spatial feature tensor is then subjected to one and two deep feature extractions to obtain the first and second features. The first and second features are multiplied to generate a gated feature map. The gated feature map is then subjected to deep feature extraction to obtain an enhanced gated feature. The enhanced gated feature is then residually connected to the spatial feature tensor to obtain the fused feature.

[0046] First, adjust the hidden state tensor. , its hidden layer dimension Considered as the number of channels Sequence length Considered height ,width Setting it to 1 yields the spatial feature tensor. .

[0047] The specific operation of deep feature extraction is as follows: the spatial feature tensor is subjected to bottleneck convolution, normalization and activation function to obtain the first feature and the second feature.

[0048] The bottleneck convolution operation specifically involves: spatial feature tensor The response vector is obtained by performing a linear transformation using the low-rank projection matrix and adding it to the bias term. The specific formula is as follows:

[0049] ,

[0050] in, , All are low-rank projection matrices. It is the transpose symbol. This is a bias term.

[0051] The spatial feature tensor is subjected to one and two depth feature extractions to obtain the first feature. Second feature :

[0052] ,

[0053] ,

[0054] in, For activation function, Indicates normalization. This is the bottleneck convolution.

[0055] The first and second features are multiplied using the Hadamard product to generate a gated feature map. The specific formula is as follows:

[0056]

[0057] in, It represents the Hadamardi (or Hadama) stack.

[0058] To further refine fine-grained semantic features, the gated feature map is subjected to deep feature extraction to obtain the enhanced gated feature y, as shown in the following formula:

[0059] ,

[0060] The enhanced gated features and spatial feature tensors are residually concatenated to obtain fused features. The specific formula is as follows:

[0061] .

[0062] S4. The fused features are reshaped into inverse tensors to obtain text sequence features. The text sequence features are then modeled using global semantics to obtain global semantic features.

[0063] Fusion features Perform inverse tensor reshaping, where the number of channels Corresponding hidden layer dimension Length and width Corresponding sequence length To obtain text sequence features .

[0064] The specific operations of global semantic modeling are as follows: the text sequence features are linearly transformed to obtain a first fundamental matrix, a second fundamental matrix, and a state evolution factor. The first fundamental matrix and the state evolution factor are discretized into a first state matrix and a second state matrix. The second state matrix and the second fundamental matrix are then subjected to a depthwise convolution operation to obtain a first depth matrix and a second depth matrix. Initial semantic features are calculated based on the text sequence features, the first state matrix, and the first depth matrix. The initial semantic features are linearly transformed to generate semantic features and a gating signal. The gating signal is processed by an activation function and multiplied with the semantic features. After linear transformation, the optimized semantic features are obtained. The optimized semantic features are multiplied with the second depth matrix to obtain the global semantic features.

[0065] Text sequence features The first fundamental matrix is ​​obtained through linear transformation. Second fundamental matrix and state evolution factor The specific formula is as follows:

[0066] ,

[0067] in, It represents a linear transformation.

[0068] First fundamental matrix and state evolution factor Based on the discretization operation, it is transformed into a first state matrix. Second state matrix The specific formula is as follows:

[0069] ,

[0070] in, For state importance parameters, This indicates a discretization operation.

[0071] Second state matrix Second fundamental matrix The first depth matrix is ​​obtained by performing a depthwise convolution operation. Second depth matrix The specific formula is as follows:

[0072] ,

[0073] in, For depthwise convolution, while maintaining channel independence, the semantic connections between local words in the text are enhanced, providing richer local features for hidden state computation.

[0074] Based on text sequence features First state matrix and the first depth matrix Calculate initial semantic features The specific formula is as follows:

[0075] ,

[0076] in, This indicates element-wise multiplication. This is a matrix multiplication operation. This is the transpose symbol.

[0077] The initial semantic features are linearly transformed to generate semantic features. and gating signals The specific formula is as follows:

[0078] ,

[0079] The gated signal is processed by an activation function, multiplied with the semantic features, and then linearly transformed to obtain the optimized semantic features. The specific formula is as follows:

[0080] ,

[0081] in, This represents the SiLU activation function.

[0082] Optimized semantic features With the second depth matrix Perform multiplication to obtain global semantic features. The specific formula is as follows:

[0083] ,

[0084] Global semantic modeling efficiently models the global semantic dependencies of text through operations such as discretization, deep convolution, and gated projection, adapting to the semantic understanding requirements of sentiment triple extraction and providing more discriminative feature representations for subsequent sentiment triple extraction tasks.

[0085] S5. Generate sentiment triples based on label indications; S51. Select the first label in the first set of label indications as the first element of the sentiment triple; limit the range of candidate words according to the label type, generate the probability distribution of all candidate words through the global semantic features by the activation function, and select the candidate word with the highest probability as the content of the first element.

[0086] The operation of limiting the scope of candidate words based on the tag type is as follows: if the current tag is an aspect tag, the scope of candidate words is all words in the sentence; if the current tag is an opinion tag, the scope of candidate words is all words in the sentence; if the current tag is a sentiment polarity tag, the scope of candidate words is sentiment evaluation words.

[0087] Design a constraint decoding scheme based on the tag type, limiting the range of candidate words, and the candidate word set at each step. All are dynamically updated according to the constraint decoding scheme in Table 1 to ensure that the output sequence follows the label instructions, thereby generating sentiment triples that conform to the format specifications.

[0088] Table 1 Constraint Decoding Scheme

[0089] .

[0090] In Table 1, the candidate list "Input (x), [SSEP]" indicates that when the current label is [A] or [O], the candidate word range is the input content x. If [A] or [O] is the last label in the label indicator, a special separator [SSEP] is added to separate multiple sentiment triples. The candidate list "great, bad, ok, [SSEP]" indicates that when the current label is [S], the candidate word range is sentiment evaluation words such as "great", "bad", and "ok". If [S] is the last label in the label indicator, a special separator [SSEP] is added to separate multiple sentiment triples.

[0091] The formula for generating the probability distribution of all candidate words is as follows:

[0092] ,

[0093] in, For probability distribution, For time steps, Candidate words, Indicates the preceding The step is the candidate word sequence with the highest probability selected. For global semantic features, Indicates at time step Global semantic features Represents the weight matrix. This represents the bias term.

[0094] The specific steps for selecting the candidate word with the highest probability are as follows:

[0095] ,

[0096] in, The candidate word with the highest probability. Indicates in the candidate word set Inside, find the probability distribution The candidate word with the highest probability. Indicates the first The candidate word set for the step These are candidate words.

[0097] S52. Select the next label in the label indicator as the second element of the sentiment triplet; based on the current label, update the global semantic features, and generate a new probability distribution through the activation function after the updated global semantic features, and select the candidate word with the highest probability as the content of the second element; repeat S52 to obtain a sentiment triplet.

[0098] S53. Select the first label in the next set of label instructions and execute S51 until an emotional triplet is obtained based on the last set of label instructions.

[0099] S6. Aggregate all sentiment triples, count the number of times each sentiment triple appears in all sentiment triples, and select the ones that appear at least once the threshold as the final sentiment triples.

[0100] For input statement The present invention is based on the constructed Group label indicators generate sentiment triads, for label indicators The predicted set of sentiment triples is denoted as This set can contain one or more sentiment triples. Aggregate all sentiment triples, count the frequency of each sentiment triple in all sentiment triples, and select those that appear more than once. Half of the total number constitutes the final emotional triad. The calculation formula is as follows:

[0101] ,

[0102] in, Represents a single emotion triple. This represents all the aggregated sentiment triples. Indicates if the emotional triad Appearing in the emotional triad set In the given condition, the value is 1; otherwise, it is 0.

[0103] Assuming two types of labels are selected ( and The input sentence is: "The sound quality of the headphones is great, but the noise cancellation is just average."

[0104] Label Instructions The prediction set is {(sound quality, great, positive), (noise reduction, average, neutral)}, with labels indicating... The prediction set is {(great, positive, sound quality), (average, neutral, noise reduction)}. In this case, the present invention focuses on the semantic-level sentiment triples:

[0105] The number of times the triplet "(sound quality - great - positive)" appeared: 2 (in) and Each appears once); the triplet "(noise reduction-normal-neutral)" appears twice (in...). and (Each appears once in the middle).

[0106] Set the threshold to At this point, m=2 and the threshold is 1. Then, both of the three pairs "(sound quality - great - positive)" and "(noise reduction - average - neutral)" will be used as the final emotion three pairs. .

[0107] This embodiment also provides an emotion triple extraction system that incorporates bottleneck convolution, including:

[0108] Preprocessing module: Obtains the sentence to be processed, uses multiple sets of tag indicators as suffixes of the sentence to be processed, and obtains the updated sentence;

[0109] Contextual semantic aggregation module: The updated sentence undergoes several contextual semantic aggregation operations to obtain the hidden state vector. Each contextual semantic aggregation operation includes multi-head attention processing, residual connection, normalization and feedforward fully connected processing.

[0110] Deep feature extraction module: The hidden state vector is reshaped into a spatial feature tensor. The spatial feature tensor is then subjected to one and two deep feature extractions to obtain the first and second features. The first and second features are multiplied to generate a gated feature map. The gated feature map is then subjected to deep feature extraction to obtain an enhanced gated feature. The enhanced gated feature is then residually connected to the spatial feature tensor to obtain the fused feature.

[0111] Global semantic modeling module: The fused features are reconstructed into inverse tensors to obtain text sequence features. The text sequence features are then subjected to global semantic modeling to obtain global semantic features.

[0112] Sentiment Triple Extraction Module: Generates sentiment triples based on label indications; selects the first label in the first set of label indications as the first element of the sentiment triple; limits the range of candidate words based on label type, generates a probability distribution of all candidate words using the global semantic features through an activation function, and selects the candidate word with the highest probability as the content of the first element; selects the next label in the label indications as the second element of the sentiment triple; updates the global semantic features based on the current label, generates a new probability distribution using the updated global semantic features through an activation function, and selects the candidate word with the highest probability as the content of the second element; repeats S52 to obtain a sentiment triple; selects the first label in the next set of label indications and executes S51 until a sentiment triple is obtained based on the last set of label indications;

[0113] The sentiment triplet filtering module aggregates all sentiment triplets, counts the number of times each sentiment triplet appears in all sentiment triplets, and selects those with a frequency of at least one threshold as the final sentiment triplet.

[0114] To verify the effectiveness of this invention, comparative and ablation experiments were conducted. The dataset used in the experiments was ASTE-Data-V2, which includes a computer domain review dataset and three restaurant domain review datasets. Each sentence ends with the true labels of all sentiment triples in the sentence. The ASTE-Data-V2 dataset is shown in Table 2.

[0115] Table 2 ASTE-Data-V2 dataset

[0116]

[0117] This experiment was conducted on an Nvidia GeForce RTX-3090 graphics card with 24GB of VRAM, running Linux. The epochs were set to 20, the batch size to 16, the learning rate to 1e-4, and the optimizer to AdamW. The experimental environment and parameter settings are shown in Table 3.

[0118] Table 3 Experimental Environment and Parameter Settings

[0119]

[0120] The comparative experimental results of this invention with other baseline models for sentiment triplet extraction tasks are shown in Table 4. Bold text indicates the best results, and "-" indicates that the original paper did not provide relevant experimental data. The comparative experiments used three commonly used evaluation metrics in sentiment triplet extraction tasks: Precision (P), which measures the proportion of samples predicted as positive by the model that are actually positive; Recall (R), which measures the proportion of samples that are actually positive that were correctly predicted as positive by the model; and the F1 score, which is the harmonic mean of precision and recall, used to comprehensively evaluate model performance and avoid the bias of a single metric. A higher F1 score indicates a better balance between precision and recall.

[0121] Table 4 Comparative Experiment Results (%)

[0122]

[0123] As shown in Table 4, the F1 scores of this invention outperform the comparison models on all four datasets, proving the effectiveness of the proposed method. Compared with the Peng-two-stage model based on the pipeline method, this invention effectively solves the problem of significant performance degradation in multi-word scenarios caused by error propagation in the pipeline method, achieving a substantial improvement in F1 scores on all four datasets. Compared with the BMRC model based on machine reading comprehension methods, this invention improves performance by 5.77, 4.56, 6.62, and 7.2 percentage points on the Lap14, Res14, Res15, and Res16 datasets, respectively, indicating that this invention can more effectively capture the sentiment features of sentences. Models based on annotation and tables, such as JET-BERT, GTS-BERT, and BDTF, have not formed a stable advantage on multiple datasets due to their weak capture of implicit relationships using single and two-dimensional table markers for positional information. In contrast, this invention can fully mine fine-grained text features of sentences, achieving F1 scores 3.3 and 0.9 percentage points higher than the BDTF model on the Lap14 and Res14 datasets, respectively. Compared with the generative model MVP, the present invention improves the F1 score on the Lap14, Res14, Res15 and Res16 datasets by 1.71, 1.2, 1.78 and 1.85 percentage points, respectively, indicating that the present invention effectively enhances the generative model's ability to capture fine-grained text features and long-distance text dependencies, thereby improving the performance of correctly extracting sentiment triples.

[0124] To verify the impact of different modules on the present invention, an ablation experiment was designed. The results of the ablation experiment are shown in Table 5, where w / o indicates the removal of the corresponding module:

[0125] Table 5 Ablation Experiment Results (%)

[0126]

[0127] As shown in Table 5, after removing S3, the F1 scores of this invention on the Lap14, Res14, Res15, and Res16 datasets decreased by 1.47, 0.71, 1.14, and 0.92 percentage points, respectively. This indicates that removing S3 significantly reduces the invention's ability to capture fine-grained sentiment and hinders its ability to effectively mine deep semantic information. After removing S4, the F1 scores of this invention on the Lap14, Res14, Res15, and Res16 datasets decreased by 1.4, 0.72, 0.73, and 1.26 percentage points, respectively. This indicates that removing S4 reduces the invention's ability to mine long-distance contextual semantic relationships and hinders its ability to better establish global semantic dependencies in the text. By fusing S3 and S4, this invention can fully mine deep semantic information and sentiment features, improving its performance in the sentiment triple extraction task.

[0128] To specifically analyze whether this invention can fully identify fine-grained sentiment features and effectively capture dependencies in long texts, some typical examples were selected for case analysis. The case analysis is shown in Table 6. Three typical examples were selected from the Lap14 dataset, and this invention was compared with the MVP model. For the relatively short example 1, both this invention and the MVP model were able to predict successfully. For example 2, the MVP model failed to correctly identify the fine-grained semantic features of the "but" transition logic, thus ignoring important subsequent text features and incorrectly identifying the opinion word as "a good thing," resulting in a failed sentiment triple prediction. However, this invention, through the S3 operation, enhanced the model's ability to capture fine-grained semantic information and sentiment features from the context, successfully identifying the correct opinion word "scratches easily," thus leading to a correct prediction. Regarding example sentence 3, the MVP model failed to fully exploit long-distance textual dependencies, misidentifying the opinion term as "less love" and the aspect term as "Mac Pro," leading to triple prediction failure. However, this invention, through operation S4, effectively enhances the ability to mine long-distance contextual semantic relationships by capturing enhanced textual representations of global dependencies and local associations, thus correctly extracting the sentiment triple from example sentence 3. The above case analysis demonstrates that this invention, by fusing S3 and S4, can effectively enhance the ability to identify fine-grained sentiment features and improve the accuracy of extracting sentiment triples from long texts.

[0129] Table 6 Case Analysis

[0130]

Claims

1. A sentiment triple extraction method incorporating bottleneck convolution, characterized in that, This includes the following operations: S1. Obtain the sentence to be processed, and use multiple sets of tag indicators as suffixes of the sentence to be processed to obtain the updated sentence; S2. The updated sentence undergoes several context semantic aggregation operations to obtain the hidden state vector. Each context semantic aggregation operation includes multi-head attention processing, residual connection, normalization and feedforward fully connected processing. S3. The hidden state vector is reshaped into a spatial feature tensor. The spatial feature tensor is then subjected to one and two depth feature extractions to obtain the first and second features. The first and second features are multiplied to generate a gated feature map. The gated feature map is then subjected to deep feature extraction to obtain enhanced gated features. The enhanced gated features are then residually connected to the spatial feature tensor to obtain fused features. S4. The fused features are reconstructed using an inverse tensor to obtain text sequence features. The text sequence features are then modeled using global semantics to obtain global semantic features. S5. Generate emotion triplets based on tag instructions; S51. Select the first label in the first group of label indicators as the first element of the sentiment triplet; The candidate word range is limited according to the label type. The global semantic features are used to generate the probability distribution of all candidate words through an activation function. The candidate word with the highest probability is selected as the content of the first element. S52. Select the next label from the label indicators as the second element of the sentiment triplet; Based on the current label, the global semantic features are updated. The updated global semantic features are then used by an activation function to generate a new probability distribution. The candidate word with the highest probability is selected as the content of the second element. Repeat S52 to obtain an emotion triplet; S53. Select the first label in the next set of label instructions and execute S51 until an emotional triplet is obtained based on the last set of label instructions; S6. Aggregate all sentiment triples, count the number of times each sentiment triple appears in all sentiment triples, and select the ones that appear at least once the threshold as the final sentiment triples.

2. The sentiment triple extraction method with fused bottleneck convolution as described in claim 1, characterized in that, The specific operation for deep feature extraction in S3 is as follows: The spatial feature tensor is subjected to bottleneck convolution, normalization, and activation function to obtain the first and second features.

3. The sentiment triple extraction method with fused bottleneck convolution as described in claim 2, characterized in that, The bottleneck convolution operation is as follows: Spatial feature tensor The response vector is obtained by performing a linear transformation using the low-rank projection matrix and adding it to the bias term. The specific formula is as follows: in, , All are low-rank projection matrices. It is the transpose symbol. This is a bias term.

4. The sentiment triple extraction method with fused bottleneck convolution as described in claim 1, characterized in that, The specific operation of global semantic modeling in S4 is as follows: The text sequence features are linearly transformed to obtain the first fundamental matrix, the second fundamental matrix, and the state evolution factor. The first fundamental matrix and the state evolution factor are then converted into the first state matrix and the second state matrix based on the discretization operation. The second state matrix and the second fundamental matrix are subjected to a depthwise convolution operation to obtain the first depth matrix and the second depth matrix; Initial semantic features are calculated based on text sequence features, first state matrix and first depth matrix. The initial semantic features are then linearly transformed to generate semantic features and gating signals. The gated signal is processed by the activation function, multiplied with the semantic features, and linearly transformed to obtain the optimized semantic features. The optimized semantic features are then multiplied with the second depth matrix to obtain the global semantic features.

5. The sentiment triple extraction method with fused bottleneck convolution as described in claim 1, characterized in that, The formula for generating the probability distribution in S51 is as follows: in, For probability distribution, For time steps, Candidate words, Indicates the preceding The step is the candidate word sequence with the highest probability selected. For global semantic features, Indicates at time step Global semantic features Represents the weight matrix. This represents the bias term.

6. The sentiment triple extraction method with fused bottleneck convolution as described in claim 1, characterized in that, The operation of selecting the candidate word with the highest probability in S51 is specifically as follows: in, The candidate word with the highest probability. Indicates in the candidate word set Inside, find the probability distribution The candidate word with the highest probability. Indicates the first The candidate word set for step These are candidate words.

7. The sentiment triple extraction method with fused bottleneck convolution as described in claim 1, characterized in that, The operation of limiting the range of candidate words according to the tag type in S51 is as follows: If the current tag is an aspect tag, the range of candidate words is all words in the sentence; If the current tag is an opinion tag, the range of candidate words is all words in the sentence; If the current label is a sentiment polarity label, the range of candidate words is sentiment evaluation words.

8. The sentiment triple extraction method with fused bottleneck convolution as described in claim 1, characterized in that, The operation of updating the global semantic features in S52 is specifically as follows: Based on the current label, the global semantic features are updated through semantic analysis, which includes mask multi-head attention processing, residual connection and normalization, multi-head attention processing, and feedforward fully connected processing.

9. The sentiment triple extraction method based on bottleneck convolution as described in claim 1, characterized in that, The specific operation of the multiple sets of labels indicated in S1 is as follows: The labels for aspect terms, opinion terms, and sentiment polarity are A, O, and S, respectively. These labels are connected in a specified order, and multiple sets of label indicators are set.

10. A sentiment triple extraction system incorporating bottleneck convolution, characterized in that, include: Preprocessing module: Obtains the sentence to be processed, uses multiple sets of tag indicators as suffixes of the sentence to be processed, and obtains the updated sentence; Contextual semantic aggregation module: The updated sentence undergoes several contextual semantic aggregation operations to obtain the hidden state vector. Each contextual semantic aggregation operation includes multi-head attention processing, residual connection, normalization and feedforward fully connected processing. Deep feature extraction module: The hidden state vector is reshaped into a spatial feature tensor. The spatial feature tensor is then subjected to one and two deep feature extractions to obtain the first and second features. The first and second features are multiplied to generate a gated feature map. The gated feature map is then subjected to deep feature extraction to obtain an enhanced gated feature. The enhanced gated feature is then residually connected to the spatial feature tensor to obtain the fused feature. Global semantic modeling module: The fused features are reconstructed using an inverse tensor to obtain text sequence features. These text sequence features are then modeled using global semantics to obtain global semantic features. Sentiment Triple Extraction Module: Generates sentiment triples based on label indications; selects the first label in the first set of label indications as the first element of the sentiment triple; limits the range of candidate words based on label type, generates a probability distribution of all candidate words using the global semantic features through an activation function, and selects the candidate word with the highest probability as the content of the first element; selects the next label in the label indications as the second element of the sentiment triple; updates the global semantic features based on the current label, generates a new probability distribution using the updated global semantic features through an activation function, and selects the candidate word with the highest probability as the content of the second element; repeats S52 to obtain a sentiment triple; selects the first label in the next set of label indications and executes S51 until a sentiment triple is obtained based on the last set of label indications; The sentiment triplet filtering module aggregates all sentiment triplets, counts the number of times each sentiment triplet appears in all sentiment triplets, and selects those with a frequency of at least one threshold as the final sentiment triplet.

Citation Information

Patent Citations

  • Aspect-level emotion triple extraction method for cross-domain migration

    CN118296135A

  • Aspect-level emotion triple extraction method and system based on bidirectional generation

    CN119538938A