Method and device for analyzing evaluation text, and computer-readable storage medium

By using the expanded cyclic convolutional neural network model and correlation matrix integration technology in the evaluation text analysis method, the problem of difficulty in performing fine-grained analysis in the existing technology is solved, and a detailed analysis of the tendency opinions of the evaluation object in the evaluation statement and the classification of user emotional tendencies is realized.

CN114239569BActive Publication Date: 2025-04-01INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111456304.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-04-01
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

It is difficult for the prior art to conduct a granular analysis of the tendency opinions of the evaluation objects in the evaluation statement.

Method used

By obtaining the text to be processed, preprocessing is performed to obtain the word identification sequence, the word identification sequence is mapped into the word vector matrix using the pre-trained word embedding vector matrix and the auxiliary embedding vector matrix, and input it into the expansion recurrent convolutional neural network model, integrating the correlation matrix to obtain the fusion feature, and finally obtaining the label estimate score matrix of each word through linear mapping, and analyzing the label information of the evaluation statement.

Benefits of technology

It realizes a fine-grained analysis of the tendency opinions of the evaluation object in the evaluation statement, and can complete the tasks of extracting the evaluation object and classifying the user's emotional tendency at the same time, improving the fine-grainedness and efficiency of the analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239569B_ABST
    Figure CN114239569B_ABST
Patent Text Reader

Abstract

The present invention discloses an analysis method and device of an evaluation text, and a computer-readable storage medium, and relates to the field of natural language processing, wherein the method comprises: obtaining a text to be processed, and pre-processing the evaluation sentences in the text to be processed to obtain a word identification sequence, mapping the word identification sequence to a word vector matrix based on a pre-trained word embedding vector matrix and / or an auxiliary embedding vector matrix, inputting the word vector matrix into a preset dilated cyclic convolutional neural network model to obtain convolutional features, and integrating the correlation matrix obtained by pre-analysis into the convolutional features to obtain fused features, linearly mapping the fused features to obtain an estimated score matrix of the dilated cyclic convolutional neural network model for each word label, and analyzing the label information of each evaluation sentence in the text to be processed. The present invention solves the technical problem in the related art that it is impossible to make a fine-grained analysis of the tendency opinions of the evaluation object in the evaluation sentence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of analysis technology, and in particular to an analysis method for evaluating text, a device thereof, and a computer-readable storage medium. Background Art

[0002] With the development of emerging social media, users can publish personal content in the form of text, pictures, videos, etc. to exchange information and express opinions. Analyzing these massive amounts of user-generated data will help to obtain information from many aspects. The current analysis method is mainly text-oriented. By analyzing the text, the reviewer's views and attitudes towards things or events can be discovered. In the research field of natural language processing, sentiment analysis is a common task, which mainly analyzes tasks at the paragraph level, sentence level, and object level. For example, in the user product review module of an e-commerce platform, users can evaluate the purchased products, and the review rating classification method will be divided into "good reviews, medium reviews, and bad reviews" according to the star rating given by the user. Figure 1 As shown in the figure, there are multiple reviews of the purchased products ( Figure 1 The comments of user 1, user 2 and user 3 are only shown, but not limited to this). This method can only show the overall opinions of users on the purchased items (for example, through Figure 1 The only evaluation result that can be analyzed for the user comments in the review is: favorable comments, and it is impossible to analyze and obtain more granular emotional results). It is impossible to judge the user's evaluation of a certain aspect (evaluation object) of the purchased item in the review text and the tendency attitude shown in this aspect.

[0003] In the related technology, the methods based on deep learning mainly include two categories: Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN). Among them, the RNN model has the ability to memorize sequence information and has certain advantages in sequence modeling. However, the general RNN model has more parameters, and each step of calculation requires the result of the previous step. Therefore, the RNN model fails to give full play to the parallel capability of the GPU (graphics processing unit) and the training time is relatively long. The structure of the CNN model is relatively simple, mainly the front convolution layer and the rear fully connected layer. Its convolution operation has the ability to extract local features and supports parallel operation. Therefore, it has certain advantages in the recognition of a certain target in natural language processing. However, when the sentence is very long, CNN can only process the information within the convolution window. Therefore, the choice of window size is very important, which also highlights the problem that its modeling is simple but parameter adjustment is difficult.

[0004] For the task of classifying a certain evaluation object in a user's comment text and the emotional tendency shown by the evaluation object, the conventional technical means is to design different deep learning models according to the characteristics of different tasks to complete the task. However, this method has the problems of high design difficulty and low training efficiency.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present invention provide an analysis method and device for an evaluation text, and a computer-readable storage medium, so as to at least solve the technical problem in the related art that it is impossible to make a fine-grained analysis of the tendency opinions of the evaluation object in the evaluation sentence.

[0007] According to one aspect of an embodiment of the present invention, there is provided a method for analyzing an evaluation text, comprising: obtaining a text to be processed, and preprocessing the evaluation sentences in the text to be processed to obtain a word identification sequence, wherein the text to be processed is a text extracted from the evaluation text of a certain commodity object, and the text to be processed includes at least one evaluation sentence; based on a pre-trained word embedding vector matrix and / or an auxiliary embedding vector matrix, mapping the word identification sequence into a word vector matrix, wherein the auxiliary embedding vector matrix is ​​a domain embedding vector matrix or a part-of-speech embedding vector matrix; inputting the word vector matrix into a preset dilated cyclic convolutional neural network model to obtain convolutional features, and integrating the correlation matrix obtained by pre-analysis into the convolutional features to obtain fused features; linearly mapping the fused features to obtain an estimated score matrix of each word label of the dilated cyclic convolutional neural network model; based on the estimated score matrix, analyzing the label information of each evaluation sentence in the text to be processed, wherein the label information includes the tendency label of the evaluation object involved in the evaluation sentence.

[0008] Optionally, the step of preprocessing the evaluation statements in the text to be processed to obtain a word identification sequence includes: performing word segmentation and serialization processing on the evaluation statements in the text to be processed to obtain a word segmentation sequence; assigning an identifier to each word in the word segmentation sequence to obtain a word identification sequence.

[0009] Optionally, before obtaining the text to be processed, the analysis method also includes: performing word segmentation processing on text sentences in a preset corpus to obtain a word segmentation result sequence; labeling each word in the word segmentation result sequence, wherein the types of the labels include: object labels, sentiment labels; based on a preset joint label rule, combining different labels for each word to obtain a combined label for each of the words.

[0010] Optionally, the word vector matrix includes: a domain word vector matrix and a part-of-speech word vector matrix. Before the word vector matrix is ​​input into a preset dilated circular convolutional neural network model to obtain convolution features, the analysis method further includes: splicing the domain word vector matrix with the word embedding vector matrix according to a first preset rule to obtain a domain embedding input matrix; splicing the part-of-speech word vector matrix with the word embedding vector matrix according to a second preset rule to obtain a part-of-speech embedding input matrix; inputting the domain embedding input matrix and the part-of-speech embedding input matrix into a first convolutional layer, respectively, wherein the first convolutional layer calculates a first local feature relative to the first task and a second local feature relative to the second task by a first preset formula, and the local feature is used to indicate the features of each word and the word within a preset range in the text; inputting the first local feature and the second local feature into a second convolutional layer, wherein the second convolutional layer calculates a first convolutional feature relative to the first task and a second convolutional feature relative to the second task by a second preset formula and a third preset rule.

[0011] Optionally, integrating the correlation matrix obtained in advance by analysis into the convolution feature to obtain the fused feature also includes: calculating the interaction vector between the first task and the second task through a third preset formula; based on the interaction vector and a fourth preset formula, respectively calculating the interaction attention score scalars of the first task and the second task to obtain a first score scalar set relative to the first task and a second score scalar set relative to the second task; combining the first score scalar set and the second score scalar set to obtain a first correlation representation matrix and a second correlation representation matrix; integrating the first correlation representation matrix into the first convolution feature, and integrating the second correlation representation matrix into the second convolution feature to obtain the fused feature.

[0012] Optionally, after linearly mapping the fusion features to obtain the estimated score matrix of the dilated circular convolutional neural network model for each word label, the analysis method further includes: based on the estimated score matrix and the transfer score matrix, using the conditional random field algorithm CRF to calculate the label transfer path score; based on the combination of the label transfer path score and other path scores except the label path, calculating the label probability of the tendency label corresponding to each evaluation object; based on the label probability of the tendency label, calculating the loss function of the label transfer path score.

[0013] Optionally, after linearly mapping the fused features to obtain an estimated score matrix for each word label of the dilated circular convolutional neural network model, the analysis method further includes: obtaining a label path score based on the estimated score matrix; sorting the label path scores to determine a score sorting result; and based on the score sorting result, using the Viterbi algorithm to select the label corresponding to the path with the highest score as the text label result.

[0014] Optionally, after obtaining two emotion labels based on the first task and the second task respectively, the analysis method further includes: taking the evaluation object label as the boundary, based on the text label probability and the text label result, selecting the label with the largest number of label appearances as the emotion label; if the number of label appearances is the same, selecting the label ranked first as the emotion label.

[0015] According to another aspect of an embodiment of the present invention, there is also provided an analysis device for evaluation text, comprising: an acquisition unit, configured to acquire a text to be processed, and pre-process the evaluation statements in the text to be processed to obtain a word identification sequence, wherein the text to be processed is a text obtained by extracting the evaluation text of a certain commodity object, and the text to be processed includes at least one evaluation statement; a first mapping unit, configured to map the word identification sequence into a word vector matrix based on a pre-trained word embedding vector matrix and / or an auxiliary embedding vector matrix, wherein the auxiliary embedding vector matrix is ​​a domain embedding vector matrix or a part-of-speech embedding vector matrix; an input unit, configured to input the word vector matrix into a preset dilated cyclic convolutional neural network model to obtain convolutional features, and integrate the correlation matrix obtained by pre-analysis into the convolutional features to obtain fused features; a second mapping unit, configured to linearly map the fused features to obtain an estimated score matrix of each word label of the dilated cyclic convolutional neural network model; and an analysis unit, configured to analyze the label information of each evaluation statement in the text to be processed based on the estimated score matrix, wherein the label information includes the tendency label of the evaluation object involved in the evaluation statement.

[0016] Optionally, the acquisition unit includes: a first processing module, used to perform word segmentation and serialization processing on the evaluation statement in the text to be processed to obtain a word segmentation sequence; a first matching module, used to assign an identifier to each word in the word segmentation sequence to obtain a word identifier sequence.

[0017] Optionally, the analysis device also includes: a second processing module, used to perform word segmentation processing on text sentences in a preset corpus before obtaining the text to be processed, so as to obtain a word segmentation result sequence; a first labeling unit, used to label each word in the word segmentation result sequence, wherein the types of the labels include: object labels, sentiment labels; a first combination module, used to combine different labels of each word based on a preset joint label rule, so as to obtain a combined label for each of the words.

[0018] Optionally, the word vector matrix includes: a domain word vector matrix and a part-of-speech word vector matrix, and the analysis device also includes: a first splicing module, which is used to splice the domain word vector matrix and the word embedding vector matrix according to a first preset rule before inputting the word vector matrix into a preset dilated circular convolutional neural network model to obtain convolution features, so as to obtain a domain embedding input matrix; a second splicing module, which is used to splice the part-of-speech word vector matrix and the word embedding vector matrix according to a second preset rule to obtain a part-of-speech embedding input matrix; a first input module, which is used to input the domain embedding input matrix and the part-of-speech embedding input matrix into a first convolutional layer, respectively, wherein the first convolutional layer calculates a first local feature relative to the first task and a second local feature relative to the second task by a first preset formula, and the local feature is used to indicate the features of each word and the word within a preset range in the text; a second input module, which is used to input the first local feature and the second local feature into a second convolutional layer, wherein the second convolutional layer calculates a first convolutional feature relative to the first task and a second convolutional feature relative to the second task by a second preset formula and a third preset rule.

[0019] Optionally, the input unit also includes: a first calculation module, used to calculate the interaction vector between the first task and the second task through a third preset formula; a second calculation module, used to calculate the interaction attention score scalars of the first task and the second task respectively based on the interaction vector and a fourth preset formula, to obtain a first score scalar set relative to the first task and a second score scalar set relative to the second task; a second combination module, used to combine the first score scalar set and the second score scalar set to obtain a first correlation representation matrix and a second correlation representation matrix; a first fusion module, used to fuse the first correlation representation matrix into the first convolution feature, and fuse the second correlation representation matrix into the second convolution feature to obtain the fusion feature.

[0020] Optionally, the analysis device also includes: a third calculation module, which is used to calculate the label transfer path score based on the estimated score matrix and the transfer score matrix after obtaining the estimated score matrix of the dilated circular convolutional neural network model for each word label through linear mapping of the fusion features; a fourth calculation module, which is used to calculate the label probability of the tendency label corresponding to each evaluation object based on the combination of the label transfer path score and the scores of other paths except the label path; and a fifth calculation module, which is used to calculate the loss function of the label transfer path score based on the label probability of the tendency label.

[0021] Optionally, the analysis device also includes: a first output module, which is used to obtain a label path score based on the estimated score matrix for each word label obtained by the dilated circular convolutional neural network model after linear mapping the fusion features; a first sorting module, which is used to sort the label path scores and determine the score sorting results; and a first selection module, which is used to select the label corresponding to the path with the highest score as the text label result based on the score sorting results by using the Viterbi algorithm.

[0022] Optionally, the analysis device also includes: a second selection module, which is used to select the label with the largest number of label appearances as the emotion label after obtaining two emotion labels based on the first task and the second task respectively, with the evaluation object label as the boundary, based on the text label probability and the text label result; and a third selection module, which is used to select the label with the largest number of label appearances as the emotion label if the number of label appearances is the same.

[0023] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned evaluation text analysis methods.

[0024] According to another aspect of an embodiment of the present invention, an electronic device is also provided, characterized in that it includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned evaluation text analysis methods.

[0025] In the present disclosure, after obtaining the text to be processed, the evaluation sentences in the text to be processed are preprocessed to obtain a word identification sequence, and based on the pre-trained word embedding vector matrix and / or the auxiliary embedding vector matrix, the word identification sequence is mapped into a word vector matrix, and the word vector matrix is ​​input into a preset expansion cycle convolutional neural network model to obtain convolution features, and the correlation matrix obtained by the pre-analysis is integrated into the convolution features to obtain fusion features, and the fusion features are linearly mapped to obtain the estimated score matrix of the expansion cycle convolutional neural network model for each word label, and based on the estimated score matrix, the label information of each evaluation sentence in the text to be processed is analyzed. In the present application, the characteristics of the two tasks of evaluation object extraction and sentiment tendency classification for the evaluation object can be combined, and the fusion features of the two tasks can be obtained based on the interactive unit. Through the expansion cycle convolutional neural network technology, the two tasks of more fine-grained evaluation extraction and user sentiment tendency classification in the evaluation sentence can be completed simultaneously, thereby solving the technical problem that the tendency opinions of the evaluation objects in the evaluation sentences cannot be fine-grained in the related art. Analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0027] Figure 1 It is a schematic diagram of a product review in a review module on a certain platform in an optional manner in the prior art;

[0028] Figure 2 is a flow chart of an optional analysis method of evaluation text according to an embodiment of the present invention;

[0029] Figure 3 is a schematic diagram of an optional method for classifying sentiment tendency of a comment object in a certain evaluation sentence according to an embodiment of the present invention;

[0030] Figure 4 is a schematic diagram of the relationship between three processing modules for a more fine-grained analysis task according to an embodiment of the present invention;

[0031] Figure 5 is a schematic diagram of an optional statement label according to an embodiment of the present invention;

[0032] Figure 6 is a schematic diagram of an optional word vector loading according to an embodiment of the present invention;

[0033] Figure 7 is a schematic diagram of an optional dilated recurrent convolutional neural network model according to an embodiment of the present invention;

[0034] Figure 8 is a schematic diagram of an optional analysis device for evaluating text according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] To facilitate those skilled in the art to understand the present invention, some terms or nouns involved in the embodiments of the present invention are explained below:

[0038] Aspect Term Extraction (ATE) is a basic task in the analysis task. It refers to correctly extracting the words or phrases that constitute the target evaluation object from the review text. It can also be regarded as a sequence labeling task.

[0039] Aspect Sentiment Classification (ASC) is a task to analyze the emotional tendency expressed by users towards the evaluation object based on the extraction of the evaluation object.

[0040] CRF algorithm, conditional random filed algorithm, combines the maximum entropy model and hidden Markov model. It is an undirected graph model that has good effects in sequence labeling tasks such as word segmentation, part-of-speech tagging and named entity recognition.

[0041] The Viterbi algorithm is a dynamic programming algorithm used to find the most likely sequence of observed events.

[0042] The following embodiments of the present invention can be applied to various scenarios that require sentiment analysis of comment objects with more fine-grained granularity, wherein comment objects refer to objects extracted from user comment statements, such as packaging, quality, size, etc., and comment statements can come from publicly released user comments in the comment sections of various applications / systems / platforms, such as user comments in the comment section of an e-commerce platform. The present invention uses an expanded cyclic convolutional neural network model based on an interactive mode, utilizes the advantages of expanded cyclic convolutional neural networks in computational efficiency and semantic coverage, and integrates the two tasks of evaluation object extraction and sentiment classification of evaluation objects through an interactive module, thereby jointly completing evaluation extraction and user sentiment classification, making the analysis content of evaluation statements more fine-grained. The present invention is described in detail below in conjunction with the various embodiments.

[0043] Embodiment 1

[0044] According to an embodiment of the present invention, an embodiment of an analysis method for evaluating a text is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0045] Figure 2 is a flowchart of an optional analysis method for evaluating text according to an embodiment of the present invention, such as Figure 2 As shown, the method comprises the following steps:

[0046] Step S201, obtaining a text to be processed, and preprocessing the evaluation sentences in the text to be processed to obtain a word identification sequence, wherein the text to be processed is a text extracted from the evaluation text of a certain commodity object, and the text to be processed includes at least one evaluation sentence.

[0047] Step S202, based on the pre-trained word embedding vector matrix and / or the auxiliary embedding vector matrix, the word identification sequence is mapped into a word vector matrix, wherein the auxiliary embedding vector matrix is ​​a domain embedding vector matrix or a part-of-speech embedding vector matrix.

[0048] Step S203, input the word vector matrix into a preset dilated circular convolutional neural network model to obtain convolution features, and integrate the correlation matrix obtained in advance into the convolution features to obtain fusion features.

[0049] Step S204, linearly map the fused features to obtain an estimated score matrix for each word tag of the dilated recurrent convolutional neural network model.

[0050] Step S205: analyzing the label information of each evaluation sentence in the text to be processed based on the estimated score matrix.

[0051] The label information in this embodiment may include the tendency label of the evaluation object involved in the evaluation statement.

[0052] Through the above steps, the text to be processed can be obtained, and the evaluation sentences in the text to be processed can be preprocessed to obtain a word identification sequence. Based on the pre-trained word embedding vector matrix and / or the auxiliary embedding vector matrix, the word identification sequence is mapped into a word vector matrix, and the word vector matrix is ​​input into the preset expansion cycle convolutional neural network model to obtain convolution features, and the correlation matrix obtained by pre-analysis is integrated into the convolution features to obtain fusion features. The fusion features are linearly mapped to obtain the estimated score matrix of the expansion cycle convolutional neural network model for each word label, and the label information of each evaluation sentence in the text to be processed is analyzed based on the estimated score matrix. In this embodiment, the characteristics of the two tasks of evaluation object extraction and emotional tendency classification for the evaluation object can be combined, and the fusion features of the two tasks can be obtained based on the interactive unit. Through the expansion cycle convolutional neural network technology, the two tasks of more fine-grained evaluation extraction and user emotional tendency classification in the evaluation sentence can be completed at the same time, thereby solving the technical problem that the tendency opinions of the evaluation object in the evaluation sentence cannot be fine-grained in the related technology. Analysis.

[0053] The embodiment of the present invention is described in detail below in combination with the above steps.

[0054] Figure 3 is a schematic diagram of an optional method for classifying the sentiment tendency of a comment object in a certain evaluation sentence according to an embodiment of the present invention. Figure 3 As shown in the figure, for a user comment "I have received the bacon, the packaging is intact, and the color looks very tempting. I will give my evaluation after tasting it", after conversion processing, the Cross-Shared Iterated Dilated Convolutions Neural Network (CS-IDCNN) model based on the interactive mode can extract the evaluation object in the user's comment and analyze the user's corresponding sentiment tendency category. That is, after the user comment is processed by the model, the analysis result can be obtained: {"Packaging": positive, "Color": positive}.

[0055] Figure 4 is a schematic diagram of the relationship between three processing modules for a more fine-grained analysis task according to an embodiment of the present invention, such as Figure 4As shown, it includes: data preprocessing and labeling module, sentence vectorization module, model design and training module.

[0056] Optionally, before obtaining the text to be processed, the analysis method also includes: performing word segmentation on text sentences in a preset corpus to obtain a word segmentation result sequence; labeling each word in the word segmentation result sequence, wherein the types of labels include: object labels, sentiment labels; based on a preset joint labeling rule, combining different labels for each word to obtain a combined label for each word.

[0057] When analyzing the evaluation text, this embodiment may analyze the tendency of the evaluation object indicated by the label information.

[0058] In an embodiment of the present invention, the text to be processed is processed by a data preprocessing and labeling module. For a given sentence, a word segmentation tool (for example, the jieba word segmentation tool) is used to perform word segmentation processing to obtain a sequence of word segmentation results. For two different tasks (i.e., evaluation object extraction and sentiment tendency classification tasks for the evaluation objects), a joint label rule (i.e., a preset joint label rule) can be designed to perform labeling processing on sentence segmentation. After that, the processed text in the entire corpus (i.e., the preset corpus) is divided into a training set and a test set for training and testing the model, thereby obtaining an expansion cycle convolutional neural network model based on an interactive mode.

[0059] In the embodiment of the present invention, through the preset joint labeling rules, the two tasks of evaluation object extraction and user sentiment tendency classification are regarded as sentence sequence labeling problems. For example, there is an evaluation sentence in the corpus, "The bacon has been received, the packaging is in good condition, and the color looks very tempting. Please evaluate it after tasting it." For this evaluation sentence, it can be first segmented to obtain the sequence structure of the sentence (i.e., the segmentation result sequence). The sentence in the corpus can be segmented by a segmentation tool. The segmentation result obtained by using the segmentation tool according to the part of speech classification for the above evaluation sentence is: {bacon / n, already / d, received / v, received / u,, / w, packaging / v, state / n, intact / a,, / w, color / n, look / v, look / u, very / d, tempting / a}, where the label n is the noun part of speech, u is the auxiliary part of speech, d is the adverb part of speech, v is the verb part of speech, a is the adjective part of speech, and w is the punctuation mark.

[0060] For different tasks, each word in the sentence can be assigned a corresponding label. For the evaluation object extraction task, the object label set {B, I, O} can be used, where B represents the first word that constitutes the evaluation object, I represents the other words that constitute the evaluation object except B, and O represents the words in the sentence that do not constitute the evaluation object; for sentiment tendency classification, the sentiment label set {PO, NT, NG, CF} can be used. This label is used to mark the sentiment tendency of the evaluation object, where PO represents positive sentiment tendency, NT represents neutral sentiment tendency, NG represents negative sentiment tendency, and CF represents unknown sentiment tendency.

[0061] like Figure 5 As shown in the figure, different labels are assigned according to different tasks and then combined. For example, for the text input {bacon / n, already / d, received / v, received / u,, / w, packaging / v, status / n, intact / a,, / w, color / n, look / v, look / u, very / d, tempting / a} after word segmentation, its comment object label is {O,O,O,O,O,B,I,O,O,B,O,O,O,O}, sentiment polarity label {O,O,O,O,O,PO,O,O,PO,O,O,O,O}, combination label {O,O,O,O,O,B-PO,I-PO,O,O,B-PO,O,O,O,O,O}. For the evaluation object "packaging status" in the example sentence, its corresponding combination label is {B-PO, I-PO}, indicating that the user's sentiment tendency towards "packaging object" is positive.

[0062] Step S201, obtaining a text to be processed, and preprocessing the evaluation sentences in the text to be processed to obtain a word identification sequence, wherein the text to be processed is a text extracted from the evaluation text of a certain commodity object, and the text to be processed includes at least one evaluation sentence.

[0063] Optionally, the step of preprocessing the evaluation statements in the text to be processed to obtain a word identification sequence includes: performing word segmentation and serialization processing on the evaluation statements in the text to be processed to obtain a word segmentation sequence; assigning an identification to each word in the word segmentation sequence to obtain a word identification sequence.

[0064] In an embodiment of the present invention, a sentence vectorization module can be used to use a word segmentation tool to perform word segmentation serialization processing (i.e., preprocessing) on ​​the text to be processed in a preset corpus (the corpus contains pre-extracted evaluation texts of multiple commodity objects, and each evaluation text has at least one evaluation sentence) to obtain a word segmentation sequence V. It is assumed that there are |V| non-repeating words in the word segmentation sequence V, and an identifier id∈{1,2,...,|V|} is assigned to each word in the word segmentation sequence, which is equivalent to assigning a unique label to each word. In this way, each comment sentence (i.e., evaluation sentence) after word segmentation will correspond to a word identifier sequence.

[0065] Step S202, based on the pre-trained word embedding vector matrix and / or the auxiliary embedding vector matrix, the word identification sequence is mapped into a word vector matrix, wherein the auxiliary embedding vector matrix is ​​a domain embedding vector matrix or a part-of-speech embedding vector matrix.

[0066] In an embodiment of the present invention, a word identification sequence can be mapped to a word vector matrix through a sentence vectorization module. In order to better express the semantic features expressed by the words, a language model can be trained through a neural network algorithm to embed the words into a space with a lower dimension and a fixed space, thereby obtaining a more dense word embedding vector representation that contains the word semantics. In order to meet the input requirements of the dilated cyclic convolutional neural network model, the word identification sequence of the evaluation sentence is mapped to a word vector matrix as the model input through a pre-trained word embedding vector matrix.

[0067] You can choose the pre-trained Chinese word vector (300 dimensions) from Mu Encyclopedia (ME) as the input basis for the model. Figure 6 As shown, take the above sentence as an example:

[0068] Assume that the maximum length of sentences in the preset corpus is n, and the word identifier sequence of the comment text of the example sentence after word serialization is {w1,w2,...,w n}, the sentence identification sequence can be padded with zeros to a maximum length of n. After obtaining the word identification sequence, the word vector matrix of the corresponding sentence can be expressed as:

[0069] X={x1,x2,...,x n},x i =W E e i ,i∈[1,n];

[0070] Where X∈R n×300 , W E is the ME word embedding matrix corresponding to all words in the corpus (i.e., the corpus word embedding matrix), with a dimension of [|V|, 300], which represents the word vector set of all words in the corpus, ei ={0,0,...,1,...,0} is a one-hot vector, where only one position is 1, and the corresponding word identification value is its number in the corpus word dictionary. For a given sentence, e i W E Equivalent to W E Take out the w i The word vector at the position of the word is taken as the word vector x corresponding to the i-th word in the sentence i ,like Figure 6 As shown, this process can be implemented by the word vector lookup method (look up) provided by the deep learning framework.

[0071] In order to enrich the input semantic features of the two tasks, the embodiment of the present invention introduces two auxiliary embedding vector matrices for the two tasks respectively. For the evaluation object extraction task, a domain embedding vector matrix is ​​introduced. Different from the ME word embedding matrix (i.e., the pre-trained word embedding vector matrix), this embedding method uses the corpus of the field where the comments are located to train the word vector, which can cover the semantic features of the evaluation object to a greater extent; since the part of speech of the words in the comments plays a great role in the judgment of the sentiment tendency, the part of speech embedding vector matrix can be introduced for the sentiment tendency classification task. This embedding method can be obtained by initializing a vector for all the part of speech tags in the comment corpus. For example, assuming W D and W P Corresponding to the domain embedding vector matrix and the part-of-speech embedding vector matrix respectively, the domain embedding input matrix D and the part-of-speech embedding input matrix P of the corresponding sentence are expressed as:

[0072] D={d1,d2,...,d n},d i =W E e i ,i∈[1,n];

[0073] P={p1,p2,...,p n},p i =W E e i ,i∈[1,n];

[0074] Step S203, input the word vector matrix into a preset dilated circular convolutional neural network model to obtain convolution features, and integrate the correlation matrix obtained in advance into the convolution features to obtain fusion features.

[0075] In an embodiment of the present invention, an expansion cycle convolutional neural network model based on an interactive mode (i.e., a preset expansion cycle convolutional neural network model) can be obtained through a model design and training module, and the tasks of extracting evaluation objects and classifying the sentiment tendency of comments can be jointly completed through this model. Figure 7 This is a schematic diagram of an optional dilated cyclic convolutional neural network model according to an embodiment of the present invention. The two tasks can use the word embedding vector matrix X and the auxiliary embedding vector matrix (including: domain embedding vector matrix D or part-of-speech embedding vector matrix P) as input, and perform connection and mapping processing through the dilated cyclic convolutional neural network model to obtain convolutional features, wherein the dilated cyclic convolutional neural network model includes: a word embedding layer, a cyclic dilated convolution layer, and a tag mapping layer. After the convolutional features are output by the dilated cyclic convolutional neural network model, the two tasks (i.e., evaluation object extraction and sentiment tendency classification) perform feature interactive learning through the designed interactive unit (i.e., integrating the correlation matrix obtained by pre-analysis into the convolutional features) to obtain fused features. After that, the trained model can be tested using a test set to verify the effect.

[0076] Optionally, the word vector matrix includes: a domain word vector matrix and a part-of-speech word vector matrix. Before the word vector matrix is ​​input into a preset dilated circular convolutional neural network model to obtain the convolution feature, the analysis method also includes: splicing the domain word vector matrix and the word embedding vector matrix according to a first preset rule to obtain a domain embedding input matrix; splicing the part-of-speech word vector matrix and the word embedding vector matrix according to a second preset rule to obtain a part-of-speech embedding input matrix; inputting the domain embedding input matrix and the part-of-speech embedding input matrix into the first convolution layer, respectively, wherein the first convolution layer calculates the first local features relative to the first task and the second local features relative to the second task by using a first preset formula, and the local features are used to indicate the features of each word and the word within a preset range in the text; inputting the first local features and the second local features into the second convolution layer, wherein the second convolution layer calculates the first convolution features relative to the first task and the second convolution features relative to the second task by using a second preset formula and a third preset rule.

[0077] In the embodiment of the present invention, for the word embedding layer, the two tasks (i.e., the first task is evaluation object extraction, and the second task is sentiment tendency classification) have different word vector input methods (i.e., domain word vector matrix and part-of-speech word vector matrix) according to the characteristics of their own tasks. Let X1 and X2 correspond to the domain embedding input matrices of the evaluation object extraction task and the sentiment tendency classification task respectively. (i.e., concatenating the domain word vector matrix and the word embedding vector matrix according to the first preset rule to obtain the domain embedding input matrix) and the word embedding input matrix (i.e., the part-of-speech word vector matrix and the word embedding vector matrix are concatenated according to the second preset rule to obtain the part-of-speech embedding input matrix), where d1 and d2 correspond to the dimensions of the domain embedding vector and the part-of-speech embedding vector respectively, which can be adjusted during training. This is a matrix concatenation operation.

[0078] For the cyclic expansion convolution layer, it contains two parts: the first part is an ordinary convolution layer (i.e., the first convolution layer), whose main function is to extract the local features of the sentence. The convolution calculation is performed through multiple one-dimensional convolution filters. Let the size of the convolution kernel be k, where k=2c+1, k is an odd number, which is selected as a parameter in training, indicating the extraction of local features within the range of 2c words of each word and its context (i.e., local features are used to indicate the features of each word and the word within a preset range in the text). The convolution calculation of this part (i.e., the local features are calculated by the first preset formula, and the local features include the first local features of the first task and the second local features of the second task) is expressed as:

[0079]

[0080] Among them, the convolution filter parameter matrix , X′ can be X1 or X2, which means one of the embedding input matrices of the two tasks, n conv is the number of convolution kernels selected in training, f represents the nonlinear activation function ReLU, the convolution step size is 1, and the first and last words whose context is less than k can be filled with 0 to ensure that every word in the sentence is covered.

[0081] The second part is 4 dilated convolution blocks of the same size stacked together (i.e., the second convolution layer), which is used to integrate context information and prevent the model from overfitting. Each block is a three-layer dilated convolution layer with dilation rates of 1, 1, and 2 respectively. The convolution calculation of this part (i.e., the convolution feature is calculated by the second preset formula, and the convolution feature includes the first convolution feature of the first task and the second convolution feature of the second task) is expressed as:

[0082]

[0083] i∈[1,n],j∈[1,n conv ],l∈[1,2,3],t∈[1,2,3,4];

[0084] in, Defined as a dilated convolution operation, is the expansion rate, which takes values ​​of 1, 1, and 2 on each block; l and t indicate the block number and the number of cycles, respectively. That is, the final output of each cycle is used as the input of the next cycle. Finally, the convolution output results in each cycle are horizontally spliced ​​(i.e., the third preset rule) as the final output result C of the circular convolution layer. f , which is expressed as follows:

[0085]

[0086] Assume that when X′=X1, C f =C A , when X′=X2, C f =C S , that is, when the embedding input matrices of the two tasks are used as the model input, the convolutional model outputs are C A and C S .

[0087] Optionally, integrating the correlation matrix obtained in advance by analysis into the convolution feature to obtain the fused feature also includes: calculating the interaction vector between the first task and the second task through a third preset formula; based on the interaction vector and the fourth preset formula, respectively calculating the interaction attention score scalars of the first task and the second task to obtain a first score scalar set relative to the first task and a second score scalar set relative to the second task; combining the first score scalar set and the second score scalar set to obtain a first correlation representation matrix and a second correlation representation matrix; integrating the first correlation representation matrix into the first convolution feature, and integrating the second correlation representation matrix into the second convolution feature to obtain the fused feature.

[0088] In an embodiment of the present invention, there is a strong correlation between the labels of the two tasks (i.e., the ATE task and the ASC task). For example, when the label of the ATE task (i.e., the first task) is O, the label of the ASC task (i.e., the second task) is also O. If the label of the ASC task is PO, the label of the ATE task must be B or I. In order to capture this correlation, a Cross Share Unit (CSU) is introduced to learn the interaction relationship.

[0089] First, the interaction vector is calculated by the following formula (i.e., the third preset formula): (i.e., calculating the interaction vector between the first task and the second task):

[0090]

[0091] in, G m ∈R K×2d×2d is a three-dimensional tensor, K is a configurable hyperparameter, A, a and S, s are index marks that identify the two tasks respectively. When m = a, M=A, when m=p, M = P. This operation can be regarded as a way to model the correlation between two task vectors. After the interaction vector is obtained, the interaction attention score scalar can be calculated for the two tasks by the following formula (i.e., the fourth preset formula):

[0092]

[0093] Among them, v m ∈R K The weight vector is used to weight the interaction vector, M∈{A,S},m∈{a,s}. The two tasks get the first score scalar set respectively and the second score scalar set , the first score scalar set and the second score scalar set are combined to obtain two correlation representation matrices: the first correlation representation matrix T A and the second correlation representation matrix T P For the evaluation object extraction task, The larger the value of indicates, the higher the correlation of the evaluation object component word i with the sentiment polarity obtained from the jth word; similarly, for the sentiment tendency classification task, The larger the value of indicates, the higher the correlation between the sentiment polarity word i and the evaluation object component word j. In order to fuse the features of the two tasks together, the correlation representation matrix of the two tasks can be used to integrate the convolutional features to regain the feature representation of the tasks (i.e., the first correlation representation matrix is ​​integrated into the first convolutional feature, and the second correlation representation matrix is ​​integrated into the second convolutional feature to obtain the fused feature):

[0094]

[0095] Among them, softmax r Represents the softmax function based on row calculation, M∈{A,S}, when M=A, When M=P,

[0096] Step S204, linearly map the fused features to obtain an estimated score matrix for each word tag of the dilated recurrent convolutional neural network model.

[0097] In this embodiment of the present invention, in order to obtain the prediction label, the fusion feature C M The score matrix R (i.e., estimated score matrix) predicted by the expanded cyclic convolutional neural network model for each word label in the sentence needs to be obtained through linear mapping, also known as the output score matrix:

[0098] R=WC M +b;

[0099] Among them, W is the linear transformation parameter, b is the corresponding bias term, and the matrix R includes the score of the label corresponding to each word in the sentence.

[0100] Optionally, after linearly mapping the fused features to obtain the estimated score matrix of the dilated recurrent convolutional neural network model for each word label, the analysis method also includes: based on the estimated score matrix and the transfer score matrix, using the conditional random field algorithm CRF to calculate the label transfer path score; based on the combination of the label transfer path score and other path scores except the label path, calculating the label probability of the tendency label corresponding to each evaluation object; based on the label probability of the tendency label, calculating the loss function of the label transfer path score.

[0101] In the embodiment of the present invention, since there is a problem of unreasonable conversion between labels, which will lead to inaccurate label prediction, the CRF algorithm is needed to limit the transfer between labels.

[0102] Taking the evaluation object extraction task as an example (similar to the sentiment splitting task), assuming that the maximum length of a sentence is n, the CRF algorithm uses the model's output score matrix R (i.e., the estimated score matrix) and its defined transfer score matrix A as input, where the dimension of A is [n,n] and can be randomly initialized during model training. There are 3 possible label combinations for a sentence of length n in the evaluation object extraction task. n Each different combination is called a label transfer path. The purpose of CRF training is to highlight the proportion of the actual label transfer path score of the sentence, so as to optimize the parameters of the model.

[0103] by Figure 5 Take the sentence text in as an example, the actual label value y={y1,y w ,...,y 14}={O,..,O,B,I,O,...,O}, let x={R 1,O ,...,R 4,O ,R 5,B ,...,R 14,O} is the model output score of the actual label, and its elements represent the score value of the word in the sentence as the actual label, which can be obtained from the model output result. The transfer path of the actual label can be expressed as {y1→y2,y2→y3,...,y 10 →y 14}, that is, {O->O,...,O->O,O->B,B->I,...,O->O}. The actual label transfer path score score(x,y) calculated by the CRF algorithm is expressed as the transfer score matrix A plus the model score matrix R:

[0104]

[0105] in, Indicates that from the actual label y l To the actual label y l+1The transfer score value of the transfer, Indicates that the word label at index l in the sentence is y l The loss function is determined according to the actual label path score (i.e., the loss function of calculating the label transfer path score based on the label probability of the tendency label) to indicate the degree of difference between the predicted label probability and the actual label probability, which is used to adjust the model in time. The loss function is the negative log-likelihood function loss of the label sequence, which can be determined by the following formula:

[0106]

[0107]

[0108] Among them, p(y|x) is the probability of the y label under the condition of given x (that is, the label probability of the tendency label corresponding to each evaluation object), and Y in the formula x is the set of all label transfer paths in the sentence, the numerator is the score of the actual transfer label, the denominator represents the sum of the scores of other paths except the actual label path, and loss is the negative logarithmic loss function with a base of e.

[0109] Optionally, after linearly mapping the fused features to obtain an estimated score matrix for each word label of the dilated recurrent convolutional neural network model, the analysis method further includes: obtaining a label path score based on the estimated score matrix; sorting the label path scores to determine a score sorting result; based on the score sorting result, using the Viterbi algorithm to select the label corresponding to the path with the highest score as the text label result.

[0110] In an embodiment of the present invention, a label path score can be obtained based on the obtained estimated score matrix, wherein the label path score is obtained by accumulating the label scores corresponding to each label combination, sorting the label path scores of all combinations, and using the Viterbi algorithm to select the label corresponding to the path with the highest score as the text label result.

[0111] Optionally, after obtaining two sentiment labels based on the first task and the second task respectively, the analysis method further includes: taking the evaluation object label as the boundary, based on the text label probability and the text label result, selecting the label with the largest number of appearances as the sentiment label; if the labels appear the same number of times, selecting the label ranked first as the sentiment label.

[0112] In an embodiment of the present invention, when predictive labels are generated for two tasks at the same time (i.e., two sentiment labels (i.e., label probabilities and text label results of the tendency labels) of the first task and the second task are obtained respectively), the polarity label (i.e., sentiment label) can be obtained in the following two ways with the evaluation object label as the boundary: (1) taking the sentiment polarity label with the largest number of occurrences; (2) if the number of labels is equal, taking the first polarity label (i.e., selecting the label with the first ranking as the sentiment label). For example, when the evaluation object consists of 3 words, the output label is {B, I, I}, that is, the boundary is 3. If the polarity label output is "PO, PO, NT", PO is taken as the polarity label, and the final combination label is {B-PO, I-PO, I-PO}. When the evaluation object consists of 2 words, the output label is {B, I}, that is, the boundary is 2. If the polarity label output is "NT, PO", NT is taken as the polarity label, and the final combination label is {B-NT, I-NT}.

[0113] Step S205: analyzing the label information of each evaluation sentence in the text to be processed based on the estimated score matrix.

[0114] In this embodiment, the label information may include the sentiment tendency of the evaluation object. When analyzing the evaluation text, the sentiment tendency of the text content is obtained through analysis, and the sentiment tendency of the evaluation text can be evaluated and analyzed.

[0115] In an embodiment of the present invention, an expansion cycle convolutional neural network model based on an interactive mode is used, the advantages of the expansion cycle convolutional neural network in computational efficiency and semantic coverage are utilized, and the two tasks of evaluation object extraction and sentiment tendency classification for the evaluation object are integrated through an interactive module to jointly complete the evaluation extraction and user sentiment tendency classification, and obtain the tendency label (specifically, it may include sentiment tendency label) of the evaluation object involved in each evaluation sentence.

[0116] The embodiments of the present invention have the following two beneficial effects:

[0117] (1) From the perspective of task granularity, we can evaluate a certain aspect of the purchased item in the user's review text and determine the emotional tendency shown in this aspect. This enables the simultaneous completion of the two tasks of extracting the evaluation object and classifying the user's emotional tendency, making the user review analysis more granular.

[0118] (2) In terms of model design and efficiency, the dilated recurrent convolutional neural network is used as the design basis of the model, which can give full play to the parallel computing capabilities of the GPU. A unified model interface is used and an interaction unit is designed to obtain the relationship between the two tasks, making the model more concise and efficient in completing two tasks at the same time.

[0119] Embodiment 2

[0120] An analysis device for evaluating text provided in this embodiment includes multiple implementation units, each of which corresponds to each implementation step in the above-mentioned embodiment 1.

[0121] Figure 8 is a schematic diagram of an optional analysis device for evaluating text according to an embodiment of the present invention, such as Figure 8 As shown, the analysis device may include: an acquisition unit 80, a first mapping unit 81, an input unit 82, a second mapping unit 83, and an analysis unit 84, wherein:

[0122] The acquisition unit 80 is used to acquire a text to be processed and pre-process the evaluation sentence in the text to be processed to obtain a word identification sequence, wherein the text to be processed is a text obtained by extracting the evaluation text of a certain commodity object, and the text to be processed includes at least one evaluation sentence;

[0123] A first mapping unit 81 is used to map the word identification sequence into a word vector matrix based on a pre-trained word embedding vector matrix and / or an auxiliary embedding vector matrix, wherein the auxiliary embedding vector matrix is ​​a domain embedding vector matrix or a part-of-speech embedding vector matrix;

[0124] An input unit 82 is used to input the word vector matrix into a preset dilated circular convolutional neural network model to obtain convolution features, and integrate the correlation matrix obtained by pre-analysis into the convolution features to obtain fusion features;

[0125] The second mapping unit 83 is used to obtain an estimated score matrix of each word label of the expanded convolutional neural network model by linearly mapping the fused features;

[0126] The analyzing unit 84 is used to analyze the label information of each evaluation sentence in the text to be processed based on the estimated score matrix, wherein the label information includes the tendency label of the evaluation object involved in the evaluation sentence.

[0127] The above-mentioned analysis device can obtain the text to be processed through the acquisition unit 80, and pre-process the evaluation sentences in the text to be processed to obtain a word identification sequence, and the first mapping unit 81 maps the word identification sequence to a word vector matrix based on the pre-trained word embedding vector matrix and / or the auxiliary embedding vector matrix, and the word vector matrix is ​​input into the preset expansion cycle convolution neural network model through the input unit 82 to obtain convolution features, and the correlation matrix obtained by the pre-analysis is integrated into the convolution features to obtain fusion features, and the second mapping unit 83 obtains the estimated score matrix of the expansion cycle convolution neural network model for each word label through linear mapping of the fusion features, and the analysis unit 84 analyzes the label information of each evaluation sentence in the text to be processed based on the estimated score matrix. In this embodiment, the characteristics of the two tasks of evaluation object extraction and emotional tendency classification for the evaluation object can be combined, and the fusion features of the two tasks can be obtained based on the interaction unit. Through the expansion cycle convolution neural network technology, the two tasks of more fine-grained evaluation extraction and user emotional tendency classification in the evaluation sentence can be completed at the same time, thereby solving the technical problem that the tendency opinions of the evaluation object in the evaluation sentence cannot be fine-grained in the related technology. Analysis.

[0128] Optionally, the acquisition unit includes: a first processing module, used to perform word segmentation and serialization processing on the evaluation statements in the text to be processed to obtain a word segmentation sequence; a first matching module, used to assign an identifier to each word in the word segmentation sequence to obtain a word identifier sequence.

[0129] Optionally, the analysis device also includes: a second processing module, used to perform word segmentation processing on text sentences in a preset corpus before obtaining the text to be processed, so as to obtain a word segmentation result sequence; a first labeling unit, used to label each word in the word segmentation result sequence, wherein the types of labels include: object labels, label information; a first combination module, used to combine different labels of each word based on a preset joint label rule, so as to obtain a combined label for each word.

[0130] Optionally, the word vector matrix includes: a domain word vector matrix and a part-of-speech word vector matrix, and the analysis device also includes: a first splicing module, which is used to splice the domain word vector matrix and the word embedding vector matrix according to a first preset rule before inputting the word vector matrix into a preset dilated circular convolutional neural network model to obtain convolution features, so as to obtain a domain embedding input matrix; a second splicing module, which is used to splice the part-of-speech word vector matrix and the word embedding vector matrix according to a second preset rule to obtain a part-of-speech embedding input matrix; a first input module, which is used to input the domain embedding input matrix and the part-of-speech embedding input matrix into a first convolutional layer, respectively, wherein the first convolutional layer calculates a first local feature relative to the first task and a second local feature relative to the second task by a first preset formula, and the local feature is used to indicate the features of each word and the word within a preset range in the text; a second input module, which is used to input the first local feature and the second local feature into a second convolutional layer, wherein the second convolutional layer calculates a first convolutional feature relative to the first task and a second convolutional feature relative to the second task by a second preset formula and a third preset rule.

[0131] Optionally, the input unit also includes: a first calculation module, used to calculate the interaction vector between the first task and the second task through a third preset formula; a second calculation module, used to calculate the interaction attention score scalars of the first task and the second task respectively based on the interaction vector and the fourth preset formula, to obtain a first score scalar set relative to the first task and a second score scalar set relative to the second task; a second combination module, used to combine the first score scalar set and the second score scalar set to obtain a first correlation representation matrix and a second correlation representation matrix; a first fusion module, used to fuse the first correlation representation matrix into the first convolution feature, and fuse the second correlation representation matrix into the second convolution feature to obtain a fused feature.

[0132] Optionally, the analysis device also includes: a third calculation module, which is used to calculate the label transfer path score based on the estimated score matrix and the transfer score matrix after obtaining the estimated score matrix of each word label of the dilated circular convolutional neural network model through linear mapping of the fused features; a fourth calculation module, which is used to calculate the label probability of the tendency label corresponding to each evaluation object based on the combination of the label transfer path score and the scores of other paths except the label path; and a fifth calculation module, which is used to calculate the loss function of the label transfer path score based on the label probability of the tendency label.

[0133] Optionally, the analysis device also includes: a first output module, which is used to obtain a label path score based on the estimated score matrix after linearly mapping the fused features to obtain the estimated score matrix for each word label of the dilated circular convolutional neural network model; a first sorting module, which is used to sort the label path scores and determine the score sorting result; and a first selection module, which is used to select the label corresponding to the path with the highest score as the text label result based on the score sorting result using the Viterbi algorithm.

[0134] Optionally, the analysis device also includes: a second selection module, which is used to select the label with the largest number of label appearances as the emotion label after obtaining two emotion labels based on the first task and the second task respectively, with the evaluation object label as the boundary, based on the text label probability and the text label result; and a third selection module, which is used to select the label with the largest number of label appearances as the emotion label if the labels have the same number of appearances.

[0135] The above-mentioned analysis device may also include a processor and a memory. The above-mentioned acquisition unit 80, first mapping unit 81, input unit 82, second mapping unit 83, analysis unit 84, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0136] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the label information of each evaluation sentence in the text to be processed is analyzed by adjusting the kernel parameters.

[0137] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.

[0138] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: obtaining a text to be processed, and preprocessing the evaluation sentences in the text to be processed to obtain a word identification sequence, mapping the word identification sequence into a word vector matrix based on a pre-trained word embedding vector matrix and / or an auxiliary embedding vector matrix, inputting the word vector matrix into a preset dilated circular convolutional neural network model to obtain convolutional features, and integrating the correlation matrix obtained by pre-analysis into the convolutional features to obtain fused features, linearly mapping the fused features to obtain an estimated score matrix for each word label of the dilated circular convolutional neural network model, and analyzing the label information of each evaluation sentence in the text to be processed based on the estimated score matrix.

[0139] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned evaluation text analysis methods.

[0140] According to another aspect of an embodiment of the present invention, an electronic device is also provided, characterized in that it includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned evaluation text analysis methods.

[0141] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0142] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0143] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0145] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0147] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for analyzing an evaluation text, characterized in that: include: Acquire a text to be processed, and pre-process the evaluation sentence in the text to be processed to obtain a word identification sequence, wherein the text to be processed is a text obtained by extracting the evaluation text of a certain commodity object, and the text to be processed includes at least one evaluation sentence; Based on a pre-trained word embedding vector matrix and / or an auxiliary embedding vector matrix, mapping the word identification sequence into a word vector matrix, wherein the auxiliary embedding vector matrix is ​​a domain embedding vector matrix or a part-of-speech embedding vector matrix; Inputting the word vector matrix into a preset dilated circular convolutional neural network model to obtain convolutional features, and integrating the correlation matrix obtained by pre-analysis into the convolutional features to obtain fusion features; The fused features are linearly mapped to obtain an estimated score matrix of each word label of the dilated cyclic convolutional neural network model; Based on the estimated score matrix, the label information of each evaluation sentence in the text to be processed is analyzed, wherein the label information includes the tendency label of the evaluation object involved in the evaluation sentence.

2. The analysis method according to claim 1, characterized in that The step of preprocessing the evaluation sentences in the text to be processed to obtain a word identification sequence includes: Performing word segmentation and serialization processing on the evaluation sentences in the text to be processed to obtain a word segmentation sequence; Assign an identifier to each word in the word segmentation sequence to obtain a word identifier sequence.

3. The analysis method according to claim 1, characterized in that Before obtaining the text to be processed, the analysis method further includes: Perform word segmentation on the text sentences in the preset corpus to obtain a word segmentation result sequence; Label each word in the word segmentation result sequence, wherein the types of the labels include: object labels and sentiment labels; Based on a preset joint label rule, different labels of each word are combined to obtain a combined label of each word.

4. The analysis method according to claim 3, characterized in that The word vector matrix includes: a domain word vector matrix and a part-of-speech word vector matrix. Before the word vector matrix is ​​input into a preset dilated circular convolutional neural network model to obtain convolution features, the analysis method further includes: Concatenate the domain word vector matrix and the word embedding vector matrix according to a first preset rule to obtain a domain embedding input matrix; Concatenate the part-of-speech word vector matrix and the word embedding vector matrix according to a second preset rule to obtain a part-of-speech embedding input matrix; Inputting the domain embedding input matrix and the part-of-speech embedding input matrix into a first convolutional layer respectively, wherein the first convolutional layer calculates a first local feature relative to a first task and a second local feature relative to a second task respectively by a first preset formula, the local feature being used to indicate features of each word and a word within a preset range in the text; The first local feature and the second local feature are input into a second convolutional layer, wherein the second convolutional layer calculates a first convolutional feature relative to the first task and a second convolutional feature relative to the second task respectively through a second preset formula and a third preset rule.

5. The analysis method according to claim 4, characterized in that Integrating the correlation matrix obtained by pre-analysis into the convolutional features to obtain the fusion features also includes: Calculate the interaction vector between the first task and the second task by using a third preset formula; Based on the interaction vector and a fourth preset formula, respectively calculating the interaction attention score scalars of the first task and the second task to obtain a first score scalar set relative to the first task and a second score scalar set relative to the second task; Combining the first score scalar set and the second score scalar set to obtain a first correlation representation matrix and a second correlation representation matrix; The first correlation representation matrix is ​​integrated into the first convolution feature, and the second correlation representation matrix is ​​integrated into the second convolution feature to obtain the fused feature.

6. The analysis method according to claim 5, characterized in that After the fusion features are linearly mapped to obtain an estimated score matrix of each word tag of the dilated cyclic convolutional neural network model, the analysis method further includes: Based on the estimated score matrix and the transfer score matrix, the conditional random field algorithm CRF is used to calculate the label transfer path score; Calculating the label probability of the tendency label corresponding to each evaluation object based on the combination of the label transfer path score and the scores of other paths except the label path; Based on the label probability of the tendency label, a loss function of the label transfer path score is calculated.

7. The analysis method according to claim 5, characterized in that After the fusion features are linearly mapped to obtain an estimated score matrix of each word tag of the dilated cyclic convolutional neural network model, the analysis method further includes: Based on the estimated score matrix, obtain a label path score; Sorting the label path scores to determine the score sorting result; Based on the score sorting results, the Viterbi algorithm is used to select the label corresponding to the path with the highest score as the text label result.

8. The analysis method according to claim 7, characterized in that After obtaining two emotion labels based on the first task and the second task respectively, the analysis method further includes: Taking the evaluation object label as the boundary, based on the text label probability and the text label result, selecting the label with the largest number of label appearances as the sentiment label; If the labels appear the same number of times, the label ranked first is selected as the sentiment label.

9. An analysis device for evaluating text, characterized in that: include: An acquisition unit is used to acquire a text to be processed and pre-process the evaluation sentence in the text to be processed to obtain a word identification sequence, wherein the text to be processed is a text obtained by extracting the evaluation text of a certain commodity object, and the text to be processed includes at least one evaluation sentence; A first mapping unit is used to map the word identification sequence into a word vector matrix based on a pre-trained word embedding vector matrix and / or an auxiliary embedding vector matrix, wherein the auxiliary embedding vector matrix is ​​a domain embedding vector matrix or a part-of-speech embedding vector matrix; An input unit, used to input the word vector matrix into a preset dilated circular convolutional neural network model to obtain convolution features, and integrate the correlation matrix obtained by pre-analysis into the convolution features to obtain fusion features; A second mapping unit is used to obtain an estimated score matrix of each word label of the dilated circular convolutional neural network model by linearly mapping the fused features; An analyzing unit is used to analyze the label information of each evaluation sentence in the text to be processed based on the estimated score matrix, wherein the label information includes the tendency label of the evaluation object involved in the evaluation sentence.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for analyzing the evaluation text according to any one of claims 1 to 8.

11. An electronic device, characterized in that: It comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the analysis method of the evaluation text described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Humor recognition method based on neural network and humor features

    CN108874896A

  • Short text automatic abstracting method and system based on double encoders

    CN110390103A