Traditional Chinese medicinal material component detection and evaluation method and device based on artificial intelligence

Through the generation adversarial network, chaos optimization algorithm and quantum state evolution multi-layer extreme learning machine algorithm using dual strategies in the detection and analysis of Chinese medicinal materials, the lack of model generalization ability and efficiency in processing high-dimensional nonlinear data in the existing technology is solved. The problem of poor accuracy significantly improves the efficiency and accuracy of detection.

CN119418803AActive Publication Date: 2025-02-11YUNNAN AGRICULTURAL UNIVERSITY

Patent Information

Application Number
CN202411499254.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-11
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

The existing artificial intelligence-based Chinese medicinal ingredients detection and analysis methods have problems such as insufficient data expansion methods, the model is susceptible to gradient disappearance, gradient explosion, local optimal solution limit model performance, and poor classification efficiency and accuracy when processing high-dimensional nonlinear data. .

Method used

The generative adversarial network model based on dual strategy is used for data expansion, the feature extraction model is trained in combination with the chaotic optimization algorithm, and the classifier model is trained using the multi-layer extreme learning machine algorithm for quantum state evolution to improve the generalization ability and performance of the model.

Benefits of technology

Through data expansion, optimization of feature extraction model and training of classifier model, the efficiency and accuracy of Chinese medicinal materials are significantly improved, and the problems of insufficient generalization capabilities of the model and poor efficiency and accuracy when processing high-dimensional nonlinear data are solved. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418803A_ABST
    Figure CN119418803A_ABST
Patent Text Reader

Abstract

The invention discloses a traditional Chinese medicinal material component detection and evaluation method and device based on artificial intelligence, and can effectively solve the problem of insufficient data processing, thereby remarkably improving the efficiency and accuracy of traditional Chinese medicinal material component detection. The method comprises the following steps: data acquisition and storage: acquiring component data of traditional Chinese medicinal materials, and storing the component data in a structured json format; the component data comprises chemical component concentration, spectral characteristic intensity, chromatographic peak value, biological activity index, moisture content, ash content, heavy metal content and organic acid content; data expansion: performing data expansion based on a dual strategy generative adversarial network model; training of a feature extraction model: inputting the expanded data into the feature extraction model for training of the feature extraction model, wherein the feature extraction model is obtained by training based on a neural network algorithm of chaos optimization; classifier model training: inputting the data after feature extraction into a classifier model for classifier training, wherein the classifier model is obtained by training based on a multi-layer extreme learning machine algorithm of quantum state evolution; and traditional Chinese medicine component detection and evaluation: carrying out traditional Chinese medicine component detection and evaluation by utilizing the trained model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electrical data processing technology, and in particular to a method and device for detecting and evaluating components of traditional Chinese medicine based on artificial intelligence. Background Art

[0002] Due to the complex chemical composition and efficacy of Chinese medicinal materials, traditional Chinese medicinal material component detection and analysis methods often face problems such as low detection efficiency, limited accuracy, and insufficient data processing capabilities. In addition, the quality assessment of Chinese medicinal material components is crucial to ensure efficacy and drug safety, but existing technologies are often unable to effectively process large-scale or complex data, resulting in limited reliability of analysis results.

[0003] With the development of artificial intelligence technology, especially the widespread application of deep learning and machine learning, new solutions are provided to meet these challenges. Therefore, the development of a device integrating advanced data acquisition, storage, processing and analysis technologies can significantly improve the efficiency and accuracy of Chinese herbal medicine component detection, which is of great significance for promoting the modernization and standardization of Chinese medicine.

[0004] In the existing AI-based Chinese medicinal materials component analysis solutions, there are the following problems: 1. Data expansion methods lack effective means to deal with the problem of insufficient training data, resulting in insufficient model generalization ability; 2. Traditional neural networks are susceptible to gradient vanishing and gradient exploding, or fall into local optimal solutions, limiting the improvement of model performance; 3. When existing classifiers process high-dimensional nonlinear data, common learning machine algorithms fail to fully utilize the potential characteristics of the data, resulting in poor classification efficiency and accuracy. Summary of the invention

[0005] In order to overcome the technical defects of insufficient generalization ability of the above-mentioned model, limited model performance, and poor efficiency and accuracy in processing high-dimensional nonlinear data, a method and device for detecting and evaluating Chinese medicinal materials ingredients based on artificial intelligence are provided in the embodiments of the present application.

[0006] In the first aspect, the present application provides a method for detecting and evaluating components of Chinese medicinal materials based on artificial intelligence, and the specific scheme is as follows:

[0007] S1. Data collection and storage: Collect the ingredient data of Chinese medicinal materials and store them in a structured JSON format;

[0008] Composition data include: chemical component concentration, spectral feature intensity, chromatographic peak, biological activity index, moisture content, ash content, heavy metal content and organic acid content;

[0009] S2. Data expansion: Data expansion based on the generative adversarial network model of the dual strategy;

[0010] S3. Feature extraction model training: The expanded data is input into the feature extraction model for feature extraction model training. The feature extraction model is trained based on the chaotic optimization neural network algorithm.

[0011] S4, classifier model training: the data after feature extraction is input into the classifier model for classifier training. The classifier model is trained by a multi-layer extreme learning machine algorithm based on quantum state evolution;

[0012] S5. Detection and evaluation of Chinese medicinal materials ingredients: Use the trained model to detect and evaluate the components of Chinese medicinal materials.

[0013] Optionally, in a possible implementation manner of the first aspect, the generative adversarial network model includes a generator and a discriminator;

[0014] The training process of the generative adversarial network model based on the dual strategy in S2 specifically includes:

[0015] S2.1, initialize and set the parameters of the generator and discriminator;

[0016] S2.2. In each training cycle, the generator and discriminator are updated using a dual learning mechanism;

[0017] S2.3. Adjust the learning rate and weight control factor according to the results of the chaotic mapping to guide the generator and the discriminator to perform nonlinear exploration in the parameter space;

[0018] S2.4, evaluate the quality and diversity of the generated data, adjust the parameters of the chaotic map according to the evaluation results, optimize the generation process, and the generated data is generated by the generator.

[0019] S2.5. Increase the adversarial strength through multiple iterations to strengthen the discriminator and optimize the generator.

[0020] S2.6. Update the parameters of the generator and discriminator according to the adversarial strength and loss function to ensure that the generated data remains consistent under different operating conditions.

[0021] S2.7. Repeat the above steps S2.1-S2.6 until the preset stop iteration condition is met, which means that the model training is completed.

[0022] Optionally, in a possible implementation of the first aspect, in S2.3, the learning rate is dynamically adjusted according to the loss of the current iteration using a chaotic function that dynamically adjusts the loss parameters, so that the learning rate is adjusted more when the loss changes greatly, and remains relatively stable when the loss changes slightly.

[0023] Optionally, in a possible implementation of the first aspect, in S2.4, the parameters of the chaotic mapping are adjusted according to the evaluation results, including: determining whether the scores of the quality and diversity evaluation of the generated data are greater than a preset threshold, if so, stopping the iteration, otherwise continuing the iteration.

[0024] Optionally, in a possible implementation of the first aspect,

[0025] The training process of the neural network algorithm based on chaos optimization in S3 specifically includes:

[0026] S3.1, initialize the weights and biases of the neural network;

[0027] S3.2. During the training process, the output error of the neural network model is evaluated, and the learning rate is adjusted through the chaotic feedback mechanism. The weights are updated according to the updated learning rate to avoid overfitting or underfitting.

[0028] S3.3. During the training process, regularization strategies are used to prevent overfitting and ensure the generalization ability of the model. The regularization strategy is to perform regularization sparsification by dynamically adjusting the number of nodes in the hidden layer of the neural network.

[0029] S3.4. Repeat the above steps S3.1-S3.3 until the preset stop iteration condition is met, which means that the model training is completed.

[0030] Optionally, in a possible implementation of the first aspect,

[0031] The node adjustment step size of the hidden layer of the neural network depends on the function of the network level, which is calculated as follows:

[0032]

[0033] In the formula, Int cs ( ) is the rounding operation; α p is the influence coefficient of adjusting the adjustment step size; d p is the depth of the current network layer.

[0034] Optionally, in a possible implementation of the first aspect,

[0035] The training process of the multi-layer extreme learning machine algorithm based on quantum state evolution in S4 includes:

[0036] S4.1. Select the state of the initial qubit, assign a qubit to each input feature, and initialize it to the ground state;

[0037] S4.2. Perform quantum state evolution on each input feature and adjust the state of each qubit through a specific quantum logic gate to match the actual distribution of the input data.

[0038] S4.3. Use nonlinear activation functions to process data and increase the expressiveness of the model;

[0039] S4.4. Optimize the model weights using the quantum gradient descent algorithm;

[0040] S4.5. Repeat the above steps S4.1-S4.5 until the preset stop iteration condition is met, which means that the model training is completed.

[0041] Optionally, in a possible implementation of the first aspect,

[0042] In S4.2, the quantum state evolution is expressed as: U u (t) = exp(-iH u t / h); where U u (t) is the evolution operator at time t, H u is the Hamiltonian; the Hamiltonian contains the dynamics of the features themselves and the interactions between the features, simulating the coupling between the features.

[0043] Optionally, in a possible implementation of the first aspect,

[0044] In S4.4, the quantum gradient descent algorithm optimizes the loss function L in the model u The loss function based on cross entropy is adopted, which is expressed as: Where, L u is the loss function of the multi-layer extreme learning machine, yj 是 The label of the jth sample, is the momentum operator corresponding to the jth sample; λ p is the loss function regularization coefficient of the multi-layer extreme learning machine, is the qubit density matrix;

[0045] Assume the initial state of the qubit is After the quantum logic gate operation, the density matrix of the qubit is calculated using the noise operation, which is expressed as: In the formula, is the qubit density matrix before update, is the noise intensity parameter;

[0046] The updating method of the noise intensity parameter is expressed as: Where η p is the learning rate of the multi-layer extreme learning machine;

[0047] According to the loss function of the multi-layer extreme learning machine, the parameters of the multi-layer extreme learning machine are updated, and the update method is expressed as: Where ← is the parameter update operation, η uis the learning rate of the multi-layer extreme learning machine; G u is the quantum Fisher information matrix; is the loss function of the multilayer extreme learning machine with respect to the parameter θ u The gradient of θ u are the parameters of the multi-layer extreme learning machine;

[0048] The quantum Fisher information matrix makes gradient descent more efficient and stable by measuring the curvature of the parameter space. The calculation method is expressed as: In the formula, It is an expectation calculation, which represents the expectation of all possible states and is used to evaluate the average impact of parameter changes on the output probability distribution.

[0049] In a second aspect, an embodiment of the present application provides a Chinese herbal medicine component detection and evaluation device, comprising: a data acquisition unit, a data storage unit, a data expansion unit, a feature extraction unit, a classifier training unit and an evaluation unit;

[0050] The data acquisition unit is used to collect the component data of Chinese medicinal materials, including chemical component concentration, spectral characteristic intensity, chromatographic peak, biological activity index, moisture content, ash content, heavy metal content and organic acid content;

[0051] The data storage unit is used to: store the collected data in a structured JSON format;

[0052] The data expansion unit is used to: perform data expansion on the generative adversarial network model based on the dual strategy;

[0053] The feature extraction unit is used to: input the expanded data into the feature extraction model to train the feature extraction model, and the feature extraction model is trained based on the chaos optimization neural network algorithm;

[0054] The classifier training unit is used to: input the feature-extracted data into the classifier model for classifier training, and the classifier model is trained by a multi-layer extreme learning machine algorithm based on quantum state evolution;

[0055] The evaluation unit is used to: use the trained model to detect and evaluate the components of traditional Chinese medicine.

[0056] The above-mentioned technical scheme is adopted in the embodiments of the present application to achieve the following technical effects: firstly, training the generative adversarial network model based on the generative adversarial network algorithm of the dual strategy for data expansion can improve the generalization ability of the model; secondly, the parameters of the feature extraction model are optimized based on the chaos optimization algorithm and the weights of the model are dynamically adjusted and updated by the self-adjusting mechanism to improve the performance of the feature extraction model; finally, the classifier model is trained based on the multi-layer extreme learning machine algorithm of quantum state evolution to improve the classification efficiency and accuracy. Therefore, the improvements from the above three angles can effectively solve the problem of insufficient data processing, thereby significantly improving the efficiency and accuracy of the detection of Chinese medicinal materials ingredients. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0058] Figure 1 A flowchart of the method for detecting and evaluating components of Chinese medicinal materials based on artificial intelligence in this application;

[0059] Figure 2 A flowchart of the training process of the generative adversarial network model based on the dual strategy in this application;

[0060] Figure 3 A flow chart of the training process of the neural network algorithm based on chaos optimization in this application;

[0061] Figure 4 A flow chart of the training process of the multi-layer extreme learning machine algorithm based on quantum state evolution in this application;

[0062] Figure 5 A schematic diagram of the structure of the device for detecting and evaluating components of Chinese medicinal materials in this application;

[0063] Figure 6 A schematic diagram of the structure of a computer device in this application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0065] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0066] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.

[0067] The embodiments of the present application provide a method and device for detecting and evaluating components of Chinese medicinal materials based on artificial intelligence, which can overcome the technical defects of insufficient generalization ability of the above-mentioned model, limited model performance, and poor efficiency and accuracy in processing high-dimensional nonlinear data, effectively solve the problem of insufficient data processing and improve data processing capabilities, thereby significantly improving the efficiency and accuracy of Chinese medicinal material component detection.

[0068] To facilitate those skilled in the art to understand the technical solutions provided in the embodiments of the present application, the relevant technologies are described below:

[0069] Embodiment 1

[0070] See also Figure 1 The technical solution of the method for detecting and evaluating components of Chinese medicinal materials based on artificial intelligence in the embodiment of the present application is as follows:

[0071] S1. Data collection and storage: Collect the ingredient data of Chinese medicinal materials and store them in structured JSON format.

[0072] The composition data include: chemical composition concentration, spectral characteristic intensity, chromatographic peak, biological activity index, moisture content, ash content, heavy metal content and organic acid content.

[0073] Specifically, taking a specific data as an example, suppose there is a batch of ginseng samples, whose data attributes are as follows: Chemical component concentration C a =0.12mg / mL, spectral characteristic intensity I a =350unit, chromatographic peak P a =28unit, biological activity index B a =50unit, moisture content W a =12%, ash content A a =5%, heavy metal content Ma =0.002mg / kg, organic acid content O a =0.05mg / mL.

[0074] S2. Data augmentation: Data augmentation is performed based on the generative adversarial network model based on the dual strategy.

[0075] The generative adversarial network model consists of two parts: a generator and a discriminator. The task of the generator is to create synthetic data that is as close to the real Chinese herbal medicine inspection data as possible, while the task of the discriminator is to distinguish whether the input data is real or created by the generator. This application adopts a dual learning mechanism, allowing the generator and the discriminator to learn and adapt to each other during the training process, adjusting the learning path through chaotic mapping, increasing the exploratory nature of the training process, and thus avoiding falling into a local optimal solution.

[0076] S3. Feature extraction model training: The expanded data is input into the feature extraction model for training. The feature extraction model is trained based on a chaotic optimization neural network algorithm.

[0077] Specifically, the feature extraction model is obtained by adopting a 6-layer fully connected neural network architecture, and its specific structure is as follows: the first layer is a network with the same number of neurons as the original data features, the second layer is a network with 300 neurons, the third layer is a network with 300 neurons, the fourth layer is a network with 100 neurons, and the fifth layer is a network with 100 neurons.

[0078] S4. Classifier model training: The data after feature extraction is input into the classifier model for classifier training. The classifier model is trained by a multi-layer extreme learning machine algorithm based on quantum state evolution.

[0079] The above-mentioned multi-layer extreme learning machine algorithm based on quantum state evolution means that: the classifier model adopts the multi-layer extreme learning machine algorithm based on quantum state evolution as the classification model, and adopts the quantum state evolution strategy to expand the feature space of the model by simulating the super position state of quantum bits.

[0080] S5. Detection and evaluation of Chinese medicinal materials ingredients: Use the trained model to detect and evaluate the components of Chinese medicinal materials.

[0081] In one embodiment, the collected raw data is input into a trained feature extraction model for feature processing, and further, the processed features are input into a classifier model for classifier training to obtain classification results. In this embodiment, the classification categories include "high quality", "qualified", and "defective".

[0082] In the embodiments of the present application, firstly, a generative adversarial network model is trained based on a generative adversarial network algorithm of a dual strategy for data expansion to improve the generalization ability of the model; secondly, the parameters of the feature extraction model are optimized based on a chaotic optimization algorithm, and the weights of the model are dynamically adjusted and updated using a self-regulating mechanism to improve the performance of the feature extraction model; finally, the classifier model is trained based on a multi-layer extreme learning machine algorithm of quantum state evolution to improve classification efficiency and accuracy. Thus, improvements from the above three perspectives can effectively solve the problem of insufficient data processing, thereby significantly improving the efficiency and accuracy of detection of Chinese medicinal materials ingredients.

[0083] Implementation II

[0084] Next, the specific scheme of data expansion in the above-mentioned embodiment 1 is described. Specifically, the training process of the generative adversarial network model based on the dual strategy in S2 is as follows:

[0085] S2.1. Initialize the parameters of the generator and discriminator.

[0086] Let the generator be G c , the discriminator is D c In one embodiment, the method of initializing the parameters of the generative adversarial network is expressed as:

[0087]

[0088] In the formula, and are the parameters of the generator and discriminator respectively; σ() is the nonlinear function of parameter initialization; γ c is the diffusion coefficient set according to the chaotic map; randn() generates normally distributed random numbers; size() determines the dimension of the parameter.

[0089] S2.2. In each training cycle, the dual learning mechanism is used to update the generator and discriminator.

[0090] Specifically, the generator attempts to generate data X c,fake , while the discriminator tries to distinguish the real data X c,real And the generated data, training updates the parameters through the dual learning mechanism. The goal of the generator is to maximize the misclassification rate of the discriminator. The loss function calculation method of the generator and the discriminator is expressed as:

[0091]

[0092] In the formula, Z c is the input noise of the generator; is the loss function of the discriminator; is the loss function of the generator; N cis the number of samples in each batch; and denote the real and generated i-th data samples respectively.

[0093] S2.3. Adjust the learning rate and weight control factor according to the results of chaotic mapping to guide the generator and discriminator to perform nonlinear exploration in the parameter space.

[0094] Specifically, based on current losses and Adjust the learning rate η c and weight control factor λ c , the adjustment method is expressed as:

[0095]

[0096] In the formula, is the learning rate of the generative adversarial network at the t+1th iteration, is the learning rate of the generative adversarial network at the tth iteration; is the weight control factor of the generative adversarial network at the t+1th iteration, is the weight control factor of the generative adversarial network at the tth iteration; Ch( ) is a chaotic function that dynamically adjusts parameters according to the loss.

[0097] In one embodiment, a chaotic function using loss dynamic adjustment parameters is dynamically adjusted according to the loss of the current iteration, so that the learning rate is adjusted more when the loss changes greatly, and remains relatively stable when the loss changes slightly, thereby increasing the dynamic adaptive ability of the training. The calculation method is expressed as:

[0098]

[0099] Where K and V are parameters for adjusting the intensity and smoothness of the chaotic map.

[0100] S2.4. Evaluate the quality and diversity of the generated data, adjust the parameters of the chaotic mapping according to the evaluation results, and optimize the generation process.

[0101] Specifically, for the generated data X c,fake Quality and diversity assessment is performed, and the assessment method is expressed as:

[0102]

[0103] In the formula, is a sensitivity parameter to measure quality, M c is the number of samples considered in the evaluation, Qu( ) is the quality and diversity evaluation function of the generated data, and || || is the L2 norm.

[0104] Furthermore, it is determined whether the scores of the quality and diversity evaluation of the generated data are greater than a preset threshold. If so, the iteration is stopped, otherwise, the iteration is continued.

[0105] S2.5. Increase the adversarial strength through multiple iterations to strengthen the discriminator and optimize the generator.

[0106] Through multiple iterations, the adversarial strength can be increased to strengthen the discriminator's identification ability, while enabling the generator to be optimized under more difficult conditions, thereby improving the authenticity and complexity of the generated data.

[0107] Specifically, let the adversarial strength be α c , represents the learning rate of the generative adversarial network, and the calculation method is expressed as:

[0108]

[0109] In the formula, β and It is a parameter to adjust the growth rate and range of the confrontation intensity. is the adversarial strength of the t-th iteration, is the adversarial strength at the t+1th iteration.

[0110] S2.6. Update the parameters of the generator and discriminator according to the adversarial strength and loss function to ensure that the generated data remains consistent under different operating conditions.

[0111] Specifically, the parameter update method is expressed as:

[0112]

[0113] In the formula, and are the gradients of the generator and discriminator losses with respect to their parameters, respectively; and are the updated parameters of the generator and discriminator respectively.

[0114] S2.7. Repeat the above steps S2.1-S2.6 until the preset stop iteration condition is met, which means that the model training is completed.

[0115] In one embodiment, the preset condition for stopping iteration is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0116] In the technical solution of the embodiment of the present application, a generative adversarial network algorithm based on a dual strategy is used and the training method in the above steps S2.1-S2.7 is used for model training. Using the trained generative adversarial network model for data expansion can address the problem of insufficient model generalization ability caused by insufficient training data. The above training method effectively improves the discrimination ability of the discriminator and optimizes the performance of the generator, thereby improving the generalization ability of the model and improving the authenticity and complexity of the generated data.

[0117] Embodiment 3

[0118] Next, see Figure 3 The training process of the neural network algorithm based on chaos optimization in the embodiment of the present application is described, which specifically includes:

[0119] S3.1. Initialize the weights and biases of the neural network.

[0120] In one embodiment, the initialization method is expressed as:

[0121] W p,0 =μ p +σ p N(0,I); b p,0 =v p N(0,I);

[0122] Where W p,0 is the initial value of the neural network weight; b p,0 is the initial value of the bias of the neural network; μ p is the mean shift of the neural network weights; ν p is the mean shift of the weight bias of the neural network; σ P is the standard deviation of the weight initialization of the neural network; N(0, I) represents a normal distribution with a mean of 0 and a standard deviation of the identity matrix, and I is the identity matrix. Preferably, μ p Set to 0.01, v P Set to 0.05, σ P Set to 0.001.

[0123] S3.2. During the training process, the output error of the neural network model is evaluated, and the learning rate is adjusted through the chaotic feedback mechanism. The weights are updated according to the updated learning rate to avoid overfitting or underfitting.

[0124] Specifically, the dynamic update method of the self-adjusting learning rate is expressed as:

[0125] η p,t =η p,t-1 ·exp(-γ p ΔE p,t-1 );

[0126] Where η p,t is the learning rate of the neural network at the tth iteration; η p,t-1 is the learning rate of the neural network at the t-1th iteration; γ p It is the regulating factor of the neural network, controlling the sensitivity of the learning rate change; ΔE p,t-1 is the change in the error of the neural network in the previous cycle.

[0127] Furthermore, the weights are updated according to the updated learning rate, which is expressed as:

[0128]

[0129] Where W p,t is the weight of the neural network at the tth iteration; W p,t-1 is the weight of the neural network at the t-1th iteration; E p is the error of the neural network, which is calculated by the preset Softmax function on the output features of the last layer of the neural network; is the symbol of partial derivative.

[0130] S3.3. During the training process, regularization strategies are used to prevent overfitting and ensure the generalization ability of the model.

[0131] Specifically, regularized sparsity is performed by dynamically adjusting the number of nodes in the hidden layer of the neural network, which can be expressed as:

[0132] N p,t =N p,t-1 +sgn(ΔE p,t-1 )·β p ;

[0133] Where N p,t is the number of nodes in the hidden layer of the neural network at the tth iteration; N p,t-1 is the number of nodes in the hidden layer of the neural network at the t-1th iteration; β p is the node adjustment step size of the hidden layer of the neural network; sgn() is the sign function of the error change, which is used to decide whether to increase or decrease the number of nodes, that is, for sgn(ΔE p,t-1 ), when ΔE p,t-1 When sgn(ΔE p,t-1 ) is 1, when ΔE p,t-1 When sgn(ΔE p,t-1 ) is -1.

[0134] In one embodiment, the node adjustment step size of the hidden layer of the neural network depends on a function of the network level, and the calculation method is expressed as:

[0135]

[0136] In the formula, Int Cs () is the rounding operation; α p is the influence coefficient of adjusting the adjustment step size; d p is the depth of the current network layer. Preferably, d p The value is 6, α p Set to 2.5.

[0137] S3.4. Repeat the above steps S3.1-S3.3 until the preset stop iteration condition is met, which means that the model training is completed.

[0138] In one embodiment, the preset condition for stopping iteration is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0139] Some solutions in the prior art use neural networks for feature extraction. In some neural network structures, they may encounter problems such as gradient vanishing, gradient exploding, or falling into local optimal solutions, which will affect the stability of training and the performance of the model. In contrast, this application uses a chaos optimization algorithm to optimize the parameters of the neural network model to achieve the training of the neural network model. Specifically, this application uses a self-regulating mechanism to allow the network to dynamically adjust and update its weights according to the error of the previous training cycle, and utilizes the sensitivity in chaos theory to enhance the model's responsiveness to initial conditions and parameter changes.

[0140] Embodiment 4

[0141] Next, see Figure 4 The training process of the multi-layer extreme learning machine algorithm based on quantum state evolution in the embodiment of the present application is described, specifically including:

[0142] S4.1. Select the state of the initial qubit, assign a qubit to each input feature, and initialize it to the ground state.

[0143] Specifically, for each qubit corresponding to the input feature Initialization: Considering the complexity of Chinese herbal medicine component detection, the quantum state of each feature in the feature vector after feature extraction is Use Gaussian wave packet initialization, the initialization method is expressed as:

[0144]

[0145] In the formula, x is the position variable, and are the average position and extension of the qubit of the i-th feature, respectively, reflecting the distribution of the feature in the quantum state space.

[0146] S4.2. Perform quantum state evolution on each input feature and adjust the state of each quantum bit through specific quantum logic gates to match the actual distribution of the input data.

[0147] In one embodiment, the quantum state evolution is expressed as:

[0148] U n (t) = exp(-iH u t / h);

[0149] Where U u (t) is the evolution operator at time t, H u is the Hamiltonian.

[0150] In one embodiment, the Hamiltonian includes the dynamics of the feature itself and the interaction between the features, simulating the coupling between the features, and the calculation method is expressed as:

[0151]

[0152] In the formula, is the momentum operator corresponding to the ith feature, m is the mass, and k is the spring constant.

[0153] S4.3. Use nonlinear activation functions to process data and increase the expressive power of the model.

[0154] In one embodiment, the activation function performs data processing as follows:

[0155]

[0156] In the formula, α u is the coefficient that controls the strength of the nonlinearity; is the quantum state probability density, which indicates the probability of the existence of the i-th feature at a certain position; is a non-linear activation function.

[0157] Furthermore, the calculation method of the quantum state probability density is expressed as:

[0158] In the formula, represents the probability density at position x, which is the modulus square of the qubit state.

[0159] Furthermore, feature processing is performed through base state transformation, which is expressed as:

[0160] y u =H u x u ; In the formula, x u is the input vector, which represents the state of nodes in each layer; u is the output vector.

[0161] S4.4. Use the quantum gradient descent algorithm to optimize the model weights.

[0162] In one embodiment, the loss function L u The loss function based on cross entropy is adopted, which is expressed as:

[0163]

[0164] Where, L u is the loss function of the multi-layer extreme learning machine, y j is the label of the jth sample, is the momentum operator corresponding to the jth sample; λ p is the loss function regularization coefficient of the multi-layer extreme learning machine, is the qubit density matrix.

[0165] In one embodiment, let the initial state of the qubit be After the quantum logic gate operation, the density matrix of the qubit is calculated using the noise operation, which is expressed as:

[0166]

[0167] In the formula, is the qubit density matrix before update, is the noise intensity parameter.

[0168] Furthermore, the updating method of the noise intensity parameter is expressed as:

[0169]

[0170] Where n p is the learning rate of the multi-layer extreme learning machine.

[0171] Furthermore, according to the loss function of the multi-layer extreme learning machine, the parameters of the multi-layer extreme learning machine are updated, and the updating method is expressed as:

[0172]

[0173] Where ← is the parameter update operation, η u is the learning rate of the multi-layer extreme learning machine; G u is the quantum Fisher information matrix; is the loss function of the multilayer extreme learning machine with respect to the parameter θ u The gradient of θ u are the parameters of the multi-layer extreme learning machine.

[0174] In one embodiment, the quantum Fisher information matrix makes the gradient descent more efficient and stable by measuring the curvature of the parameter space. The calculation method is expressed as:

[0175]

[0176] In the formula, It is an expectation calculation, which represents the expectation of all possible states and is used to evaluate the average impact of parameter changes on the output probability distribution.

[0177] S4.5. Repeat the above steps S4.1-S4.5 until the preset stop iteration condition is met, which means that the model training is completed.

[0178] In one embodiment, the preset condition for stopping iteration is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000 times.

[0179] In an embodiment of the present application, the data after feature extraction is input into a classifier model for classifier training. The present application adopts a multi-layer extreme learning machine algorithm based on quantum state evolution as a classification model. Traditional extreme learning machine algorithms may be inefficient or inaccurate when processing nonlinear high-dimensional data. The present application adopts a quantum state evolution strategy to expand the feature space by simulating the super-position state of quantum bits, thereby significantly improving the classification accuracy and processing speed.

[0180] Embodiment 5

[0181] See also Figure 5 In an embodiment of the present application, a Chinese medicinal material component detection and evaluation device 50 is also provided, which includes a data acquisition unit 501, a data storage unit 502, a data expansion unit 503, a feature extraction unit 504, a classifier training unit 505 and an evaluation unit 506, aiming to improve the accuracy and efficiency of Chinese medicinal material component detection.

[0182] The data collection unit 501 is used to collect the component data of the Chinese medicinal materials, the component data including: chemical component concentration, spectral characteristic intensity, chromatographic peak value, biological activity index, water content, ash content, heavy metal content and organic acid content;

[0183] The data storage unit 502 is used to: store the collected data in a structured JSON format;

[0184] The data expansion unit 503 is used to: perform data expansion based on the generative adversarial network model of the dual strategy;

[0185] The feature extraction unit 504 is used to: input the expanded data into the feature extraction model to train the feature extraction model, and the feature extraction model is trained based on the chaos optimization neural network algorithm;

[0186] The classifier training unit 505 is used to: input the feature-extracted data into the classifier model for classifier training, where the classifier model is trained using a multi-layer extreme learning machine algorithm based on quantum state evolution;

[0187] The evaluation unit 506 is used to use the trained model to perform Chinese herbal medicine component detection and evaluation.

[0188] Optionally, the Chinese medicinal material component detection and evaluation device is also used to execute the technical solutions described in Examples 1 to 4 of the above method. The specific operations performed can be found in the relevant description of the above examples, which will not be described in detail in this application.

[0189] Embodiment 6

[0190] Figure 6 The hardware architecture diagram of a computer device 10000 suitable for implementing an artificial intelligence-based Chinese medicinal material component detection and evaluation method according to an embodiment of the present application is schematically shown. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle-mounted terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Figure 6 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them:

[0191] The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of the computer device 10000, such as a hard disk or a memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 may also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed in the computer device 10000, such as the program code of the Chinese herbal medicine component detection and evaluation method based on artificial intelligence, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or are to be output.

[0192] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.

[0193] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.

[0194] It should be pointed out that Figure 6 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0195] In this embodiment, the artificial intelligence-based Chinese medicinal material ingredient detection and evaluation method stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.

[0196] Embodiment 7

[0197] A computer-readable storage medium is also provided in an embodiment of the present application, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the method for detecting and evaluating the components of traditional Chinese medicine based on artificial intelligence in the embodiment are implemented.

[0198] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store the operating system and various application software installed on the computer device, such as the program code of the Chinese herbal medicine component detection and evaluation method based on artificial intelligence in the embodiment, etc. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.

[0199] Embodiment 8

[0200] A computer program product is also provided in an embodiment of the present application, including a computer program, which implements the method in the above embodiment when executed by a processor.

[0201] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices, optionally, they can be implemented by executable program codes of computer devices, so that they can be stored in a storage device and executed by the computer device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0202] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for detecting and evaluating components of traditional Chinese medicine based on artificial intelligence, characterized in that: The following steps are involved: S1. Data collection and storage: Collect the ingredient data of Chinese medicinal materials and store them in a structured JSON format; Composition data include: chemical component concentration, spectral feature intensity, chromatographic peak, biological activity index, moisture content, ash content, heavy metal content and organic acid content; S2. Data expansion: Data expansion based on the generative adversarial network model of the dual strategy; S3. Feature extraction model training: The expanded data is input into the feature extraction model for feature extraction model training. The feature extraction model is trained based on the chaotic optimization neural network algorithm. S4, classifier model training: the data after feature extraction is input into the classifier model for classifier training. The classifier model is trained by a multi-layer extreme learning machine algorithm based on quantum state evolution; S5. Detection and evaluation of Chinese medicinal materials ingredients: Use the trained model to detect and evaluate the components of Chinese medicinal materials.

2. The method for detecting and evaluating components of traditional Chinese medicine according to claim 1, characterized in that: The generative adversarial network model includes a generator and a discriminator; The training process of the generative adversarial network model based on the dual strategy in S2 specifically includes: S2.1, initialize and set the parameters of the generator and discriminator; S2.

2. In each training cycle, the generator and discriminator are updated using a dual learning mechanism; S2.

3. Adjust the learning rate and weight control factor according to the results of the chaotic mapping to guide the generator and the discriminator to perform nonlinear exploration in the parameter space; S2.4, evaluate the quality and diversity of the generated data, adjust the parameters of the chaotic mapping according to the evaluation results, optimize the generation process, and the generated data is generated by the generator; S2.5, increase the adversarial strength through multiple iterations to strengthen the discriminator and optimize the generator; S2.

6. Update the parameters of the generator and discriminator according to the adversarial strength and loss function to ensure that the generated data remains consistent under different operating conditions. S2.

7. Repeat the above steps S2.1-S2.6 until the preset stop iteration condition is met, which means that the model training is completed.

3. The method for detecting and evaluating components of traditional Chinese medicine according to claim 2, characterized in that: In S2.3, the learning rate is dynamically adjusted according to the loss of the current iteration using a chaotic function with dynamic loss adjustment parameters, so that the learning rate is adjusted more when the loss changes greatly, and remains relatively stable when the loss changes slightly.

4. The method for detecting and evaluating components of traditional Chinese medicine according to claim 2 or 3, characterized in that: In S2.4, the parameters of the chaotic mapping are adjusted according to the evaluation results, including: judging whether the scores of the quality and diversity evaluation of the generated data are greater than a preset threshold, if so, stopping the iteration, otherwise continuing the iteration.

5. The method for detecting and evaluating components of traditional Chinese medicine according to claim 1, characterized in that: The training process of the neural network algorithm based on chaos optimization in S3 specifically includes: S3.1, initialize the weights and biases of the neural network; S3.

2. During the training process, the output error of the neural network model is evaluated, and the learning rate is adjusted through the chaotic feedback mechanism. The weights are updated according to the updated learning rate to avoid overfitting or underfitting. S3.

3. During the training process, regularization strategies are used to prevent overfitting and ensure the generalization ability of the model. The regularization strategy is to perform regularization sparsification by dynamically adjusting the number of nodes in the hidden layer of the neural network. S3.

4. Repeat the above steps S3.1-S3.3 until the preset stop iteration condition is met, which means that the model training is completed.

6. The method for detecting and evaluating components of traditional Chinese medicine according to claim 5, characterized in that: The node adjustment step size of the hidden layer of the neural network depends on the function of the network level, which is calculated as follows: Int cs () is the rounding operation; α p is the influence coefficient of adjusting the adjustment step size; d p is the depth of the current network layer.

7. The method for detecting and evaluating components of traditional Chinese medicine according to claim 1, characterized in that: The training process of the multi-layer extreme learning machine algorithm based on quantum state evolution in S4 includes: S4.

1. Select the state of the initial qubit, assign a qubit to each input feature, and initialize it to the ground state; S4.

2. Perform quantum state evolution on each input feature and adjust the state of each qubit through a specific quantum logic gate to match the actual distribution of the input data. S4.

3. Use nonlinear activation functions to process data and increase the expressiveness of the model; S4.

4. Optimize the model weights using the quantum gradient descent algorithm; S4.

5. Repeat the above steps S4.1-S4.5 until the preset stop iteration condition is met, which means that the model training is completed.

8. The method for detecting and evaluating components of traditional Chinese medicine according to claim 7, characterized in that: In S4.2, the quantum state evolution is expressed as: U u (t) = exp(-iH u t / h); where U u (t) is the evolution operator at time t, H u is the Hamiltonian; the Hamiltonian contains the dynamics of the features themselves and the interactions between the features, simulating the coupling between the features.

9. The method for detecting and evaluating components of traditional Chinese medicine according to claim 7 or 8, characterized in that: In S4.4, the quantum gradient descent algorithm optimizes the loss function L in the model u The loss function based on cross entropy is adopted, which is expressed as: Where, L u is the loss function of the multi-layer extreme learning machine, y j is the label of the jth sample, is the momentum operator corresponding to the jth sample; p is the loss function regularization coefficient of the multi-layer extreme learning machine, ρ pi is the qubit density matrix; Suppose the initial state of the qubit is |ψ pi >, after the quantum logic gate operation, the density matrix of the qubit is calculated using the noise operation, expressed as: In the formula, is the qubit density matrix before update, is the noise intensity parameter; The updating method of the noise intensity parameter is expressed as: Where η p is the learning rate of the multi-layer extreme learning machine; According to the loss function of the multi-layer extreme learning machine, the parameters of the multi-layer extreme learning machine are updated, and the update method is expressed as: Where ← is the parameter update operation, η u is the learning rate of the multi-layer extreme learning machine; G u is the quantum Fisher information matrix; is the loss function of the multilayer extreme learning machine with respect to the parameter θ u The gradient of θ u are the parameters of the multi-layer extreme learning machine; The quantum Fisher information matrix makes gradient descent more efficient and stable by measuring the curvature of the parameter space. The calculation method is expressed as: In the formula, It is an expectation calculation, which represents the expectation of all possible states and is used to evaluate the average impact of parameter changes on the output probability distribution.

10. A device for detecting and evaluating components of traditional Chinese medicine, characterized in that: include: Data acquisition unit, data storage unit, data expansion unit, feature extraction unit, classifier training unit and evaluation unit; The data acquisition unit is used to collect the component data of Chinese medicinal materials, including chemical component concentration, spectral characteristic intensity, chromatographic peak, biological activity index, moisture content, ash content, heavy metal content and organic acid content; The data storage unit is used to: store the collected data in a structured .json format; The data expansion unit is used to: perform data expansion on the generative adversarial network model based on the dual strategy; The feature extraction unit is used to: input the expanded data into the feature extraction model to train the feature extraction model, and the feature extraction model is trained based on the chaos optimization neural network algorithm; The classifier training unit is used to: input the feature-extracted data into the classifier model for classifier training, and the classifier model is trained by a multi-layer extreme learning machine algorithm based on quantum state evolution; The evaluation unit is used to: use the trained model to detect and evaluate the components of traditional Chinese medicine.

Citation Information

Patent Citations

  • Method and device for detecting year of Chinese medicinal materials, and terminal equipment

    CN110749566A

  • System and method for analyzing effective components in radix stemonae medicinal material based on big data

    CN118173190A

  • Intelligent screening method and system for active data of traditional Chinese medicine components

    CN118230984A

  • Medicinal herb detection system

    KR1020150004090A

Cited By

  • Battery life prediction method and system based on adaptive generative adversarial network

    CN120949092A