Medical knowledge graph construction method, application method, device, equipment and medium
By combining a collaborative integration framework with a large language model, the problem of low accuracy of existing medical knowledge graphs is solved, and the construction of medical knowledge graphs with higher accuracy and comprehensiveness is achieved, which is suitable for the construction and application of medical knowledge graphs.
Patent Information
- Application Number
- CN202411645227.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The accuracy of existing medical knowledge graphs is low, mainly because supervised knowledge extraction methods rely too much on labels in the corpus, and are less effective in extracting entities with incomplete labels, resulting in inaccurate constructed knowledge graphs.
A collaborative integration framework is used for knowledge mining, including supervised mining module, remote supervised mining module, rule mining module and complex mining module. The knowledge mining results are integrated with a large language model and verified through a quality control framework to ultimately generate an accurate medical knowledge graph.
It improves the comprehensiveness and precision of the medical knowledge graph, ensures the quality and accuracy of the knowledge graph, and can better meet actual clinical needs.
Smart Images

Figure CN119597933B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medical data processing, in particular to a medical knowledge graph construction method, an application method, a device, equipment and a medium. BACKGROUND
[0002] A medical knowledge graph is a structured representation of medical knowledge that organizes information in the medical field in the form of a graph, where nodes represent medical entities such as diseases, drugs, symptoms, etc., and edges represent relationships between entities such as causal relationships, treatment relationships, etc. This graph structure makes the association and reasoning between medical knowledge more intuitive and efficient.
[0003] In the prior art, a medical knowledge graph is generally constructed by first extracting medical entities using a supervised knowledge extraction method. However, since the supervised knowledge extraction method relies heavily on labels in the corpus, the extraction effect of the supervised knowledge extraction method is poor for entities with incomplete labels in the corpus, resulting in low precision of the constructed medical knowledge graph. SUMMARY
[0004] The problem solved by the present application is how to improve the precision of a medical knowledge graph.
[0005] To solve the above problems, the present application provides a medical knowledge graph construction method, an application method, a device, equipment and a medium.
[0006] In a first aspect, the present application provides a medical knowledge graph construction method, comprising:
[0007] determining the entity situation of the medical text, wherein the entity situation includes an annotated sufficient entity situation, an annotated scarce entity situation, a regular entity situation and a complex entity situation;
[0008] inputting the medical text into a collaborative integration framework for knowledge mining to generate corresponding knowledge mining results, wherein the collaborative integration framework includes a supervised mining module, a remote supervision mining module, a rule mining module and a complex mining module corresponding to the entity situation;
[0009] integrating all the knowledge mining results using a large language model to generate entity relationship data, and based on the entity relationship data, constructing a preliminary medical knowledge graph;
[0010] inputting the preliminary medical knowledge graph into a quality control framework for verification, and generating a final medical knowledge graph according to the verification result.
[0011] Optionally, the quality control framework includes an axiomatic logic mining module, an axiomatic logic verification module and an iterative completion module.
[0012] The axiomatic logic mining module is used to mine the axiomatic logic in the preliminary medical knowledge graph;
[0013] The axiomatic logic verification module is used to verify the preliminary medical knowledge graph according to the axiomatic logic and generate the verification result;
[0014] The iterative completion module is used to generate modification data according to the verification result when the verification result is incorrect, and modify the preliminary medical knowledge graph according to the modification data to construct an intermediate medical knowledge graph, and transmit the intermediate medical knowledge graph to the axiomatic logic mining module for iterative verification until the verification result is correct, and generate the final medical knowledge graph, wherein the final medical knowledge graph is the intermediate medical knowledge graph obtained in the last iteration.
[0015] Optionally, the axiomatic logic mining module includes at least one representation learning unit and corresponding axiom mining units and screening units, and each of the representation learning units includes a different representation learning method;
[0016] The representation learning unit is used to extract entity and relationship vectors in the preliminary medical knowledge graph;
[0017] The axiom mining unit is used to determine the preliminary axiom logic and corresponding confidence of the entity and relationship vector based on axiom rules;
[0018] The screening unit is used to screen out the axiomatic logic from the preliminary axiomatic logic according to the confidence level.
[0019] Optionally, the knowledge mining result includes entity recognition results and relationship extraction results, and the inputting of the medical text into the collaborative integration framework for knowledge mining to generate corresponding knowledge mining results includes:
[0020] Inputting the medical text into the collaborative integration framework for entity recognition, and generating corresponding entity recognition results;
[0021] The medical text and the entity recognition results are input into the collaborative integration framework for relationship extraction to generate corresponding relationship extraction results.
[0022] The beneficial effects of the medical knowledge graph construction method of the present invention are:
[0023] Determining the entity situation of medical text can facilitate the subsequent processing of texts of different entity types in medical texts. By inputting medical texts into a collaborative integration framework for knowledge mining and applying supervised mining modules, remote supervision mining modules, rule mining modules and complex mining modules corresponding to different entity situations in a targeted manner, problems existing in texts of each entity type can be effectively solved, thereby extracting entities and their relationships in medical texts, namely, knowledge mining results, thereby improving the comprehensiveness and accuracy of knowledge mining. A large language model is then used to integrate the knowledge mining results of different mining modules to ensure the accuracy of each knowledge mining result and obtain overall coherent entity relationship data to complete the knowledge mining of medical texts, thereby constructing an accurate preliminary medical knowledge graph. Finally, the preliminary medical knowledge graph is verified, and based on the verification results, the final medical knowledge graph is generated to further ensure the quality of the medical knowledge graph and improve the accuracy of the medical knowledge graph.
[0024] In a second aspect, the present invention provides a medical knowledge graph application method, which uses the final medical knowledge graph constructed by the medical knowledge graph construction method described in the first aspect, and the medical knowledge graph application method comprises:
[0025] Extracting a set of knowledge fragments associated with the acquired user questions based on the final medical knowledge graph, wherein the set of knowledge fragments includes at least one knowledge fragment;
[0026] Using a large language model to screen the knowledge fragments in the knowledge fragment set to generate key knowledge fragments;
[0027] The key knowledge fragments and the user questions are input into the large language model using prompt learning technology to generate results.
[0028] Optionally, the user question includes a question stem and question options, and extracting a set of knowledge fragments associated with the user question based on the final medical knowledge graph includes:
[0029] Using entity recognition technology, respectively extracting the question entity of the question stem and the option entities of the question options, wherein the number of each of the question entity and the option entity is at least one;
[0030] Combining each of the question entities and each of the option entities to construct a corresponding candidate entity pair;
[0031] The n-hop intra-path of the candidate entity pair is retrieved in the final medical knowledge graph, and the knowledge fragment set is generated according to the n-hop intra-path.
[0032] Optionally, the prompt learning technology is used to input the key knowledge fragment and the user question into the large language model to generate a result, including:
[0033] Using a linear language method, extracting the head entity, relationship and tail entity of the key knowledge fragment;
[0034] Sequentially concatenating the head entity, the relationship, and the tail entity to generate key knowledge text;
[0035] The prompt learning technology is used to input the key knowledge text and the user question into the large language model to generate the result.
[0036] The beneficial effects of the medical knowledge graph application method of the present invention are:
[0037] Based on the final medical knowledge graph, a set of knowledge fragments associated with the acquired user questions is extracted. This ensures that the extracted knowledge fragments are highly relevant to the user's search question, thereby improving the accuracy of subsequent results. A large language model is then used to filter the knowledge fragments within the set to obtain key knowledge fragments. This eliminates inaccurate or less relevant knowledge fragments, removes noise, and ensures the quality of the key knowledge fragments. Finally, using prompt learning technology, the key knowledge fragments are used as prompts and input into the large language model along with the user question. This guides the large language model to fully utilize the knowledge in the final knowledge graph, enabling the model to better understand the question and generate more accurate results.
[0038] In a third aspect, the present invention provides a medical knowledge graph construction device, which implements the final medical knowledge graph constructed by the medical knowledge graph construction method described in the first aspect, wherein the medical knowledge graph construction device comprises:
[0039] A segmentation module is used to determine entity situations of medical texts, wherein the entity situations include sufficient annotated entity situations, scarce annotated entity situations, regular entity situations, and complex entity situations;
[0040] a mining module, configured to input the medical text into a collaborative integration framework for knowledge mining and generate corresponding knowledge mining results, wherein the collaborative integration framework includes a supervised mining module, a remotely supervised mining module, a rule mining module, and a complex mining module corresponding to the entity situation;
[0041] A construction module for integrating all the knowledge mining results using a large language model to generate entity relationship data, and constructing a preliminary medical knowledge graph based on the entity relationship data;
[0042] The check module is configured to input the preliminary medical knowledge graph into a quality control framework for checking, and generate a final medical knowledge graph according to a checking result.
[0043] In a fourth aspect, the present application provides an electronic device comprising a memory and a processor.
[0044] The memory is configured to store a computer program.
[0045] The processor is configured to implement the medical knowledge graph construction method according to the first aspect or the medical knowledge graph application method according to the second aspect when executing the computer program.
[0046] In a fifth aspect, the present application provides a computer readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the medical knowledge graph construction method according to the first aspect or the medical knowledge graph application method according to the second aspect is implemented. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 A flowchart of the medical knowledge graph construction method provided by the embodiment of the present application is shown in the figure.
[0048] Figure 2 A structural diagram of the collaborative integration framework provided by the embodiment of the present application is shown in the figure.
[0049] Figure 3 A structural diagram of the quality control framework provided by the embodiment of the present application is shown in the figure.
[0050] Figure 4 A flowchart of the medical knowledge graph application method provided by the embodiment of the present application is shown in the figure.
[0051] Figure 5 A structural diagram of the medical knowledge graph construction device provided by the embodiment of the present application is shown in the figure.
[0052] Figure 6 A structural diagram of the electronic device provided by the embodiment of the present application is shown in the figure.
[0053] Figure 7 A structural diagram of the medical knowledge graph application device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0054] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0055] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0056] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0057] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0058] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0059] With the development of artificial intelligence (AI), medical knowledge graphs (MKGs) are playing an increasingly important role in the field of medical AI as a tool for structured storage of complex medical knowledge. By representing medical information in the form of graphs, MKGs make the association and reasoning between knowledge more intuitive and efficient. However, existing MKGs have some limitations, which are mainly reflected in the following aspects:
[0060] Single knowledge type: Most knowledge graphs rely mainly on mining common sense knowledge from medical textbooks and guides, ignoring the empirical medical knowledge extracted from electronic medical records, resulting in incomplete knowledge graphs that cannot meet actual clinical needs.
[0061] Limited knowledge coverage: Existing knowledge graphs often only focus on a certain disease or a certain department, lacking comprehensive coverage of diseases in all departments, which limits the breadth of their application in multiple fields.
[0062] Coarse knowledge granularity: The entity and relationship description system of the existing knowledge graph is limited in downstream applications. For example, there is a lack of detailed description of the relationship between symptoms and parts, such as "occurrence location", which affects the depth and accuracy of the knowledge graph.
[0063] Insufficient knowledge quality control: Although the medical field has higher expectations for data quality, most of the popular medical knowledge graph construction processes do not include quality control links, resulting in problems such as incompleteness, inaccuracy, and inconsistency in the knowledge graph.
[0064] In response to the problems existing in the above-mentioned related technologies, this embodiment provides a medical knowledge graph construction method, application method, device, equipment and medium.
[0065] like Figure 1 As shown, an embodiment of the present invention provides a method for constructing a medical knowledge graph, including:
[0066] Entity situations of the medical text are determined, wherein the entity situations include sufficient annotated entity situations, scarce annotated entity situations, regular entity situations, and complex entity situations.
[0067] Specifically, since there are texts with different entity situations in medical texts, and texts with different entity situations will also affect the effect of knowledge mining, the entity situations of medical texts are determined. The entity situations include well-annotated entity situations, scarcely annotated entity situations, regular entity situations, and complex entity situations, so as to facilitate subsequent targeted knowledge mining of texts with different entity situations. Well-annotated entity situations refer to entity texts with annotations and sufficient annotated samples, such as diseases and symptoms. Scarcely annotated entity situations refer to entity texts with annotations but scarce annotated samples, such as operations and microorganisms. Regular entity situations refer to entity texts that show strong regularity and are prone to ambiguity in remote annotation, such as anesthesia methods. Complex entity situations refer to entity texts that depend on complex contexts.
[0068] The medical text is input into a collaborative integration framework for knowledge mining to generate corresponding knowledge mining results, wherein the collaborative integration framework includes a supervised mining module, a remote supervision mining module, a rule mining module and a complex mining module corresponding to the entity situation.
[0069] Specifically, medical texts are input into a collaborative integration framework for knowledge mining. The collaborative integration framework includes modules and models for targeted mining of texts of various entity situations, and each text will generate a knowledge mining result. Figure 2 As shown, the collaborative integration framework includes supervised mining modules, remotely supervised mining modules, rule mining modules, and complex mining modules corresponding to each entity scenario. The supervised mining module handles cases where entities are well-labeled. It uses supervised learning methods. Supervised learning methods rely on a large amount of pre-labeled training data to train the knowledge mining model. By learning the patterns and features in this data, the knowledge mining model can identify entities in new text. Therefore, the effectiveness of supervised learning methods depends on the quality of the training data. They are suitable for entity text with sufficient labeled samples. They can effectively learn relevant text features, achieve high-precision recognition and mining, and achieve high accuracy. For example, models such as Bert+BiLSTM+CRF and Lattice can be used. The remotely supervised mining module handles cases where entities are scarcely labeled. It uses remote supervision methods. Remote supervision methods automatically generate labeled data using existing knowledge bases. That is, they use existing knowledge bases and unlabeled text to generate a large amount of remote supervision data for model training, thereby bypassing the need for large-scale manual labeling. Remote supervision methods can also use the same mining models as supervised learning for knowledge mining. The rule mining module handles regular entity situations, using a rule-based approach that applies a set of predefined rules to identify entities in text. These rules are based on linguistic knowledge and the experience of domain experts and are suitable for specific scenarios where rules are easy to define and rarely change, namely regular entity situations. The complex mining module handles complex entity situations and uses a large language model. The large language model performs knowledge mining tasks based on common language features learned from large amounts of text. The large language model combines the learning capabilities of large-scale data with the model's deep semantic understanding, and can perform well in complex knowledge mining tasks. It then uses prompt learning technology to implement knowledge mining tasks for complex entity situations.
[0070] A large language model is used to integrate all the knowledge mining results, generate entity relationship data, and construct a preliminary medical knowledge graph based on the entity relationship data.
[0071] Specifically, after knowledge mining is performed on different types of texts, a knowledge mining result will be generated for each entity case. In this embodiment, there are four entity cases, and four knowledge mining results will be generated. That is, the medical text is input into the collaborative integration framework for knowledge mining, and four knowledge mining results will be generated. Figure 2As shown, all knowledge mining results are integrated using a large language model, achieving collaborative integration of knowledge mining results from texts of different entity types. This can be achieved through a chain-based prompt learning method, leveraging the comprehensive analysis capabilities of the large language model for effective integration, achieving comprehensive evaluation and correction, and obtaining collaboratively integrated entity relationship data. Based on this entity relationship data, a preliminary medical knowledge graph is constructed. The chain-based prompt learning method includes defining the role, tasks, goals, and output format of the large oracle model. The role definition refers to defining the large oracle model as an expert at the intersection of medicine and computer science, with extensive experience in constructing medical knowledge graphs. The task refers to the integration task of the large language model, namely, conducting in-depth analysis of the four mining results of the text and ultimately inferring the most accurate entity recognition result. The output format refers to the format of the large language model's output results, which is used to constrain the output format of the large language model for easy post-processing.
[0072] The preliminary medical knowledge graph is input into a quality control framework for verification, and a final medical knowledge graph is generated based on the verification results.
[0073] Specifically, the preliminary medical knowledge graph is input into the quality control framework for verification, resulting in a verification result. If the verification result is incorrect, the erroneous text needs to be modified and re-verified until the verification result is correct. The last modified medical knowledge graph is then used as the final medical knowledge graph to ensure that all nodes and text content in the medical knowledge graph are correct, thereby improving the accuracy of the knowledge graph.
[0074] In this embodiment, determining the entity situation of the medical text can facilitate the subsequent separate processing of texts of different entity types in the medical text. By inputting the medical text into a collaborative integration framework for knowledge mining and applying the supervised mining module, remote supervision mining module, rule mining module and complex mining module corresponding to different entity situations in a targeted manner, the problems existing in the text of each entity type can be effectively solved, thereby extracting the entities and their relationships in the medical text, that is, the knowledge mining results, thereby improving the comprehensiveness and accuracy of the knowledge mining. A large language model is then used to integrate the knowledge mining results of different mining modules to ensure the accuracy of each knowledge mining result and obtain overall coherent entity relationship data to complete the knowledge mining of the medical text, thereby constructing an accurate preliminary medical knowledge graph. Finally, the preliminary medical knowledge graph is verified, and based on the verification results, a final medical knowledge graph is generated to further ensure the quality of the medical knowledge graph and improve the accuracy of the medical knowledge graph.
[0075] Optionally, the quality control framework includes an axiomatic logic mining module, an axiomatic logic verification module, and an iterative completion module;
[0076] The axiomatic logic mining module is used to mine the axiomatic logic in the preliminary medical knowledge graph;
[0077] The axiomatic logic verification module is used to verify the preliminary medical knowledge graph according to the axiomatic logic and generate the verification result;
[0078] The iterative completion module is used to generate modification data according to the verification result when the verification result is incorrect, and modify the preliminary medical knowledge graph according to the modification data to construct an intermediate medical knowledge graph, and transmit the intermediate medical knowledge graph to the axiomatic logic mining module for iterative verification until the verification result is correct, and generate the final medical knowledge graph, wherein the final medical knowledge graph is the intermediate medical knowledge graph obtained in the last iteration.
[0079] Specifically, if Figure 3 As shown in the figure, the quality control framework includes an axiomatic logic mining module, an axiomatic logic verification module, and an iterative completion module. The axiomatic logic mining module is used to mine the axiomatic logic in the preliminary medical knowledge graph; the axiomatic logic verification module is used to verify the preliminary medical knowledge graph according to the axiomatic logic and generate a verification result; the iterative completion module is used to generate modified data according to the verification result when the verification result is incorrect, wherein the modified data includes deleting data and completing data. The preliminary medical knowledge graph is modified according to the modified data to construct an intermediate medical knowledge graph (not shown in the figure), and the intermediate medical knowledge graph is transmitted to the axiomatic logic mining module. The axiomatic logic mining module mines the axiomatic logic again, and the axiomatic logic verification module verifies the constraints again to obtain the verification result, thereby performing iterative loop verification until the verification result is correct, and the iterative loop is stopped. The intermediate medical knowledge graph obtained in the last iteration is the final medical knowledge graph, thereby ensuring the accuracy of the final medical knowledge graph.
[0080] Optionally, the axiomatic logic mining module includes at least one representation learning unit and corresponding axiom mining units and screening units, and each of the representation learning units includes a different representation learning method;
[0081] The representation learning unit is used to extract entity and relationship vectors in the preliminary medical knowledge graph;
[0082] The axiom mining unit is used to determine the preliminary axiom logic and corresponding confidence of the entity and relationship vector based on axiom rules;
[0083] The screening unit is used to screen out the axiomatic logic from the preliminary axiomatic logic according to the confidence level.
[0084] Specifically, if Figure 3 As shown, the axiomatic logic mining module includes at least one representation learning unit and corresponding axiom mining and screening units. That is, the representation learning units, axiom mining units, and screening units correspond one to one. Each representation learning unit includes different representation learning methods, such as TransE and RotatE. These representation learning methods are used to learn vector representations of entities and relationships in the knowledge graph, namely, entity and relationship vectors. When the form of the entity and relationship vectors satisfies the axiom rules, the axioms of the entity and relationship vectors can be mined through the axiom mining unit to obtain preliminary axiomatic logic and corresponding confidence levels. However, when the entity and relationship vectors do not satisfy the axiom rules, preliminary axiomatic logic cannot be obtained. For example, if the axioms of the entity and relationship vectors contain InverseOP (complication, alias), the complication relationship acts on two different entities, while the alias relationship refers to the same entity. This is clearly incorrect and does not comply with the disjoint axiom (Disjoint(r_1, r_2)) in the axiom rules, and cannot be mined as preliminary axiomatic logic. Axiom rules can adopt the axiom rules in OWL2 Web Ontology Language (OWL2). OWL2 is an ontology language defined by the semantic web, has a formally defined meaning, and contains a variety of axioms used to describe and constrain ontologies. Axiom rules can be selected from OWL2 based on quality control requirements and knowledge graph characteristics. Exemplarily, this embodiment can adopt seven axiom rules, including symmetric axiom (SymmetricOP(r)), antisymmetric axiom (AntiSymmetricOP(r)), reciprocal axiom (InverseOP(r_1, r_2)), combined (chained) equivalence axiom (EquivalentOP(ChainOP(r_1, r_2), r_3)), disjoint axiom (Disjoint(r_1, r_2)), object property value constraint (ObjectPropertyRange) and object property domain constraint (ObjectPropertyDomain). These seven axiom rules are related to the binary relations that are the main components of the knowledge graph, and they can check the inconsistency of the knowledge graph and infer new triples, which can be used for knowledge verification and knowledge completion. After obtaining the preliminary axiom logic and the corresponding confidence level, a screening unit is used to screen out the final axiom logic from the preliminary axiom logic based on the confidence level. For example, the axiom rules and the conditions for satisfying the axiom rules, TransE and RotatE vector forms are shown in the following table:
[0085]
[0086] Among them, axiomatic is the axiom rule, rule is the rule that the vector needs to satisfy in the axiom rule, TransErelation embedding is the vector form of TransE representing the learning method, and RotatErelation embedding is the vector form of RotatE representing the learning method.
[0087] Optionally, the knowledge mining result includes entity recognition results and relationship extraction results, and the inputting of the medical text into the collaborative integration framework for knowledge mining to generate corresponding knowledge mining results includes:
[0088] Inputting the medical text into the collaborative integration framework for entity recognition, and generating corresponding entity recognition results;
[0089] The medical text and the entity recognition results are input into the collaborative integration framework for relationship extraction to generate corresponding relationship extraction results.
[0090] Specifically, knowledge mining results include entity recognition and relationship extraction. The collaborative integration framework performs entity recognition and relationship extraction on text of the same entity type. The steps for entity recognition and relationship extraction are similar. For entity recognition, the entity rule method uses a vocabulary, and its input is medical text. Compared to entity recognition, relationship extraction requires a rule template-based approach. That is, the relationship rule method uses a relationship rule template, and the input for relationship extraction is medical text and entity recognition results, namely text and entities. Relationship extraction is then performed within the collaborative integration framework.
[0091] like Figure 4 As shown, an embodiment of the present invention provides a medical knowledge graph application method, which uses the above-mentioned medical knowledge graph construction method to construct a final medical knowledge graph, and the medical knowledge graph application method includes:
[0092] Based on the final medical knowledge graph, a knowledge fragment set associated with the acquired user question is extracted, wherein the knowledge fragment set includes at least one knowledge fragment.
[0093] Specifically, after obtaining the final medical knowledge graph, the final medical knowledge graph can be applied to the question-answering process of the large language model. That is, when the large language model answers questions raised by user searches, it can answer based on the final medical knowledge graph, that is, extract at least one knowledge fragment related to the user's question from the final medical knowledge graph, and construct a set of knowledge fragments for subsequent processing.
[0094] A large language model is used to screen the knowledge fragments in the knowledge fragment set to generate key knowledge fragments.
[0095] Specifically, because the knowledge fragment set contains different knowledge fragments, and some of them are inaccurate or have low relevance, i.e., noise, a relationship selection strategy can be used to leverage the understanding capabilities of a large language model to select the key knowledge fragments from the knowledge fragment set that are most helpful in answering the question. The corresponding knowledge paths are retained, and the paths of other knowledge fragments are filtered out. It should be understood that the number of key knowledge fragments is at least one.
[0096] The key knowledge fragments and the user questions are input into the large language model using prompt learning technology to generate results.
[0097] Specifically, the prompt learning technology is used to input key knowledge fragments and user questions into the large language model, so that the large language model can use the key knowledge fragments to provide higher quality results.
[0098] In this embodiment, based on the final medical knowledge graph, a set of knowledge fragments associated with the acquired user questions is extracted. This allows the extracted knowledge fragments to be highly relevant to the user's search question, thereby improving the accuracy of subsequent results. A large language model is then used to screen the knowledge fragments in the knowledge fragment set to obtain key knowledge fragments. This can eliminate inaccurate or less relevant knowledge fragments, remove noise, and ensure the quality of the key knowledge fragments. Finally, using prompt learning technology, the key knowledge fragments are used as prompts and input into the large language model along with the user question. This can guide the large language model to fully utilize the knowledge in the final knowledge graph, enabling the model to better understand the question and generate more accurate results.
[0099] Optionally, the user question includes a question stem and question options, and extracting a set of knowledge fragments associated with the user question based on the final medical knowledge graph includes:
[0100] Using entity recognition technology, respectively extracting the question entity of the question stem and the option entities of the question options, wherein the number of each of the question entity and the option entity is at least one;
[0101] Combining each of the question entities and each of the option entities to construct a corresponding candidate entity pair;
[0102] The n-hop intra-path of the candidate entity pair is retrieved in the final medical knowledge graph, and the knowledge fragment set is generated according to the n-hop intra-path.
[0103] Specifically, user questions consist of a question stem and question options—that is, user questions are multiple-choice questions. When extracting knowledge fragments, entity recognition technology is used to extract the question entity from the question stem and the option entities from the question options. The number of question entities and option entities is at least one, thus constructing a question entity set and an option entity set to facilitate program execution. Each question entity and each option entity in the question entity set and option entity set are then combined to construct corresponding candidate entity pairs and candidate entity pair sets. Next, the n-hop intra-path for each candidate entity pair is retrieved from the final medical knowledge graph to determine the candidate knowledge paths for the user question. These paths are defined as initial knowledge subgraphs, or knowledge fragments. Multiple initial knowledge subgraphs constitute a knowledge fragment set. In a knowledge graph, an n-hop intra-path refers to all possible paths from one entity to another through at most n relational steps. Here, "hop" refers to the number of relational steps from one entity to another. n-hop intra-paths are very useful in knowledge graph-based query, reasoning, and recommendation systems, helping to capture indirect relationships between entities.
[0104] Optionally, the prompt learning technology is used to input the key knowledge fragment and the user question into the large language model to generate a result, including:
[0105] Using a linear language method, extracting the head entity, relationship and tail entity of the key knowledge fragment;
[0106] Sequentially concatenating the head entity, the relationship, and the tail entity to generate key knowledge text;
[0107] The prompt learning technology is used to input the key knowledge text and the user question into the large language model to generate the result.
[0108] Specifically, since the key knowledge fragments are obtained by screening the knowledge fragments, and the knowledge fragments are in the form of initial knowledge subgraphs, the initial knowledge subgraphs are structured symbolic representations, which are not conducive to input into the large language model. The large language model is more suitable for text input. Therefore, the linear language method is used to extract the head entity, relationship and tail entity of the key knowledge fragment; and the head entity, relationship and tail entity are spliced in sequence to obtain the key knowledge text in text form, so that the key knowledge text and user questions are input into the large language model, and the prompt learning technology is used to prompt the large language model. For example, the instruction "consider the key knowledge text when answering questions" is added to the prompt to guide the large language model to make full use of the knowledge in the knowledge graph and generate more accurate results.
[0109] like Figure 5 As shown, an embodiment of the present invention provides a medical knowledge graph construction device 500, comprising:
[0110] A segmentation module 510 is used for determining entity situations of medical texts, wherein the entity situations include sufficient annotated entity situations, scarce annotated entity situations, regular entity situations, and complex entity situations;
[0111] A mining module 520 is configured to input the medical text into a collaborative integration framework for knowledge mining and generate corresponding knowledge mining results, wherein the collaborative integration framework includes a supervised mining module, a remotely supervised mining module, a rule mining module, and a complex mining module corresponding to the entity situation;
[0112] A construction module 530 is configured to integrate all of the knowledge mining results using a large language model to generate entity relationship data, and to construct a preliminary medical knowledge graph based on the entity relationship data;
[0113] The verification module 540 is used to input the preliminary medical knowledge graph into the quality control framework for verification, and generate a final medical knowledge graph based on the verification results.
[0114] like Figure 6 As shown, an electronic device 600 provided by an embodiment of the present invention includes a memory 610 and a processor 620; the memory 610 is used to store computer programs; the processor 620 is used to implement the medical knowledge graph construction method or the medical knowledge graph application method as described above when executing the computer program.
[0115] In other words, an electronic device 600 includes a memory 610 and a processor 620 coupled to the memory 610; the memory 610 is configured to store a computer program; and the processor 620 is configured to perform the following operations when executing the computer program:
[0116] Determining entity situations of the medical text, wherein the entity situations include sufficient annotated entity situations, scarce annotated entity situations, regular entity situations, and complex entity situations;
[0117] Inputting the medical text into a collaborative integration framework for knowledge mining to generate corresponding knowledge mining results, wherein the collaborative integration framework includes a supervised mining module, a remotely supervised mining module, a rule mining module, and a complex mining module corresponding to the entity situation;
[0118] Using a large language model to integrate all of the knowledge mining results, generate entity relationship data, and construct a preliminary medical knowledge graph based on the entity relationship data;
[0119] The preliminary medical knowledge graph is input into a quality control framework for verification, and a final medical knowledge graph is generated based on the verification results.
[0120] Or do the following:
[0121] Extracting a set of knowledge fragments associated with the acquired user questions based on the final medical knowledge graph, wherein the set of knowledge fragments includes at least one knowledge fragment;
[0122] Using a large language model to screen the knowledge fragments in the knowledge fragment set to generate key knowledge fragments;
[0123] The key knowledge fragments and the user questions are input into the large language model using prompt learning technology to generate results.
[0124] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the medical knowledge graph construction method or the medical knowledge graph application method as described above is implemented.
[0125] In other words, a non-volatile computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following operations:
[0126] Determining entity situations of the medical text, wherein the entity situations include sufficient annotated entity situations, scarce annotated entity situations, regular entity situations, and complex entity situations;
[0127] Inputting the medical text into a collaborative integration framework for knowledge mining to generate corresponding knowledge mining results, wherein the collaborative integration framework includes a supervised mining module, a remotely supervised mining module, a rule mining module, and a complex mining module corresponding to the entity situation;
[0128] Using a large language model to integrate all of the knowledge mining results, generate entity relationship data, and construct a preliminary medical knowledge graph based on the entity relationship data;
[0129] The preliminary medical knowledge graph is input into a quality control framework for verification, and a final medical knowledge graph is generated based on the verification results.
[0130] Or have the processor do something like this:
[0131] Extracting a set of knowledge fragments associated with the acquired user questions based on the final medical knowledge graph, wherein the set of knowledge fragments includes at least one knowledge fragment;
[0132] Using a large language model to screen the knowledge fragments in the knowledge fragment set to generate key knowledge fragments;
[0133] The key knowledge fragments and the user questions are input into the large language model using prompt learning technology to generate results.
[0134] An electronic device 600 that can serve as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device 600 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 600 can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0135] The electronic device 600 includes a computing unit that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) or a computer program loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The computing unit, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0136] like Figure 7 As shown, an embodiment of the present invention provides a medical knowledge graph application device 700, including:
[0137] An extraction module 710 is configured to extract a set of knowledge fragments associated with the acquired user question based on the final medical knowledge graph, wherein the set of knowledge fragments includes at least one knowledge fragment;
[0138] A screening module 720 is configured to screen the knowledge fragments in the knowledge fragment set using a large language model to generate key knowledge fragments;
[0139] The injection module 730 is used to adopt the prompt learning technology to input the key knowledge fragments and the user questions into the large language model to generate results.
[0140] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM). In this application, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present invention. In addition, the functional units in the various embodiments of the present invention can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or software functional units.
[0141] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.
Claims
1. A method for constructing a medical knowledge graph, characterized in that: include: Determining entity situations of the medical text, wherein the entity situations include sufficient annotated entity situations, scarce annotated entity situations, regular entity situations, and complex entity situations; Inputting the medical text into a collaborative integration framework for knowledge mining to generate corresponding knowledge mining results, wherein the collaborative integration framework includes a supervised mining module, a remotely supervised mining module, a rule mining module, and a complex mining module corresponding to the entity situation; Using a large language model to integrate all of the knowledge mining results, generate entity relationship data, and construct a preliminary medical knowledge graph based on the entity relationship data; Inputting the preliminary medical knowledge graph into a quality control framework for verification, and generating a final medical knowledge graph based on the verification results; The quality control framework includes an axiomatic logic mining module, an axiomatic logic verification module, and an iterative completion module; The axiomatic logic mining module is used to mine the axiomatic logic in the preliminary medical knowledge graph; The axiomatic logic verification module is used to verify the preliminary medical knowledge graph according to the axiomatic logic and generate the verification result; The iterative completion module is used to generate modification data according to the verification result when the verification result is incorrect, and modify the preliminary medical knowledge graph according to the modification data to construct an intermediate medical knowledge graph, and transmit the intermediate medical knowledge graph to the axiomatic logic mining module for iterative verification until the verification result is correct, thereby generating the final medical knowledge graph, wherein the final medical knowledge graph is the intermediate medical knowledge graph obtained in the last iteration; The axiomatic logic mining module includes at least one representation learning unit and corresponding axiom mining units and screening units, each of the representation learning units includes a different representation learning method; The representation learning unit is used to extract entity and relationship vectors in the preliminary medical knowledge graph; The axiom mining unit is used to determine the preliminary axiom logic and corresponding confidence of the entity and relationship vector based on axiom rules; The screening unit is configured to screen out the axiomatic logic from the preliminary axiomatic logic according to the confidence level; The knowledge mining results include entity recognition results and relationship extraction results. The medical text is input into the collaborative integration framework for knowledge mining to generate corresponding knowledge mining results, including: Inputting the medical text into the collaborative integration framework for entity recognition, and generating corresponding entity recognition results; The medical text and the entity recognition results are input into the collaborative integration framework for relationship extraction to generate corresponding relationship extraction results.
2. A medical knowledge graph application method, characterized in that: The final medical knowledge graph constructed by the medical knowledge graph construction method according to claim 1, wherein the medical knowledge graph application method comprises: Extracting a set of knowledge fragments associated with the acquired user questions based on the final medical knowledge graph, wherein the set of knowledge fragments includes at least one knowledge fragment; Using a large language model to screen the knowledge fragments in the knowledge fragment set to generate key knowledge fragments; The key knowledge fragments and the user questions are input into the large language model using prompt learning technology to generate results.
3. The medical knowledge graph application method according to claim 2, characterized in that: The user question includes a question stem and question options. The step of extracting a set of knowledge fragments associated with the user question based on the final medical knowledge graph includes: Using entity recognition technology, respectively extracting the question entity of the question stem and the option entities of the question options, wherein the number of each of the question entity and the option entity is at least one; Combining each of the question entities and each of the option entities to construct a corresponding candidate entity pair; The n-hop intra-path of the candidate entity pair is retrieved in the final medical knowledge graph, and the knowledge fragment set is generated according to the n-hop intra-path.
4. The medical knowledge graph application method according to claim 2, characterized in that: The prompt learning technology is used to input the key knowledge fragments and the user questions into the large language model to generate results, including: Using a linear language method, extracting the head entity, relationship and tail entity of the key knowledge fragment; Sequentially concatenating the head entity, the relationship, and the tail entity to generate key knowledge text; The prompt learning technology is used to input the key knowledge text and the user question into the large language model to generate the result.
5. A medical knowledge graph construction device, characterized in that: Implementing the medical knowledge graph construction method according to claim 1, the medical knowledge graph construction device comprises: A segmentation module is used to determine entity situations of medical texts, wherein the entity situations include sufficient annotated entity situations, scarce annotated entity situations, regular entity situations, and complex entity situations; a mining module, configured to input the medical text into a collaborative integration framework for knowledge mining and generate corresponding knowledge mining results, wherein the collaborative integration framework includes a supervised mining module, a remotely supervised mining module, a rule mining module, and a complex mining module corresponding to the entity situation; A construction module for integrating all the knowledge mining results using a large language model to generate entity relationship data, and constructing a preliminary medical knowledge graph based on the entity relationship data; The verification module is used to input the preliminary medical knowledge graph into the quality control framework for verification, and generate the final medical knowledge graph based on the verification results.
6. An electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the medical knowledge graph construction method as described in claim 1 or the medical knowledge graph application method as described in any one of claims 2 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the medical knowledge graph construction method according to claim 1 or the medical knowledge graph application method according to any one of claims 2 to 4.
Citation Information
Patent Citations
Medical knowledge graph construction method and device, storage medium and electronic device
CN110609910A
DRG high-compilation high-suit behavior identification method and device, electronic equipment and medium
CN117786123A