Multi-source heterogeneous graph-based traditional Chinese medicine prescription intelligent recommendation method, medium and equipment

By constructing a multi-source heterogeneous graph knowledge graph and graph convolutional network, the problem of insufficient static knowledge graph and shallow relationship modeling in TCM prescription recommendation is solved, realizing personalized and accurate TCM prescription recommendation, which meets the needs of modern clinical practice.

CN120878091APending Publication Date: 2025-10-31FUJIAN UNIV OF TRADITIONAL CHINESE MEDICINE
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510994034.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing methods for recommending TCM prescriptions suffer from limitations of static knowledge graphs and insufficient shallow relationship modeling, resulting in recommendations that are difficult to adapt to actual clinical needs and lack precision and personalization.

Method used

By constructing a multi-source heterogeneous graph knowledge graph, natural language processing technology is used to extract patient symptoms and physical characteristics. Combined with prescription composition and historical diagnosis and treatment data, graph convolutional networks are used to iteratively aggregate node features to achieve deep association modeling between symptoms, physical condition and prescription, and output personalized recommendation results.

Benefits of technology

It significantly improves the accuracy and personalization of TCM prescription recommendations, enabling dynamic adaptation to clinical needs and providing personalized TCM prescription treatment plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120878091A_ABST
    Figure CN120878091A_ABST
Patent Text Reader

Abstract

The invention discloses a traditional Chinese medicine prescription intelligent recommendation method based on a multi-source heterogeneous graph, a medium and equipment, and the method comprises the steps: firstly extracting a patient symptom feature vector through a natural language processing technology, and constructing a patient comprehensive feature in combination with a physical feature vector; generating a prescription feature vector based on prescription composition, efficacy classification and historical diagnosis and treatment data; a heterogeneous graph knowledge graph containing nodes of symptoms, physiques and prescriptions is constructed, node features are iteratively aggregated by using a graph convolutional network, and deep correlation modeling among symptoms, physiques and prescriptions is realized. And finally, a personalized recommendation result is output by calculating a matching score of the patient characteristics and the prescription nodes. According to the method, modern clinical data and the theory of traditional Chinese medicine are creatively combined, the accuracy, individuation and clinical applicability of prescription recommendation are remarkably improved through dynamic map construction and deep learning technologies, and an effective solution is provided for intelligent diagnosis and treatment of traditional Chinese medicine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of deep learning model technology, specifically to a method, medium, and device for intelligent recommendation of traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs. Background Technology

[0002] Traditional Chinese medicine (TCM) prescription recommendation is a core component of TCM's syndrome differentiation and treatment. Its goal is to provide patients with personalized TCM prescription treatment plans by analyzing multidimensional information such as symptoms, constitution, and etiology, combined with TCM theory and clinical experience. Traditional TCM prescription recommendation mainly relies on physicians' experience or expert systems based on fixed rules. While this method has some theoretical basis, it often suffers from insufficient accuracy and poor adaptability when faced with complex and dynamic clinical data.

[0003] In recent years, with the development of artificial intelligence technology, deep learning-based recommendation systems have shown great potential in the medical field. However, existing methods for recommending traditional Chinese medicine prescriptions still have the following key shortcomings:

[0004] (1) Limitations of Static Knowledge Graphs: Traditional methods typically construct static knowledge graphs based on classical medical texts or expert experience, failing to effectively integrate modern clinical diagnostic and treatment data (such as electronic medical records and actual medication records). Such static graphs cannot dynamically update the co-occurrence relationship between prescriptions and symptoms, making the recommendations difficult to adapt to actual clinical needs. Furthermore, traditional methods often overlook key information such as dosage adjustments and efficacy classifications in the prescription composition, resulting in a lack of precision and personalization in the recommended solutions.

[0005] (2) Shortcomings of shallow relationship modeling: Traditional recommendation algorithms (such as collaborative filtering and rule-based systems) have difficulty effectively capturing the complex nonlinear relationships between symptoms, constitution, and prescriptions. For example, collaborative filtering methods cannot model the triangular relationship between symptoms, constitution, and prescriptions, and content recommendation methods ignore the topological features of knowledge graphs, resulting in a lack of interpretability in the recommendation results.

[0006] To address the aforementioned issues, there is an urgent need for an intelligent recommendation method for TCM prescriptions that can dynamically integrate multi-source data, deeply characterize patient features, and effectively model complex relationships. Summary of the Invention

[0007] In view of the above problems, this application provides a TCM prescription intelligent recommendation scheme based on multi-source heterogeneous graphs to improve the accuracy of TCM prescription recommendations.

[0008] To achieve the above objectives, in a first aspect, this application provides a method for intelligent recommendation of traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs, the method comprising:

[0009] S1: Obtain the patient's symptom description text, perform natural language processing on the symptom description text, extract key symptom features, and generate a symptom feature vector based on the key symptom features;

[0010] S2: Obtain the patient's constitution type, perform One-Hot encoding on the constitution type, and generate a constitution feature vector;

[0011] S3: Based on the dosage vector of the components of the prescription, the semantic vector of efficacy classification, and the prescription-symptom co-occurrence frequency vector in historical medical records, a prescription feature vector is generated by feature splicing. The prescription-symptom co-occurrence frequency vector is generated by statistically analyzing the frequency of joint occurrence of each prescription with each symptom in historical medical records and then normalizing it.

[0012] S4: Construct a heterogeneous knowledge graph containing symptom nodes, constitution nodes, and prescription nodes. The weight of the connection edge between the prescription node and the symptom node is determined based on the cosine similarity between the prescription feature vector and the symptom feature vector. The weight of the connection edge between the prescription node and the constitution node is determined based on the dot product similarity between the value of the constitution adaptation dimension in the prescription feature vector and the constitution feature vector.

[0013] S5: Concatenate the symptom feature vector and the constitution feature vector into a comprehensive patient feature vector, calculate the Euclidean distance between the comprehensive patient feature vector and the feature vectors of each symptom node and constitution node in the heterogeneous graph knowledge graph, and select the K nodes with the smallest distance as the initial set of associated nodes;

[0014] S6: Starting from all nodes in the initial set of associated nodes, the features of neighboring nodes are iteratively aggregated along the edge structure of the heterogeneous graph knowledge graph through a graph convolutional network. The feature update of the prescription node depends on the features of its directly connected symptom nodes and constitution nodes.

[0015] S7: Calculate the matching score between the patient's comprehensive feature vector and each prescription node through the model, and output at least one prescription with the highest matching score as the recommendation result.

[0016] Furthermore, the formula for concatenating the symptom feature vector and the physical constitution feature vector into a comprehensive patient feature vector is as follows:

[0017] V i =Concat(V s V t );

[0018] Where Concat represents the feature vector concatenation operation, V i V represents the i-th comprehensive feature vector. s V represents the symptom feature vector. tThis represents the physical characteristic vector.

[0019] Furthermore, the calculation formula for iteratively aggregating the features of neighbor nodes along the edge structure of the heterogeneous graph knowledge graph using a graph convolutional network is as follows:

[0020] E = GCN(A,X);

[0021] Where E represents aggregated neighbor node features, GCN represents graph convolutional network, A represents the adjacency matrix of the heterogeneous graph knowledge graph, and X represents the node features in the initial set of associated nodes.

[0022] Furthermore, the graph convolutional network is a three-layer graph convolutional network.

[0023] Furthermore, the method also includes:

[0024] The learnable parameters of the model are optimized by a joint objective function, which includes the cross-entropy loss for the prescription recommendation task and the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph.

[0025] Furthermore, the method includes:

[0026] The formula for calculating the actual feedback score of the prescription is as follows:

[0027] y i,j =V i T ·P j ;

[0028] Among them, y i,j V represents the actual feedback score of the i-th patient for the j-th prescription. i T P represents the transpose of the i-th comprehensive eigenvector. j This represents the aggregated attribute feature of the j-th prescription node;

[0029] The formula for calculating the cross-entropy loss of the prescription recommendation task is as follows:

[0030]

[0031] in, This represents the cross-entropy loss of the prescription recommendation task. This represents the probability predicted by the model that the i-th patient prefers prescription j;

[0032] The formula for calculating the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph is as follows:

[0033]

[0034] in, Let h represent the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph, where (u,v)∈E represents the edge between symptom node u and prescription node v in the heterogeneous graph knowledge graph. u h represents the embedded feature vector of symptom node u. v Let |h| represent the embedding feature vector of the prescription node v. u | and |h v | represent h respectively u and h v Norm representation;

[0035] The formula for calculating the total loss function of the model is as follows:

[0036]

[0037] in, This represents the total loss function of the model.

[0038] Furthermore, natural language processing is performed on the symptom description text to extract key symptom features, including:

[0039] A pre-trained BERT model is used to perform sequence annotation on symptom description text, identify and structure the core symptom terms, associated body parts and symptom modification features, and obtain <symptom subject, location, attribute> triples, wherein the symptom modification features include at least one of symptom intensity, onset time and duration;

[0040] Based on the triples, syntactic dependencies between symptom entities are constructed through dependency parsing, and a graph attention network with multi-head attention mechanism is used to aggregate neighborhood information to generate semantic features containing contextual associations.

[0041] The semantic features are subjected to symptom intensity quantization and spatiotemporal feature encoding to obtain symptom feature vectors;

[0042] The symptom feature vector is matched and aligned with the standard symptom nodes in the TCM knowledge base, the representation of the symptom feature vector is standardized, and the standardized key symptom features are output.

[0043] Furthermore, step S3 includes:

[0044] The dosage of each component in the prescription is converted into a standardized numerical vector;

[0045] Based on the TCM efficacy classification system, the efficacy categories of prescriptions are mapped to semantic vectors;

[0046] Calculate the frequency of each prescription in combination with each symptom in historical medical records;

[0047] The frequency of co-occurrence of the aforementioned symptoms is normalized to generate a prescription-symptom co-occurrence frequency vector;

[0048] The dosage vector, semantic vector, and co-occurrence frequency vector are concatenated to generate the prescription feature vector.

[0049] In a second aspect, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in the first aspect of this application.

[0050] In a third aspect, this application provides an electronic device having a computer program stored thereon, including a processor and a storage medium, wherein the computer program is stored on the storage medium, and when executed by the processor, the computer program implements the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in the first aspect of this application.

[0051] Unlike existing technologies, the above-mentioned technical solution involves a method, medium, and device for intelligent recommendation of TCM prescriptions based on multi-source heterogeneous graphs. This method first extracts patient symptom feature vectors using natural language processing technology and combines them with constitution feature vectors to construct comprehensive patient characteristics. Simultaneously, it generates prescription feature vectors based on prescription composition, efficacy classification, and historical treatment data. By constructing a heterogeneous graph knowledge graph containing symptom, constitution, and prescription nodes, and using graph convolutional networks to iteratively aggregate node features, a deep correlation modeling between symptoms, constitution, and prescriptions is achieved. Finally, personalized recommendation results are output by calculating the matching score between patient features and prescription nodes. This application innovatively combines modern clinical data with TCM theory, significantly improving the accuracy, personalization, and clinical applicability of prescription recommendations through dynamic graph construction and deep learning technology, providing an effective solution for intelligent TCM diagnosis and treatment.

[0052] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description

[0053] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of this application and other related content, and should not be considered as limitations on this application.

[0054] In the accompanying drawings of the instruction manual:

[0055] Figure 1The flowchart is a first exemplary embodiment of the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs.

[0056] Figure 2 This is a flowchart of the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in the second exemplary embodiment of this application;

[0057] Figure 3 This is a flowchart of the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in the third exemplary embodiment of this application;

[0058] Figure 4 This is a flowchart of the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in the fourth exemplary embodiment of this application;

[0059] Figure 5 This is a schematic diagram of an electronic device according to an exemplary embodiment of this application;

[0060] The reference numerals used in the above figures are explained as follows:

[0061] 10. Electronic devices;

[0062] 101. Processor;

[0063] 102. Storage medium. Detailed Implementation

[0064] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.

[0065] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.

[0066] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.

[0067] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.

[0068] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.

[0069] Without further limitations, the use of terms such as “comprising,” “including,” “having,” or other similar open-ended expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.

[0070] Similar to the understanding in the Examination Guidelines, in this application, expressions such as "greater than," "less than," and "exceeding" are understood to exclude the stated number; expressions such as "above," "below," and "within" are understood to include the stated number. Furthermore, in the description of the embodiments in this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times," unless otherwise explicitly specified.

[0071] In the description of the embodiments of this application, the space-related expressions used, such as "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of this application or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.

[0072] Unless otherwise expressly specified or limited, the terms "installation," "connection," "linking," "fixing," and "setting," as used in the description of the embodiments of this application, should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components or the interaction between two components. For those skilled in the art to which this application pertains, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0073] In the first aspect, such as Figure 1 As shown, this application provides a method for intelligent recommendation of traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs, the method comprising:

[0074] S1: Obtain the patient's symptom description text, perform natural language processing on the symptom description text, extract key symptom features, and generate a symptom feature vector based on the key symptom features.

[0075] In step S1, for a given patient's symptom description text S, natural language processing, including word segmentation and entity recognition, can be performed on the text S to extract key features such as symptoms and constitution type. The symptom feature vector extracted from the text S is denoted as V. S This is used to represent the symptom information described by the patient, and the calculation formula is as follows:

[0076] V S =FeatureExtraction(S);

[0077] The FeatureExtraction() function is implemented using NLP technology, including word segmentation, NER, and vectorization.

[0078] S2: Obtain the patient's constitution type, perform One-Hot encoding on the constitution type, and generate a constitution feature vector.

[0079] In step S2, for a given patient's constitution description feature T, the patient's constitution type can be determined first according to traditional Chinese medicine theory, such as Yin deficiency or Yang deficiency, and then a constitution feature vector V can be generated using One-Hot encoding. t For example, if a patient's constitution type is Yin deficiency and Qi deficiency, then the corresponding code for their constitution description is:

[0080] V t =(1,0,1,0,0) T ;

[0081] The corresponding positions in the codes represent Yin deficiency, Yang deficiency, Qi deficiency, Blood deficiency, and Phlegm-dampness constitution, respectively.

[0082] S3: Based on the dosage vector of the components of the prescription, the semantic vector of efficacy classification, and the co-occurrence frequency vector of prescription and symptoms in historical medical records, the prescription feature vector is generated by feature concatenation.

[0083] In step S3, the prescription-symptom co-occurrence frequency vector is generated by statistically analyzing the frequency of co-occurrence of each prescription with each symptom in historical medical records and then normalizing the results.

[0084] In step S3, each prescription is represented as a feature vector P based on its ingredients, efficacy, and other information. i , where i is the index of the prescription, i.e., the i-th prescription. The feature vector of the prescription can be extracted through text description and efficacy, expressed by the following formula:

[0085] P i =FeatureExtraction(Prescription i );

[0086] Among them, P i The feature representation of prescription i is used to construct a heterogeneous graph knowledge graph.

[0087] Preferred, P i Features can include the ingredients, efficacy, and textual description of the prescription, which can be converted into numerical vectors. Specifically, the ingredients include the names of various Chinese medicinal herbs. This ingredient information is the core component of the prescription's features. The efficacy refers to the prescription's main therapeutic effects and indications. For example, is it used for clearing heat and detoxifying, or for tonifying qi and nourishing blood? The textual description includes other relevant textual information about the prescription, which may come from pharmacopoeias, medical books, clinical application records, etc. These descriptions can further enrich the prescription's features.

[0088] By processing this feature information (especially ingredients and efficacy) (e.g., using text embedding techniques, encoding techniques, etc.), a numerical vector is ultimately generated for each prescription i. This vector is the mathematical representation of the prescription in subsequent model calculations, enabling the computer to understand and process the relationships between different prescriptions as well as the relationships between prescriptions and other nodes such as symptoms and constitution.

[0089] S4: Construct a heterogeneous knowledge graph containing symptom nodes, constitution nodes, and prescription nodes.

[0090] In step S4, the weight of the connection edge between the prescription node and the symptom node is determined based on the cosine similarity between the prescription feature vector and the symptom feature vector, and the weight of the connection edge between the prescription node and the constitution node is determined based on the dot product similarity between the value of the constitution adaptation dimension in the prescription feature vector and the constitution feature vector.

[0091] In this embodiment, nodes in the heterogeneous graph knowledge graph can be divided into three categories: symptom nodes, constitution nodes, and prescription nodes. Symptom nodes represent the clinical symptoms exhibited by the patient, such as "fever" or "cough." Prescription nodes represent traditional Chinese medicine prescriptions, such as "Guizhi Tang" or "Sijunzi Tang." Constitution nodes represent the patient's constitution type, such as "Yin deficiency" or "Yang deficiency."

[0092] Then, based on classic Chinese medicine texts such as the *Huangdi Neijing* and *Shanghan Lun*, and combined with clinical relevant information and experience, information related to prescriptions, symptoms, and constitutions is provided. If there is a definite correlation between nodes in the literature, the nodes are connected to form an edge. For example, when it is determined that fever is related to prescription 1 (Guizhi Tang), the fever symptom node is connected to the Guizhi Tang prescription node. When it is determined that prescription 1 (Guizhi Tang) is related to Yang deficiency, the Guizhi Tang prescription node is connected to the Yang deficiency constitution node.

[0093] S5: Concatenate the symptom feature vector and the constitution feature vector into a comprehensive patient feature vector, calculate the Euclidean distance between the comprehensive patient feature vector and the feature vectors of each symptom node and constitution node in the heterogeneous graph knowledge graph, and select the K nodes with the smallest distance as the initial set of associated nodes.

[0094] In step S5, the formula for concatenating the symptom feature vector and the physical constitution feature vector into the patient's comprehensive feature vector is as follows:

[0095] V i =Concat(V s V t );

[0096] Where Concat represents the feature vector concatenation operation, V i V represents the i-th comprehensive feature vector. s V represents the symptom feature vector. t This represents the physical characteristic vector.

[0097] S6: Starting from all nodes in the initial set of associated nodes, iteratively aggregate the features of neighboring nodes along the edge structure of the heterogeneous graph knowledge graph using a graph convolutional network.

[0098] In step S6, the feature update of the prescription node depends on the features of its directly connected symptom nodes and constitution nodes.

[0099] S7: Calculate the matching score between the patient's comprehensive feature vector and each prescription node through the model, and output at least one prescription with the highest matching score as the recommendation result.

[0100] The above-described scheme describes a method, medium, and device for intelligent recommendation of TCM prescriptions based on multi-source heterogeneous graphs. This method first extracts patient symptom feature vectors using natural language processing technology and combines them with constitution feature vectors to construct comprehensive patient features. Simultaneously, it generates prescription feature vectors based on prescription composition, efficacy classification, and historical treatment data. By constructing a heterogeneous graph knowledge graph containing symptom, constitution, and prescription nodes, and using graph convolutional networks to iteratively aggregate node features, a deep association model between symptoms, constitution, and prescriptions is achieved. Finally, personalized recommendation results are output by calculating the matching score between patient features and prescription nodes. This application innovatively combines modern clinical data with TCM theory, significantly improving the accuracy, personalization, and clinical applicability of prescription recommendations through dynamic graph construction and deep learning technology, providing an effective solution for intelligent TCM diagnosis and treatment.

[0101] In some embodiments, the calculation formula for iteratively aggregating neighbor node features along the edge structure of the heterogeneous graph knowledge graph using a graph convolutional network is as follows:

[0102] E = GCN(A,X);

[0103] Where E represents aggregated neighbor node features, GCN represents graph convolutional network, A represents the adjacency matrix of the heterogeneous graph knowledge graph, and X represents the node features in the initial set of associated nodes.

[0104] Preferably, the graph convolutional network is a three-layer graph convolutional network.

[0105] X, as the input attribute features before computation in the Graph Convolutional Network (GCN), specifically refers to the initial feature representation inherent to each node in the knowledge graph before computation. These features are obtained based on the node's own attribute information through the method steps described in steps S1-S3.

[0106] For example, suppose the knowledge graph has the following nodes:

[0107] Symptom node - "cough": Its input attribute features may be a semantic embedding vector obtained by processing "cough" and its related descriptions (such as "dry cough" and "sputum") through a large language model (LLM). For example, it can be a 128-dimensional vector, such as [0.12, -0.05, ..., 0.78].

[0108] Constitution Node - "Qi Deficiency": If the constitution type is [Yin Deficiency, Yang Deficiency, Qi Deficiency, Blood Deficiency, Phlegm Dampness], then the input attribute feature of "Qi Deficiency" (using One-Hot encoding) is: [0,0,1,0,0].

[0109] The prescription node – “Sijunzi Tang”: Its input attribute features may be a vector obtained by means of the text description of the prescription ingredients (ginseng, atractylodes macrocephala, poria cocos, licorice) and the prescription efficacy (tonifying qi and strengthening the spleen), obtained through word embedding averaging, TF-IDF or other text feature extraction methods. For example, it can be a 200-dimensional vector, such as [-0.3, 0.67, ..., -0.11].

[0110] In some embodiments, the method further includes:

[0111] The learnable parameters of the model are optimized by a joint objective function, which includes the cross-entropy loss for the prescription recommendation task and the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph.

[0112] Furthermore, the method includes:

[0113] The formula for calculating the actual feedback score of the prescription is as follows:

[0114] y i,j =V i T ·P j ;

[0115] Among them, y i,j V represents the actual feedback score of the i-th patient for the j-th prescription. i T P represents the transpose of the i-th comprehensive eigenvector. j This represents the aggregated attribute feature of the j-th prescription node;

[0116] The formula for calculating the cross-entropy loss of the prescription recommendation task is as follows:

[0117]

[0118] in, This represents the cross-entropy loss of the prescription recommendation task. This represents the probability predicted by the model that the i-th patient prefers prescription j;

[0119] The formula for calculating the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph is as follows:

[0120]

[0121] in, Let h represent the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph, where (u,v)∈E represents the edge between the symptom node u and the prescription node v in the heterogeneous graph knowledge graph. u h represents the embedded feature vector of symptom node u. v Let |h| represent the embedding feature vector of the prescription node v. u | and |h v | represent h respectively u and h v Norm representation;

[0122] The formula for calculating the total loss function of the model is as follows:

[0123]

[0124] in, This represents the total loss function of the model.

[0125] The above scheme predicts the loss and sum through joint optimization graph. Figure 1 Consistency loss is used to guide the direction of model parameter updates and improve model prediction efficiency.

[0126] like Figure 3 As shown, in some embodiments, natural language processing is performed on the symptom description text to extract key symptom features, including:

[0127] S31: The pre-trained BERT model is used to perform sequence annotation on the symptom description text, identify and structure the core symptom terms, associated body parts and symptom modification features, and obtain the <symptom subject, location, attribute> triple.

[0128] In step S31, the symptom modification features include at least one of symptom intensity, onset time and duration.

[0129] S32: Based on the triples, construct the grammatical dependencies between symptom entities through dependency parsing, and aggregate neighborhood information using a graph attention network with a multi-head attention mechanism to generate semantic features containing contextual associations.

[0130] S33: Perform symptom intensity quantization and spatiotemporal feature encoding on the semantic features to obtain a symptom feature vector;

[0131] S34: Match and align the symptom feature vector with the standard symptom nodes in the TCM knowledge base, standardize the representation of the symptom feature vector, and output the standardized key symptom features.

[0132] In some embodiments, such as Figure 4 As shown, step S3 includes:

[0133] S41: Convert the dosage of each component in the prescription into a standardized numerical vector;

[0134] S42: Based on the TCM efficacy classification system, the efficacy categories of prescriptions are mapped to semantic vectors;

[0135] S43: Calculate the frequency of each prescription in combination with each symptom in historical medical records;

[0136] S44: Normalize the joint occurrence frequency to generate a prescription-symptom co-occurrence frequency vector;

[0137] S45: Concatenate the dose vector, semantic vector, and co-occurrence frequency vector to generate the prescription feature vector.

[0138] like Figure 2 As shown, the model involved in this application processes data through the following steps: inputting symptom descriptions, constitution characteristics, and prescription descriptions, and extracting symptom feature vectors V using LLM. s Using One-Hot encoding of the physical feature vector V t The feature vector P of the prescription was extracted using LLM. i A heterogeneous graph knowledge graph is constructed, incorporating modern clinical knowledge. The fusion feature E of the knowledge graph nodes is calculated, and the prediction loss is calculated. and Figure 1 Sexual damage Start iterative optimization of the model, determine whether the multi-task optimization is complete (based on whether the total loss is less than the preset error threshold), and output the recommended prescription.

[0139] This application has the following significant advantages over existing technical solutions:

[0140] (1) Intelligent extraction and fusion of multimodal features based on large language models

[0141] This application innovatively employs large language model technology for deep semantic analysis of patient symptom descriptions, overcoming the limitations of traditional rule-based or keyword-based matching methods. Through advanced natural language understanding capabilities, the system can accurately capture subtle differences and implicit semantics in symptom descriptions, significantly improving the accuracy and completeness of feature extraction. Simultaneously, by intelligently fusing structured constitution features with dynamic symptom semantic features, a multi-dimensional patient feature representation is constructed, providing a more comprehensive data foundation for personalized recommendations. This fusion mechanism retains the systematic characteristics of traditional Chinese medicine constitution theory while enhancing the dynamic adaptability of symptom descriptions, making the recommendation results more aligned with the individualized needs of patients.

[0142] (2) Construction of dynamic knowledge graph integrating modern clinical data

[0143] This application constructs a heterogeneous knowledge graph with continuous evolution capabilities by integrating classical Chinese medicine theory with modern clinical diagnostic and treatment data. This graph innovatively combines traditional prescription knowledge with clinical experience from modern practice, achieving a balance between the timeliness and practicality of knowledge representation. Through a self-designed dynamic update mechanism, the system can continuously absorb the latest clinical evidence, optimize knowledge representation, and make recommendations more aligned with actual clinical needs, effectively solving the problem of insufficient adaptability of traditional static knowledge graphs.

[0144] (3) Deep Association Intelligent Mining Based on Graph Neural Networks

[0145] This application employs an advanced graph neural network architecture to achieve intelligent modeling of the complex relationship between symptoms, constitution, and prescription. This design offers the following technical advantages:

[0146] ① It can automatically discover and explore deep-seated correlation patterns between symptom combinations and body constitution types;

[0147] ② Possesses cross-domain reasoning ability, and can simultaneously analyze the multidimensional relationship between prescription composition, efficacy classification and clinical practice;

[0148] ③ Through a dynamic adjustment mechanism, it can adapt to the special correspondence in individualized diagnosis and treatment.

[0149] This technical solution effectively enhances the system's ability to understand and process complex medical relationships, making the recommendations more accurate and reasonable while maintaining good interpretability.

[0150] In a second aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in the first aspect of this application.

[0151] The computer-readable storage medium may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.

[0152] The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD ROM); the magnetic surface memory may be a disk storage device or a magnetic tape storage device.

[0153] The volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synclink dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The computer-readable storage media described in the embodiments of this application are intended to include these and any other suitable types of memory.

[0154] like Figure 5 As shown, in a third aspect, this application provides an electronic device 10, including a processor 101 and a storage medium 102, wherein a computer program is stored on the storage medium, and the computer program, when executed by the processor, implements the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in the first aspect of this application.

[0155] In some embodiments, the processor may be implemented by software, hardware, firmware, or a combination thereof, and may be a circuit, one or more of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, or a microprocessor, thereby enabling the processor to execute some or all of the steps, or any combination thereof, of the steps in the intelligent recommendation method for TCM prescriptions based on multi-source heterogeneous graphs described in the various embodiments of this application.

[0156] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. A method for intelligent recommendation of traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs, characterized in that, The method includes: S1: Obtain the patient's symptom description text, perform natural language processing on the symptom description text, extract key symptom features, and generate a symptom feature vector based on the key symptom features; S2: Obtain the patient's constitution type, perform One-Hot encoding on the constitution type, and generate a constitution feature vector; S3: Based on the dosage vector of the components of the prescription, the semantic vector of efficacy classification, and the prescription-symptom co-occurrence frequency vector in historical medical records, a prescription feature vector is generated by feature splicing. The prescription-symptom co-occurrence frequency vector is generated by statistically analyzing the frequency of joint occurrence of each prescription with each symptom in historical medical records and then normalizing it. S4: Construct a heterogeneous knowledge graph containing symptom nodes, constitution nodes, and prescription nodes. The weight of the connection edge between the prescription node and the symptom node is determined based on the cosine similarity between the prescription feature vector and the symptom feature vector. The weight of the connection edge between the prescription node and the constitution node is determined based on the dot product similarity between the value of the constitution adaptation dimension in the prescription feature vector and the constitution feature vector. S5: Concatenate the symptom feature vector and the constitution feature vector into a comprehensive patient feature vector, calculate the Euclidean distance between the comprehensive patient feature vector and the feature vectors of each symptom node and constitution node in the heterogeneous graph knowledge graph, and select the K nodes with the smallest distance as the initial set of associated nodes; S6: Starting from all nodes in the initial set of associated nodes, the features of neighboring nodes are iteratively aggregated along the edge structure of the heterogeneous graph knowledge graph through a graph convolutional network. The feature update of the prescription node depends on the features of its directly connected symptom nodes and constitution nodes. S7: Calculate the matching score between the patient's comprehensive feature vector and each prescription node through the model, and output at least one prescription with the highest matching score as the recommendation result.

2. The intelligent recommendation method for TCM prescriptions based on multi-source heterogeneous graphs as described in claim 1, characterized in that, The formula for concatenating the symptom feature vector and the physical constitution feature vector into the patient's comprehensive feature vector is as follows: In i =Concat(V s ,V t ); Where Concat represents the feature vector concatenation operation, V i V represents the i-th comprehensive feature vector. s V represents the symptom feature vector. t This represents the physical characteristic vector.

3. The intelligent recommendation method for TCM prescriptions based on multi-source heterogeneous graphs as described in claim 2, characterized in that, The calculation formula for iteratively aggregating the features of neighbor nodes along the edge structure of the heterogeneous graph knowledge graph using a graph convolutional network is as follows: E = GCN(A,X); Where E represents aggregated neighbor node features, GCN represents graph convolutional network, A represents the adjacency matrix of the heterogeneous graph knowledge graph, and X represents the node features in the initial set of associated nodes.

4. The intelligent recommendation method for TCM prescriptions based on multi-source heterogeneous graphs as described in claim 1 or 3, characterized in that, The graph convolutional network is a three-layer graph convolutional network.

5. The intelligent recommendation method for TCM prescriptions based on multi-source heterogeneous graphs as described in claim 4, characterized in that, The method further includes: The learnable parameters of the model are optimized by a joint objective function, which includes the cross-entropy loss for the prescription recommendation task and the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph.

6. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in claim 5, characterized in that, The method includes: The formula for calculating the actual feedback score of the prescription is as follows: y i,j =V i T ·P j ; Among them, y i,j V represents the actual feedback score of the i-th patient for the j-th prescription. i T P represents the transpose of the i-th comprehensive eigenvector. j This represents the aggregated attribute feature of the j-th prescription node; The formula for calculating the cross-entropy loss of the prescription recommendation task is as follows: in, This represents the cross-entropy loss of the prescription recommendation task. This represents the probability predicted by the model that the i-th patient prefers prescription j; The formula for calculating the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph is as follows: in, Let h represent the graph Laplacian regularization loss based on the adjacency matrix of the heterogeneous graph knowledge graph, where (u,v)∈E represents the edge between the symptom node u and the prescription node v in the heterogeneous graph knowledge graph. u h represents the embedded feature vector of symptom node u. v Let |h| represent the embedding feature vector of the prescription node v. u | and |h v | represent h respectively u and g v Norm representation; The formula for calculating the total loss function of the model is as follows: in, This represents the total loss function of the model.

7. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in claim 1, characterized in that, Natural language processing was performed on the symptom description text to extract key symptom features, including: A pre-trained BERT model is used to perform sequence annotation on symptom description text, identify and structure the core symptom terms, associated body parts and symptom modification features, and obtain <symptom subject, location, attribute> triples, wherein the symptom modification features include at least one of symptom intensity, onset time and duration; Based on the triples, syntactic dependencies between symptom entities are constructed through dependency parsing, and a graph attention network with multi-head attention mechanism is used to aggregate neighborhood information to generate semantic features containing contextual associations. The semantic features are subjected to symptom intensity quantization and spatiotemporal feature encoding to obtain symptom feature vectors; The symptom feature vector is matched and aligned with the standard symptom nodes in the TCM knowledge base, the representation of the symptom feature vector is standardized, and the standardized key symptom features are output.

8. The intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in claim 1, characterized in that, Step S3 includes: The dosage of each component in the prescription is converted into a standardized numerical vector; Based on the TCM efficacy classification system, the efficacy categories of prescriptions are mapped to semantic vectors; Calculate the frequency of each prescription in combination with each symptom in historical medical records; The frequency of co-occurrence of the aforementioned symptoms is normalized to generate a prescription-symptom co-occurrence frequency vector; The dosage vector, semantic vector, and co-occurrence frequency vector are concatenated to generate the prescription feature vector.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in any one of claims 1 to 8.

10. An electronic device having a computer program stored thereon, characterized in that, The device includes a processor and a storage medium, wherein a computer program is stored on the storage medium, and when executed by the processor, the computer program implements the intelligent recommendation method for traditional Chinese medicine prescriptions based on multi-source heterogeneous graphs as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Intelligent matching method and device based on convolutional network, equipment and medium

    CN121167331A