Method for constructing knowledge graph in medical field
By adopting a variety of deep learning and machine learning algorithms in the medical field, and combining knowledge fusion between ontology and entity layers, the problems of poor knowledge extraction effect and lack of reasoning and completion in the existing technology are solved, and high Quality medical knowledge graph construction and continuous update.
Patent Information
- Application Number
- CN202410899028.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2024-12-06
AI Technical Summary
Among the existing knowledge graph construction methods in the medical field, the knowledge extraction algorithm is too simple, has poor results, lacks ontology fusion and graph reasoning and completion processes, and is simple in quality evaluation design.
A variety of deep learning and machine learning algorithms are used to extract knowledge, combine knowledge fusion with ontology and entity layers, graph inference and completion are carried out through multiple algorithms, and a comprehensive quality evaluation method is used to build a high-quality medical knowledge graph. Specific steps include obtaining medical data, knowledge extraction and storage, data fusion, knowledge processing (ontology construction, reasoning and update) and quality assessment.
A comprehensive, high-quality, and continuously updated and iterative medical field knowledge graph is built, and the effective integration and reasoning of knowledge is achieved through a variety of algorithms and strategies is used to improve the quality evaluation and update capabilities of the graph.
Smart Images

Figure CN119088885A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an implementation of artificial intelligence technology in the medical field, and specifically to a method for constructing a knowledge graph in the medical field. Background Art
[0002] As people pay more and more attention to health issues, the contradiction between the growth of health care costs and demand and the shortage of high-quality medical resources needs to be resolved urgently. Due to the rapid development of artificial intelligence and the proposal of precision medicine and smart medicine in recent years, medical knowledge graphs are receiving widespread attention from domestic and foreign companies and academia, and are expected to bring cheap, efficient and accurate medical advice and diagnosis.
[0003] The following problems still exist in the existing technology: the algorithm for knowledge extraction in the medical field is too simple, the effect of complex knowledge extraction is poor, knowledge fusion only considers the fusion of entities but not the fusion of ontologies, there is a lack of reasoning and completion process for graphs, there is a lack of quality assessment of graphs or the design of quality assessment is too simple. Summary of the invention
[0004] The purpose of the present invention is to propose a method for constructing a knowledge graph in the medical field, so as to solve the problems that the knowledge extraction algorithm proposed in the above background technology is too simple, the extraction effect is poor, the knowledge fusion lacks ontology fusion, the reasoning and completion process of the graph is lacking, and there is a lack of quality assessment of the graph.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A method for constructing a knowledge graph in the medical field, comprising S1, acquiring relevant data in the medical field, mainly including structured data, semi-structured data and unstructured data; S2, extracting and storing knowledge from the acquired data; S3, integrating existing knowledge, including ontology fusion and entity fusion; S4, processing knowledge on the knowledge graph, including ontology construction, knowledge reasoning, knowledge updating and quality assessment.
[0007] The step S1 specifically includes the following contents:
[0008] Obtain medical-related structured data, semi-structured data, and unstructured data by accessing existing medical-related system data, crawling medical data with web crawlers, and classifying and cleaning the acquired data;
[0009] The steps for accessing existing medical-related system data are as follows:
[0010] S1.1.1. Research the existing medical system;
[0011] S1.1.2. Access existing medical system data;
[0012] The steps for web crawlers to crawl medical data are as follows:
[0013] S1.2.1. Obtain the URL of the target medical data;
[0014] S1.2.2. Submit an HTTP request to the corresponding URL;
[0015] S1.2.3. Parse HTTP response;
[0016] S1.2.4. Store the analysis results.
[0017] The step S2 specifically includes knowledge extraction from structured data and knowledge extraction from semi-structured and unstructured data, wherein the knowledge extraction from structured data is performed by mapping the knowledge from the relational database to the RDF data set using the R2RML mapping language; and the knowledge extraction from semi-structured and unstructured data is performed by using the LSTM-CRF named entity recognition model for entity extraction or using the PCNN segmented convolutional neural network for relationship extraction; finally, the extracted knowledge is stored in Jena (Apache's RDF triple database).
[0018] When the LSTM-CRF named entity recognition model is used for entity extraction in step S2, the model construction process is as follows:
[0019] S2.1.1. Establish the Embedding layer to map words into word vectors;
[0020] S2.1.2, establish n layers of bidirectional LSTM layers to learn the contextual semantic information of words;
[0021] S2.1.3, establish a CRF layer to perform sequence labeling on each word;
[0022] PCNN segmented convolutional neural network is used for relationship extraction. The model construction process is as follows:
[0023] S2.2.1. Establish an Embedding word vector extraction layer to map words and word position information into word vectors;
[0024] S2.2.2. Establish a convolution layer and perform segmented convolution operation on the text;
[0025] S2.2.3, establish a max pooling layer;
[0026] S2.2.4. Establish the output layer, and use the softmax function as the activation function;
[0027] When using DMCNN dynamic multi-pooling convolutional neural network for event extraction, the model construction process is as follows:
[0028] S2.3.1. Establish an Embedding word vector extraction layer to map words and word position information into word vectors.
[0029] S2.3.2. Establish a sentence-level feature extraction layer, including:
[0030] S2.3.2.1. Establish a convolution layer and perform segmented convolution operations on the text;
[0031] S2.3.2.2, establish a max pooling layer;
[0032] S2.3.3, establish a vocabulary-level feature extraction layer;
[0033] S2.3.4, merge the vectors obtained by the sentence-level feature extraction layer and the word-level feature extraction layer;
[0034] S2.3.5. Establish the output layer, and use the softmax function as the activation function.
[0035] The ontology fusion in step S3 specifically includes the following contents:
[0036] S3.1.1. Import the ontology to be mapped. The ontology to be mapped does not necessarily need to be converted into a unified ontology language format, but it is necessary to ensure that the components in the ontology that need to be mapped can be easily obtained;
[0037] S3.1.2, Mapping discovery, based on the terminology-based ontology fusion algorithm, to find the connections between heterogeneous ontologies, and then establish mapping rules between heterogeneous ontologies based on these connections;
[0038] S3.1.3, Representation mapping, when the mappings between ontologies are found, these mappings need to be represented reasonably;
[0039] In step S3.1.2, the terminology-based ontology fusion algorithm includes the following contents:
[0040] Term alignment: Align the terms in the ontology to find the corresponding relationship between them. The alignment method uses string matching and semantic similarity calculation;
[0041] Term mapping: Based on the alignment results, the terms in the ontology are mapped, that is, the terms in different ontologies are mapped to the same term;
[0042] Structural merging: Based on the term mapping results, the structures of the ontologies are merged, that is, the relationships between classes, attributes, instances, etc. in different ontologies are merged;
[0043] Conflict resolution: Conflicts may arise during the merging process, such as inheritance relationships between classes; certain methods are needed to resolve these conflicts;
[0044] Ways to resolve these conflicts include:
[0045] Manual intervention: The conflicting entities are handed over to humans for decision-making and the most appropriate solution is selected;
[0046] Trade-off method: Evaluate different solutions and choose the one with the largest weight;
[0047] Merge method: merge the conflicting parts of the two ontologies to obtain a new ontology;
[0048] Abandonment method: abandon one of the entities or a part of the information;
[0049] Conversion method: convert conflicting information into another form so that they no longer conflict.
[0050] In step S3.1.3, the specific steps of mapping are as follows:
[0051] Create mapping relationships: Create mapping relationships between terms in different ontologies based on the term alignment results; the mapping relationship can be represented as a matrix, where each row represents a set of mapping relationships;
[0052] Conflict resolution: Conflicts may occur during the creation of mapping relationships, and certain methods are required to resolve these conflicts; the methods here are consistent with the conflict resolution methods in step S3.1.2;
[0053] Optimize the mapping relationship: Optimize the mapping relationship by using some algorithms, such as random walk algorithm, generative adversarial network, etc.
[0054] Determine the priority of the mapping relationship: Determine the priority of the mapping relationship according to different application scenarios and select the most appropriate mapping relationship.
[0055] The entity fusion in step S3 specifically includes the following contents:
[0056] S3.2.1, data preprocessing, removing punctuation marks from entity names, performing synonym expansion, etc.;
[0057] S3.2.2, Chunking, assigning similar entities in different knowledge graphs to the same chunks through heuristic strategies, reducing the number of pairwise comparisons between entities;
[0058] S3.2.3, entity alignment, where pairwise alignment only matches the information of the two entities in an entity pair, which is essentially a binary classification problem, and collective alignment considers the information of the entire knowledge graph for matching;
[0059] S3.2.4, Feature matching, feature matching is performed based on text similarity and structure similarity.
[0060] The step S4 specifically includes ontology construction, knowledge reasoning, quality assessment and knowledge updating;
[0061] The ontology construction specifically includes:
[0062] S4.1.1. Calculate the parallel relationship between vertical concepts. By calculating the similarity of the parallel relationship between any two entities, it is possible to determine whether they belong to the same concept at the semantic level.
[0063] S4.1.2. Extract the relationship between entities. The entity-superordinate relationship extraction methods include grammar-based extraction and semantics-based extraction.
[0064] S4.1.3, generate an ontology, cluster the concepts obtained at each level, and assign one or more common hypernyms to each type of entity;
[0065] The knowledge reasoning specifically includes:
[0066] S4.2.1. Graph-based algorithmic reasoning, using the Co-PRA algorithm to search for graph structural features;
[0067] Preferably, the Co-PRA algorithm is used in step S4.2.1 to search for graph structure features, and the specific steps are as follows:
[0068] S4.2.1.1. Generate a preliminary path, and generate a path set P with a length less than 1 starting from h through a path search algorithm. h ; Generate a path set P with a length less than 1 starting from t through a path search algorithm t ;;
[0069] S4.2.2.2. Calculate the probability of path features through PRA. For path π h ∈P h , calculate along the path π h The probability of reaching x from h in the forward direction is P(h→x; π h ), and along the path π h The probability of going from h to x in reverse Similarly, for the path π t ∈P t , calculate along the path π tThe probability of reaching x from t in the forward direction is P(t→x;π t ), and along the path π t The probability of going from t to x in reverse And put all x into the constant candidate set N;
[0070] S4.2.2.3. Generate candidate constant paths. For each (x∈N, π∈P t ) combination, if P(t→x;π t )>0, then the path feature is generated Where c = t, and the coverage value corresponding to the path feature is increased by 1, that is, Similarly, for every (x∈N,π∈P t ), if Then the generated path feature P(t→x;π t ), where c = x, and the coverage value corresponding to the path feature is increased by 1, that is, coverage(P(c→t;π t ))+=1;
[0071] S4.2.2.4. Generate a longer set of path feature candidates. For each possible combination (x∈N,π h ∈P h , π t ∈P t ), if P(s←x;π s )>0 and Generate a path And update its coverage, that is At the same time, update its accuracy, that is, The same goes in reverse.
[0072] S4.2.2. Based on rule learning algorithm reasoning, the AMIE rule learning algorithm is adopted. The AMIE algorithm defines three mining operators, explores the search space on the graph by continuously adding mining operators to the rules, and incorporates pruning strategies;
[0073] S4.2.3 is based on the reasoning of the representation learning algorithm. The TransR model is used for reasoning. The TransR model embeds the graph into vectors, and then uses these vectors as the input of the algorithm. Finally, the one-to-one, one-to-many, many-to-one and many-to-many relationships between entities can be learned.
[0074] The quality assessment specifically includes:
[0075] S4.3.1. Evaluate the ontology based on the gold standard (the gold standard includes accuracy, completeness, consistency, reliability, usability and interpretability) and obtain the corresponding score a of the ontology;
[0076] S4.3.2 Evaluate the ontology based on the ontology task / application and obtain the corresponding score b of the ontology. These evaluations include:
[0077] ① Check whether the disease ontology covers all important disease characteristics and symptoms, and whether it can support the reasoning of disease diagnosis tasks;
[0078] ② Check whether the drug ontology covers all important drug properties and mechanisms of action, and whether it can support the reasoning of the medication recommendation task;
[0079] ③ Check whether the knowledge acquisition ontology covers all important knowledge sources and knowledge types, and whether it can support reasoning of knowledge acquisition tasks;
[0080] S4.3.3 Evaluate the ontology based on data-driven and obtain the corresponding score c of the ontology. These evaluations include:
[0081] ① Evaluate the quality of the disease ontology by comparing the symptoms and characteristics in the disease ontology with the real clinical data;
[0082] ② Evaluate the quality of the drug entity by comparing the mechanism of action and side effects in the drug entity with the actual clinical data;
[0083] ③ Evaluate the quality of the knowledge acquisition ontology by comparing the knowledge sources and knowledge types in the knowledge acquisition ontology with the real data;
[0084] S4.3.4. Take a weighted average of the above scores, evaluate the quality of the ontology based on the final score, and then comprehensively judge the quality of the atlas based on the quality of the ontology; the formula for the final score is as follows:
[0085]
[0086] Note: The value range of a, b, and c is 0 to 100 points.
[0087] Here, the corresponding relationship between the ontology quality assessment and the final score is:
[0088] Final score / points Quality Assessment 90~100 excellent 80~90 good 70~80 qualified <70 Difference
[0089] The knowledge update specifically includes:
[0090] S4.4.1. Update the model layer and ontology elements, including adding, modifying, and deleting concepts, updating concept attributes, and updating the hierarchical relationship between concepts. The medical industry is an industry with high professional requirements, and the update of the model layer requires the participation of industry experts;
[0091] S4.4.2. Update the data layer and entity elements, including adding, modifying, deleting entities, and updating basic information and attribute values of entities.
[0092] Compared with the prior art, the present invention has the following beneficial effects:
[0093] The present invention can be used to construct a general knowledge graph in the medical field, adopt a variety of deep learning and machine learning algorithms to extract knowledge, integrate knowledge based on two dimensions of ontology layer and entity layer, adopt a variety of algorithms and strategies to reason and complete the knowledge of the graph and adopt a comprehensive quality assessment method to evaluate the quality of the graph, so as to obtain a comprehensive, high-quality, and continuously updated and iterated knowledge graph in the medical field. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 It is the overall flow chart of the present invention;
[0095] Figure 2 Detailed flow chart of the present invention;
[0096] Figure 3 This is a specific structure diagram of the model when the LSTM-CRF named entity recognition model is used for entity extraction in the present invention;
[0097] Figure 4 This is a specific structural diagram of the model when the present invention uses the PCNN segmented convolutional neural network to perform relationship extraction;
[0098] Figure 5 This is a specific structural diagram of the model when the present invention uses the DMCNN dynamic multi-pooling convolutional neural network for event extraction;
[0099] Figure 6 This is a partial flow chart of the knowledge integration of the present invention. DETAILED DESCRIPTION
[0100] In order to clarify the technical problems, technical solutions, implementation processes and performance demonstrations, the present invention is further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are for explanation only. The present invention is not intended to limit the present invention. Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings do not have to be drawn to scale unless otherwise specified.
[0101] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0102] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0103] Example 1
[0104] like Figure 1 and Figure 2 As shown, a method for constructing a knowledge graph in the medical field includes S1, acquiring relevant data in the medical field, mainly including structured data, semi-structured data and unstructured data; S2, extracting and storing knowledge from the acquired data; S3, integrating existing knowledge, including ontology fusion and entity fusion; S4, processing knowledge on the knowledge graph, including ontology construction, knowledge reasoning, knowledge updating and quality assessment.
[0105] The step S1 specifically includes the following contents:
[0106] Obtain medical-related structured data, semi-structured data, and unstructured data by accessing existing medical-related system data, crawling medical data with web crawlers, and classifying and cleaning the acquired data;
[0107] The steps for accessing existing medical-related system data are as follows:
[0108] S1.1.1. Research the existing medical system;
[0109] S1.1.2. Access existing medical system data;
[0110] The steps for web crawlers to crawl medical data are as follows:
[0111] S1.2.1. Obtain the URL of the target medical data;
[0112] S1.2.2. Submit an HTTP request to the corresponding URL;
[0113] S1.2.3. Parse HTTP response;
[0114] S1.2.4. Store the analysis results.
[0115] The step S2 specifically includes knowledge extraction from structured data and knowledge extraction from semi-structured and unstructured data, wherein the knowledge extraction from structured data is performed by mapping the knowledge from the relational database to the RDF data set using the R2RML mapping language; and the knowledge extraction from semi-structured and unstructured data is performed by using the LSTM-CRF named entity recognition model for entity extraction or using the PCNN segmented convolutional neural network for relationship extraction; finally, the extracted knowledge is stored in Jena (Apache's RDF triple database).
[0116] like Figure 3 As shown, when the LSTM-CRF named entity recognition model is used for entity extraction in step S2, the model construction process is as follows:
[0117] S2.1.1. Establish the Embedding layer to map words into word vectors;
[0118] S2.1.2, establish n layers of bidirectional LSTM layers to learn the contextual semantic information of words;
[0119] S2.1.3, establish a CRF layer to perform sequence labeling on each word;
[0120] like Figure 4 As shown, PCNN segmented convolutional neural network is used for relationship extraction, and the model construction process is as follows:
[0121] S2.2.1. Establish an Embedding word vector extraction layer to map words and word position information into word vectors;
[0122] S2.2.2. Establish a convolution layer and perform segmented convolution operation on the text;
[0123] S2.2.3, establish a max pooling layer;
[0124] S2.2.4. Establish the output layer, and use the softmax function as the activation function;
[0125] like Figure 5 As shown in the figure, when using DMCNN dynamic multi-pooling convolutional neural network for event extraction, the model construction process is as follows:
[0126] S2.3.1. Establish an Embedding word vector extraction layer to map words and word position information into word vectors.
[0127] S2.3.2. Establish a sentence-level feature extraction layer, including:
[0128] S2.3.2.1. Establish a convolution layer and perform segmented convolution operations on the text;
[0129] S2.3.2.2, establish a max pooling layer;
[0130] S2.3.3, establish a vocabulary-level feature extraction layer;
[0131] S2.3.4, merge the vectors obtained by the sentence-level feature extraction layer and the word-level feature extraction layer;
[0132] S2.3.5. Establish the output layer, and use the softmax function as the activation function.
[0133] The ontology fusion in step S3 specifically includes the following contents:
[0134] On the one hand, different users and groups build or select appropriate ontologies based on different application requirements and application fields. The contents described in these ontologies often overlap or are related in semantics, and the ontologies used have differences in representation language and representation model, which results in ontology heterogeneity. On the other hand, a large number of instances in the knowledge graph also have heterogeneity problems. Instances with the same name may refer to different entities, and instances with different names may refer to the same entity. Therefore, it is necessary to solve the corresponding heterogeneity problems based on the ontology layer and the entity layer.
[0135] S3.1.1. Import the ontology to be mapped. The ontology to be mapped does not necessarily need to be converted into a unified ontology language format, but it is necessary to ensure that the components in the ontology that need to be mapped can be easily obtained;
[0136] S3.1.2, Mapping discovery, based on the terminology-based ontology fusion algorithm, to find the connections between heterogeneous ontologies, and then establish mapping rules between heterogeneous ontologies based on these connections;
[0137] S3.1.3, Representation mapping, when the mappings between ontologies are found, these mappings need to be represented reasonably;
[0138] In step S3.1.2, the terminology-based ontology fusion algorithm includes the following contents:
[0139] Term alignment: Align the terms in the ontology to find the corresponding relationship between them. The alignment method uses string matching and semantic similarity calculation;
[0140] Term mapping: Based on the alignment results, the terms in the ontology are mapped, that is, the terms in different ontologies are mapped to the same term;
[0141] Structural merging: Based on the term mapping results, the structures of the ontologies are merged, that is, the relationships between classes, attributes, instances, etc. in different ontologies are merged;
[0142] Conflict resolution: Conflicts may arise during the merging process, such as inheritance relationships between classes; certain methods are needed to resolve these conflicts;
[0143] Ways to resolve these conflicts include:
[0144] Manual intervention: The conflicting entities are handed over to humans for decision-making and the most appropriate solution is selected;
[0145] Trade-off method: Evaluate different solutions and choose the one with the largest weight;
[0146] Merge method: merge the conflicting parts of the two ontologies to obtain a new ontology;
[0147] Abandonment method: abandon one of the entities or a part of the information;
[0148] Conversion method: convert conflicting information into another form so that they no longer conflict.
[0149] In step S3.1.3, the specific steps of mapping are as follows:
[0150] Create mapping relationships: Create mapping relationships between terms in different ontologies based on the term alignment results; the mapping relationship can be represented as a matrix, where each row represents a set of mapping relationships;
[0151] Conflict resolution: Conflicts may occur during the creation of mapping relationships, and certain methods are required to resolve these conflicts; the methods here are consistent with the conflict resolution methods in step S3.1.2;
[0152] Optimize the mapping relationship: Optimize the mapping relationship by using some algorithms, such as random walk algorithm, generative adversarial network, etc.
[0153] Determine the priority of the mapping relationship: Determine the priority of the mapping relationship according to different application scenarios and select the most appropriate mapping relationship.
[0154] like Figure 6 As shown, the entity fusion in step S3 specifically includes the following contents:
[0155] S3.2.1, data preprocessing, removing punctuation marks from entity names, performing synonym expansion, etc.;
[0156] S3.2.2, Chunking, assigning similar entities in different knowledge graphs to the same chunks through heuristic strategies, reducing the number of pairwise comparisons between entities;
[0157] S3.2.3, entity alignment, where pairwise alignment only matches the information of the two entities in an entity pair, which is essentially a binary classification problem, and collective alignment considers the information of the entire knowledge graph for matching;
[0158] S3.2.4, Feature matching, feature matching is performed based on text similarity and structure similarity.
[0159] The step S4 specifically includes ontology construction, knowledge reasoning, quality assessment and knowledge updating;
[0160] The ontology construction specifically includes:
[0161] S4.1.1. Calculate the parallel relationship between vertical concepts. By calculating the similarity of the parallel relationship between any two entities, it is possible to determine whether they belong to the same concept at the semantic level.
[0162] S4.1.2. Extract the relationship between entities. The entity-superordinate relationship extraction methods include grammar-based extraction and semantics-based extraction.
[0163] S4.1.3, generate an ontology, cluster the concepts obtained at each level, and assign one or more common hypernyms to each type of entity;
[0164] The knowledge reasoning specifically includes:
[0165] S4.2.1. Graph-based algorithmic reasoning, using the Co-PRA algorithm to search for graph structural features;
[0166] Preferably, the Co-PRA algorithm is used in step S4.2.1 to search for graph structure features, and the specific steps are as follows:
[0167] S4.2.1.1. Generate a preliminary path, and generate a path set P with a length less than l starting from h through a path search algorithm. h ; Generate a path set P with a length less than l starting from t through a path search algorithm t ;
[0168] S4.2.2.2. Calculate the probability of path features through PRA. For path π h ∈P h , calculate along the path π h The probability of reaching x from h in the forward direction is P(h→x; π h ), and along the path π h The probability of going from h to x in reverse Similarly, for the path π t ∈P t , calculate along the path π tThe probability of reaching x from t in the forward direction is P(t→x;π t ), and along the path π t The probability of going from t to x in reverse And put all x into the constant candidate set N;
[0169] S4.2.2.3. Generate candidate constant paths. For each (x∈N, π∈P t ) combination, if P(t→x;π t )>0, then the path feature is generated Where c = t, and the coverage value corresponding to the path feature is increased by 1, that is, Similarly, for every (x∈N,π∈P t ) combination, if Then the generated path feature P(t→x;π t ), where c = x, and the coverage value corresponding to the path feature is increased by 1, that is, coverage(P(c→t;π t ))+=1;
[0170] S4.2.2.4. Generate a longer set of path feature candidates. For each possible combination (x∈N,π h ∈P h , π t ∈P t ), if P(s←x;π s )>0 and Generate a path And update its coverage, that is At the same time, update its accuracy, that is, The same goes in reverse.
[0171] S4.2.2. Based on rule learning algorithm reasoning, the AMIE rule learning algorithm is adopted. The AMIE algorithm defines three mining operators, explores the search space on the graph by continuously adding mining operators to the rules, and incorporates pruning strategies;
[0172] S4.2.3 is based on the reasoning of the representation learning algorithm. The TransR model is used for reasoning. The TransR model embeds the graph into vectors, and then uses these vectors as the input of the algorithm. Finally, the one-to-one, one-to-many, many-to-one and many-to-many relationships between entities can be learned.
[0173] The quality assessment specifically includes:
[0174] S4.3.1. Evaluate the ontology based on the gold standard (the gold standard includes accuracy, completeness, consistency, reliability, usability and interpretability) and obtain the corresponding score a of the ontology;
[0175] S4.3.2 Evaluate the ontology based on the ontology task / application and obtain the corresponding score b of the ontology. These evaluations include:
[0176] ① Check whether the disease ontology covers all important disease characteristics and symptoms, and whether it can support the reasoning of disease diagnosis tasks;
[0177] ② Check whether the drug ontology covers all important drug properties and mechanisms of action, and whether it can support the reasoning of the medication recommendation task;
[0178] ③ Check whether the knowledge acquisition ontology covers all important knowledge sources and knowledge types, and whether it can support reasoning of knowledge acquisition tasks;
[0179] S4.3.3 Evaluate the ontology based on data-driven and obtain the corresponding score c of the ontology. These evaluations include:
[0180] ① Evaluate the quality of the disease ontology by comparing the symptoms and characteristics in the disease ontology with the real clinical data;
[0181] ② Evaluate the quality of the drug entity by comparing the mechanism of action and side effects in the drug entity with the actual clinical data;
[0182] ③ Evaluate the quality of the knowledge acquisition ontology by comparing the knowledge sources and knowledge types in the knowledge acquisition ontology with the real data;
[0183] S4.3.4. Take a weighted average of the above scores, evaluate the quality of the ontology based on the final score, and then comprehensively judge the quality of the atlas based on the quality of the ontology; the formula for the final score is as follows:
[0184]
[0185] Note: The value range of a, b, and c is 0 to 100 points.
[0186] Here, the corresponding relationship between the ontology quality assessment and the final score is:
[0187] Final score / points Quality Assessment 90~100 excellent 80~90 good 70~80 qualified <70 Difference
[0188] The knowledge update specifically includes:
[0189] S4.4.1. Update the model layer and ontology elements, including adding, modifying, and deleting concepts, updating concept attributes, and updating the hierarchical relationship between concepts. The medical industry is an industry with high professional requirements, and the update of the model layer requires the participation of industry experts;
[0190] S4.4.2. Update the data layer and entity elements, including adding, modifying, deleting entities, and updating basic information and attribute values of entities.
[0191] The method of the present invention can be used to construct a general knowledge graph in the medical field. Through data acquisition from multiple channels, powerful knowledge extraction and knowledge reasoning algorithms, knowledge fusion in two dimensions of ontology and entity, and reasonable quality assessment and knowledge updating methods, a comprehensive, high-quality, and continuously updated knowledge graph in the medical field can be obtained.
[0192] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for constructing a knowledge graph in the medical field, characterized in that: It includes S1, acquiring data related to the medical field, mainly including structured data, semi-structured data and unstructured data; S2, extracting and storing knowledge from the acquired data; S3, integrating existing knowledge, including ontology fusion and entity fusion; S4, processing knowledge on the knowledge graph, including ontology construction, knowledge reasoning, knowledge updating and quality assessment; the step S1 specifically includes the following contents: Obtain medical-related structured data, semi-structured data, and unstructured data by accessing existing medical-related system data, crawling medical data with web crawlers, and classifying and cleaning the acquired data; The steps for accessing existing medical-related system data are as follows: S1.1.
1. Research the existing medical system; S1.1.
2. Access existing medical system data; The steps for web crawlers to crawl medical data are as follows: S1.2.
1. Obtain the URL of the target medical data; S1.2.
2. Submit an HTTP request to the corresponding URL; S1.2.
3. Parse HTTP response; S1.2.
4. Store the analysis results.
2. A method for constructing a medical field knowledge graph according to claim 1, characterized in that: The step S2 specifically includes knowledge extraction from structured data and knowledge extraction from semi-structured and unstructured data, wherein the knowledge extraction from structured data is performed by mapping the knowledge from the relational database to the RDF data set using the R2RML mapping language; and the knowledge extraction from semi-structured and unstructured data is performed by using the LSTM-CRF named entity recognition model for entity extraction or using the PCNN segmented convolutional neural network for relationship extraction; finally, the extracted knowledge is stored in Jena (Apache's RDF triple database).
3. A method for constructing a medical field knowledge graph according to claim 2, characterized in that: When the LSTM-CRF named entity recognition model is used for entity extraction in step S2, the model construction process is as follows: S2.1.
1. Establish the Embedding layer to map words into word vectors; S2.1.2, establish n layers of bidirectional LSTM layers to learn the contextual semantic information of words; S2.1.3, establish a CRF layer to perform sequence labeling on each word; PCNN segmented convolutional neural network is used for relationship extraction. The model construction process is as follows: S2.2.
1. Establish an Embedding word vector extraction layer to map words and word position information into word vectors; S2.2.
2. Establish a convolution layer and perform segmented convolution operation on the text; S2.2.3, establish a max pooling layer; S2.2.
4. Establish the output layer, and use the softmax function as the activation function; When using DMCNN dynamic multi-pooling convolutional neural network for event extraction, the model construction process is as follows: S2.3.
1. Establish an Embedding word vector extraction layer to map words and word position information into word vectors. S2.3.
2. Establish a sentence-level feature extraction layer, including: S2.3.2.
1. Establish a convolution layer and perform segmented convolution operations on the text; S2.3.2.2, establish a max pooling layer; S2.3.3, establish a vocabulary-level feature extraction layer; S2.3.4, merge the vectors obtained by the sentence-level feature extraction layer and the word-level feature extraction layer; S2.3.
5. Establish the output layer, and use the softmax function as the activation function.
4. The method for constructing a medical field knowledge graph according to claim 1, characterized in that: The ontology fusion in step S3 specifically includes the following contents: S3.1.
1. Import the ontology to be mapped. The ontology to be mapped does not necessarily need to be converted into a unified ontology language format, but it is necessary to ensure that the components in the ontology that need to be mapped can be easily obtained; S3.1.2, Mapping discovery, based on the terminology-based ontology fusion algorithm, to find the connections between heterogeneous ontologies, and then establish mapping rules between heterogeneous ontologies based on these connections; S3.1.3, Representation mapping, when the mappings between ontologies are found, these mappings need to be represented reasonably.
5. A method for constructing a medical field knowledge graph according to claim 4, characterized in that: In step S3.1.2, the terminology-based ontology fusion algorithm includes the following contents: Term alignment: Align the terms in the ontology to find the corresponding relationship between them. The alignment method uses string matching and semantic similarity calculation; Term mapping: Based on the alignment results, the terms in the ontology are mapped, that is, the terms in different ontologies are mapped to the same term; Structural merging: Based on the term mapping results, the structures of the ontologies are merged, that is, the relationships between classes, attributes, instances, etc. in different ontologies are merged; Conflict resolution: Conflicts may arise during the merging process, such as inheritance relationships between classes; Certain methods need to be adopted to resolve these conflicts; Ways to resolve these conflicts include: Manual intervention: The conflicting entities are handed over to humans for decision-making and the most appropriate solution is selected; Trade-off method: Evaluate different solutions and choose the one with the largest weight; Merge method: merge the conflicting parts of the two ontologies to obtain a new ontology; Abandonment method: abandon one of the entities or a part of the information; Conversion method: convert conflicting information into another form so that they no longer conflict.
6. A method for constructing a medical field knowledge graph according to claim 4, characterized in that: In step S3.1.3, the specific steps of mapping are as follows: Create mapping relationships: Create mapping relationships between terms in different ontologies based on the term alignment results; the mapping relationship can be represented as a matrix, where each row represents a set of mapping relationships; Conflict resolution: Conflicts may occur during the creation of mapping relationships, and certain methods are required to resolve these conflicts; the methods here are consistent with the conflict resolution methods in step S3.1.2; Optimize the mapping relationship: Optimize the mapping relationship by using some algorithms, such as random walk algorithm, generative adversarial network, etc. Determine the priority of the mapping relationship: Determine the priority of the mapping relationship according to different application scenarios and select the most appropriate mapping relationship.
7. The method for constructing a medical field knowledge graph according to claim 1, characterized in that: The entity fusion in step S3 specifically includes the following contents: S3.2.1, data preprocessing, removing punctuation marks from entity names, performing synonym expansion, etc.; S3.2.2, Chunking, assigning similar entities in different knowledge graphs to the same chunks through heuristic strategies, reducing the number of pairwise comparisons between entities; S3.2.3, entity alignment, where pairwise alignment only matches the information of the two entities in an entity pair, which is essentially a binary classification problem, and collective alignment considers the information of the entire knowledge graph for matching; S3.2.4, Feature matching, feature matching is performed based on text similarity and structure similarity.
8. The method for constructing a medical field knowledge graph according to claim 1, characterized in that: The step S4 specifically includes ontology construction, knowledge reasoning, quality assessment and knowledge updating; The ontology construction specifically includes: S4.1.
1. Calculate the parallel relationship between vertical concepts. By calculating the similarity of the parallel relationship between any two entities, it is possible to determine whether they belong to the same concept at the semantic level. S4.1.
2. Extract the relationship between entities. The entity-superordinate relationship extraction methods include grammar-based extraction and semantics-based extraction. S4.1.3, generate an ontology, cluster the concepts obtained at each level, and assign one or more common hypernyms to each type of entity; The knowledge reasoning specifically includes: Based on the graph-based algorithm reasoning, the Co-PRA algorithm is used to search for graph structural features; based on the rule learning algorithm reasoning, the AMIE rule learning algorithm is used. The AMIE algorithm defines three mining operators, which explore the search space on the graph by continuously adding mining operators to the rules, and incorporates pruning strategies; based on the representation learning algorithm reasoning, the TransR model is used for reasoning. The TransR model embeds the graph into vectors, and then uses these vectors as the input of the algorithm. Finally, the one-to-one, one-to-many, many-to-one and many-to-many relationships between entities can be learned; The quality assessment specifically includes: S4.3.
1. Evaluate the ontology based on the gold standard (the gold standard includes accuracy, completeness, consistency, reliability, usability and interpretability) and obtain the corresponding score a of the ontology; S4.3.2 Evaluate the ontology based on the ontology task / application and obtain the corresponding score b of the ontology. These evaluations include: ① Check whether the disease ontology covers all important disease characteristics and symptoms, and whether it can support the reasoning of disease diagnosis tasks; ② Check whether the drug ontology covers all important drug properties and mechanisms of action, and whether it can support the reasoning of the medication recommendation task; ③ Check whether the knowledge acquisition ontology covers all important knowledge sources and knowledge types, and whether it can support reasoning of knowledge acquisition tasks; S4.3.3 Evaluate the ontology based on data-driven and obtain the corresponding score c of the ontology. These evaluations include: ① Evaluate the quality of the disease ontology by comparing the symptoms and characteristics in the disease ontology with the real clinical data; ② Evaluate the quality of the drug entity by comparing the mechanism of action and side effects in the drug entity with the actual clinical data; ③ Evaluate the quality of the knowledge acquisition ontology by comparing the knowledge sources and knowledge types in the knowledge acquisition ontology with the real data; S4.3.
4. Take a weighted average of the above scores, evaluate the quality of the ontology based on the final score, and then comprehensively judge the quality of the atlas based on the quality of the ontology; the formula for the final score is as follows: The knowledge update specifically includes: S4.4.
1. Update the model layer and ontology elements, including adding, modifying, and deleting concepts, updating concept attributes, and updating the hierarchical relationship between concepts. The medical industry is an industry with high professional requirements, and the update of the model layer requires the participation of industry experts; S4.4.
2. Update the data layer and entity elements, including adding, modifying, deleting entities, and updating basic information and attribute values of entities.
9. A method for constructing a medical field knowledge graph according to claim 8, characterized in that: In step S4.2.1, the Co-PRA algorithm is used to search for graph structure features. The specific steps are as follows: S4.2.1.
1. Generate a preliminary path, and generate a path set P with a length less than l starting from h through a path search algorithm. h ; Generate a path set P with a length less than l starting from t through a path search algorithm t ;; S4.2.2.
2. Calculate the probability of path features through PRA. For path π h ∈P h , calculate along the path π h The probability of reaching x from h in the forward direction is P(h→x; π h ), and along the path π h The probability of going from g to x in reverse Similarly, for the path π t ∈P t , calculate along the path π t The probability of reaching x from t in the forward direction is P(t→x;π t ), and along the path π t The probability of going from t to x in reverse And put all x into the constant candidate set N; S4.2.2.
3. Generate candidate constant paths. For each (x∈N,π∈P t ) combination, if P(t→x;π t )>0, then the path feature is generated Where c = t, and the coverage value corresponding to the path feature is increased by 1, that is, Similarly, for every (x∈N,π∈P t ), if Then the generated path feature P(t→x;π t ), where c = x, and the coverage value corresponding to the path feature is increased by 1, that is, coverage(P(c→t;π t ))+=1; S4.2.2.
4. Generate a longer set of path feature candidates. For each possible combination (x∈N,π h ∈P h ,π t ∈P t ), if P(s←x;π s )>0 and Generate a path And update its coverage, that is At the same time, update its accuracy, that is, The same goes in reverse.
Citation Information
Cited By
Boar growth performance measurement data integration method and device
CN119323005A
Intelligent follow-up method and system for chronic atrophic gastritis based on multi-source electronic medical records
CN119763795A
Intelligent follow-up method and system for chronic atrophic gastritis based on multi-source electronic medical records
CN119763795B
