Personalized recommendation method for traditional Chinese medicine prescriptions based on multi-view curriculum learning
By employing a multi-view learning approach, we construct multi-view representations of patients and herbs. Combining this with the TCM concept of "principal, assistant, adjuvant, and guide," we solve the challenge of personalized TCM prescription recommendations, achieving personalized, interpretable, and widely applicable TCM prescription recommendations.
Patent Information
- Application Number
- CN202511328107.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-12-30
AI Technical Summary
Existing technologies are insufficient for personalized recommendations of traditional Chinese medicine prescriptions. The lack of objective and quantitative diagnostic criteria leads to significant differences in prescriptions issued by different doctors. Furthermore, the complex pharmacological effects of traditional Chinese medicine are difficult to accurately model using traditional methods, resulting in poor generalization ability and weak interpretability when faced with individual differences.
A multi-view learning approach is adopted to extract structured data from electronic medical record data. Graph convolutional networks are used to construct multi-view representations of patients and herbs. Combined with the training strategy of learning courses, the model is trained according to the frequency of use of herbs in prescriptions and the TCM concept of "principal, assistant, adjuvant, and guide" to obtain a rating matrix for recommendation.
This enhances the scientific basis and TCM characteristics of TCM prescription recommendations, strengthens the model's generalization ability and interpretability, and ensures its widespread application and personalized treatment effects across different patient groups.
Smart Images

Figure CN121237330A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of medical information technology, and in particular to a traditional Chinese medicine prescription personalized recommendation method based on multi-view curriculum learning. BACKGROUND
[0002] In recent years, with the rapid development of modern medicine and the technological progress in the field of artificial intelligence (AI), traditional Chinese medicine is facing the dual challenges of inheritance and innovation. To meet the needs of people's health in the new era and promote the high-quality development of traditional Chinese medicine, the state attaches great importance to the modernization process of traditional Chinese medicine. The modernization of traditional Chinese medicine not only reflects in theoretical innovation and clinical practice, but also lies in how to combine the essence of traditional Chinese medicine with modern scientific technology. Artificial intelligence technology provides a new breakthrough for the modernization of traditional Chinese medicine, especially in the aspect of personalized prescription. Through deep learning algorithm to analyze massive traditional Chinese medical records and classic prescriptions, AI system can simulate the dialectical thinking of famous old Chinese medicine doctors and realize personalized prescription recommendation.
[0003] The core concept of traditional Chinese medicine is "treatment based on syndrome differentiation", that is, to make a comprehensive judgment according to the patient's specific symptoms, constitution, etiology, pathogenesis and other factors, and to develop a personalized treatment plan. However, in the actual application process, this traditional mode faces many difficulties and challenges. Especially in the aspect of high dependence on doctors' clinical experience and theoretical accomplishment in traditional Chinese medicine diagnosis and treatment, the subjectivity is strong. Due to the lack of objective and quantitative diagnostic criteria, different doctors may draw different conclusions on the same disease, and then prescribe different prescriptions. This person-oriented diagnosis and treatment method, although it reflects the flexible and variable characteristics of traditional Chinese medicine, also leads to the uncertainty of diagnosis and treatment results, affecting the consistency and repeatability of curative effect. Secondly, traditional Chinese medicine prescriptions are usually composed of multiple medicinal materials, with complex pharmacological effects. Each drug has its unique efficacy and meridian characteristics, and in the process of compatibility, there may be synergistic or antagonistic effects. These concepts, although in line with the complexity and diversity of life activities, face the difficulties of standardization and popularization in the modern medical system. The current society has an increasing demand for medical services, requiring an efficient, standardized and reproducible diagnosis and treatment process, while the traditional Chinese medicine diagnosis and treatment method is often difficult to meet these requirements, limiting its wide application in the modern medical system. In addition, there are great differences between the traditional Chinese medicine theoretical system and modern scientific language, lacking unified terminology standards and quantifiable evaluation indicators, which leads to certain obstacles in scientific research, teaching, international exchange and other aspects. This also makes it difficult to verify the efficacy of traditional Chinese medicine through modern medical research methods, affecting its spread and development in the global context.
[0004] Recent methods for constructing recommendation models often rely on external auxiliary information, such as high-dimensional biological or chemical data on the molecular structure, chemical composition, and pharmacological effects of traditional Chinese medicine (TCM). While this information theoretically helps reveal the mechanisms of action and interactions of drugs, it faces numerous challenges in practical applications. First, acquiring this high-dimensional data is costly in practice, typically requiring advanced experimental equipment and specialized technical teams, which is not universally applicable in clinical practice. Furthermore, TCM emphasizes a holistic approach and syndrome differentiation, meaning its efficacy does not stem from a single component but rather from the synergistic effects, mutual restraint, and multi-target regulatory effects of multiple active ingredients. This complex systemic mechanism of action is difficult to accurately model and predict using traditional molecular-level analysis methods. Second, TCM typically undergoes processing before use, and there is a lack of a unified and standardized quantitative system for the changes in chemical composition resulting from this processing and their impact on efficacy, further increasing the difficulty of component-based modeling. Simultaneously, existing methods based on external information often exhibit poor generalization ability and weak interpretability when dealing with patient groups with significant individual differences. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a personalized recommendation method for traditional Chinese medicine prescriptions based on multi-view course learning.
[0006] To achieve the above objectives, the present invention adopts the following technical solution.
[0007] In a first aspect, the present invention provides a method for personalized recommendation of traditional Chinese medicine prescriptions based on multi-view course learning, including:
[0008] Extracting structured data from electronic medical record data;
[0009] The structured data is learned using the constructed multi-view model to obtain a data vector representation;
[0010] The data vector representation is trained using a course-based training scheme to sequentially learn the relationship between patient symptoms and herbal remedies in order to obtain a scoring matrix.
[0011] Recommendation information is determined based on the rating matrix.
[0012] In some embodiments of this application, the extraction of structured data from electronic medical record data includes:
[0013] The electronic medical record data is cleaned by using regular expressions to extract fields including traditional Chinese medicine symptoms; and One-Hot encoding is used to encode the extracted fields.
[0014] The feature set is obtained by comparing and classifying the encoded results with the standardized results using a feature-by-feature selection method.
[0015] We introduced biochemical test indicators for each patient, filled missing values with the mean of the field in the entire sample, and added small-amplitude random noise within a medically reasonable range.
[0016] In some embodiments of this application, the step of learning the structured data using a constructed multi-view model to obtain a data vector representation includes:
[0017] Based on the structured data and herbal characteristics, a patient symptom matrix, a herbal property matrix, and a herbal symptom co-occurrence matrix are constructed.
[0018] A graph convolutional network is applied to the herbal property matrix and the herbal symptom co-occurrence matrix to obtain a herbal representation view;
[0019] A graph convolutional network is applied to the patient symptom matrix and the herbal symptom co-occurrence matrix to obtain a patient representation view;
[0020] The data vector representation is obtained based on the herbal medicine representation view and the patient representation view.
[0021] In some embodiments of this application, applying a graph convolutional network to the herbal property matrix and the herbal symptom co-occurrence matrix to obtain a herbal representation view includes:
[0022] Based on the herbal property matrix and the herbal symptom co-occurrence matrix, the herbal representation view is obtained by calculating using the following formula:
[0023]
[0024] in, It is a herb vector representation obtained from the parameters of the k-th layer model of the graph convolutional network, which represents the properties of herbs. These represent the number of herbs in the herb properties view, the number of properties in the herb properties view, the number of herbs in the herb symptoms view, and the number of symptoms in the herb symptoms view, respectively. I is the herb set, i is a single herb, Q is the herb properties set, q is a single herb property, S is the patient symptoms set, and s is a single symptom. This is the herbal symptom view obtained as a herbal vector representation based on the parameters of the k-th layer of the graph convolutional network, where K is the total number of layers in the graph convolutional network. and These are the final herb vector representations in the herb properties view and the final herb vector representations in the herb symptoms view, respectively.
[0025] In some embodiments of this application, applying a graph convolutional network to the patient symptom matrix and the herbal symptom co-occurrence matrix to obtain a patient representation view includes:
[0026] Based on the herbal property matrix and the herbal symptom co-occurrence matrix, the patient representation view is calculated using the following formula:
[0027]
[0028]
[0029] in, It is a patient symptom view obtained based on the parameters of the k-th layer model of the graph convolutional network, representing the patient vector. These represent the number of patients in the patient symptom view, the number of symptoms in the patient symptom view, the number of herbs in the herbal symptom view, and the number of symptoms in the herbal symptom view, respectively. U represents the set of patients, and u represents a single patient. The herbal symptom view is a symptom vector representation obtained based on the parameters of the k-th layer model of the graph convolutional network. These represent the final patient vector representation under the patient symptom view, the final symptom vector representation under the herbal symptom view, and the final patient vector representation under the herbal symptom view, respectively.
[0030] In some embodiments of this application, the training scheme using course learning to train the data vector representation, sequentially learning the relationship between patient symptoms and herbal remedies to obtain a scoring matrix, includes:
[0031] A patient-herb interaction matrix is constructed based on the structured data and herbal characteristics;
[0032] The frequency of use of each herb is counted based on the patient herb interaction matrix. Based on the frequency obtained from the statistics, the herbs are divided into principal herbs, assistant herbs, adjuvant herbs, and guiding herbs. Based on the principal herbs, assistant herbs, adjuvant herbs, and guiding herbs, a co-occurrence matrix of principal herbs and assistant herbs, as well as a co-occurrence matrix of principal herbs and assistant herbs with all other herbs are constructed.
[0033] The principal drug is trained based on the herbal representation view and the patient representation view to obtain a principal drug scoring model;
[0034] The data vector representation is input into the principal drug scoring model to obtain the patient's scoring matrix for the principal drug. Based on the co-occurrence matrix of the principal drug and the assistant drug, and combined with the interaction relationship between the principal drug and the assistant drug, the comprehensive scoring matrix of the patient for the principal drug and the assistant drug is derived.
[0035] Based on the co-occurrence matrix of patients and principal and assistant herbs, the comprehensive score matrix of patients on principal and assistant herbs and all other herbs is obtained by using the co-occurrence matrix of principal and assistant herbs and all other herbs.
[0036] Secondly, this application also provides a personalized recommendation device for traditional Chinese medicine prescriptions based on multi-view course learning, including:
[0037] The data extraction module is used to extract structured data from electronic medical record data;
[0038] The representation acquisition module is used to learn the structured data using the constructed multi-view model to obtain a data vector representation;
[0039] The scoring module is used to train the data vector representation using a training scheme learned in the course, sequentially learning the relationship between patient symptoms and herbal medicines to obtain a scoring matrix;
[0040] The recommendation module is used to determine recommendation information based on the rating matrix.
[0041] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.
[0042] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above.
[0043] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0044] The beneficial effects of this invention are as follows: The personalized recommendation method for TCM prescriptions based on multi-view course learning provided by this invention adopts a course learning training strategy, starting with simple and easy-to-learn parts and gradually increasing the difficulty to achieve a comprehensive understanding. It emphasizes the traditional TCM concept of "principal, assistant, adjuvant, and guide" in prescription writing, and constructs the model based on easily accessible information such as the properties, flavors, and meridian tropism of Chinese herbs. This not only conforms to the core ideas of TCM syndrome differentiation and treatment but also effectively improves the model's generalization ability, ensuring its wide application across different patient groups. Simultaneously, the multi-view course learning strategy, which trains the model step-by-step from different perspectives, helps improve the model's ability to handle complex information, enhances its adaptability and interpretability in different situations, and ensures that the final recommended prescriptions are both scientifically based and retain the characteristics of TCM.
[0045] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of the invention. Attached Figure Description
[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the 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.
[0047] Figure 1 This is one of the flowcharts illustrating a personalized recommendation method for traditional Chinese medicine prescriptions based on multi-view course learning, provided by an embodiment of the present invention.
[0048] Figure 2 This is the second flowchart illustrating the personalized recommendation method for traditional Chinese medicine prescriptions based on multi-view course learning provided in this embodiment of the invention.
[0049] Figure 3 This is a schematic diagram of the electronic medical record data processing flow provided in an embodiment of the present invention;
[0050] Figure 4 A schematic diagram of electronic medical record data provided in an embodiment of the present invention;
[0051] Figure 5 This is the third flowchart illustrating the personalized recommendation method for traditional Chinese medicine prescriptions based on multi-view course learning provided in this embodiment of the invention. Detailed Implementation
[0052] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0053] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or couplings. The term “and / or” as used herein includes any and all combinations of one or more of the associated listed items.
[0054] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as herein.
[0055] To facilitate understanding of the embodiments of the present invention, the following will provide further explanation and description with reference to the accompanying drawings and several specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0056] Example 1
[0057] like Figure 1 as well as Figure 2 As shown, a personalized recommendation method for traditional Chinese medicine prescriptions based on multi-view course learning includes the following steps:
[0058] S101, extracting structured data from electronic medical record data.
[0059] Among them, electronic medical record data refers to hospital electronic medical record data with private information removed. For the freely written TCM tongue and pulse descriptions in the electronic medical records, regular expression technology is used to automatically identify and extract patient symptoms and prescription information. By constructing a vocabulary covering common TCM symptom terms and tongue descriptions, the system achieves accurate matching and extraction of key semantic information from the text, completing the process of representing unstructured chief complaint text information as structured data.
[0060] Because electronic medical records contain a large amount of unstructured text information, it is necessary to convert it into structured data that can be used by computers in order to extract its value. Electronic medical record data consists of two main parts: basic information and chief complaint information. Basic information includes the patient's ID, number of visits, and the patient's gender and age. Chief complaint information consists of the patient's self-described symptoms, signs, and nature, as well as the doctor's diagnosis based on tongue and pulse characteristics and prescriptions. In practice, traditional Chinese medicine prescriptions are mainly based on the patient's tongue and pulse appearance and symptoms. Therefore, the most important aspect of the electronic medical record dataset is the chief complaint text information, which contains key information for the doctor's diagnosis and herbal prescriptions. For illustrative purposes, the electronic medical record data in this application is actual data on gastritis or gastric cancer.
[0061] To more effectively mine and utilize TCM clinical information in CAG (chronic atrophic gastritis) patient cases, this application also systematically extracted features and digitized unstructured text data. For freely written TCM tongue and pulse descriptions in electronic medical records, regular expression technology (e.g., [a-zA-Z\u4e00-\u9fff]+)\s*(\d+g)) was used to automatically identify and extract patient symptoms and prescription information. By constructing rule templates covering common TCM symptom terms, tongue description words (such as "red tongue," "thin white coating"), and pulse keywords (such as "wiry pulse," "slippery pulse"), precise matching and extraction of key semantic information in the text was achieved.
[0062] S102, the structured data is learned using the constructed multi-view model to obtain a data vector representation.
[0063] In this step, the multi-view model includes a patient view model and a herbal medicine view model. In constructing the patient view model, patient representation can be characterized from two complementary perspectives to more comprehensively reflect the patient's health status and individual differences. The first view, based on the user symptom view, obtains a personalized patient representation by analyzing the patient's specific symptom information, which helps capture the patient's current health status and subjective feelings. The second view utilizes the herbal medicine-symptom co-occurrence matrix to extract vectorized representations of symptoms and, combined with the user-symptom table, further derives the user's latent feature representation. This method emphasizes the correlation between symptoms and herbs, enabling the discovery of more medically meaningful potential patterns. Combining the user representations from these two views not only takes into account the individual patient's symptom presentation and the guiding role of medical background knowledge but also enhances the model's generalization ability and interpretability, providing a more solid foundation for subsequent disease analysis and personalized recommendations.
[0064] In constructing the herbal medicine view model, complementary herbal medicine representations were extracted from two different perspectives: one is the patient representation obtained based on the herbal medicine property view, and the other is the herbal medicine representation obtained using the herbal medicine symptom co-occurrence matrix. The herbal medicine property view reflects the individualized characteristics of herbal medicine use through patient clinical information and physical characteristics, helping to understand the mechanisms of action of herbal medicines on different populations. Meanwhile, the herbal medicine symptom co-occurrence matrix mines the association patterns between herbal medicines and symptoms from a large-scale case study, capturing the statistical characteristics of herbal efficacy and enhancing the macroscopic understanding of herbal medicine functions. Combining these two views not only improves the model's comprehensive understanding of herbal medicine functions but also enhances its ability for personalized recommendations and precision treatment, providing a more solid theoretical foundation and application support for the intelligentization of traditional Chinese medicine.
[0065] S103, The data vector representation is trained using a course-based training scheme to sequentially learn the relationship between patient symptoms and herbal medicines in order to obtain a rating matrix.
[0066] S104, Determine recommendation information based on the rating matrix. That is, select a certain number of herbs as recommendation information based on the scores in the rating matrix.
[0067] In the medication recommendation process, based on the aforementioned multi-view modeling method, a patient-herb rating matrix was constructed by integrating multi-perspective representations of patients and herbs to quantify the potential suitability of each patient for different herbs. To further improve the accuracy and medical rationality of the recommendations, a curriculum learning training strategy was introduced. The model was guided to learn progressively according to the frequency of use of herbs in clinical prescriptions, from high to low. This allowed the model to prioritize mastering core drug knowledge that is universally applicable and widely applicable, before gradually transitioning to personalized recommendations for less common but effective herbs. Simultaneously, in line with the "principal, assistant, adjuvant, and guide" concept in traditional Chinese medicine prescriptions, the principal herb (principal drug) was given a higher weight during the recommendation process, and auxiliary herbs (assistant, adjuvant, and guide) were rationally combined to ensure that the recommendation results both conformed to the logic of traditional Chinese medicine theory and possessed individualized characteristics. This method not only improved the interpretability and generalization ability of the recommendation system but also enhanced the credibility and practicality of clinical applications, providing strong support for achieving intelligent and precise TCM-assisted decision-making.
[0068] In some embodiments of this application, such as Figure 3 as well as Figure 4 As shown, the extraction of structured data from electronic medical record data includes:
[0069] The electronic medical record data is cleaned by using regular expressions to extract fields including traditional Chinese medicine symptoms; and the extracted fields are encoded using One-Hot encoding.
[0070] The feature set is obtained by comparing and classifying the encoded results with the results after standardization using a feature-by-feature selection method.
[0071] In some examples, the original electronic medical record data is cleaned to extract valid information. Regular expressions are used to extract this valid information, and One-Hot Encoding is employed to convert the extracted TCM attributes into numerical features. Specifically, for each symptom or sign category with discrete values, a corresponding binary feature variable is generated; if the symptom appears in the sample, the corresponding position is set to 1, otherwise to 0. Then, using the commonly used TCM features provided by the hospital as a standard, the results of all symptoms are compared one by one. If the description matches the standardized description, the relevant symptoms are merged. One-Hot Encoding is then used to convert the extracted TCM attributes into numerical features. Specifically, for each symptom or sign category with discrete values, a corresponding binary feature variable is generated; if the symptom appears in the sample, the corresponding position is set to 1, otherwise to 0.
[0072] Biochemical test indicators for each patient were introduced as supplementary features. Missing values in these fields were filled with the mean of the field across all samples, and then small-amplitude random noise within a medically reasonable range was added. Specifically, biochemical test indicators for each patient were introduced as supplementary features, including lipase, apolipoproteins, and cancer antigens. A missing value imputation strategy was adopted: for fields with a high proportion of missing values, the mean of that field across all samples was used for imputation, and then small-amplitude random noise within a medically reasonable range was added to simulate real physiological fluctuations and avoid overfitting the model to a single fixed value.
[0073] Understandably, in this embodiment, after symptom extraction from the aforementioned chief complaint text, to further improve the computability and generalization ability of the data in subsequent modeling tasks, the symptom names provided by the hospital are first used as the standard to classify the information. Because different doctors have different habits, even for the same thing, there may be some differences in the description of the chief complaint; these could be slight differences in wording or completely different expressions. For example, "pale red tongue" versus "pale tongue color," "wiry and thready pulse" versus "wiry and thready pulse," etc. To improve the consistency and representativeness of the features, relevant hospital personnel conduct item-by-item comparison and semantic analysis of the extracted items, deciding whether to merge or retain independent features based on their weight and importance in syndrome differentiation and treatment. For example, "thin white tongue coating" and "thin white tongue coating" are determined to be synonymous and uniformly classified into the feature dimension of "thin white tongue coating."
[0074] Meanwhile, to better differentiate individual patient characteristics and improve the model's accuracy in matching drug treatment responses, biochemical test indicators for each patient were introduced as supplementary features, including lipase, apolipoprotein, and cancer antigen indicators, and relevant strategies were employed to fill in missing values. This approach effectively maintained the basic characteristics of the data distribution while ensuring data availability, thus improving the robustness and usability of the overall dataset.
[0075] In some embodiments of this application, such as Figure 5 As shown, the step of learning the structured data using the constructed multi-view model to obtain a data vector representation includes:
[0076] Based on the structured data and herbal characteristics, a patient symptom matrix, a herbal property matrix, and a herbal symptom co-occurrence matrix were constructed. In some examples, regular expressions were used to extract herbal information, identifying and retaining the corresponding weight information while extracting the drug names. Due to the presence of multiple prescriptions in the original files, duplicate or redundant drug entries were cleaned up to reduce noise interference, resulting in prescriptions containing 4 to 33 herbs. To further understand the principles of traditional Chinese medicine prescriptions, a large language model and the *Pharmacopoeia of the People's Republic of China* were used to systematically analyze the properties, flavors, and meridian tropism of the herbs involved. One-Hot encoding was used to transform these features into structured data to support subsequent analysis and modeling. Based on the symptom data extracted from patient medical records and the extracted herbal characteristics, a multi-dimensional dataset including a patient symptom matrix, a herbal property matrix, and a patient-herbal interaction matrix was constructed. These matrices were then used to generate the herbal symptom co-occurrence matrix.
[0077] A graph convolutional network is applied to the herbal property matrix and the herbal symptom co-occurrence matrix to obtain a herbal representation view.
[0078] Schematic, the step of applying a graph convolutional network to the herbal property matrix and the herbal symptom co-occurrence matrix to obtain a herbal representation view includes:
[0079] Based on the herbal property matrix and the herbal symptom co-occurrence matrix, the herbal representation view is obtained by calculating using the following formula:
[0080]
[0081] in, It is the herb vector representation obtained based on the parameters of the k-th layer model of the graph convolutional network, which is the herb property view. These represent the number of herbs in the herb properties view, the number of properties in the herb properties view, the number of herbs in the herb symptoms view, and the number of symptoms in the herb symptoms view, respectively. I is the herb set, i is a single herb, Q is the herb properties set, q is a single herb property, S is the patient symptoms set, and s is a single symptom. The herbal symptom view is the herbal symptom vector representation obtained based on the model parameters of the k-th layer of the graph convolutional network, where K is the total number of model parameter layers in the graph convolutional network. and These are the final herb vector representations in the herb properties view and the final herb symptom vector representations in the herb symptoms view, respectively.
[0082] A graph convolutional network is applied to the patient symptom matrix and the herbal symptom co-occurrence matrix to obtain a patient representation view.
[0083] Schematic, the step of applying a graph convolutional network to the patient symptom matrix and the herbal symptom co-occurrence matrix to obtain a patient representation view includes:
[0084] Based on the herbal property matrix and the herbal symptom co-occurrence matrix, the patient representation view is calculated using the following formula:
[0085]
[0086] in, It is the patient vector representation obtained based on the model parameters of the k-th layer of the graph convolutional network. These represent the number of patients in the patient symptom view, the number of symptoms in the patient symptom view, the number of herbs in the herbal symptom view, and the number of symptoms in the herbal symptom view, respectively. U represents the set of patients, and u represents a single patient. The herbal symptom view is a symptom vector representation obtained based on the parameters of the k-th layer model of the graph convolutional network. These represent the final patient vector representation under the patient symptom view, the final symptom vector representation under the herbal symptom view, and the final patient vector representation under the herbal symptom view, respectively.
[0087] The data vector representation is obtained based on the herbal medicine representation view and the patient representation view.
[0088] In other words, after obtaining representations of the patient and herbs from different views, two sets of adaptively adjusted parameters are used to perform a weighted sum of these user representations and herb representations from different perspectives. The parameters are continuously optimized and adjusted, and the Softmax function ensures that the sum of all weights is 1, thus obtaining the final representation result. Where e u For patients in the unit, e iLet λ represent herbs, J be the set of views, and j represent a single view. The calculation formula is as follows:
[0089]
[0090] In some embodiments of this application, due to the diversity of TCM prescriptions and the severe data imbalance problem, the importance of herbs can be assessed based on their frequency of use, and learning and analysis can be conducted hierarchically according to the TCM principle of "principal, assistant, adjuvant, and guide." First, the frequency of each herb appearing in the prescription is statistically analyzed, and then the importance of the herbs is ranked according to their frequency. Next, following the "principal, assistant, adjuvant, and guide" method—that is, the main herb (principal herb), the auxiliary herb (assistant herb), the herb that harmonizes the effects of other herbs and reduces toxicity (adjuvant herb), and the herb that guides the herb to specific meridians or sites (guide herb)—the different levels of herbs are studied in depth and the model is trained.
[0091] Accordingly, the training scheme using course learning is used to train the data vector representation, sequentially learning the relationship between patient symptoms and herbal remedies to obtain a scoring matrix, including:
[0092] A patient-herb interaction matrix is constructed based on the structured data and herbal characteristics.
[0093] The frequency of use of each herb is counted based on the patient herbal interaction matrix. Based on the frequency obtained, the herbs are divided into principal herbs, assistant herbs, adjuvant herbs, and guiding herbs. Based on the principal herbs, assistant herbs, adjuvant herbs, and guiding herbs, a co-occurrence matrix of principal herbs and assistant herbs, as well as a co-occurrence matrix of principal herbs and assistant herbs with all other herbs are constructed.
[0094] The principal drug is trained based on the herbal representation view and the patient representation view to obtain a principal drug scoring model, and the principal drug loss value is calculated. The loss function uses Softmargin Loss, where x is the predicted value output by the model, and y is the target label. The formula is as follows:
[0095]
[0096] The data vector representation is input into the principal drug scoring model to obtain the patient's scoring matrix for the principal drug. Based on the co-occurrence matrix of the principal and assistant drugs, and combined with their interaction relationships, a comprehensive scoring matrix for the principal and assistant drugs is derived. To further fully consider the impact of the co-occurrence relationship between herbs during patient medication on prescription decisions, a patient-expected recommended herbal view is introduced into the original model to construct a multi-view feature representation. The specific formula for the new view is as follows:
[0097]
[0098]
[0099] in, These are the patient vector representation and the expected recommended herb vector representation obtained from the k-th layer model parameters of the graph convolutional network in the patient's expected herb recommendation view, respectively. K is the total number of layers in the graph convolutional network model parameters. These represent the number of patients and the number of expected recommended herbs in the patient's expected herb view.
[0100] By improving and optimizing the multi-view model, a joint scoring model for principal and assistant herbs is constructed, integrating the correlation features of principal and assistant herbs. This model yields more clinically relevant recommendations for principal and assistant herbs. Furthermore, SoftmarginLoss is used to calculate the loss value of the principal and assistant herb combination to assess the difference between the recommendation effect and actual medication use. This method effectively enhances the modeling ability and prediction accuracy of traditional Chinese medicine prescription recommendation systems for complex compatibility relationships.
[0101] Similarly, after obtaining the patient and principal / minister drug prediction recommendation matrix after obtaining the multi-view model, the co-occurrence matrix of principal / minister drugs and all other herbs is used for further training, and finally a complete prescription scoring model is constructed to calculate the prescription loss value.
[0102] Using the methods described above, we obtained a patient-herb rating matrix based on multi-view course learning. Based on this matrix, we can make recommendations for patient medication.
[0103] The obtained recommendation results are compared with the true values using recall, F1 norm, and precision as evaluation metrics. The specific formulas are as follows:
[0104]
[0105] Wherein, TP (True Positives) represents the number of entities that are actually positive and are correctly predicted as positive. FN (False Negatives) represents the number of entities that are actually positive but are incorrectly predicted as negative. FP (False Positives) represents the number of entities that are actually negative but are incorrectly predicted as positive.
[0106] The personalized TCM prescription recommendation method based on multi-view course learning provided in this invention adopts a course learning training strategy, starting with simple and easy-to-learn parts and gradually increasing the difficulty to achieve a comprehensive understanding. It emphasizes the traditional TCM concept of "principal, assistant, adjuvant, and guide" in prescription writing, and builds the model based on easily accessible information such as the properties, flavors, and meridian tropism of Chinese herbs. This not only aligns with the core principles of TCM syndrome differentiation and treatment but also effectively enhances the model's generalization ability, ensuring its wide application across different patient groups. Simultaneously, the multi-view course learning strategy, which trains the model step-by-step from different perspectives, helps improve the model's ability to handle complex information, enhances its adaptability and interpretability under different conditions, and ensures that the final recommended prescription is both scientifically based and retains the characteristics of TCM.
[0107] Example 2
[0108] Based on Example 1, Example 2 provides a personalized recommendation device for traditional Chinese medicine prescriptions based on multi-view course learning. This personalized recommendation device for traditional Chinese medicine prescriptions based on multi-view course learning corresponds to the aforementioned personalized recommendation method for traditional Chinese medicine prescriptions based on multi-view course learning, and specifically includes:
[0109] The data extraction module is used to extract structured data from electronic medical record data;
[0110] The representation acquisition module is used to learn the structured data using the constructed multi-view model to obtain a data vector representation;
[0111] The scoring module is used to train the data vector representation using a training scheme learned in the course, sequentially learning the relationship between patient symptoms and herbal medicines to obtain a scoring matrix;
[0112] The recommendation module is used to determine recommendation information based on the rating matrix.
[0113] For specific details, please refer to the description in the section on personalized recommendation methods for TCM prescriptions based on multi-view course learning, which will not be repeated here.
[0114] Example 3
[0115] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, which communicate with each other. The memory stores program instructions that can be executed by the processor. The processor calls the program instructions to execute a personalized recommendation method for traditional Chinese medicine prescriptions based on multi-view course learning. The method includes the following steps:
[0116] Extracting structured data from electronic medical record data;
[0117] The structured data is learned using the constructed multi-view model to obtain a data vector representation;
[0118] The data vector representation is trained using a course-based training scheme to sequentially learn the relationship between patient symptoms and herbal remedies in order to obtain a scoring matrix.
[0119] Recommendation information is determined based on the rating matrix.
[0120] Example 4
[0121] Embodiment 4 of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements a method for personalized recommendation of traditional Chinese medicine prescriptions based on multi-view course learning. The method includes the following steps:
[0122] Extracting structured data from electronic medical record data;
[0123] The structured data is learned using the constructed multi-view model to obtain a data vector representation;
[0124] The data vector representation is trained using a course-based training scheme to sequentially learn the relationship between patient symptoms and herbal remedies in order to obtain a scoring matrix.
[0125] Recommendation information is determined based on the rating matrix.
[0126] Example 5
[0127] Embodiment 5 of the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements a method for personalized recommendation of traditional Chinese medicine prescriptions based on multi-view course learning. The method includes the following steps:
[0128] Extracting structured data from electronic medical record data;
[0129] The structured data is learned using the constructed multi-view model to obtain a data vector representation;
[0130] The data vector representation is trained using a course-based training scheme to sequentially learn the relationship between patient symptoms and herbal remedies in order to obtain a scoring matrix.
[0131] Recommendation information is determined based on the rating matrix.
[0132] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing the present invention.
[0133] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for method or system embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the description of the method embodiments. The method and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0134] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A traditional Chinese medicine prescription personalized recommendation method based on multi-view curriculum learning, characterized in that, The method comprises the following steps: extracting structured data from electronic case data; learning the structured data using a constructed multi-view model to obtain a data vector representation; training the data vector representation using a curriculum learning training scheme to sequentially learn the relationship between patient symptoms and herbal medicine to obtain a score matrix; determining recommendation information based on the score matrix.
2. The method of claim 1, wherein, The structured data is extracted from the electronic case data, which comprises the following steps: cleaning the electronic case data, extracting and cleaning the data using regular expressions to obtain a field including traditional Chinese medicine symptoms, and encoding the extracted field using One-Hot encoding; using a feature selection method to compare and classify the encoding result with the standardized result to obtain a feature set; introducing the biochemical examination index of each patient, filling the missing value with the mean value of the field in the entire sample and adding small random noise within the medical reasonable range.
3. The method of claim 1, wherein, The structured data is learned using a constructed multi-view model to obtain a data vector representation, which comprises the following steps: constructing a patient symptom matrix, a herbal medicine property matrix and a herbal medicine symptom co-occurrence matrix based on the structured data and herbal medicine features; applying a graph convolution network on the herbal medicine property matrix and the herbal medicine symptom co-occurrence matrix to obtain a herbal medicine representation view; applying a graph convolution network on the patient symptom matrix and the herbal medicine symptom co-occurrence matrix to obtain a patient representation view; obtaining the data vector representation based on the herbal medicine representation view and the patient representation view.
4. The method of claim 3, wherein, The graph convolution network is applied on the herbal medicine property matrix and the herbal medicine symptom co-occurrence matrix to obtain a herbal medicine representation view, which comprises the following steps: based on the herbal medicine property matrix and the herbal medicine symptom co-occurrence matrix, the herbal medicine representation view is calculated by the following formula: wherein, is the herbal vector representation obtained from the herbal property view based on the model parameters of the kth layer of the graph convolution network, are the number of herbs in the herbal property view, the number of properties in the herbal property view, the number of herbs in the herbal symptom view, the number of symptoms in the herbal symptom view, respectively, I is the set of herbs, i is a single herb, Q is the set of herbal properties, q is a single herbal property, S is the set of patient symptoms, s is a single symptom; is the herbal vector representation obtained from the herbal symptom view based on the model parameters of the kth layer of the graph convolution network, K is the total number of model parameters of the graph convolution network, and are the final herbal vector representation under the herbal property view and the final herbal vector representation under the herbal symptom view, respectively.
5. The method of claim 3, wherein, The graph convolution network is applied on the patient symptom matrix and the herbal medicine symptom co-occurrence matrix to obtain a patient representation view, which comprises the following steps: based on the herbal medicine property matrix and the herbal medicine symptom co-occurrence matrix, the patient representation view is calculated by the following formula: wherein, is a patient vector representation obtained from the patient symptom view based on the k-th layer model parameters of the graph convolution network, are respectively the number of patients in the patient symptom view, the number of symptoms in the patient symptom view, the number of herbs in the herb symptom view, the number of symptoms in the herb symptom view, U is the set of patients, u is a single patient, is a symptom vector representation obtained from the herb symptom view based on the k-th layer model parameters of the graph convolution network, are respectively the final patient vector representation under the patient symptom view, the final symptom vector representation under the herb symptom view, the final patient vector representation under the herb symptom view.
6. The method of claim 3, wherein, The data vector representation is trained using a curriculum learning training scheme to sequentially learn the relationship between patient symptoms and herbal medicine to obtain a score matrix, which comprises the following steps: constructing a patient-herbal medicine interaction matrix based on the structured data and herbal medicine features; statistically analyzing the frequency of use of each herbal medicine according to the patient-herbal medicine interaction matrix, and dividing the herbal medicine into monarch, minister, assistant and guide medicines according to the statistical frequency, constructing a co-occurrence matrix of monarch and minister medicines, and a co-occurrence matrix of monarch and minister medicines and all other herbal medicines; training the monarch medicine based on the herbal medicine representation view and the patient representation view to obtain a monarch medicine scoring model; inputting the data vector representation into the monarch medicine scoring model to obtain a patient score matrix of monarch medicine, and deducing a comprehensive score matrix of patient monarch medicine and minister medicine based on the co-occurrence matrix of monarch and minister medicines and the interaction relationship between monarch and minister medicines; Based on the patient and monarch and minister drug co-occurrence matrix, the co-occurrence matrix of monarch and minister drugs and all other herbs is used to obtain a comprehensive score matrix of the patient on the monarch and minister drugs and all other herbs.
7. A Chinese medicine prescription individualization recommendation device based on multi-view curriculum learning, characterized in that, Comprise: a data extraction module for extracting structured data from electronic case data; a representation acquisition module for learning the structured data using the constructed multi-view model to obtain data vector representation; a scoring module for training the data vector representation using a training scheme of curriculum learning to sequentially learn the relationship between patient symptoms and herbs to obtain a scoring matrix; a recommendation module for determining recommendation information based on the scoring matrix.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method of any one of claims 1-6 when executing the program.
9. A computer-readable storage medium, characterized in that, The computer program is stored in the storage medium and is executed by the processor to implement the method of any one of claims 1-6.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1-6.