Method for constructing knowledge graph based on relation triple joint extraction of physical examination report

By adopting a joint extraction method of relationship triple-tubes in health examination reports, using ERNIE and an improved dual affine self-attention mechanism, combined with a multi-head self-attention decoder, the problems of lengthy health examination reports and insufficient information interaction are solved, and the problems of improved The quality of the knowledge graph and the efficiency of doctor-patient communication are achieved, and more accurate diagnosis and treatment decisions are achieved.

CN119047557APending Publication Date: 2024-11-29KUNMING UNIV OF SCI & TECH +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411196675.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

In medical practice, the health examination reports are lengthy and difficult to read, doctor-patient communication is insufficient, and the traditional relationship triple extraction method has problems such as error transmission, lack of information interaction and relationship redundancy, which affects the quality and availability of the knowledge graph.

Method used

Using a joint extraction method of relationship triple based on health examination reports, the Chinese pre-trained model ERNIE and the improved dual affine self-attention mechanism are used, combined with a multi-head self-attention decoder, end-to-end entity and relationship extraction are performed to improve information Interaction and global correlation to build a high-quality knowledge graph.

Benefits of technology

It has improved the accuracy of medical text entity identification and relationship extraction, built a more accurate and comprehensive knowledge map of health examination reports, improved the efficiency of diagnosis and treatment decisions, and achieved better health management and disease prevention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119047557A_ABST
    Figure CN119047557A_ABST
Patent Text Reader

Abstract

The invention relates to a method for constructing a knowledge graph based on relation triple joint extraction of a physical examination report, and belongs to the field of natural language processing. According to the method, by referring to I2B2 2010 evaluation data and domestic and overseas medical field tagging corpus entities and relation classification, a physical examination report entity and relation tagging system is formulated and used for tagging disease examination related information in a clinical physical examination report; secondly, integrating a self-attention mechanism into double affine on the joint extraction model to promote information interaction between entity pairs in the text data of the health examination report; and finally, mining global feature information of entities and relationships in a health examination report data set through the constructed multi-head self-attention decoder, generating a relationship table, and successfully extracting a relationship triple in a health examination report text. Through the process, the purpose of extracting the disease related information from the clinical health examination report so as to construct the knowledge graph is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for jointly extracting relation triplets based on health examination reports for constructing a knowledge graph, and belongs to the field of natural language processing. Background Art

[0002] Knowledge graph is a structured knowledge representation method that encodes real-world entities and their relationships in a graphical form. In medicine, knowledge graphs can be used to integrate and analyze medical data to help doctors make more accurate diagnoses and treatment decisions.

[0003] Health checkup reports are important health records for patients, which help to assess their health status, prevent diseases, monitor disease progression, and develop personalized treatment plans. However, in current medical practice, the examination reports are lengthy and difficult to read, and communication between doctors and patients is difficult and insufficient. By building a knowledge graph and associating the data in the health checkup report with medical knowledge, doctors can obtain key information more quickly and make more accurate diagnosis and treatment decisions. At the same time, the knowledge graph can also help patients better understand their health status and promote their health management and disease prevention.

[0004] Relation triple extraction is an upstream task for building a knowledge graph, which stores factual knowledge in the form of (subject, relation, object), where both subject and object are entities, and they are semantically connected through relations. These triples are the basis for building a knowledge graph and can provide rich semantic information for subsequent applications of the knowledge graph. Therefore, the accuracy and efficiency of relation triple extraction directly affect the quality and usability of the final knowledge graph.

[0005] Deep learning is used to learn the relationships between medical entities in health examination reports, reducing the reliance on manual feature engineering and solving the problems existing in traditional health examination report information extraction methods. Early relation triple extraction methods usually use a pipeline-based extraction framework, first identifying all entities in the input text and then predicting relationships for all entity pairs. However, the pipeline approach has the following disadvantages: (1) Error propagation. Errors in named entity model recognition will be propagated to the relation extraction model, affecting the final extraction effect. (2) Lack of information interaction. The named entity recognition model and the relation extraction model are two models. The two models are trained and predicted separately, resulting in a lack of information interaction between entities and relations. (3) Relation redundancy. The relation extraction model pairs multiple entities, resulting in many redundant relation pairs.

[0006] The joint extraction method extracts entities and relations simultaneously in an end-to-end manner, which alleviates the three shortcomings of the pipeline model to a certain extent. However, problems such as information interaction between entity models and relationship models and insufficient entity feature extraction limit the performance of the joint model. Summary of the invention

[0007] In view of the above-mentioned defects or deficiencies in the prior art, the present invention provides a method for jointly extracting relation triplets based on health examination reports for constructing a knowledge graph, which improves the effects of medical text entity recognition and relationship extraction, thereby constructing a high-quality knowledge graph.

[0008] The technical solution of the present invention is: a method for jointly extracting relation triplets based on health examination reports for constructing a knowledge graph, the method comprising the following steps:

[0009] Step 1. First, referring to the I2B2 2010 evaluation data and the entity and relationship classification of the existing medical field annotated corpus at home and abroad, a health examination report entity and relationship annotation system was developed, and the health examination report text data was obtained. After cleaning the data, the entities and relationships were annotated;

[0010] Step 2: Obtain the labeled data set, preprocess the data set, obtain the entity position and entity type in each sentence, and the relationship type between entities, which are used to train the entity relationship joint extraction model;

[0011] Step 3. Use the Chinese pre-trained model ERNIE to convert the input health checkup report text into the corresponding word vector for the health checkup report text of the input joint extraction model; use the bidirectional GRU context feature extraction layer to obtain contextual semantic information; use the improved dual affine self-attention to strengthen the information interaction between entity pairs in the health checkup report text data; use the constructed multi-head self-attention decoder to mine the global association between entities and relations and generate a relationship table; by constructing a global relationship table, entity recognition and relationship extraction are completed simultaneously, and finally the model is trained.

[0012] Step 4: Use the trained joint extraction model to obtain relation triplets from unlabeled text to build a knowledge graph.

[0013] Furthermore, in the Step 1, entity types and relationship types are defined; entity types are defined to label entity types; relationship types are defined to label relationship types; data cleaning is to map and clean heterogeneous outliers, format anomalies and dirtiness.

[0014] Furthermore, the Step 2 includes: preprocessing the labeled data to obtain the location and type of entities in each sentence and the type of relationship between them, so as to obtain data that can be trained on the model.

[0015] Furthermore, the specific steps of Step 3 are as follows:

[0016] Step 3.1. Use the Chinese pre-trained model ERNIE to convert the input health checkup report text into the corresponding word vector for the health checkup report text input into the joint extraction model;

[0017] Step 3.2. Use BiGRU to obtain the context information of the word vector. The word vector containing the context information is concatenated by the forward and backward word vectors.

[0018] Step 3.3. Use the improved dual affine self-attention to strengthen the information interaction between entity pairs in the text data of the health examination report. Add the self-attention mechanism before the dual affine transformation, input the input representation H into the self-attention mechanism to obtain the feature sequence, and then use two linear layers to calculate the start position and the end position respectively. and Finally, the correlation between the start and end positions is captured by biaffine, and the interaction vector representation between each word pair is calculated. The formula is as follows:

[0019] Q=HW Q , K = HW K , V = HW V

[0020]

[0021] In the formula, and Represents the concatenation of the context C, K and V, d k represents the dimension of the key vector, U 1 represents the weight parameter matrix, and b represents the bias value.

[0022] Step 3.4. Use the constructed multi-head self-attention decoder to mine the global associations of entities and relationships and generate a relationship table. Two independent multi-head self-attention mechanisms (Multi-Head Self-Attention) are integrated inside the decoder layer, which are used for self-attention (Self-Attention) and cross-attention (Cross-Attention). This structure allows the decoder to not only consider its own information (Self-Attention) when generating output, but also combine the hidden state of the encoder (Cross-Attention), effectively improving the model's performance in processing long-distance dependencies and capturing global information. The specific calculation method is as follows:

[0023] SelfAtt=MultiHeadSelfAtt(Hs )

[0024] CrossAtt=MultiHeadSelfAtt(SelfAtt,E m ,E s )

[0025] In the formula, H s represents the hidden state, E m represents the encoder attention mask, E s represents the hidden state of the encoder.

[0026] The beneficial effects of the present invention are:

[0027] 1. The present invention refers to the I2B2 2010 evaluation data and the existing medical field annotated corpus entity and relationship classification at home and abroad, and develops a health examination report entity and relationship annotation system for annotating disease-related information in clinical health examination reports;

[0028] 2. The present invention improves the effects of entity recognition and relationship extraction in medical texts, can extract relationship triplets from health examination reports, and constructs a more accurate and comprehensive knowledge graph of health examination reports. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 Manually mark the interface for the present invention;

[0030] Figure 2 Preprocessing the data set of the present invention;

[0031] Figure 3 The improved dual affine self-attention model of the present invention;

[0032] Figure 4 A multi-head self-attention decoder built for the present invention;

[0033] Figure 5 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0034] Example 1: Figure 1-Figure 5 As shown, a method for jointly extracting relation triplets based on health examination reports for constructing a knowledge graph includes the following:

[0035] Step 1. First, refer to the I2B2 2010 evaluation data and the existing medical field annotated corpus entity and relationship classification at home and abroad, develop a health checkup report entity and relationship annotation system, obtain health checkup report text data from the hospital, and annotate the entities and relationships after data cleaning. Use the Doccano platform to select different health checkup report texts for entity and relationship annotation, where different categories of entities are represented by different color blocks, and the relationship between two entities is displayed between them. Figure 1 The manual annotation interface of the present invention is shown, which defines entity types for annotating entity types; defines relationship types for annotating relationship types; data cleaning is to map and clean heterogeneous outliers, format anomalies and dirtiness;

[0036] The defined entity types are shown in Table 1:

[0037] Table 1 shows the entity types

[0038]

[0039]

[0040] Define the relationship type, as shown in Table 2:

[0041] Table 2 shows the relationship types.

[0042] Relationship Name illustrate Clinical manifestations Describe the signs and symptoms of the disease Causes Various causes of disease Testing Test items for auxiliary diagnosis Consultation Department The hospital department that the patient should visit Risk factors Factors that increase or worsen an individual's risk of developing a disease complication Other diseases or symptoms that may occur during the course of the disease Age of onset Age groups susceptible to disease Adjunctive therapy Treatments other than medication Drug treatment How drugs are used to treat diseases Pathophysiology Biological mechanisms of disease development Related(Conversion) Situations in which one disease may transform into another Related (cause) One disease may lead to another Synonyms Different medical terms or common names should Symptoms and things to watch out for avoid Things to note about diseases

[0043] Step 2. Secondly, obtain the labeled data set, preprocess the data set, obtain the entity position and type in each sentence and the type of relationship between them, so as to obtain data that can be trained by the model for training the deep learning joint extraction model.

[0044] Furthermore, the Step 2 also includes the following:

[0045] After the annotation is completed, the annotated entity relationship information will be in the .jsonl file, such as Figure 2 As shown. The entity uses start_offset and end_offset to represent the entity start and end character id, label represents the entity type, and type represents the relationship type. After the data is labeled, it is processed into the entity relationship triple form (subject, relationship, object) that can be input into the model, and the processed .json file is output.

[0046] Step 3. Use the Chinese pre-trained model ERNIE to convert the input health checkup report text into the corresponding word vector for the health checkup report text of the joint extraction model; use the bidirectional GRU context feature extraction layer to obtain contextual semantic information; use the improved dual affine self-attention to strengthen the information interaction between entity pairs in the health checkup report text data; use the constructed multi-head self-attention decoder to mine the global association between entities and relations and generate a relationship table; by constructing a global relationship table, entity recognition and relationship extraction are completed simultaneously, and finally the model is trained;

[0047] Furthermore, in Step 3, the specific steps are as follows:

[0048] Step 3.1. Use the Chinese pre-trained model ERNIE to convert the input health checkup report text into the corresponding word vector for the health checkup report text input into the joint extraction model;

[0049] Step 3.2. Use BiGRU to obtain the context information of the word vector. The word vector containing the context information is concatenated by the forward and backward word vectors.

[0050] Step 3.3. Use the improved dual affine self-attention to strengthen the information interaction between entity pairs in the text data of the health examination report. Add the self-attention mechanism before the dual affine transformation, input the input representation H into the self-attention mechanism to obtain the feature sequence, and then use two linear layers to calculate the start position and the end position respectively. and Finally, the correlation between the start and end positions is captured by biaffine, and the interaction vector representation between each word pair is calculated. The formula is as follows:

[0051] Q=HW Q , K = HW K , V = HW V

[0052]

[0053] In the formula, and Represents the concatenation of the context C, K and V, d k represents the dimension of the key vector, U 1 represents the weight parameter matrix, and b represents the bias value.

[0054] Step 3.4. Use the constructed multi-head self-attention decoder to mine the global associations of entities and relationships and generate a relationship table. Two independent multi-head self-attention mechanisms (Multi-Head Self-Attention) are integrated inside the decoder layer, which are used for self-attention (Self-Attention) and cross-attention (Cross-Attention). This structure allows the decoder to not only consider its own information (Self-Attention) when generating output, but also combine the hidden state of the encoder (Cross-Attention), effectively improving the model's performance in processing long-distance dependencies and capturing global information. The specific calculation method is as follows:

[0055] SelfAtt=MultiHeadSelfAtt(H s )

[0056] CrossAtt=MultiHeadSelfAtt(SelfAtt,E m ,E s )

[0057] In the formula, H s represents the hidden state, E m represents the encoder attention mask, E s represents the hidden state of the encoder.

[0058] Step 4: Use the trained joint extraction model to obtain relation triplets from unlabeled text to build a knowledge graph.

[0059] In order to illustrate the effect of the present invention, after obtaining the entity relationship triples and calculating the model extraction effect, the model evaluation indicators use accuracy (Precision, P), recall (Recall, R) and F1 value.

[0060] The expressions of precision (P), recall (R) and F1 value are as follows:

[0061]

[0062] Among them: TP (True Positive) means predicting the positive class as positive, FP (False Positive) means predicting the negative class as positive, FN (False Negative) means predicting the negative class as negative, (TP+FP) means the ratio of the correct number of results predicted as positive. (TP+FN) means the ratio of samples that are actually positive that are correctly judged as positive.

[0063] Precision: It indicates the ratio of samples correctly predicted as positive to all samples predicted as positive.

[0064] Recall: It indicates the ratio of samples correctly predicted as positive to samples actually positive.

[0065] F1: represents a balance indicator between precision and recall.

[0066] Table 3 Model results

[0067] Precision Recall F1 relation 0.889 0.882 0.886

[0068] It can be seen from Table 3 that the F1 value of the present invention in extracting relation triplets reaches 88.6%, which has certain clinical significance.

[0069] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

Claims

1. A method for jointly extracting relation triplets based on health examination reports for constructing a knowledge graph, characterized in that: The method comprises the following: Step 1: Develop a health examination report entity and relationship annotation system, obtain the health examination report text data, and annotate the entities and relationships after cleaning the data; Step 2: Obtain the labeled data set, preprocess the data set, obtain the entity position and entity type in each sentence, and the relationship type between entities, which are used to train the entity relationship joint extraction model; Step 3. Use the Chinese pre-trained model ERNIE to convert the input health checkup report text into the corresponding word vector for the health checkup report text of the joint extraction model; use the bidirectional GRU context feature extraction layer to obtain contextual semantic information; use the improved dual affine self-attention to strengthen the information interaction between entity pairs in the health checkup report text data; use the constructed multi-head self-attention decoder to mine the global association between entities and relations and generate a relationship table; by constructing a global relationship table, entity recognition and relationship extraction are completed simultaneously, and finally the model is trained; Step 4: Use the trained joint extraction model to obtain relation triplets from unlabeled text to build a knowledge graph.

2. According to claim 1, a method for jointly extracting relation triplets based on health examination reports for constructing a knowledge graph is characterized by: In the Step 1, entity types and relationship types are defined; entity types are defined to label entity types; relationship types are defined to label relationship types; data cleaning is to map and clean heterogeneous outliers, format anomalies and dirtiness.

3. According to claim 1, a method for jointly extracting relation triplets based on health examination reports for constructing a knowledge graph is characterized by: The Step 2 includes: preprocessing the labeled data to obtain the entity positions and types in each sentence and the types of relationships between them, so as to obtain data that can be trained on the entity relationship joint extraction model.

4. According to claim 1, a method for jointly extracting relation triplets based on health examination reports for constructing a knowledge graph is characterized by: The specific steps of Step 3 are as follows: Step 3.

1. Use the Chinese pre-trained model ERNIE to convert the input health checkup report text into the corresponding word vector for the health checkup report text input into the joint extraction model; Step 3.

2. Use BiGRU to obtain the context information of the word vector. The word vector containing the context information is concatenated by the forward and backward word vectors. Step 3.

3. Use the improved dual affine self-attention to strengthen the information interaction between entity pairs in the health examination report text data; add the self-attention mechanism before the dual affine transformation, input the input representation H into the self-attention mechanism to obtain the feature sequence, and then use two linear layers to calculate the start position and the end position respectively. and Finally, the correlation between the start and end positions is captured by biaffine, and the interaction vector representation between each word pair is calculated, as shown in the following formula: Q=HW Q ,K=HW K ,V=HW V In the formula, and Represents the concatenation of the context C, K and V, d k represents the dimension of the key vector, U1 represents the weight parameter matrix, and b represents the bias value; Step 3.

4. Use the constructed multi-head self-attention decoder to mine the global associations between entities and relationships and generate a relationship table; two independent multi-head self-attention mechanisms are integrated inside the decoder layer, which are used for self-attention and cross-attention respectively. This structure allows the decoder to not only consider its own information when generating output, but also combine the hidden state of the encoder, effectively improving the performance of the model in processing long-distance dependencies and capturing global information; the specific calculation method is as follows: SelfAtt=MultiHeadSelfAtt(H s ) CrossAtt=MultiHeadSelfAtt(SelfAtt,E m ,E s ) In the formula, H s represents the hidden state, E m, represents the encoder attention mask, E s represents the hidden state of the encoder.

Citation Information

Patent Citations

  • X-ray chest radiography diagnosis report generation method based on multi-task multi-mode deep learning

    CN115223678A

  • Method for performing multi-level feature fusion extraction by adopting multi-head attention

    CN117312487A

  • Table entity relationship judgment method and system based on multiple information

    CN117390120A

  • Method for extracting venous thromboembolism related information from electronic medical record to construct knowledge graph

    CN117766086A

  • Method, apparatus, device and medium for generating captioning information of multimedia data

    US20220014807A1