Construction method of traditional Chinese medicine question-answering system fusing knowledge base and clinical cases

Through the three-stage semantic understanding model and the transfer learning generative model, combined with the information extraction model, the problem of insufficient error accumulation and interpretability in the knowledge graph question and answer system is solved, and an efficient and accurate question and answer system in the field of traditional Chinese medicine is realized.

CN119025629APending Publication Date: 2024-11-26NINGBO INST OF TECH ZHEJIANG UNIV ZHEJIANG
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310462407.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing knowledge graph question and answer system has accumulated errors from natural language problems to executable logical forms in the construction, and the information extraction process lacks interpretability and is difficult to deal with complex problems.

Method used

Using a three-stage semantic understanding model to extract symptoms from traditional Chinese medicine clinical records, build a traditional Chinese medicine knowledge graph, and construct a generative model T5 through transfer learning, and combines the information extraction model to generate logical forms and answers corresponding to natural language problems, avoid entity recognition errors, and improve Question and answer accuracy.

Benefits of technology

It realizes the efficient construction of the knowledge graph in the field of traditional Chinese medicine, improves the accuracy and interpretability of question-and-answer questions and answers, avoids cumulative errors in traditional methods, and provides an efficient and authoritative question-and-answer system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025629A_ABST
    Figure CN119025629A_ABST
Patent Text Reader

Abstract

The invention relates to a construction method of a traditional Chinese medicine question-answering system fusing a knowledge base and a clinical case, and the method comprises the steps: S1, constructing knowledge source information of a traditional Chinese medicine knowledge graph, the knowledge source information comprising an open-source Chinese knowledge database and a traditional Chinese medicine clinical case; s2, extracting traditional Chinese medicine knowledge in the open-source Chinese knowledge database, extracting clinical symptoms of a patient from traditional Chinese medicine clinical medical records through a three-stage semantic understanding model to serve as the traditional Chinese medicine knowledge, and obtaining an underlying traditional Chinese medicine field knowledge graph; s3, constructing a training set based on the underlying traditional Chinese medicine field knowledge graph; s4, constructing an information extraction model; s5, constructing a generative model T5 based on transfer learning; according to the method, the richness of knowledge is guaranteed, meanwhile, traditional Chinese medicine clinical medical record knowledge is fused, the practicability of the knowledge is guaranteed, related corpora are extracted through a method in the field of information extraction, accumulated errors caused by traditional methods such as entity recognition are avoided, and the accuracy of questions and answers is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing, and in particular to a method for constructing a traditional Chinese medicine question-answering system integrating a knowledge base and clinical cases. Background Art

[0002] Knowledge graph question answering refers to answering natural language questions using information such as entities and relationships in a structured knowledge base. The core of the task includes constructing a knowledge graph that meets the requirements and a question-answering system that provides accurate answers. In terms of constructing knowledge graphs, there are currently more and more open source knowledge graphs for scholars to study in China, but knowledge graphs in specific fields are rarely open source and their quality varies.

[0003] In the field of question-answering systems based on knowledge graphs, mainstream solutions are divided into two categories: the first category is a method based on semantic parsing, which parses natural language questions into logical forms that can be directly executed by the knowledge base to find answers. However, the defects of this method are: there is a gap from natural language questions to executable logical forms, and this method has sub-tasks in natural language processing such as entity recognition and entity linking, and errors will accumulate during the conversion process; the second category is a method based on information extraction, which indexes relevant sub-graphs in the knowledge graph according to the input question, sorts the relevant entities in the sub-graphs, and directly uses entities with higher rankings as answers to the questions. However, the defects of this method are: sub-tasks such as entity recognition are required in the indexing process, which results in errors, and the answers to the questions directly obtained in the sorting stage lack explainability, making it difficult to handle complex problems. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method for constructing a traditional Chinese medicine question-answering system that integrates a knowledge base and clinical cases and can improve the accuracy of question-answering, avoid cumulative errors, and make the processing process more efficient and simple.

[0005] The technical solution adopted by the present invention is a method for constructing a TCM question-answering system integrating a knowledge base and clinical cases, the method comprising the following steps:

[0006] S1. Constructing knowledge source information of TCM knowledge graph; the knowledge source information includes open source Chinese knowledge database and TCM clinical medical records;

[0007] S2. Extract TCM knowledge from the open source Chinese knowledge database, extract the patient's clinical symptoms from the TCM clinical medical records through a three-stage semantic understanding model as TCM knowledge, and import all the extracted TCM knowledge into the graph database Neo4j as the underlying TCM domain knowledge graph; the specific process of extracting TCM knowledge from the open source Chinese knowledge database is: store the knowledge in the open source Chinese knowledge database in a standardized manner in the form of triples, extract TCM-related texts as training corpus through ACTREE keyword matching, construct a TCM domain text classification model based on BERT, input the training corpus into the TCM domain text classification model for training, obtain the trained TCM domain text classification model, and then use the trained TCM domain text classification model to extract knowledge from the open source Chinese knowledge database to obtain the underlying TCM domain knowledge graph;

[0008] S3. Construct a training set based on the underlying TCM knowledge graph. The specific process is as follows: construct a number of questions based on the underlying TCM knowledge graph, and require that the constructed questions can be answered in the underlying TCM knowledge graph, and correspond the constructed questions to the answers in the underlying TCM knowledge graph;

[0009] S4, constructing an information extraction model, and using the training set constructed in step S3 to train the information extraction model to obtain a trained information extraction model, wherein the trained information extraction model is used to extract fragments related to the natural language question from the underlying knowledge graph of traditional Chinese medicine when a natural language question to be queried is input;

[0010] S5, constructing a generative model T5 based on transfer learning, wherein the generative model T5 includes an encoder, a fuser, and a decoder, and the generative model T5 is trained using the training set constructed in step S3 to obtain the trained generative model T5. The specific process of training the generative model T5 using the training set constructed in step S3 is as follows:

[0011] S5.1, at the encoding end of the encoder, natural language questions in the training set are connected into a text, and the text is named a first prefix, the segments corresponding to the natural language questions extracted in step S4 are connected into a text, and the text is named a second prefix, the two texts with different prefixes are used as inputs of the encoder, and the encoder embeds the two texts with different prefixes into a low-dimensional vector space;

[0012] S5.2. For the text of the first prefix, the decoder generates an answer corresponding to the natural language question in the text, and for the text of the second prefix, the decoder generates a logical form sentence corresponding to the fragment in the text;

[0013] S5.3. Fine-tune the generative model T5 for multi-task learning, that is, generate two training cases for a natural language question, generate corresponding answers and logical form statements; in the reasoning stage, adopt beam search to generate multiple candidate answer sets and answer sets corresponding to logical form statements, and select the answer with the highest confidence in these two sets as the answer to the input question.

[0014] The beneficial effects of the present invention are as follows: from the perspective of the field of traditional Chinese medicine, a method for efficiently constructing a practical and authoritative domain knowledge graph is provided, starting from an open source open field, the required knowledge in the field of traditional Chinese medicine is extracted, thereby ensuring the richness of knowledge; at the same time, the knowledge of clinical medical records of traditional Chinese medicine is integrated, thereby ensuring the practicality of knowledge; based on the constructed domain knowledge graph, a unified generative model framework is constructed using transfer learning to simultaneously generate the logical form and answer corresponding to the natural language question, and the final answer is obtained by combining the two, thereby ensuring the high accuracy of question and answer; at the same time, when constructing the training corpus of the generative model, the knowledge graph is textualized, and the relevant corpus is extracted using the method in the field of information extraction, thereby avoiding the cumulative error caused by traditional methods such as entity recognition, thereby further improving the accuracy of question and answer. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A process diagram of knowledge source information for constructing a traditional Chinese medicine knowledge graph in the present invention;

[0016] Figure 2 It is a structural diagram of the TCM text classification model based on BERT in the present invention;

[0017] Figure 3 It is a structural diagram of the three-stage semantic understanding model in the present invention;

[0018] Figure 4 Process diagram for building a TCM question-answering system that integrates knowledge base and clinical cases. DETAILED DESCRIPTION

[0019] The invention will be further described below with reference to the accompanying drawings and in combination with specific implementations, so that those skilled in the art can implement the invention with reference to the description. The protection scope of the invention is not limited to the specific implementations.

[0020] The present invention relates to a method for constructing a traditional Chinese medicine question-answering system integrating a knowledge base and clinical cases, the method comprising the following steps:

[0021] S1. Construct the knowledge source information of TCM knowledge graph; the knowledge source information includes three parts: (1) CN-DBpedia is a large-scale general-domain structured encyclopedia developed and maintained by the Knowledge Factory Laboratory of Fudan University. Its predecessor is the Fudan GDM Chinese knowledge graph, which is the earliest and currently the largest open encyclopedia Chinese knowledge graph in China. (2) Peking University Chinese Encyclopedia Knowledge Graph PKU-PIE Knowledge Base. The PKU-PIE knowledge base is a knowledge base formed by automatically collecting knowledge from multiple sources such as Wikipedia, DBpedia, Baidu Encyclopedia, etc. It has its own category system and predicate system, and is associated with common databases such as DBpedia. (3) More than 15,000 clinical medical records provided by the team of Henan University of Traditional Chinese Medicine;

[0022] S2. Extract TCM knowledge from CN-DBpedia and PKU-PIE; store the TCM knowledge extracted from CN-DBpedia and PKU-PIE in the form of triples, extract TCM-related texts from them as training corpus for TCM field text classification model through actree keyword matching, construct a TCM field text classification model based on BERT, train the TCM field text classification model with the training corpus, obtain the trained TCM field text classification model, and use the trained TCM field text classification model to further extract TCM knowledge from CN-DBpedia and PKU-PIE;

[0023] Extract patients’ clinical symptoms as TCM knowledge from more than 15,000 clinical medical records through a three-stage semantic understanding model;

[0024] The extracted TCM knowledge is organized in the form of subject-verb-object triples and stored in batches in the neo4j database;

[0025] S3. Construct a training set based on the underlying TCM knowledge graph. The specific process is as follows: construct a number of questions based on the underlying TCM knowledge graph, and require that the constructed questions can be answered in the underlying TCM knowledge graph, and correspond the constructed questions to the answers in the underlying TCM knowledge graph;

[0026] S4, constructing an information extraction model, and using the training set constructed in step S3 to train the information extraction model to obtain a trained information extraction model, wherein the trained information extraction model is used to extract fragments related to the natural language question from the underlying knowledge graph of traditional Chinese medicine when a natural language question to be queried is input; training the information extraction model to extract the knowledge graph means making full use of the information in the knowledge graph and the data set when constructing the training corpus of the generative model, and textualizing the knowledge graph at the same time, and extracting relevant corpus using methods in the field of information extraction, thereby avoiding the cumulative errors caused by traditional methods such as entity recognition;

[0027] S5, constructing a generative model T5 based on transfer learning, using transfer learning to construct a unified generative model framework to simultaneously generate the logical form and answer corresponding to the natural language question, combining the two to obtain the final answer, and improving the accuracy of the question and answer, the generative model T5 includes an encoder, a fuser and a decoder, and the generative model T5 is trained using the training set constructed in step S3 to obtain the trained generative model T5. The specific process of training the generative model T5 using the training set constructed in step S3 is as follows:

[0028] S5.1, at the encoding end of the encoder, natural language questions in the training set are connected into a text, and the text is named a first prefix, the segments corresponding to the natural language questions extracted in step S4 are connected into a text, and the text is named a second prefix, the two texts with different prefixes are used as inputs of the encoder, and the encoder embeds the two texts with different prefixes into a low-dimensional vector space;

[0029] S5.2. For the text of the first prefix, the decoder generates an answer corresponding to the natural language question in the text, and for the text of the second prefix, the decoder generates a logical form sentence corresponding to the fragment in the text;

[0030] S5.3. Fine-tune the generative model T5 for multi-task learning, that is, generate two training cases for a natural language question, and generate corresponding answers and logical form statements; in the reasoning stage, the generative model T5 adopts beam search to generate multiple candidate answer sets and answer sets corresponding to logical form statements, and selects the answer with the highest confidence in these two sets as the answer to the input question.

[0031] Based on the mainstream open source knowledge graph, the present invention extracts the knowledge in the field of traditional Chinese medicine based on a large-scale pre-trained language model, ensuring the accuracy of the knowledge; at the same time, the traditional Chinese medicine knowledge in the clinical medical records of traditional Chinese medicine provided by the team of Henan University of Traditional Chinese Medicine is extracted, and the clinical medical records with a low degree of structure are converted into standardized medical records according to the four diagnoses through the semantic understanding model, and the standardized medical record information is used as an important part of the information source of the traditional Chinese medicine knowledge graph, ensuring the practicality of the traditional Chinese medicine knowledge graph. The present invention converts the knowledge graph question-answering problem into a text-to-text conversion problem, uses transfer learning to construct a unified generative model framework, and simultaneously generates the logical form and answer corresponding to the natural language question, and combines the two to obtain the final answer, thereby improving the accuracy of the question-answering. When constructing the training corpus of the generative model, the information in the knowledge graph is fully utilized, the knowledge graph is textualized, and the relevant corpus is extracted using the method in the field of information extraction, avoiding the cumulative error caused by traditional methods such as entity recognition.

Claims

1. A method for constructing a TCM question-answering system integrating a knowledge base and clinical cases, characterized in that: The method comprises the following steps: S1. Constructing knowledge source information of TCM knowledge graph; the knowledge source information includes open source Chinese knowledge database and TCM clinical medical records; S2. Extract TCM knowledge from the open source Chinese knowledge database, extract the patient's clinical symptoms from the TCM clinical medical records through a three-stage semantic understanding model as TCM knowledge, and import all the extracted TCM knowledge into the graph database Neo4j as the underlying TCM domain knowledge graph; The specific process of extracting TCM knowledge from the open source Chinese knowledge database is as follows: the knowledge in the open source Chinese knowledge database is stored in the form of triples in a standardized manner, and the text related to TCM is extracted as training corpus through ACtree keyword matching, and a TCM field text classification model is constructed based on BERT, and the training corpus is input into the TCM field text classification model for training to obtain the trained TCM field text classification model, and then the trained TCM field text classification model is used to extract the knowledge in the open source Chinese knowledge database to obtain the underlying TCM field knowledge graph; S3, build training set based on the underlying TCM knowledge graph; The specific process is as follows: construct a number of questions based on the underlying TCM knowledge graph, and require that the constructed questions can be answered in the underlying TCM knowledge graph, and match the constructed questions with the answers in the underlying TCM knowledge graph; S4, constructing an information extraction model, and using the training set constructed in step S3 to train the information extraction model to obtain a trained information extraction model, wherein the trained information extraction model is used to extract fragments related to the natural language question from the underlying knowledge graph of traditional Chinese medicine when a natural language question to be queried is input; S5, constructing a generative model T5 based on transfer learning, wherein the generative model T5 includes an encoder, a fuser, and a decoder, and the generative model T5 is trained using the training set constructed in step S3 to obtain the trained generative model T5. The specific process of training the generative model T5 using the training set constructed in step S3 is as follows: S5.1, at the encoding end of the encoder, natural language questions in the training set are connected into a text, and the text is named a first prefix, the segments corresponding to the natural language questions extracted in step S4 are connected into a text, and the text is named a second prefix, the two texts with different prefixes are used as inputs of the encoder, and the encoder embeds the two texts with different prefixes into a low-dimensional vector space; S5.

2. For the text of the first prefix, the decoder generates an answer corresponding to the natural language question in the text, and for the text of the second prefix, the decoder generates a logical form sentence corresponding to the fragment in the text; S5.

3. Fine-tune the generative model T5 for multi-task learning, that is, generate two training cases for a natural language question, generate corresponding answers and logical form statements; in the reasoning stage, adopt beam search to generate multiple candidate answer sets and answer sets corresponding to logical form statements, and select the answer with the highest confidence in these two sets as the answer to the input question.

Citation Information

Patent Citations

  • Cardiovascular and cerebrovascular knowledge map questioning and answering method based on electronic medical records

    CN112002411A

  • Medical knowledge graph question-answering system construction method based on BERT and similarity algorithm

    CN112131393A

  • Intelligent question answering method and device based on medical knowledge graph

    CN113505243A

  • Visual question and answer method and device based on deep learning model, medium and equipment

    CN113656570A

  • Knowledge graph-based medical question answering method and apparatus, device and medium

    WO2023029512A1