A natural medicine year identification method based on simulated annealing algorithm

Optimizing the machine learning classifier through simulated annealing algorithm, the problems of low accuracy and poor generalization of year identification of natural drugs in traditional methods are solved, efficient and accurate year identification is achieved, and markers for drug efficacy research are provided.

CN120412805BActive Publication Date: 2025-08-26JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510906085.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-26
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

Traditional natural drug year identification methods rely on manual experience and chemical detection, which are subjective and inefficient. Traditional classification algorithms have low accuracy and poor generalization in high-throughput data processing, making it difficult to effectively identify natural drug years.

Method used

The machine learning classifier is optimized by using a simulated annealing algorithm, and the optimal gene combination is selected iteratively, and the natural drug year identification model is constructed. The F1 value of the simulated annealing algorithm is used as the objective function to gradually improve the classifier performance and use the optimal gene combination as the year identification marker.

Benefits of technology

It improves the accuracy and generalization of year identification of natural drugs, provides reliable year identification methods, and gene combinations can be used as markers for pharmacodynamic efficacy research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120412805B_ABST
    Figure CN120412805B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for identifying the vintage of natural medicines based on a simulated annealing algorithm, belonging to the field of drug analysis technology. The method comprises the following steps: obtaining raw data, the raw data including the expression spectrum of the action of the natural medicine and the vintage label; constructing a classifier, the input of the classifier being a gene combination and the output being the vintage; using the F1 value of the classifier as the objective function value of the simulated annealing algorithm, and continuously selecting the optimal gene combination through multiple iterations of the simulated annealing algorithm, thereby gradually improving the performance of the classifier and obtaining an optimal classification model. The genes incorporated into the optimal classification model can be used as markers for identifying the vintage of the natural medicine. The natural medicine is identified using the markers and the optimal classification model to obtain the corresponding vintage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of natural medicine efficacy analysis, and in particular relates to a natural medicine year identification method based on a simulated annealing algorithm. Background Art

[0002] Natural medicinal herbs have complex chemical compositions, and their quality and efficacy are often affected by multiple factors, including growth environment, harvest time, and storage conditions. Age is a key factor affecting the quality of natural medicinal herbs. Natural medicinal herbs of different ages can exhibit significant differences in active ingredient content, secondary metabolite types, and pharmacological effects. Therefore, accurate identification of the age of natural medicinal herbs is crucial for quality control, traceability, and application. Traditional methods for age identification rely primarily on manual experience and sensory testing, combined with preliminary analysis using chemical assays such as thin-layer chromatography and high-performance liquid chromatography. However, these methods suffer from high subjectivity, low efficiency, and difficulty in rapidly analyzing large numbers of samples. With the rapid development of data mining and machine learning technologies in recent years, identification based on transcriptomes derived from high-throughput sequencing has become feasible. However, traditional classification algorithms suffer from low accuracy, poor generalization, and a tendency to overfit when classifying natural medicinal herbs, making them ineffective for effectively identifying the age of these natural medicinal herbs. Therefore, a natural medicinal age identification algorithm suitable for high-throughput data is urgently needed. Summary of the Invention

[0003] In order to solve the above technical problems, the present invention proposes a natural medicine year identification method based on a simulated annealing algorithm to solve the problems existing in the above-mentioned prior art.

[0004] To achieve the above object, the present invention provides a method for identifying the age of natural medicines based on a simulated annealing algorithm, comprising:

[0005] Obtaining raw data, wherein the raw data includes an action transcriptome of a natural drug and a corresponding year classification label, wherein the action transcriptome includes a plurality of genes;

[0006] Constructing a classifier, wherein the input of the classifier is a gene combination and the output is a year;

[0007] Iteratively combining genes using a simulated annealing algorithm to obtain gene combinations in different iterative processes, optimizing the classifier using the gene combinations in different iterative processes and corresponding year classification labels to obtain different optimized classifiers, and taking the maximum F1 value of the classifier as the goal to obtain the optimal gene combination, wherein the gene combination is used as a marker for the year identification of natural medicines;

[0008] Natural medicines are identified based on the markers and classification models for natural medicine year identification to obtain the corresponding years of the natural medicines.

[0009] Optionally, the process of obtaining the original data includes:

[0010] Obtain the action transcriptome of the same natural medicine in different years, and use the year as a classification label. The action transcriptome contains different genes.

[0011] Genes with an expression level of 0 in any sample in the action transcriptome are removed to obtain a processed natural drug action transcriptome.

[0012] Optionally, the classifier adopts a machine learning classifier.

[0013] Optionally, the process of iteratively screening the effector genes using the simulated annealing algorithm includes:

[0014] Constructing an initial solution, wherein the initial solution is a one-hot vector of a randomly generated gene combination, wherein each element in the one-hot vector corresponds to a gene, and when the element is 1, it indicates that the corresponding gene is used as the input of the classifier, and when the element is 0, it indicates that the corresponding gene is not used as the input of the classifier, and obtaining the gene combination according to the one-hot vector;

[0015] Construct a machine learning classifier for classification, input the gene combination and year classification label into the classifier for training and testing, and obtain the classifier's F1 value as the objective function value;

[0016] Randomly generate a new solution from the neighborhood of the current solution;

[0017] Input the gene combination and year classification label corresponding to the new solution into the classifier, obtain the objective function value of the new solution, and calculate the difference between the objective function values ​​corresponding to the current solution and the new solution;

[0018] The probability is obtained based on the difference between the current solution and the new solution, and the probability is used to determine whether to accept the new solution. If the new solution is accepted, the new solution is used as the current solution. If the new solution is not accepted, the current solution remains unchanged, and a new solution is generated based on the current solution. The objective function value generation, difference and probability calculation, and the determination of whether to accept the new solution are repeated.

[0019] During the repetition process, the temperature is updated using the cooling rate;

[0020] Determine whether the current temperature meets the termination condition. If so, terminate the algorithm and obtain the optimal solution, where the gene combination corresponding to the optimal solution is the optimal gene combination; if not, continue iterating.

[0021] Optionally, the corresponding gene combination in the optimal solution is input into the corresponding classifier to obtain the final year identification model.

[0022] Optionally, the process of screening the initial solution and the new solution includes:

[0023] Calculate the usage probability based on the judgment index and temperature:

[0024]

[0025] Where P is the probability, is the difference between the objective function values ​​corresponding to the current solution and the new solution, T represents temperature, e represents a natural constant, and whether to use the new solution to replace the current solution is determined based on probability.

[0026] Optionally, the process of adjusting the temperature includes:

[0027] In each iteration, the temperature is adjusted by decreasing the temperature by a fixed ratio. Compared with the prior art, the present invention has the following advantages and technical effects:

[0028] Traditional classification algorithms suffer from low accuracy, poor generalization, and susceptibility to overfitting when handling natural medicine classification tasks. Therefore, there is an urgent need to propose a natural medicine year identification algorithm suitable for high-throughput data. To address these issues, the present invention combines a traditional machine learning classification model with an intelligent optimization algorithm (simulated annealing algorithm). By using the classifier's F1 value as the objective function value of the simulated annealing algorithm and continuously selecting the optimal feature (gene) combination through multiple iterations, the classifier's performance can be gradually improved. In addition, the genes incorporated into the final classification model can also be used as markers for natural medicine year identification, allowing for further research into the pharmacological effects of natural medicines. This present invention introduces the simulated annealing algorithm into natural medicine year identification for the first time. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0030] Figure 1 This is a classification effect diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0031] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0032] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] To achieve the above object, the present invention provides a method for identifying the age of natural medicines based on a simulated annealing algorithm, comprising the following steps:

[0034] S1. Obtaining raw data, i.e., the action transcriptome data of natural drugs and corresponding year labels, wherein the action transcriptome includes different genes;

[0035] S2. constructing a classification model, wherein the classifier input is a gene expression profile and the output is a year label, wherein the gene data includes all or part of the genes in the above-mentioned transcriptome; and defining an objective function based on an indicator for measuring the accuracy of the classification model;

[0036] S3. Construct an initial solution and basic parameters, where the "solution" in the initial solution and subsequent new solutions is a one-hot vector, where each element in the one-hot vector corresponds to a gene. When the element in the one-hot vector is 1, the corresponding gene is input, and when the element is 0, it means that the corresponding gene is not input.

[0037] S4, independently and randomly adjust the elements in the initial solution to generate a new solution;

[0038] S5. Extract the genes corresponding to the initial solution and the new solution, and extract the corresponding genes from the original data, respectively train and test the classification model to obtain the accuracy index of the classification model, and calculate the objective function value based on the above index;

[0039] S6. Calculate the judgment index based on the objective function value;

[0040] S7. Determine whether to accept the new solution, or whether to use the new solution to replace the initial solution, based on the judgment indicator;

[0041] S8, cooling down the temperature data in the current iteration process;

[0042] S9, based on the accepted solution, repeat the above steps S4-S8 until the maximum number of iterations is reached, and terminate the algorithm;

[0043] S10, obtain the classifier of the last training and testing (optimal classifier);

[0044] S11. Extract the genes corresponding to the solution of the last iterative process to obtain the final markers.

[0045] S12. Input the markers into the optimal classifier to identify the year of the current natural medicine.

[0046] In step S1, the raw data is the transcriptome (FPKM value) of the same natural medicine in different years, as well as the classification label corresponding to each sample, where the classification label is the year. Genes with an expression level of 0 in any sample are deleted.

[0047] In step S2, the process of defining the objective function includes: selecting and building a machine learning classifier for classification, taking some or all genes as input and year as output, inputting the features (genes) and labels selected by the machine learning classifier into the classifier for training and testing, and calculating the F1 value in the test set. The objective function of the machine learning classifier algorithm is As shown in the following formula.

[0048]

[0049] In step S2, k-fold cross validation is used for training and testing.

[0050] In step S3, setting the initial solution and basic parameters includes: the initial solution defines a one-hot vector , each element corresponds to a feature (gene). If the value of the element is 1, it indicates that the feature is selected, and if the value is 0, it indicates that the feature is not selected. That is the initial solution . Set the initial temperature according to the specific situation , cooling rate , maximum number of iterations, and minimum temperature .

[0051] In step S4, generating a new solution includes: A new solution is randomly generated in the neighborhood of The methods of generating new solutions include the following: Randomly in the original solution Add a new element to the solution, or delete an existing element in the original solution. That is, randomly select the vector , and update the value as follows:

[0052]

[0053] In step S6, the energy difference is used as a judgment indicator, and the energy difference is calculated including: and new solutions Enter the objective function separately , and calculate the energy difference :

[0054]

[0055] In step S7, determining whether to accept the new solution includes: using the probability Decide whether to accept the new solution:

[0056]

[0057] like , then directly accept the new solution (that is, the new solution is better); if , then accept the new solution with a certain probability (to avoid falling into the local optimum).

[0058] In step S7, updating the current solution and iterating includes: if the new solution is accepted, then If not accepted, no action is taken. Iterate the steps from "generate new solution" to "update current solution" until the maximum number of iterations for the current temperature is reached.

[0059] In step S8, cooling includes: using a cooling rate Update temperature:

[0060]

[0061] In step S9, the termination algorithm includes: determining whether the current temperature is lower than , if satisfied, the algorithm can be terminated and the optimal solution can be obtained .

[0062] In step S10, obtaining the year identification model includes: The corresponding one-hot vector The final year identification model can be obtained by training and testing the selected classifier based on the above.

[0063] In step S11, obtaining the markers includes: the genes incorporated into the final identification model are the markers for the year identification of natural medicines.

[0064] The technical effects of the present invention are:

[0065] Traditional classification algorithms suffer from low accuracy, poor generalization, and susceptibility to overfitting when handling natural medicine classification tasks. Therefore, there is an urgent need to develop a natural medicine year identification algorithm suitable for high-throughput data. To address these issues, the present invention combines a traditional machine learning classification model with an intelligent optimization algorithm (simulated annealing algorithm). By using the classifier's F1 value as the objective function value of the simulated annealing algorithm and continuously selecting the optimal feature (gene) combination through multiple iterations, the classifier's performance can be gradually improved. Furthermore, the genes incorporated into the final classification model can also serve as markers for natural medicine year identification. Using these markers and the final classification model, the current natural medicine is identified, and the corresponding year is obtained for further research on the efficacy of natural medicines. This present invention introduces the simulated annealing algorithm for natural medicine year identification for the first time.

[0066] Example 1

[0067] Step 1: Data acquisition and preprocessing

[0068] The data source is ginseng transcriptome data from 5, 10, and 15 years of age, with 20 samples in each year, for a total of 60 samples. The original data included 60,483 genes, and after deleting genes with zero expression in any sample, 14,129 genes remained.

[0069] Step 2: Calculate the objective function value

[0070] This example uses a random forest classifier. The features (genes) and labels selected by the algorithm are input into the classifier. Five-fold cross-validation is used for training and testing. The mean F1 value of the test set after the five-fold cross-validation is substituted into the following formula as the objective function value. Note that the random forest classifier is implemented using the RandomForestClassifier() function in the Python package sklearn.

[0071]

[0072] Step 3: Set the initial solution and basic parameters

[0073] Randomly generate a one-hot vector of length 14129 , the vector That is the initial solution Initial temperature Set to 1, cooling rate Set to 0.95, the maximum number of iterations is set to 1000, and the minimum temperature Set to 0.001.

[0074] Step 3: Generate new solution

[0075] Randomly select the original solution The corresponding vector , and update the value as follows:

[0076]

[0077] A new solution is obtained .

[0078] Step 4: Calculate the energy difference

[0079] The current solution and new solutions The selected features (genes) are input into the random forest classifier, and the objective function values ​​are calculated after training and testing. (corresponding to the original solution) and (corresponding to the new solution), and calculate the energy difference .

[0080] Step 5: Decide whether to accept the new solution

[0081] According to step 4 The calculation results, using the probability Decide whether to accept the new solution:

[0082]

[0083] If , then directly accept the new solution (that is, the new solution is better); if , then the new solution is accepted with a certain probability.

[0084] Step 6: Update the current solution and iterate

[0085] If we accept the new solution, then If not accepted, no action is taken. Iterate steps 3 to 6 until the maximum number of iterations (1000) for the current temperature is reached.

[0086] Step 7: Cool down

[0087] Use cooling rate Update the temperature, that is:

[0088]

[0089] Step 8: Iteration

[0090] Iterate steps three to seven in sequence.

[0091] Step 9: Terminate the algorithm

[0092] Determine whether the current temperature is lower than 0.001. If so, terminate the algorithm and obtain the optimal solution. .

[0093] Step 10: Obtain the year identification model

[0094] The optimal solution The corresponding one-hot vector The gene expression data selected in the experiment are input into the random forest classifier to obtain the final year identification model.

[0095] Step 11: Obtain the marker

[0096] The genes incorporated into the final identification model serve as markers for identifying ginseng vintages.

[0097] Example 2

[0098] Using the natural medicine year identification method based on the simulated annealing algorithm in Example 1, data analysis was performed on the transcriptome data of ginseng aged 5, 10, and 15 years, specifically including the following steps:

[0099] (1) Data acquisition and preprocessing

[0100] We obtained transcriptome data for 5-, 10-, and 15-year-old ginseng samples and deleted genes with zero expression in any sample. This left a total of 14,129 genes and 60 samples. Partial data is shown in Table 1.

[0101] Table 1

[0102] Gene S5_1 S5_2 S10_1 S10_2 S15_1 S15_2 TIPARP 1.442899976 1.294927794 1.554962117 1.168989533 1.282156308 1.659845008 CDK1 1.131204176 0.636650855 1.659815295 1.023592546 1.037992828 0.288226256 HDGFRP3 1.720082785 1.895511729 2.717704393 1.40827073 2.641793011 1.057333927 HDGFRP3 52.60542014 49.68527062 49.13237631 46.15904297 42.91889396 50.73806772 ME2 9.087200891 8.101595392 10.93255817 9.063765544 8.599259711 6.418368663 DNAJC10 10.95769212 27.01096078 13.56007685 10.94701442 9.264855282 16.46421654 ENOSF1 5.768394481 8.844804396 7.607161159 5.171136843 8.70527512 5.654322025

[0103] (2) Calculate the objective function value

[0104] The features (genes) and labels selected by the algorithm are input into the random forest, and five-fold cross validation is used for training and testing. The mean of the test set after five-fold cross validation is used as the objective function value.

[0105] (3) Set the initial solution and basic parameters

[0106] Randomly generate a one-hot vector of length 14129 , the vector That is the initial solution Initial temperature Set to 1, cooling rate Set to 0.95, the maximum number of iterations is set to 1000, and the minimum temperature Set to 0.001.

[0107] (4) Generate new solutions

[0108] Randomly select the original solution The corresponding vector , and update the value as follows:

[0109]

[0110] A new solution is obtained .

[0111] (5) Calculate the energy difference

[0112] The current solution and new solutions The selected features (genes) are input into the random forest classifier, and the objective function values ​​are calculated after training and testing. (set to 0.3) and (set to 0.28), and calculate the energy difference .

[0113] (6) Decide whether to accept the new interpretation

[0114] From step 4 The calculation results are: , so we accept the new interpretation.

[0115] Step 6: Update the current solution and iterate

[0116] make Iterate steps three to six until the maximum number of iterations (1000) for the current temperature is reached.

[0117] (7) Cooling

[0118] Update the temperature using the following formula:

[0119]

[0120] (8) Iteration

[0121] Iterate steps three to seven in sequence.

[0122] (9) Termination algorithm

[0123] Determine whether the current temperature is lower than 0.001. If so, terminate the algorithm and obtain the optimal solution. .

[0124] (10) Obtaining the year identification model

[0125] The optimal solution The corresponding one-hot vector Input into the random forest classifier, and the final year identification model can be obtained. The ROC curve of the year identification model is as follows Figure 1 As shown, the F1 value is 0.92. Figure 1In the figure, the blue straight line, orange broken line and green dotted line represent different classes (labels of different test sets): ROC curves of class 0, class 1 and class 2. The AUC values ​​corresponding to the above different classes (the higher the AUC value, the higher the authenticity of the method, which means more accurate) are 0.98, 0.98 and 0.99 respectively. Figure 1 The gray broken line in the figure represents the diagonal line, which serves as the baseline of the ROC curve. The farther away from the diagonal line, the higher the accuracy of the prediction.

[0126] (11) Obtaining a marker

[0127] The genes included in the final identification model were taken out, and the markers for ginseng year identification were obtained as follows: MXD4, STOML1, RFC1, TAPBP, TSPAN6, CCNA2, CAPRIN1, AKTIP, RASA1, PPFIA1, GLYAT, HCFC1R1, PRMT2, DDIT3, MSMO1, MAPK9, CXCL6, CYP2C19, DONSON, YY1, ZMYND11, PIP5K1A, DNAJC10, PMP22, and JUND.

[0128] The above are merely preferred embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for identifying the age of natural medicines based on a simulated annealing algorithm, characterized in that: include: Obtaining raw data, wherein the raw data includes an action transcriptome of a natural drug and a corresponding year classification label, wherein the action transcriptome includes a plurality of genes; Constructing a classifier, wherein the input of the classifier is a gene combination and the output is a year; Iteratively combining genes using a simulated annealing algorithm to obtain gene combinations in different iterative processes, optimizing the classifier using the gene combinations in different iterative processes and corresponding year classification labels to obtain different optimized classifiers, and taking the maximum F1 value of the classifier as the goal to obtain the optimal gene combination, wherein the gene combination is used as a marker for the year identification of natural medicines; Identify natural medicines based on the markers and classification model for natural medicine year identification and obtain the corresponding years of natural medicines; The process of iteratively combining genes through the simulated annealing algorithm includes: Constructing an initial solution, wherein the initial solution is a one-hot vector of a randomly generated gene combination, wherein each element in the one-hot vector corresponds to a gene, and when the element is 1, it indicates that the corresponding gene is used as the input of the classifier, and when the element is 0, it indicates that the corresponding gene is not used as the input of the classifier, and obtaining the gene combination according to the one-hot vector; Construct a machine learning classifier for classification, input the gene combination and year classification label into the classifier for training and testing, and obtain the classifier's F1 value as the objective function value; Randomly generate a new solution from the neighborhood of the current solution; Input the gene combination and year classification label corresponding to the new solution into the classifier, obtain the objective function value of the new solution, and calculate the difference between the current solution and the new solution; The probability is obtained based on the difference between the current solution and the new solution, and the probability is used to determine whether to accept the new solution. If the new solution is accepted, the new solution is used as the current solution. If the new solution is not accepted, the current solution remains unchanged, and a new solution is generated based on the current solution. The objective function value generation, difference and probability calculation, and the determination of whether to accept the new solution are repeated. During the repetition process, the temperature is updated using the cooling rate; Determine whether the current temperature meets the termination condition. If so, terminate the algorithm and obtain the optimal solution, where the gene combination corresponding to the optimal solution is the optimal gene combination; if not, continue iterating.

2. The method according to claim 1, characterized in that The process of obtaining the original data includes: Obtain the action transcriptome of the same natural medicine in different years, and use the year as a classification label. The action transcriptome contains different genes. Genes with an expression level of 0 in any sample in the action transcriptome are removed to obtain a processed natural drug action transcriptome.

3. The method according to claim 1, characterized in that The classifier adopts a machine learning classifier.

4. The method according to claim 1, wherein The corresponding gene combination in the optimal solution is input into the corresponding classifier to obtain the final year identification model.

5. The method according to claim 1, characterized in that The process of screening the initial solution and the new solution includes: Calculate the usage probability based on the judgment index and temperature: Where P is the probability, is the difference between the objective function values ​​corresponding to the current solution and the new solution, T represents temperature, e represents a natural constant, and whether to use the new solution to replace the current solution is determined based on probability.

6. The method according to claim 1, characterized in that The process of adjusting the temperature includes: During each iteration, the temperature is adjusted by decreasing it by a fixed percentage.

Citation Information

Patent Citations

  • Selection method for subintervals of near infrared spectral characteristics based on simulated annealing-genetic algorithm

    CN101832909A

  • Phishing website detection method fusing optimal artificial features and depth features

    CN115618300A