Chemical raw material detection method and system based on adversarial network, medium and equipment
By using multiple quantum superimposed states to generate adversarial network expansion data, dynamic group evolution optimization algorithm to extract features, feature refinement and self-coding network dimensionality reduction, combined with support vector machine classification of Riemann geometric optimization, the problems of insufficient data samples, low feature extraction efficiency, insufficient dimensionality reduction information and insufficient classification accuracy in chemical raw material detection are solved, and more efficient and accurate chemical raw material detection is achieved.
Patent Information
- Application Number
- CN202411637877.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-28
AI Technical Summary
In the detection of chemical raw materials, the existing technology has problems such as insufficient data samples, poor generalization ability of the model, low feature extraction efficiency, insufficient information retention during dimensionality reduction, and insufficient classification accuracy.
The generation adversarial network based on multiple quantum superposition states is used to expand chemical raw material data, and the neural network algorithm optimized for dynamic population evolution is used for feature extraction, and the auto-encoded neural network with feature refinement is used for dimensionality reduction, and the support vector machine based on Riemann geometric optimization is used for classification.
It effectively improves the accuracy and efficiency of chemical raw material detection models, enhances the simplicity of feature extraction and dimensionality reduction and information retention capabilities, and improves classification accuracy.
Smart Images

Figure CN119541706A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a chemical raw material detection method, system, medium and equipment based on an adversarial network. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In the chemical production process, real-time detection of raw materials is used to ensure production stability and product quality. In traditional chemical raw material detection, high-precision sensors and detection equipment are relied on to monitor and record the physical and chemical parameters of raw materials. However, the complexity and multi-dimensionality of chemical raw material data pose great challenges to the subsequent chemical raw material data processing and analysis. In order to improve detection efficiency, it is usually necessary to build an intelligent analysis system and use machine learning and artificial intelligence technologies to analyze and classify the detected chemical raw material data.
[0004] The Chinese invention patent with publication number CN118324239A and publication date July 12, 2024, discloses a chemical wastewater classification and recovery system and method that can monitor the oil content in real time. The chemical wastewater classification and recovery system includes a wastewater storage tank provided with an inlet pipe. The deeply treated chemical wastewater is divided into high-oil wastewater and low-oil wastewater, which are transported to the high-oil wastewater temporary storage tank and the low-oil wastewater receiving tank respectively, so as to facilitate different subsequent treatments; there is no need for batch sampling and testing, thereby improving the classification and recovery efficiency of chemical wastewater.
[0005] The Chinese invention patent with publication number CN117726978A and publication date March 19, 2024, is a water body detection method and device based on wastewater discharged from chemical areas, including image segmentation, feature extraction and other steps, and uses a water body classification model to classify and calculate the water body area of the chemical area, and finally obtains the water body type of the wastewater concentrated area, which can improve the efficiency of water body detection in the chemical area.
[0006] The Chinese invention patent with publication number CN117113220A and publication date November 24, 2023 proposes a chemical formula recognition method based on group learning, discloses a training set based on chemical formula data, and uses group learning distributed training of multiple text classification models to achieve classification and recognition of chemical formulas, solving the problem of chemical formula integration between formulas of different chemical companies.
[0007] However, whether it is the above patent or other existing technologies, there are the following problems in the process of chemical raw material identification:
[0008] 1. In terms of chemical raw material data expansion, most existing technologies rely on traditional chemical raw material data generation methods, which cannot effectively generate samples of chemical raw material data with high diversity and authenticity, which easily leads to insufficient model generalization ability, thereby affecting the accuracy of the chemical raw material detection model.
[0009] 2. Feature extraction models often use traditional neural networks with fixed evolution rules, which are prone to gradient vanishing, gradient exploding, and falling into local optimal solutions, resulting in low efficiency and poor adaptability of feature extraction models during training.
[0010] 3. In the feature dimensionality reduction model, the existing technology is unable to dynamically adjust the feature weights, resulting in the inability to effectively weaken redundant features and noise features, affecting the simplicity and information retention ability of chemical raw material data dimensionality reduction.
[0011] 4. Classifier algorithms are mostly based on linear classification methods, which make it difficult to accurately process high-dimensional nonlinear chemical raw material data, resulting in insufficient classification accuracy. Especially when the chemical raw material data is highly complex, it is impossible to effectively distinguish different categories of raw materials. Summary of the invention
[0012] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a chemical raw material detection method, system, medium and equipment based on an adversarial network. By expanding the chemical raw material data based on a generative adversarial network based on multiple quantum superposition states, the problem of poor model generalization ability caused by insufficient training samples is effectively solved, thereby improving the accuracy of the detection results.
[0013] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0014] The first aspect of the present invention provides a chemical raw material detection method based on an adversarial network, comprising the following steps:
[0015] Obtain data on chemical raw materials to be tested;
[0016] Constructing a chemical raw material detection model and training the chemical raw material detection model, wherein the training steps include: obtaining a known chemical raw material data set and annotating the chemical raw material data in the chemical raw material data set; learning and constructing a latent space for the chemical raw material data based on the superposition state of quantum bits, and expanding the chemical raw material data set using an adversarial network with a latent space; and training the chemical raw material detection model using the expanded chemical raw material data set;
[0017] The trained chemical raw material detection model is used to detect the chemical raw material data to be detected to obtain the chemical raw material identification results.
[0018] Furthermore, the specific steps of learning and constructing the hidden space for chemical raw material data based on the superposition state of quantum bits are as follows:
[0019] Calculate quantum states and quantum state energies;
[0020] Calculating the probability amplitude of the quantum state based on the quantum state energy and the normalization factor;
[0021] The quantum superposition state is measured and simulated based on the probability amplitude of the quantum state using the quantum state mapping function, and the probability amplitude of the quantum state is mapped to the real number domain and superimposed to obtain the hidden space.
[0022] Furthermore, the specific steps of using the adversarial network with latent space to expand the chemical raw material data set are:
[0023] The generator is used to sample a noise vector formed by the superposition of multiple quantum states from the latent space to generate simulated chemical raw material data;
[0024] The discriminator receives the real chemical raw material data and the chemical raw material data generated by the generator, and discriminates the authenticity of different chemical raw material data;
[0025] The discriminator conducts dynamic adversarial game training with the generator based on the discrimination results to obtain expanded chemical raw material data.
[0026] Furthermore, the specific steps of the discriminator to conduct dynamic adversarial game training with the generator based on the discrimination results are as follows:
[0027] The generator continuously optimizes parameters with the goal of minimizing the probability that the generated chemical raw material data is identified as false by the discriminator;
[0028] The discriminator continuously optimizes parameters with the goal of maximizing the probability of correctly identifying real and generated chemical raw material data;
[0029] The generator and discriminator are trained iteratively until the model converges and the quality of the generated chemical raw material data meets the expected requirements.
[0030] Furthermore, during the dynamic adversarial game training process, gradient penalty is used in the generator's loss function, and the feature decoupling regularization term in the discriminator's loss function uses feature correlation penalty.
[0031] Furthermore, the chemical raw material detection model includes:
[0032] Feature extraction model, used to extract features from chemical raw material data;
[0033] Feature dimension reduction model, used to reduce the dimension of the extracted features;
[0034] The classifier model is used to classify and identify chemical raw material data after dimensionality reduction.
[0035] Furthermore, the specific steps for training the chemical raw material detection model using the expanded chemical raw material data set are as follows:
[0036] The feature extraction model is trained using the expanded chemical raw material data set based on the dynamic population optimization algorithm to obtain the extracted chemical raw material data features;
[0037] The feature dimension reduction model is trained using the extracted chemical raw material data features and the autoencoder neural network algorithm based on feature refinement to obtain the chemical raw material data after dimension reduction;
[0038] The classifier model is trained using the support vector machine algorithm based on Riemannian geometry optimization using the dimensionality-reduced chemical raw material data to obtain the classification and recognition results.
[0039] The second aspect of the present invention provides a chemical raw material detection system based on an adversarial network, comprising:
[0040] A chemical raw material data acquisition module is configured to acquire chemical raw material data to be detected;
[0041] The model building module is configured to build a chemical raw material detection model and train the chemical raw material detection model, wherein the training step includes: obtaining a known chemical raw material data set and annotating the chemical raw material data in the chemical raw material data set; learning and constructing a latent space for the chemical raw material data based on the superposition state of quantum bits, and expanding the chemical raw material data set using an adversarial network with the latent space; and training the chemical raw material detection model using the expanded chemical raw material data set;
[0042] The chemical raw material data detection module is configured to use the trained chemical raw material detection model to detect the chemical raw material data to be detected and obtain the chemical raw material identification result.
[0043] The third aspect of the present invention provides a medium on which a program is stored. When the program is executed by a processor, the steps in the chemical raw material detection method based on an adversarial network as described in the first aspect of the present invention are implemented.
[0044] The fourth aspect of the present invention provides a device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the chemical raw material detection method based on the adversarial network as described in the first aspect of the present invention are implemented.
[0045] One or more of the above technical solutions have the following beneficial effects:
[0046] The present invention discloses a chemical raw material detection method, system, medium and equipment based on adversarial network:
[0047] 1. In the process of chemical raw material detection, it is very time-consuming and costly to obtain enough samples of annotated chemical raw material data. It is difficult for the existing technology to train a model with good generalization ability through limited samples of chemical raw material data, resulting in inaccurate detection results or poor classification effects. In order to solve the above-mentioned shortcomings of the prior art, the present invention expands chemical raw material data through a generative adversarial network based on multiple quantum superposition states. The generator uses quantum state superposition to generate high-dimensional and high-complexity simulated chemical raw material data, and the discriminator enhances the discrimination ability through a dynamic adversarial game mechanism, which effectively solves the problem of poor model generalization ability due to insufficient training samples and improves the accuracy of the model.
[0048] 2. In the feature extraction process of chemical raw material data analysis, the existing neural network model is prone to gradient vanishing or gradient explosion when training complex chemical raw material data, which leads to reduced model training efficiency and difficulty in converging to the global optimal solution, affecting the effect of feature extraction and the performance of the model. In order to solve the above-mentioned shortcomings of the prior art, the present invention adopts a neural network algorithm based on dynamic population evolution optimization in feature extraction, dynamically adjusts the evolution rules through a self-correction mechanism, and automatically adapts to the distribution of different chemical raw material data, effectively preventing the problems of gradient vanishing, gradient explosion and falling into the local optimum during the neural network training process, and improving the stability and efficiency of the feature extraction model.
[0049] 3. When analyzing chemical raw material data, the existing dimensionality reduction technology is difficult to maintain the important information of the original chemical raw material data during the dimensionality reduction process, and at the same time weakens the redundant or noise features, resulting in the inability of the features after dimensionality reduction to fully express the original chemical raw material data, thereby affecting the subsequent classification performance. In order to solve the above-mentioned shortcomings of the prior art, the feature dimensionality reduction of the present invention adopts an autoencoding neural network model based on feature refinement, and uses a feature adjustment module to dynamically optimize feature weights according to feature importance to ensure the strengthening of important features and the weakening of noise features. While ensuring the integrity of feature information after dimensionality reduction, this model reduces the redundant information of chemical raw material data and improves the simplicity of the model and the ability to retain information.
[0050] 4. Chemical raw material data usually has high dimensionality and nonlinear characteristics. Existing classification algorithms are difficult to find accurate classification boundaries in complex chemical raw material data space, resulting in poor classification effects for different categories of raw materials. In order to solve the above-mentioned shortcomings of the prior art, the classifier model of the present invention adopts a support vector machine based on Riemannian geometry optimization to construct the Riemann manifold space where the chemical raw material data is located, and adjusts the model parameters through a stochastic partial differential equation optimization mechanism. The model can more accurately find the optimal classification hyperplane in the high-dimensional nonlinear chemical raw material data space, solving the problem of insufficient classification accuracy of traditional classifiers when processing complex chemical raw material data.
[0051] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0053] Figure 1 This is a flow chart of a chemical raw material detection method based on an adversarial network in Embodiment 1 of the present invention;
[0054] Figure 2 This is a training flow chart of a neural network algorithm based on dynamic population evolution optimization in Embodiment 1 of the present invention;
[0055] Figure 3 This is a training flow chart of the autoencoding neural network algorithm based on feature refinement in Example 1 of the present invention. DETAILED DESCRIPTION
[0056] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0057] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "include" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or their combinations;
[0058] Embodiment 1:
[0059] Embodiment 1 of the present invention provides a chemical raw material detection method based on an adversarial network, such as Figure 1 As shown, the following steps are included:
[0060] Step 1: Obtain the data of the chemical raw materials to be tested.
[0061] Step 2: construct a chemical raw material detection model and train the chemical raw material detection model.
[0062] The training steps include:
[0063] Step 2.1: Obtain a known chemical raw material data set and annotate the chemical raw material data in the chemical raw material data set.
[0064] Step 2.1.1: Obtain a known chemical raw material data set. The chemical raw material data of the present invention is collected from the raw material detection equipment used in the chemical production process. Specifically, the chemical raw material data is acquired in real time through a high-precision sensor array and an online monitoring system. The chemical raw material data acquisition method includes multi-point and multi-time acquisition of key parameters of chemical raw materials at different production stages, and the collected chemical raw material data is stored in the form of discrete vectors. Preferably, the chemical raw material data storage format is a structured chemical raw material database based on a CSV (comma separated value) file to facilitate subsequent chemical raw material data processing and model training.
[0065] In a specific implementation, the attributes of chemical raw material data include:
[0066] R a is the density, D a is viscosity, T a is the temperature, P a is the pressure, C a is the chemical composition content, V a is the volume, L a is the particle size distribution, S a is the surface tension, H a is humidity, W a is the moisture content.
[0067] It should be noted that this embodiment is only intended to illustrate a format and type of chemical raw material data of the present invention. In actual applications, the attributes of chemical raw material data are usually more than 10 attributes, and the number of attributes of chemical raw material data may reach dozens or even hundreds.
[0068] Step 2.1.2: Label the collected chemical raw material data. The labeling method of the present invention is manual labeling. In one embodiment, the labeling categories include "qualified raw materials", "defective raw materials" and "waste raw materials".
[0069] In this embodiment, 5 pieces of chemical raw material data and annotation examples are shown in Table 1:
[0070] Table 1. Examples of collected chemical raw material data and annotation
[0071] serial number <![CDATA[R a ]]> <![CDATA[D a ]]> <![CDATA[T a ]]> <![CDATA[P a ]]> <![CDATA[C a ]]> <![CDATA[V a ]]> <![CDATA[L a ]]> <![CDATA[S a ]]> <![CDATA[H a ]]> <![CDATA[W a ]]> Annotation 1 1.05 0.89 25 0.1 99.5 500 50 0.072 10 0.5 Qualified raw materials 2 1.02 0.92 27 0.12 98.7 480 55 0.074 12 0.7 Qualified raw materials 3 1.08 1.10 30 0.15 97.0 450 60 0.070 15 1.0 Defective raw materials 4 1.00 0.85 22 0.08 95.5 520 65 0.073 8 1.5 Waste materials 5 1.06 0.88 26 0.11 99.0 510 52 0.071 11 0.6 Qualified raw materials
[0072] Step 2.2: Based on the superposition state of quantum bits, learn the chemical raw material data to construct a latent space, and use the adversarial network with latent space to expand the chemical raw material data set.
[0073] The acquisition, labeling and preprocessing of training chemical raw material data are time-consuming and labor-intensive, and insufficient training samples easily lead to poor generalization ability of the model, while affecting the accuracy of the model. In the chemical raw material data expansion stage, the present invention adopts a generative adversarial network algorithm based on multiple quantum superposition states to generate samples, thereby realizing chemical raw material data expansion. The generative adversarial network model is composed of a generator and a discriminator, wherein the generator utilizes the characteristics of the quantum superposition state to construct a superposition of multiple probability amplitudes in the latent space to generate chemical raw material data with high diversity and authenticity. The discriminator forms a closed-loop structure with the generator through a dynamic confrontation game mechanism. And combined with the feature decoupling mechanism, the high-dimensional feature space is decomposed, which improves the model's ability to distinguish different feature dimensions.
[0074] Specifically, the training process of the generative adversarial network algorithm based on multiple quantum superposition states is as follows:
[0075] Step 2.2.1: Construct hidden space by learning chemical raw material data based on the superposition state of quantum bits.
[0076] Step 2.2.1.1: Calculate the quantum state and quantum state energy.
[0077] In the present invention, quantum refers to the smallest unit of randomness or disturbance factor in the data generation process. The present invention uses the random characteristics of quantum to construct a diversified feature space of chemical raw material data, making the data generation process random and highly diverse, so as to simulate the complexity of chemical raw material properties in a real environment.
[0078] In the present invention, quantum states represent the complexity and diversity of chemical raw material data, that is, a hidden space is constructed by superposition of multiple quantum states. In the hidden space, the probability amplitude of each quantum state can characterize different characteristic distribution patterns of chemical raw materials.
[0079] Specifically, the latent space is obtained by superimposing the probability amplitudes of quantum states. The generator can sample the noise vector from this space to generate data samples with diversity and authenticity. The construction of the latent space enables the generator to efficiently generate more diverse simulation data and express the complex patterns of chemical raw materials in high-dimensional space.
[0080] (1) Randomly initialize the parameters of the generator and discriminator. Let the weight matrix of the generator be expressed as The bias vector of the generator is The weight matrix of the discriminator is The bias vector of the discriminator is At the same time, set the learning rate η of the generative adversarial network c and the initial parameter θ of the quantum superposition state c .
[0081] (2) In the generator, the superposition state of quantum bits is used to construct a hidden space. The hidden space is composed of the linear superposition of multiple quantum states and can represent the distribution of complex chemical raw material data. The generator samples a noise vector from the quantum superposition state hidden space. The vector is formed by the superposition of multiple quantum states and is specifically expressed as:
[0082]
[0083] In the formula, z c is the noise vector in the latent space; K c is the number of quantum states; α c,k is the probability amplitude of the kth quantum state; |ψ c,k > is the kth quantum state.
[0084] (3) In the process of constructing the quantum superposition hidden space, the quantum state |ψ c,k The calculation method of > is expressed as:
[0085]
[0086] In the formula, |ψ c,k > is the kth quantum state; i * is the imaginary unit; θ c,k and φ c,k are the polar angle and phase angle of the kth quantum bit respectively; |0> and |1> are the ground state and excited state in quantum computing.
[0087] (4) The calculation method of the energy of the quantum state is expressed as:
[0088] E c,k =-h c ω c cos(θ c,k ).
[0089] In the formula, E c,k is the energy of the kth quantum state; h c is the scaled Planck constant; ω c is the angular frequency of the quantum system.
[0090] Step 2.2.1.2: Calculate the probability amplitude of the quantum state based on the quantum state energy and the normalization factor.
[0091] The formula is:
[0092]
[0093] In the formula, α c,k is the probability amplitude of the kth quantum state; β c is the inversion parameter, which controls the steepness of the probability distribution; E c,k is the energy of the kth quantum state.
[0094] Step 2.2.1.3: Use the quantum state mapping function to measure and simulate the quantum superposition state based on the probability amplitude of the quantum state, map the probability amplitude of the quantum state to the real number domain and superimpose it to obtain the hidden space.
[0095] The quantum superposition state is measured and simulated using the quantum state mapping function, and is mapped to the real number domain, which is expressed as:
[0096]
[0097] In the formula, φ c () is the quantum state mapping function, φ c (z c ) is the real number vector after mapping; For K c The observation operator corresponding to the quantum state; <||> represents the expected value calculation of the quantum state; is the observation operator corresponding to the first quantum state; is the observation operator corresponding to the second quantum state; ψ c,1 is the first quantum state; ψ c,2 is the second quantum state; For K c The observation operator corresponding to the quantum state refers to the mathematical operator used to measure the quantum state. In the present invention, the observation operator corresponding to the quantum state is used to simulate the probability amplitude of the generated quantum state and map it to the real number domain to construct a hidden space, which helps to generate simulated data with high-dimensional characteristics in the multiple superposition of quantum states.
[0098] Step 2.2.2: The specific steps for expanding the chemical raw material data set using the adversarial network with latent space are:
[0099] Step 2.2.2.1: Use the generator to sample a noise vector formed by the superposition of multiple quantum states from the latent space to generate simulated chemical raw material data.
[0100] (1) By sampling from the quantum superposition state hidden space, the generator generates simulated chemical raw material data. These chemical raw material data have high dimensions and high complexity in the feature space. The generator generates simulated chemical raw material data using quantum superposition state noise as follows:
[0101]
[0102] In the formula, The simulated chemical raw material data generated by the generator; G c () is the generator function; σ c () is the activation function of the generator.
[0103] (2) Set is the input vector of the activation function of the generator. The activation function of the generator adopts the calculation method of polynomial terms to increase the generation ability of nonlinear features. The calculation method is expressed as:
[0104]
[0105] In the formula, x c is the input vector of the generator’s activation function; β c The first adjustment parameter for the generator’s activation function, γ c The second adjustment parameter for the activation function of the generator; α c is the cubic coefficient; ζ c and δ c is a parameter that controls the amplitude and frequency of the sinusoidal term. Preferably, β c Set to 0.1, γ c Set to 0.3, α c Set to 0.1, ζ c Set to 0.1, δ c Set to 0.2.
[0106] Step 2.2.2.2: Use the discriminator to receive the real chemical raw material data and the chemical raw material data generated by the generator, and discriminate the authenticity of different chemical raw material data.
[0107] (1) The discriminator discriminates the chemical raw material data: The discriminator receives the real chemical raw material data and the chemical raw material data generated by the generator, and outputs the result of discriminating the authenticity of the chemical raw material data, which is expressed as:
[0108]
[0109] Where D c () is the discriminator function; X c is the input of the discriminator, which may be real chemical raw material data or chemical raw material data generated by the generator; δ c() is the activation function of the discriminator.
[0110] (2) Set is the input vector of the activation function of the discriminator. The activation function of the discriminator adopts the calculation method of Gaussian function term to increase the discriminative ability of nonlinear features. The calculation method is expressed as:
[0111]
[0112] In the formula, x cs is the input vector of the activation function of the discriminator; c The first adjustment parameter of the activation function of the discriminator, θ c is the second adjustment parameter of the activation function of the discriminator; η c is the amplitude of the Gaussian function; μ c and σ c is the mean and standard deviation of the Gaussian function. Preferably, c Set to 0.2, θ c Set to 0.3, η c Set to 0.02.
[0113] Step 2.2.2.3: The discriminator conducts dynamic adversarial game training with the generator based on the discrimination results to obtain expanded chemical raw material data.
[0114] Dynamic adversarial game training is carried out between the generator and the discriminator. The generator is continuously optimized to generate more realistic chemical raw material data, while the discriminator continuously improves its ability to distinguish generated chemical raw material data. The goal of the generator is to minimize the probability that the chemical raw material data it generates is identified as false by the discriminator, while the goal of the discriminator is to maximize the probability of correctly identifying real and generated chemical raw material data.
[0115] (1) The generator continuously optimizes parameters with the goal of minimizing the probability that the generated chemical raw material data is identified as false by the discriminator.
[0116] The loss function of the generator is defined as:
[0117]
[0118] In the formula, is the loss function of the generator; N c is the batch size of the generator; is the sample of chemical raw material data generated for the ith time; μ c is the gradient penalty coefficient; is the generator noise z c,i The gradient norm of z c,i is the i-th noise input to the generator; ∥∥ is the L2 norm.
[0119] (2) During the dynamic adversarial game training process, gradient penalty is used in the generator’s loss function.
[0120] The calculation method is expressed as:
[0121]
[0122] Where M c The dimension of the generator output; is the symbol of partial derivative; G c,m (z c,i ) is the mth component of the generator output.
[0123] The characteristic data of chemical raw materials usually have a certain degree of continuity or smoothness in high-dimensional space. Gradient penalty can ensure that the generated data changes smoothly in the characteristic space, thereby better simulating the distribution characteristics of real data and making the generated data have better continuity and physical rationality.
[0124] (3) A feature decoupling mechanism is used in the discriminator to decompose the input high-dimensional chemical raw material data features into several low-dimensional sub-features, and the low-dimensional sub-features are discriminated separately to reduce the correlation between features.
[0125] Specifically, for the input X of the discriminator c Decouple features to obtain sub-feature sets The feature decoupling process is as follows:
[0126]
[0127] In the formula, is the jth decoupled sub-feature; For nth c decoupled sub-features; is the j-th feature mask vector, the j-th dimension is 1, and the remaining dimensions are 0; is the jth feature weight; ⊙ represents the element-wise multiplication operation; n c is the total number of features.
[0128] The update of feature weights takes into account the importance and sparsity of the features, and uses sparse regularization to update them in each iteration, which can be expressed as:
[0129]
[0130] In the formula, ← is the parameter update; is the sparse regularization coefficient of the jth feature; is a symbolic function that promotes the sparsification of feature weights; is the loss function of the discriminator.
[0131] (4) The discriminator continuously optimizes parameters with the goal of maximizing the probability of correctly identifying real and generated chemical raw material data.
[0132] The loss function of the discriminator is defined as:
[0133]
[0134] In the formula, is the loss function of the discriminator; is the i-th sample of real chemical raw material data; η c is the feature decoupling regularization coefficient; is the square norm of the jth sub-feature.
[0135] (5) During the dynamic adversarial game training process, the feature decoupling regularization term in the discriminator’s loss function adopts a penalty for feature correlation.
[0136] The calculation method is expressed as:
[0137]
[0138] In the formula, is the correlation coefficient between the jth and kth features; express The transpose of .
[0139] Chemical raw material data often has a complex high-dimensional structure, and there may be strong correlations between various features. If the discriminator learns these correlation features without control during the training process, it may ignore subtle but important features, thereby affecting the accuracy of classification and discrimination. Through feature correlation penalty, the discriminator can better focus on independent features, thereby improving the ability to distinguish data.
[0140] (6) During the training process, the total loss function of the generative adversarial network is used to optimize the parameters of the generator and discriminator.
[0141] The total loss function of the generative adversarial network combines the characteristics of chemical raw material data and adopts an adaptive weight adjustment mechanism to enable the model to learn the distribution of chemical raw material data more accurately. The calculation method is expressed as:
[0142]
[0143] In the formula, is the total loss function of the generated adversarial network; and is the adaptive weight of the generator and the discriminator, satisfying
[0144] The update rules for the adaptive weights of the generator and discriminator are:
[0145]
[0146] In the formula, κ c A weight tuning parameter that controls the sensitivity of weight updates.
[0147] (7) The generator and discriminator are trained iteratively until the model converges and the quality of the generated chemical raw material data meets the expected requirements.
[0148] Repeat the above steps and continuously iterate the training of the generator and discriminator until the model converges and the quality of the generated chemical raw material data meets the expected requirements. In each iteration, the parameters of the generator and discriminator are updated respectively. In the parameter update, the momentum term is added to the gradient calculation of the generator and discriminator to accelerate convergence.
[0149] Specifically, the method of updating the generator parameters is expressed as:
[0150]
[0151] The way to update the discriminator parameters is expressed as:
[0152]
[0153] In the formula, and is the gradient of the total loss function with respect to the generator weights and biases; and is the gradient of the total loss function with respect to the discriminator weights and biases; ν c is the momentum coefficient; and The change in the generator weights and biases updated in the previous round; and is the change in the discriminator weights and biases updated in the last round. Preferably, ν c Set to 0.3.
[0154] After the training of the generative adversarial network is completed, the generator is used to generate a large amount of high-quality chemical raw material data to form an expanded training data set of chemical raw material data, providing rich chemical raw material data support for subsequent feature extraction and model training.
[0155] Step 2.3: Construct a chemical raw material detection model.
[0156] In this embodiment, the chemical raw material detection model includes:
[0157] Feature extraction model, used to extract features from chemical raw material data.
[0158] The feature dimension reduction model is used to reduce the dimension of the extracted features.
[0159] The classifier model is used to classify and identify chemical raw material data after dimensionality reduction.
[0160] Step 2.4: Use the expanded chemical raw material dataset to train the chemical raw material detection model.
[0161] Step 2.4.1: Use the expanded chemical raw material data set to train the feature extraction model based on the dynamic population optimization algorithm to obtain the extracted chemical raw material data features.
[0162] The expanded chemical raw material data is input into the feature extraction model to train the feature extraction model. The present invention uses a 6-layer fully connected neural network for feature extraction. In the prior art, some schemes use neural networks for feature extraction. In some neural network structures, gradient disappearance, gradient explosion or falling into local optimal solutions may be encountered, affecting the stability of training and the performance of the model. The present invention uses a neural network algorithm based on dynamic population evolution optimization as a feature extraction model. The specific steps are as follows Figure 2 As shown in the figure, the population is initialized first, and the loss is calculated for each individual. The performance is evaluated based on the loss, and the best performing individual is selected. Then the crossover operation generates new individuals, and the mutation operation increases the diversity of individuals. The model training is completed when the iteration stop condition is reached.
[0163] In traditional population evolution algorithms, the evolution of all individuals is based on fixed rules. The present invention utilizes a self-correction mechanism to automatically adjust the evolution rules according to the characteristics of the current training chemical raw material data, and adjusts the probabilities of crossover and mutation according to the changing trend of the loss function, thereby making the algorithm more flexibly adaptable to the distribution of different chemical raw material data and improving the generalization ability and training efficiency of the model.
[0164] Specifically, the training process of the neural network algorithm based on dynamic population evolution optimization is as follows:
[0165] Step 2.4.1.1: According to the bionic algorithm initialization method, generate an initial population in the initialization stage. Each individual represents a configuration of network weights. Specifically, let the population size be N. p , initialize the weights and biases for the i-th individual, expressed as:
[0166]
[0167] Where W pi is the weight of the neural network corresponding to the i-th individual, b pi is the bias of the neural network corresponding to the i-th individual, Represents the weight matrix of the i-th individual in the initial state; represents the bias of the i-th individual in the initial state; σ 2 represents the initialization variance; Indicates that the mean is 0 and the variance is σ 2 Normal distribution of is a normal distribution. Preferably, σ 2 Set to 0.01.
[0168] Step 2.4.1.2: For each individual in the population, use the neural network configuration corresponding to the individual to process the input training chemical raw material data, calculate the output of the model and the loss of each individual, and evaluate its performance according to the predetermined loss function. Among them, the above algorithm is a type of improvement in the swarm intelligence algorithm. In this field, the individuals in the swarm intelligence algorithm refer to a set of parameter solutions of the object to be optimized, each having a corresponding neural network.
[0169] Specifically, for the i-th individual, its weight and bias are used to calculate the loss on the training data set of chemical raw material data, expressed as:
[0170]
[0171] Where, L pi is the loss of the neural network corresponding to the i-th individual; mps represents the number of samples input in the current batch; l() represents the composite loss function, and fsig() represents the neural network model function; Represents the characteristics of the jth sample; represents the label of the jth sample.
[0172] In a specific implementation, the composite loss function includes a regularization term, which can increase the generalization ability of the model. The calculation method is expressed as:
[0173]
[0174] Where MSE() is the mean square error function, Reg(W pi ) is the regularization term, λ ps is the regularization parameter.
[0175] The calculation method of the regularization term is expressed as:
[0176]
[0177] Where W pi,k is the kth weight of the neural network corresponding to the i-th individual.
[0178] Step 2.4.1.3: Based on the fitness of the individuals, select the best performing individuals from the current population and retain them as candidate solutions for the next generation.
[0179] Among them, the best performing individual specifically refers to the individual that minimizes the composite loss function in all previous iterations including this iteration, that is, the parameter combination of the neural network that minimizes the composite loss function.
[0180] Specifically, based on the fitness of individuals, excellent individuals have a higher probability of being selected. The calculation method of the probability of individuals being selected is expressed as:
[0181]
[0182] Where P select (i) represents the probability of the i-th individual being selected; γ pse is the parameter that controls the selection pressure; L pk is the loss of the neural network corresponding to the kth individual. Preferably, γ pse Set to 2.
[0183] Step 2.4.1.4: Generate new individuals through crossover and mutation operations. The crossover operation allows two excellent individuals to exchange some genes to generate new offspring; the mutation operation randomly changes some genes in an individual to increase the diversity of the population. Specifically, the crossover operation randomly selects two individuals for gene exchange, which is expressed as:
[0184] W′ pi =α pcs W p1 +(1-α pcs )W p2 ,
[0185] b′ pi =α pcs b p1 +(1-α pcs )b p2 .
[0186] In the formula, α pcs is the crossover rate, W p1 is the weight of the neural network corresponding to the first individual selected, b p1 is the bias of the neural network corresponding to the first individual selected, W p2 is the weight of the neural network corresponding to the second individual selected, b p2 is the bias of the neural network corresponding to the second individual selected, W′ pi is the weight of the neural network corresponding to the individual after the crossover operation, b′ pi is the bias of the neural network corresponding to the individual after the crossover operation. Preferably, α pcs Set to 0.3.
[0187] Moreover, the mutation operation performs a small random perturbation on the newly generated individual weights, which can be expressed as:
[0188]
[0190] In the formula, τ 2 represents the variance of variation, W″ pi is the weight of the neural network corresponding to the individual after the mutation operation, b″ pi is the bias of the neural network corresponding to the individual after the mutation operation. Preferably, τ 2 Set to 0.04.
[0191] Step 2.4.1.5: Repeat the above steps until the preset stop iteration condition is met, indicating that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0192] Step 2.4.2: Use the extracted chemical raw material data features to train the feature dimensionality reduction model based on the feature refinement autoencoding neural network algorithm to obtain the chemical raw material data after dimensionality reduction.
[0193] The chemical raw material data after feature extraction is input into the feature dimensionality reduction model to train the feature dimensionality reduction model. The present invention adopts an autoencoder neural network based on feature refinement as the dimensionality reduction model. The autoencoder neural network based on feature refinement consists of three parts: an encoder, a decoder, and a feature adjustment module. Figure 3 As shown in the figure, the encoder is responsible for mapping the high-dimensional input chemical raw material data to the low-dimensional feature space, generating low-dimensional features and passing them to the feature adjustment module. The feature adjustment module dynamically adjusts the feature space after dimensionality reduction through recursive feature adaptive optimization, so that important features can be strengthened and secondary features are gradually weakened, so that the feature representation after dimensionality reduction has better simplicity while retaining the chemical raw material data information. Among them, the dynamic adjustment of the feature space after dimensionality reduction through recursive feature adaptive optimization includes the steps of generating initial feature weights, optimizing weights, and generating optimized features. Finally, the optimized features are reconstructed back to the original space after dimensionality reduction through the decoder to obtain high-dimensional chemical raw material data, and the loss is calculated until the iteration condition is reached to ensure the reversibility of the dimensionality reduction process.
[0194] Specifically, the training process of the autoencoder neural network algorithm based on feature refinement is as follows:
[0195] Step 2.4.2.1: Use the encoder to reduce the dimension of the features obtained by the feature extraction module to generate low-dimensional features. Suppose the chemical raw material data input to the autoencoder neural network is X r, the encoder uses a multi-layer nonlinear mapping structure to map the high-dimensional chemical raw material data to the initial low-dimensional feature space, which is expressed as:
[0196] Z r =Sig enc (W r X r +b r ).
[0197] In the formula, Z r represents the initial low-dimensional features, W r is the weight matrix of the encoder, b r is the bias vector of the encoder, Sig enc () is the multi-layer Sigmoid activation function of the encoder.
[0198] Step 2.4.2.2: After the low-dimensional features are generated, the feature adjustment module automatically generates feature weights according to the feature importance in the current feature space.
[0199] When the module is initialized, the same initial weights are given to all features so that they can be gradually adjusted according to the feature contributions in subsequent steps. The calculation method of the initial weight matrix is expressed as:
[0200] A r =diag(α r ).
[0201] In the formula, A r is the initial weight matrix; α r is the feature weight vector, α r Each element α in r,i Initialized to the same value, indicating that all features have the same importance in the initial stage; diag() is a function for extracting the diagonal elements of the matrix.
[0202] The adjusted features can be expressed as:
[0203] Z′ r =A r Z r .
[0204] In the formula, Z′ r is the feature representation after feature weight adjustment.
[0205] Step 2.4.2.3: The feature adjustment module recursively optimizes the initially generated low-dimensional features.
[0206] In each round of iteration, the module adjusts the weights of each feature according to the performance of the previous round of features, gradually enhancing those features with important influences and gradually weakening redundant or noisy features. Suppose that in the tth round of iteration, the weight update rule is as follows:
[0207]
[0208] In the formula, represents the feature weight of the t+1th iteration, represents the feature weight of the tth iteration, η r is the learning rate of the autoencoder neural network, L r () is the loss function of the autoencoder neural network, Y r To label chemical raw material data, represents the gradient of the loss function with respect to the feature weight. Preferably, the loss function of the autoencoder neural network is the reconstruction error loss function. Preferably, η r Set to 0.01.
[0209] Step 2.4.2.4: To ensure the effectiveness of the dimensionality reduction process, the decoder remaps the low-dimensional features back to the high-dimensional space to ensure that no important information is lost in the dimensionality reduction process.
[0210] The reconstruction process of the decoder is expressed as:
[0211] X′ r =Sig dec (W′ r Z′ r +b′ r ).
[0212] In the formula, X′ r is the reconstructed high-dimensional chemical raw material data, W′ r is the weight matrix of the decoder, b′ r is the bias vector of the decoder, Sig dec () is the multi-layer Sigmoid activation function of the decoder.
[0213] Step 2.4.2.5: Repeat the above steps until the preset stop iteration condition is met, indicating that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0214] Step 2.4.3: Use the chemical raw material data after dimensionality reduction to train the classifier model based on the support vector machine algorithm optimized by Riemannian geometry to obtain the classification and recognition results.
[0215] The chemical raw material data after dimensionality reduction is input into the classifier model to train the classifier model. The present invention adopts a support vector machine algorithm based on Riemannian geometry optimization as a classification algorithm to classify the chemical raw material data after feature dimensionality reduction. Specifically, the support vector machine uses the Riemannian geometry optimization method to find the optimal classification hyperplane in the manifold space. Further, combined with the random partial differential equation optimization mechanism, the model parameters are dynamically adjusted, which improves the performance of the classifier under high-dimensional nonlinear chemical raw material data, so that the classifier can better adapt to the complex characteristics of chemical raw material data and accurately distinguish different categories of raw materials.
[0216] Specifically, the training process of the support vector machine algorithm based on Riemannian geometry optimization is as follows:
[0217] Step 2.4.3.1: Initialize the model parameters of the support vector machine and randomly initialize the weight vector and bias term of the support vector machine.
[0218] Assume that the initial weight vector of the support vector machine is The initial support vector machine bias term is The weight vector of the support vector machine is w u , the bias term of the support vector machine is b u , and set the learning rate of the support vector machine to be η u , the random perturbation intensity is σ u and the time step is Δt u .
[0219] Step 2.4.3.2: Based on the training chemical raw material data after feature dimensionality reduction, construct the Riemann manifold space where the chemical raw material data is located.
[0220] Specifically, by calculating the intrinsic geometric relationship between chemical raw material data points, the metric tensor of the manifold is determined to characterize the nonlinear structure of chemical raw material data. Suppose the training chemical raw material data after feature dimensionality reduction is {x u,i ,y u,i}, construct the Riemann manifold where the chemical raw material data is located Calculate the metric tensor g u,ij (x u ), which is used to characterize the intrinsic geometric structure of chemical raw material data and use the second-order derivative information to capture the curvature characteristics of chemical raw material data. The metric tensor is defined as:
[0221]
[0222] In the formula, g u,ij (x u ) is at point x u The metric tensor component at ; is the kth component of the characteristic mapping function, which maps the chemical raw material data to a high-dimensional space; and are the i-th and j-th components of the chemical raw material data characteristics; d u is the dimension of the feature space; ρ u To adjust the parameters, control the influence of the second-order partial derivative.
[0223] Step 2.4.3.3: In the Riemann manifold space, define the optimization objective of the support vector machine, that is, to find a hyperplane that can maximize the classification interval. The objective function takes into account the distribution characteristics of chemical raw material data on the manifold, so that the model can more accurately reflect the essential attributes of chemical raw material data. Specifically, in the Riemann manifold The objective function of the support vector machine is defined as minimizing the following structural risk:
[0224]
[0225] Where, L u is the objective function of the support vector machine; is the inner product of the weight vector on the manifold, which measures the complexity of the model; C u is the regularization parameter of the support vector machine, balancing the loss and model complexity; ξ u,i is the slack variable of the i-th sample, indicating the classification error; γ u is the exponent of the slack variable, which controls the growth rate of the error penalty; u is the regularization coefficient to prevent overfitting; R u () is a complex regularization term that enhances the generalization ability of the model; N u is the number of samples. Preferably, u Set to 0.3.
[0226] The calculation method of the inner product of the weight vector on the manifold is expressed as:
[0227]
[0228] In the formula, and is the weight vector w u The i-th and j-th components of .
[0229] The complex regularization term is calculated based on sparsity and high-order terms and is expressed as:
[0230]
[0231] Where, d u is the dimension of the weight vector, indicating the number of features; γ u is the sparse regularization coefficient, which promotes the sparsity of weights; θ uis a high-order regularization coefficient that controls the quartic term to prevent overfitting. Preferably, γ u Set to 0.1, θ u Set to 0.2.
[0232] Step 2.4.3.4: Apply the stochastic partial differential equation to the optimization process of the model parameters, add a random perturbation term when updating the gradient, so that the update trajectory of the parameters is random and can explore a wider parameter space. In order to optimize the model parameters, the stochastic gradient descent method is combined with the stochastic partial differential equation, and the parameter update rule is:
[0233]
[0234] Where, dw u and db u is a small change in weights and biases; is the objective function with respect to w u The gradient of u is the diffusion coefficient on the manifold; is the Laplace-Beltrami operator acting on w u Up; dt u is the time step; dB u (t u ) and dB u (t u ) is the Brownian motion increment, providing random disturbance. Preferably, η u Set to 0.01, σ u Set to 0.2, α u Set to 0.1.
[0235] Step 2.4.3.5: The calculation method of the Laplace-Beltrami operator is expressed as:
[0236]
[0237] In the formula, |g u | is the determinant of the metric tensor; is the inverse matrix element of the metric tensor.
[0238] Step 2.4.3.6: In the manifold space, calculate the Riemann gradient of the objective function with respect to the model parameters, and use the metric tensor to correct the gradient to obtain the gradient direction consistent with the manifold structure. The calculation method is expressed as:
[0239]
[0240] In the formula, G u is the metric tensor matrix [g u,ij ]; w u is the current weight vector; Increase the penalty for samples with large errors; u,i is the label of the i-th sample; φ u (x u,i ) is the feature mapping function; is the gradient of the regularization term.
[0241] Step 2.4.3.7: Update the weight vector and bias term of the support vector machine according to the Riemann gradient and the stochastic partial differential equation.
[0242] Specifically, parameter updating includes determining the update direction, calculating the update step size, and applying random perturbations.
[0243] (1) Update weights and biases in discrete form, expressed as:
[0244]
[0245] In the formula, and For the tth u The weights and biases of the iterations; ΔB u and ΔB u is the discrete increment of the Brownian motion.
[0246] (2) The Brownian motion increment in parameter update is simulated by Gaussian distribution, which is expressed as:
[0247]
[0248] In the formula, represents normal distribution; I u is the unit matrix; Δt u is the time step, ensuring that the scale of the random perturbations matches the time step.
[0249] Step 2.4.3.8: Repeat the process of calculating the Riemann gradient and updating the model parameters to gradually approach the optimal solution.
[0250] In each iteration, the classification performance of the model on the training chemical raw material data is evaluated to monitor the optimization progress. At the same time, in each iteration, the slack variables are updated, expressed as:
[0251]
[0252] In the formula, is the inner product of weights and features on the manifold.
[0253] Furthermore, the inner product The calculation method is expressed as:
[0254]
[0255] In the formula, For the tth u The jth component of the weight vector in the iteration; g u,jk (x u,i ) is the sample x u,i Elements of the metric tensor; is the kth component of the feature mapping function.
[0256] Step 2.4.3.9: Set convergence conditions, such as the change in the objective function value is less than the set threshold or the maximum number of iterations is reached. When the convergence conditions are met, stop the iteration and complete the model training.
[0257] Step 2.4.3.10: After the above optimization process, the support vector machine classifier improved by Riemann geometry optimization and stochastic partial differential equation is obtained, and the final weight is obtained. and bias The decision function is:
[0258]
[0259] Finally, for the new sample x u Classification is performed, expressed as:
[0260]
[0261] Where, sign() is the sign function, and the output is +1 or -1, corresponding to different types of chemical raw materials; y u For classification categories.
[0262] Step 3: Use the trained chemical raw material detection model to detect the chemical raw material data to obtain the chemical raw material identification result.
[0263] In a specific implementation, after the model training is completed, the collected raw chemical raw material data to be tested is input into the trained feature extraction and feature dimension reduction model for feature processing, and further, the processed features are input into the classifier model for classifier training to obtain the classification results. In this embodiment, the classification categories include "qualified raw materials", "defective raw materials" and "waste raw materials".
[0264] Embodiment 2:
[0265] Embodiment 2 of the present invention provides a chemical raw material detection system based on an adversarial network, comprising:
[0266] A chemical raw material data acquisition module is configured to acquire chemical raw material data to be detected;
[0267] The model building module is configured to build a chemical raw material detection model and train the chemical raw material detection model, wherein the training step includes: obtaining a known chemical raw material data set and annotating the chemical raw material data in the chemical raw material data set; learning and constructing a latent space for the chemical raw material data based on the superposition state of quantum bits, and expanding the chemical raw material data set using an adversarial network with the latent space; and training the chemical raw material detection model using the expanded chemical raw material data set;
[0268] The chemical raw material data detection module is configured to use the trained chemical raw material detection model to detect the chemical raw material data to be detected and obtain the chemical raw material identification result.
[0269] Embodiment three:
[0270] Embodiment 3 of the present invention provides a medium on which a program is stored. When the program is executed by a processor, the steps in the chemical raw material detection method based on an adversarial network as described in Embodiment 1 of the present invention are implemented.
[0271] Embodiment 4:
[0272] Embodiment 4 of the present invention provides a device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the chemical raw material detection method based on the adversarial network as described in Embodiment 1 of the present invention are implemented.
[0273] The steps involved in the above embodiments 2, 3 and 4 correspond to the method embodiment 1. For the specific implementation methods, please refer to the relevant description part of embodiment 1.
[0274] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, 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. The present invention is not limited to any specific combination of hardware and software.
[0275] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A chemical raw material detection method based on adversarial network, characterized in that: The following steps are involved: Obtain data of chemical raw materials to be tested; Constructing a chemical raw material detection model and training the chemical raw material detection model, wherein the training steps include: obtaining a known chemical raw material data set and annotating the chemical raw material data in the chemical raw material data set; learning and constructing a latent space for the chemical raw material data based on the superposition state of quantum bits, and expanding the chemical raw material data set using an adversarial network with a latent space; and training the chemical raw material detection model using the expanded chemical raw material data set; The trained chemical raw material detection model is used to detect the chemical raw material data to be detected to obtain the chemical raw material identification results.
2. The chemical raw material detection method based on adversarial network according to claim 1, characterized in that: The specific steps for learning and constructing hidden space for chemical raw material data based on the superposition state of quantum bits are: Calculate quantum states and quantum state energies; Calculating the probability amplitude of the quantum state based on the quantum state energy and the normalization factor; The quantum superposition state is measured and simulated based on the probability amplitude of the quantum state using the quantum state mapping function, and the probability amplitude of the quantum state is mapped to the real number domain and superimposed to obtain the hidden space.
3. The chemical raw material detection method based on adversarial network according to claim 1, characterized in that: The specific steps of using the adversarial network with latent space to expand the chemical raw material data set are: The generator is used to sample a noise vector formed by the superposition of multiple quantum states from the latent space to generate simulated chemical raw material data; The discriminator receives the real chemical raw material data and the chemical raw material data generated by the generator, and discriminates the authenticity of different chemical raw material data; The discriminator conducts dynamic adversarial game training with the generator based on the discrimination results to obtain expanded chemical raw material data.
4. The chemical raw material detection method based on adversarial network as claimed in claim 3, characterized in that: The specific steps of the discriminator to conduct dynamic adversarial game training with the generator based on the discrimination results are as follows: The generator continuously optimizes parameters with the goal of minimizing the probability that the generated chemical raw material data is identified as false by the discriminator; The discriminator continuously optimizes parameters with the goal of maximizing the probability of correctly identifying real and generated chemical raw material data; The generator and discriminator are trained iteratively until the model converges and the quality of the generated chemical raw material data meets the expected requirements.
5. The chemical raw material detection method based on adversarial network according to claim 4, characterized in that: During the dynamic adversarial game training process, gradient penalty is used in the generator's loss function, and the feature decoupling regularization term in the discriminator's loss function uses feature correlation penalty.
6. The chemical raw material detection method based on adversarial network according to claim 1, characterized in that: Chemical raw material detection models include: Feature extraction model, used to extract features from chemical raw material data; Feature dimension reduction model, used to reduce the dimension of the extracted features; The classifier model is used to classify and identify chemical raw material data after dimensionality reduction.
7. The chemical raw material detection method based on adversarial network according to claim 6, characterized in that: The specific steps for training the chemical raw material detection model using the expanded chemical raw material data set are: The feature extraction model is trained using the expanded chemical raw material data set based on the dynamic population optimization algorithm to obtain the extracted chemical raw material data features; The feature dimension reduction model is trained using the extracted chemical raw material data features and the auto-encoding neural network algorithm based on feature refinement to obtain the chemical raw material data after dimension reduction; The classifier model is trained using the support vector machine algorithm based on Riemannian geometry optimization using the dimensionality-reduced chemical raw material data to obtain the classification and recognition results.
8. A chemical raw material detection system based on adversarial network, characterized in that: include: A chemical raw material data acquisition module is configured to acquire chemical raw material data to be detected; The model building module is configured to build a chemical raw material detection model and train the chemical raw material detection model, wherein the training step includes: obtaining a known chemical raw material data set and annotating the chemical raw material data in the chemical raw material data set; learning and constructing a latent space for the chemical raw material data based on the superposition state of quantum bits, and expanding the chemical raw material data set using an adversarial network with the latent space; and training the chemical raw material detection model using the expanded chemical raw material data set; The chemical raw material data detection module is configured to use the trained chemical raw material detection model to detect the chemical raw material data to be detected and obtain the chemical raw material identification result.
9. A computer-readable storage medium, characterized in that: A plurality of instructions are stored therein, and the instructions are suitable for being loaded by a processor of a terminal device and executing the chemical raw material detection method based on an adversarial network as described in any one of claims 1 to 7.
10. A terminal device, characterized in that: It includes a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded by the processor and executing the chemical raw material detection method based on adversarial network described in any one of claims 1-7.
Citation Information
Patent Citations
Chemical formula identification method based on group learning
CN117113220A
Water body detection method and device based on wastewater discharged by chemical engineering area
CN117726978A
Chemical wastewater classified recovery system and method capable of monitoring oil content in real time
CN118324239A
Cited By
Building digital twin data processing method based on artificial intelligence
CN119809467A
Woody feed silage quality evaluation method and system based on image analysis
CN121582255A
Image analysis-based method and system for evaluating quality of wood-based forage silage
CN121582255B