A method for constructing a traditional Chinese medicine diabetic nephropathy knowledge graph based on multi-source medical texts
Patent Information
- Application Number
- CN202511377939.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-08-28
AI Technical Summary
然而,现有技术存在显著不足:一方面过度依赖人工标注与简单规则,难以高效处理非结构化医学文本;另一方面缺乏对复杂语义关系的建模能力,导致知识覆盖范围狭窄、推理精度不足
[0023] This invention provides a method for constructing a knowledge graph of traditional Chinese medicine (TCM) diabetic nephropathy based on multi-source medical text. It integrates semantic information from structured treatment guidelines and unstructured electronic medical records through a pre-trained language model (BERT) and graph neural network (GCN), combined with a hybrid annotation strategy and automated relation extraction technology. This addresses the shortcomings of traditional methods, such as reliance on a single data source, high manual annotation costs, and insufficient modeling of semantic relationships between TCM and Western medicine. While improving the accuracy of semantic reasoning in the knowledge graph, this method significantly reduces the workload of manual annotation (by more than 70%) and supports accurate modeling of complex many-to-many relationships between syndromes, treatment methods, and TCM herbs. It can be widely applied to scenarios such as TCM diabetic nephropathy diagnosis and treatment decision support and drug contraindication warning, demonstrating high clinical applicability.
Smart Images

Figure CN122655944A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of medical information and artificial intelligence technology, specifically involving a method and system for constructing a knowledge graph of diabetic nephropathy in traditional Chinese medicine based on multi-source medical text. Background Technology
[0002] Diabetic nephropathy is a major complication of diabetes, affecting approximately 40% of diabetic patients worldwide. While Western medicine can control the condition, it carries the risk of nephrotoxicity, whereas Traditional Chinese Medicine (TCM) offers unique advantages through syndrome differentiation and treatment. Currently, knowledge graph technology is being increasingly applied in the medical field, capable of modeling semantic relationships between entities to assist in clinical decision-making.
[0003] Currently, methods based on structured clinical guidelines and manually labeled rules have achieved basic capabilities in natural language processing tasks, such as constructing disease-symptom-drug association graphs through electronic medical records to provide auxiliary diagnostic support for some diseases. However, existing technologies have significant shortcomings: on the one hand, they rely too heavily on manual annotation and simple rules, making it difficult to efficiently process unstructured medical text; on the other hand, they lack the ability to model complex semantic relationships, resulting in narrow knowledge coverage and insufficient reasoning accuracy. This presents a dual challenge for the construction of a knowledge graph for diabetic nephropathy in Traditional Chinese Medicine: breakthroughs are needed in the areas of multi-source heterogeneous data fusion and automated modeling of complex relationships. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a method and system for constructing a knowledge graph of traditional Chinese medicine (TCM) for diabetic nephropathy based on multi-source medical text. This method combines a pre-trained language model with a graph neural network, integrating semantic information from structured treatment guidelines and unstructured electronic medical records. Through a hybrid annotation strategy and automated relation extraction technology, it achieves accurate modeling of TCM-Western medicine entity relationships and end-to-end knowledge reasoning. This method significantly improves the construction efficiency and clinical decision support capabilities of the TCM knowledge graph for diabetic nephropathy while reducing reliance on manual annotation.
[0005] The objective of this invention is achieved through the following technical solution:
[0006] Step 1: Collection and integration of multi-source TCM medical data: Medical data is collected from structured treatment guidelines and unstructured electronic medical records, and the data is cleaned and standardized to form a medical text dataset in a unified format.
[0007] Step 2: Entity Classification Framework Construction: Define a hierarchical entity classification system for TCM syndromes, Chinese medicines, treatment methods, symptoms and Western medical pathology terms, and formulate relationship association rules between entities based on domain knowledge;
[0008] Step 3: Application of hybrid annotation strategy: The training set is generated by manual annotation, and the sequence is labeled based on the joint model of pre-trained language model BERT combined with bidirectional long short-term memory network (BiLSTM) and conditional random field (CRF). The semantic relationship between entities is extracted through attention mechanism.
[0009] The mathematical expression for the sequence labeling model is as follows:
[0010]
[0011] in,
[0012] Furthermore, the hidden state of the Bidirectional Long Short-Term Memory (BiLSTM) network is calculated as follows:
[0013] h t =LSTM(x t, h t-1 )
[0014] Step 4: Machine learning model training and information extraction: Optimize model parameters based on the training set, fuse entity context features using fully connected layers, and calculate the semantic association degree of entity pairs through semantic similarity (based on cosine similarity algorithm) to generate relationship type probability distribution, thereby realizing automated entity and relationship extraction of the remaining medical text;
[0015] The semantic similarity calculation uses the cosine similarity algorithm, and the formula is as follows:
[0016]
[0017] Here, v1 and v2 are vector representations of entity context features, and ||v1|| and ||v2|| represent the magnitude of the vectors.
[0018] Furthermore, the output of the fully connected layer generates a relational probability distribution through the Softmax function, the formula of which is:
[0019]
[0020] Among them, W r Let r be the weight matrix of relation type r. and is the feature vector of the entity pair.
[0021] Step 5. Knowledge Graph Construction and Storage: The extracted entities and relationships are converted into attribute graph structure data, distributed storage is performed using a graph database that supports topology graph queries, and interactive visualization display functions are provided through a visualization interface.
[0022] The beneficial effects of this invention are as follows:
[0023] This invention provides a method for constructing a knowledge graph of traditional Chinese medicine (TCM) diabetic nephropathy based on multi-source medical text. It integrates semantic information from structured treatment guidelines and unstructured electronic medical records through a pre-trained language model (BERT) and graph neural network (GCN), combined with a hybrid annotation strategy and automated relation extraction technology. This addresses the shortcomings of traditional methods, such as reliance on a single data source, high manual annotation costs, and insufficient modeling of semantic relationships between TCM and Western medicine. While improving the accuracy of semantic reasoning in the knowledge graph, this method significantly reduces the workload of manual annotation (by more than 70%) and supports accurate modeling of complex many-to-many relationships between syndromes, treatment methods, and TCM herbs. It can be widely applied to scenarios such as TCM diabetic nephropathy diagnosis and treatment decision support and drug contraindication warning, demonstrating high clinical applicability. Attached Figure Description
[0024] Figure 1 The present invention includes a method and flowchart. Detailed Implementation
[0025] The invention will be described in detail below with reference to the accompanying drawings and a practical application case based on data from a top-tier hospital's TCM treatment of diabetic nephropathy. The purpose and effects of the invention will become clearer afterward. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0026] like Figure 1 As shown, the present invention provides a method for constructing a knowledge graph of diabetic nephropathy in Traditional Chinese Medicine based on multi-source medical text. This method includes the following steps:
[0027] Step 1: Collection and integration of multi-source TCM medical data: Medical data was collected from structured treatment guidelines and unstructured electronic medical records. Data cleaning and standardization were performed to form a unified format medical text dataset. 1,200 electronic medical records (including TCM syndrome differentiation records and prescriptions) and 5 copies of the "Guidelines for the Integrated Traditional Chinese and Western Medicine Treatment of Diabetic Nephropathy" from the hospital from 2020 to 2022 were selected for data cleaning. For example, the syndrome entity "Qi and Yin Deficiency Syndrome" was extracted from the medical records and associated with the treatment entity "Yi Qi Yang Yin Tang" to form structured data pairs.
[0028] Step 2: Entity Classification Framework Construction: Define a hierarchical entity classification system for TCM syndromes, Chinese medicines, treatment methods, symptoms and Western medical pathology terms, and formulate relationship association rules between entities based on domain knowledge;
[0029] Step 3: Application of hybrid annotation strategy: The training set is generated by manual annotation, and the sequence is labeled based on the joint model of pre-trained language model BERT combined with bidirectional long short-term memory network (BiLSTM) and conditional random field (CRF). The semantic relationship between entities is extracted through attention mechanism.
[0030] Manual annotation can be performed by three TCM experts on 200 high-value medical records, with annotation entities including "syndrome", "Chinese herbal medicine", and "symptoms" to generate a golden training set. Automatic annotation can be performed using the BERT-BiLSTM-CRF model to pre-annotate the remaining 1,000 medical records. The model optimizes label consistency using the following conditional random field probability formula:
[0031]
[0032]
[0033] Furthermore, the hidden state of the Bidirectional Long Short-Term Memory (BiLSTM) network is calculated as follows:
[0034] h t =LSTM(x t, h t-1 )
[0035] Step 4: Machine learning model training and information extraction: Optimize model parameters based on the training set, fuse entity context features using fully connected layers, and calculate the semantic association degree of entity pairs through semantic similarity (based on cosine similarity algorithm) to generate relationship type probability distribution, thereby realizing automated entity and relationship extraction of the remaining medical text;
[0036] The semantic similarity calculation uses the cosine similarity algorithm, and the formula is as follows:
[0037]
[0038] BERT embedding was performed on the entities “Qi and Yin Deficiency Syndrome” and “Yi Qi Yang Yin Decoction”, and the cosine similarity was calculated:
[0039]
[0040] A similarity threshold of 0.75 was set to determine whether the two had a "syndrome-treatment" relationship.
[0041] The semantic similarity calculation uses the cosine similarity algorithm, and the formula is as follows:
[0042]
[0043] Here, v1 and v2 are vector representations of entity context features, and ||v1|| and ||v2|| represent the magnitude of the vectors.
[0044] Furthermore, the output of the fully connected layer generates a relational probability distribution through the Softmax function, the formula of which is:
[0045]
[0046] Step 5. Knowledge Graph Construction and Storage: The extracted entities and relationships are converted into attribute graph structure data, distributed storage is performed using a graph database that supports topology graph queries, and interactive visualization display functions are provided through a visualization interface.
[0047] The graph database supports interactive retrieval functionality using the Cypher query language. The knowledge graph comprehensively covers core entities and relationships such as TCM syndrome differentiation, prescription composition, drug contraindications, and efficacy indicators, constructing a multi-dimensional knowledge system that integrates TCM and Western medicine semantics.
[0048] Taking a typical application scenario as an example, when a doctor enters the syndrome “Qi and Yin deficiency syndrome”, the system automatically generates a recommended solution based on knowledge graph reasoning, including the associated treatment method “Yi Qi Yang Yin Tang” and the core Chinese medicine “Huang Qi” (Astragalus membranaceus), and simultaneously prompts the contraindication “hypertensive patients need to halve the dosage”, so as to achieve both precision and safety in diagnosis and treatment decisions.
[0049] Clinical trials have shown that, compared to traditional manual diagnostic methods, this invention increases the clinical protocol adoption rate by 28.5% and significantly improves the efficiency of medical record data processing from an average of 4 hours / file to 0.5 hours / file, fully demonstrating its high efficiency and practicality.
Claims
1. A method for constructing a knowledge graph of diabetic nephropathy in Traditional Chinese Medicine based on multi-source medical text, characterized in that: Includes the following steps: Step 1. Collection and integration of multi-source TCM medical data: Collect medical data from structured diagnosis and treatment guidelines and unstructured electronic medical record texts, perform data cleaning and standardization processing, and form a medical text dataset with a unified format; Step 2. Entity Classification Framework Construction: Define a hierarchical entity classification system for TCM syndromes, Chinese medicines, treatment methods, symptoms and Western medical pathology terms, and formulate relationship association rules between entities based on domain knowledge; Step 3. Application of hybrid annotation strategy: The training set is generated by manual annotation, and the sequence is labeled based on the joint model of pre-trained language model BERT combined with bidirectional long short-term memory network (BiLSTM) and conditional random field (CRF). The semantic relationship between entities is extracted through attention mechanism. Step 4. Machine learning model training and information extraction: Optimize model parameters based on the training set, fuse entity context features using fully connected layers, and calculate the semantic association degree of entity pairs through semantic similarity (based on cosine similarity algorithm) to generate relationship type probability distribution, thereby realizing automated entity and relationship extraction of the remaining medical text; Step 5. Knowledge Graph Construction and Storage: The extracted entities and relationships are converted into attribute graph structure data, distributed storage is performed using a graph database that supports topology graph queries, and interactive visualization display functions are provided through a visualization interface.
2. The method according to claim 1, characterized in that: The multi-source TCM medical data mentioned in step 1 includes treatment guidelines and electronic medical record texts.
3. The method according to claim 1, characterized in that: The association rules mentioned in step 2 include the orientation relationships of "syndrome-treatment", "traditional Chinese medicine-symptoms" and "treatment-efficacy indicators".
4. The method according to claim 1, characterized in that: The mathematical expression for the sequence labeling model described in step 3 is: in, 5. The method according to claim 1, characterized in that: The Bidirectional Long Short-Term Memory (BiLSTM) network described in step 3 The hidden state is calculated as follows: h t =LSTM(x t, h t-1 ) Where, x t Let h be the vector of the t-th word in the input sequence. t-1 This is the hidden state of the previous time step.
6. The method according to claim 1, characterized in that: The semantic similarity calculation in step 4 uses the cosine similarity algorithm, and the formula is: Here, v1 and v2 are vector representations of entity context features, and ||v1|| and ||v2|| represent the magnitude of the vectors.
7. The method according to claim 1, characterized in that: The output of the fully connected layer in step 4 generates a relational probability distribution through the Softmax function, the formula of which is: Among them, W r Let r be the weight matrix of relation type r. and is the feature vector of the entity pair.
8. The method according to claim 1, characterized in that: The graph database mentioned in step 5 supports the Cypher query language, and the knowledge graph covers entities and relationships related to TCM syndrome differentiation, prescription composition, drug contraindications, and efficacy indicators.
9. A system for implementing the method of any one of claims 1-8: characterized in that, include: Multi-source data integration module: used for the collection, cleaning and standardization of medical texts, supporting the fusion of multi-source data from structured medical guidelines and unstructured electronic medical records; Pattern definition module: used to define the hierarchical entity classification framework of integrated traditional Chinese and Western medicine (including entity types such as TCM syndromes, Chinese medicine, symptoms, etc.) and directional association rules (such as "syndrome-treatment" and "Chinese medicine-contraindications"); Hybrid annotation module: Dynamically allocates the priority of manual annotations based on the confidence of the pre-trained model to optimize the quality of the training set; Graph building engine: Converts extracted entities and relationships into attribute graph structures to meet the storage and query requirements of graph databases; Visualization service module: Provides interactive atlas display, semantic query and clinical decision support functions.
