Multi-source knowledge graph construction method based on medical health data

By using a pre-trained knowledge distillation model and an ERNIE-UIE model for grammatical correction and knowledge extraction, and combining the JAPE algorithm and Word2vec for entity and attribute alignment, the problem of long construction cycles for multi-source knowledge graphs of medical and health data is solved, achieving rapid construction and efficient entity alignment.

CN118780357APending Publication Date: 2024-10-15NORTHEASTERN UNIV CHINA

Patent Information

Application Number
CN202410990001.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing technologies are time-consuming and cannot be implemented quickly when constructing multi-source knowledge graphs based on medical and health data.

Method used

A pre-trained knowledge distillation model is used for grammatical correction preprocessing, the ERNIE-UIE model is used for knowledge extraction, and the JAPE algorithm is used for entity alignment and Word2vec semantic similarity is used for attribute alignment to construct a multi-source knowledge graph.

Benefits of technology

It shortens the creation cycle of multi-source knowledge graphs, realizes semi-automatic schema construction, solves the problem of entity alignment in multi-source data, and improves construction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780357A_ABST
    Figure CN118780357A_ABST
Patent Text Reader

Abstract

The invention provides a multi-source knowledge graph construction method based on medical health data. The method comprises the steps that a medical health data set is acquired; performing grammar correction preprocessing on the medical health data set by adopting a pre-trained knowledge distillation model; correcting the preprocessed medical health data according to grammar, and constructing schema; performing knowledge extraction on the constructed schema by adopting an ERNIE-UIE model to obtain a single-source knowledge graph; and performing entity alignment and attribute alignment on the single-source knowledge graph to obtain a multi-source knowledge graph. According to the method, the creation period of the multi-source knowledge graph can be shortened, and the requirement of rapid implementation can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of knowledge graph construction, and specifically relates to a multi-source knowledge graph construction method based on medical and health data. Background Art

[0002] Knowledge graph is a structured semantic knowledge base, a method of using graph models to describe the connections between all things in the world. Knowledge graph consists of nodes and edges. Nodes are generally entities, such as people or organizations; edges can be attributes or relationships between entities. The medical and health field has a huge amount of industry knowledge. Building an industry knowledge graph based on medical and health data will help promote the development of industry cognitive intelligence applications.

[0003] The construction of a knowledge graph usually includes the following steps: knowledge modeling, knowledge storage, knowledge extraction, knowledge fusion, knowledge computing, and knowledge application. First, domain experts design and build the schema (ontology) of the industry knowledge graph. Design the underlying storage method for building the knowledge graph to complete the storage of various types of knowledge. Then use NLP technology (Natural Language Processing, NLP) to extract entities, attributes, and relationships between entities from various data sources. Then fuse the knowledge extracted from various data sources, and perform entity alignment, attribute alignment, and other tasks. The fused new knowledge can be added to the knowledge base after passing the quality assessment.

[0004] When building a knowledge graph in an industry, schema construction is usually one of the links that greatly affects the rapid advancement of the project. In the process of implementing knowledge graph-based applications in various industries, most industries have not been exposed to knowledge graphs, and therefore have not accumulated knowledge schemas in the industry to build industry graphs. At the same time, since the concept of knowledge graphs is relatively new, industry business experts need a process from understanding to proficient schema construction, and this process often requires frequent intervention from algorithm personnel. In this way, when implementing map-related applications in a new industry, building a complete schema often requires weeks or even months of time.

[0005] In addition, the more representative existing entity alignment algorithms are network-based methods and iteration-based methods. The main idea of ​​the network-based method is to use the network structure between entities as the basis for entity fusion. Determining whether two entities point to the same object depends not only on the entity itself, but also on judging the similarity of its associated nodes. One of the representative algorithms is the method based on graph similarity propagation. Its main process is to map entities in multiple entity graphs based on the matching degree of the network structure around the node, that is, when a node matches a node, the neighboring nodes of the two should also match.

[0006] At present, there are also entity alignment methods based on knowledge graph representation learning. It mainly includes three modules, namely, embedding module, interaction module, and alignment module. There are currently three main methods for the embedding module. One is to use TransE and its improved series to embed relational structure information; one is to use GNN to build an adjacency relationship graph for embedding; and one is to use GNN's improved model GCN to embed structural information. There are mainly two types of information used by the embedding module, namely structural information and attribute information. The role of the interaction module is mainly to map two different knowledge graphs to the same vector space so that the vectors are calculated in the same space. At present, the bridge connecting the two knowledge graphs is mainly the pre-aligned entity pairs. The two knowledge graphs are unified by transforming and calibrating the pre-aligned entity pairs in different vector spaces. The role of the alignment module is mainly to calculate the distance based on the embedded entity vectors. In addition, some reasoning strategies can be used to select entities to be aligned.

[0007] To sum up, in the existing technology, building a multi-source knowledge graph based on medical and health data takes a lot of time and a long cycle, and cannot be implemented quickly. Summary of the invention

[0008] In view of the shortcomings of the existing technology, this application proposes a method for constructing a multi-source knowledge graph based on medical and health data, including:

[0009] Access healthcare datasets;

[0010] Using a pre-trained knowledge distillation model to perform grammatical correction preprocessing on the medical health dataset;

[0011] Correct the preprocessed medical and health data according to the syntax and build the schema;

[0012] The ERNIE-UIE model is used to extract knowledge from the constructed schema to obtain a single-source knowledge graph;

[0013] Perform entity alignment and attribute alignment on the single-source knowledge graph to obtain a multi-source knowledge graph.

[0014] The obtaining of the medical health data set includes:

[0015] Crawler technology extracts unstructured data from HTML web pages;

[0016] Use paddleOCR to recognize PDF text and extract text content;

[0017] The unstructured data and the text content are combined into a medical health data set.

[0018] The pre-trained knowledge distillation model includes: using chatgpt4 as a teacher model and chatglm2-6b as a student model to train the knowledge distillation model to obtain the pre-trained knowledge distillation model.

[0019] The method of correcting the pre-processed medical and health data according to the grammar and constructing a schema includes:

[0020] The LAC word segmentation database is used to segment the medical and health data after grammatical correction preprocessing, and verb phrases are extracted, and all the extracted verb phrases are combined into a verb set;

[0021] Use the word frequency-inverse document frequency algorithm to analyze all extracted verb phrases, extract key verbs, and form a key verb set with all extracted key verbs;

[0022] Based on the single text in the medical and health data after grammatical correction preprocessing, the Word2vec model is used to construct the word vectors of the verb set and the key verb set;

[0023] According to the similarity between word vectors, the entity relationship subset is filtered out;

[0024] A subset of entity relationships in a single text and predefined entity attributes form a schema.

[0025] The ERNIE-UIE model is used to extract knowledge from the constructed schema to obtain a single-source knowledge graph, including:

[0026] The ERNIE-UIE model is used to traverse all schemas to perform entity recognition, event extraction, and time element extraction to obtain structured knowledge;

[0027] According to the structured knowledge, a single-source knowledge graph is obtained, and the single-source knowledge graph includes: relationship triples and attribute triples.

[0028] The entity alignment and attribute alignment of the single-source knowledge graph to obtain the multi-source knowledge graph includes:

[0029] The JAPE algorithm is used to align entity triples and attribute triples;

[0030] Word2vec semantic similarity is used to align attribute triplets.

[0031] The JAPE algorithm is used to perform entity alignment on the relationship triples and attribute triples, including:

[0032] Assume that the first knowledge graph and the second knowledge graph are aligned entity pairs;

[0033] According to the relationship triples between the first knowledge graph and the second knowledge graph, a structural embedding is obtained;

[0034] Obtain attribute embedding according to the attribute triples of the first knowledge graph and the second knowledge graph;

[0035] Calculate the similarity between entities according to the attribute embedding to obtain a similarity matrix;

[0036] Combine the similarity matrix with the structural embedding to get the final embedding;

[0037] Alignment is performed according to the final embedding to obtain an entity alignment result.

[0038] The method of using Word2vec semantic similarity to align attribute triples includes:

[0039] Step S521: Calculate the word vector of each attribute in the attribute triple using Word2vec semantic similarity;

[0040] Step S522: Calculate similar attributes of different attributes based on the word vectors;

[0041] Step S523: If the similar attributes exist in different data sources in the medical and health data set, and the Cosine distance of the similar attributes is greater than the set value, then the different attributes are aligned at this time, and the result after attribute alignment is output; otherwise, step S524 is executed;

[0042] Step S524: fuse the attributes in different data sources, construct a fused attribute relationship set, and use the fused attribute relationship set as the result of attribute alignment.

[0043] Beneficial effects:

[0044] This application proposes a method and system for constructing a multi-source knowledge graph based on medical and health data. This application proposes a solution for semi-automatic schema construction in the medical and health field, which can shorten the creation cycle of multi-source knowledge graphs and meet the needs of rapid implementation. This application also solves the problem of entity alignment in the fusion construction of multi-source data knowledge graphs. There is often overlapping or complementary knowledge for the same object in multi-source data. The goal of entity alignment is to unify objects that describe the same real world. Early entity alignment work generally used manual annotation methods, but as the size of the knowledge base increased, it became more and more troublesome to handle. This application realizes the automatic mining of equivalent entity pairs from the knowledge base to construct a knowledge base. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A flowchart of a method for constructing a multi-source knowledge graph based on medical and health data in an embodiment of the present application;

[0046] Figure 2 Schematic diagram of the knowledge graph construction process of the embodiment of the present application;

[0047] Figure 3 Flowchart of knowledge distillation fine-tuning chatglm2-6b in the embodiment of the present application;

[0048] Figure 4 Framework diagram of the entity alignment algorithm JAPE in the embodiment of the present application;

[0049] Figure 5 Semi-automatic schema construction flow chart of an embodiment of the present application. DETAILED DESCRIPTION

[0050] The specific implementation of the present application is further described in detail below in conjunction with the drawings and examples.

[0051] The present invention proposes a solution for semi-automatic schema construction in the medical and health field.

[0052] Example:

[0053] This embodiment proposes a method for constructing a multi-source knowledge graph based on medical and health data. Figure 1 , Figure 2 As shown, including:

[0054] Step S1: Obtain medical health data set;

[0055] In this embodiment, the medical health data set construction part crawls HTML data from Wikipedia, Hudong Baike, Baidu Baike, as well as real-world doctor-patient conversations, professional books in the medical field, and other PDF document data.

[0056] Step S2: using a pre-trained knowledge distillation model to perform grammar correction preprocessing on the medical health dataset;

[0057] Step S3: constructing a schema based on the preprocessed medical and health data after grammar correction;

[0058] Step S4: Use the ERNIE-UIE model to extract knowledge from the constructed schema to obtain a single-source knowledge graph;

[0059] Step S5: Automatically align entities and attributes on the single-source knowledge graph to obtain a multi-source knowledge graph.

[0060] In step S1, obtaining a medical health data set specifically includes:

[0061] Step S11: extracting unstructured data from HTML web pages using crawler technology;

[0062] In this embodiment, web data collection is performed by using the web automatic crawler technology based on Python + Selenium and PhantomJS, and the extracted text data set is saved locally. The links of the entry search web pages are selected from the three major encyclopedias as URL seeds, and the crawler based on Webdriver and PhantomJS technologies is called by Python to sequentially traverse and access the seed URLs. Access is performed through the URL. For example, to search for information on "diabetes" in the Hudong Encyclopedia, the corresponding URL is "http: / / www.baike.com / wiki / 糖尿病".

[0063] Step S12: Use paddleOCR to recognize the pdf text and extract the text content;

[0064] In this embodiment, for data sources in pdf format, there are mainly two forms. One is converted from text and can be directly copied and pasted; the other is scanned documents, such as photocopied books and documents made by inserting pictures. Use PyPDF2 for text extraction and pdfplumber for table extraction; for scanned documents, first convert the document into pictures, and then use OCR to extract the content. In this embodiment, the paddleOCR library is used.

[0065] Step S13: Combine the unstructured data and the text content to form a medical and health data set.

[0066] In step S2, it is necessary to perform grammar correction preprocessing on the medical and health data set using a pre-trained knowledge distillation model; since the quality of some data sets is poor and there are grammar error problems, which affect further information extraction work. First, use the knowledge distillation method to enhance the grammar correction ability of the chatglm2-6b model, as Figure 3 shown. Since commercial models such as chatgpt cannot be locally deployed and cannot meet the data privacy requirements for internal document processing, while the text processing ability of the chatglm2-6b model is weak. To solve this problem, the chatgpt4.0 model is used as the teacher model and the chatglm2-6b model is used as the student model, and the knowledge of its text processing ability is transferred to the student model by calling the api of chatgpt4.0.

[0067] In step S3: Based on the medical and health data after grammar correction preprocessing, construct a schema, including:

[0068] Step S31: Use the LAC word segmentation library to perform word segmentation on the medical and health data after grammar correction preprocessing, extract verb phrases, and form a verb set with all the extracted verb phrases;

[0069] In this embodiment, firstly, the LAC word segmentation analysis tool is used to perform word segmentation and part-of-speech analysis to extract all verb phrases in the medical and health data after grammatical correction preprocessing. Since there are often many meaningless words in the verb phrases, further screening is required.

[0070] Step S32: using a word frequency-inverse document frequency algorithm to analyze all extracted verb phrases, extract key verbs, and form a key verb set with all extracted key verbs;

[0071] In this embodiment, meaningless phrases are filtered by using the TD-IDF algorithm to calculate the word weights. TF-IDF (Term Frequency-Invers Document Frequency) is a weighting technique commonly used in information processing and data mining. This technique uses a statistical method to calculate the importance of a word in the entire corpus based on the number of times the word appears in the text and the document frequency in the entire corpus. Its advantage is that it can filter out some common but insignificant words while retaining important words that affect the entire text.

[0072] TF_IDF i,j =TF i,j ×IDF j

[0073] Among them, IDF i is the frequency of the i-th document, TF_IDF i,j TF is term frequency minus pseudo-document frequency. i,j is the frequency of occurrence of the jth key verb in the i-th text, calculated as follows:

[0074]

[0075] Among them, n i,j is the number of times the jth keyword appears in the i-th text, n k,j is the number of times the jth keyword appears in the kth text.

[0076] IDF, or inverse document frequency, is a measure of word commonness, reflecting the rarity of a word. It is used to reduce the effect of some common words in all documents that have little impact on the document. The calculation formula is as follows:

[0077]

[0078] Where D is the total number of documents, df j is the number of documents containing word j.

[0079] The TD-IDF algorithm was used to calculate the weight of each verb phrase, and entity relationship phrases were automatically constructed by removing redundant words, eliminating the need for manual screening and summarization.

[0080] Step S33: constructing word vectors of a verb set and a key verb set using a Word2vec model according to a single text in the medical health data after grammar correction preprocessing;

[0081] Step S34: Filter and obtain entity relationship word subsets according to the similarity between word vectors;

[0082] Step S35: Construct a schema with the entity relationship word subset and predefined entity attributes in a single text.

[0083] In this embodiment, in a single text in the medical and health data after grammatical correction preprocessing, the word vectors of the verb set and the key verb set are constructed by the Word2vec model, and then the entity relationship word subset present in this text is screened out by calculating the word similarity. The relationship words between entities can usually be represented by words in the text. In this embodiment, the entity relationship word set is extracted in the form of unsupervised extraction. In addition, considering that the entity attribute relationship is relatively limited and does not exist in the original text, for example, (Zhang San, birth year, 90s) is extracted from the sentence "Zhang San, post-90s, likes the second dimension", where "birth year" is implicit. It is difficult to realize automatic extraction, so it is chosen to be manually summarized and refined by experts. Since adding all keywords to the schema will affect the analysis speed of subsequent steps, when extracting information for each text, the similarity between the verb set and the keyword set in the article is first analyzed by word vector calculation, and a subset of keywords with high relevance is screened out to dynamically construct the text schema, which effectively improves the speed of information extraction in the next step.

[0084] In order to describe the detailed process of semi-automatic schema construction in more detail, this embodiment lists a program example as follows: Figure 5 As shown:

[0085] Step S301: Use the LAC word segmentation library to perform word segmentation processing on the medical and health data after grammar correction preprocessing, and extract all verb phrases V;

[0086] Step S302: Analyze all extracted verb phrases using a word frequency-inverse document frequency algorithm to extract key verbs;

[0087] Step S303: using the Word2vec model to calculate and merge similar words to obtain a final verb relationship set D;

[0088] Step S304: processing the individual texts T(i) in the medical and health data after grammar correction preprocessing respectively;

[0089] Step S304: Initialize schema(i) to an empty set;

[0090] Step S305: Calculate the similarity between the verb V(i) in the single text and the words in the final verb relationship set D;

[0091] Step S306: extracting verb related words with high similarity;

[0092] Step S307: concatenate the attribute relationship set summarized by the experts (i.e., predefined entity attributes) and the extracted verb relationship words with high similarity to obtain schema (i);

[0093] Step S308: input schema(i) into the ERNIE-UIE model for knowledge extraction;

[0094] Step S309: Determine whether there is any unprocessed text. If yes, go to step S304 to process the next text; if no, end the schema building process.

[0095] In step S4, the ERNIE-UIE model is used to extract knowledge from the constructed schema to obtain a single-source knowledge graph, including:

[0096] Step S41: Use the ERNIE-UIE model to traverse all schemas to perform entity recognition, event extraction, and time element extraction to obtain structured knowledge;

[0097] In this embodiment, the ERNIE-UIE model is a Wenxin model. In the process of knowledge extraction, the universal information extraction unified framework UIE (Universal Information Extraction) proposed by Yaojie Lu et al. in ACL-2022 is used. This framework realizes the unified modeling of tasks such as entity extraction, relationship extraction, and event extraction, and enables good migration and generalization capabilities between different tasks. Based on the ERNIE3.0 knowledge enhancement pre-training model, PaddleNLP trained and open-sourced the first Chinese universal information extraction model UIE, which can achieve zero-sample fast cold start and has excellent small sample fine-tuning capabilities. The constructed schema and a single text are passed into the ERNIE-UIE model for information extraction.

[0098] Step S42: According to the structured knowledge, a single-source knowledge graph is obtained, wherein the single-source knowledge graph includes relationship triples and attribute triples.

[0099] In this embodiment, after obtaining the single-source knowledge graph, the extraction results are further formatted to obtain SPO (subject, predicate, object) triples, including: relationship triples and attribute triples.

[0100] After obtaining the triples, it is necessary to fuse the multi-source knowledge graphs and perform entity alignment and attribute alignment. Since the data in the multi-source knowledge graphs are multi-source heterogeneous, for example, "new coronavirus" and "COVID-19" actually refer to the same entity, but the entity names are different due to different expressions in different data sources. In order to unify the data in the process of fusing the multi-source knowledge graphs, this problem needs to be solved.

[0101] This embodiment uses the JAPE algorithm in the entity alignment process. Traditional entity alignment methods include using structural information for entity alignment, such as MTransE, BootEA, etc.; and the Schema-Agnostic algorithm that uses attribute information for entity alignment. When only structural information is used, the attribute information of the knowledge graph is ignored, and attribute information has the characteristics of higher accuracy and can improve the entity alignment effect. However, only using attribute information ignores the structure of the knowledge graph and the connection between entities. For this reason, this embodiment proposes the JAPE algorithm, an entity alignment method using structural information and attribute names.

[0102] The basic idea of ​​the JAPE algorithm is to obtain the structural embedding SE according to the relationship triples, and the attribute embedding EA according to the attribute triples, and finally combine SE and EA to obtain the embedding of all entities in the two knowledge graphs, such as Figure 4 shown.

[0103] In step S5, the entity alignment and attribute alignment are performed on the single-source knowledge graph to obtain a multi-source knowledge graph, including:

[0104] Step S51: Using the JAPE algorithm to perform entity alignment on the relationship triples and attribute triples, including:

[0105] Step S511: Assume that the first knowledge graph and the second knowledge graph are aligned entity pairs;

[0106] Step S512: Obtaining a structural embedding according to the relationship triples between the first knowledge graph and the second knowledge graph;

[0107] The purpose of structural embedding is to model two knowledge bases and learn approximate representations of potential aligned triplets. For a relation triple tr = (h, r, t), we hope that h + r = t, where h is the head entity, r is the attribute relationship, and t is the tail entity. In order to measure the credibility of tr, the score function f (tr) = ||h + rt|| is defined.2 , and we hope that the value of f(tr) is as small as possible. At the same time, by randomly replacing the head or tail entity (not both at the same time), negative triples are generated. For learning the high score of negative triples f(tr′), there is a coincidence of reducing errors.

[0108] In summary, we tend to give low scores to existing relation triples (positive triples) and high scores to negative triples, thereby minimizing the following objective function:

[0109]

[0110] Where T represents the set of all positive triples, T′ tr represents the corresponding set of negative triplets, α is a ratio hyperparameter used to weight positive and negative triplets, and its range is [0,1].

[0111] Step S513: Obtain attribute embedding according to the attribute triples of the first knowledge graph and the second knowledge graph;

[0112] In this embodiment, if a group of attributes are often used to describe an entity, they are called relevant attributes. In order to capture the correlation between attributes, AE borrows the idea of ​​Skip-gram and predicts relevant attributes. AE minimizes the following objective function:

[0113]

[0114] Wherein, H represents a set of positive (a, c) pairs, that is, c is a related attribute of a (in this embodiment, c is the attribute triple of the second knowledge graph, and a is the attribute triple of the first knowledge graph). a,c Represents the type weight. If the types of the attribute triples between the first knowledge graph and the second knowledge graph are different, w a,c is 1, otherwise it is 2, so as to increase the probability of being close to each other. This embodiment distinguishes five attribute types, namely, disease-related attributes, patient-related attributes, drug-related attributes, medical equipment-related attributes and medical institution-related attributes.

[0115] Step S514: Calculate the similarity between entities according to the attribute embedding to obtain a similarity matrix;

[0116] In this embodiment, after having attribute embedding, the entity representation is taken as the normalized average value of its attribute vector. The similarity between entities is measured using the cosine distance method to obtain a similarity matrix, which is calculated as follows:

[0117]

[0118] Among them, S (1,2)is the similarity matrix between the entities of data source 1 and the entities of data source 2, indicating the cosine similarity between the entities. is the first attribute embedding, Embedded as the second attribute.

[0119] Step S515: combining the similarity matrix with the structural embedding to obtain the final embedding;

[0120] In this embodiment, the similarity matrix is ​​combined with the structural embedding to obtain the joint attribute embedding, and the pairwise similarity matrix between entities is used to construct the following objective function:

[0121]

[0122] Among them, β is a hyperparameter that balances the similarity between and within data sources; F is the F-paradigm operation, and E SE It is a matrix of entity vectors representing a data source, where one row represents one entity; By superimposing the similarity vectors of the entities in data source 2, the potential vector of the entity in data source 1 is calculated.

[0123] In order to preserve the structure and attribute information of the two knowledge graphs for entity alignment, the following objective function is minimized together:

[0124] O joint =O SE +δO S

[0125] Among them, δ is given by O S The hyperparameter of the weight, O S is the pairwise similarity matrix between entities, O joint is a common objective function containing both structural and attribute information, O SE Embedded structure.

[0126] Step S515: performing alignment according to the final embedding to obtain an entity alignment result.

[0127] Step S52: Using Word2vec semantic similarity to perform attribute alignment on attribute triples, including:

[0128] Step S521: Calculate the word vector of each attribute in the attribute triple using Word2vec semantic similarity;

[0129] Step S522: Calculate similar attributes of different attributes based on the word vectors;

[0130] Step S523: If the similar attributes exist in different data sources in the medical and health data set, and the Cosine distance of the similar attributes is greater than the set value, then the different attributes are aligned at this time, and the result after attribute alignment is output; otherwise, step S524 is executed;

[0131] Step S524: fuse the attributes in different data sources, construct a fused attribute relationship set, and use the fused attribute relationship set as the result of attribute alignment.

[0132] In this embodiment, there may be synonyms in the filtered keyword group. For example, "Chinese name" and "Chinese name" are a pair of similar attribute values ​​that should be deduplicated, so further attribute alignment is required.

[0133] This embodiment uses the Word2vec model to construct a word vector for each keyword. The word vector is then used to calculate the similar attributes of different attributes. If similar attributes exist in different data sources and the Cosine distance is greater than a certain value, the attributes are considered aligned. Otherwise, similar attributes are fused and deduplicated. The formula for calculating word similarity is as follows:

[0134]

[0135] Among them, Word1 is the first word vector, Word2 is the second word vector, n represents the dimension of the word vector, and k is the kth word vector, which is usually 50 or 100. k Represents each eigenvalue as a real number, the numerator represents the dot product of the two word vectors, and the denominator represents the product of the two word vector modules.

[0136] The various embodiments in the present application are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0137] The protection scope of the present application is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.

Claims

1. A method for constructing a multi-source knowledge graph based on medical and health data. It is characterized in that include: Access healthcare datasets; Using a pre-trained knowledge distillation model to perform grammatical correction preprocessing on the medical health dataset; Correct the preprocessed medical and health data according to the syntax and build the schema; The ERNIE-UIE model is used to extract knowledge from the constructed schema to obtain a single-source knowledge graph; Perform entity alignment and attribute alignment on the single-source knowledge graph to obtain a multi-source knowledge graph.

2. According to claim 1, the method for constructing a multi-source knowledge graph based on medical and health data, It is characterized in that The obtaining of the medical health data set includes: Crawler technology extracts unstructured data from HTML web pages; Use paddleOCR to recognize PDF text and extract text content; The unstructured data and the text content are combined into a medical health data set.

3. The method for constructing a multi-source knowledge graph based on medical and health data according to claim 1, It is characterized in that The pre-trained knowledge distillation model includes: using chatgpt4 as a teacher model and chatglm2-6b as a student model to train the knowledge distillation model to obtain the pre-trained knowledge distillation model.

4. The method for constructing a multi-source knowledge graph based on medical and health data according to claim 1, It is characterized in that The method of correcting the pre-processed medical and health data according to the grammar and constructing a schema includes: The LAC word segmentation database is used to segment the medical and health data after grammatical correction preprocessing, and verb phrases are extracted, and all the extracted verb phrases are combined into a verb set; Use the word frequency-inverse document frequency algorithm to analyze all extracted verb phrases, extract key verbs, and form a key verb set with all extracted key verbs; Based on the single text in the medical and health data after grammatical correction preprocessing, the Word2vec model is used to construct the word vectors of the verb set and the key verb set; According to the similarity between word vectors, the entity relationship subset is filtered out; A subset of entity relationships in a single text and predefined entity attributes form a schema.

5. The method for constructing a multi-source knowledge graph based on medical and health data according to claim 1, It is characterized in that The ERNIE-UIE model is used to extract knowledge from the constructed schema to obtain a single-source knowledge graph, including: The ERNIE-UIE model is used to traverse all schemas to perform entity recognition, event extraction, and time element extraction to obtain structured knowledge; According to the structured knowledge, a single-source knowledge graph is obtained, and the single-source knowledge graph includes: relationship triples and attribute triples.

6. The method for constructing a multi-source knowledge graph based on medical and health data according to claim 5, It is characterized in that The entity alignment and attribute alignment of the single-source knowledge graph to obtain the multi-source knowledge graph includes: The JAPE algorithm is used to align entity triples and attribute triples; Word2vec semantic similarity is used to align attribute triplets.

7. The method for constructing a multi-source knowledge graph based on medical and health data according to claim 6, It is characterized in that The JAPE algorithm is used to perform entity alignment on the relationship triples and attribute triples, including: Assume that the first knowledge graph and the second knowledge graph are aligned entity pairs; According to the relationship triples between the first knowledge graph and the second knowledge graph, a structural embedding is obtained; Obtain attribute embedding according to the attribute triples of the first knowledge graph and the second knowledge graph; Calculate the similarity between entities according to the attribute embedding to obtain a similarity matrix; Combine the similarity matrix with the structural embedding to get the final embedding; Alignment is performed according to the final embedding to obtain an entity alignment result.

8. The method for constructing a multi-source knowledge graph based on medical and health data according to claim 6, It is characterized in that The method of using Word2vec semantic similarity to align attribute triples includes: Step S521: Calculate the word vector of each attribute in the attribute triple using Word2vec semantic similarity; Step S522: Calculate similar attributes of different attributes based on the word vectors; Step S523: If the similar attributes exist in different data sources in the medical and health data set, and the Cosine distance of the similar attributes is greater than the set value, then the different attributes are aligned at this time, and the result after attribute alignment is output; otherwise, step S524 is executed; Step S524: fuse the attributes in different data sources, construct a fused attribute relationship set, and use the fused attribute relationship set as the result of attribute alignment.

Citation Information

Patent Citations

  • Automatic Chinese text knowledge graph construction method and automatic Chinese text knowledge graph construction system

    CN106844658A

  • Knowledge graph entity attribute alignment algorithm based on semantic similarity

    CN114996467A

  • Multi-source data difference traceability retrieval method based on knowledge graph

    CN115809345A

  • Multi-source data-oriented medical industry high-credibility knowledge graph construction method

    CN116227594A

  • Semantic enhancement method by fusing medical term entity description information

    CN117494724A

Cited By

  • Multi-source heterogeneous data alignment method and system

    CN120561612A

  • Health education resource RPA interaction system and method based on knowledge graph

    CN120655238A