A knowledge graph construction method based on Chinese electronic medical records

A knowledge graph construction framework for Chinese electronic medical records uses rule-based and deep learning methods to enhance entity and relationship extraction, improving scalability and accuracy, addressing the limitations of existing systems.

CN113688255BInactive Publication Date: 2024-12-06DALIAN UNIV OF TECH

Patent Information

Application Number
CN202111026407.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-02
Publication Date
2024-12-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing medical knowledge graphs in China lack a standard and universal construction process, often relying on small-scale medical record corpora, requiring manual participation, and are not scalable due to varying language environments and doctor idioms across different departments and diseases, limiting the effectiveness of deep learning methods.

Method used

A knowledge graph construction framework for Chinese electronic medical records involving corpus segmentation, entity and relationship annotation, and extraction using rule-based and deep learning methods, including LSTM and attention mechanisms, to handle entity types and relationships.

Benefits of technology

The framework achieves high accuracy in entity extraction (92.95%) and relationship extraction (84.05%), addressing the scalability and versatility issues of existing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113688255B_ABST
    Figure CN113688255B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of natural language processing, and provides a method for constructing a knowledge graph based on Chinese electronic medical records. Most of the knowledge graphs currently constructed contain a small number of medical record corpora, the knowledge graphs are not large in scale, and are often only applicable to a single department or disease, with poor versatility. Some relatively complete medical record knowledge graphs require a lot of manual participation, which is time-consuming and labor-intensive, and has poor scalability. Due to the different descriptions of disease categories between different departments and diseases in electronic medical records, the corresponding language environments such as a series of examinations and treatments are also different, and the doctors' idioms corresponding to different disease categories are different. These characteristics make some deep learning methods less effective, and the knowledge graph construction framework is not easy to expand. In response to the above-mentioned problems, a knowledge graph data analysis and processing method based on Chinese electronic medical records, a corpus annotation process specification, and an entity relationship extraction scheme are formulated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of natural language processing, and relates to a method for constructing a knowledge graph for Chinese electronic medical record (EMR, Electronic Medical Record) text, and specifically refers to a method for constructing a knowledge graph based on Chinese electronic medical records. Background Art

[0002] Knowledge graph was first proposed by Google in 2012 and applied to search engines (SINGHALA.Official Google Blog:Introducing the Knowledge Graph:things,not strings[R].Official Google Blog,2012). In general fields, knowledge graphs are often stored in the form of triples <entity, relationship, entity> (WEIKUM G,THEOBALD M.From information to knowledge:harvestingentities and relationships from web sources[C].Proceedings of the twenty-ninth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems,Indianapolis,2010:65-76). Entities can be any specific things in the real world, such as names of people, places, and institutions. Relationships can be attributes of entities, and can also be used to express semantic connections between entities.At present, many relatively mature knowledge graphs have been constructed in general fields, such as Freebase (BOLLACKER K, EVANS C, PARITOSH P, et al. Freebase: a collaboratively created graph database for structuring human knowledge [C]. Proceedings of the 2008 ACM SIGMOD international conference on Management of data, Vancouver, 2008: 1247-1250), Dbpedia (LEHMANN J, ISELE R, JAKOBM, et al. DBpedia-A large-scale, multilingual knowledge base extracted from Wikipedia [J]. Semantic Web, 2015, 6 (2): 167-195), and Yago (Suchanek FM, Kasneci G, Weikum G. Yago: a core of semantic knowledge [C]. Proceedings of the 16th international conference on World Wide Web, Banff, 2007: 697-706), etc., and domestic ones include Baidu's "Zhi Xin" and Sogou's "Zhi Cube". The knowledge graph in the general field pays more attention to the breadth of information. The constructed knowledge graph needs to cover enough fields. Generally, the knowledge source required for construction comes from some semi-structured data websites, such as Baidu Encyclopedia, Wikipedia, etc., or from community crowdsourcing. Compared with the general field, the knowledge graph in the vertical field pays more attention to the depth of knowledge. Its construction corpus often relies on data in certain professional fields, and often has a clear construction purpose, with strong professionalism and pertinence. At present, knowledge graphs have been applied to various fields such as agriculture, finance, and education, and the medical field is one of the most promising and widely used fields.

[0003] Experts at home and abroad have done a lot of work on the construction of knowledge graphs in the medical field. In foreign countries, the collection and construction of medical terms and resources has a long history, such as i2b2, ICD-10 and MeSH. i2b2 is a clinical medical evaluation task based on electronic medical records, which includes three subtasks: concept extraction, assertion classification and relationship classification. This task clearly defines the concepts, assertions and clinical relationship types, laying the foundation for the construction of the electronic medical record corpus annotation system. ICD-10 is an international disease classification code developed by the World Health Organization. It classifies diseases according to some attribute characteristics of the disease, making it an orderly combination and expressing it in a coded way. The system contains nearly 26,000 disease records, and the content is relatively comprehensive and accurate. MeSH is a medical subject heading list compiled by the National Library of Medicine of the United States. It contains more than 18,000 medical subject headings belonging to 15 major categories, mainly assisting PubMed indexing and retrieval of medical literature. In China, Ruan Tong (Construction and Application of Traditional Chinese Medicine Knowledge Graph [J]. Journal of Medical Informatics, 2016, 37(4):8-13) et al. analyzed and studied the automated construction scheme and standardized process of traditional Chinese medicine knowledge graph and applied it in the field of intelligent medical care. Yuan Kaiqi (Construction Technology and Research Progress of Medical Knowledge Graph [J]. Computer Application Research, 2018, 35(7):1-11) et al. explored the problems that still exist in the construction of medical knowledge graph in 2017 and introduced the current application status of medical knowledge graph. Aodema (Preliminary Study on the Construction of Chinese Medical Knowledge Graph CMeKG [J]. Journal of Chinese Information Science, 2019, 33(10):1-7) et al. formulated a structured, hierarchical and clear medical knowledge description system for the construction of modern medical Chinese knowledge graph engineering, developed a high-performance medical knowledge graph construction framework and technology, and built a knowledge graph construction platform CMeKG based on natural language processing technology, forming an engineering model for automated and standardized knowledge graph construction. In addition, there are also knowledge graphs constructed for certain special disease areas. For example, Xiu Xiaolei (Research on the Construction of Tumor Knowledge Graph Based on Chinese Electronic Medical Records [D]. Beijing: Peking Union Medical College, 2019) studied the structural and semantic characteristics of tumor diseases, proposed a complete framework for constructing tumor knowledge graphs based on Chinese electronic medical records, constructed a knowledge graph of digestive system tumors based on digestive system tumors, and used quantitative evaluation and expert evaluation to evaluate the quality of the constructed knowledge graph.

[0004] At present, the research on medical knowledge graphs in China is developing rapidly, but the existing research still does not have a standard and universal construction process, and some research still has many areas that need to be improved. Most of the knowledge graphs that have been constructed so far contain a small number of medical record corpora, the scale of the knowledge graphs is not large, and they are often only applicable to a single department or disease, with poor versatility. Some of the more complete medical record knowledge graphs require a lot of manual participation, which is time-consuming and labor-intensive, and has poor scalability. Due to the different descriptions of disease categories between different departments and diseases in electronic medical records, the corresponding language environments for a series of examinations and treatments are also different. Different doctors' idioms corresponding to different disease categories are different. These characteristics make some deep learning methods less effective and the knowledge graph construction framework difficult to expand. Summary of the invention

[0005] This paper proposes a knowledge graph construction framework based on Chinese electronic medical records. Drawing on the annotation construction experience of predecessors, a large number of electronic medical record corpora of different departments and diseases were studied, and a knowledge graph data analysis and processing method based on Chinese electronic medical records, a corpus annotation process specification, and an entity relationship extraction scheme were developed based on their characteristics.

[0006] A method for constructing a knowledge graph based on Chinese electronic medical records includes the following steps:

[0007] Step 1: Preprocessing of Chinese electronic medical record corpus

[0008] (1) Corpus segmentation: Medical records are segmented according to the labels in the electronic medical records. Each label corresponds to medical knowledge described in natural language.

[0009] (2) Label classification: Labels are manually classified and labels containing medical knowledge in the same direction are placed in one set.

[0010] (3) Tag quantity statistics and screening: Count the number of tags in all sets and sort the tag sets by the number. Then, based on the number of tag sets counted, several sets with more tags are extracted as the corpus for constructing the knowledge graph of this application.

[0011] Step 2: Formulate data annotation rules and annotation process

[0012] (1) Entity annotation specification: Entity types are divided into five categories: disease, part, symptom, examination and treatment. The five entity types are introduced in detail as follows:

[0013] Disease: refers to abnormal physical or psychological phenomena of the patient, or the diagnosis made by the doctor based on the patient's physical condition. It can be divided into two categories: infectious diseases and non-infectious diseases. Generally speaking, disease will have an adverse effect on people's normal life.

[0014] Part: refers to a part of the human body, including external and internal parts. In medical pathology, part usually appears with disease or symptoms.

[0015] Symptoms: generally refers to discomfort or abnormal sensations caused by illness or other sudden conditions, or abnormal diagnosis results given by doctors in hospitals, abnormal test results of equipment, etc.

[0016] Examination: generally refers to the examination items, physical examinations, and examination equipment performed to confirm the existence of a disease or to obtain more details about the disease.

[0017] Treatment: This refers to the treatment methods such as medication, surgery or equipment used to treat a disease or symptom.

[0018] (2) Relationship annotation specifications

[0019] According to the entity types determined above, the relationship types between entities are further divided into seven categories: the relationship between diseases, the relationship between diseases and parts, the relationship between diseases and symptoms, the relationship between treatments and diseases, the relationship between treatments and symptoms, the relationship between examinations and diseases, and the relationship between examinations and symptoms. Some of the categories have subcategories. The details are as follows:

[0020] The first category is diseases and diseases: the relationship between diseases includes related complications, diseases indicating diseases or aliases of diseases, etc. This application classifies these relationships into one category.

[0021] The second category is disease and location: the disease manifests itself in the location, generally referring to the site of onset, but also the site of metastasis, etc.

[0022] The third category is diseases and symptoms: a manifestation of the disease, generally referring to certain symptoms caused by the disease.

[0023] The fourth category, treatment and disease: The relationship between treatment and disease can be divided into the following four categories according to the results:

[0024] Treatment modifies disease: This means that the treatment is targeted at the disease and the disease gets better or is cured.

[0025] Treatment-exacerbated disease: This means that treatment for the disease caused it to get worse.

[0026] Treatment-induced illness: refers to an illness that occurs as a result of treatment.

[0027] Treatment manages the disease: Treatment is applied to the disease and no mention is made of the efficacy of the treatment.

[0028] The fifth category, treatment and symptoms: treatments for certain symptoms, this application divides the relationship into two types:

[0029] Symptomatic treatment: Treatment measures taken for certain symptoms. The treatment results are not broken down here.

[0030] Treatment-induced symptoms: symptoms caused by this treatment method.

[0031] The sixth category, examination and disease: diseases are confirmed by equipment or other examination methods, and can be divided into two categories according to whether the examination results are available:

[0032] Examination confirmed the disease: Examination confirmed the occurrence of the disease.

[0033] Examination to confirm disease: means that some kind of examination is taken to confirm the disease, and the result is unknown.

[0034] The seventh category, examinations and symptoms: examinations show symptoms, which can be normal or abnormal, or examinations confirm whether symptoms exist.

[0035] (3) Corpus Annotation Process

[0036] First, entities are extracted by rule matching, and then entity relationships are annotated for the extracted entities. The main process of entity relationship annotation is as follows:

[0037] Annotated data preparation: First, perform ① entity matching: Each medical record text will match multiple entities. The present invention pairs entities based on entity type and the distance between entities. The distance between entities here is not the character spacing, but the number of sentences between them. The present invention stipulates that if there are more than three sentences between two entities, the relationship between the entities is not considered. Then perform ② entity pair relationship screening: Use a deep learning model to predict whether there is a relationship between entity pairs. The training set comes from the pre-annotated corpus. The model uses LSTM, and the final performance on the test set. The LSTM model formula is as follows:

[0038] f t =σ(W f [h t-1 ,x t ]+b f )

[0039] i t =σ(W i [h t-1 ,x t ]+b i )

[0040] o t =σ(W o [h t-1 ,x t ]+b o )

[0041]

[0042]

[0043] h t =o t ⊙tanh(C t )

[0044] Among them, x t represents the input vector of the t-th position of the LSTM network, h t represents the output of the hidden layer at the tth position of the LSTM network, W (·) , b (·) represents the trainable weights and biases, tanh and σ are activation functions, and ⊙ represents element-by-element multiplication. This step only selects entity pairs with a high probability of existence of a relationship, and the relationship between entity pairs needs to be further determined by manual annotation.

[0045] Manual annotation process: ① Establish annotation standards and give annotation examples for annotators to understand and learn. ② After annotating 1,000 corpora, group A annotators will conduct an accuracy verification and summarize the problems encountered. ③ Answer the questions raised by group A annotators and then decide whether to continue annotating. ④ After annotating half of the corpus, group B annotators randomly select 10% of the corpus from group A's annotation results for acceptance. ⑤ Discuss the consistency of the annotations of the two groups and decide whether to return to the annotation. ⑥ After the annotation is completed, the experts randomly select 5% of the corpus for acceptance. If the acceptance is unsuccessful, it needs to be re-annotated.

[0046] Labeling acceptance: The acceptance mainly refers to the accuracy of the labelers in group B and the accuracy of the experts. When the accuracy of both acceptances reaches a certain score, the labeling is completed.

[0047] Step 3: Entity and relationship extraction based on Chinese electronic medical records

[0048] (1) Entity Extraction

[0049] The present invention uses rule matching to extract entities from Chinese electronic medical records. The specific process of extracting entities using rule matching is as follows:

[0050] ① Constructing an entity library: The entities in the entity library constructed in the present invention are derived from some public resources such as ICD-10 and the Common Medical Terms (2019) issued by the National Health Commission. The required entities are extracted according to the entity types specified in the annotation specification, and then these entities are stored in 5 corresponding entity tables.

[0051] ② Rule matching entity: Utilize the entity library to match entities in a rule-based manner. The present invention implements two matching methods: word segmentation search and string search. After comprehensive analysis of their performance, the result of the first method is selected. The implementation process of the two methods is shown below.

[0052] Word segmentation search: The first method is to segment the text first, and then determine whether each word is in the entity library. If so, determine that the word is an entity, and the entity type is the type of the corresponding entity table. Considering that some long entities may be separated during word segmentation, we not only search for the current word in the entity library in the second step, but also search for the current word and the next word, the current word and the next two words, a total of three forms of words. The result of the word segmentation search depends on the effect of the word segmentation. If the word segmentation error is large, the matching effect will be worse, and the word segmentation may split the entity and cause missing labels. For example, "subarachnoid hematoma" may be segmented into "spider web", "submembrane" and "cavity hematoma". Of course, this entity can also be recognized after a combined word search, but if it is divided more finely, it cannot be recognized.

[0053] String search: This method does not use word segmentation, but instead matches each word in the entity library in the text. If a match is found, an entity is found. There is no missing mark in string search. As long as the entity exists in the text, it can be matched. However, the entity matched by the string may not be the entity itself in the context semantics. For example, in "hospital service center", "heart" will be matched as a part entity, but in fact it is wrong.

[0054] ③ Post-processing: After the above rules are matched, most entities can be identified, but the rule matching method inevitably has two problems. One is the entity intersection problem, that is, two or more entities have part of the content overlap; the second is that the same entity has multiple entity types, that is, an entity is both a symptom type and a disease type. For the entity intersection problem, the present invention adopts a rule merging method. If two entities contain each other, the long entity is retained. If the two entities intersect, the two entities are merged. The entity type after the included entities are merged is the entity type of the long entity. For the entity type after the intersecting entities are merged, if one of them is a part entity, the type of the other entity is used as the merged entity type. If there is no part entity, the type of one of the entities is selected as the merged entity type. For the problem that the same entity has multiple entity types, the present invention adopts a method of model prediction based on contextual semantics. The training set and the test set are entities with one type and the entities in the training set and the test set do not overlap. The model uses LSTM+ATTN to make type predictions for multiple types of entities. ATTN represents the attention mechanism, and its calculation formula is as follows:

[0055] s t =F(xt ,q)

[0056]

[0057] Among them, x t represents the input vector, q represents the query vector, F(·) represents the scoring function, s t Represents the correlation score, α t Represents the normalized score value. The scoring function has the following calculation methods:

[0058] Additive Model:

[0059] s(x,q)=v t tanh(Wx+Uq)

[0060] Dot product model:

[0061] s(x,q)=x T q

[0062] Scaling the dot product model:

[0063]

[0064] Bilinear Model:

[0065] s(x,q)=x T Wlq

[0066] Among them, v, W, U, and D are all learnable parameters in the model. In specific implementation, if the predicted entity type is in the set of types that the entity originally matched, then this type is used as the entity type. If it is not in the set of types that the entity originally matched, then a random one is selected from the set of types that matched.

[0067] (2) Relationship Extraction

[0068] Entity relationship extraction is to determine whether there is a relationship between the matched entities. There are 12 types of relationships defined by the annotation specification. The present invention uses a supervised approach to build a model to extract triples. Therefore, it is necessary to first label the data. Here, manual labeling is used, and then the model is trained based on the labeled data. Finally, the trained model is used to predict the remaining unlabeled data to obtain entity relationship triplets. The entity relationship extraction method of the present invention uses an electronic medical record entity relationship extraction model based on position noise reduction and rich semantics. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 Electronic medical record knowledge graph construction framework diagram

[0070] Figure 2 Entity relationship conceptual model diagram

[0071] Figure 3 Corpus processing flow chart

[0072] Figure 4 Electronic medical record data display DETAILED DESCRIPTION

[0073] 1. Preprocessing of electronic medical record corpus

[0074] First, obtain the de-privacy electronic medical record data from the hospital, and then Figure 3 The corpus preprocessing process shown in the figure processes the data to Figure 4 Taking the displayed electronic medical record data as an example, the medical record text can be extracted: "The patient developed weakness and numbness in the limbs after fever one year before admission... He was given potassium supplementation treatment, and still had fever after leaving the hospital..."

[0075] 2. Entity rule matching

[0076] According to the constructed entity library, entity matching is performed on the medical record text. The above medical record text can be matched to the entities "fever" (disease entity), "limb fatigue" (symptom entity), "numbness" (symptom entity), "potassium supplementation" (treatment entity), etc.

[0077] 3. Entity relationship annotation

[0078] For all medical records, select a portion of the text and the corresponding entities, and then manually annotate them to mark the relationship between the entity pairs. For example, the relationship between the entity "fever" and the entity "limb fatigue" is annotated as "disease-symptom"

[0079] 4. Entity Relationship Extraction

[0080] From the previous step, the electronic medical record text and the corresponding entity relationship pairs can be obtained, which are used as training corpus to train the model to predict entity relationships. This application adopts an electronic medical record entity relationship extraction model based on position noise reduction and rich semantics.

[0081] 5. Quality Assessment

[0082] In order to evaluate the accuracy of the entities matched by this application, this application randomly selected 2000 entities from the undeduplicated matching entities for manual evaluation. The accuracy of each type of entity is shown in Table 1.

[0083] Table 1 Entity extraction quality evaluation

[0084]

[0085] As can be seen from the above table, the average accuracy of extracting entities using the rule matching method of this application reaches 92.95%.

[0086] The construction quality of the knowledge graph is the key to its effective application in downstream tasks. In order to measure the effectiveness of the relationship extraction method proposed in this application on the Chinese electronic medical record corpus, this application uses accuracy to evaluate the quality of each type of extracted relationship.

[0087] Table 2 Relationship category quality assessment

[0088]

[0089] As shown in the table above, in multi-type classification, the type accuracy is generally used to represent the prediction accuracy of each type for each class. From the results in the table, it can be seen that the type accuracy of each major class has achieved good results. Among them, the "disease-site" type relationship has the best result. This is because in the medical record text, the regularity of the "disease-site" relationship is more obvious when it appears. For example, "The main way of anal canal cancer spread is to directly invade the surrounding soft tissue and metastasize along the lymphatic vessels." This sentence structure is simple, the features are easy to be learned by the model, and this type of relationship often appears in a sentence and rarely appears in the context of cross-sentences, so the model can predict its results very well. The "treatment-symptom" type relationship has the worst result. The reason is that the span between the two entities of this type is generally large, the proportion of this type of relationship between sentences and within sentences is similar, and the places where this type of relationship appears in the medical record text often contain a lot of other types of medical knowledge, and the text context is relatively complex, so the prediction result is poor.

[0090] In addition to calculating the accuracy of each major category relationship, the results of the minor category relationship are also very important. Each minor category is a finer division based on the major category, and the classification direction is more accurate, but at the same time its classification accuracy will inevitably decline. The accuracy of each minor category relationship is shown in Table 3.

[0091] Table 3 Small category relationship quality evaluation

[0092]

[0093] As can be seen from the results in the table, the classification results of sub-classification relationships are much lower than those of the general relationship categories. Among them, the sub-classification relationship results in the "treatment-disease" type are the worst. On the one hand, the reason is that there are many sub-types of "treatment-disease" relationships, and the relationship discrimination conditions between each type are complex. For example, the semantics of the two relationships "treatment improves disease" and "treatment manages disease" are relatively close, which will increase the difficulty of model discrimination. On the other hand, the overall accuracy of the "treatment-disease" relationship category is not high, and the accuracy of its sub-classification relationships will naturally decrease. In the "examination-disease" and "treatment-symptom" relationship categories, the accuracy of each sub-classification has decreased, among which the accuracy of the "examination to confirm the disease" and "treatment causes symptoms" relationships has decreased the most. One possible reason is that compared with other relationship categories, the number of samples of the two sub-class relationships is small, and the frequency of their learning by the model during training is low. It is difficult for the model to learn the features to judge this type of category relationship, so the results are poor.

[0094] In summary, this application defines 7 major relationship categories, including 12 relationship categories, and the overall relationship accuracy rate reaches 84.05%, which verifies the effectiveness of the method of this application.

Claims

1. A knowledge graph construction method based on Chinese electronic medical records, characterized in that The steps include: Step 1: Preprocessing of Chinese electronic medical record corpus (1) Corpus segmentation: Medical records are segmented according to the labels in the electronic medical records. Each label corresponds to medical knowledge described in natural language. (2) Label classification: Labels are manually classified and labels containing medical knowledge in the same direction are placed in one set; (3) Tag quantity statistics and screening: Count the number of tags in all sets and sort the tag sets by quantity; then, based on the number of tag sets counted, extract several sets with more tags as the corpus for knowledge graph construction; Step 2: Formulate data annotation rules and annotation process (1) Entity annotation specification: Entity types are divided into five categories: disease, part, symptom, examination and treatment. The five entity types are described in detail as follows: Disease: refers to abnormal physical or psychological phenomena of patients, or the diagnosis made by doctors based on the patient's physical condition. It is divided into two categories: infectious diseases and non-infectious diseases; Part: refers to a part of the human body, including external and internal parts; Symptoms: generally refers to discomfort or abnormal sensations caused by illness or other sudden conditions, or abnormal diagnosis results given by doctors or abnormal test results of equipment in hospitals; Examination: generally refers to the examination items, physical examinations, and examination equipment used to confirm the existence of a disease or to learn more details about the disease; Treatment: generally refers to the medication, surgery or equipment used to treat a disease or symptom; (2) Relationship annotation specifications According to the entity types determined above, the relationship types between entities are further divided into seven categories: the relationship between diseases, the relationship between diseases and parts, the relationship between diseases and symptoms, the relationship between treatments and diseases, the relationship between treatments and symptoms, the relationship between examinations and diseases, and the relationship between examinations and symptoms. Some of the categories have subcategories, as follows: The first category is disease-disease relationships: diseases and diseases have related complications, diseases indicating diseases or aliases of diseases, and these relationships are unified into one category; The second category, disease and site: the disease manifests itself in the site, including the site of onset and the site of metastasis; The third category, diseases and symptoms: a manifestation of the disease, refers to a symptom caused by the disease; The fourth category, treatment and disease: The relationship between treatment and disease, is divided into the following four categories according to the results: Treatment-modifying disease: This means that the treatment is targeted at the disease and the disease improves or is cured; Treatment-exacerbated disease: This means that treatment for the disease causes the condition to worsen; Treatment-induced illness: refers to an illness that occurs as a result of treatment; Treatment management disease: treatment is applied to the disease, with no mention of the efficacy of the treatment; The fifth category, treatment and symptoms: The treatment taken for certain symptoms, the relationship between them is divided into two types: Symptomatic treatment: treatment measures taken for certain symptoms, the treatment results are not subdivided here; Treatment-induced symptoms: symptoms caused by this treatment method; The sixth category, examination and disease: diseases are confirmed by equipment or other examination methods, and can be divided into two categories according to whether the examination results are available: Examination confirmed the disease: Examination confirmed the occurrence of the disease; Examination to confirm the disease: It means that some examination method is taken to confirm the disease, and the result is unknown; The seventh category, examination and symptoms: examinations show symptoms, whether they are normal or abnormal, or examinations confirm whether symptoms exist; (3) Corpus Annotation Process First, entities are extracted by rule matching, and then entity relationships are annotated for the extracted entities. The main process of entity relationship annotation is as follows: Annotated data preparation: First, perform ① entity matching: each medical record text will match multiple entities, and the entities are paired according to the entity type and the distance between entities; the distance between entities here is not the character interval, but the number of sentences between them. If there are more than three sentences between two entities, the relationship between the entities is not considered; then perform ② entity pair relationship screening: use a deep learning model to predict whether there is a relationship between entity pairs. The training set comes from the pre-annotated corpus, and the model uses LSTM; the LSTM model formula is as follows: f t =σ(W f [h t-1 ,x t ]+b f ) i t =σ(W i [h t-1 ,x t ]+b i ) the t =σ(W o [h t-1 ,x t ]+b o ) h t =o t ⊙tanh(C t ) Among them, x t represents the input vector of the t-th position of the LSTM network, h t represents the output of the hidden layer at the tth position of the LSTM network, W (·) , b (·) represents trainable weights and biases, tanh and σ are activation functions, and ⊙ represents element-by-element multiplication. This step only selects entity pairs with a high probability of existence of a relationship, and the relationship between entity pairs needs to be further determined by manual annotation. Manual annotation process: ① Formulate annotation standards and give annotation examples for annotators to understand and learn; ② After annotating 1,000 corpora, group A annotators will conduct an accuracy verification and summarize the problems encountered; ③ Answer the questions raised by group A annotators and then decide whether to continue annotating; ④ After annotating half of the corpus, group B annotators will randomly select 10% of the corpus from group A's annotation results for acceptance; ⑤ Discuss the consistency of the annotations of the two groups and decide whether to return to the mark; ⑥ After the annotation is completed, the experts will randomly select 5% of the corpus for acceptance. If the acceptance is unsuccessful, it needs to be re-annotated; Labeling acceptance: Acceptance mainly refers to the accuracy of the acceptance of the labelers in group B and the accuracy of the acceptance of the experts; when the accuracy of both acceptances reaches a certain score, the labeling is completed; Step 3: Entity and relationship extraction based on Chinese electronic medical records (1) Entity Extraction Entities are extracted from Chinese electronic medical records using rule matching. The specific process of extracting entities using rule matching is as follows: ① Build an entity library: The entities for building the entity library are derived from ICD-10 and the commonly used medical terms released by the National Health Commission in 2019; extract the required entities according to the entity types specified in the annotation specifications, and then store these entities in 5 corresponding entity tables; ② Rule matching entity: Use the entity library to match entities in a rule-based manner, using the matching method of word segmentation search. The implementation process is as follows; Word segmentation search: The first method is to first segment the text, and then determine whether each word is in the entity library. If so, the word is determined to be an entity, and the entity type is the type of the corresponding entity table. In the second step, not only the current word is searched in the entity library, but also the current word and the next word, and the current word and the next two words, for a total of three forms of words. ③ Post-processing: After matching the above rules, most entities can be identified, but there are two inevitable problems in the rule matching method; one is the entity intersection problem, that is, two or more entities have part of the content overlap; the second is that the same entity has multiple entity types, that is, an entity is both a symptom type and a disease type; for the entity intersection problem, the rule merging method is adopted. If two entities contain each other, the long entity is retained. If the two entities intersect, the two entities are merged; the entity type of the included entities after merging is the entity type of the long entity. For the entity type after merging the intersecting entities, if one of them is a part entity, the type of the other entity is used as the merged entity type. If there is no part entity, the type of one of the entities is selected as the merged entity type; for the problem that the same entity has multiple entity types, the method of model prediction based on contextual semantics is adopted; the training set and the test set are entities with one type and the entities in the training set and the test set do not overlap. The model uses LSTM+ATTN to make type predictions for multi-type entities; ATTN represents the attention mechanism, and its calculation formula is as follows: s t =F(x t ,q) Among them, x t represents the input vector, q represents the query vector, F(·) represents the scoring function, s t Represents the correlation score, α t Represents the normalized score value; the scoring function has the following calculation methods: Additive Model: s(x,q)=v t tanh(Wx+Uq) Dot product model: s(x,q)=x T q Scaling the dot product model: Bilinear Model: s(x,q)=x T Wq Among them, v, W, U, and D are all learnable parameters in the model. In specific implementation, if the predicted entity type is in the set of types that the entity originally matches, then this type is used as the entity type. If it is not in the set of types that the entity originally matches, then a random one is selected from the set of types that are matched. (2) Relationship Extraction Entity relationship extraction is to determine whether there is a relationship between the matched entities. There are 12 types of relationships defined by the annotation specification. A supervised approach is used to build a model to extract triples. Therefore, the data needs to be labeled first. Manual labeling is used here, and then the model is trained based on the labeled data. Finally, the trained model is used to predict the remaining unlabeled data to obtain entity relationship triplets. The entity relationship extraction method uses an electronic medical record entity relationship extraction model based on position denoising and rich semantics.

Citation Information

Patent Citations

  • Deep-learning-based entity relationship extraction method and device and server

    CN107798136A

  • Clinical-knowledge-graph construction method based on electronic medical records

    CN108427735A

Cited By

  • Patient relation association and information matching method and device based on knowledge graph

    CN120067157A

  • Patient relationship association and information matching method and device based on knowledge graph

    CN120067157B

  • High-name-duplication user identification and retrieval method and device based on multi-feature fusion, medium and program product

    CN121958354A