Search

CN-121724013-B - Evaluation result identification method, device, equipment and storage medium

CN121724013BCN 121724013 BCN121724013 BCN 121724013BCN-121724013-B

Abstract

The invention provides an evaluation result identification method, an evaluation result identification device, evaluation result identification equipment and a storage medium, which can be applied to the technical field of natural language processing. The evaluation result identification method includes the steps of analyzing dependency relations among a plurality of words in text information including a plurality of evaluation subjects and description texts associated with the evaluation subjects, constructing a syntactic dependency tree, determining position weights of the words for the evaluation subjects based on relative position relations between the words except the words constituting the evaluation subjects and the evaluation subjects in the text information, fusing a weight matrix constructed based on the position weights corresponding to the evaluation subjects for the evaluation subjects to obtain a semantic matrix by fusing the weight matrix with emotion labels of the viewpoint words identified from the description texts, and fusing and transforming the syntactic matrix obtained by feature transformation of the syntactic dependency tree with the semantic matrix of the evaluation subjects to output evaluation results.

Inventors

  • ZHAO YUE
  • ZHAO MANKUN
  • GAO JIE
  • ZHANG WENBIN
  • XU TIANYI
  • PENG FENG
  • YU MEI

Assignees

  • 天津大学

Dates

Publication Date
20260512
Application Date
20260225

Claims (10)

  1. 1. An evaluation result recognition method, characterized in that the method comprises: analyzing the dependency relationship between a plurality of words in text information comprising a plurality of evaluation subjects and descriptive text associated with each evaluation subject, and constructing a syntactic dependency tree, wherein the plurality of words comprise words constituting each evaluation subject; determining the position weight of each word for each evaluation subject based on the relative position relation between each word except the words forming each evaluation subject and each evaluation subject in the text information; For each evaluation subject, a weight matrix is constructed based on a plurality of position weights corresponding to the evaluation subject, so that the weight matrix is fused with emotion labels of a plurality of viewpoint words identified from the descriptive text, and a semantic matrix corresponding to the evaluation subject is obtained, wherein the emotion labels are obtained by matching the viewpoint words with sample words in an emotion database, and the emotion database stores mapping relations between the sample words and the emotion labels; and respectively fusing and transforming the syntax matrix obtained by the feature transformation of the syntax dependency tree with the semantic matrix of each evaluation subject, and outputting an evaluation result aiming at each evaluation subject.
  2. 2. The method according to claim 1, wherein the method further comprises: Extracting features from the syntax dependency tree to generate a syntax dependency feature matrix and a query matrix, wherein the dimension of the syntax dependency feature matrix is determined by the number of a plurality of words in the text information and the dimension of a preset syntax feature vector, and the dimension of the query matrix is associated with the dimension of the preset syntax feature vector; Calculating the syntax dependency feature matrix and the query matrix through a global self-attention mechanism to obtain a global weight matrix, wherein the global weight matrix is used for representing the cross-text global syntax dependency features among a plurality of words in the text information; Calculating the syntax dependency feature matrix and the query matrix through a local self-attention mechanism to obtain a local weight matrix, wherein the local weight matrix is used for representing local dependency features between word pairs with direct syntax association in the text information; and fusing the global weight matrix and the local weight matrix to generate the syntax matrix.
  3. 3. The method of claim 2, wherein the fusing the global weight matrix and the local weight matrix to generate the syntax matrix comprises: normalizing the local weight matrix to obtain a normalized local weight matrix; Performing element-wise multiplication mask processing on the global weight matrix and the normalized local weight matrix by using a syntax mask matrix to obtain a global target matrix and a local target matrix, wherein the syntax mask matrix is generated according to the syntax dependency tree and is used for shielding matrix elements corresponding to word pairs without direct syntax dependency; and fusing the global target matrix and the local target matrix to generate the syntax matrix.
  4. 4. The method according to claim 1, wherein the determining the position weight of each of the words for each of the evaluation subjects based on the relative positional relationship between each of the words in the text information other than the words constituting each of the evaluation subjects and each of the evaluation subjects, respectively, comprises: Generating a word position sequence based on the sequence of a plurality of words in the text information; For each evaluation subject, determining a subset of consecutive words corresponding to the evaluation subject in the sequence of word positions, wherein the subset of consecutive words consists of one or more consecutive words that make up the evaluation subject; and determining the position weight of each word for the evaluation subject according to the relative position relation between the position of the word in the word position sequence and the continuous word subset corresponding to the evaluation subject aiming at each word except the words forming the evaluation subject in the text information.
  5. 5. The method of claim 4, wherein the determining the location weight of each of the terms for the evaluation subject based on the relative positional relationship between the position of the term in the sequence of term locations and a subset of consecutive terms corresponding to the evaluation subject comprises: Responsive to the position of the word in the word position sequence being located before the position of the subset of consecutive words, calculating the position weight from a first relative distance between the position of the word and a starting position of the subset of consecutive words in the word position sequence; determining that the position weight is a preset highest weight value in response to the position of the word in the word position sequence being within the position of the continuous word subset; Responsive to the position of the word in the sequence of word positions being located after the position of the subset of consecutive words, the position weight is calculated from a second relative distance between the position of the word and an ending position of the subset of consecutive words in the sequence of word positions.
  6. 6. The method according to claim 1, wherein the fusing the weight matrix with emotion tags of each of the plurality of viewpoint words identified from the descriptive text to obtain a semantic matrix corresponding to the evaluation subject includes: determining association weights between the viewpoint words and the evaluation subjects based on tag values corresponding to emotion tags of the viewpoint words and position weights corresponding to the viewpoint words in the weight matrix; Updating the weight matrix with a plurality of the associated weights to generate the semantic matrix.
  7. 7. The method according to claim 1, wherein the transforming the syntax matrix obtained by transforming the syntax dependency tree into features, respectively fusing and transforming the syntax matrix with the semantic matrix of each evaluation subject, and outputting the evaluation result for each evaluation subject, includes: For each evaluation subject, fusing the syntax matrix and a semantic matrix corresponding to the evaluation subject to obtain a target matrix; Encoding the text information through a pre-training language model to generate a word vector sequence; Taking the word vector sequence as an initial characteristic of nodes in the graph neural network, and taking the target matrix as an adjacency relation matrix between the nodes in the graph neural network; inputting the initial characteristics and the adjacency relation matrix into a multi-layer graph convolution network to iteratively aggregate and update node characteristics through the multi-layer graph convolution network so as to obtain characteristic representation of the evaluation main body; and inputting the characteristic representation of the evaluation subject into a classification layer, and outputting an evaluation result aiming at the evaluation subject.
  8. 8. An evaluation result recognition apparatus, characterized by comprising: A syntax analysis module for analyzing a dependency relationship between a plurality of words in text information including a plurality of evaluation subjects and descriptive text associated with each evaluation subject, the plurality of words including words constituting each evaluation subject, to construct a syntax dependency tree; a position determining module configured to determine a position weight of each of the words for each of the evaluation subjects, respectively, based on a relative positional relationship between each of the words and each of the evaluation subjects other than the words constituting each of the evaluation subjects in the text information; The semantic analysis module is used for carrying out fusion on the weight matrix and emotion labels of each of a plurality of viewpoint words identified from the descriptive text according to the weight matrix established based on the position weights corresponding to each evaluation subject to obtain a semantic matrix corresponding to each evaluation subject, wherein the emotion labels are obtained by matching the viewpoint words with sample words in an emotion database, and the emotion database stores mapping relations between the sample words and the emotion labels; And the result determining module is used for respectively fusing and transforming the syntax matrix obtained by the characteristic transformation of the syntax dependency tree with the semantic matrix of each evaluation subject and outputting the evaluation result aiming at each evaluation subject.
  9. 9. An electronic device, comprising: one or more processors; A memory for storing one or more computer programs, Characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-7.
  10. 10. A computer-readable storage medium, on which a computer program or instructions is stored, which, when executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.

Description

Evaluation result identification method, device, equipment and storage medium Technical Field The present invention relates to the field of natural language processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for identifying an evaluation result. Background With the development of natural language processing technology, a text emotion evaluation technology oriented to multiple evaluation subjects has become a core support technology in the field of text semantic analysis. In the related art, text emotion evaluation mostly adopts a keyword matching or shallow layer syntactic analysis mode, and basic emotion judgment of an evaluation main body is realized by presetting emotion dictionary matching viewpoint words and combining simple position rules. In the process of realizing the conception of the invention, the related technology is found to have at least the following problems that depending on a single shallow analysis means, complex scenes of multi-evaluation main bodies and multi-viewpoint word interweaving are difficult to adapt, so that the emotion evaluation accuracy is insufficient. Disclosure of Invention In view of the above, the present invention provides an evaluation result recognition method, apparatus, device, and storage medium. According to a first aspect of the present invention, there is provided an evaluation result recognition method comprising analyzing a dependency relationship between a plurality of words in text information including a plurality of evaluation subjects and descriptive text associated with each of the evaluation subjects, creating a syntactic dependency tree, wherein the plurality of words include words constituting each of the evaluation subjects, determining a positional weight of each of the words for each of the evaluation subjects based on a relative positional relationship between each of the words in the text information other than the words constituting each of the evaluation subjects and each of the evaluation subjects, respectively, fusing the weighting matrix constructed based on the plurality of positional weights corresponding to the evaluation subjects for each of the evaluation subjects to obtain a semantic matrix corresponding to each of the evaluation subjects by matching the viewpoint words with sample words in an emotion database, storing a syntactic mapping relationship between the sample words and the emotion labels in the emotion database, and transforming the syntactic mapping tree to obtain a semantic matrix corresponding to each of the evaluation subjects, and outputting the syntactic mapping result of each of the semantic mapping tree and each of the evaluation subjects. According to the embodiment of the invention, the method further comprises the steps of extracting features of the syntax dependency tree to generate a syntax dependency feature matrix and a query matrix, wherein the dimension of the syntax dependency feature matrix is determined by the number of the words in the text information and the dimension of a preset syntax feature vector, the dimension of the query matrix is related to the dimension of the preset syntax feature vector, the syntax dependency feature matrix and the query matrix are calculated through a global self-attention mechanism to obtain a global weight matrix, the global weight matrix is used for representing cross-text global syntax dependency features among the words in the text information, the syntax dependency feature matrix and the query matrix are calculated through a local self-attention mechanism to obtain a local weight matrix, the local weight matrix is used for representing local dependency features among word pairs with direct association in the text information, and the global weight matrix and the local weight matrix are fused to generate the global weight matrix. According to the embodiment of the invention, the method for generating the syntax matrix by fusing the global weight matrix and the local weight matrix comprises the steps of normalizing the local weight matrix to obtain a normalized local weight matrix, and performing element-wise multiplication masking on the global weight matrix and the normalized local weight matrix by using a syntax mask matrix to obtain a global target matrix and a local target matrix, wherein the syntax mask matrix is generated according to the syntax dependency tree and is used for shielding matrix elements corresponding to words without direct syntax dependency, and the global target matrix and the local target matrix are fused to generate the syntax matrix. According to the embodiment of the invention, the method for determining the position weight of each word for each evaluation subject based on the relative position relation between each word except the words forming each evaluation subject in the text information and each evaluation subject comprises the steps of generating a word position sequence based on