Artificial intelligence-based traditional chinese medicinal material component detection evaluation method and device
By combining dual-strategy generative adversarial networks, chaotic optimized neural networks, and quantum state evolution multilayer extreme learning machines, the problems of low efficiency and insufficient accuracy in the detection of Chinese medicinal materials components are solved, and efficient and accurate detection of Chinese medicinal materials components is achieved.
Patent Information
- Application Number
- CN202411499254.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-10-25
AI Technical Summary
Existing technologies for detecting components in Chinese medicinal materials suffer from problems such as low detection efficiency, limited accuracy, and insufficient data processing capabilities. In particular, there is a lack of effective means for data augmentation, insufficient model generalization ability, the effects of gradient vanishing and gradient explosion, and poor efficiency and accuracy in processing high-dimensional nonlinear data.
Data augmentation is performed using a generative adversarial network model based on dual strategies, feature extraction is performed using a chaotic optimized neural network algorithm, and a multilayer extreme learning machine algorithm based on quantum state evolution is used for classifier training to improve the model's generalization ability and feature extraction performance.
It significantly improves the efficiency and accuracy of Chinese medicinal material component detection, solves the problem of insufficient data processing, and enhances the model's generalization ability and classification efficiency.
Smart Images

Figure CN119418803B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrical data processing technology, and in particular to a method and apparatus for detecting and evaluating the components of traditional Chinese medicine based on artificial intelligence. Background Technology
[0002] Due to the complex chemical composition and efficacy of traditional Chinese medicinal materials, traditional methods for detecting and analyzing these components often suffer from low efficiency, limited accuracy, and insufficient data processing capabilities. Furthermore, the quality assessment of the components in traditional Chinese medicinal materials is crucial for ensuring efficacy and drug safety, but existing technologies often cannot effectively handle large-scale or complex data, thus limiting the reliability of analytical results.
[0003] With the development of artificial intelligence technology, especially the widespread application of deep learning and machine learning, new solutions have been provided to address these challenges. Therefore, developing a device that integrates advanced data acquisition, storage, processing, and analysis technologies can significantly improve the efficiency and accuracy of traditional Chinese medicine component detection, which is of great significance for promoting the modernization and standardization of traditional Chinese medicine.
[0004] Existing AI-based methods for analyzing the components of traditional Chinese medicine have the following drawbacks: 1. There is a lack of effective methods to address 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 get stuck in local optima, which limits the improvement of model performance; 3. When dealing with 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] To overcome the technical shortcomings of insufficient model generalization ability, limited model performance, and poor efficiency and accuracy in processing high-dimensional nonlinear data, this application provides an artificial intelligence-based method and apparatus for detecting and evaluating the components of traditional Chinese medicine.
[0006] Firstly, this application provides an artificial intelligence-based method for detecting and evaluating the components of traditional Chinese medicine, the specific scheme of which is as follows:
[0007] S1. Data Acquisition and Storage: Collect component data of Chinese medicinal materials and store them in structured JSON format;
[0008] The composition data includes: chemical component concentration, spectral characteristic intensity, chromatographic peak value, bioactivity index, moisture content, ash content, heavy metal content, and organic acid content;
[0009] S2. Data augmentation: Data augmentation based on the generative adversarial network model with dual strategy;
[0010] S3. Feature Extraction Model Training: The augmented data is input into the feature extraction model for training. The feature extraction model is trained using a chaotic optimization neural network algorithm.
[0011] S4. Classifier Model Training: Input the data after feature extraction into the classifier model for classifier training. The classifier model is trained based on the multilayer extreme learning machine algorithm of quantum state evolution.
[0012] S5. Detection and evaluation of Chinese medicinal materials components: Detection and evaluation of Chinese medicinal materials components using a pre-trained model.
[0013] Optionally, in one possible implementation of the first aspect, the generative adversarial network model includes a generator and a discriminator;
[0014] The training process for the dual-policy-based generative adversarial network model 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 chaotic mapping to guide the generator and discriminator to conduct nonlinear exploration in the parameter space;
[0018] S2.4. Evaluate the quality and diversity of the generated data, adjust the parameters of the chaotic mapping based on the evaluation results, and optimize the generation process. 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 steps S2.1-S2.6 above until the preset stopping iteration condition is met, which means that the model training is complete.
[0022] Optionally, in one 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 with dynamically adjustable loss parameters, so that the learning rate is adjusted more when the loss changes greatly, and remains relatively stable when the loss changes little.
[0023] Optionally, in one possible implementation of the first aspect, the parameters of the chaotic mapping are adjusted in S2.4 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 they are greater than the preset threshold, the iteration is stopped; otherwise, the iteration continues.
[0024] Optionally, in one possible implementation of the first aspect,
[0025] The training process for the chaos-based neural network algorithm in S3 specifically includes:
[0026] S3.1 Initialize the weights and biases of the neural network;
[0027] S3.2 During the training process, evaluate the output error of the neural network model and adjust the learning rate through a chaotic feedback mechanism. Based on the updated learning rate, update the weights to avoid overfitting or underfitting.
[0028] S3.3 During training, a regularization strategy is adopted to prevent overfitting and ensure the model's generalization ability. The regularization strategy is to dynamically adjust the number of nodes in the hidden layer of the neural network to regularize sparsity.
[0029] S3.4 Repeat steps S3.1-S3.3 until the preset stopping iteration condition is met, which means that the model training is complete.
[0030] Optionally, in one possible implementation of the first aspect,
[0031] The step size for adjusting nodes in the hidden layers of a neural network depends on a function of the network layers, which is calculated as follows:
[0032]
[0033] In the formula, Int cs ( ) represents the rounding operation; α p It is the influence coefficient of adjusting the step size; d p It represents the depth of the current network layer.
[0034] Optionally, in one possible implementation of the first aspect,
[0035] The training process of the multilevel extreme learning machine algorithm based on quantum state evolution in S4 includes:
[0036] S4.1 Select the initial state of the qubits, assign qubits 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 specific quantum logic gates to match the actual distribution of the input data;
[0038] S4.3 Utilize non-linear activation functions to process data and increase the expressive power of the model;
[0039] S4.4 Optimize the model weights using the quantum gradient descent algorithm;
[0040] S4.5 Repeat steps S4.1-S4.5 until the preset stopping iteration condition is met, which means that the model training is complete.
[0041] Optionally, in one possible implementation of the first aspect,
[0042] In S4.2, the evolution of quantum states is represented as: U u (t)=exp(-iH u t / h); where U u H(t) is the evolution operator at time t, H u It is the Hamiltonian; the Hamiltonian contains the dynamics of the feature itself and the interaction between features, simulating the coupling between features.
[0043] Optionally, in one possible implementation of the first aspect,
[0044] In S4.4, the loss function L in the quantum gradient descent algorithm optimization model... u The loss function based on cross-entropy is used, and is expressed as: In the formula, L u It is the loss function of a multi-level extreme learning machine, yj 是 The label of the j-th sample, λ is the momentum operator corresponding to the j-th sample; p These are the regularization coefficients of the loss function in a multilevel extreme learning machine. It is the quantum bit density matrix;
[0045] Let the initial state of the qubit be... After quantum logic gate operations, the density matrix of qubits is calculated using noise operations, and is expressed as: In the formula, This is the original qubit density matrix. It is a noise intensity parameter;
[0046] The update method for the noise intensity parameter is expressed as follows: In the formula, η p It is the learning rate of the multilevel extreme learning machine;
[0047] Based on the loss function of the multilevel extreme learning machine, the parameters of the multilevel extreme learning machine are updated, and the update method is expressed as follows: In the formula, ← represents the parameter update operation, and η uIt is the learning rate of the multilevel extreme learning machine; G u It is a quantum Fisher information matrix; The loss function of a multilevel extreme learning machine with respect to the parameter θ u The gradient of θ; u These are the parameters of a multilevel extreme learning machine;
[0048] The quantum Fisher information matrix, by measuring the curvature of the parameter space, makes gradient descent more efficient and stable. Its calculation method is expressed as follows: In the formula, The expectation is calculated, representing the expectation over all possible states, and is used to evaluate the average effect of parameter changes on the output probability distribution.
[0049] Secondly, this application provides a device for detecting and evaluating the components of traditional Chinese medicine, including: 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 component data of Chinese medicinal materials, including: chemical component concentration, spectral characteristic intensity, chromatographic peak value, bioactivity 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 augmentation unit is used for: augmenting data in generative adversarial network models based on dual strategies;
[0053] The feature extraction unit is used to: input the augmented data into the feature extraction model for training the feature extraction model, which is trained using a chaotic optimization neural network algorithm;
[0054] The classifier training unit is used to: input the data after feature extraction into the classifier model for classifier training. The classifier model is trained based on the multilayer extreme learning machine algorithm of quantum state evolution.
[0055] The evaluation unit is used to evaluate the components of Chinese medicinal materials using a pre-trained model.
[0056] The technical solutions adopted in this application embodiment can achieve the following technical effects: First, training the generative adversarial network model based on the dual strategy generative adversarial network algorithm and expanding the data can improve the model's generalization ability. Second, optimizing the parameters of the feature extraction model based on the chaotic optimization algorithm and using a self-adjusting mechanism to dynamically adjust and update the model's weights can improve the performance of the feature extraction model. Finally, training the classifier model based on the quantum state evolution multilayer extreme learning machine algorithm can improve classification efficiency and accuracy. Thus, improvements from the above three angles can effectively solve the problem of insufficient data processing, thereby significantly improving the efficiency and accuracy of traditional Chinese medicine component detection. Attached Figure Description
[0057] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0058] Figure 1 A flowchart illustrating the AI-based method for detecting and evaluating the components of traditional Chinese medicinal materials in this application;
[0059] Figure 2 This is a flowchart illustrating the training process of the generative adversarial network model based on dual strategy in this application.
[0060] Figure 3 This is a flowchart illustrating the training process of the chaotic optimization-based neural network algorithm in this application.
[0061] Figure 4 This is a schematic diagram of the training process of the multilayer extreme learning machine algorithm based on quantum state evolution in this application;
[0062] Figure 5 This is a schematic diagram of the structure of the Chinese medicinal material component detection and evaluation device in this application;
[0063] Figure 6 This is a schematic diagram of the computer device in this application. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0065] It should be noted that the descriptions involving "first," "second," etc., in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0066] In the description of this application, it should be understood that the numerical labels before the steps do not indicate the order of the steps, but are only used to facilitate the description of this application and to distinguish each step, and therefore should not be construed as a limitation of this application.
[0067] This application provides an artificial intelligence-based method and apparatus for detecting and evaluating the components of traditional Chinese medicine (TCM) materials. This method overcomes the technical shortcomings of insufficient model generalization ability, limited model performance, and poor efficiency and accuracy in processing high-dimensional nonlinear data. It effectively solves the problem of insufficient data processing and improves data processing capabilities, thereby significantly improving the efficiency and accuracy of TCM component detection.
[0068] To facilitate understanding of the technical solutions provided in the embodiments of this application by those skilled in the art, the relevant technologies are described below:
[0069] Example 1
[0070] See Figure 1 The technical solution of the artificial intelligence-based method for detecting and evaluating the components of traditional Chinese medicine in this application is as follows:
[0071] S1. Data Acquisition and Storage: Collect component data of Chinese medicinal materials and store them in structured JSON format.
[0072] The composition data includes: chemical component concentration, spectral characteristic intensity, chromatographic peak, bioactivity index, moisture content, ash content, heavy metal content, and organic acid content.
[0073] Specifically, taking a specific data point as an example, suppose there is a batch of ginseng samples with the following data attributes: chemical composition concentration C a =0.12 mg / mL, spectral characteristic intensity I a =350 units, chromatographic peak P a =28 units, bioactivity index B a =50 units, 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 on the generative adversarial network model based on dual strategies.
[0075] The Generative Adversarial Network (GAN) model consists of two parts: a generator and a discriminator. The generator's task is to create synthetic data that closely resembles real Chinese medicinal material testing data, while the discriminator's task is to distinguish whether the input data is real or created by the generator. This application employs a dual learning mechanism, allowing the generator and discriminator to learn from and adapt to each other during training. Chaotic mapping is used to adjust the learning path, increasing the exploratory nature of the training process and thus avoiding getting trapped in local optima.
[0076] S3. Feature Extraction Model Training: The expanded data is input into the feature extraction model for training. The feature extraction model is trained using a chaotic optimization neural network algorithm.
[0077] Specifically, the feature extraction model is obtained using a 6-layer fully connected neural network architecture, with the following structure: 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: Input the extracted feature data into the classifier model for classifier training. The classifier model is trained using a multi-level extreme learning machine algorithm based on quantum state evolution.
[0079] The aforementioned multilevel extreme learning machine algorithm based on quantum state evolution refers to the following: the classifier model adopts the multilevel extreme learning machine algorithm based on quantum state evolution as the classification model, and uses the quantum state evolution strategy to expand the feature space of the model by simulating the superposition state of qubits.
[0080] S5. Detection and evaluation of Chinese medicinal materials components: Detection and evaluation of Chinese medicinal materials components using a pre-trained model.
[0081] In one embodiment, the collected raw data is input into a trained feature extraction model for feature processing. Further, the processed features are input into a classifier model for classifier training, thereby obtaining the classification result. In this embodiment, the classification categories include "high-quality," "qualified," and "substandard."
[0082] In this embodiment, firstly, data augmentation using a generative adversarial network (GAN) algorithm based on a dual strategy can improve the model's generalization ability. Secondly, the parameters of the feature extraction model are optimized using a chaotic optimization algorithm, and a self-regulating mechanism is used to dynamically adjust and update the model's weights, thereby improving the performance of the feature extraction model. Finally, a multilayer extreme learning machine (MLM) algorithm based on quantum state evolution is used to train the classifier model, improving classification efficiency and accuracy. Thus, improvements from these three perspectives can effectively solve the problem of insufficient data processing, thereby significantly improving the efficiency and accuracy of traditional Chinese medicine component detection.
[0083] Implementation 2
[0084] The specific data augmentation scheme in Embodiment 1 above will be described next. 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 for initializing the parameters of the generated adversarial network is represented as follows:
[0087]
[0088] In the formula, and σ and γ are the parameters of the generator and discriminator, respectively; σ() is the nonlinear function for parameter initialization; c The diffusion coefficient is set according to the chaotic mapping; randn() generates normally distributed random numbers; size() determines the dimension of the parameters.
[0089] S2.2 In each training cycle, the generator and discriminator are updated using a dual learning mechanism.
[0090] Specifically, the generator attempts to generate data X. c,fake The discriminator then attempts to distinguish the real data X. c,real The generator updates its parameters using the generated data and the dual learning mechanism. The generator's goal is to maximize the misclassification rate of the discriminator. Therefore, the loss functions for both the generator and discriminator are calculated as follows:
[0091]
[0092] In the formula, Z c It is the input noise of the generator; It is the loss function of the discriminator; It is the loss function of the generator; N cThis is the number of samples in each batch; and Let i and j represent the real and generated data samples, respectively.
[0093] S2.3 Adjust the learning rate and weight control factor based on the results of the chaotic mapping to guide the generator and discriminator to conduct nonlinear exploration in the parameter space.
[0094] Specifically, based on the current losses and Adjusting the learning rate η c and weighting factor λ c The adjustment method is expressed as follows:
[0095]
[0096] In the formula, It is the learning rate of the generative adversarial network in the (t+1)th iteration. It is the learning rate of the generative adversarial network in the t-th iteration; It is the weight adjustment factor of the generative adversarial network in the (t+1)th iteration. is the weight adjustment factor of the generative adversarial network in the t-th iteration; Ch() is the chaotic function that dynamically adjusts the parameters according to the loss.
[0097] In one embodiment, a chaotic function that dynamically adjusts parameters based on the loss of the current iteration dynamically adjusts the learning rate, allowing for larger adjustments when the loss changes significantly and relatively stable rates when the loss changes slowly. This increases the dynamic adaptability of the training process. The calculation method is expressed as follows:
[0098]
[0099] In the formula, K and V are parameters that adjust the intensity and smoothness of the chaotic mapping.
[0100] S2.4. Evaluate the quality and diversity of the generated data, adjust the parameters of the chaotic mapping based on the evaluation results, and optimize the generation process.
[0101] Specifically, regarding the generated data X c,fake A quality and diversity assessment is conducted, and the assessment method is expressed as follows:
[0102]
[0103] In the formula, M is a sensitivity parameter for measuring quality. c Qu() is the number of samples considered in the evaluation, Qu() is the evaluation function for the quality and diversity of the generated data, and ||| is the L2 norm.
[0104] Furthermore, it is determined whether the scores for the quality and diversity assessment of the generated data are greater than a preset threshold. If they are greater than the preset threshold, the iteration stops; otherwise, the iteration continues.
[0105] S2.5. Increase the adversarial strength through multiple iterations to strengthen the discriminator and optimize the generator.
[0106] Multiple iterations can increase the adversarial strength to enhance the discriminator's ability to identify data, while also allowing the generator to be optimized under more challenging conditions, thereby improving the realism and complexity of the generated data.
[0107] Specifically, let the intensity of the confrontation be α. c The learning rate, representing the generative adversarial network, is calculated as follows:
[0108]
[0109] In the formula, β and These are parameters that adjust the rate and range of increase in the intensity of confrontation. It is the adversarial strength in the t-th iteration. It represents the adversarial strength in the (t+1)th iteration.
[0110] S2.6 Update the parameters of the generator and discriminator based on 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 follows:
[0112]
[0113] In the formula, and These are the gradients of the generator and discriminator losses with respect to their parameters, respectively. and These are the parameters for the updated generator and discriminator, respectively.
[0114] S2.7 Repeat steps S2.1-S2.6 above until the preset stopping iteration condition is met, which means that the model training is complete.
[0115] In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.
[0116] In the technical solution of this application embodiment, the generative adversarial network algorithm based on the dual strategy and the training method in steps S2.1-S2.7 above are used to train the model. Using the trained generative adversarial network model to expand the data can solve the problem of insufficient training data leading to insufficient model generalization ability. 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] Example 3
[0118] Next, see Figure 3 The training process of the neural network algorithm based on chaos optimization in the embodiments of this application is described, specifically including:
[0119] S3.1 Initialize the weights and biases of the neural network.
[0120] In one embodiment, the initialization method is represented as follows:
[0121] W p,0 =μ p +σ p ·N(0, I); b p,0 =ν p ·N(0, I);
[0122] In the formula, W p,0 b represents the initial values of the neural network weights. p,0 The initial value for the bias of the neural network; μ p ν represents the mean offset of the weights in the neural network. p σ is the mean offset of the weights in the neural network. P This represents the standard deviation of the weights in the neural network; N(0, I) denotes a normal distribution with a mean of 0 and a standard deviation equal to the identity matrix, where 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, evaluate the output error of the neural network model and adjust the learning rate through a chaotic feedback mechanism. Based on the updated learning rate, update the weights to avoid overfitting or underfitting.
[0124] Specifically, the dynamic update method of the self-adjusting learning rate is represented as follows:
[0125] η p,t =η p,t-1 ·exp(-γ p ·ΔE p,t-1 );
[0126] In the formula, η p,t Let η be the learning rate of the neural network in the t-th iteration; p,t-1 γ is the learning rate of the neural network in the (t-1)th iteration; p It is a regulatory factor in neural networks, controlling the sensitivity to changes in the learning rate; ΔE p,t-1 It represents the change in error of the neural network in the previous cycle.
[0127] Furthermore, the weights are updated based on the updated learning rate, as follows:
[0128]
[0129] In the formula, W p,t W represents the weights of the neural network in the t-th iteration. p,t-1 E represents the weights of the neural network in the (t-1)th iteration. p It 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; The symbol represents the partial derivative.
[0130] S3.3 During training, a regularization strategy is used to prevent overfitting and ensure the model's generalization ability.
[0131] Specifically, sparsity is achieved by dynamically adjusting the number of nodes in the hidden layers of the neural network, as shown below:
[0132] N p,t =N p,t-1 +sgn(ΔE p,t-1 )·β p ;
[0133] In the formula, N p,t N is the number of nodes in the hidden layer of the neural network in the t-th iteration; p,t-1 β is the number of nodes in the hidden layer of the neural network in the (t-1)th iteration; p `sgn()` is the step size for adjusting nodes in the hidden layer of the neural network; `sgn()` is the sign function for the error change, used to determine whether to increase or decrease the number of nodes, i.e., for `sgn(ΔE)`... p,t-1 When ΔE p,t-1 When greater than zero, sgn(ΔE) p,t-1 When ΔE is 1, p,t-1 When less than or equal to zero, sgn(ΔE) p,t-1 The value is -1.
[0134] In one embodiment, the node adjustment step size of the neural network hidden layer depends on a function of the network hierarchy, and the calculation method is expressed as follows:
[0135]
[0136] In the formula, Int Cs () represents the rounding operation; α p It is the influence coefficient of adjusting the step size; d p This is the depth of the current network layer. Preferably, d p The value is 6, α p Set it to 2.5.
[0137] S3.4 Repeat steps S3.1-S3.3 until the preset stopping iteration condition is met, which means that the model training is complete.
[0138] In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.
[0139] Some existing technologies use neural networks for feature extraction. However, certain neural network structures may encounter problems such as vanishing gradients, exploding gradients, or getting trapped in local optima, affecting training stability and model performance. In contrast, this application employs a chaotic optimization algorithm to optimize the parameters of the neural network model for training. Specifically, this application uses a self-adjusting mechanism, allowing the network to dynamically adjust and update its weights based on the error of the previous training cycle. By leveraging the sensitivity of chaos theory, the model's responsiveness to changes in initial conditions and parameters is enhanced.
[0140] Example 4
[0141] Next, see Figure 4 The training process of the multilevel extreme learning machine algorithm based on quantum state evolution in the embodiments of this application is described, specifically including:
[0142] S4.1 Select the initial state of the qubits, assign qubits to each input feature, and initialize it to the ground state.
[0143] Specifically, for the input features corresponding to each qubit Initialization, considering the complexity of detecting components in traditional Chinese medicine, involves determining the quantum state of each feature in the feature vector after feature extraction. Initialization is performed using a Gaussian wave packet, and the initialization method is as follows:
[0144]
[0145] In the formula, x is the position variable. and and represent the average position and expansion of the qubits 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 qubit through specific quantum logic gates to match the actual distribution of the input data.
[0147] In one embodiment, the evolution of quantum states is represented as follows:
[0148] U n (t)=exp(-iH u t / h);
[0149] In the formula, U u H(t) is the evolution operator at time t, H u It is the Hamiltonian.
[0150] In one embodiment, the Hamiltonian encompasses the dynamics of the feature itself and the interactions between features, simulating the coupling between features, and is calculated as follows:
[0151]
[0152] In the formula, It is the momentum operator corresponding to the i-th feature, where m is the mass and k is the spring constant.
[0153] S4.3. Use non-linear 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 It is a coefficient that controls the nonlinear intensity; It is the quantum state probability density, which represents the probability of the existence of the i-th feature at a certain position; It is a non-linear activation function.
[0157] Furthermore, the quantum state probability density is calculated as follows:
[0158] In the formula, Let x represent the probability density at position x, which is the modulus square of the qubit state.
[0159] Furthermore, feature processing is performed through ground state transformation, which is expressed as:
[0160] y u =H u x u In the formula, x u The input vector represents the state of each node in each layer; y u This is the output vector.
[0161] S4.4 Optimize the model weights using the quantum gradient descent algorithm.
[0162] In one embodiment, the loss function L u The loss function based on cross-entropy is used, and is expressed as:
[0163]
[0164] In the formula, L u It is the loss function of a multilevel extreme learning machine, y j It is the label of the j-th sample. λ is the momentum operator corresponding to the j-th sample; p These are the regularization coefficients of the loss function in a multilevel extreme learning machine. It is a quantum bit density matrix.
[0165] In one embodiment, the initial state of the qubit is assumed to be... After quantum logic gate operations, the density matrix of qubits is calculated using noise operations, and is expressed as:
[0166]
[0167] In the formula, This is the original qubit density matrix. It is a noise intensity parameter.
[0168] Furthermore, the update method for the noise intensity parameter is expressed as follows:
[0169]
[0170] In the formula, n p It is the learning rate of the multilevel extreme learning machine.
[0171] Furthermore, based on the loss function of the multilevel extreme learning machine, the parameters of the multilevel extreme learning machine are updated, and the update method is expressed as follows:
[0172]
[0173] In the formula, ← represents the parameter update operation, and η u It is the learning rate of the multilevel extreme learning machine; G u It is a quantum Fisher information matrix; The loss function of a multilevel extreme learning machine with respect to the parameter θ u The gradient of θ; u These are the parameters of a multilevel extreme learning machine.
[0174] In one embodiment, the quantum Fisher information matrix, by measuring the curvature of the parameter space, makes gradient descent more efficient and stable, and its calculation method is expressed as follows:
[0175]
[0176] In the formula, The expectation is calculated, representing the expectation over all possible states, and is used to evaluate the average effect of parameter changes on the output probability distribution.
[0177] S4.5 Repeat steps S4.1-S4.5 until the preset stopping iteration condition is met, which means that the model training is complete.
[0178] In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.
[0179] In this application embodiment, the data after feature extraction is input into the classifier model for classifier training. This application adopts the multilayer extreme learning machine algorithm based on quantum state evolution as the classification model. Traditional extreme learning machine algorithms may be inefficient or inaccurate when processing nonlinear high-dimensional data. This application adopts the quantum state evolution strategy to expand the feature space by simulating the hyperposition state of qubits, thereby significantly improving the accuracy and processing speed of classification.
[0180] Example 5
[0181] See Figure 5 This application embodiment also provides a Chinese herbal medicine component detection and evaluation device 50, 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 herbal medicine component detection.
[0182] The data acquisition unit 501 is used to: collect component data of Chinese medicinal materials, including: chemical component concentration, spectral characteristic intensity, chromatographic peak, bioactivity index, moisture content, ash content, heavy metal content and organic acid content;
[0183] Data storage unit 502 is used to: store the collected data in a structured JSON format;
[0184] The data augmentation unit 503 is used for: augmenting the data of a generative adversarial network model based on a dual strategy;
[0185] The feature extraction unit 504 is used to: input the expanded data into the feature extraction model for training the feature extraction model, which is obtained by training a neural network algorithm based on chaos optimization;
[0186] The classifier training unit 505 is used to: input the data after feature extraction into the classifier model for classifier training. The classifier model is trained based on the multilayer extreme learning machine algorithm of quantum state evolution.
[0187] Evaluation unit 506 is used for: evaluating the components of Chinese medicinal materials using a pre-trained model.
[0188] Optionally, the Chinese medicinal material component detection and evaluation device is also used to execute the technical solutions described in Embodiments 1 to 4 of the above method. The specific operation is described in the relevant descriptions in the above embodiments, and will not be repeated here.
[0189] Example 6
[0190] Figure 6 This illustration schematically depicts the hardware architecture of a computer device 10000 suitable for implementing an artificial intelligence-based method for detecting and evaluating the components of traditional Chinese medicine materials, according to embodiments of this application. In some embodiments, the computer device 10000 may be a terminal device such as a smartphone, wearable device, tablet computer, personal computer, in-vehicle terminal, game console, virtual machine, workbench, digital assistant, set-top box, or robot. In other embodiments, the computer device 10000 may be a rack server, blade server, tower server, or cabinet server (including standalone servers or server clusters 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 and be linked with each other via a system bus. Wherein:
[0191] The memory 10010 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), 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, magnetic disk, optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of a computer device 10000, such as the hard disk or 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, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 10000. Of course, the memory 10010 may also include both the internal storage module and the external storage device of the computer device 10000. In this embodiment, the memory 10010 is typically used to store the operating system and various application software installed on the computer device 10000, such as the program code for an artificial intelligence-based method for detecting and evaluating the components of traditional Chinese medicine. In addition, the memory 10010 can also be used to temporarily store various types of data that have been output or will be output.
[0192] In some embodiments, processor 10020 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other chip. Processor 10020 is typically used to control the overall operation of computer device 10000, such as performing control and processing related to data interaction or communication with computer device 10000. In this embodiment, processor 10020 is used to run program code stored in memory 10010 or process data.
[0193] Network interface 10030 may include a wireless network interface or a wired network interface, which is typically used to establish a communication link between computer device 10000 and other computer devices. For example, network interface 10030 is used to connect computer device 10000 to an external terminal via a network, establishing a data transmission channel and communication link between computer device 10000 and the external terminal. The network may be an intranet, the Internet, Global System for Mobile Communications (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.
[0194] It should be pointed out that, Figure 6 Only computer devices with components 10010-10030 are shown; however, it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.
[0195] In this embodiment, the AI-based Chinese medicinal herb component detection and evaluation method stored in memory 10010 can be further divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiments of this application.
[0196] Example 7
[0197] This application also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the artificial intelligence-based Chinese medicinal herb component detection and evaluation method in the embodiments.
[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), 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, magnetic disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the artificial intelligence-based method for detecting and evaluating the components of traditional Chinese medicine in this embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.
[0199] Example 8
[0200] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in the above embodiments.
[0201] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computer devices. They can be centralized on a single computer device or distributed across a network of multiple computer devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computer device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.
[0202] It should be noted that the above are merely preferred embodiments of this application and do not limit the scope of patent protection of this application. Any equivalent structural or procedural changes made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.
Claims
1. A method for detecting and evaluating the components of traditional Chinese medicinal materials based on artificial intelligence, characterized in that, Includes the following steps: S1. Data Acquisition and Storage: Collect component data of Chinese medicinal materials and store them in structured JSON format; The composition data includes: chemical component concentration, spectral characteristic intensity, chromatographic peak value, bioactivity index, moisture content, ash content, heavy metal content, and organic acid content; S2. Data augmentation: Data augmentation based on the generative adversarial network model with dual strategy; Generative adversarial network (GAN) models include generators and discriminators; The training process for the dual-policy-based generative adversarial network model 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 chaotic mapping to guide the generator and discriminator to conduct nonlinear exploration in the parameter space; S2.
4. Evaluate the quality and diversity of the generated data, adjust the parameters of the chaotic mapping based on the evaluation results, optimize the generation process, and ensure that the generated data is generated by the generator. S2.
5. Increase the adversarial strength through multiple iterations to enhance the discriminator while optimizing 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 steps S2.1-S2.6 above until the preset stopping iteration condition is met, which means that the model training is complete; S3. Feature Extraction Model Training: The expanded data is input into the feature extraction model for training. The feature extraction model is trained using a chaotic optimization neural network algorithm. S4. Classifier Model Training: The extracted feature data is input into the classifier model for training. The classifier model is trained using a multilevel extreme learning machine algorithm based on quantum state evolution, including: S4.1 Select the initial state of the qubits, assign qubits 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 specific quantum logic gates to match the actual distribution of the input data; S4.3 Utilize non-linear activation functions to process data and increase the expressive power of the model; S4.4 Optimize the model weights using the quantum gradient descent algorithm; S4.5 Repeat steps S4.1-S4.5 until the preset stopping iteration condition is met, which means that the model training is complete. S5. Detection and evaluation of Chinese medicinal materials components: Detection and evaluation of Chinese medicinal materials components using a pre-trained model.
2. The method for detecting and evaluating the components of traditional Chinese medicinal materials according to claim 1, characterized in that, In S2.3, the learning rate is dynamically adjusted based on the loss of the current iteration using a chaotic function that dynamically adjusts the parameters of the loss. This allows the learning rate to be adjusted more significantly when the loss changes greatly, while remaining relatively stable when the loss changes little.
3. The method for detecting and evaluating the components of traditional Chinese medicinal materials according to claim 1, characterized in that, In S2.4, the parameters of the chaotic mapping are adjusted based on 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 they are greater than the preset threshold, the iteration stops; otherwise, the iteration continues.
4. The method for detecting and evaluating the components of traditional Chinese medicinal materials according to claim 1, characterized in that, The training process for the chaos-based neural network algorithm in S3 specifically includes: S3.1 Initialize the weights and biases of the neural network; S3.2 During the training process, evaluate the output error of the neural network model and adjust the learning rate through a chaotic feedback mechanism. Based on the updated learning rate, update the weights to avoid overfitting or underfitting. S3.3 During training, a regularization strategy is adopted to prevent overfitting and ensure the model's generalization ability. The regularization strategy is to dynamically adjust the number of nodes in the hidden layer of the neural network to regularize sparsity. S3.4 Repeat steps S3.1-S3.3 until the preset stopping iteration condition is met, which means that the model training is complete.
5. The method for detecting and evaluating the components of traditional Chinese medicinal materials according to claim 4, characterized in that, The step size for adjusting nodes in the hidden layers of a neural network depends on a function of the network layers, which is calculated as follows: In the formula, This is a rounding operation; It is the influence coefficient of adjusting the step size; It represents the depth of the current network layer.
6. The method for detecting and evaluating the components of traditional Chinese medicinal materials according to claim 1, characterized in that, In S4.2, the evolution of quantum states is represented as follows: In the formula, It is time Evolutionary operators, It is the Hamiltonian; the Hamiltonian contains the dynamics of the feature itself and the interaction between features, simulating the coupling between features.
7. The method for detecting and evaluating the components of traditional Chinese medicinal materials according to claim 1, characterized in that, In S4.4, the loss function in the quantum gradient descent algorithm optimization model. The loss function based on cross-entropy is used, and is expressed as: In the formula, It is the loss function of a multilevel extreme learning machine. It is the first The label of each sample It is the first The momentum operator corresponding to each sample; These are the regularization coefficients of the loss function in a multilevel extreme learning machine. It is the quantum bit density matrix; Let the initial state of the qubit be... After quantum logic gate operations, the density matrix of qubits is calculated using noise operations, and is expressed as: In the formula, This is the original qubit density matrix. It is a noise intensity parameter; The update method for the noise intensity parameter is expressed as follows: In the formula, It is the learning rate of the multilevel extreme learning machine; Based on the loss function of the multilevel extreme learning machine, the parameters of the multilevel extreme learning machine are updated, and the update method is expressed as follows: In the formula, For parameter update operations, It is the learning rate of the multilevel extreme learning machine; It is a quantum Fisher information matrix; The loss function of a multilevel extreme learning machine with respect to the parameters The gradient; These are the parameters of a multilevel extreme learning machine; The quantum Fisher information matrix, by measuring the curvature of the parameter space, makes gradient descent more efficient and stable. Its calculation method is expressed as follows: In the formula, The expectation is calculated, representing the expectation over all possible states, and is used to evaluate the average effect of parameter changes on the output probability distribution.
8. A device for detecting and evaluating the components of traditional Chinese medicinal materials, characterized in that, The aforementioned Chinese medicinal material component detection and evaluation device is used to implement the artificial intelligence-based Chinese medicinal material component detection and evaluation method as described in claim 1. The device for detecting and evaluating the components of traditional Chinese medicinal materials includes: The system includes a data acquisition unit, a data storage unit, a data expansion unit, a feature extraction unit, a classifier training unit, and an evaluation unit. The data acquisition unit is used to collect component data of Chinese medicinal materials, including: chemical component concentration, spectral characteristic intensity, chromatographic peak value, bioactivity 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 augmentation unit is used for: augmenting data in generative adversarial network models based on dual strategies; The feature extraction unit is used to: input the augmented data into the feature extraction model for training the feature extraction model, which is trained using a chaotic optimization neural network algorithm; The classifier training unit is used to: input the data after feature extraction into the classifier model for classifier training. The classifier model is trained based on the multilayer extreme learning machine algorithm of quantum state evolution. The evaluation unit is used to evaluate the components of Chinese medicinal materials using a pre-trained model.
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