Traditional Chinese medicine prescription recommendation method and system based on variational depth generation

Through the recommended method of traditional Chinese medicine prescription generated by variational depth, using multi-layer convolutional network and Gaussian distribution sampling, combined with multi-scale comparison losses, the problems of inaccurate patient characterization and unreasonable optimization goals are solved, and the accuracy of traditional Chinese medicine recommendations are improved. Robustness.

CN119028533APending Publication Date: 2024-11-26BEIJING JIAOTONG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410981466.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The existing TCM prescription recommendation model has problems such as inaccurate patient characterization and unreasonable optimization goals, which makes it difficult for generative prescription recommendation models to learn precise characterization of disease states, and the optimization goals do not meet the actual needs of drug recommendations.

Method used

Using the recommended method of Chinese medicine prescriptions generated by variational depth, learning explicit and implicit representation of patients through multi-layer convolutional network encoder, combining Gaussian distributed sampling and multi-scale contrast loss, optimize model parameters to improve recommendation accuracy and robustness sex.

Benefits of technology

It improves the diversity and authenticity of patient characterization, improves the accuracy and robustness of traditional Chinese medicine recommendations, and ensures that the prescription recommendation results are more in line with actual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119028533A_ABST
    Figure CN119028533A_ABST
Patent Text Reader

Abstract

The invention provides a traditional Chinese medicine prescription recommendation method and system based on variational depth generation, belongs to the technical field of clinical intelligent auxiliary diagnosis and treatment, and provides a traditional Chinese medicine prescription recommendation model based on variational depth generation, which comprises two parts of patient characterization learning and prescription recommendation, a multi-layer convolutional network encoder is used for learning symptom information to obtain explicit representation of a patient, and then Gaussian distribution sampling is used for fusing implicit representation on the basis of the explicit representation, so that the patient representation is more diversified and authentic. The prescription recommendation comprises a traditional Chinese medicine probability generation module and a target optimization module, the traditional Chinese medicine probability generation module uses a multilayer convolutional network decoder to learn patient representation and generate the probability that each traditional Chinese medicine is recommended, and the target optimization module uses paired traditional Chinese medicine sorting to optimize loss and multi-scale comparison loss to optimize parameters of a model; and the accuracy and robustness of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of clinical intelligent assisted diagnosis and treatment, and in particular to a method and system for recommending traditional Chinese medicine prescriptions generated by variational depth. Background Art

[0002] Intelligent prescription recommendation methods for traditional Chinese medicine can be divided into prescription recommendation based on topic models, graph models, and generative models. Prescription recommendation based on topic models usually regards a given prescription text as a document composed of various potential topics, and then recommends based on the symptoms found from the data and the potential topic distribution of Chinese medicine. For example, the PTM model established by Yao et al. realizes the modeling process of prescription recommendation by considering the prior knowledge of medicinal herbs and symptoms. The KGETM model proposed by Wang et al. uses TransE to learn the relationship between symptoms and herbs, and integrates the obtained knowledge graph embedding into the topic model to realize prescription recommendation. The graph-based prescription recommendation model constructs a graph to learn the feature representation of patients, symptoms, Chinese medicine, and prescriptions, and then applies the feature representation in the prescription recommendation process. For example, Jin et al. proposed a syndrome-aware multi-graph convolutional network SMGCN, which uses GCN on multiple graphs to learn the embedding and interaction of symptoms and Chinese medicine, and finally realizes Chinese medicine recommendation. Yang et al. proposed a Chinese medicine recommendation model (SMRGAT) based on multi-graph residual attention network and semantic knowledge fusion, which aims to recommend Chinese medicines that can treat symptoms and comply with the principles of Chinese medicine compatibility based on the semantic information of symptoms and the intensity of the effects of different drugs on symptoms.

[0003] Generative prescription recommendation models mainly use an encoder-decoder structure, where the encoder is used to learn feature representations from patient symptoms and the decoder is used to generate a list of recommended Chinese medicines. For example, the Herb-Know proposed by Li et al. integrates the knowledge of Chinese medicine efficacy into the Seq2Seq model for Chinese medicine prescription generation, and then uses a knowledge-enhanced pointer network to guide the model to generate more Chinese medicines for symptoms. Zhao et al. proposed a hybrid neural network architecture PreGenerator based on retrieval and generation. The model includes three modules. The first two modules are used to retrieve the most relevant prescriptions and Chinese medicines, and the last module integrates symptom features, retrieved prescriptions, and drug template features for prescription recommendation.

[0004] Due to the complexity of clinical auxiliary diagnosis and treatment, there are still two difficulties in the current research on prescription recommendation models:

[0005] 1) The patient representation of the generative prescription recommendation model is inaccurate. The clear encoder-decoder structure in the generative model is very suitable for drug recommendation tasks and has been applied by many researchers to the construction of generative prescription recommendation models. However, the disease status of patients is often complex and diverse, and the encoder-decoder structure is difficult to learn complex distribution representations, which makes it difficult for such models to learn accurate representations of disease status and ultimately fail to obtain ideal drug recommendation results.

[0006] 2) The optimization target of the prescription recommendation model is unreasonable. Common losses of existing prescription recommendation models are loss functions such as mean square error or cross entropy. However, these loss functions are generally used for modeling regression and classification tasks. They will set the drug labels in the actual prescription to 1 and all other drugs to 0. However, in the drug recommendation task, drugs that are not in the prescription are not necessarily ineffective drugs. Therefore, when modeling prescription recommendations, what we really hope is that the Chinese medicine in the prescription will get a higher score than the Chinese medicine that is not in the prescription. The optimization target designed based on this is more reasonable. Summary of the invention

[0007] The purpose of the present invention is to provide a method and system for recommending Chinese medicine prescriptions based on variational depth generation, so as to solve at least one technical problem existing in the above-mentioned background technology.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] In a first aspect, the present invention provides a method for recommending TCM prescriptions based on variational deep generation, comprising:

[0010] Obtain patient symptom data;

[0011] The acquired symptom data is processed using a pre-trained prescription recommendation model to obtain prescription recommendation results; the prescription recommendation model includes a patient representation learning module that takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains the patient's explicit representation; Gaussian distribution sampling is used to fuse implicit representations on the basis of explicit representations to make patient representations more diverse and realistic; the Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended; the target optimization module uses pairwise Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

[0012] Furthermore, the goal of the patient representation learning module is to learn set The multi-hot encoded vector x s We learn the complex relationship between diseases and symptoms, obtain the posterior distribution q(z|x) of the patient representation vector z, and generate patient representations based on the distribution.

[0013] Furthermore, the patient representation learning module first receives x s As input, the correlation between symptoms and patients is captured through a deep neural network, from which the characteristic representation of symptoms is extracted as the displayed representation of the patient; in order to expand the implicit representation space of patients, it is assumed that the distribution p(z) of all patient representations follows a standard normal distribution And sample ε from it as the implicit representation of the patient; extract the patient's explicit symptom representation and implicit representation respectively, so that the model can take into account the patient's obvious symptoms and make full use of implicit information when generating recommended prescriptions.

[0014] Furthermore, in order not to change the distribution of patient representation, the display representation is divided into two parts μ and σ. Finally, the complete patient representation vector z = ε⊙σ + μ is calculated as the input of the prescription recommendation module to generate the score of traditional Chinese medicine.

[0015] p(z) obeys The patient representation distribution q(z|x) obeys It is optimized using the following loss function:

[0016]

[0017] Furthermore, in the TCM probability generation module, a multi-layer convolutional neural network was constructed, which took the patient representation as input to generate the recommendation probability of each TCM. Then, a pairwise TCM ranking optimization loss function was used to evaluate the gap between the generated results and the actual prescriptions. At the same time, a multi-scale contrast loss was added to achieve layer-by-layer comparison of the recommended results with positive and negative samples, thereby improving the accuracy and robustness of the model.

[0018] Furthermore, the multi-scale contrastive loss takes positive and negative prescription samples as input, and when the multi-hot encoded vector y of the true prescription of patient p h,p When it is a positive sample, the {y h,1 ,...,y h,p-1 ,y h,p+1 ,...} are negative samples. When extracting features from samples, the results of some or all blocks will be stored to calculate the loss L of positive and negative samples at different scales. pos and L neg , and calculate the total loss of the module;

[0019] The overall goal of the model is Loss = α1Loss Enc +α2Loss Rec +α3Loss Cont

[0020] Among them, α1, α2 and α3 are the weights of each objective function.

[0021] In a second aspect, the present invention provides a TCM prescription recommendation system based on variational deep generation, comprising:

[0022] An acquisition module, used to obtain patient symptom data;

[0023] The recommendation module is used to process the acquired symptom data using a pre-trained prescription recommendation model to obtain prescription recommendation results; wherein, the prescription recommendation model includes a patient representation learning module that takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains the patient's explicit representation; Gaussian distribution sampling is used to fuse implicit representations on the basis of explicit representations to make patient representations more diverse and realistic; the Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended; the target optimization module uses pairwise Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

[0024] In a third aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the method for recommending traditional Chinese medicine prescriptions generated by variational depth as described in the first aspect is implemented.

[0025] In a fourth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method for recommending traditional Chinese medicine prescriptions generated by variational depth as described in the first aspect.

[0026] In a fifth aspect, the present invention provides an electronic device comprising: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the method for recommending traditional Chinese medicine prescriptions generated by variational depth as described in the first aspect.

[0027] Beneficial effects of the present invention: variational reasoning and ranking optimization techniques are introduced, and a deep generative prescription recommendation model is proposed, including patient representation learning and prescription recommendation based on ranking optimization. In patient representation learning, a multi-layer convolutional network encoder is constructed to learn the representation of patients, and Gaussian randomness is introduced into the implicit vector space of the network for the first time, which improves the diversity and authenticity of patient representation. In prescription recommendation, a multi-layer convolutional network decoder is constructed to generate the probability of each traditional Chinese medicine, and a pairwise traditional Chinese medicine ranking optimization loss containing multi-scale contrast loss is proposed for the first time, which effectively optimizes the parameters of the neural network and improves the accuracy and robustness of the recommendation.

[0028] Additional advantages of the present invention will be more clearly given in the following description or learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use 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 ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0030] Figure 1 This is a functional principle block diagram of the TCM prescription recommendation model generated by variational depth as described in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below by the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0032] It should be understood by those skilled in the art that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.

[0033] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with that in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.

[0034] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the 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 and / or groups thereof.

[0035] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. Different embodiments or examples described in this specification and features of different embodiments or examples may be combined and combined by those skilled in the art without contradiction.

[0036] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present invention.

[0037] Those skilled in the art should understand that the drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.

[0038] Prescription recommendation has always been one of the core issues in the field of intelligent auxiliary diagnosis and treatment of traditional Chinese medicine. In recent years, many scholars have proposed a series of prescription recommendation methods based on machine learning and deep learning to support the decision-making process of clinical prescription of traditional Chinese medicine. As many prescription recommendation algorithms as possible have been proposed, but due to the complexity of clinical auxiliary diagnosis and treatment, the research on prescription recommendation models still faces the challenges of insufficient patient representation and unreasonable optimization targets of prescription models. Therefore, the technical problem to be solved by the present invention is: by introducing variational reasoning and sorting optimization technology, a deep generative prescription recommendation model is proposed, including: 1) by constructing a multi-layer convolutional network encoder to learn the deep representation of patients, and introducing Gaussian randomness into the implicit vector space of the neural network, the diversity and authenticity of patient representation are improved; 2) a multi-layer convolutional network decoder is constructed to generate the probability of each Chinese medicine, and a pairwise Chinese medicine sorting optimization loss containing multi-scale contrast loss is proposed to optimize the parameters of the neural network and improve the accuracy and robustness of the recommendation.

[0039] Example 1

[0040] In this embodiment 1, a variational deep-generated TCM prescription recommendation system is first provided, comprising: an acquisition module for acquiring patient symptom data; a recommendation module for processing the acquired symptom data using a pre-trained prescription recommendation model to obtain a prescription recommendation result; wherein the prescription recommendation model comprises a patient representation learning module which takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains an explicit representation of the patient; uses Gaussian distribution sampling to fuse implicit representations on the basis of explicit representations, so as to make the patient representation more diverse and authentic; a TCM probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each TCM being recommended, and a target optimization module uses pairwise TCM ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

[0041] In this embodiment, the above-mentioned system is used to implement a variational deep generation method for recommending Chinese medicine prescriptions, including: obtaining patient symptom data; using a pre-trained prescription recommendation model to process the obtained symptom data to obtain a prescription recommendation result; wherein the prescription recommendation model includes a patient representation learning module that takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains an explicit representation of the patient; uses Gaussian distribution sampling to fuse implicit representations on the basis of explicit representations, so that the patient representation is more diverse and authentic; the Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended, and the target optimization module uses paired Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

[0042] The goal of the patient representation learning module is to learn from the symptom set s set The multi-hot encoded vector x s The complex relationship between diseases and symptoms is learned, and the posterior distribution q(z|x) of the patient representation vector z is obtained, and the patient representation is generated according to the distribution. The patient representation learning module first receives x s As input, the correlation between symptoms and patients is captured through a deep neural network, and the characteristic representation of symptoms is extracted as the explicit representation of the patient. In order to expand the implicit representation space of the patient, it is assumed that the distribution p(z) of all patient representations obeys the standard normal distribution N(0,I), and ε is sampled from it as the implicit representation of the patient. The explicit symptom representation part and the implicit representation part of the patient are extracted separately, so that the model can take into account the patient's obvious symptoms and make full use of implicit information when generating recommended prescriptions.

[0043] In order not to change the distribution of patient representation, the display representation is divided into two parts μ and σ. Finally, the complete patient representation vector z = ε⊙σ + μ is calculated as the input of the prescription recommendation module to generate the score of traditional Chinese medicine.

[0044] p(z) obeys The patient representation distribution q(z|x) obeys It is optimized using the following loss function:

[0045]

[0046] In the TCM probability generation module, a multi-layer convolutional neural network was constructed, which took the patient representation as input and generated the recommendation probability of each TCM. Then, a pairwise TCM ranking optimization loss function was used to evaluate the gap between the generated results and the actual prescriptions. At the same time, a multi-scale contrast loss was added to achieve layer-by-layer comparison of the recommended results with positive and negative samples, thereby improving the accuracy and robustness of the model.

[0047] The multi-scale contrastive loss takes positive and negative prescription samples as input, and when the multi-hot encoded vector y of the true prescription of patient p h,p When it is a positive sample, the {y h,1 ,...,y h,p-1 ,y h,p+1 ,...} are negative samples. When extracting features from samples, the results of some or all blocks will be stored to calculate the loss L of positive and negative samples at different scales. pos and L neg , and calculate the total loss of the module;

[0048] The overall goal of the model is Loss = α1Loss Enc +α2Loss Rec +α3Loss Cont

[0049] Among them, α1, α2 and α3 are the weights of each objective function.

[0050] Example 2

[0051] like Figure 1 As shown, in this embodiment 2, a variational deep generation model for TCM prescription recommendation is proposed, which includes two parts: patient representation learning and prescription recommendation. The patient representation learning module takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, obtains the patient's explicit representation, and then uses Gaussian distribution sampling to fuse implicit representations on the basis of explicit representations, making the patient representation more diverse and authentic. Prescription recommendation includes a Chinese medicine probability generation module and a target optimization module. The Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended. The target optimization module uses paired Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the model parameters, thereby improving the accuracy and robustness of the model. These two parts are introduced in detail below.

[0052] (1) Patient representation learning

[0053] The goal of the patient representation learning module is to learn from the symptom set s set The multi-hot encoded vector x s We learn the complex relationship between diseases and symptoms, obtain the posterior distribution q(z|x) of the patient representation vector z, and generate patient representations based on the distribution.

[0054] The patient representation learning module first receives x s As input, the correlation between symptoms and patients is captured through a deep neural network, from which the characteristic representation of symptoms is extracted as the displayed representation of the patient. In order to expand the implicit representation space of patients, it is assumed that the distribution p(z) of all patient representations follows a standard normal distribution And sample ε from it as the implicit representation of the patient. Extracting the explicit symptom representation and implicit representation of the patient separately can enable the model to take into account the patient's obvious symptoms and make full use of implicit information when generating recommended prescriptions. Since it is assumed that p(z) obeys In order not to change the distribution of patient representation, we divide the display representation into two parts μ and σ. Finally, we can calculate and get the complete patient representation vector z = ε⊙σ + μ. This vector will be used as the input of the prescription recommendation module to generate a score for traditional Chinese medicine.

[0055] p(z) obeys However, the patient representation distribution q(z|x) obtained through the existing samples obeys Therefore, the following loss function is used to optimize it.

[0056]

[0057] (2) Prescription recommendations

[0058] The goal of prescription recommendation is to generate prescriptions recommended for patients. In the TCM probability generation module, a multi-layer convolutional neural network is constructed to generate the recommendation probability of each TCM with the patient representation as input. Then, we designed a pairwise TCM ranking optimization loss function in the target optimization module to evaluate the gap between the generated results and the real prescriptions. At the same time, a multi-scale contrast loss is added to achieve layer-by-layer comparison of the recommended results with positive and negative samples, thereby improving the accuracy and robustness of the model.

[0059] In the TCM probability generation module, the patient representation vector z undergoes linear transformation and feature extraction in multiple network layers, so that the model can learn the TCM probability distribution of a given patient representation. Generate the TCM probability vector of candidate TCM H The probability reflects the degree to which the model recommends the Chinese medicine.

[0060] In order to select the most suitable prescription for the patient, in this embodiment, a pairwise Chinese medicine ranking optimization loss including multi-scale contrast loss is designed. The pairwise Chinese medicine ranking optimization loss evaluates the recommendation results according to the optimization goal, reduces the gap between the generated Chinese medicine and the real Chinese medicine, and the multi-scale contrast loss can extract features from the results layer by layer, realize the comparison of the results with their positive and negative samples at multiple scales, and finally improve the accuracy and robustness of prescription recommendations.

[0061] The pairwise ranking optimization loss is inspired by the pairwise idea and is obtained by modifying the normalized discounted cumulative loss (nDCG). The loss for a single patient is calculated as

[0062]

[0063] where a i,p is a Boolean variable, a i,p =1 means that the patient p's prescription contains Chinese medicine i, a i,p =0 means that patient p's prescription does not contain Chinese medicine i. Sorting position The recommendation probability of i and all other Chinese medicines is calculated by pairwise comparison

[0064]

[0065] in is the probability of recommending Chinese medicine i to patient p. In the process of calculating the loss, in order to prevent the correct Chinese medicine from being ignored during the training process, the pairwise sorting optimization loss of the entire Chinese medicine list is calculated.

[0066] The total loss of the final module is as follows:

[0067]

[0068] In addition, in order to improve the stability of the neural network and the robustness of the prediction results, a multi-scale contrast loss is added to the TCM ranking optimization loss. The multi-scale contrast module takes positive and negative prescription samples as input. When the multi-hot encoding vector y of the actual prescription of patient p is h,p When it is a positive sample, the {y h,1 ,...,y h,p-1 ,y h,p+1 ,...} are negative samples. During the training process, this module will store the results of some or all blocks while extracting features from the samples, which is used to calculate the positive and negative sample losses L at different scales. pos and L neg , and calculate the total loss of the module. Assuming that the results of B blocks are used for multi-scale comparison, take the result of block b as an example, y h,p After entering this module, the intermediate result in block b is After input into this module, the intermediate result in block b is and Dot product and Multiply to get With all patients and After that, the loss can be calculated as follows:

[0069]

[0070] in, is a vector of all zeros. Then the loss of the integrated module can be calculated as follows.

[0071]

[0072] The first term of the loss can make the prediction result closer to the correct prescription while being away from the wrong prescription, which is used to optimize the prescription recommendation module. The second term of the loss can constrain the distribution of patient representations and is used to optimize the patient representation module. Using multi-scale comparison can increase the model's ability to learn data, so that the model can better capture the contextual information in the prescription.

[0073] After the above process, the recommendation results for the patient can be obtained based on the patient information. The overall goal of the model is Loss = α1Loss Enc +α2Loss Rec +α3Loss Cont ; where α1, α2 and α3 are the weights of each objective function.

[0074] In summary, this embodiment proposes a variational deep generative TCM prescription recommendation model, which introduces Gaussian randomness into the latent vector space and learns a patient representation learning method with higher diversity and authenticity. A pairwise TCM ranking optimization loss containing multi-scale contrast loss for prescription recommendation optimization.

[0075] Example 3

[0076] This embodiment 3 provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the method for recommending traditional Chinese medicine prescriptions based on variational depth generation is implemented. The method includes:

[0077] Obtain patient symptom data;

[0078] The acquired symptom data is processed using a pre-trained prescription recommendation model to obtain prescription recommendation results; the prescription recommendation model includes a patient representation learning module that takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains the patient's explicit representation; Gaussian distribution sampling is used to fuse implicit representations on the basis of explicit representations to make patient representations more diverse and realistic; the Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended; the target optimization module uses pairwise Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

[0079] Example 4

[0080] This embodiment 4 provides a computer device, including a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, the processor calls the program instructions to execute the TCM prescription recommendation method generated by variational depth as described above, the method comprising:

[0081] Obtain patient symptom data;

[0082] The acquired symptom data is processed using a pre-trained prescription recommendation model to obtain prescription recommendation results; the prescription recommendation model includes a patient representation learning module that takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains the patient's explicit representation; Gaussian distribution sampling is used to fuse implicit representations on the basis of explicit representations to make patient representations more diverse and realistic; the Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended; the target optimization module uses pairwise Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

[0083] Example 5

[0084] This embodiment 5 provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to execute instructions for implementing the method for recommending traditional Chinese medicine prescriptions generated by variational depth as described above, the method including:

[0085] Obtain patient symptom data;

[0086] The acquired symptom data is processed using a pre-trained prescription recommendation model to obtain prescription recommendation results; the prescription recommendation model includes a patient representation learning module that takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains the patient's explicit representation; Gaussian distribution sampling is used to fuse implicit representations on the basis of explicit representations to make patient representations more diverse and realistic; the Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended; the target optimization module uses pairwise Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

[0087] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0088] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0089] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0090] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0091] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative work on the basis of the technical solution disclosed in the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for recommending TCM prescriptions based on variational deep generation, characterized in that: include: Obtain patient symptom data; The acquired symptom data is processed using a pre-trained prescription recommendation model to obtain prescription recommendation results; the prescription recommendation model includes a patient representation learning module that takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains the patient's explicit representation; Gaussian distribution sampling is used to fuse implicit representations on the basis of explicit representations to make patient representations more diverse and realistic; the Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended; the target optimization module uses pairwise Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

2. The method for recommending TCM prescriptions based on variational deep generation according to claim 1, characterized in that: The goal of the patient representation learning module is to learn from the symptom set s set The multi-hot encoded vector x s We learn the complex relationship between diseases and symptoms, obtain the posterior distribution q(z|x) of the patient representation vector z, and generate patient representations based on the distribution.

3. The method for recommending TCM prescriptions based on variational deep generation according to claim 2, characterized in that: The patient representation learning module first receives x s As input, the correlation between symptoms and patients is captured through a deep neural network, from which the characteristic representation of symptoms is extracted as the displayed representation of the patient; in order to expand the implicit representation space of patients, it is assumed that the distribution p(z) of all patient representations follows a standard normal distribution And sample ε from it as the implicit representation of the patient; extract the patient's explicit symptom representation and implicit representation respectively, so that the model can take into account the patient's obvious symptoms and make full use of implicit information when generating recommended prescriptions.

4. The method for recommending TCM prescriptions based on variational deep generation according to claim 3, characterized in that: In order not to change the distribution of patient representation, the display representation is divided into two parts μ and σ. Finally, the complete patient representation vector z = ε⊙σ + μ is calculated as the input of the prescription recommendation module to generate the score of traditional Chinese medicine. p(z) obeys The patient representation distribution q(z|x) obeys It is optimized using the following loss function:

5. The method for recommending TCM prescriptions based on variational deep generation according to claim 3, characterized in that: In the TCM probability generation module, a multi-layer convolutional neural network was constructed, which took the patient representation as input and generated the recommendation probability of each TCM. Then, a pairwise TCM ranking optimization loss function was used to evaluate the gap between the generated results and the actual prescriptions. At the same time, a multi-scale contrast loss was added to achieve layer-by-layer comparison of the recommended results with positive and negative samples, thereby improving the accuracy and robustness of the model.

6. The method for recommending TCM prescriptions based on variational deep generation according to claim 3, characterized in that: The multi-scale contrastive loss takes positive and negative prescription samples as input, and when the multi-hot encoded vector y of the true prescription of patient p h,p When it is a positive sample, the {y h,1 ,...,y h,p-1 ,y h,p+1 ,...} are negative samples. When extracting features from samples, the results of some or all blocks will be stored to calculate the loss L of positive and negative samples at different scales. pos and L neg , and calculate the total loss of the module; The overall goal of the model is Loss = α1Loss Enc +α2Loss Rec +α3Loss Cont Among them, α1, α2 and α3 are the weights of each objective function.

7. A variational deep generation Chinese medicine prescription recommendation system, characterized in that: include: An acquisition module, used to obtain patient symptom data; The recommendation module is used to process the acquired symptom data using a pre-trained prescription recommendation model to obtain prescription recommendation results; wherein, the prescription recommendation model includes a patient representation learning module that takes the patient symptom vector as input, uses a multi-layer convolutional network encoder to learn symptom information therefrom, and obtains the patient's explicit representation; Gaussian distribution sampling is used to fuse implicit representations on the basis of explicit representations to make patient representations more diverse and realistic; the Chinese medicine probability generation module uses a multi-layer convolutional network decoder to learn patient representations and generate the probability of each Chinese medicine being recommended; the target optimization module uses pairwise Chinese medicine ranking optimization loss and multi-scale contrast loss to optimize the parameters of the model.

8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by the processor, the method for recommending traditional Chinese medicine prescriptions generated by variational depth as described in any one of claims 1-6 is implemented.

9. A computer device, characterized in that: It includes a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the variational depth generated Chinese medicine prescription recommendation method as described in any one of claims 1-6.

10. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the variational depth generated method for recommending traditional Chinese medicine prescriptions as described in any one of claims 1-6.

Citation Information

Cited By

  • Traditional Chinese medicine recommendation method based on knowledge-driven and residual attention network

    CN119517319A