A traditional chinese medicine recommendation method based on knowledge driving and residual attention network

By constructing a traditional Chinese medicine (TCM) recommendation model using graph attention neural networks and residual network structures, a problem of prescription compatibility for new TCM doctors is solved, and the intelligence and accuracy of TCM recommendations are improved.

CN119517319BActive Publication Date: 2026-01-02HUNAN UNIV OF CHINESE MEDICINE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411775987.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2026-01-02
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Newly hired TCM doctors often struggle to accurately and efficiently formulate prescriptions when faced with complex cases, and current technologies are insufficient to effectively utilize the vast amount of medical records and classical prescriptions to recommend Chinese medicines.

Method used

A multidimensional TCM attribute evaluation model is constructed by combining graph attention neural network (GAT) with residual network structure. By constructing entity heterogeneity graph of TCM prescription and symptom-symptom graph, the model learns low-dimensional vector representations of symptoms and TCM, and integrates the relationship between TCM drugs and prescription syndrome to recommend suitable TCM.

Benefits of technology

It improves the accuracy and efficiency of TCM recommendations, enabling the recommendation of appropriate TCM based on patient symptoms, assisting doctors in formulating prescriptions, alleviating the data sparsity problem in TCM recommendations, and enhancing the ability to learn from differences in efficacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119517319B_ABST
    Figure CN119517319B_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicine recommendation method based on knowledge driving and residual attention network, and comprises the following steps: S1, a data collection and cleaning module: obtaining prescription text data, performing a standardization process on symptoms and traditional Chinese medicine terms in the prescription text data, and dividing the data set after the standardization process into a training set, a verification set and a test set; S2, an entity pre-training module: extracting symptom semantic features by using a Word2vec training model to extract feature of symptom entity in the prescription and obtain overall context semantic representation, constructing a traditional Chinese medicine attribute knowledge graph, and integrating natural attribute features of traditional Chinese medicine into a recommendation model as external knowledge; S3, a multi-graph construction and entity feature learning module: constructing a "symptom-traditional Chinese medicine" heterogeneous graph (SHHG), a "symptom-symptom" homogeneous graph (SSIG) and a "traditional Chinese medicine-traditional Chinese medicine" homogeneous graph (HHIG) according to the co-occurrence relationship between symptoms and traditional Chinese medicine, extracting symptom features, traditional Chinese medicine features and their interaction features from the "symptom-traditional Chinese medicine" heterogeneous graph (SHHG), the "symptom-symptom" homogeneous graph (SSIG) and the "traditional Chinese medicine-traditional Chinese medicine" homogeneous graph (HHIG) respectively by using a graph attention neural network, and enhancing entity features by using a residual structure; and S4, a feature fusion and traditional Chinese medicine recommendation module: fusing the symptom features and the traditional Chinese medicine features extracted from the "symptom-traditional Chinese medicine" heterogeneous graph (SHHG), the "symptom-symptom" homogeneous graph (SSIG) and the "traditional Chinese medicine-traditional Chinese medicine" homogeneous graph (HHIG) respectively, obtaining final symptom features and traditional Chinese medicine features, expressing syndrome features by using an MLP, and finally recommending a suitable traditional Chinese medicine set according to a given symptom set.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of recommendation algorithm based on graph representation, and in particular to a traditional Chinese medicine recommendation method based on knowledge driving and residual attention network. BACKGROUND

[0002] Traditional Chinese medicine provides a unique medical theory system and has long played an important role in China's health care and gradually been widely used around the world. Prescriptions are an important means of traditional Chinese medicine treatment, and traditional Chinese medicine practitioners usually prescribe drugs and formulate prescriptions based on rich clinical experience and theoretical knowledge. However, this relies on the accumulation of experience of doctors and requires traditional Chinese medicine practitioners to have deep professional knowledge and rich clinical practice. However, many young doctors who are new to the job often have difficulty in accurately and efficiently formulating prescriptions when faced with complex cases due to lack of experience.

[0003] The vast amount of medical records and classical prescriptions left by medical experts in past dynasties contain the thoughts and treatment experience of medical experts, many of which are worth learning and using. With the development of artificial intelligence, a large number of studies use it to standardize and mine prescription data. Among them, deep learning is a feature learning technology with superior performance, which maps raw data through a nonlinear model to a higher level and more abstract vector representation, learns complex relationships through enough mapping to solve practical problems, and has good generalization ability. Therefore, analyzing traditional Chinese medicine clinical cases and prescription data with the help of deep learning technology to mine the inherent prescription and compatibility rules is an effective way to develop traditional Chinese medicine.

[0004] The present application extracts prescription data from prescription classics and authoritative websites, constructs a multi-dimensional traditional Chinese medicine attribute evaluation model and a symptom feature extraction model to perform initial feature coding on prescriptions, traditional Chinese medicines and symptoms, respectively, constructs a traditional Chinese medicine prescription entity heterogeneous graph, a symptom-symptom graph and a traditional Chinese medicine-traditional Chinese medicine graph according to the symptoms and traditional Chinese medicine co-occurrence relationships contained in the prescriptions, and learns low-dimensional vector representations of the symptom, traditional Chinese medicine and prescription nodes in the graph through a GAT network representation learning method. By fusing external knowledge such as traditional Chinese medicine and prescription relationships, a traditional Chinese medicine recommendation model that integrates entity attribute features is constructed to deeply interpret the ideas of traditional Chinese medicine syndrome differentiation and treatment and prescription and compatibility. SUMMARY

[0005] The technical problem to be solved by the present application is to provide a novel traditional Chinese medicine recommendation method, which focuses on the different effects of traditional Chinese medicine on symptoms through a graph attention neural network, enhances entity features using a residual network structure, and fuses symptom semantic information and external knowledge of traditional Chinese medicine, so as to recommend appropriate traditional Chinese medicine according to patient symptoms and assist doctors in clinical prescription making.

[0006] The traditional Chinese medicine recommendation method based on knowledge driving and residual attention network comprises the following steps:

[0007] S1, data collection and cleaning module: obtain prescription text data, perform standardization process on symptoms and traditional Chinese medicine terms in the prescription text data, including unifying different names, removing duplicates, etc., and then divide the processed data set into a training set, a validation set and a test set; wherein the prescription text data refers to the prescription text data.

[0008] S2, entity pre-training module: use a Word2vec training model to extract symptom semantic features to extract features of symptom entities in the prescription and obtain overall context semantic representation. In addition, a traditional Chinese medicine attribute knowledge graph is constructed, and natural attribute features of traditional Chinese medicine are used as external knowledge to be integrated into the recommendation model;

[0009] S3, multi-graph construction and entity feature learning module: according to the co-occurrence relationship between symptoms and traditional Chinese medicine, a “symptom-traditional Chinese medicine” heterogeneous graph (G ), a “symptom-symptom” isomorphic graph (G ) and a “traditional Chinese medicine-traditional Chinese medicine” isomorphic graph (G ) are constructed. Graph attention neural network is used to extract symptom features, traditional Chinese medicine features and their interaction features from G , respectively, and residual structure is used to enhance entity features;

[0010] S4, feature fusion and traditional Chinese medicine recommendation module: the symptom features and traditional Chinese medicine features extracted from the three subgraphs are fused respectively to obtain the final traditional Chinese medicine features and symptom features. The syndrome features are expressed by MLP, and finally the appropriate traditional Chinese medicine set is recommended according to the given symptom set.

[0011] Further, the prescription text data includes prescription name, function category, prescription composition, function and indication, etc., the traditional Chinese medicine terms include traditional Chinese medicine name, nature and taste, meridian and toxicity information, the nature and taste include cold, heat, warm, good, flat, sour, bitter, sweet, pungent and salty, and the meridian includes lung, pericardium, heart, large intestine, triple energizer, small intestine, stomach, gallbladder, bladder, spleen, liver and kidney.

[0012] Further, in S1, the collected prescription data is standardized and cleaned, including:

[0013] S101, Standardization of Traditional Chinese Medicine Terminology, uses the 2020 edition of the Pharmacopoeia of the People's Republic of China as the standard to replace the correct and alternative names of traditional Chinese medicines in prescription data. For those without alternative names, no processing is done. For those with one correct and one alternative name, the correct name is directly replaced. For confusing drug names, they are identified based on the context (efficacy, indications, etc.) before the correct name is replaced.

[0014] S102, Symptom Terminology Standardization, uses the 2660 symptom terms collected in the "Standardization of Common Symptom Terminology in Traditional Chinese Medicine (2005 Edition)" as the standard to preprocess the symptoms appearing in the collected prescription data.

[0015] Furthermore, in S2, the pre-training for traditional Chinese medicine entities includes:

[0016] S201, Pre-training of Traditional Chinese Medicine Attribute Features, uses 23-dimensional vectors to quantify the natural attributes of Traditional Chinese Medicine. Let... ,in Represents the first in the entire dataset The properties of each Chinese herbal medicine are defined. To embed the four natures, five flavors, and toxicity into the vector, a three-level intensity classification is used: for example, the "cold" nature of a Chinese herbal medicine includes "slightly cold," "cold," and "very cold," represented by intensities of 0.5, 1, and 2, respectively. For meridian tropism, binary encoding (0 or 1) is used to clearly identify whether the Chinese herbal medicine has an effect on a specific organ.

[0017] S202, Symptom Semantic Feature Pre-training: To extract features of symptom entities from prescriptions and obtain an overall contextual semantic representation, the Word2vec trained model is applied to symptom semantic feature extraction. Let... ,in This indicates the first generation of Word2vec pre-trained... Each symptom word is embedded, and the dimension of each word vector is set to 100.

[0018] Furthermore, in S3, multi-graph construction and entity feature extraction include:

[0019] S301, Constructing a Symptom-Traditional Chinese Medicine Heterogeneity Map (SHHG) ,in express Symptoms and key points of traditional Chinese medicine. Composed of edges between all symptom and traditional Chinese medicine nodes, it contains the potential relationships between symptoms and traditional Chinese medicine, as follows: Graph construction formula:

[0020] ,

[0021] in Does this indicate an interaction between the symptoms and the traditional Chinese medicine?

[0022] S302, construct a "symptom-symptom" isomorphic graph (SSIG) , denotes the set of all symptom nodes, denotes the set of co-occurrence edges between symptoms, and the construction formula is as follows:

[0023] ,

[0024] wherein denotes whether there is a co-occurrence relationship between symptoms;

[0025] S303, construct a "herbal medicine-herbal medicine" isomorphic graph (HHIG) , denotes the set of all herbal medicine nodes, the edge set composed of co-occurrence edges between herbal medicines, and the construction formula is as follows:

[0026] ,

[0027] wherein denotes whether there is a co-occurrence relationship between herbal medicines;

[0028] S304, calculate the similarity coefficient between each node in , and its neighbors, and the specific calculation formula is as follows:

[0029] ,

[0030] wherein, is a shared self-attention mechanism, which is composed of a single-layer feedforward propagation network, is a learnable weight parameter, is a concatenation operation, represents the input feature of the symptom node , denotes the importance of node to ;

[0031] S305, normalize the attention coefficient using function, so that the attention coefficient has comparability on all nodes in the graph, and the calculation process is as follows:

[0032] ,

[0033] wherein denotes the neighbor node set of node ;

[0034] ​S306, the overall feature of each node is obtained using the multi-head attention mechanism, and the calculation formula is as follows:

[0035] ,

[0036] Wherein is the number of heads used in the multi-head self-attention mechanism;

[0037] S307, the residual structure is used to enhance the feature representation of each node in the graph, and the specific calculation formula is as follows:

[0038] ,

[0039] Finally, all the symptom feature learned by the graph is represented as , The traditional Chinese medicine feature learned in the graph is represented as The interaction information of symptoms and traditional Chinese medicines in the graph is fused as symptom feature and traditional Chinese medicine feature .

[0040] Further, the feature fusion and traditional Chinese medicine recommendation in S4 include:

[0041] S401, feature fusion, the node features extracted from the three graphs are fused to obtain symptom feature and traditional Chinese medicine feature , and the feature fusion process is shown as follows:

[0042] ,

[0043] ;

[0044] S402, use multi-layer perception (MLP) to infer the symptom set to obtain the patient's syndrome, and the calculation process is as follows:

[0045] ,

[0046] Wherein represents the one-hot encoding matrix of the symptom set contained in each prescription;

[0047] S403, traditional Chinese medicine recommendation, after obtaining the representation of each group of symptoms, the probability that all traditional Chinese medicines can treat the symptom set can be calculated, and the calculation formula is as follows:

[0048] ,

[0049] After obtaining the final prediction score of each group of symptoms, the The binary cross-entropy loss function of the activation function is used to optimize the model.

[0050] The beneficial effects of the traditional Chinese medicine recommendation method provided by this invention are:

[0051] I. The traditional Chinese medicine recommendation method based on multi-graph residual attention neural network fusion of symptom semantic knowledge provided by this invention utilizes Word2Vec model to learn the contextual semantic information of symptom terms, thereby better capturing the semantic features of symptoms in prescriptions.

[0052] Second, this invention takes into account the inherent properties of traditional Chinese medicine. It quantifies the "four natures and five flavors" and meridian tropism of traditional Chinese medicine and uses them as initial features to input into the model, thereby alleviating the data sparsity problem that is common in traditional Chinese medicine recommendations.

[0053] Third, considering that different Chinese medicines have different therapeutic effects on symptoms, this invention uses graph attention neural network to learn the relationship between Chinese medicines and symptoms, and enhances entity features through residual structure, thereby improving the model's ability to learn the differences in therapeutic effects.

[0054] Fourth, this invention uses graph attention neural networks and attention mechanisms as core technologies, transforms the complex relationship topology between TCM entities into a heterogeneous graph, and integrates the natural attributes and component characteristics of TCM as external knowledge to explore the medication rules in TCM prescriptions, study intelligent TCM recommendation technology, and provide a basis for TCM clinical prescription. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 This is the overall flowchart of the traditional Chinese medicine recommendation method based on knowledge-driven and residual attention networks of this invention.

[0057] Figure 2 This is a case study diagram of experimental results in this invention. Detailed Implementation

[0058] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, and to make the above-mentioned objectives, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

[0059] It should be noted that the description of the embodiments is used to help understand the present application, but does not constitute a limitation of the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0060] Please refer to Figure 1 and Figure 2 , a Chinese medicine recommendation method based on a multi-graph residual attention neural network and combining symptom semantic knowledge, the method comprising the following steps:

[0061] S1, data collection and cleaning module: obtaining prescription text data, performing standardization process on the symptoms and Chinese medicine terms therein, including unifying synonyms and removing duplicates, etc., and then dividing the processed data set into training set, validation set and test set;

[0062] S2, entity pre-training module: using Word2vec training model to extract symptom semantic features to extract features of symptom entities in the prescription and obtain overall context semantic representation. In addition, a Chinese medicine attribute knowledge graph is constructed, and the natural attribute features of Chinese medicine are used as external knowledge to integrate into the recommendation model;

[0063] S3, multi-graph construction and entity feature learning module: according to the co-occurrence relationship between symptoms and Chinese medicine, respectively construct "symptom-Chinese medicine" heterogeneous graph (G ), "symptom-symptom" isomorphic graph (G ) and "Chinese medicine-Chinese medicine" isomorphic graph (G ). Use graph attention neural network to extract symptom features, Chinese medicine features and their interaction features from G 、 and , and use residual structure to enhance entity features;

[0064] S4, feature fusion and Chinese medicine recommendation module: fuse the symptom features and Chinese medicine features extracted from the three subgraphs respectively to obtain the final Chinese medicine features and symptom features. Use MLP to express the syndrome features, and finally recommend appropriate Chinese medicine set according to the given symptom set.

[0065] Preferably, the prescription database includes prescription name, function category, prescription composition, function and indication, etc., the Chinese medicine database includes Chinese medicine name, nature and taste, meridian and toxicity information, the nature and taste includes cold, hot, warm, good, flat, sour, bitter, sweet, pungent and salty, and the meridian includes lung, pericardium, heart, large intestine, triple energizer, small intestine, stomach, gallbladder, bladder, spleen, liver and kidney.

[0066] Among them, the collected prescription data is shown in Table 1, the Chinese medicine data is shown in Table 2, and the symptom term classification is shown in Table 3.

[0067] Table 1 shows an example of the collected prescription data.

[0068]

[0069] Table 2 Example of Traditional Chinese Medicine Data

[0070]

[0071] Table 3 Examples of Symptom Terminology Classification

[0072]

[0073] Preferably, in S1, the collected prescription data is standardized and cleaned, including:

[0074] S101, Standardization of Traditional Chinese Medicine Terminology, uses the 2020 edition of the Pharmacopoeia of the People's Republic of China as the standard to replace the correct and alternative names of traditional Chinese medicines in prescription data. For those without alternative names, no processing is done. For those with one correct and one alternative name, the correct name is directly replaced. For confusing drug names, they are identified based on the context (efficacy, indications, etc.) before the correct name is replaced.

[0075] S102, Symptom Terminology Standardization, uses the 2660 symptom terms collected in the "Standardization of Common Symptom Terminology in Traditional Chinese Medicine (2005 Edition)" as the standard to preprocess the symptoms appearing in the collected prescription data.

[0076] Preferably, in S2, the pre-training of traditional Chinese medicine entities includes:

[0077] S201, Pre-training of Traditional Chinese Medicine Attribute Features, uses 23-dimensional vectors to quantify the natural attributes of Traditional Chinese Medicine. Let... ,in Represents the first in the entire dataset The properties of traditional Chinese medicine (TCM) are analyzed. To embed the four natures, five flavors, and toxicity into the vector, a three-level intensity classification is used: for example, the "cold" nature of TCM includes "slightly cold," "cold," and "very cold," represented by intensities of 0.5, 1, and 2, respectively. For meridian tropism, binary encoding (0 or 1) is used to clearly identify whether the TCM has an effect on a specific organ. Taking ginseng and hawthorn as examples (see Table 4), the medicinal properties of TCM are illustrated as the initial feature vector representation.

[0078] Table 4. Examples of 23-dimensional quantification of traditional Chinese medicine

[0079]

[0080] S202, Symptom Semantic Feature Learning, involves extracting features of symptom entities from a prescription and obtaining an overall contextual semantic representation. This is achieved by applying a Word2vec trained model to symptom semantic feature extraction. ,in represents the first symptom word embedding pre-trained by Word2vec, each word vector dimension is set to 100.

[0081] Preferably, in S3, multi-graph construction and entity feature extraction, comprising:

[0082] S301, constructing a "symptom-TCM" heterogeneous graph (SHHG) , represents the symptom and TCM nodes in . composed of edges between all symptom and TCM nodes, contains the potential relationship between symptoms and TCMs, and the following is graph construction formula:

[0083] ,

[0084] wherein represent whether there is an interaction between symptoms and TCMs;

[0085] S302, constructing a "symptom-symptom" isomorphic graph (SSIG) , represents the set of all symptom nodes, represents the set of co-occurrence edges between symptoms and symptoms, and the construction formula is as follows:

[0086] ,

[0087] wherein represents whether there is a co-occurrence relationship between symptoms;

[0088] S303, constructing a "TCM-TCM" isomorphic graph (HHIG) , represents the set of all TCM nodes, the edge set composed of co-occurrence edges between TCMs, and the construction formula is as follows:

[0089] ,

[0090] wherein represents whether there is a co-occurrence relationship between TCMs;

[0091] S304, calculating the similarity coefficient between each node and its neighbors in , and , and the specific calculation formula is as follows:

[0092] ,

[0093] wherein, is a shared self-attention mechanism, which is composed of a single-layer feed-forward propagation network, is a learnable weight parameter, is a concatenation operation, represents a symptom node input features, denotes the importance of the node to ;

[0094] S305, the attention coefficient is normalized by using the function, so that the attention coefficient has comparability on all nodes in the graph, and the calculation process is as follows:

[0095] ,

[0096] where denotes the neighbor node set of the node ;

[0097] S306, use the multi-head attention mechanism to obtain the overall feature of each node, and the calculation formula is as follows:

[0098] ,

[0099] where is the number of heads used in the multi-head self-attention mechanism;

[0100] S307, use the residual structure to enhance the feature representation of each node in the graph, and the specific calculation formula is as follows:

[0101] ,

[0102] Finally, all the symptom feature learned by the graph is represented as , the traditional Chinese medicine feature learned in is represented as , and the interaction information of symptoms and traditional Chinese medicines in the graph is fused as symptom feature and traditional Chinese medicine feature .

[0103] Preferably, in S4, feature fusion and traditional Chinese medicine recommendation include:

[0104] S401, feature fusion, fuse the node features extracted on the three graphs to obtain symptom feature and traditional Chinese medicine feature , and the feature fusion process is represented as shown below:

[0105] ,

[0106] ;

[0107] S402, a multi-layer perception (MLP) is used to infer the symptom set to obtain the patient's syndrome, and the calculation process is as shown below:

[0108] ,

[0109] Wherein represents a one-hot encoding matrix containing the symptom set in each prescription;

[0110] S403, after obtaining the representation of each group of symptoms, the probability that all traditional Chinese medicines can treat the symptom set can be calculated, and the calculation formula is as shown below:

[0111] ,

[0112] After obtaining the final prediction score of each group of symptoms, a binary cross-entropy loss function with an activation function is used to optimize the model.

[0113] To verify the effectiveness of the traditional Chinese medicine recommendation method based on knowledge driving and residual attention network, the present application carries out experiments on the data set, including prescription data collected and cleaned from ancient Chinese medical books, teaching materials and several authoritative websites, including Golden Cabinet, Treatise on Febrile Diseases, Prescription Science, Medicine Wisdom Network and Chinese Medicine Encyclopedia. The specific division results of the data set are shown in Table 5.

[0114] Table 5 Distribution table of data set

[0115]

[0116] In the present application, the , and are used to verify the performance of the model, wherein represents the number of recommended traditional Chinese medicines, since the number of traditional Chinese medicines in the prescription is generally between 15-20, therefore is set to , and the specific calculation formula is as shown below.

[0117] ,

[0118] ,

[0119] ,

[0120] represents the accuracy of predicting the first traditional Chinese medicines as correct traditional Chinese medicines, wherein ​is a set of traditional Chinese medicines predicted according to a given symptom set, is a correct set of traditional Chinese medicines for a given symptom set, represents the probability of being able to predict traditional Chinese medicine, is a comprehensive evaluation index.

[0121] The following models are used for comparison:

[0122] Matrix Factorization (MF): The association between symptoms and traditional Chinese medicines is regarded as an association matrix, and the traditional Chinese medicine treatment score corresponding to each symptom group is calculated through matrix decomposition.

[0123] Neural Graph Collaborative Filtering (NGCF): A recommendation model based on collaborative filtering, which obtains the features of symptoms and traditional Chinese medicines by information propagation on the "symptom- traditional Chinese medicine" bipartite graph.

[0124] Light Graph Convolution (Light GCN): Linear propagation of the "symptom- traditional Chinese medicine" interaction matrix is used to learn the features of symptoms and traditional Chinese medicines, and all the features learned by the network layers are output as the final entity features.

[0125] All experiments of the present application are run on a computer equipped with an Intel Core i7-10700 CPU and a NVIDIA GeForce RTX3060.

[0126] Table 6 Traditional Chinese medicine recommendation results of the prescription dataset on different baseline models

[0127]

[0128] Table 6 shows the results of traditional Chinese medicine recommendation experiments on the dataset using four baseline models, with TCMRec being the traditional Chinese medicine recommendation model proposed by the present application. The experimental results show that, in terms of evaluation indicators such as accuracy, recall rate and F1 value, the performance of TCMRec is better than that of other baseline models, achieving the best traditional Chinese medicine recommendation effect. Specifically, TCMRec has , and The performance of these methods is 56.67%, 46.25%, and 32.61% higher than that of the better-performing NGCF, respectively. Although MF, NGCF, and Light GCN capture the high-order correlation between symptoms and traditional Chinese medicines by constructing a "symptom-TCM" interaction matrix and introducing convolutional layers, their performance in prescription recommendation tasks is still unsatisfactory. Specifically, MF mainly learns potential low-dimensional feature representations by decomposing the "symptom-TCM" interaction matrix. However, the MF method is inherently linear and struggles to effectively capture complex nonlinear interactions, especially when dealing with high-order relationships between multiple symptoms and TCMs. NGCF, as a graph neural network model, improves upon traditional collaborative filtering methods by learning richer features through message propagation on the "symptom-TCM" bipartite graph, aggregating neighbor information of nodes layer by layer. However, NGCF still mainly focuses on the direct interaction between symptoms and TCMs, neglecting the potential connections between symptoms. Light GCN focuses on acquiring symptom and traditional Chinese medicine (TCM) features through linear propagation. However, while this simplified graph convolution performs well in learning local interactions, it fails to effectively capture the complex global relationships between different symptoms and TCMs, neglecting deeper relational networks. TCMRec's superior performance on TCM recommendation tasks may be due to its consideration of the association strength between different TCMs and symptoms, while simultaneously integrating symptom semantic knowledge and TCM attribute knowledge.

[0129] To more intuitively observe the effects of the traditional Chinese medicines recommended by TCMRec, Figure 2 Showing random selection datasets The experimental results show that the traditional Chinese medicines (TCMs) in the gray boxes were correctly recommended. The recommended TCMs in the case studies have the effects of "regulating qi and promoting qi circulation" and "strengthening the spleen and removing dampness," and have a certain therapeutic effect on the given symptom set. Some recommended TCMs were not in the original correct values, but they still have certain therapeutic effects. For example, Magnolia officinalis has the effect of "resolving blood stasis" and is an important TCM for "dispersing nodules and relieving fullness," often used with Citrus reticulata peel. By learning the interaction between symptoms and TCMs, TCMRec can recommend a set of TCMs for treatment based on the symptom set, which has certain reference value for clinicians in selecting and prescribing medications.

[0130] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0131] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations made to these embodiments without departing from the principles and spirit of the present invention still fall within the protection scope of the present invention.

Claims

1. A method for recommending traditional Chinese medicine based on knowledge-driven and residual attention networks, characterized in that, The method for recommending traditional Chinese medicine includes the following steps: S1, Data Collection and Cleaning Module: Acquire prescription text data, perform standardization process on symptoms and Chinese medicine terminology, and divide the dataset after standardization process into training set, validation set and test set; S2, Entity Pre-training Module: Utilizes Word2vec to train a model to extract symptom semantic features, thereby extracting features of symptom entities from prescriptions and obtaining overall contextual semantic representations, constructing a knowledge graph of Chinese medicine attributes, and integrating the natural attribute features of Chinese medicine as external knowledge into the recommendation model; S3, Multi-graph Construction and Entity Feature Learning Module: Based on the co-occurrence relationship between symptoms and traditional Chinese medicine (TCM), construct "symptom-TCM" heteromorphic graphs, "symptom-symptom" isomorphic graphs, and "TCM-TCM" isomorphic graphs, respectively. The "symptom-TCM" heteromorphic graphs, "symptom-symptom" isomorphic graphs, and "TCM-TCM" isomorphic graphs respectively use... , and This indicates that using a graph attention neural network from , and The system extracts symptom features, traditional Chinese medicine features, and their interaction features, and enhances entity features using residual structures. This includes multi-graph construction and entity feature extraction, which comprises: S301, Construct a "symptom-traditional Chinese medicine" heterogeneity graph ,in express Symptoms and key points of traditional Chinese medicine in the treatment, Composed of edges between all symptom and traditional Chinese medicine nodes, it contains the potential relationships between symptoms and traditional Chinese medicine, as follows: Graph construction formula: , in, Does this indicate an interaction between the symptoms and the traditional Chinese medicine? S302, Construct a "symptom-symptom" isomorphism graph , Represents the set of all symptom nodes. The set of co-occurrence edges between symptoms is constructed using the following formula: , in, This indicates whether there is a co-occurrence relationship among the symptoms; S303, Constructing a "Traditional Chinese Medicine-Traditional Chinese Medicine" isomorphic graph , express The set of all Chinese medicine nodes, The edge set composed of edges co-occurring among Chinese medicinal herbs is constructed using the following formula: , in, This indicates whether there is a co-occurrence relationship among Chinese medicinal herbs; S304, Calculation diagram , as well as The similarity coefficient between each node and its neighbors is calculated using the following formula: , in, It is a shared self-attention mechanism, consisting of a single-layer feedforward propagation network. These are learnable weight parameters. It's a splicing operation. Representative symptom nodes Input features, Represents a node right The degree of importance; S305, utilizing The function normalizes the attention coefficients, making them comparable across all nodes in the graph. The calculation process is as follows: , in, Represents a node The set of neighboring nodes; S306 uses a multi-head attention mechanism to obtain the overall features of each node, and the calculation formula is as follows: , in, It refers to the number of heads used in the multi-head self-attention mechanism; S307 utilizes residual structures to enhance the feature representation of each node in the graph. The specific calculation formula is as follows: , S308, diagram All symptom characteristics learned in middle school are represented as , The characteristics of traditional Chinese medicine learned in the middle school are represented as follows In the diagram The interaction between symptoms and traditional Chinese medicine is used as a symptom feature. Characteristics of Traditional Chinese Medicine ; S4, Feature Fusion and Traditional Chinese Medicine Recommendation Module: (The module will be...) , and The extracted symptom features and traditional Chinese medicine features are fused to obtain the final symptom features and traditional Chinese medicine features. MLP is used to express the syndrome features, and finally, a suitable set of traditional Chinese medicines is recommended based on the given symptom set.

2. The method for recommending traditional Chinese medicine according to claim 1, characterized in that, The formula text data includes the formula name, function category, formula composition, function and indications. The Chinese medicine terminology includes the Chinese medicine name, properties, meridians, and toxicity information. The properties include cold, hot, warm, mild, neutral, sour, bitter, sweet, pungent and salty. The meridians include lung, pericardium, heart, large intestine, triple burner, small intestine, stomach, gallbladder, bladder, spleen, liver and kidney.

3. The method for recommending traditional Chinese medicine according to claim 2, characterized in that, In step S1, the collected prescription data is standardized and cleaned, including: S101, Standardization of Traditional Chinese Medicine Terminology, replaces the correct and alternative names of Chinese medicines in prescription data. No processing is done for those without alternative names. For those with one correct and one alternative name, the correct name is directly replaced. For confused drug names, the correct name is replaced after identification based on the context. The context refers to efficacy and indications. S102, Symptom Terminology Standardization, involves data preprocessing of symptoms appearing in the collected prescription data.

4. The method for recommending traditional Chinese medicine according to claim 3, characterized in that, In step S2, the pre-training of the TCM entity includes: S201, Pre-training of Traditional Chinese Medicine Attribute Features, uses 23-dimensional vectors to quantify the natural attributes of Traditional Chinese Medicine, ,in, Represents the first in the entire dataset The properties and characteristics of each Chinese herbal medicine; to embed the four natures, five flavors and toxicity into the vector; S202, Symptom Semantic Feature Pre-training: To extract symptom entity features from the prescription and obtain an overall contextual semantic representation, the Word2vec trained model is applied to symptom semantic feature extraction, allowing... ,in, This indicates the first generation of Word2vec pre-trained... Each symptom word is embedded, and the dimension of each word vector is set to 100.

5. The method for recommending traditional Chinese medicine according to claim 1, characterized in that, In step S4, feature fusion and traditional Chinese medicine recommendation include: S401, Feature Fusion: This method fuses the node features extracted from the three images to obtain symptom features. Characteristics of Traditional Chinese Medicine The feature fusion process is represented as follows: , ; S402, using a multilayer perceptron to infer the symptom set, the patient's syndrome is obtained. The calculation process is as follows: , in, This represents the unique heat encoding matrix of the symptom set contained in each prescription; S403, Traditional Chinese Medicine Recommendations: After obtaining the symptom representation for each group, the probability that all traditional Chinese medicines can treat that symptom set can be calculated. The calculation formula is as follows: , After obtaining the final predicted score for each group of symptoms, a method was used... The binary cross-entropy loss function of the activation function is used to optimize the model.

Citation Information

Patent Citations

  • Semantic similarity-based personalized traditional Chinese medicine diagnosis and treatment information and traditional Chinese medicine information intelligent matching method

    CN110929511A

  • Drug and symptom relation network construction and concept mapping method and system

    CN113779265A