A method for extracting evaluation triples based on multi-scale feature fusion

Through the multi-scale convolutional neural network and long and short-term memory neural network, the problem of sparse features in sentiment analysis is solved, the accuracy of evaluation triple extraction is improved, and user and enterprise decision-making is supported.

CN114722811BActive Publication Date: 2025-08-08ZHEJIANG UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210331198.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2025-08-08
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

The prior art fails to fully utilize sparse features in sentences, such as local features and phrase-level features in sentiment analysis, resulting in low accuracy in evaluating triple extraction.

Method used

Multi-scale convolutional neural network and long-term memory neural network are used, and the context global features, n-gram local features and phrase-level features are combined, and evaluation triplets are extracted through self-attention mechanism and decoding methods.

Benefits of technology

It improves the accuracy of evaluation triple extraction, helps users and enterprises better understand product characteristics and tendencies, and provides a basis for decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722811B_ABST
    Figure CN114722811B_ABST
Patent Text Reader

Abstract

A method for extracting evaluation triples based on multi-scale feature fusion includes: 1) data preprocessing: performing operations such as word segmentation and stop word removal on sentences in a corpus; 2) constructing word embeddings: converting words in sentences into word embeddings using pre-trained vectors; 3) feature enrichment: extracting multi-scale local features using CNNs with different convolution kernel sizes, and further capturing contextual information within sentences using BiLSTMs to obtain feature-rich word representations; 4) constructing phrase-level word representations: designing a simple phrase-aware representation selection mechanism to select an appropriate phrase-level word representation by judging the length of the phrase to which the current word belongs; and 5) extracting evaluation triples: constructing a corresponding grid representation, further performing prediction and decoding to obtain the final evaluation triples. This method can help better understand complex sentences in reviews and improve the accuracy of extracting evaluation triples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sentiment computing, and in particular to a method for extracting evaluation triples, which is of great significance in fields such as judging user expression of sentiment and assisting user decision analysis. Background Art

[0002] In recent years, deep learning has achieved significant breakthroughs and applications in academia and industry, attracting widespread attention from all walks of life. Due to its advantages, such as effective training and the lack of complex feature extraction, deep learning has been widely applied in the field of sentiment analysis. A series of neural network structures and improved methods (such as deep neural networks (DNNs), recurrent neural networks (RNNs), and convolutional neural networks (CNNs)) have been proposed to solve the subtask of attribute-level sentiment analysis, and have achieved promising results.

[0003] With the rapid development of the big data era, major e-commerce platforms have generated a large number of user-generated reviews. The evaluation triplets (evaluation object, evaluation word, and sentiment polarity) contained in these reviews can reflect users' personal preferences at a fine-grained level, helping users and businesses quickly understand the characteristics and advantages and disadvantages of products, greatly facilitating the purchase and sale of goods. The task of extracting evaluation triples involves simultaneously extracting triplets (evaluation object, evaluation word, and sentiment polarity) from reviews. Recent research has fully utilized the interactions between tasks to model the interactions between words in an end-to-end manner. However, the sparse features contained in sentences (such as local features and phrase-level features) have not been fully explored. Sentence sparse features contain valuable information such as contextual semantics and phrase-level semantics, which can further assist models in extracting evaluation triplets. Summary of the Invention

[0004] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provides an evaluation triplet extraction method based on multi-scale feature fusion.

[0005] The present invention uses convolutional neural networks to obtain the characteristics of local features and mine the potential sparse features in sentences. This allows us to understand users' personal preferences for products and grasp the overall and local characteristics of products from different perspectives, thereby providing valuable reference for users to purchase products and companies to improve products, which has important practical significance.

[0006] The present invention achieves the above-mentioned purpose through the following technical solutions: Figure 1 A method for extracting evaluation triples based on multi-scale feature fusion is presented, which includes the following steps:

[0007] S1: Perform data preprocessing operations such as word segmentation and stop word removal on the sentences in the corpus;

[0008] S2: Use pre-trained vectors to convert words in the sentence into word embeddings;

[0009] S3: Input the word embedding into the feature enrichment layer to obtain feature representations with rich meaning. The steps are as follows:

[0010] S3.1: If Figure 2 As shown in the figure, based on CNN, different receptive fields (the convolution kernel size is set to 1, 2, 3, and 4 respectively) are used to construct the n-gram local feature representation of the word. The calculation formula is as follows (k represents the size of the convolution kernel):

[0011] H1=Conv1D(X,k=1) (1)

[0012] H2=Conv1D(X,k=2) (2)

[0013] H3=Conv1D(X,k=3) (3)

[0014] H4=Conv1D(X,k=4) (4)

[0015] S3.2: If Figure 2 As shown in Figure 3, the n-gram local feature representations constructed in S3.1 are spliced together, and the high-level word features are gradually extracted using a CNN with convolution kernel sizes of 5 and 3, referring to the pyramid architecture. The calculation formula is as follows ([:] represents the vector splicing operation):

[0016] H=[H1:H2:H3:H4] (5)

[0017] H = Conv1D(X, k = 5) (6)

[0018] H = Conv1D(X, k = 3) (7)

[0019] S3.3: Input the word features constructed in S3.2 into BiLSTM to further capture the contextual information in the sentence, thereby obtaining feature-rich word representations. The calculation formula is as follows:

[0020] H′=BiLSTM(H) (8)

[0021] S4: Construct phrase-level word representations for the data obtained in S3. The steps are as follows:

[0022] S4.1: Construct the word representation when the current word belongs to phrases of different lengths. The calculation formula is as follows ([:] represents the concatenation operation of the vector, s is the number of words containing word xi The length of the phrase, W s and b s is the weight parameter, σ is the activation function):

[0023]

[0024] H s =σ(W s H s +b s ) (10)

[0025] S4.2: Use word-level feature representation to determine the length of the phrase to which the current word belongs. The calculation formula is as follows (W1 and b1 are weight parameters, and σ is the activation function):

[0026] L=σ(W l H+b l ) (11)

[0027] S4.3: Assign the appropriate phrase-level word representation to the current word. The calculation formula is as follows:

[0028]

[0029] S4.4: The self-attention mechanism is used to focus on the important information in the sentence and obtain the final meaningful phrase-level word representation. The calculation formula is as follows:

[0030] H r =SelfAttention(H r ) (13)

[0031] S5: For the data obtained in S4, extract evaluation triples based on the existing decoding method. The steps are as follows:

[0032] S5.1: For any two-word pair in a sentence (w i ,w j ) to construct a grid representation. The calculation formula is as follows ([:] represents the vector concatenation operation):

[0033]

[0034] S5.2: Input the grid representation into the fully connected layer for relationship judgment. The calculation formula is as follows:

[0035]

[0036] S5.3: Use an existing decoding method to extract evaluation triples from sentences. Figure 3 This is an example of a grid representation. The specific decoding process is as follows:

[0037] A: First, extract all evaluation objects and evaluation words from the main diagonal of the prediction results, where the continuous label A and the continuous label O can be regarded as a complete evaluation object and evaluation word.

[0038] B: Then, the extracted evaluation objects are paired with the extracted evaluation words, and when their corresponding grids contain emotional polarity, the corresponding evaluation triples are extracted.

[0039] The working principle of the present invention is:

[0040] Through deep learning methods, we fuse feature representations of multiple dimensions (global context features, local n-gram features, phrase-level features, and word-pair relationship features) to capture evaluation triplets in product reviews as a basis for assisting decision-making for users and businesses.

[0041] The advantages of the present invention are:

[0042] (1) Using multi-scale convolutional neural networks and long short-term memory neural networks, we combine contextual global features with n-gram local features to help better understand complex sentences in reviews;

[0043] (2) By designing a phrase-aware representation selection mechanism, the model can better capture the evaluation objects and evaluation words composed of multiple words in a sentence, thereby improving the extraction accuracy of evaluation triples. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of the method of the present invention;

[0045] Figure 2 It is a data processing flow chart of the multi-scale convolutional neural network for extracting rich features of the present invention;

[0046] Figure 3 This is an example of extracting evaluation triples using a grid marking representation method of the present invention;

[0047] Figure 4 FIG. 1 is a flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the objectives, technical solutions and advantages of the present invention more clear, the specific embodiments of the present invention will be further described in detail below.

[0049] A specific implementation case of a method for extracting evaluation triples based on multi-scale feature fusion of the present invention is now provided: a network product recommendation method based on multi-scale feature fusion. Figure 4 A flowchart of the method is shown, which includes the following steps:

[0050] S1: For user U, collect the user review set Ru and a series of product review sets {R p1 , R p2 ,…,R pn};

[0051] S2: For user review set R u and a collection of product reviews {R p1 , R p2 ,…,R pn}, extract all the evaluation triples T u and {T p1 , T p2 ,…,T pn}, the elements in the set are triples {a, o, s}, where a represents the evaluation object, o represents the evaluation word, and s represents the sentiment polarity. The steps are as follows:

[0052] S2.1: Perform data preprocessing operations such as word segmentation and stop word removal on the sentences in the review collection;

[0053] S2.2: Use pre-trained vectors to convert words in the sentence into word embeddings;

[0054] S2.3: Input the word embedding into the feature enrichment layer to obtain feature representations with rich meaning. The steps are as follows:

[0055] S2.3.1: If Figure 3 As shown in the figure, based on CNN, different receptive fields (the convolution kernel size is set to 1, 2, 3, and 4 respectively) are used to construct the n-gram local feature representation of the word. The calculation formula is as follows (k represents the size of the convolution kernel):

[0056] H1=Conv1D(X,k=1) (1)

[0057] H2=Conv1D(X,k=2) (2)

[0058] H3=Conv1D(X,k=3) (3)

[0059] H4=Conv1D(X,k=4) (4)

[0060] S2.3.2: If Figure 3 As shown in the figure, the n-gram local feature representations constructed in S2.3.1 are spliced together, and the high-level word features are gradually extracted using CNN with convolution kernel sizes of 5 and 3 according to the pyramid architecture. The calculation formula is as follows ([:] represents

[0061] Table vector concatenation operation):

[0062] H=[H1:H2:H3:H4] (5)

[0063] H = Conv1D(X, k = 5) (6)

[0064] H = Conv1D(X, k = 3) (7)

[0065] S2.3.3: Input the word features constructed in S2.3.2 into BiLSTM to further capture the contextual information in the sentence, thereby obtaining feature-rich word representations. The calculation formula is as follows:

[0066] H′=BiLSTM(H) (8)

[0067] S2.4: Construct phrase-level word representations for the data obtained in S2.3. The steps are as follows:

[0068] S2.4.1: Construct the word representation when the current word belongs to a phrase of different lengths. The calculation formula is as follows ([:] represents the concatenation operation of the vector, s is the number of words containing word x i The length of the phrase, W s and b s is the weight parameter, σ is the activation function):

[0069]

[0070] H s =σ(W s H s +b s ) (10)

[0071] S2.4.2: Use word-level feature representation to determine the length of the phrase to which the current word belongs. The calculation formula is as follows (W1 and b1 are weight parameters, and σ is the activation function):

[0072] L=σ(W l H+b l ) (11)

[0073] S2.4.3: Assign the appropriate phrase-level word representation to the current word. The calculation formula is as follows:

[0074]

[0075] S2.4.4: The self-attention mechanism is used to focus on the important information in the sentence and obtain the final meaningful phrase-level word representation. The calculation formula is as follows:

[0076] H r =SelfAttention(H r ) (13)

[0077] S2.5: Extract evaluation triples based on the data obtained in S2.4 using the existing decoding method. The steps are as follows:

[0078] S2.5.1: Construct a grid representation for any two-word pair (wi, wj) in a sentence. The calculation formula is as follows ([:] represents the concatenation operation of the vectors):

[0079]

[0080] S2.5.2: Input the grid representation into the fully connected layer for relationship judgment. The calculation formula is as follows:

[0081]

[0082] S2.5.3: Use an existing decoding method to extract evaluation triples from sentences. Figure 4 This is an example of a grid representation. The specific decoding process is as follows:

[0083] 1) First, all evaluation objects and evaluation words are extracted from the main diagonal of the prediction results, where the continuous label A and the continuous label O can be regarded as a complete evaluation object and evaluation word.

[0084] 2) Then, the extracted evaluation objects are paired with the extracted evaluation words, and when the corresponding grids contain emotional polarity, the corresponding evaluation triples are extracted.

[0085] S3: Constructs embedded representations of products and users to calculate the relevance between users and products. This includes the following steps:

[0086] S3.1: Based on the GloVe model, a g*1-dimensional embedding representation ti is constructed for each evaluation triple;

[0087] S3.2: For user u, concatenate the embedding representations of the triples of comments posted by the user to obtain the m*g-dimensional user embedding representation u, where m represents the number of comments and g represents the dimension of a single vector. The calculation formula is as follows (c m Represents the user review set R u The frequency of the mth evaluation triple in ):

[0088] u=[c1*t1:c2*t2:...:c m *t m ] (16)

[0089] S3.3: For each product i, concatenate the embedding representations of all users’ evaluation triplets of the product to obtain the product embedding representation p in n*g dimensions. i, where n represents the number of evaluation objects and g represents the dimension of a single vector. The calculation formula is as follows (c' n Represents the review set R of the i-th product pi The frequency of the nth evaluation triple in ):

[0090] p i =[c′1*t1:c′2*t2:...:c′ n *t n ] (17)

[0091] S3.4: Calculate the relevance between user u and item i based on the fully connected layer. The calculation formula is as follows:

[0092]

[0093] y=softmax(Wx+b) (19)

[0094] S4: Sort the data obtained in S3 according to the relevance values, and recommend N products with higher relevance to the user.

[0095] The above description is a specific embodiment of the present invention and the technical principles used. If the changes made according to the concept of the present invention do not exceed the spirit covered by the description and drawings, they should still fall within the scope of protection of the present invention.

Claims

1. A method for extracting evaluation triples based on multi-scale feature fusion, comprising the following steps: S1: Perform data preprocessing operations such as word segmentation and stop word removal on the sentences in the corpus; S2: Use pre-trained vectors to convert words in the sentence into word embeddings; S3: Input word embedding into the feature enrichment layer to obtain feature representation; S4: constructing phrase-level word representations; S5: Extract evaluation triples based on existing decoding methods; Step S3 specifically includes: S3.1: Based on CNN, different receptive fields are used to construct n-gram local feature representations of words. The convolution kernel sizes of the receptive fields are set to 1, 2, 3, and 4 respectively. The calculation formula is as follows, where k represents the size of the convolution kernel: H1=Conv1D(X,k=1) (1) H2Conv1D(X,k=2) (2) H3=Conv1D(X,k=3) (3) H4=Conv1D(X,k=4) (4) S3.2: Concatenate the n-gram local feature representations constructed in S3.

1. Using a CNN with kernel sizes of 5 and 3, referencing the pyramid architecture, we gradually extract high-level word features. The calculation formula is as follows, where [:] represents the vector concatenation operation: H=[H1:H2:H3:H4] (5) H = Conv1D(X, k = 5) (6) H = Conv1D(X, k = 3) (7) S3.3: Input the word features constructed in S3.2 into BiLSTM to further capture the contextual information in the sentence, thereby obtaining feature-rich word representations. The calculation formula is as follows: H′=BiLSTM(H) (8) Step S4 specifically includes: S4.1: Construct the word representation when the current word belongs to phrases of different lengths. The calculation formula is as follows, [:] represents the concatenation operation of the vector, and s is the number of words containing word x. i The length of the phrase, W s and b s is the weight parameter and σ is the activation function: H s =σ(W s H s +b s ) (10) S4.2: Using word-level feature representation, determine the length of the phrase to which the current word belongs. The calculation formula is as follows (W l and b l is the weight parameter, σ is the activation function): L=σ(W l H+b l ) (11) S4.3: Assign the appropriate phrase-level word representation to the current word. The calculation formula is as follows: S4.4: The self-attention mechanism is used to focus on the important information in the sentence and obtain the final meaningful phrase-level word representation. The calculation formula is as follows: H r =SelfAttention(H r ) (13) Step S5 specifically includes: S5.1: For any two-word pair in a sentence (w i ,w j ) constructs a grid representation. The calculation formula is as follows, where [:] represents the vector concatenation operation: S5.2: Input the grid representation into the fully connected layer for relationship judgment. The calculation formula is as follows: S5.3: Use an existing decoding method to extract the evaluation triples in the sentence. The specific decoding process is as follows: A: First, extract all evaluation objects and evaluation words from the main diagonal of the prediction results, where the continuous label A and the continuous label O can be regarded as a complete evaluation object and evaluation word; B: Then, the extracted evaluation objects are paired with the extracted evaluation words, and when their corresponding grids contain emotional polarity, the corresponding evaluation triples are extracted.

Citation Information

Patent Citations

  • Text entity relationship extraction method based on multi-feature information enhancement

    CN112163425A