A question-answering method for cardiovascular and cerebrovascular disease knowledge graph based on electronic medical records

By building a knowledge graph question and answer system in the field of cardiovascular and cerebrovascular, using electronic medical record data and knowledge base, the problems of inaccurate user description and insufficient data are solved, and fast and effective question and answer services are realized, which improves diagnosis and treatment efficiency and protects patient privacy. .

CN112002411BActive Publication Date: 2024-12-13HANGZHOU DIANZI UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010842689.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-20
Publication Date
2024-12-13
Estimated Expiration
2040-08-20

AI Technical Summary

Technical Problem

The existing cardiovascular expert decision-making system is difficult to accurately reason about complications when user descriptions are inaccurate and insufficient examination data are insufficient, and the link between the expert system and the hospital medical record system is too complex, resulting in inefficient diagnosis and treatment.

Method used

Using the knowledge graph question and answer method based on electronic medical records, we build a professional knowledge graph in the field of cardiovascular and cerebrovascular through crawlers and knowledge base data, use the graph entity relationship to analyze the question, and generate Cypher query statements to return answers, including entity recognition, relationship extraction and Q&A Construction of service model.

Benefits of technology

By reducing the cost of expert labeling data, quickly and effectively responding to user inquiries, the awareness rate and diagnosis and treatment efficiency of cardiovascular and cerebrovascular diseases are improved, noise is reduced and patient privacy is protected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112002411B_ABST
    Figure CN112002411B_ABST
Patent Text Reader

Abstract

The present invention discloses a cardiovascular knowledge graph question-answering method based on electronic medical records. The method of the present invention includes three parts: 1. constructing a crawler to extract encyclopedia and cardiovascular medical knowledge, integrating medical record data to construct a cardiovascular field dictionary and electronic medical record desensitization processing; 2. constructing a knowledge graph based on electronic medical records, including using language models, bidirectional long short-term memory networks, conditional random fields and convolutional neural networks to realize entity relationship extraction, and using word2vec to filter entity relationships and store them in neo4j; 3. constructing a traditional rule-based question-answering method, using medical feature word sets and field dictionaries to construct ACTree and question templates for question parsing and intent recognition, generating Cypher query statements and returning answers. Based on electronic medical records and online knowledge bases, the present invention realizes the construction of cardiovascular knowledge graphs and user complaint questions and answers based on knowledge graphs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning and question-answering systems, and in particular to a question-answering method for cardiovascular and cerebrovascular disease knowledge graph based on electronic medical records. Background Art

[0002] Cardiovascular and cerebrovascular diseases are common diseases that pose a serious threat to human health, especially to the health of middle-aged and elderly people over 50 years old. Even with the most advanced and complete treatment methods currently available, more than 50% of cerebrovascular accident survivors are still unable to take care of themselves completely. Nearly 3 million people die from cardiovascular and cerebrovascular diseases in my country each year, accounting for 51% of the total causes of death in my country each year. Therefore, an online question-and-answer method and system in the field of cardiovascular and cerebrovascular diseases is very necessary, which can expand the professional knowledge of physicians and also increase the awareness of cardiovascular and cerebrovascular diseases among users.

[0003] There are two existing expert decision-making systems for cardiovascular disease. One is to diagnose and treat by setting cardiovascular indicators combined with electronic medical records, and the other is to assist doctors in modeling patients and assessing cardiovascular disease risks based on machine learning, and to provide similar cases. However, the main common problems include inaccurate user descriptions leading to complications pointing to multiple diseases, insufficient examination data that cannot be accurately inferred, and the direct connection between the expert system and the hospital medical record system being too complicated. Summary of the invention

[0004] In order to solve the above problems, the present invention proposes a cardiovascular disease knowledge graph question-answering method and system based on electronic medical records, constructs a cardiovascular professional field knowledge graph for heterogeneous electronic medical record data, and uses the entity relationship of the graph to parse the question, constructs Cypher query statements, and returns the answer.

[0005] The present invention adopts the following technical solution:

[0006] The cardiovascular and cerebrovascular disease knowledge graph question-answering method based on electronic medical records includes the following steps:

[0007] Step 1. Build a dictionary in the field of cardiovascular and cerebrovascular diseases based on crawlers, knowledge bases, and medical records;

[0008] A crawler program was used to collect disease-related data from encyclopedias and medical and health websites, and the crawler entity dataset D1 with entity labels was obtained. The online open source knowledge base was further extracted to obtain the online entity dataset D2 with entity labels. Electronic medical record clinical data is usually saved in Word or Excel format. Physical examination and hospitalization examination pages and other examination worksheets were extracted as medical record entity dataset D3. The above three datasets were fused and manually corrected to obtain the cardiovascular and cerebrovascular entity dataset R1, which includes 7 types of entities: disease, symptoms, drugs, examinations, parts, surgeries, and departments, and 4 types of entity attributes: overview, cause, diagnosis, and treatment.

[0009] Step 2. Build an electronic medical record text training dataset;

[0010] The effective main content of the extracted electronic medical record clinical data includes three parts: admission record, medical record and discharge record. The remaining components of the electronic medical record clinical data are further screened through regular expressions and worksheets to obtain the medical record training set T1. The patient's name, address, medical record number, hospital and other health privacy data in the medical record training set T1 are further desensitized to obtain the medical record training set T2. The negative modification and keyword modification of the symptoms in the medical record training set T2 are further screened in combination with manual rules to obtain the training text set T3.

[0011] Step 3. Build a named entity recognition model based on electronic medical records;

[0012] Use the entity dataset R1 obtained in step 1 as the user segmentation dictionary of the jieba segmentation tool to extract the entity annotation training set for the training text set T3 in step 2, separate the entity corpus by sentence, and use BIO annotation to perform word-based annotation on the sentences.

[0013] According to the characteristics of long texts in electronic medical records, Longformer is used in long text scenarios instead of Google Bert tool for word-based vectorization. The word embedding vector of each word constitutes a sentence representation matrix. The sentence representation matrix is ​​sequence labeled using a bidirectional long short-term memory model and conditional random field. The word labeling results and their corresponding labels are output, and the sequence labeling model M1 based on deep learning is obtained through training.

[0014] The specific steps are: the bidirectional long short-term memory network outputs the label score of each word, the conditional random field obtains the label transfer probability matrix that needs to be learned, and the sequence label is predicted by the model to obtain the predicted score of a certain label path; the label path score is normalized by the Softmax function to obtain the probability value of predicting the label path; based on the maximum likelihood estimation method, the label path probability is maximized; according to the Viterbi algorithm, the path with the highest probability value is selected from all paths as the optimal path output.

[0015] Step 4. Construct an entity relationship extraction model based on entity corpus;

[0016] According to step 3, the sequence annotation model M1 outputs the entity label prediction data set MT1, and the entity annotation is further manually corrected. At the same time, 7 types of relationships with disease entities as starting nodes are defined according to the entity category, corresponding to: disease-symptoms, disease-drug, disease-examination, disease-disease, disease-department, disease-surgery and disease-site.

[0017] The association threshold M and the association window size S are set. Entity pairs that are smaller than the threshold M and within S are considered to exist if they are included in the seven types of relationships. The entity label prediction data set MT1 is annotated to obtain the entity relationship training set MT2. The sentence text, entity category, entity position index and entity pair window size are extracted for vectorized input into the convolutional neural network model for binary classification. The entity relationship extraction model M2 is obtained through training.

[0018] The entity relationship extraction model M2 predicts and generates the entity relationship result set MT3, which is aligned with the 7 types of entities and 4 types of entity attributes contained in the cardiovascular disease field dictionary obtained in step 1. The Word2Vec model based on the field dictionary is trained for the remaining entity relationships in the result set, and the word vectors are directly calculated to calculate the cosine similarity. The part greater than the set threshold is retained, and the entity pair numbers of the entity relationship result set MT3 are replaced with the corresponding entity labels to form a data format of (entity 1, entity 2); the entity 1_entity 2 format is taken as the relationship edge, and the corresponding entity label is imported into the graph database Neo4j as the entity node;

[0019] Step 5. Build a traditional rule-based question-answering service model;

[0020] According to the 7 types of entities and 4 types of entity attributes extracted in step 1, the medical consultation feature word set Q1 is manually sorted out, and the domain ACTree dictionary tree AC is further constructed based on the entity tag set R1 in step 1 and the entity relationship result set MT3 in step 4.

[0021] Construct a question parsing module, iterate the dictionary tree according to the user's complaint information, and export entity labels and category data Q2.

[0022] Construct an intent recognition module, combine the question word set Q1 to perform keyword matching to confirm the query intent, and derive the question type Q3.

[0023] Build a dialogue management module, generate Cypher query statements based on the entity tags and category data Q2 in the main complaint and the main complaint question type Q3, input them into Neo4j for query, return the query results, and further replace the answer template to generate the answer.

[0024] The beneficial effects of the present invention are as follows: the present invention firstly combines the online knowledge base, encyclopedia and medical website data and the description of the medical record itself to construct a cardiovascular field dictionary, which can enrich the characteristics of the cardiovascular data set, further desensitize the heterogeneous electronic medical record data to extract the text to construct the electronic medical record training data, that is, to reduce noise and protect privacy on the basis of retaining the main text of the medical record as much as possible, and then combines the field dictionary to further segment and annotate the training data to train the entity relationship model to construct a cardiovascular knowledge graph, which greatly reduces the cost of expert annotation of data, and further defines the medical question and answer feature set through traditional rules to construct a question and answer service model, so as to quickly and effectively respond to the user's main complaint inquiries. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a flow chart of the method for constructing a knowledge graph of cardiovascular and cerebrovascular diseases based on electronic medical records of the present invention;

[0026] Figure 2 It is a flow chart of the cardiovascular and cerebrovascular disease knowledge graph-based question-answering method of the present invention;

[0027] Figure 3 This is a schematic diagram of the bidirectional long short-term memory network (BiLSTM) and conditional random field (CRF) model in step 3. DETAILED DESCRIPTION

[0028] The present invention is further described below through specific implementation modes.

[0029] Combination Figure 1 , Figure 3 The cardiovascular and cerebrovascular disease knowledge graph system based on electronic medical records of the present invention comprises the following steps:

[0030] 1. Define entity relationship categories and construct a cardiovascular disease domain dictionary

[0031] 2. Electronic medical record text preprocessing

[0032] 3. Perform word segmentation and entity part-of-speech tagging on the cleaned medical record text

[0033] 4. Separate medical records by sentence and train word-based embedding vectors

[0034] 5. Build a sequence annotation entity model based on deep learning

[0035] 6. Build an entity relationship extraction model

[0036] 7. Output entity relationship set and store it in knowledge graph

[0037] Step 1: Define entity relationship categories and construct cardiovascular disease domain dictionary

[0038] According to the characteristics of existing electronic medical record data and the field characteristics of the online knowledge base, seven types of entities, namely disease, symptoms, drugs, examinations, parts, surgeries and departments, as well as four types of entity attributes with disease as the main body and overview, cause, diagnosis and treatment, were selected to supplement the description of the relationship between data.

[0039] A labeled cardiovascular disease dataset based on crawler data, online knowledge base and medical records was constructed, in which each record consists of an entity label and an entity category, separated by spaces, and contains 7 types of entities and 4 types of entity attributes. The crawler data acquisition rule is to use cardiovascular disease and brain and neurological disease in disease classification as the boundary, deeply traverse the associated disease links, and filter them according to the set 7 types of entities and 4 types of entity attributes. The filtering rule is to leave the field blank if the corresponding entity or attribute does not exist, and treat the alias of the disease as an independent entity; the online knowledge base record filtering rule is to extract field values ​​with a length greater than the threshold and non-English or numeric values, otherwise leave them blank; the electronic medical record filtering rule is to extract entities such as physical examination and inpatient examination examinations and examination indicators according to document page separation or table worksheet separation. After integrating the three parts of data, the cardiovascular disease field dictionary is obtained with the assistance of manual rule correction.

[0040] Step 2: Electronic medical record text extraction

[0041] According to the characteristics of clinical data in electronic medical records, they are divided into electronic medical record documents and electronic medical record forms, and unified privacy removal and exclusion of redundant items related to examinations with a large number of repeated words. Electronic medical record texts are regularly formatted, such as redundant spaces, full-width and half-width symbols, and numerical symbols. The final retained content is roughly divided into admission records, medical records, and discharge records.

[0042] Step 3: Segment and tag the cleaned medical record text

[0043] The cardiovascular disease dictionary obtained in step 1 is used as the word segmentation dictionary of the jieba tool to perform text segmentation and entity part-of-speech tagging simultaneously. The medical record text is further annotated based on characters using the BIO tagging method to generate a BIO entity tagging set.

[0044] Step 4: Separate the medical record text into sentences and train word-based embedding vectors

[0045] The medical record text is separated into sentences. The rule for sentence separation is to set multi-level sentence separators. If the first-level separation result is too long, the second-level separator is used. Similarly, the document is finally divided into multiple sentences. At the same time, in order to prevent the occurrence of a sentence segmentation that just divides an entity into two parts, a sliding window with a fixed window size is used to separate the words by expanding them to both sides by 3 words. During training, the entire expanded window is predicted, and only the output of the fixed window part is retained during output.

[0046] Bert is a pre-training model proposed by Google, which solves the problem of polysemy. Its self-attention mechanism enables the network to capture contextual information from the entire sequence, but the memory and computing power it requires grow quadratically with the length of the sequence, which makes current hardware infeasible or very expensive to process long sequences. Shortening or dividing the context into smaller sequences may cause important information to be lost. The present invention uses Longformer in long text scenarios instead of Bert to do embedding training based on word embedding vectors.

[0047] Step 5: Build a deep learning-based sequence labeling entity model

[0048] The constructed word representation vector and sentence representation matrix are used to perform sequence labeling using a bidirectional long short-term memory model and conditional random fields. Figure 3 It is explained that the sentence representation matrix obtained based on word embedding is usually input into the BiLSTM bidirectional long short-term memory model to predict the probability of each word belonging to different labels, and then Softmax is used to obtain the label with the highest probability as the predicted value of the position. However, this method ignores the connection between labels. Therefore, the present invention uses the CRF conditional random field model instead of Softmax, and uses two characteristic functions to correspond to the label probability obtained by BiLSTM, namely the emission probability and the label transfer probability, to help find the best label path during decoding. After the model is trained, the Viterbi algorithm can be used to find the optimal path.

[0049] Step 6: Build an entity relationship extraction model

[0050] According to the entity label set of the sequence annotation model prediction results in step 5, further manual correction is made to convert the entity relationship extraction into a sentence-level multi-classification task. Generally, the document is first divided into multiple sentences, and sentences without entities or with only one entity are discarded. However, this ignores the situation where the entity relationship exists but is not in the same sentence. Therefore, a brute force method of exhausting entity pairs and setting an interval threshold are used for sample filtering. At the same time, rules are set to filter entity relationship pairs that are not predefined. Sample vectorization features include: sentence text sequence, entity category, entity position index, and entity pair interval, and a convolutional neural network model is trained.

[0051] Step 7: Output entity relationship set and store it in the knowledge graph

[0052] Input the electronic medical record training corpus extracted in step 2 into the entity relationship model in step 6 to obtain the entity relationship result set, and further align it with the 7 types of entities and 4 types of entity attributes contained in the cardiovascular disease domain dictionary obtained in step 1. Train the word2vec model based on the domain dictionary for the remaining entity relationships in the result set, obtain the word vector and directly calculate the cosine similarity, take the part greater than the set threshold and retain it, import the 7 types of medical entities into neo4j as entity nodes, and the 4 types of entity attributes as supplementary attribute labels for disease entity nodes. Traverse the relationship pairs in the entity relationship result set, remove duplicate relationships and self-associations, and import them into neo4j as edges between nodes. The attribute values ​​of the associated edges are the predefined 7 types of relationships.

[0053] Based on the above system, combined with Figure 2 The present invention proposes a traditional rule-based question-answering method based on a cardiovascular and cerebrovascular disease knowledge graph.

[0054] 1. Define medical question types based on relationships and attributes

[0055] 2. Building domain ACTree based on cardiovascular disease domain dictionary

[0056] 3. Question analysis and intent recognition for user complaints

[0057] 4. Generate Cypher query statements and return results

[0058] Step 1: Define medical question types based on relationships and attributes

[0059] By identifying the entity relationship categories and entity attribute types contained in the knowledge graph, we can obtain 7 types of relationships and 4 types of attributes, namely, disease symptoms, drugs required for the disease, examinations required for the disease, complications, the department to which the disease belongs, disease-related surgeries, disease site, disease overview, disease causes, disease diagnosis, and disease treatment items, corresponding to a manually defined list of 11 types of question keywords.

[0060] Step 2: Construct domain ACTree based on cardiovascular disease domain dictionary

[0061] The Aho-Corasick automaton algorithm converts character matching into state transfer, which can solve the problem of multi-string matching. For example, "diabetic cerebrovascular disease" can match "diabetes", "cerebrovascular disease", and "diabetic cerebrovascular disease". The present invention constructs a domain AC tree based on the entity labels derived from the cardiovascular disease domain dictionary and the knowledge graph constructed at the beginning, and only needs to scan the main complaint information once to complete the matching.

[0062] Step 3: Analyze the user's complaint and identify their intent

[0063] The user's chief complaint information is filtered through the question parsing module using stop words and ACTree in step 2 to identify the entity types involved in the question. At the same time, the question keyword list in step 1 is used to determine the intention of the chief complaint. For example, "representation" and "manifestation" belong to symptom questions, and "detection" and "detection" belong to examination questions.

[0064] Step 4: Generate Cypher query statement and return results

[0065] Use the entity category, question category and entity label generated in step 3 to import the Cypher query generation module, match it with the predefined query template, automatically fill in the value in the template, get the final Cypher statement, input the query statement into neo4j input knowledge graph query, get the matching entity relationship or attribute, and export the answer.

Claims

1. A question-answering method for cardiovascular and cerebrovascular disease knowledge graph based on electronic medical records, characterized by The method comprises the following steps: Step 1. Build a dictionary in the field of cardiovascular and cerebrovascular diseases based on crawlers, knowledge bases, and medical records; We used crawler programs to collect disease-related data from encyclopedias and medical health websites, and obtained crawler entity dataset D1 with entity labels. We further extracted online open source knowledge bases to obtain online entity dataset D2 with entity labels. We extracted physical examination and hospitalization examination pages and other examination worksheets from electronic medical record clinical data as medical record entity dataset D3. We merged the above three datasets and manually corrected them to obtain cardiovascular entity dataset R1, which includes 7 types of entities: disease, symptom, drug, examination, location, surgery, and department, and 4 types of entity attributes: overview, cause, diagnosis, and treatment. Step 2. Build an electronic medical record text training dataset; Extract the effective main content of electronic medical record clinical data, including admission record, medical record and discharge record. Further filter the remaining components of electronic medical record clinical data through regular expression and worksheet to obtain medical record training set T1. Further desensitize the patient name, address, medical record number and hospital in medical record training set T1 to obtain medical record training set T2. Further filter the negative modification of symptoms in medical record training set T2 with manual rules to obtain training text set T3. Step 3. Build a named entity recognition model based on electronic medical records; Use the entity dataset R1 obtained in step 1 as the user segmentation dictionary of the jieba segmentation tool to extract the entity annotation training set from the training text set T3 in step 2, separate the entity corpus by sentence, and use BIO annotation to annotate the sentences based on characters; According to the characteristics of long texts in electronic medical records, Longformer is used in long text scenarios instead of Google Bert tool for word-based vectorization. The word embedding vector of each word constitutes a sentence representation matrix. The sentence representation matrix is ​​sequence labeled using a bidirectional long short-term memory model and conditional random field. The word labeling results and their corresponding labels are output, and the sequence labeling model M1 based on deep learning is obtained through training. Step 4. Construct an entity relationship extraction model based on entity corpus; According to step 3, the sequence annotation model M1 outputs the entity label prediction dataset MT1. At the same time, according to the entity category, 7 types of relationships with the disease entity as the starting node are defined, corresponding to: disease-symptom, disease-drug, disease-examination, disease-disease, disease-department, disease-surgery and disease-site; Set the association threshold M and the association window size S. Entity pairs that are smaller than the threshold M and within S are considered to exist if they are included in the seven types of relationships. Annotate the entity label prediction data set MT1 to obtain the entity relationship training set MT2. Extract sentence text, entity category, entity position index, and entity pair window size for vectorization input into the convolutional neural network model for binary classification. Train and obtain the entity relationship extraction model M2. The entity relationship extraction model M2 predicts and generates the entity relationship result set MT3, which is aligned with the 7 types of entities and 4 types of entity attributes contained in the cardiovascular disease field dictionary obtained in step 1. The Word2Vec model based on the field dictionary is trained for the remaining entity relationships in the result set, and the word vector is obtained to directly calculate the cosine similarity. The part greater than the set threshold is retained, and the entity pair numbers of the entity relationship result set MT3 are further replaced with the corresponding entity labels to form the data format of entity 1 and entity 2; the entity 1_entity 2 form is taken as the relationship edge, and the corresponding entity label is imported into the graph database Neo4j as the entity node; Step 5. Build a traditional rule-based question-answering service model; According to the 7 types of entities and 4 types of entity attributes extracted in step 1, the medical field consultation feature word set Q1 is manually sorted, and the domain ACTree dictionary tree AC is further constructed based on the entity data set R1 in step 1 and the entity relationship result set MT3 in step 4; Build a question parsing module, iterate the dictionary tree according to the user's complaint information, and export entity labels and category data Q2; Construct an intent recognition module, combine the question word set Q1 to perform keyword matching to confirm the query intent, and derive the question type Q3; Build a dialogue management module, generate Cypher query statements based on the entity tags and category data Q2 in the main complaint and the main complaint question type Q3, input them into Neo4j for query, return the query results, and further replace the answer template to generate the answer.

2. The cardiovascular and cerebrovascular disease knowledge graph question-answering method based on electronic medical records according to claim 1 is characterized by: In step 3, the bidirectional long short-term memory network outputs the label score of each word, the conditional random field obtains the label transfer probability matrix to be learned, and the sequence label is predicted by the model to obtain the score of a certain label path; the label path score is normalized by the Softmax function to obtain the probability value of predicting the label path; Based on the maximum likelihood estimation method, the probability of the label path is maximized; according to the Viterbi algorithm, the path with the highest probability value is selected from all paths as the optimal path output.

Citation Information

Patent Citations

  • Text mining method based on online medical question and answer information

    CN104965992A

  • Method and device for constructing medical knowledge graph

    CN107657063A

  • Knowledge graph-based interactive question and answer method and system

    CN107766483A

  • Emergency question-answering system construction method based on knowledge graph

    CN111191048A

  • Electronic medical record question-answering method and system based on knowledge graph

    CN111274373A