Entity relationship extraction method, device, data annotation system and storage medium

Through the combination of reinforcement learning model and graph convolutional neural network, the high-cost problem of entity relationship extraction in the data annotation platform is solved, achieving efficient annotation efficiency and reducing repeated annotation, converting it into a relationship graph generation problem, and reducing labor costs. .

CN115114918BActive Publication Date: 2024-09-06CHINA TELECOM CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110286687.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-17
Publication Date
2024-09-06
Estimated Expiration
2041-03-17

AI Technical Summary

Technical Problem

Existing data annotation platforms have a large number of repeated annotations and low intelligence, resulting in a waste of manual time and energy, especially high costs in entity relationship annotation.

Method used

The reinforcement learning model is combined with the word vector and relational subgraph processing model. By generating word vectors, relational subgraph feature information and state information, Q learning network and graph convolutional neural network are used to extract entity relationships and convert it into a relational graph generation problem. Optimize the model using reward and punishment mechanisms.

Benefits of technology

It reduces labor costs, improves labeling efficiency, avoids repeated labeling and similar labeling, and achieves efficient entity relationship representation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115114918B
    Figure CN115114918B
Patent Text Reader

Abstract

The present disclosure provides an entity relationship extraction method, device, data annotation system and storage medium, wherein the method includes: using a reinforcement learning model to process word vectors and initial relationship subgraphs to obtain entity relationship extraction information between each word in the word vector; generating a relationship subgraph based on the entity relationship extraction information, using a relationship graph processing model to process the relationship subgraph, and generating relationship subgraph feature information corresponding to the relationship subgraph; based on the word vector and the relationship subgraph feature information, generating state information of the reinforcement learning model, and using the reinforcement learning model to process the state information to obtain new entity relationship extraction information. The method, device and storage medium disclosed in the present disclosure convert the entity relationship generation problem of NLP into the generation problem of entity relationship graphs, can efficiently represent entity relationships, reduce labor costs, and improve annotation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an entity relationship extraction method, device, data annotation system and storage medium. Background Art

[0002] The data annotation platform is an important part of the automatic machine learning pipeline. The data annotation effect directly affects the quality of subsequent model training and prediction. The existing annotation platform contains a large number of repeated annotations and has a low degree of intelligence, which leads to a large waste of manual time and energy. Therefore, it is particularly important to build an efficient and self-learning annotation platform. As a basic task of NLP (Natural Language Processing), entity relationship extraction has a wide range of applications in knowledge graph construction, automatic question answering, intelligent search engines and other fields. Entity relationship annotation is a type of NLP data annotation. However, due to the complexity of entity relationships in texts, high labor costs will be consumed in the annotation work. Therefore, a new technical solution for entity relationship extraction is needed. Summary of the invention

[0003] In view of this, a technical problem to be solved by the present invention is to provide an entity relationship extraction method, device, data annotation system and storage medium.

[0004] According to a first aspect of the present disclosure, there is provided an entity relationship extraction method, comprising: obtaining a text to be annotated, and generating a word vector based on the text to be annotated; using a reinforcement learning model to process the word vector and an initial relationship subgraph to obtain entity relationship extraction information between each word in the word vector; generating a relationship subgraph based on the entity relationship extraction information, and using a relationship graph processing model to process the relationship subgraph to generate relationship subgraph feature information corresponding to the relationship subgraph; based on the word vector and the relationship subgraph feature information, generating state information of the reinforcement learning model, and using the reinforcement learning model to process the state information to obtain new entity relationship extraction information.

[0005] Optionally, generating a word vector based on the text to be annotated includes: processing the text to be annotated using a word vector generation model to generate the word vector; wherein the word vector generation model includes: a Word2Vec model.

[0006] Optionally, the relationship graph processing model for identifying the relationship sub-graph is constructed; and the relationship graph processing model is trained according to the relationship sub-graph sample set.

[0007] Optionally, the relationship graph processing model includes: a graph convolutional neural network model.

[0008] Optionally, the reinforcement learning model is a reinforcement learning model based on Q learning; the Q learning network of the reinforcement learning model uses a bidirectional LSTM model.

[0009] Optionally, the state information is input into the reinforcement learning model to obtain actions corresponding to the state information; wherein the actions include: adding relationship entities, adding association relationships between existing relationship entities, and not adding entities and association relationships.

[0010] Optionally, the target entity relationship extraction information corresponding to the text to be annotated and the new entity relationship extraction information are calculated using a preset reward and punishment function to obtain a reward and punishment processing result; wherein the reward and punishment processing result includes: adding points, deducting points, and not changing the score;

[0011] Based on the reward and punishment processing results, the reinforcement learning model is optimized.

[0012] According to a second aspect of the present disclosure, there is provided an entity relationship extraction device, comprising: a word vector generation module, used to obtain a text to be annotated, and generate a word vector based on the text to be annotated; a recognition processing module, used to process the word vector and the initial relationship subgraph using a reinforcement learning model, and obtain entity relationship extraction information between each word in the word vector; a relationship subgraph processing module, used to generate a relationship subgraph based on the entity relationship extraction information, and use a relationship graph processing model to process the relationship subgraph to generate relationship subgraph feature information corresponding to the relationship subgraph; the recognition processing module is also used to generate state information of the reinforcement learning model based on the word vector and the relationship subgraph feature information, and use the reinforcement learning model to process the state information to obtain new entity relationship extraction information.

[0013] Optionally, the word vector generation module is used to process the text to be annotated using a word vector generation model to generate the word vector; wherein the word vector generation model includes: a Word2Vec model.

[0014] Optionally, the model training module is used to construct the relationship graph processing model for identifying the relationship subgraph; and train the relationship graph processing model according to the relationship subgraph sample set.

[0015] Optionally, the relationship graph processing model includes: a graph convolutional neural network model.

[0016] Optionally, the reinforcement learning model is a reinforcement learning model based on Q learning; the Q learning network of the reinforcement learning model uses a bidirectional LSTM model.

[0017] Optionally, the recognition processing module is used to input the state information into the reinforcement learning model to obtain actions corresponding to the state information; wherein the actions include: adding relationship entities, adding association relationships between existing relationship entities, and not adding entities and association relationships.

[0018] Optionally, a model optimization module is used to extract the target entity relationship information corresponding to the text to be annotated and the new entity relationship information, and use a preset reward and punishment function to calculate to obtain a reward and punishment processing result; wherein the reward and punishment processing result includes: adding points, subtracting points, and not changing the score; based on the reward and punishment processing result, the reinforcement learning model is optimized.

[0019] According to a third aspect of the present disclosure, there is provided an entity relationship extraction device, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the method as described above based on instructions stored in the memory.

[0020] According to a fourth aspect of the present disclosure, a data annotation system is provided, comprising: the entity relationship extraction device as described above.

[0021] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the instructions are executed by a processor as described above.

[0022] The entity relationship extraction method, device, data annotation system and storage medium disclosed in the present invention convert the entity relationship generation problem of NLP into the generation problem of entity relationship graph, can efficiently characterize entity relationships, and learn from manual annotation behavior, thereby reducing labor costs, improving annotation efficiency, and avoiding repeated annotations and similar annotations. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0024] Figure 1 A flowchart of an embodiment of an entity relationship extraction method according to the present disclosure;

[0025] Figure 2A A schematic diagram of a model operation according to an embodiment of the entity relationship extraction method disclosed in the present invention; Figure 2B is a schematic diagram of a relationship subgraph;

[0026] Figure 3 A schematic diagram of a module of an embodiment of an entity relationship extraction device according to the present disclosure

[0027] Figure 4 is a module diagram of another embodiment of the entity relationship extraction device according to the present disclosure;

[0028] Figure 5 It is a module diagram of another embodiment of the entity relationship extraction device according to the present disclosure. DETAILED DESCRIPTION

[0029] The present disclosure is described more fully below with reference to the accompanying drawings, in which exemplary embodiments of the present disclosure are described. The technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0030] Entity relationship labeling is a type of NLP data labeling. This paper proposes an entity relationship extraction method, which converts the entity relationship generation problem of NLP into the generation problem of entity relationship graph, so that a more natural and efficient way can be used to represent entity relationships; the interactive process of the model learning from manual labeling behavior and obtaining manual feedback rewards and punishments is converted into a reinforcement learning process, and accurate relationship labeling behavior is obtained by maximizing the rewards obtained.

[0031] Figure 1 FIG. 1 is a flow chart of an embodiment of the entity relationship extraction method according to the present disclosure, as shown in FIG. Figure 1 As shown:

[0032] Step 101: obtain the text to be annotated, and generate a word vector based on the text to be annotated.

[0033] Step 102: Use a reinforcement learning model to process the word vector and the initial relationship subgraph to obtain entity relationship extraction information between each word in the word vector.

[0034] In one embodiment, reinforcement learning (RL), also known as reinforcement learning, evaluation learning or enhanced learning, is one of the paradigms and methodologies of machine learning, which is used to describe and solve the problem of an agent maximizing rewards or achieving specific goals through learning strategies during the interaction with the environment.

[0035] The existing training method can be used to pre-train the reinforcement learning model, and the trained reinforcement learning model can be used to process the word vector and the initial relationship subgraph to obtain the entity relationship extraction information between the words in the word vector. The entity relationship extraction information includes the association relationship between words, and the association relationship can be "create", "generate", etc. The initial relationship subgraph can be a preset relationship subgraph or a relationship subgraph with empty content, or the word vector can be processed using the reinforcement learning model.

[0036] Step 103: Generate a relationship subgraph based on the entity relationship extraction information, process the relationship subgraph using a relationship graph processing model, and generate relationship subgraph feature information corresponding to the relationship subgraph.

[0037] In one embodiment, a reinforcement learning model may be used to directly output a relational subgraph, or other tools may be used to generate a relational subgraph based on words and associations between words.

[0038] Step 104, based on the word vector and the relationship subgraph feature information, generate state information of the reinforcement learning model, and use the reinforcement learning model to process the state information to obtain new entity relationship extraction information.

[0039] In one embodiment, the existing method can be used to generate state information of the reinforcement learning model based on word vectors and relationship subgraph feature information. The new entity relationship extraction information includes the association relationship between the words obtained again, and an entity relationship graph can be generated based on the words and the association relationship between the words.

[0040] The entity relationship extraction method in the above embodiment converts the NLP entity relationship generation problem into the entity relationship graph generation problem, so that a more natural and efficient way can be used to characterize entity relationships and learn from manual labeling behavior, which greatly reduces labor costs, improves labeling efficiency, and avoids repeated labeling and similar labeling; for the first time, graph generation and reinforcement learning are combined for NLP entity relationship extraction.

[0041] In one embodiment, a word vector generation model is used to process the text to be annotated to generate a word vector, and the word vector generation model includes a Word2Vec model, etc. A relationship graph processing model for identifying a relationship subgraph is constructed, and the relationship graph processing model is trained according to a relationship subgraph sample set, and the relationship graph processing model includes a convolutional neural network (CNN) model, etc. An existing method can be used to construct a relationship subgraph sample set, and the relationship graph processing model can be trained according to the relationship subgraph sample set based on an existing model training method.

[0042] The reinforcement learning model is a reinforcement learning model based on Q learning, and the Q learning network of the reinforcement learning model uses a bidirectional LSTM (Long Short-Term Memory) model. The state information is input into the reinforcement learning model to obtain actions corresponding to the state information; the actions include: adding relationship entities, adding associations between existing relationship entities, and not adding entities and associations.

[0043] According to the target entity relationship extraction information and new entity relationship extraction information corresponding to the text to be annotated, and using the preset reward and punishment function for calculation, the reward and punishment processing results are obtained; the reward and punishment processing results include: adding points, subtracting points, and not changing the score; based on the reward and punishment processing results, the reinforcement learning model is optimized.

[0044] In the entity relationship extraction method disclosed in the present invention, the state update of reinforcement learning not only uses the output of LSTM, but also adds the use of graph convolution to extract the features of the current relationship subgraph; the action space of reinforcement learning is no longer a simple classification problem, but it determines whether to add nodes representing entities to the relationship graph or add edges representing relationships to existing nodes according to the situation, combining entity labeling and relationship extraction into a step of generating a relationship graph, without the need to introduce additional relationship extraction models.

[0045] In one embodiment, Figure 2A As shown in the figure, an NLP entity relationship labeling scheme based on interactive learning of graph generation strategy is adopted to transform the relationship labeling problem into a relationship graph generation problem, obtain efficient relationship representation, and enable the model to learn in the interactive process of manual labeling and manual feedback.

[0046] For example, the sentence to be annotated is "Microsoft was founded by Bill Gates and Paul Allen in 1975". Through the DQN model and the graph convolution GCN model, the entity relationship extraction problem is transformed into a process of building a relationship graph step by step using reinforcement learning. The generated relationship subgraph is Figure 2B As shown in the figure, the relation subgraph extracts features through the graph convolution GCN model as part of the environment observation and updates it to the state S of the reinforcement learning. The graph convolution GCN model is a graph generation model pre-trained on the entity-relationship database. When extracting subgraph features, it only predicts the feature information of the relation subgraph.

[0047] like Figure 2AAs shown in the figure, the state part S of reinforcement learning includes the word vector of the word and the representation of the graph convolution of the current relationship subgraph. The bidirectional LSTM model is used in the Q-learning part. The state S and the hidden layer of the bidirectional LSTM are input each time as the input of the Q-learning network. There are three types of actions for each state: adding nodes to the graph, adding edges to the existing subgraph, and next (neither adding entities nor edges). There are also three types of rewards obtained by the agent: plus points (10, 30), minus points (-10), and zero points (0).

[0048] In one embodiment, Figure 3 As shown, the present disclosure provides an entity relationship extraction device 30, including a word vector generation module 31, a recognition processing module 32 and a relationship subgraph processing module 33. The word vector generation module 31 obtains the text to be annotated and generates a word vector based on the text to be annotated. The recognition processing module 32 uses a reinforcement learning model to process the word vector and the initial relationship subgraph to obtain entity relationship extraction information between each word in the word vector.

[0049] The relationship subgraph processing module 33 generates a relationship subgraph based on the entity relationship extraction information, processes the relationship subgraph using the relationship graph processing model, and generates relationship subgraph feature information corresponding to the relationship subgraph. The recognition processing module 32 generates state information of the reinforcement learning model based on the word vector and the relationship subgraph feature information, and processes the state information using the reinforcement learning model to obtain new entity relationship extraction information.

[0050] In one embodiment, the word vector generation module 31 uses a word vector generation model to process the text to be annotated to generate a word vector, wherein the word vector generation model includes: Word2Vec model, etc. Figure 4 As shown, the entity relationship extraction device 30 also includes a model training module 34 and a model optimization module 35. The model training module 34 constructs a relationship graph processing model for identifying relationship subgraphs, and trains the relationship graph processing model according to a relationship subgraph sample set, and the relationship graph processing model includes a graph convolutional neural network model, etc.

[0051] The recognition processing module 32 inputs the state information into the reinforcement learning model and obtains actions corresponding to the state information, including adding relationship entities, adding association relationships between existing relationship entities, not adding entities and association relationships, etc. The model optimization module 35 extracts the target entity relationship information and the new entity relationship information corresponding to the text to be annotated, and uses the preset reward and punishment function to calculate and obtain the reward and punishment processing results, wherein the reward and punishment processing results include: adding points, subtracting points, not changing the score, etc. The model optimization module 35 optimizes the reinforcement learning model based on the reward and punishment processing results.

[0052] Figure 5 FIG. 1 is a module diagram of another embodiment of the entity relationship extraction device according to the present disclosure. Figure 5 As shown, the apparatus may include a memory 51, a processor 52, a communication interface 53 and a bus 54. The memory 51 is used to store instructions, the processor 52 is coupled to the memory 51, and the processor 52 is configured to execute the above-mentioned entity relationship extraction method based on the instructions stored in the memory 51.

[0053] The memory 51 may be a high-speed RAM memory, a non-volatile memory, etc. The memory 51 may also be a memory array. The memory 51 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules. The processor 52 may be a central processing unit CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the entity relationship extraction method disclosed in the present invention.

[0054] In one embodiment, the present disclosure provides a data annotation system, comprising an entity relationship extraction device as in any of the above embodiments.

[0055] In one embodiment, the present disclosure provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the entity relationship extraction method in any of the above embodiments.

[0056] The entity relationship extraction method, device, data annotation system and storage medium provided in the above embodiments convert the NLP entity relationship generation problem into the entity relationship graph generation problem, so that a more natural and efficient way can be used to characterize entity relationships and learn from manual annotation behavior, which greatly reduces labor costs, improves annotation efficiency, and avoids repeated annotations and similar annotations.

[0057] The method and system of the present disclosure may be implemented in many ways. For example, the method and system of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0058] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A method for extracting entity relations, comprising: Obtaining a text to be annotated, and generating a word vector based on the text to be annotated; Processing the word vector and the initial relationship subgraph using a reinforcement learning model to obtain entity relationship extraction information between each word in the word vector; Generate a relationship subgraph based on the entity relationship extraction information, process the relationship subgraph using a relationship graph processing model, and generate relationship subgraph feature information corresponding to the relationship subgraph; Based on the word vector and the relationship subgraph feature information, generating state information of the reinforcement learning model, and using the reinforcement learning model to process the state information to obtain new entity relationship extraction information; Among them, the reinforcement learning model is a reinforcement learning model based on Q learning; the state information is input into the reinforcement learning model to obtain actions corresponding to the state information; the actions include: adding relationship entities, adding association relationships between existing relationship entities, and not adding entities and association relationships.

2. The method according to claim 1, wherein generating a word vector based on the text to be annotated comprises: Processing the text to be annotated using a word vector generation model to generate the word vector; Wherein, the word vector generation model includes: Word2Vec model.

3. The method of claim 2, further comprising: Constructing the relationship graph processing model for identifying the relationship subgraph; The relationship graph processing model is trained according to the relationship subgraph sample set.

4. The method of claim 3, wherein: The relationship graph processing model includes: a graph convolutional neural network model.

5. The method of claim 1, wherein: The Q learning network of the reinforcement learning model uses a bidirectional LSTM model.

6. The method of claim 1, further comprising: According to the target entity relationship extraction information corresponding to the text to be annotated and the new entity relationship extraction information, a reward and punishment processing result is obtained by using a preset reward and punishment function for calculation; wherein the reward and punishment processing result includes: adding points, deducting points, and not changing the score; Based on the reward and punishment processing results, the reinforcement learning model is optimized.

7. An entity relationship extraction device, comprising: A word vector generation module, used to obtain the text to be annotated and generate a word vector based on the text to be annotated; An identification processing module, used to process the word vector and the initial relationship subgraph using a reinforcement learning model to obtain entity relationship extraction information between each word in the word vector; A relationship subgraph processing module, used to generate a relationship subgraph based on the entity relationship extraction information, process the relationship subgraph using a relationship graph processing model, and generate relationship subgraph feature information corresponding to the relationship subgraph; The recognition processing module is further used to generate state information of the reinforcement learning model based on the word vector and the relationship subgraph feature information, and use the reinforcement learning model to process the state information to obtain new entity relationship extraction information; Among them, the reinforcement learning model is a reinforcement learning model based on Q learning; the recognition processing module is used to input the state information into the reinforcement learning model to obtain actions corresponding to the state information; wherein the actions include: adding relationship entities, adding association relationships between existing relationship entities, and not adding entities and association relationships.

8. The device according to claim 7, wherein: The word vector generation module is used to process the text to be annotated using a word vector generation model to generate the word vector; wherein the word vector generation model includes: a Word2Vec model.

9. The apparatus of claim 8, further comprising: A model training module, used for constructing the relationship graph processing model for identifying the relationship subgraph; The relationship graph processing model is trained according to the relationship subgraph sample set.

10. The device of claim 9, wherein: The relationship graph processing model includes: a graph convolutional neural network model.

11. The device according to claim 7, wherein: The Q learning network of the reinforcement learning model uses a bidirectional LSTM model.

12. The apparatus of claim 7, further comprising: The model optimization module is used to extract the target entity relationship information corresponding to the text to be annotated and the new entity relationship information, and use a preset reward and punishment function to calculate to obtain a reward and punishment processing result; wherein the reward and punishment processing result includes: adding points, subtracting points, and not changing the score; based on the reward and punishment processing result, the reinforcement learning model is optimized.

13. An entity relationship extraction device, comprising: Memory; and a processor coupled to the memory, wherein the processor is configured to execute the method according to any one of claims 1 to 6 based on instructions stored in the memory.

14. A data annotation system, comprising: An entity relationship extraction device as described in any one of claims 7 to 13. 15 . A computer-readable storage medium storing computer instructions, wherein the instructions are executed by a processor to execute the method according to claim 1 .

Citation Information

Patent Citations

  • Rolling optimization-based urban-level global traffic signal recommendation method and system

    CN110533932A

  • Drug pathogenic relationship extraction method based on domain knowledge

    CN111276258A

  • Retrosynthesis prediction using deep highway networks and multiscale reaction classification

    WO2020023650A1