Traditional Chinese medicine compound optimization method and traditional Chinese medicine compound optimization model training method

Through the Chinese medicine compound optimization model, using variational autoencoders and noise embedding modules, the correlation between Chinese medicine compounds and disease symptoms is automatically analyzed, which solves the problem of traditional Chinese medicine compound optimization relying on experience, and realizes fast and accurate Chinese medicine compound optimization and scientific standardization.

CN120656635APending Publication Date: 2025-09-16JIANGSU KANION PHARMA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510729766.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The optimization of traditional Chinese medicine compound prescriptions relies on experience inheritance and experimental verification, and it is difficult to quickly and accurately provide optimization plans, especially when medicinal materials are missing or replaced, there is a lack of scientific and standardized solutions.

Method used

The Chinese herbal compound optimization model is adopted, and the variational autoencoder and noise embedding module are used to automatically analyze the correlation between the Chinese herbal compound and disease symptoms through feature extraction and noise reduction processing, and predict the optimized Chinese herbal compound.

Benefits of technology

It has achieved scientific and standardized optimization of Chinese herbal compound prescriptions, and can quickly and accurately supplement missing medicinal materials or add Chinese herbal medicines to prescriptions, thereby improving the accuracy and effectiveness of Chinese herbal compound prescriptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120656635A_ABST
    Figure CN120656635A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of traditional Chinese medicine compounds, and discloses a traditional Chinese medicine compound optimization method and a traditional Chinese medicine compound optimization model training method.The optimization method comprises the steps that target information is obtained, and the target information comprises a to-be-optimized traditional Chinese medicine compound and corresponding disease symptoms; based on the target information, using a traditional Chinese medicine compound optimization model to predict and obtain an optimized traditional Chinese medicine compound; wherein the traditional Chinese medicine compound optimization model comprises a variational auto-encoder and a noise embedding module. Through the traditional Chinese medicine compound optimization model, the correlation between the input traditional Chinese medicine compound and the disease symptom can be automatically analyzed, and the missing traditional Chinese medicine can be accurately supplemented or the traditional Chinese medicine formula can be added. The traditional Chinese medicine compound optimization model can effectively assist medical staff in accurately and rapidly providing an optimized traditional Chinese medicine compound according to disease symptoms, and scientization and standardization of traditional Chinese medicine compound optimization are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traditional Chinese medicine compound prescriptions, and in particular to a traditional Chinese medicine compound prescription optimization method and a traditional Chinese medicine compound prescription optimization model training method. Background Art

[0002] A traditional Chinese medicine (TCM) compound prescription is a formula consisting of two or more herbs, with relatively prescribed processing and usage methods, and designed to treat specific conditions. It forms the backbone of TCM prescriptions. Traditional TCM compounds are largely based on empirical experience, and optimizing them often relies on inherited knowledge and experimental validation, requiring a high level of professional knowledge and experience in TCM. When a TCM compound is missing an ingredient or requires replacing one with another to address a different condition, medical professionals struggle to accurately and quickly create an optimized formula. Summary of the Invention

[0003] In view of this, the present invention provides a Chinese medicine compound optimization method and a Chinese medicine compound optimization model training method to solve the problem in the prior art that it is difficult to accurately and quickly provide an optimized Chinese medicine compound.

[0004] In a first aspect, the present invention provides a method for optimizing a traditional Chinese medicine compound, the method comprising:

[0005] Obtain target information, including the Chinese herbal compound to be optimized and the corresponding disease symptoms;

[0006] Based on the target information, the optimized Chinese medicine compound is predicted using the Chinese medicine compound optimization model;

[0007] Among them, the Chinese medicine compound optimization model includes a variational autoencoder and a noise embedding module.

[0008] In the present invention, the Chinese herbal compound to be optimized and the corresponding disease symptoms are input into the Chinese herbal compound optimization model to predict the optimized Chinese herbal compound. The Chinese herbal compound optimization model can automatically analyze the correlation between the input Chinese herbal compound and the disease symptoms, accurately supplement missing Chinese herbal medicines or perform additional Chinese herbal medicines. This Chinese herbal compound optimization model can effectively assist medical staff in accurately and quickly formulating optimized Chinese herbal compound prescriptions based on disease symptoms, achieving scientific and standardized optimization of Chinese herbal compound prescriptions.

[0009] In an optional embodiment, the target information further includes: the efficacy of the Chinese herbal medicine corresponding to the Chinese herbal compound.

[0010] In an optional embodiment, based on the target information, a Chinese medicine compound optimization model is used to predict an optimized Chinese medicine compound, including:

[0011] Based on the target information, determine the Chinese medicine efficacy word vector, disease symptom word vector and Chinese medicine compound matrix;

[0012] The Chinese medicine efficacy word vector and the disease symptom word vector are fed into the encoder of the variational autoencoder to obtain the extracted first feature data;

[0013] Inputting the first feature data into a noise embedding module for noise reduction to obtain second feature data after noise reduction;

[0014] The Chinese medicine compound matrix and the second feature data are fused and sent to the decoder of the variational autoencoder to obtain the optimized Chinese medicine compound.

[0015] In this embodiment, feature extraction and noise reduction are performed on the TCM efficacy word vectors and disease symptom word vectors based on the variational autoencoder and the noise embedding module, which effectively improves the accuracy of feature extraction and enhances the optimization effect of the TCM compound.

[0016] In an optional embodiment, the Chinese medicine efficacy word vector and the disease symptom word vector are fed into the encoder of the variational autoencoder to obtain the extracted first feature data, including:

[0017] Concatenate the Chinese medicine efficacy word vector and the disease symptom word vector to determine the concatenated tensor;

[0018] Based on the tensor, determine the feature mean and feature logarithmic variance;

[0019] The first feature data is determined based on the feature mean and the feature logarithmic variance.

[0020] In this implementation, a reparameterization technique is used to convert the mean and log-variance into a latent variable z, enabling efficient gradient optimization in the latent space. This not only effectively improves the stability of model training but also enhances the model's ability to represent data distributions, leading to more accurate generation of optimized traditional Chinese medicine formulas.

[0021] In an optional embodiment, the first feature data is input into a noise embedding module for noise reduction to obtain the noise-reduced second feature data, including:

[0022] Randomly generate noise that follows a standard normal distribution;

[0023] Performing addition and subtraction operations on the noise and the first characteristic data respectively to obtain addition characteristic data and subtraction characteristic data;

[0024] Perform convolution operations on the addition feature data and the subtraction feature data respectively, and add the convolution operation results to obtain intermediate feature data;

[0025] Based on the intermediate feature data, second feature data is determined.

[0026] In this embodiment, by performing addition and subtraction operations on noise and feature data and performing convolution operations, the interference of noise on features can be effectively reduced and the optimization performance of the model can be improved.

[0027] In an optional embodiment, the m3e-base model is used to encode the efficacy of traditional Chinese medicine into a traditional Chinese medicine efficacy word vector of a preset dimension, and to encode the disease symptoms into a disease symptom word vector of a preset dimension;

[0028] One-hot encoding is used to characterize the composition of traditional Chinese medicine compound prescriptions, and the traditional Chinese medicine compound matrix of the corresponding dimension is obtained.

[0029] In this implementation, by encoding TCM efficacy and disease symptoms into 768-dimensional word vectors, we can accurately capture semantic information, thereby improving the model's understanding of compound prescriptions. Combined with the binary matrix of the compound prescription, we can effectively optimize the generated TCM compound prescriptions, making them more accurately match disease symptoms.

[0030] In a second aspect, the present invention provides a method for training a traditional Chinese medicine compound optimization model, the method comprising:

[0031] obtaining a training sample, wherein the training sample includes a traditional Chinese medicine compound from which one traditional Chinese medicine in the original traditional Chinese medicine compound is removed;

[0032] The training samples are used to train the TCM compound optimization model to be trained, thereby obtaining the TCM compound optimization model used in the method described in any of the above embodiments; wherein, the excluded TCMs are used as labels during the training process.

[0033] In the present invention, a traditional Chinese medicine compound with one herbal medicine removed is input into a training model for the optimization of the herbal compound. The resulting model can automatically analyze the correlation between the input herbal compound and disease symptoms, accurately supplementing the missing herbal medicine or adding additional herbal medicines. This model can effectively assist medical staff in accurately and quickly formulating optimized herbal compound prescriptions based on disease symptoms, achieving scientific and standardized optimization of herbal compound prescriptions.

[0034] In an optional embodiment, the Chinese herbal compound optimization model to be trained further includes:

[0035] A diffusion model based on a dual attention mechanism is used to re-extract features from the first feature data output by the encoder of the variational autoencoder, and generate new training samples based on the re-extracted features.

[0036] In a third aspect, the present invention provides a Chinese medicine compound optimization system, the system comprising:

[0037] An acquisition module is used to obtain target information, which includes the traditional Chinese medicine compound to be optimized and the corresponding disease symptoms;

[0038] The prediction module is used to predict the optimized Chinese herbal compound based on the target information using the Chinese herbal compound optimization model; wherein the Chinese herbal compound optimization model includes a variational autoencoder and a noise embedding module.

[0039] In a fourth aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for optimizing a traditional Chinese medicine compound according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0040] In a fifth aspect, the present invention provides a computer-readable storage medium storing computer instructions for enabling a computer to execute the method for optimizing a Chinese medicine compound according to the first aspect or any corresponding embodiment thereof.

[0041] In a sixth aspect, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the method for optimizing a traditional Chinese medicine compound according to the first aspect or any corresponding embodiment thereof.

[0042] It should be noted that the TCM compound optimization system, computer device, computer-readable storage medium, and computer program product provided by the present invention correspond to the TCM compound optimization method described above. Therefore, regarding the beneficial effects of the TCM compound optimization system, computer device, computer-readable storage medium, and computer program product, please refer to the description of the corresponding beneficial effects of the TCM compound optimization method above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 1 is a flow chart of a method for optimizing a traditional Chinese medicine compound according to an embodiment of the present invention;

[0045] Figure 2 1 is a flow chart of a method for training a traditional Chinese medicine compound optimization model according to an embodiment of the present invention;

[0046] Figure 3 is a structural block diagram of a Chinese medicine compound optimization system according to an embodiment of the present invention;

[0047] Figure 4Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0049] Optimizing traditional Chinese medicine formulas relies on empirical evidence and experimental validation, which is inefficient and difficult to accurately determine the right formula for the right condition. With modern medicine's deepening understanding of disease mechanisms and exploration of the mechanisms of action of traditional Chinese medicine formulas, developing efficient optimization models for these formulas has become increasingly important. By building an optimization model based on deep learning, we can rapidly identify potentially effective combinations of Chinese medicine, improving the precision and effectiveness of formulas and providing new insights into the modernization of traditional Chinese medicine and personalized medicine.

[0050] While research on TCM compound optimization models has made some progress, it still faces numerous challenges. First, data acquisition and annotation are difficult, and the lack of large-scale, high-quality TCM compound datasets limits model training and validation. Furthermore, integrating traditional Chinese medicine theory with modern technologies to achieve scientific and standardized compound optimization remains a pressing issue.

[0051] According to an embodiment of the present invention, an embodiment of a method for optimizing a traditional Chinese medicine compound is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0052] In this embodiment, a method for optimizing a traditional Chinese medicine compound is provided, which can be executed by a server, a terminal, a mobile terminal, and other devices. Figure 1 : is a flow chart of a method for optimizing a traditional Chinese medicine compound according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0053] Step S101: Acquire target information, which includes the Chinese herbal compound to be optimized and the corresponding disease symptoms. For example, the target information acquired may include: ephedra, apricot kernel, and licorice (a Chinese herbal compound), and cold (a disease symptom). The Chinese herbal compound includes specific Chinese herbal ingredients.

[0054] Step S102: Based on the target information, the optimized Chinese medicine compound is predicted using the Chinese medicine compound optimization model; wherein the Chinese medicine compound optimization model includes a variational autoencoder and a noise embedding module.

[0055] Specifically, the variational autoencoder included in the TCM compound optimization model extracts word vectors from the target information, then compresses and transforms this information to obtain the extracted initial features. The noise embedding module then generates some random noise information and combines it with the initial features to reduce noise in the sample, thereby improving model performance.

[0056] In practice, simply inputting the base target information into the TCM compound optimization model will predict the optimized TCM compound. For example, if ephedra, almond, licorice, and wind-cold cold are input into the TCM compound optimization model, it will predict that the herb "cinnamon twig" is missing, resulting in the optimized TCM compound being: ephedra, cinnamon twig, almond, and licorice.

[0057] In addition, the Chinese herbal compound: ephedra, cinnamon twig, almond, licorice, and wind-cold-damp cold (disease symptoms) can also be input into the Chinese herbal compound optimization model, and the predicted output of the optimized Chinese herbal compound is: ephedra, cinnamon twig, almond, licorice, and white atractylodes.

[0058] In this embodiment, the Chinese herbal compound to be optimized and the corresponding disease symptoms are input into the Chinese herbal compound optimization model to predict the optimized Chinese herbal compound. The Chinese herbal compound optimization model can automatically analyze the correlation between the input Chinese herbal compound and the disease symptoms, accurately supplement missing active ingredients or perform Chinese herbal prescription additions, and quickly screen for potentially effective drug combinations. This Chinese herbal compound optimization model can effectively assist medical staff in accurately and quickly providing optimized Chinese herbal compound based on disease symptoms, achieving scientific and standardized optimization of Chinese herbal compound.

[0059] In some optional embodiments, the target information further includes the efficacy of the Chinese herbal compound. In this embodiment, the efficacy of the Chinese herbal compound can be determined based on the Chinese Pharmacopoeia. During actual prediction, the efficacy of the Chinese herbal compound can be determined based on the input Chinese herbal compound. Feature extraction can then be performed based on the efficacy of the Chinese herbal compound and the disease symptoms. Based on the dependency between the efficacy of the Chinese herbal compound and the disease symptoms, an optimized Chinese herbal compound can be predicted.

[0060] In some optional embodiments, the above step S102, i.e., using the TCM compound optimization model based on the target information to predict an optimized TCM compound, includes:

[0061] Step S1021, based on the target information, determines the TCM efficacy word vector, disease symptom word vector, and TCM compound matrix. Specifically, the TCM efficacy and disease symptoms can be encoded into 768-dimensional word vectors using the m3e-base (an open source serial text embedding model) pre-trained model. The TCM compound is composed of a 633-dimensional matrix represented as 0 or 1. When the TCM in the corresponding position appears in the compound, it is assigned a value of 1, otherwise it is assigned a value of 0.

[0062] Step S1022: Send the Chinese medicine efficacy word vector and the disease symptom word vector to the encoder of the variational autoencoder to obtain the extracted first feature data.

[0063] Specifically, the vectors for TCM efficacy and disease symptoms can be fed into the encoder module of the variational autoencoder, which then outputs the mean and logarithmic variance of the initially extracted features. The mean and logarithmic variance are converted into a latent variable z using a reparameterization technique, and this latent variable z is used as the first feature data.

[0064] Step S1023: Input the first feature data into a noise embedding module for noise reduction to obtain second feature data after noise reduction.

[0065] Specifically, we randomly generate noise that follows a standard normal distribution, add and subtract this noise from the latent variable z, and then pass it through two convolutional layers to perform denoising. The denoised results are then added together to obtain a tensor z1. This tensor z1 is then passed through several FC blocks to obtain a tensor z2. Each FC block consists of a different fully connected layer, a ReLU layer, and a Dropout layer.

[0066] In step S1024, the Chinese herbal compound matrix and the second feature data are fused and sent to the decoder of the variational autoencoder to obtain an optimized Chinese herbal compound.

[0067] The fused features are input into the decoder, the abstract features are "decoded", and through multi-layer neural network operations, specific optimized Chinese medicine compound prescriptions are gradually generated.

[0068] In this embodiment, feature extraction and noise reduction are performed on the Chinese medicine efficacy word vectors and disease symptom word vectors based on the variational autoencoder and the noise embedding module, which effectively improves the accuracy of feature extraction and enhances the optimization effect of the Chinese medicine compound.

[0069] In some optional embodiments, the Chinese medicine efficacy word vector and the disease symptom word vector are fed into the encoder of the variational autoencoder to obtain the extracted first feature data, including:

[0070] Concatenate the Chinese medicine efficacy word vector and the disease symptom word vector to determine the concatenated tensor;

[0071] Based on the tensor, determine the feature mean and feature logarithmic variance;

[0072] The first feature data is determined based on the feature mean and the feature logarithmic variance.

[0073] Specifically, the efficacy and disease characteristics of traditional Chinese medicines are fed into the encoder module of the variational autoencoder, which then outputs the mean and logarithmic variance of the initially extracted features. The mean and logarithmic variance are then converted into a latent variable z using a reparameterization technique, and the latent variable z is used as the first feature data.

[0074] The calculation formula for determining the first characteristic data is as follows:

[0075]

[0076] Here, A1 represents the tensor formed by concatenating the vectors for the efficacy of traditional Chinese medicines and the vectors for the symptoms of diseases. ∈ represents randomly generated noise that follows a standard normal distribution. FC1 and FC2 represent fully connected layers with different numbers of channels. ReLU represents the linear rectifier function. Dropout is used to randomly drop a certain number of neurons. Tensor A1 is passed through different combinations of fully connected layers, ReLU layers, and Dropout layers to obtain its mean μ. Tensor A1 is passed through different combinations of fully connected layers, ReLU layers, and Dropout layers to obtain its logarithmic variance σ1. The logarithm of the standard deviation is then calculated by multiplying it by 0.5×log. exp is used to calculate the element-wise exponential, and the standard deviation σ is obtained from exp.

[0077] In this example, a reparameterization technique was used to convert the mean and log-variance into a latent variable z, enabling efficient gradient optimization in the latent space. This not only effectively improves the stability of model training but also enhances the model's ability to represent data distributions, leading to more accurate generation of optimized traditional Chinese medicine formulas.

[0078] In some optional implementations, inputting the first feature data into a noise embedding module for noise reduction to obtain the noise-reduced second feature data includes:

[0079] Randomly generate noise that follows a standard normal distribution;

[0080] Performing addition and subtraction operations on the noise and the first characteristic data respectively to obtain addition characteristic data and subtraction characteristic data;

[0081] Perform convolution operations on the addition feature data and the subtraction feature data respectively, and add the convolution operation results to obtain intermediate feature data;

[0082] Based on the intermediate feature data, second feature data is determined.

[0083] Specifically, the calculation formula for determining the second characteristic data is as follows:

[0084]

[0085] The latent tensor z obtained after feature extraction is input into the variable noise embedding module. ∈1 and ∈2 are randomly generated noises following a standard normal distribution. These two noises are added to and subtracted from z, respectively, to obtain the addition feature data and subtraction feature data. The addition feature data and subtraction feature data are passed through two convolutional layers, respectively. The latent tensor z is denoised by the convolution operation, and the denoised results are added together to obtain z1. z1 is passed through several FC blocks to obtain z2. Each FCBlock is composed of different fully connected layers, ReLU layers, and dropout layers.

[0086] In this embodiment, by performing addition and subtraction operations on noise and feature data and performing convolution operations, the interference of noise on features can be effectively reduced, the robustness of features can be improved, and thus the optimization performance of the model can be improved.

[0087] In some optional embodiments, the m3e-base model is used to encode the efficacy of traditional Chinese medicine into a traditional Chinese medicine efficacy word vector of a preset dimension, and to encode the disease symptoms into a disease symptom word vector of a preset dimension;

[0088] One-hot encoding is used to characterize the composition of traditional Chinese medicine compound prescriptions, and the traditional Chinese medicine compound matrix of the corresponding dimension is obtained.

[0089] Specifically, the efficacy of traditional Chinese medicines and disease symptoms can be encoded into 768-dimensional word vectors using the m3e-base pre-trained model. The traditional Chinese medicine compound is represented as a 633-dimensional matrix represented as 0 or 1. When the corresponding traditional Chinese medicine appears in the compound, it is assigned a value of 1, otherwise it is assigned a value of 0.

[0090] In this example, by encoding TCM efficacy and disease symptoms into 768-dimensional word vectors, we can accurately capture semantic information, thereby improving the model's understanding of compound prescriptions. Combined with the binary matrix of the compound prescription, we can effectively optimize the generated TCM compound prescription to more accurately match disease symptoms.

[0091] In this embodiment, a method for training a traditional Chinese medicine compound optimization model is provided, which can be executed by a server, a terminal, a mobile terminal, or other devices. The process includes the following steps:

[0092] Step S201, obtaining a training sample, wherein the training sample includes a Chinese herbal compound from which one Chinese herbal medicine in the original Chinese herbal compound is removed;

[0093] Step S202: Using the training samples to train the TCM compound optimization model to be trained, to obtain the TCM compound optimization model used in the method of any of the above embodiments; wherein, the excluded TCMs are used as labels during the training process.

[0094] In this example, a traditional Chinese medicine compound formula with one herbal medicine removed is input into a training model for the traditional Chinese medicine compound formula optimization. The resulting model can automatically analyze the correlation between the input traditional Chinese medicine compound formula and disease symptoms, accurately supplementing the missing traditional Chinese medicine or adding a traditional Chinese medicine to the formula. This traditional Chinese medicine compound formula optimization model can effectively assist medical staff in accurately and quickly formulating optimized traditional Chinese medicine compounds based on disease symptoms, achieving scientific and standardized optimization of traditional Chinese medicine compound formulas.

[0095] In some optional embodiments, the Chinese herbal compound optimization model to be trained further includes:

[0096] A diffusion model based on a dual attention mechanism is used to re-extract features from the first feature data output by the encoder of the variational autoencoder, and generate new training samples based on the re-extracted features.

[0097] The specific training process is as follows:

[0098] The efficacy of the TCM compound and the symptoms it can treat in the dataset can be encoded into 768-dimensional word vectors using the m3e-base pre-trained model. The TCM compound is then represented as a 633-dimensional matrix with values ​​of 0 or 1. If a TCM compound appears in the compound at the corresponding position, the value is assigned to 1, and otherwise, it is assigned to 0. 1 indicates presence, and 0 indicates absence.

[0099] A sample set of traditional Chinese medicine compound prescriptions was randomly removed from the sample set, used as a sample feature, and the removed herb was used as a label. Model performance was evaluated by examining the model's accuracy in predicting the removed herb. The dataset was divided into training, test, and validation sets in an 8:1:1 ratio. The model was trained using the training set, and after each round, the validation set was used to verify model performance. The model with the best performance on the validation set was saved and used for prediction on the test set.

[0100] Specifically, the feature extraction process is as follows:

[0101] The TCM efficacy features and disease features are fed into the encoder module of the variational autoencoder, which then outputs the mean and logarithmic variance of the initially extracted features. The mean and logarithmic variance are converted into the latent variable z using the reparameterization technique.

[0102] The calculation formula for feature extraction is shown below.

[0103]

[0104] Here, A1 is the concatenated tensor of the TCM efficacy word vector and the disease symptom word vector, and ∈ is randomly generated noise following a standard normal distribution. FC1 and FC2 represent fully connected layers with different numbers of channels. ReLU is a linear rectifier function, and Dropout is used to randomly drop a certain number of neurons. A1 obtains its mean μ through different combinations of fully connected layers, ReLU layers, and Dropout layers. A1 obtains its logarithmic variance σ1 through different combinations of fully connected layers, ReLU layers, and Dropout layers. The logarithmic standard deviation is then calculated by multiplying the logarithm by 0.5×log. exp is used to calculate the element-wise exponential, and the standard deviation σ is obtained from exp.

[0105] The data augmentation process is as follows:

[0106] The latent variable z is used for new sample generation and variable noise embedding. First, a dual attention mechanism is used to extract features from z. Then, random noise is added to z and fed into the diffusion model to generate new samples. The variable noise embedding module is responsible for removing noise from the samples by inserting noise.

[0107] The calculation formula of the diffusion model based on the dual attention mechanism is as follows.

[0108]

[0109] Here, ∈ is randomly generated noise with a standard normal distribution and the same shape as z, and μ is the mean of A3. By adding noise ∈ to the latent variable z, we increase the diversity of the samples, resulting in the noisy samples A3. By subtracting the mean μ from sample A3, we zero-center the samples, aligning the data around zero and accelerating model convergence. Conv represents a convolutional neural network layer, and the subscript numbers represent convolutional layers with different numbers of channels and kernel sizes. Conv1 (A4) extracts feature maps for generating global descriptors. Softmax (Conv2 (A4)) generates attention maps, assigning different importance weights to input features. The softmax function normalizes the tensor so that the weight of each position in the attention map is between 0 and 1, forming a probability distribution. Conv3 (A4) generates the attention vector for subsequent feature reconstruction. A5 generates tensor A6 through several FC blocks. Each FC block is composed of different fully connected layers, ReLU layers, and dropout layers.

[0110] The calculation formula of the variable noise embedding module is as follows:

[0111]

[0112] Tensor A6, the output of the dual-attention diffusion model, is concatenated with the real sample to obtain tensor A0, which is then fed into the variable noise embedding module. ∈1 and ∈2 are randomly generated noises that follow a standard normal distribution. These two noises are added to and subtracted from A0, respectively. Then, A0 is denoised by passing it through two convolutional layers. The denoised results are summed to obtain tensor A7. Tensor A7 is passed through several FC blocks to obtain A8. Each FC block consists of a different fully connected layer, ReLU layer, and dropout layer.

[0113] The following is the model validation process:

[0114] First, the efficacy of the TCM compounds and the symptoms of the diseases they treat in the TCM compound validation set were encoded into 768-dimensional word vectors using the m3e-base pre-trained model. The TCM compound was then represented as a 633-dimensional matrix with values ​​of 0 or 1. If the TCM compound appears in the corresponding position in the compound, the value is assigned to 1, and otherwise it is assigned to 0.

[0115] Furthermore, the feature extraction process is as follows:

[0116] The vectors for TCM efficacy and disease symptoms are fed into the encoder module of the variational autoencoder, which then outputs the mean and logarithmic variance of the initially extracted features. The mean and logarithmic variance are converted into the latent variable z using the reparameterization technique.

[0117] The calculation formula for feature extraction is as follows:

[0118]

[0119] Here, A1 is the concatenated tensor of the TCM efficacy word vector and the disease symptom word vector, and ∈ is randomly generated noise following a standard normal distribution. FC1 and FC2 represent fully connected layers with different numbers of channels. ReLU is a linear rectification function, and Dropout is used to randomly drop a certain number of neurons. The mean μ of A1 is obtained by combining different fully connected layers, ReLU layers, and Dropout layers. The logarithmic variance σ1 of A1 is obtained by combining different fully connected layers, ReLU layers, and Dropout layers. The logarithmic standard deviation is obtained by multiplying the logarithm by 0.5×log. exp is used to calculate the element-wise exponential, and the standard deviation σ is obtained by exp.

[0120] Furthermore, the data enhancement process is as follows:

[0121] The data augmentation part of the validation set only includes the variable noise embedding module and does not include the diffusion model. The calculation formula of the variable noise embedding module is as follows:

[0122]

[0123] The tensor z obtained after feature extraction is input into the variable noise embedding module. ∈1 and ∈2 are randomly generated noises that follow a standard normal distribution. These two noises are added to and subtracted from z, respectively. These noises are passed through two convolutional layers, denoising z through the convolution operation. The denoised results are then summed to obtain z1. z1 is passed through several FC blocks to obtain z2. Each FCBlock consists of different fully connected layers, ReLU layers, and dropout layers.

[0124] Then, based on the output tensor z2 obtained from data augmentation, Scikit-learn is used to calculate the model performance metrics accuracy, precision, recall, and F1 score by combining it with the labels. Accuracy is used as the primary validation metric. When the accuracy of the current round of validation set exceeds the best accuracy of the previous round, the current model is saved as the best model.

[0125] The calculation formula of the performance index is as follows:

[0126]

[0127]

[0128] Where C represents the total number of categories, i represents the i-th category, where i∈{1,2,…,C}. TP i Indicates that category i is predicted as a positive sample by the model, FP i FN represents the negative sample of category i predicted as positive by the model, i Represents the positive sample of category i predicted by the model as a negative class, TN i Represents negative samples where category i is predicted as negative by the model.

[0129] Finally, the optimization process of the Chinese herbal compound is carried out.

[0130] First, the efficacy of the TCM compounds in the TCM compound test set and the symptoms of the diseases they treat were encoded into 768-dimensional word vectors using the m3e-base pre-trained model. The TCM compounds were then organized into a 633-dimensional matrix represented as either 0 or 1. If the TCM compound appears in the corresponding position in the compound, the value is assigned to 1, and otherwise it is assigned to 0.

[0131] The vectors for TCM efficacy and disease symptoms are fed into the encoder module of the variational autoencoder, which then outputs the mean and logarithmic variance of the initially extracted features. The mean and logarithmic variance are converted into the latent variable z using the reparameterization technique.

[0132] The calculation formula for feature extraction is as follows:

[0133]

[0134] Here, A1 is the concatenated tensor of the TCM efficacy word vector and the disease symptom word vector, and ∈ is randomly generated noise following a standard normal distribution. FC1 and FC2 represent fully connected layers with different numbers of channels. ReLU is a linear rectification function, and Dropout is used to randomly drop a certain number of neurons. The mean μ of A1 is obtained by combining different fully connected layers, ReLU layers, and Dropout layers. The logarithmic variance σ1 of A1 is obtained by combining different fully connected layers, ReLU layers, and Dropout layers. The logarithmic standard deviation is obtained by multiplying the logarithm by 0.5×log. exp is used to calculate the element-wise exponential, and the standard deviation σ is obtained by exp.

[0135] Furthermore, the data enhancement process is as follows:

[0136] The data augmentation part of the test set only includes the variable noise embedding module and does not include the diffusion model. The calculation formula of the variable noise embedding module is as follows:

[0137]

[0138] The tensor z obtained after feature extraction is input into the variable noise embedding module. ∈1 and ∈2 are randomly generated noises that follow a standard normal distribution. These two noises are added to and subtracted from z, respectively, and then passed through two convolutional layers. The convolution operation denoises z, and the denoised results are added together to obtain z1. z1 is passed through several FC Blocks to obtain z2. Each FCBlock is composed of different fully connected layers, ReLU layers, and Dropout layers. Finally, the output tensor z2 is obtained according to the data augmentation step. Using Scikit-learn, A8 is combined with the label to calculate the model performance indicators accuracy (accuracy), precision (precision), recall (recall), and harmonic mean score (F1 score). The model outputs the optimized result of the traditional Chinese medicine compound, which is an addition to the original prescription or a replacement of a single herbal ingredient.

[0139] As shown in Table 1, the performance of DAG-HG (baseline model) based on denoising autoencoder is compared with this model on the dataset.

[0140] Table 1

[0141]

[0142] The experimental results show that the traditional Chinese medicine compound optimization method based on the traditional Chinese medicine compound optimization model proposed in the present invention is better than other traditional Chinese medicine compound optimization methods in various performances.

[0143] In summary, the data-enhanced TCM compound optimization method of the present invention can extract disease and TCM characteristics from TCM data, can be widely used in the optimization and innovation of TCM compounds, and has great potential for guiding the discovery of TCM compounds.

[0144] The present invention proposes a training method based on a traditional Chinese medicine compound model. Figure 2 As shown in the paper, the method includes: data preprocessing, encoding TCM efficacy, disease symptoms, and TCM compound components into computer-readable forms such as word vectors; feature extraction, using a variational autoencoder; and data augmentation, generating new samples using a diffusion model based on a dual attention mechanism and employing a variable noise embedding module to increase the model's generalization capabilities. During model training, predictive performance was improved by optimizing parameters and structure, and comparative experiments were conducted to validate the model, demonstrating its reliability and potential for application in TCM compound research and development.

[0145] In this embodiment, a Chinese medicine compound optimization system is also provided. The system is used to implement the above-mentioned embodiments and preferred embodiments, and the details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0146] This embodiment provides a Chinese medicine compound optimization system, such as Figure 3 As shown, the system includes:

[0147] An acquisition module 301 is used to acquire target information, which includes the Chinese herbal compound to be optimized and the corresponding disease symptoms;

[0148] The prediction module 302 is used to predict the optimized Chinese herbal compound based on the target information using the Chinese herbal compound optimization model; wherein the Chinese herbal compound optimization model includes a variational autoencoder and a noise embedding module.

[0149] In some optional implementations, the prediction module 302 includes:

[0150] The vector conversion unit is used to determine the Chinese medicine efficacy word vector, disease symptom word vector and Chinese medicine compound matrix based on the target information; this includes: using the m3e-base model to encode the Chinese medicine efficacy into the Chinese medicine efficacy word vector of preset dimensions, and encoding the disease symptoms into the disease symptom word vector of preset dimensions; using unique hot encoding to represent the Chinese medicine composition of the Chinese medicine compound to obtain the Chinese medicine compound matrix of the corresponding dimension.

[0151] The encoding unit feeds the Chinese medicine efficacy word vector and the disease symptom word vector into the encoder of the variational autoencoder to obtain the extracted first feature data;

[0152] A data enhancement unit, configured to input the first feature data into a noise embedding module for noise reduction to obtain second feature data after noise reduction;

[0153] The decoding unit is used to fuse the traditional Chinese medicine compound matrix, the first feature data and the second feature data and send them into the decoder of the variational autoencoder to obtain an optimized traditional Chinese medicine compound.

[0154] In some optional embodiments, the encoding unit is also used to splice the Chinese medicine efficacy word vector and the disease symptom word vector to determine the spliced ​​tensor; based on the tensor, determine the feature mean and the feature logarithmic variance; based on the feature mean and the feature logarithmic variance, determine the first feature data.

[0155] In some optional embodiments, the data enhancement unit is also used to randomly generate noise that obeys a standard normal distribution; perform addition and subtraction operations on the noise and the first feature data, respectively, to obtain addition feature data and subtraction feature data; perform convolution operations on the addition feature data and the subtraction feature data, respectively, and add the convolution operation results to obtain intermediate feature data; and determine the second feature data based on the intermediate feature data.

[0156] This embodiment provides a Chinese medicine compound optimization model training device, which includes:

[0157] an acquisition unit, configured to acquire a training sample, wherein the training sample includes a Chinese herbal compound from which one Chinese herbal medicine of the original Chinese herbal compound is removed;

[0158] A training unit is configured to train the TCM compound optimization model to be trained using the training samples to obtain the TCM compound optimization model used in the method described in any of the above embodiments; wherein the excluded TCM herbs are used as labels during the training process. The system also includes a diffusion model based on a dual attention mechanism, configured to further extract features from the first feature data output by the encoder of the variational autoencoder and generate new training samples based on the extracted features.

[0159] The Chinese medicine compound optimization system in this embodiment is presented in the form of functional units, where the units refer to ASIC circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0160] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0161] An embodiment of the present invention further provides a computer device having the above-mentioned Chinese medicine compound optimization system and Chinese medicine compound optimization model training system.

[0162] See also Figure 4 , Figure 4 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.

[0163] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0164] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0165] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0166] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0167] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0168] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0169] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0170] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for optimizing a traditional Chinese medicine compound, characterized in that: The method comprises: Acquiring target information, wherein the target information includes the traditional Chinese medicine compound to be optimized and the corresponding disease symptoms; Based on the target information, using a traditional Chinese medicine compound optimization model, predicting an optimized traditional Chinese medicine compound; Among them, the Chinese medicine compound optimization model includes a variational autoencoder and a noise embedding module.

2. The method according to claim 1, characterized in that The target information also includes: the Chinese medicine efficacy corresponding to the Chinese medicine compound.

3. The method according to claim 2, characterized in that The method of using a Chinese medicine compound optimization model based on the target information to predict an optimized Chinese medicine compound comprises: Based on the target information, determining a Chinese medicine efficacy word vector, a disease symptom word vector, and a Chinese medicine compound matrix; Sending the Chinese medicine efficacy word vector and the disease symptom word vector into the encoder of the variational autoencoder to obtain the extracted first feature data; Inputting the first feature data into the noise embedding module for noise reduction to obtain second feature data after noise reduction; The Chinese herbal compound matrix and the second feature data are fused and sent to the decoder of the variational autoencoder to obtain an optimized Chinese herbal compound.

4. The method according to claim 3, characterized in that The step of feeding the Chinese medicine efficacy word vector and the disease symptom word vector into the encoder of the variational autoencoder to obtain the extracted first feature data includes: Concatenating the Chinese medicine efficacy word vector and the disease symptom word vector to determine a concatenated tensor; Determine a feature mean and a feature logarithmic variance based on the tensor; The first feature data is determined based on the feature mean and the feature logarithmic variance.

5. The method according to claim 3, characterized in that The step of inputting the first feature data into the noise embedding module for noise reduction to obtain the noise-reduced second feature data includes: Randomly generate noise that follows a standard normal distribution; Performing addition and subtraction operations on the noise and the first characteristic data respectively to obtain addition characteristic data and subtraction characteristic data; performing convolution operations on the addition feature data and the subtraction feature data respectively, and adding the convolution operation results to obtain intermediate feature data; Based on the intermediate feature data, the second feature data is determined.

6. The method according to claim 3, characterized in that Using the m3e-base model, the efficacy of the traditional Chinese medicine is encoded into the traditional Chinese medicine efficacy word vector of a preset dimension, and the disease symptoms are encoded into the disease symptom word vector of a preset dimension; The Chinese herbal medicine composition of the Chinese herbal compound is characterized by one-hot encoding to obtain the Chinese herbal compound matrix of the corresponding dimension.

7. A method for training a traditional Chinese medicine compound optimization model, characterized in that: The method comprises: Acquire a training sample, wherein the training sample includes a traditional Chinese medicine compound from which one traditional Chinese medicine in the original traditional Chinese medicine compound is removed; The training samples are used to train the Chinese herbal compound optimization model to be trained, thereby obtaining the Chinese herbal compound optimization model used in the method described in any one of claims 1 to 6; wherein, the excluded Chinese herbal medicines are used as labels during the training process.

8. The method according to claim 7, characterized in that The Chinese medicine compound optimization model to be trained also includes: A diffusion model based on a dual attention mechanism is used to re-extract features from the first feature data output by the encoder of the variational autoencoder, and generate new training samples based on the re-extracted features.

9. A Chinese medicine compound optimization system, characterized in that: The system comprises: An acquisition module is used to acquire target information, wherein the target information includes the traditional Chinese medicine compound to be optimized and the corresponding disease symptoms; A prediction module is used to predict an optimized Chinese herbal compound based on the target information using a Chinese herbal compound optimization model; wherein the Chinese herbal compound optimization model includes a variational autoencoder and a noise embedding module.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the Chinese medicine compound optimization method described in any one of claims 1 to 6, or the Chinese medicine compound optimization model training method described in any one of claims 7 to 8 by executing the computer instructions.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the Chinese medicine compound optimization method described in any one of claims 1-6, or execute the Chinese medicine compound optimization model training method described in any one of claims 7-8.

12. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the Chinese medicine compound optimization method according to any one of claims 1 to 6, or to execute the Chinese medicine compound optimization model training method according to any one of claims 7 to 8.