Intelligent recommendation and safety monitoring system for traditional chinese medicine formula based on knowledge graph
By using a knowledge graph-based intelligent recommendation system for traditional Chinese medicine (TCM) prescriptions, the problems of drug incompatibilities, dosage safety, and risk assessment of combined use of TCM and Western medicines in TCM prescription recommendations have been solved. This system enables personalized prescription recommendations and comprehensive safety monitoring, thereby improving the safety and accuracy of TCM clinical applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG CHINESE MEDICAL UNIVERSITY
- Filing Date
- 2026-01-21
- Publication Date
- 2026-04-21
AI Technical Summary
Existing traditional Chinese medicine prescription recommendation systems lack the ability to check for incompatibilities, assess dosage safety, and evaluate the risks of combined use of traditional Chinese and Western medicines, thus failing to meet the actual needs of safe clinical application of traditional Chinese medicine.
The knowledge graph-based intelligent recommendation system for traditional Chinese medicine prescriptions includes a TCM syndrome diagnosis module, a prescription knowledge graph, a deep neural network inference engine, and a safety assessment and monitoring platform, enabling incompatibilities checks, dosage safety assessments, and risk warnings for the combined use of Chinese and Western medicines.
It enables personalized TCM prescription recommendations, automatically identifies incompatibilities, assesses dosage safety, and provides early warnings of risks associated with the combined use of TCM and Western medicine, thereby improving the safety and accuracy of TCM clinical applications.
Smart Images

Figure CN121565375B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent auxiliary decision-making technology in traditional Chinese medicine, specifically to a knowledge graph-based intelligent recommendation and safety monitoring system for traditional Chinese medicine prescriptions, and particularly to a traditional Chinese medicine safety assurance technology that integrates graph neural network reasoning and semantic rule engine. Background Technology
[0002] Traditional Chinese medicine (TCM), a precious asset of the Chinese nation, plays an important role in disease treatment and health maintenance. In recent years, with the development of artificial intelligence technology, intelligent auxiliary decision-making systems for TCM have gradually become a research hotspot.
[0003] In existing technologies, such as Chinese patent application CN116680412A, a method for recommending traditional Chinese medicine prescriptions based on knowledge graphs is disclosed. This method uses a ComplEx model to learn the representation of the traditional Chinese medicine knowledge graph, learns the feature information of symptom nodes and Chinese medicine nodes through graph convolutional neural networks, and combines an attention mechanism for prescription recommendation. This method achieves the function of recommending traditional Chinese medicine prescriptions based on knowledge graphs to a certain extent.
[0004] However, this technical solution has the following shortcomings:
[0005] First, this method only focuses on prescription recommendation and lacks a comprehensive assessment mechanism for the safety of recommended prescriptions. In actual clinical application, there are incompatibilities in traditional Chinese medicine combinations, such as the "Eighteen Incompatibilities" and "Nineteen Antagonisms," where different medicinal materials may interact, affecting efficacy or causing adverse reactions. This method does not establish a mechanism for checking compatibility rules and cannot automatically identify and warn of potential incompatibilities, posing a risk to medication safety.
[0006] Second, this method does not consider drug interaction assessment in scenarios involving the combined use of traditional Chinese medicine and Western medicine. In modern clinical practice, patients often use both traditional Chinese medicine and Western medicine simultaneously for treatment, and complex drug interactions may exist between them, including pharmacokinetic and pharmacodynamic interactions. This method lacks the ability to assess the safety of combined use of traditional Chinese medicine and Western medicine, and cannot provide clinicians with safety warnings for such combinations, thus failing to meet the actual needs of modern clinical practice.
[0007] Third, this method lacks the ability to monitor dosage safety. The efficacy and safety of traditional Chinese medicine are closely related to dosage; different medicinal materials have their appropriate dosage ranges, and exceeding these ranges may lead to toxic side effects. This method does not establish a dosage safety assessment mechanism during the prescription recommendation process, making it impossible to determine whether the recommended dosage is within a safe range, thus posing a safety risk due to inappropriate dosage.
[0008] Fourth, this method does not fully consider the impact of individual patient characteristics on compatibility rules when recommending prescriptions. Patients of different constitutions and ages have varying tolerance and sensitivity to traditional Chinese medicine, and the severity of incompatibilities also varies depending on individual patient characteristics. This method uses a fixed recommendation strategy and lacks the ability to conduct personalized safety assessments based on patient characteristics, thus limiting the relevance and safety of its clinical application.
[0009] Therefore, existing technologies are insufficient to meet the actual needs of safe clinical application of traditional Chinese medicine, and there is an urgent need to develop an intelligent system that can provide accurate prescription recommendations and conduct comprehensive safety monitoring. Summary of the Invention
[0010] To address the aforementioned problems in existing technologies, this invention provides a knowledge graph-based intelligent recommendation and safety monitoring system for traditional Chinese medicine (TCM) prescriptions. This system not only recommends personalized TCM prescriptions based on patient syndrome characteristics, but more importantly, it establishes a comprehensive safety monitoring mechanism, including incompatibilities checks, dosage safety assessments, and risk warnings for combined use of TCM and Western medicine, thereby comprehensively ensuring the safety and effectiveness of TCM in clinical applications.
[0011] The technical solution provided by this invention is as follows:
[0012] A knowledge graph-based intelligent recommendation and safety monitoring system for traditional Chinese medicine prescriptions includes:
[0013] The TCM syndrome diagnosis module is used to receive the patient's symptom data, determine the syndrome feature vector corresponding to each symptom in the symptom data, and obtain the corresponding syndrome label and syndrome weight information based on similarity matching.
[0014] A formula knowledge graph is used to store entities of classic formulas, Chinese herbal medicines, syndrome types, efficacy, and compatibility relationships.
[0015] A deep neural network inference engine is used to retrieve a set of candidate prescription nodes in the prescription knowledge graph based on the syndrome type label and the syndrome type weight information, extract features from the prescription nodes in the candidate prescription node set through a graph neural network to obtain prescription feature representations, calculate a matching degree score based on the prescription feature representations and the syndrome type feature vectors, and generate recommended prescriptions based on the matching degree score.
[0016] A security assessment and monitoring platform, comprising:
[0017] The compatibility rule engine is used to obtain the composition of medicinal materials in the recommended prescription, match the composition of medicinal materials with a preset compatibility contraindication knowledge base, and generate a compatibility contraindication warning signal if there is a medicinal material pair that meets the contraindication rule.
[0018] The dosage safety assessment unit obtains the reference dosage of each medicinal material in the recommended prescription, compares the reference dosage with a preset dosage safety range library, and generates a dosage warning signal if the reference dosage exceeds the safety range.
[0019] The drug interaction early warning system receives the patient's Western medicine medication records, obtains the active ingredient information corresponding to the medicinal materials in the recommended prescription, calculates the interaction risk value between the active ingredient information and the Western medicine, and generates a combined use risk early warning signal if the interaction risk value exceeds a preset threshold.
[0020] In one possible implementation, the TCM syndrome differentiation diagnostic module is further used for:
[0021] Before determining the syndrome feature vector corresponding to each symptom in the symptom data, the symptom data is standardized to map symptom terms with different expressions to unified standard terms.
[0022] Based on the standard terminology, retrieve semantically related symptom nodes in the preset symptom semantic network, and obtain semantic extension information of the symptom nodes;
[0023] The standard terms and semantic extension information are input into a pre-trained symptom encoder to generate the syndrome feature vector.
[0024] In one possible implementation, when the deep neural network inference engine extracts features from the prescription nodes in the candidate prescription node set using a graph neural network, it specifically includes:
[0025] For each prescription node in the candidate prescription node set, obtain the neighbor node set of the prescription node, the neighbor node set includes medicinal material nodes, efficacy nodes and syndrome type nodes;
[0026] The attention weight between the prescription node and each neighbor node is calculated using a graph attention mechanism. The formula for calculating the attention weight is as follows:
[0027] ,
[0028] in: For prescription nodes For neighboring nodes Attention weights; For prescription nodes eigenvectors; Neighboring nodes eigenvectors; The weight matrix is a learnable matrix; This is a vector concatenation operation; For prescription nodes The set of neighboring nodes; The activation function has a slope parameter of 0.2.
[0029] The features of neighboring nodes are weighted and aggregated according to the attention weights to obtain the updated features of the prescription node:
[0030] ,
[0031] in: For prescription nodes The updated feature vector; The characteristic transformation matrix; The activation function is non-linear, and the ELU activation function is used.
[0032] Repeat the above polymerization process. Layer, the The value range is 2 to 4, and the characteristic representation of the prescription is obtained.
[0033] In one possible implementation, when the deep neural network inference engine calculates the matching score based on the formula feature representation and the syndrome feature vector, it specifically includes:
[0034] The formula feature representation and the syndrome feature vector are input into a bilinear interaction layer to calculate the feature interaction matrix:
[0035] ,
[0036] in: Score the feature interaction; This represents the characteristics of the prescription. For the proof-type feature vector; It is a bilinear transformation matrix;
[0037] The feature interaction matrix is input into a multilayer perceptron for nonlinear transformation to obtain the matching score:
[0038] ,
[0039] in: A score for the degree of matching; and This is the weight matrix of the multilayer perceptron; and For bias terms; This is the activation function.
[0040] In one possible implementation, when the compatibility rule engine performs semantic matching between the medicinal material composition and a preset compatibility contraindication knowledge base, it specifically includes:
[0041] The composition of medicinal materials in the recommended prescription is converted into a vector representation of medicinal materials, which is obtained by embedding medicinal material nodes in the prescription knowledge graph.
[0042] For any two medicinal materials in the composition, calculate the semantic similarity between the corresponding vectors of the two medicinal materials:
[0043] ,
[0044] in: medicinal materials and medicinal herbs Semantic similarity between them; and medicinal materials and medicinal herbs Vector representation of; Let L2 be the norm of the vector;
[0045] The system retrieves incompatible herbal pairs from the incompatibility knowledge base that have a semantic similarity that meets a preset similarity threshold. The preset similarity threshold ranges from 0.85 to 0.95.
[0046] If a matching pair of contraindicated medicinal materials exists, the contraindication level information is determined according to the contraindication type. The contraindication types include the eighteen incompatible combinations, the nineteen incompatible combinations, contraindications during pregnancy, and incompatible combinations, with corresponding contraindication levels of Level 1, Level 2, Level 3, and Level 4, respectively.
[0047] In one possible implementation, when the dose safety assessment unit compares the reference dose with a preset dose safety range library, it specifically includes:
[0048] Based on the patient's age, physical condition, and liver and kidney function information, the corresponding personalized safe dose range is queried from the dose safety range database;
[0049] For each medicinal herb in the recommended prescription, determine whether the reference dose falls within the personalized safe dose range, where the personalized safe dose range is represented as follows: ;
[0050] If the reference dose satisfy If so, an insufficient dosage warning will be generated;
[0051] If the reference dose satisfy If so, an overdose warning will be generated;
[0052] If the reference dose satisfy and If so, it indicates that the dosage is too high.
[0053] In one possible implementation, when the drug interaction early warning system calculates the interaction risk value between the active ingredient information and the name of the Western medicine using a multilayer perceptron, it specifically includes:
[0054] The active ingredient information of the medicinal materials in the recommended prescription is represented as an active ingredient vector. The name of the Western medicine is represented as a Western medicine vector. ;
[0055] The active ingredient vector and the Western medicine vector are concatenated and then input into a multilayer perceptron.
[0056] ,
[0057] in: This represents the interaction risk value; This represents a vector concatenation operation; It is a multilayer perceptron;
[0058] The structure of the multilayer perceptron is as follows:
[0059] ,
[0060] in: , and Here is the weight matrix, with dimensions as follows: , and ; , and For bias terms; The layer's drop rate is 0.3;
[0061] The risk level is determined based on the interaction risk value:
[0062] like If so, it is considered high risk, generating a serious combined risk warning signal;
[0063] like If so, it is considered a medium risk, generating a medium combined risk warning signal;
[0064] like If so, it is considered low risk, generating a slight risk warning signal for combined use;
[0065] like If the value is within the safe range, no warning signal will be generated.
[0066] In one possible implementation, the system further includes:
[0067] The knowledge graph update module is used to receive clinical feedback data, which includes actual prescription data, efficacy data, and adverse reaction data. The module dynamically updates the formula knowledge graph based on the clinical feedback data. The dynamic update includes adding new formula nodes, updating compatibility relationship weights, and supplementing contraindication information.
[0068] In one possible implementation, the security assessment and monitoring platform further includes:
[0069] The comprehensive risk scoring unit is used to receive the incompatibility warning signal, the dosage over-limit warning signal, and the combination risk warning signal, and calculate the comprehensive risk score according to the preset risk weights.
[0070] ,
[0071] in: For comprehensive risk scoring; This refers to the risk score for incompatibility. This refers to the dose safety risk score; Drug interaction risk score; , and For risk weighting coefficients, satisfying The values range from 0.4 to 0.5, 0.2 to 0.3, and 0.3 to 0.4, respectively.
[0072] If the comprehensive risk score does not meet the safety threshold, the prescription adjustment process is triggered, and the deep neural network inference engine is returned to regenerate the recommended prescription.
[0073] In one possible implementation, the graph neural network embedding in the formula knowledge graph employs a rotational embedding model, for triples in the formula knowledge graph. The distance function of the rotational embedding model is:
[0074] ,
[0075] in: For the head entity embedding vector; For relational embedding vectors, this is represented as a rotation operation in complex space; For tail entity embedding vectors; For Hadamard product; It is the vector norm;
[0076] The rotation embedding model is trained by minimizing the distance function, which results in triples that conform to the facts of the knowledge graph having smaller distances and triples that do not conform to the facts having larger distances.
[0077] The beneficial effects of this invention include:
[0078] First, by establishing a compatibility rule engine, this invention checks the recommended prescriptions for compatibility contraindications, automatically identifying contraindications such as the "Eighteen Incompatibilities" and "Nineteen Antagonisms," and generating warning signals based on the level of contraindication. This effectively prevents medication risks caused by improper compatibility and significantly improves the safety of traditional Chinese medicine in clinical applications.
[0079] Secondly, this invention uses a dosage safety assessment unit to determine a personalized safe dosage range based on the individual characteristics of the patient and to conduct a safety assessment of the recommended dosage. This allows for the timely detection of insufficient or excessive dosage, avoiding reduced efficacy or toxic side effects due to improper dosage, and ensuring the accuracy and safety of traditional Chinese medicine use.
[0080] Third, this invention assesses the potential risks of combining traditional Chinese medicine and Western medicine through a drug interaction early warning system. It uses a multilayer perceptron to calculate the interaction risk value and perform graded early warning, which makes up for the shortcomings of existing technologies that only focus on the recommendation of traditional Chinese medicine and ignore the safety of combining traditional Chinese and Western medicine. It meets the actual needs of integrated traditional Chinese and Western medicine treatment in modern clinical practice and provides doctors with important support for medication safety decision-making.
[0081] Fourth, this invention uses graph neural networks and attention mechanisms for formula feature extraction. By aggregating neighbor node information through multi-layer graph convolution, it can fully capture the complex relationships between formulas, medicinal materials, efficacy and syndrome types. Compared with the simple feature fusion method of the prior art, the formula representation of this invention is more comprehensive and accurate, improving the accuracy of prescription recommendation.
[0082] Fifth, this invention establishes a complete closed-loop system from prescription recommendation to safety monitoring, integrating multiple functional modules such as syndrome differentiation diagnosis, prescription recommendation, compatibility examination, dosage assessment, and risk warning of combined use, forming a systematic clinical auxiliary decision-making scheme for traditional Chinese medicine. Compared with the single recommendation function of existing technologies, this invention provides more comprehensive and practical clinical application value. Attached Figure Description
[0083] Figure 1 This is a schematic diagram of the overall architecture of the system of the present invention;
[0084] Figure 2 This is a flowchart of the data processing for the TCM syndrome differentiation diagnosis module;
[0085] Figure 3 This is a structural diagram of the knowledge graph of Chinese prescriptions;
[0086] Figure 4 This is a flowchart of the inference process for a deep neural network inference engine.
[0087] Figure 5Functional module diagram of the security assessment and monitoring platform;
[0088] Figure 6 This is a flowchart of the semantic matching process for the matching rule engine;
[0089] Figure 7 This is a flowchart of the risk assessment process for a drug interaction early warning system. Detailed Implementation
[0090] Please refer to the attached document. Figures 1-7 The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0091] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0092] like Figure 1 As shown, this invention provides a knowledge graph-based intelligent recommendation and safety monitoring system for traditional Chinese medicine prescriptions. The system comprises four core components: a TCM syndrome diagnosis module, a prescription knowledge graph, a deep neural network inference engine, and a safety assessment and monitoring platform.
[0093] like Figure 2 As shown, the TCM syndrome differentiation diagnosis module receives the patient's symptom data, which includes primary symptoms and secondary symptoms. In one possible implementation, primary symptoms include the patient's main clinical manifestations, such as fever, cough, headache, and chest tightness, while secondary symptoms include accompanying minor symptoms, such as dry mouth, fatigue, and loss of appetite. Symptom data can be obtained through electronic medical record systems, mobile applications, or doctor input interfaces.
[0094] The TCM syndrome differentiation diagnosis module standardizes symptom data, mapping symptom terms with different expressions to unified standard terms. For example, different expressions such as "afraid of cold," "disgusted by cold," and "aversion to cold" are uniformly mapped to the standard term "disgusted by cold." The standardization process uses a pre-constructed symptom term mapping table, which contains more than 5,000 symptom terms and their corresponding standard forms.
[0095] For example, if the input symptom data shows that the patient has a fever of 38.5℃, cough with yellow phlegm, thirst, red tongue with yellow coating, and rapid pulse, the system will standardize it into standard symptom terms such as fever, cough, yellow phlegm, thirst, red tongue with yellow coating, and rapid pulse.
[0096] After standardization, the system retrieves semantically relevant symptom nodes from a pre-defined symptom semantic network based on standard terminology. This symptom semantic network is a symptom association network constructed based on Traditional Chinese Medicine (TCM) theory, encompassing semantic relationships such as correlation, subordination, and causation between symptoms. For example, for the symptom of fever, the semantic network can retrieve related symptoms such as "chills," "sweating," and "thirst." Through semantic expansion, the system can capture potential association information of symptoms, improving the accuracy of syndrome differentiation diagnosis.
[0097] The system inputs standard terminology and semantic extension information into a pre-trained symptom encoder to generate syndrome feature vectors. The symptom encoder employs a BERT-based pre-trained model for the TCM domain, which is pre-trained on a corpus containing 2 million TCM medical records and can effectively learn the semantic representation of symptoms. The symptom encoder encodes symptom information into a 768-dimensional vector representation, which includes the semantic features and contextual information of the symptoms.
[0098] For the generated syndrome feature vector, the system calculates its similarity to the target syndrome vector in the preset first syndrome range library. The first syndrome range library contains standard feature vectors for 80 common syndromes, such as wind-heat cold syndrome, wind-cold cold syndrome, phlegm-heat obstructing the lungs syndrome, and qi deficiency and blood stasis syndrome. The similarity calculation uses the cosine similarity method, and the calculation formula is as follows:
[0099] ,
[0100] in: The patient's syndrome feature vector; For standard proof vectors; Represents the dot product of vectors; This represents the L2 norm of a vector.
[0101] If the similarity between a syndrome feature vector and a target syndrome vector falls within a first threshold range, the corresponding syndrome label and syndrome weight information are obtained. In this embodiment, the first threshold range is set to 0.75 to 1.0. If the similarity is greater than or equal to 0.75, the patient is considered to fit the syndrome. The syndrome weight information is determined based on the magnitude of the similarity; the higher the similarity, the greater the syndrome weight. For example, if a patient's syndrome feature vector has a similarity of 0.88 with the phlegm-heat obstructing the lung syndrome and a similarity of 0.76 with the lung-heat excess syndrome, the system determines that the patient's primary syndrome is phlegm-heat obstructing the lung syndrome (weight 0.88), and the secondary syndrome is lung-heat excess syndrome (weight 0.76).
[0102] like Figure 3 As shown, the formula knowledge graph is the core knowledge base of this system, used to store entity and relationship information in the field of traditional Chinese medicine. The formula knowledge graph includes the following types of entities:
[0103] Classical formula entities: Include more than 5,000 classical formulas, such as Mahuang Decoction, Guizhi Decoction, Minor Bupleurum Decoction, Maxing Shigan Decoction, etc. Each formula entity contains attribute information such as formula name, source, composition, dosage, efficacy, and main treatment.
[0104] Traditional Chinese medicine entities: Include more than 800 commonly used traditional Chinese medicines, such as Ephedra, Cinnamon Twig, Apricot Kernel, Gypsum, Licorice Root, etc. Each traditional Chinese medicine entity contains attribute information such as medicinal material name, nature and flavor, meridian tropism, efficacy classification, usage and dosage, and contraindications.
[0105] Syndrome type entities: Include entity representations of the aforementioned 80 common syndrome types. Each syndrome type entity contains information such as syndrome type name, clinical manifestations, and pathogenesis characteristics.
[0106] Efficacy entities: Include entities of different efficacy classifications such as exterior-releasing, heat-clearing, purgation, harmonizing, warming the interior, tonifying, regulating qi, and regulating blood.
[0107] Compatibility relationship entities: Include monarch-minister-assistant-guide compatibility relationships, medicinal property interaction relationships, and incompatible compatibility relationships. The monarch-minister-assistant-guide compatibility relationship describes the compatibility roles of different medicinal materials in a formula. For example, in Maxing Shigan Decoction, Gypsum is the monarch drug, Ephedra is the minister drug, Apricot Kernel is the assistant drug, and Licorice Root is the guide drug. The medicinal property interaction relationship describes the synergistic, antagonistic, or restrictive relationships between medicinal materials. For example, the compatibility of Gypsum and Ephedra can clear heat and relieve asthma without being overly cold. The incompatible compatibility relationship includes the eighteen-incompatible combinations (such as Licorice Root is incompatible with kansui, seaweed, euphorbia, and yuanhua), the nineteen畏combinations (such as sulfur is畏magnesian sulfate), and other compatibility taboos.
[0108] The formula knowledge graph is stored and managed using the graph database Neo4j, supporting efficient graph query and traversal operations. Entities and relationships in the knowledge graph are represented and learned through the RotatE model, mapping entities and relationships into a low-dimensional vector space. For the triples in the knowledge graph , the RotatE model models the relationship as a rotation operation in the complex space, making the head entity as close as possible to the tail entity after rotation . The distance function of the RotatE model is:
[0109] ,
[0110] where: , and are all complex vectors; represents the Hadamard product (element-wise product); represents the modulus of the complex vector.
[0111] By training a rotated embedding model on large-scale knowledge graph triples, the system learns vector representations for each entity and relation. Entity vectors are set to 256 dimensions, and relation vectors are also 256 dimensions. Training employs a negative sampling strategy: for each positive triple, 10 negative samples are randomly sampled for comparative learning. The training objective is to minimize the distance between positive samples and maximize the distance between negative samples.
[0112] like Figure 4 As shown, the deep neural network inference engine performs intelligent reasoning and matching in the formula knowledge graph based on the syndrome type label and syndrome type weight information to generate personalized recommended formulas.
[0113] The inference engine first retrieves a set of candidate formula nodes in the formula knowledge graph whose similarity to the syndrome type label falls within the second threshold range. The retrieval process uses the graph query language Cypher to search for formula nodes that have a therapeutic relationship with the syndrome type entity. For example, for the syndrome type "phlegm-heat obstructing the lungs," the system retrieves all formulas that treat this syndrome type, including Ma Xing Shi Gan Tang, Qing Jin Hua Tan Tang, and Qian Jin Wei Jing Tang. Similarity calculation is based on the cosine similarity between the syndrome type vector and the formula's indication vector. The second threshold range is set to 0.70 to 1.0, meaning formulas with a similarity greater than or equal to 0.70 are included in the candidate set.
[0114] For each prescription node in the candidate prescription node set, the inference engine extracts features using a graph neural network. The graph neural network adopts a graph attention network (GAT) architecture, which can adaptively learn the importance weights of different neighboring nodes.
[0115] Specifically, for each prescription node, the system first obtains its set of neighboring nodes. Neighboring nodes include three categories: medicinal material nodes (medicinal materials that are included in the prescription), efficacy nodes (efficacy categories that are related to the prescription), and syndrome nodes (syndromes that are related to the prescription's indications). For example, for the prescription Ma Xing Shi Gan Tang, its neighboring nodes include the medicinal material nodes "Ephedra," "Apricot Kernel," "Gypsum," and "Licorice," the efficacy nodes "Clearing Heat" and "Relieving Asthma," and the syndrome nodes "Phlegm-Heat Obstructing the Lungs," etc.
[0116] The graph attention mechanism calculates the attention weights between a prescription node and each of its neighboring nodes. These attention weights reflect the degree to which different neighboring nodes contribute to the prescription's feature representation. The calculation process is as follows:
[0117] First, the feature vector of the prescription node. and the feature vectors of neighboring nodes Concatenate the vectors to obtain the concatenated vector. Then, the concatenated vector is passed through a learnable weight matrix. A linear transformation is performed, followed by the LeakyReLU activation function to obtain attention coefficients. Finally, the attention coefficients of all neighboring nodes are normalized using the softmax function to obtain the attention weights. The formula for calculating the attention weights is:
[0118] ,
[0119] in: For prescription nodes For neighboring nodes The attention weights are 0 to 1, and the sum of the attention weights of all neighboring nodes is 1. For prescription nodes The set of neighboring nodes; The ReLU activation function with leakage is set to a slope parameter of 0.2.
[0120] weight matrix The dimension is The learning process is conducted through end-to-end training. In the example, for the formula Ma Xing Shi Gan Tang, the attention weight for gypsum is 0.35, for ephedra is 0.28, for apricot kernel is 0.22, and for licorice is 0.15. This indicates that gypsum, as the principal ingredient, has the highest importance in the formula.
[0121] Based on the calculated attention weights, the system performs weighted aggregation on the feature vectors of neighboring nodes to obtain the updated features of the prescription node. The aggregation formula is as follows:
[0122] ,
[0123] in: For prescription nodes The updated feature vector; The feature transformation matrix has dimension 1. ; The non-linear activation function, using ELU (Exponential Linear Unit), can effectively alleviate the gradient vanishing problem.
[0124] The above polymerization process is repeated. The system consists of layers, each updating and aggregating node features. In this embodiment, The value of is 3, meaning the system constructs a 3-layer graph attention network. Through multi-layer aggregation, the feature representation of the node can capture information from distant neighbors and higher-order graph structure features. Finally, the ... The layer's output serves as a feature representation of the prescription. .
[0125] After obtaining the feature representation of the prescription, the inference engine calculates the matching score between the prescription and the patient's syndrome type. The matching score calculation adopts a combination of bilinear interaction layer and multilayer perceptron.
[0126] Bilinear interaction layer computation of prescription feature representation Eigenvectors of the Evidence Type The interaction between features. The interaction process is achieved through a bilinear transformation matrix. This matrix is designed to capture complex nonlinear relationships between two vectors. The formula for calculating the feature interaction score is:
[0127] ,
[0128] in: The feature interaction score is a scalar value; It is a bilinear transformation matrix with dimension . .
[0129] Feature Interaction Score This reflects the degree of matching between the prescription and the syndrome in the vector space. A higher interaction score indicates a better fit between the prescription and the syndrome.
[0130] To further improve the accuracy of the matching score evaluation, the system inputs the feature interaction score into a two-layer multilayer perceptron for nonlinear transformation. The first layer of the multilayer perceptron contains 128 neurons, the second layer contains 64 neurons, and the output layer has 1 neuron. The ReLU activation function is used. The formula for calculating the matching score is:
[0131] ,
[0132] in: The final match score ranges from 0 to 1. This is the first-layer weight matrix, with dimension . ; This is the second-layer weight matrix, with dimension . ; and This is a bias term.
[0133] The system calculates a matching score for all prescriptions in the candidate prescription node set and sorts them. If the matching score meets the third threshold range, the prescription is selected as a recommended prescription. In this embodiment, the third threshold range is set to 0.80 to 1.0. The system selects the top 5 prescriptions with the highest matching scores as recommended prescription candidates.
[0134] The recommended prescription includes the medicinal ingredients and a reference dosage. The medicinal ingredients are directly obtained from the prescription knowledge graph, and the reference dosage is adjusted based on the classic dosage of the prescription as well as factors such as the patient's age and weight. In the example, when recommending Ma Xing Shi Gan Tang for adult patients, the medicinal ingredients are: Ephedra 9g, Apricot Kernel 9g, Gypsum 18g, and Licorice 6g.
[0135] like Figure 5 As shown, the safety assessment and monitoring platform is one of the core innovations of this system, used for comprehensive safety assessment and monitoring of recommended prescriptions. The platform includes three main components: a compatibility rule engine, a dosage safety assessment unit, and a drug interaction early warning system.
[0136] like Figure 6 As shown, the compatibility rule engine is used to check whether there are any incompatibilities in the recommended prescriptions. Traditional Chinese medicine theory includes rules on compatibility such as the "Eighteen Incompatibilities" and "Nineteen Antagonisms." Inappropriate combinations of medicinal materials may lead to reduced efficacy, increased toxicity, or adverse reactions.
[0137] The compatibility rule engine first obtains the composition of the medicinal materials in the recommended prescription, and then performs semantic matching between the composition of the medicinal materials and a preset compatibility contraindication knowledge base. The compatibility contraindication knowledge base contains more than 500 compatibility contraindication rules, covering various types such as the Eighteen Incompatible Combinations, the Nineteen Antagonistic Combinations, Contraindications During Pregnancy, and Incompatible Combinations.
[0138] The semantic matching process employs a vector similarity-based method. The system converts the medicinal materials in the recommended prescriptions into vector representations, which are obtained through embedding medicinal material nodes within the prescription knowledge graph. For any two medicinal materials in the recommended prescriptions, the system calculates the semantic similarity between them:
[0139] ,
[0140] in: medicinal materials and medicinal herbs The semantic similarity between them ranges from -1 to 1; and These are vector representations of the two medicinal materials, each with a dimension of 256. Let L2 be the norm of the vector.
[0141] In the knowledge base of drug incompatibilities, the system retrieves and recommends drug pairs in prescriptions whose semantic similarity meets a preset similarity threshold. The preset similarity threshold is set between 0.85 and 0.95, meaning that drug pairs with a similarity greater than or equal to 0.85 are considered to potentially have drug incompatibilities. A higher similarity threshold can avoid false alarms while ensuring that drug pairs with genuine drug incompatibilities are identified.
[0142] If a matching pair of contraindicated medicinal materials exists, the system determines the contraindication level based on the contraindication type. Contraindication types include:
[0143] The "Eighteen Incompatibilities" are classified as Level 1 contraindications, representing the most severe level of toxicity. These include: licorice incompatible with Euphorbia kansui, Euphorbia pekinensis, Sargassum, and Daphne genkwa; aconite incompatible with Fritillaria cirrhosa, Trichosanthes kirilowii, Pinellia ternata, Ampelopsis japonica, and Bletilla striata; and Veratrum nigrum incompatible with ginseng, Adenophora stricta, Salvia miltiorrhiza, Scrophularia ningpoensis, Asarum heterotropoides, and Paeonia lactiflora. These combinations may produce strong toxic reactions and should be strictly prohibited in clinical practice.
[0144] The Nineteen Incompatibilities: These are classified as secondary contraindications, indicating a less severe condition. The Nineteen Incompatibilities include sulfur incompatible with sodium sulfate, mercury incompatible with arsenic, and wolfsbane incompatible with litharge, among others. These combinations may reduce efficacy or produce adverse reactions and should be avoided whenever possible.
[0145] Contraindications during pregnancy: This is a level three contraindication, meaning it is prohibited for specific groups (pregnant women). This includes blood-activating and blood-breaking drugs, purgatives, and toxic drugs, such as peach kernel, safflower, rhubarb, aconite, and strychnine.
[0146] Incompatible combinations: This falls under level four contraindications, which include other contraindications that require attention, such as improper combinations of warming and cooling medicines.
[0147] The system determines whether the medication meets the safety level threshold range based on contraindication level information. In this embodiment, the safety level threshold range is set to level three contraindications and below. If a level one or two contraindication is detected, the system generates a contraindication warning signal, indicating to the doctor that the prescription has serious contraindications and suggesting a readjustment of the prescription. If a level three or four contraindication is detected, the system generates a contraindication alert signal, reminding the doctor to pay attention to the medication risks in specific populations or under specific circumstances.
[0148] For example, if a recommended prescription contains both licorice and Euphorbia kansui, the system identifies this as a case of licorice antagonizing Euphorbia kansui according to the Eighteen Incompatibilities, which is a Level 1 contraindication and does not meet the safety threshold. Therefore, a contraindication warning signal is generated, suggesting that Euphorbia kansui be replaced with other purgatives or that the prescription composition be adjusted.
[0149] The dosage safety assessment unit is used to evaluate whether the dosage of each medicinal material in the recommended prescription is within the safe range. The efficacy and safety of traditional Chinese medicine are closely related to dosage; insufficient dosage may lead to poor efficacy, while excessive dosage may cause toxic side effects.
[0150] The dosage safety assessment unit obtains the reference dosage for each medicinal material in the recommended prescription and then compares it with a pre-set dosage safety range database. The dosage safety range database contains safe dosage information for more than 800 commonly used Chinese medicines, and the safe dosage for each medicinal material is divided into different dosage ranges based on factors such as age, physical condition, and liver and kidney function.
[0151] In this embodiment, the system queries a personalized safe dose range based on the patient's individual characteristics. Patient information includes:
[0152] Age information: Divided into children (0-14 years), adolescents (15-24 years), adults (25-59 years), and the elderly (60 years and older). Different age groups have different drug metabolism abilities, therefore the safe dosage ranges vary.
[0153] Constitutional information: According to Traditional Chinese Medicine (TCM) constitution identification, there are nine types of constitutions: balanced, qi-deficient, yang-deficient, yin-deficient, phlegm-dampness, damp-heat, blood stasis, qi stagnation, and special constitution. Different constitutions have different tolerances and sensitivities to medications.
[0154] Liver and kidney function information: categorized as normal, mildly impaired, moderately impaired, and severely impaired. Patients with impaired liver and kidney function have reduced drug metabolism capacity, requiring dosage adjustments.
[0155] For each medicinal herb in the recommended prescription, the system queries its corresponding personalized safe dosage range. For example, for adults, patients with a balanced constitution, and normal liver and kidney function, the safe dosage range for ephedra is [missing information]. The safe dosage range for gypsum is: The safe dosage range for licorice is: .
[0156] The system determines the reference dosage in the recommended prescription. Whether it is within the personalized safe dosage range. The judgment logic is as follows:
[0157] If reference dose satisfy This indicates insufficient dosage, which may lead to poor therapeutic effect, and the system generates an insufficient dosage warning signal.
[0158] If reference dose satisfy This indicates an overdose, which may cause toxic side effects, and the system generates an overdose warning signal.
[0159] If reference dose satisfy This indicates that the dosage is within a safe range, and the system does not generate a warning signal. However, if This indicates that the dosage is close to the safe upper limit, and the system generates a high dosage warning signal to remind doctors to pay attention to the medication dosage.
[0160] For example, for the recommended formula Ma Xing Shi Gan Tang, if the recommended dosage for an adult patient is: Ephedra 9g, Apricot Kernel 9g, Gypsum 18g, and Licorice 6g, the system will retrieve the patient's personalized safe dosage range as follows: Ephedra... ,almond ,plaster licorice After comparison, the recommended dosages of all medicinal materials were within the safe range, and the system did not generate any warning signals, indicating that the prescription was safe in terms of dosage.
[0161] like Figure 7 As shown, the drug interaction early warning system is used to assess the potential risks of combining traditional Chinese medicine and Western medicine. In modern clinical practice, patients often use both traditional Chinese medicine and Western medicine for treatment. Complex drug interactions may exist between these two drugs, including pharmacokinetic interactions (affecting drug absorption, distribution, metabolism, and excretion) and pharmacodynamic interactions (affecting the therapeutic effect or toxic side effects of the drug).
[0162] The drug interaction early warning system receives patients' Western medicine medication records. These records can be obtained from hospital information systems, electronic medical records, or patient-reported information. The system extracts the names and classifications of the Western medicines from these records. Western medicine classifications include antibiotics, antihypertensive drugs, hypoglycemic drugs, anticoagulants, and immunosuppressants, among others.
[0163] The system retrieves information on the active ingredients of the medicinal herbs in the recommended prescriptions. The pharmacological effects of traditional Chinese medicine (TCM) are primarily achieved through its active ingredients, which may interact with Western medicines. The information on active ingredients is extracted from a database of chemical components of TCM, including alkaloids, flavonoids, saponins, and volatile oils. For example, the main active ingredients of ephedra are ephedrine and pseudoephedrine, the main component of gypsum is calcium sulfate, and the main active ingredients of licorice are glycyrrhizic acid and glycyrrhetinic acid.
[0164] The system calculates the interaction risk value between the active ingredient and the Western medicine using a multilayer perceptron. The input to the multilayer perceptron is a concatenation of the active ingredient vector and the Western medicine vector, and the output is the interaction risk value.
[0165] Active ingredient vector Generated using a molecular fingerprint representation method, with a dimension of 2048. Molecular fingerprints can capture the chemical structural features of active ingredients. (Western medicine vector) It is generated using a similar method and is also 2048-dimensional.
[0166] The system concatenates the active ingredient vector and the Western medicine vector into a 4096-dimensional input vector. The data is then fed into a multilayer perceptron for nonlinear transformation. The multilayer perceptron contains three hidden layers with 512, 256, and 128 neurons respectively. A dropout layer is added after each hidden layer with a dropout rate of 0.3 to prevent overfitting. The activation function is ReLU. The output layer is a single neuron that outputs the interaction risk value. The value ranges from 0 to 1.
[0167] The calculation formula for a multilayer perceptron is:
[0168] ,
[0169] in: For input vectors ; This is the first-layer weight matrix, with dimension . ; This is the second-layer weight matrix, with dimension . ; This is the third layer weight matrix, with dimension . ; , and The bias term is used; the output layer weight matrix has a dimension of . .
[0170] The multilayer perceptron was trained on a training set containing 100,000 data points on drug interactions between traditional Chinese medicine and Western medicine. The training data included known drug interaction cases, labeled with the risk level of the interaction. The training objective was to minimize the mean squared error between the predicted and actual risk values.
[0171] Based on the calculated interaction risk value, the system determines the risk level and generates a corresponding early warning signal:
[0172] like This indicates a high risk, suggesting a serious interaction between traditional Chinese medicine and Western medicine, which may lead to reduced efficacy or serious adverse reactions. The system generates a serious risk warning signal for combined use, recommending that the doctor adjust the prescription or discontinue one of the drugs.
[0173] like This indicates a medium risk, suggesting a certain degree of interaction between traditional Chinese medicine and Western medicine, requiring close monitoring of the patient's medication response. The system generates a medium-risk warning signal for combined use, reminding doctors to pay attention to changes in the patient's clinical manifestations and biochemical indicators.
[0174] like This indicates a low risk; there may be slight interactions between traditional Chinese medicine and Western medicine, but these usually do not cause serious consequences. The system generates a warning signal indicating a slight risk of combined use, reminding doctors to pay appropriate attention.
[0175] like This indicates that the risk value is within a safe range, and there is no significant interaction between traditional Chinese medicine and Western medicine. The system does not generate any warning signals, indicating that the combined use of traditional Chinese medicine and Western medicine is safe.
[0176] For example, if a patient is taking warfarin (an anticoagulant) and the doctor recommends a prescription containing tanshinone (Salvia miltiorrhiza), the system extracts the molecular structures of tanshinone, the main active ingredient of tanshinone, and warfarin, and calculates an interaction risk value of 0.85 using a multilayer perceptron. Since the risk value is greater than 0.8, the system generates a serious concomitant use risk warning signal, indicating to the doctor that tanshinone has blood-activating and stasis-removing effects, and its combined use with warfarin may enhance the anticoagulant effect, leading to an increased risk of bleeding. The system recommends adjusting the prescription or strengthening coagulation function monitoring.
[0177] The safety assessment and monitoring platform also includes a comprehensive risk scoring unit, which integrates drug incompatibility risks, dosage safety risks, and drug interaction risks to calculate a comprehensive risk score.
[0178] The comprehensive risk scoring unit receives incompatibility warning signals generated by the compatibility rule engine, dose exceedance warning signals generated by the dose safety assessment unit, and combined use risk warning signals generated by the drug interaction warning system. For each type of risk, the system assigns a corresponding risk score based on the warning level.
[0179] Incompatibility Risk Score The assignment rule is: if a level one taboo exists, then If a secondary contraindication exists, then If there are three levels of taboos, then If a level four taboo exists, then If there are no contraindications, then .
[0180] Dosage safety risk score The assignment rule is: if there is an overdose warning, then If an insufficient dosage warning is issued, then If there is a indication of excessive dosage, then If the dosage is normal, then .
[0181] Drug Interaction Risk Score Interaction risk values obtained directly using multilayer perceptron calculations ,Right now .
[0182] The system calculates a comprehensive risk score based on preset risk weights:
[0183] ,
[0184] in: The comprehensive risk score ranges from 0 to 1. , and For risk weighting coefficients, satisfying .
[0185] In this embodiment, the risk weighting coefficient is set according to clinical importance. Incompatibilities have the highest severity and are weighted accordingly. The weighting factor is set to 0.45; the influence of drug interactions is secondary, with a weighting coefficient of 0.45. The weighting factor is set to 0.35; the impact on dosage safety is relatively small. Set to 0.20.
[0186] The system determines whether the overall risk score meets the safety threshold. In this embodiment, the safety threshold is set to 0.60. If the overall risk score... This indicates that the recommended prescription has a high safety risk. The system triggers the prescription adjustment process, returns to the deep neural network inference engine, and selects a prescription with a second-best match but lower risk from the candidate prescription set, or replaces the medicinal materials and adjusts the dosage of the existing prescription.
[0187] For example, if a recommended prescription has a drug incompatibility risk score of 0.7 (secondary incompatibility exists), a dosage safety risk score of 0.3 (high dosage warning), and a drug interaction risk score of 0.5 (low risk), then the overall risk score is:
[0188] ,
[0189] Since the overall risk score of 0.55 is less than the safety threshold of 0.60, the system determines that the prescription is within an acceptable risk range and can be provided to doctors as a recommended prescription for reference. The system also alerts doctors to secondary contraindications and excessive dosage, suggesting that doctors use the prescription cautiously or make appropriate adjustments based on the patient's specific condition.
[0190] In another implementation, the system also includes a knowledge graph update module for dynamically updating the prescription knowledge graph based on clinical feedback data.
[0191] The knowledge graph update module receives clinical feedback data, including actual prescription data, efficacy data, and adverse reaction data. Actual prescription data comes from prescriptions actually written by doctors after using system recommendations, recording the doctors' adoption and adjustments of recommended prescriptions. Efficacy data records the treatment effects after patients use the prescriptions, including the degree of symptom improvement and disease remission. Adverse reaction data records adverse reactions experienced by patients during medication use, including the type, severity, and time of occurrence of adverse reactions.
[0192] The system dynamically updates the prescription knowledge graph based on clinical feedback data. The update operations include:
[0193] Adding new prescription nodes: If a doctor prescribes a new prescription that is not included in the knowledge graph in actual clinical practice, and the prescription achieves good therapeutic effects, the system adds the prescription to the knowledge graph, including information such as the composition of the medicinal materials, dosage, indications, and efficacy.
[0194] Update compatibility weights: Based on efficacy and adverse reaction data, the system adjusts the association weights between prescriptions and syndrome types. If a prescription shows significant efficacy for a specific syndrome type, the system increases the weight of that association; if the efficacy is poor, the weight decreases. The update of compatibility weights uses an incremental learning method to avoid disrupting existing knowledge.
[0195] Supplementing incompatible drug information: If clinical feedback data shows that a certain combination of medicinal materials caused adverse reactions, but this combination is not included in the existing incompatibilities knowledge base, the system will add the combination to the incompatible drug relationships and indicate the level of incompatibilities. Supplemented incompatibilities information needs to be reviewed by experts before being formally included in the knowledge base.
[0196] Through the knowledge graph update module, the system can continuously absorb clinical experience, optimize the recommendation algorithm and security monitoring mechanism, and improve the system's practicality and accuracy.
[0197] In another implementation, the system supports multiple output formats to meet the needs of different users.
[0198] For physicians, the system generates detailed prescription reports, including the medicinal ingredients, dosage, administration method, precautions, and detailed safety assessment results, including incompatibilities test results, dosage safety assessment results, and drug interaction risk analysis. The report is presented in a structured format, allowing physicians to quickly understand the applicability and safety of the recommended prescriptions.
[0199] For pharmacist users, the system generates medication guidance sheets, including the dosage of each herb, decoction method, time of administration, contraindications, and other information, to help pharmacists review prescriptions and provide medication guidance.
[0200] For patients, the system generates concise and easy-to-understand medication instructions, using plain language to explain the prescription's effects, administration methods, and precautions, thereby improving patient medication adherence.
[0201] The system also supports integration with hospital information systems (HIS), electronic medical record systems (EMR), and prescription management systems, enabling automatic data interaction and seamless connection, reducing manual data entry workload, and improving work efficiency.
[0202] The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A traditional Chinese medicine formula intelligent recommendation and safety monitoring system based on a knowledge graph, characterized in that, include: The TCM syndrome diagnosis module is used to receive the patient's symptom data, determine the syndrome feature vector corresponding to each symptom in the symptom data, and obtain the corresponding syndrome label and syndrome weight information based on similarity matching. A formula knowledge graph is used to store classic formula entities, Chinese herbal medicine entities, syndrome type entities, efficacy entities, and compatibility relationship entities; the compatibility relationship entities include the monarch-minister-adjuvant-guide compatibility relationship, the drug property interaction relationship, and the incompatible compatibility relationship. A deep neural network inference engine is used to retrieve a set of candidate prescription nodes in the prescription knowledge graph based on the syndrome type label and the syndrome type weight information, extract features from the prescription nodes in the candidate prescription node set using a graph neural network to obtain prescription feature representations, calculate a matching score based on the prescription feature representations and the syndrome type feature vectors, and generate recommended prescriptions based on the matching score; the symptom data includes primary symptom characteristics and concurrent symptom characteristics; when the deep neural network inference engine extracts features from the prescription nodes in the candidate prescription node set using a graph neural network, it includes: For each prescription node in the candidate prescription node set, obtain the neighbor node set of the prescription node, the neighbor node set includes medicinal material nodes, efficacy nodes and syndrome type nodes; The attention weights between the prescription node and each neighbor node are calculated using a graph attention mechanism. The features of neighboring nodes are weighted and aggregated according to the attention weights to obtain the updated features of the prescription node; Repeat the above polymerization process multiple times to obtain the characteristic representation of the prescription. A security assessment and monitoring platform, comprising: The compatibility rule engine is used to obtain the composition of medicinal materials in the recommended prescription, match the composition of medicinal materials with a preset compatibility contraindication knowledge base, and generate a compatibility contraindication warning signal if there is a medicinal material pair that meets the contraindication rule. The dosage safety assessment unit obtains the reference dosage of each medicinal material in the recommended prescription, compares the reference dosage with a preset dosage safety range library, and generates a dosage warning signal if the reference dosage exceeds the safety range. The drug interaction early warning system receives the patient's Western medicine medication records, obtains the active ingredient information corresponding to the medicinal materials in the recommended prescription, calculates the interaction risk value between the active ingredient information and the Western medicine, and generates a combined use risk early warning signal if the interaction risk value exceeds a preset threshold. The comprehensive risk scoring unit is used to receive the incompatibility warning signal, the dosage warning signal, and the combined use risk warning signal, calculate the comprehensive risk score according to the preset risk weight, and if the comprehensive risk score does not meet the safety threshold, trigger the prescription adjustment process and return to the deep neural network inference engine to regenerate the recommended prescription.
2. The system of claim 1, wherein, The TCM syndrome differentiation diagnostic module is further used for: Before determining the syndrome feature vector corresponding to each symptom in the symptom data, the symptom data is standardized to map symptom terms with different expressions to unified standard terms. Based on the standard terminology, retrieve semantically related symptom nodes in the preset symptom semantic network, and obtain semantic extension information of the symptom nodes; The standard terms and semantic extension information are input into a pre-trained symptom encoder to generate the syndrome feature vector.
3. The system of claim 1, wherein, When the deep neural network inference engine calculates the matching score based on the formula feature representation and the syndrome feature vector, it includes: The formula feature representation and the syndrome feature vector are input into a bilinear interaction layer to calculate the feature interaction matrix; The feature interaction matrix is input into a multilayer perceptron for nonlinear transformation to obtain the matching score.
4. The system of claim 1, wherein, The recommended prescription includes the medicinal materials and reference dosage. When the compatibility rule engine matches the medicinal materials with a preset knowledge base of incompatibilities, it includes: The composition of medicinal materials in the recommended prescription is converted into a vector representation of medicinal materials, which is obtained by embedding medicinal material nodes in the prescription knowledge graph. For any two medicinal materials in the medicinal material composition, calculate the semantic similarity between the medicinal material vectors corresponding to the two medicinal materials; Retrieve from the incompatibilities knowledge base pairs of incompatible medicinal materials whose semantic similarity meets a preset similarity threshold; If a matching pair of contraindicated medicinal materials exists, the contraindication level information is determined according to the contraindication type. The contraindication types include the nineteen incompatible combinations, pregnancy contraindications, and incompatible combinations, with corresponding contraindication levels of Level 1, Level 2, Level 3, and Level 4 contraindications, respectively.
5. The system of claim 1, wherein, When the dose safety assessment unit compares the reference dose with a preset dose safety range library, it includes: Based on the patient's age, physical condition, and liver and kidney function information, the corresponding personalized safe dose range is queried from the dose safety range database; For each medicinal material in the recommended prescription, determine whether the reference dose is within the personalized safe dose range; If the reference dose is lower than the lower limit of the personalized safe dose range, an insufficient dose warning is generated; If the reference dose is higher than the upper limit of the personalized safe dose range, an overdose warning is generated; If the reference dose is within the personalized safe dose range and close to the upper limit, a dose-to-high warning will be generated.
6. The system of claim 1, wherein, When calculating the interaction risk value between the active ingredient information and the name of the Western medicine, the drug interaction early warning system includes: The active ingredient information of the medicinal materials in the recommended prescription is represented as an active ingredient vector, and the name of the Western medicine is represented as a Western medicine vector; The active ingredient vector and the Western medicine vector are concatenated and input into a multilayer perceptron to obtain an interaction risk value; The risk level is determined based on the interaction risk value. If the interaction risk value is greater than the first risk threshold, a severe combined use risk warning signal is generated. If the interaction risk value is within the range of the second risk threshold, a moderate combined use risk warning signal is generated. If the interaction risk value is within the range of the third risk threshold, a slight combined use risk warning signal is generated.
7. The system of claim 1, wherein, The system also includes: The knowledge graph update module is used to receive clinical feedback data, which includes actual prescription data, efficacy data, and adverse reaction data. The module dynamically updates the formula knowledge graph based on the clinical feedback data. The dynamic update includes adding new formula nodes, updating compatibility relationship weights, and supplementing contraindication information.
8. The system of claim 1, wherein, The graph neural network embedding in the formula knowledge graph adopts a rotation embedding model. For triples in the formula knowledge graph, the rotation embedding model represents the relation as a rotation operation in the complex space. It is trained by minimizing the distance of triples that conform to the facts of the knowledge graph and maximizing the distance of triples that do not conform to the facts.
Citation Information
Patent Citations
Traditional Chinese medicine prescription recommendation method based on knowledge graph
CN116680412A
Chinese and western medicine combined intelligent decision diagnosis and treatment method, system and equipment
CN120878033A