Intelligent online test process data anomaly detection method
By applying particle swarm optimization algorithm and deep sparse noise reduction autoencoder in intelligent online laboratory equipment, the problem of equipment lacking intelligent operation and maintenance and correction mechanism is solved, real-time detection and diagnosis of abnormal data is realized, and the improvement of improvement of abnormal data is improved. Test efficiency and accuracy of results.
Patent Information
- Application Number
- CN202411507154.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-28
AI Technical Summary
Intelligent online laboratory equipment lacks intelligent operation and maintenance and calibration mechanisms, and cannot detect and diagnose abnormal conditions in real time, resulting in equipment shutdown and affecting the test efficiency and accuracy of results.
The intelligent online test process data abnormality detection method based on particle swarm optimization algorithm and deep sparse noise reduction autoencoder is adopted to realize real-time detection of abnormal data through data preprocessing, model training and abnormal judgment mechanisms.
Effectively detect and diagnose abnormal data, avoid equipment downtime, improve laboratory efficiency and accuracy of results, provide intelligent operation and maintenance and correction mechanisms, and enhance the intelligence level of the equipment.
Smart Images

Figure CN119474670A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of operation and maintenance of intelligent testing equipment in the process of mine dressing and smelting, and specifically relates to an intelligent online testing process data anomaly detection method, specifically an intelligent online process anomaly detection method based on a particle swarm optimization algorithm and a deep sparse denoising autoencoder. Background Art
[0002] Ore dressing is a process that uses physical or chemical methods to separate useful minerals from useless or harmful minerals in mineral raw materials, or to separate multiple useful minerals. The overall process of mineral dressing production in my country is relatively mature, and the process is divided into raw material transportation, crushing, ball milling, flotation and testing.
[0003] Assay is an important part of the mineral processing process, specifically refers to the process of measuring the taste of the concentrate product obtained through the previous mineral processing process through various methods. At present, most process sites still use manual assay methods, which is to send the concentrate product to a specially set up assay laboratory, and experienced operators use titration to analyze the taste of the sample.
[0004] Since the manual method has the disadvantages of long testing cycle, high labor intensity, low efficiency, large errors, and inability to provide real-time guidance on the grinding production process, an intelligent online testing equipment was designed, which used robotic equipment to replace manual operation, thus realizing the intelligent online automated operation of the testing process.
[0005] However, the intelligent online testing equipment currently designed still lacks intelligent operation and maintenance and correction mechanisms, and cannot achieve real-time detection and diagnosis of abnormal conditions. Once a failure occurs during operation, the equipment will completely shut down until manually reset, which will affect the testing efficiency and the accuracy of the test results. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a method for detecting anomalies in data during an intelligent online test process. The method can effectively detect abnormal data and provide a new idea for solving the problem of the lack of intelligent operation and maintenance of intelligent online test equipment and the detection and diagnosis mechanism of abnormal conditions.
[0007] The technical solution of the invention is as follows:
[0008] An intelligent online test process data anomaly detection method comprises the following steps:
[0009] Step S101, collecting operation process data through intelligent online testing equipment and building a sample database;
[0010] Step S102, introducing the Min-Max data normalization method to pre-process the data and construct a data set;
[0011] Step S103, building an anomaly detection model based on DSDAE so that it can learn the data characteristics of normal data after training;
[0012] Step S104, introducing the PSO algorithm to optimize the number of neurons in the hidden layer of the constructed DSDAE model, determine the DSDAE model framework, and establish an anomaly detection model based on PSO-DSDAE;
[0013] Step S105, using a cumulative sum algorithm to determine the cumulative reconstruction residual of the model, and establishing an abnormality judgment mechanism by comparing it with a tolerance threshold;
[0014] Step S106, using the normal data set data to train the PSO-DSDAE-based anomaly detection model so that the model can learn the potential characteristics of normal data. When the loss function of the model converges, the model training is considered to be completed, that is, the model has the ability to reconstruct normal data;
[0015] The data to be detected is input into the anomaly detection model of PSO-DSDAE, and the detection of abnormal input data is realized based on the anomaly judgment mechanism:
[0016] The cumulative reconstruction residual of the model for the input data is calculated and compared with the tolerance threshold. When the cumulative reconstruction residual of the model exceeds the tolerance threshold, it is considered an abnormal situation; otherwise, it is considered normal.
[0017] The idea of establishing the model is: S104 establishes the main model, i.e., the IPSO-DSDAE model -> S105 establishes an abnormality discrimination mechanism -> S106 uses normal data to train the model. For the trained model, its application idea is: data is input into the main model, i.e., the IPSO-DSDAE model -> the model gives output results -> uses the abnormality discrimination mechanism established in S105 to judge the model output results -> gives the judgment result of whether the data is abnormal.
[0018] A new solution is provided for the problem that intelligent online testing equipment lacks an abnormality detection mechanism. Testing is an important part of the ore dressing industry. Intelligent testing refers to the process of using automated facilities and equipment to measure the taste of the concentrate products obtained through the ore dressing process. Taking the intelligent online testing process of slurry powder put into use on site as an example, the process can be divided into two parts: acid digestion and weighing and volume determination. The characteristic variables involved in the test process data are specifically: the weight of the empty flask, the weight of the sample to be tested, the volume of hydrochloric acid added for the first time, the volume of nitric acid added for the first time, the volume of hydrochloric acid added for the second time, the weight of the flask before volume determination, the volume of water added by pump #1, and the volume of water added by pump #2.
[0019] The hydrochloric acid concentration involved is: 1.18g / mL, and the nitric acid concentration is: 1.407g / mL; #1 pump and #2 pump both refer to liquid injection pumps used when weighing and fixing the sample to be tested, among which #1 pump is a high-power liquid pump for transporting a large amount of negative materials, and its power range is between 2 and 5W; #2 pump is a low-power liquid pump responsible for precise reagent delivery, and its power range is between 0.1 and 0.5W (hereinafter, for the sake of simplicity, #1 pump and #2 pump are respectively recorded as large pump and small pump).
[0020] The description of the characteristic variables is summarized in Table 1.
[0021] Table 1 Characteristic variables involved in the test process data of intelligent online test equipment
[0022]
[0023] The data preprocessing operation steps specifically include: measuring the test process of the intelligent online test equipment
[0024] The eight variables are normalized by Min-Max, and the model is:
[0025]
[0026] Where: X i is the original eigenvalue of the data, X max and X min Respectively represent the maximum and minimum eigenvalues in the data, x i is the new eigenvalue after normalization.
[0027] The auto-encoder (AE) consists of two neural networks, the encoder and the decoder, with a symmetrical structure, and the input layer and the output layer have the same size. The input feature data of the AE model is used as the input of the encoder; the detection method is established based on the AE model, and the encoder part of the AE model is:
[0028] h=f(x)=s e (W e x+b e ) (Formula 2)
[0030] Where: f is the encoding function; W e is the weight of the encoder neural network, b e is the bias of the encoder neural network; S e is a nonlinear activation function, specifically set to the ReLU function, namely:
[0031]
[0032] The decoder part of the AE model is:
[0033] y=g(h)=s d (W d h+b d ) (Formula 4)
[0035] Where: g is the decoding function; W d is the weight of the decoder neural network, b d is the bias of the decoder neural network; S d It is a nonlinear activation function, specifically set to the Sigmoid function, that is:
[0036]
[0037] The loss function of the AE model is:
[0038]
[0039] Where: θ is the model network parameter matrix {W, b}, W is the weight matrix of each layer of the model neural network, which is used to perform linear transformation on the input data, and its role is to adjust the output according to the influence of each input feature; b is the bias vector of each layer of the neural network, which is used to translate the result of the linear transformation so that the network can better fit complex data. Here, the model network parameter matrix θ is composed of the encoding layer network parameter matrix {W e ,b e} and the decoding layer network parameter matrix {W d ,b d} together, that is, θ={W e ,b e ,W d ,b d}; Since the model consists of two parts, the encoder and the decoder, and both the encoder and the decoder are neural network structures, the "network parameter matrix θ" of the model should be composed of the network parameters of the encoder and the decoder. m is the number of input feature data; L is the mean square error function.
[0040] The input feature data x is processed by adding noise to obtain the input x with noise interference * , the autoencoder model that takes it as input is the denoising autoencoder (Denoising Auto-Encoder, DAE), and the feature information extracted by it has stronger robustness. The method makes denoising improvements on the basis of the AE model and further forms a DAE model. The DAE model refers to the denoising processing of the input feature data x of the AE model. Therefore, the loss function of the DAE model is:
[0041]
[0042] Where: x * It refers to the noise processing of the original input feature data x. The specific operation is to add random Gaussian white noise to the data set. The input data is made more diversified. The model is trained with inputs with noise interference, so as to reduce the overfitting phenomenon of deep learning and make the extracted feature information more robust.
[0043] Based on the loss function of the DAE model, KL divergence (Kullback-Leibler) is added as a penalty term to achieve sparse expression of data, and further form the SDAE (Sparse Denoising Auto-Encoder, SDAE) model. The loss function of the SDAE model is:
[0044]
[0045] Where: S is the number of neurons in the hidden layer; u is a weight factor for controlling the strength of the sparse term, which is generally a small positive number in the interval (0, 1), and the specific value in the present invention is 0.1; is the relative entropy of the penalty factor, and the calculation formula is:
[0046]
[0047] in: Represents the average activation value of each neuron in the hidden layer of the encoder, and its value is determined by the response of each neuron in the hidden layer of the trained model to the input; ρ represents sparsity. The specific value in the present invention is ρ=0.05.
[0048] The encoder and decoder parts of a single sparse denoising auto-encoder network each have only one hidden layer, and the encoding capacity is relatively limited. The number of hidden layers of the network is deepened to form a deep sparse denoising auto-encoder network (Deep Sparse Denoising Auto-Encoders, DSDAE). Its network structure consists of an input layer, an output layer, and multiple hidden layers. All network layers are fully connected layers. The network structure is divided into two parts, the encoder and the decoder, with the deepest hidden layer as the boundary. The dimensions of the hidden layers of the encoder and the decoder are symmetrical. The method deepens the number of hidden layers of the network on the basis of the SDAE model network structure to improve the model encoding ability and obtain a deeper feature expression of the data, further forming
[0049] The DSDAE model is formed, and the loss function of the DSDAE model is:
[0050]
[0051] Where: Θ is the set of weight matrices and bias vectors corresponding to each hidden layer; x is the input feature data; z is the output result of the DSDAE model; S is the number of neurons in the deepest hidden layer of the encoder part, and u is the weight factor that controls the strength of the sparse term, which is specifically set to 0.1.
[0052] Compared with a single-layer autoencoder, the DSDAE network can obtain a deeper feature expression by learning the features of the original data layer by layer, and reduce information loss during the feature extraction process.
[0053] The number of layers in the deep network will affect the fitting effect of the model, but a model that is too complex will also affect its generalization ability. Combining previous literature and engineering experience, and considering the complexity of the operation, the encoder and decoder parts of the proposed DSDAE model each contain 3 hidden layers.
[0054] Step S104, using the PSO algorithm to optimize the number of neurons in the hidden layer of the constructed DSDAE model;
[0055] Particle Swarm Optimization (PSO) is a global optimization algorithm that is inspired by the regular foraging behavior of bird flocks and can perform intelligent optimization in the entire space. In the optimization process of this algorithm, each particle is an element of the solution space set, and each particle is adapted to the fitness, the value of which is calculated by the fitness function. Particles search for optimization in the solvable space, and the direction and distance of their movement are determined by the speed of the particles. During the search process, the particles dynamically adjust their speed according to their own and other particle movements. Particles search for local optimal solutions in local space, and then all particles adjust their forward speed and direction through "communication" until the global optimal solution is reached.
[0056] In the PSO algorithm, a population of n particles X=(X1,X2,...,X n ) moves in the D-dimensional search space, then the position of the i-th particle in the D-dimensional search space can be expressed by the vector X i =[X i1 ,X i2 ,...,X iD ] T To express it, the fitness function corresponding to the particle position can be calculated by the loss function of the model. The speed of the i-th particle can be expressed as: X i =[X i1 ,X i2 ,...,X iD ] T , whose individual extreme value P best and the global extremum of the population G best The vector P can be usedi =[P i1 ,P i2 ,...,P iD ] T and P g =[P g1 ,P g2 ,...,P gD ] T To express.
[0057] In each iteration, the particle updates its speed and position through individual extrema and global extrema. The update formula is as follows:
[0058]
[0059] Where: ω is the inertia weight, a larger inertia weight is beneficial to global search, while a smaller inertia weight is more conducive to local search; d = 1, 2, ..., D is the search space dimension; i = 1, 2, ..., n is the number of particles; k is the current iteration number; V id is the velocity of the particle; c1 and c2 are non-negative constants, respectively called cognitive factors and social factors, collectively referred to as acceleration factors; r1 and r2 are random numbers distributed between [0,1]; represents the best historical position visited by particle i, is the optimal position found in the particle swarm; and denote the d-th dimension of the velocity and position of particle i in the k-th iteration respectively.
[0060] In the optimization problem of the number of neurons in the hidden layer of the neural network, each particle represents the number of neurons in a hidden layer, so the search space dimension d = 1; and the hidden layer dimensions of the encoder and decoder parts of the DSDAE model are symmetrical, so the number of hidden layers required for parameter optimization of the proposed DSDAE model is 3, so the number of particles n = 3; the inertia weight ω is set to 0.5; the acceleration factors c1 and c2 are both set to 0.5, and the maximum number of iterations is set to 20. At this time, the output result of the PSO algorithm is the number of neurons in the hidden layer of the constructed DSDAE model.
[0061] After determining the model structure and objective function, it is necessary to consider optimizing the learning process of continuously updating network parameters. Specifically, the adaptive matrix estimation (Adam) optimization algorithm is used to minimize the total loss function of DSDAE, that is, Formula 10, and optimize the set θ parameters of each hidden layer weight matrix and bias vector to improve the reconstruction ability of the model and reduce the subsequent anomaly detection missed rate.
[0062] Step S105, using the cumulative sum algorithm, comparing the reconstruction error of the model with the set threshold, and establishing an abnormality judgment mechanism;
[0063] The residual calculation formula between the reconstructed output and input of the established DSDAE model is as follows:
[0064] r i =|x i -z i |
[0065] (Formula 13) Where: x i is the input sample feature data; i is the output result of the DSDAE model. Calculate the expected value and standard deviation of the residual of the normal working condition sample data:
[0066]
[0067] Where: n is the number of sample data under normal working conditions. For each moment, the sample residual r i , calculate the residual cumulative sum:
[0068] s i =max(s i-1 +r i -δ',0) (Formula 16)
[0070] Considering the large noise in the test process data, δ' is set to δ' = 3δ. i Is it greater than the threshold τ? If s i >τ, it means that the equipment is in an abnormal state, the system issues an alarm, the equipment stops running, and waits for the operator to make further judgment. In order to achieve better detection effect, the threshold τ is set to 3σ.
[0071] The particle swarm algorithm is used to determine the hyperparameters of the constructed deep sparse denoising autoencoder (DSDAE) model, namely the number of neurons in the network layer, which can effectively improve the adaptability of the model.
[0072] The relationship between particle swarm optimization and model building: PSO algorithm is used to optimize the number of neurons in the hidden layer of the constructed DSDAE model to determine the DSDAE model framework.
[0073] Beneficial effects:
[0074] The present invention relates to an intelligent online test process data anomaly detection method, specifically an intelligent online test process anomaly detection method based on a particle swarm optimization algorithm and a deep sparse denoising autoencoder. Step S101, based on the intelligent online test equipment to collect operation process data, build a sample database; step S102, perform Min-Max normalization preprocessing operation on the data; step S103, build an anomaly detection model based on a deep sparse denoising autoencoder (DSDAE), so that it can learn the data characteristics of normal data after training; step S104, using a particle swarm (PSO) algorithm, optimize the number of hidden layer neurons of the DSDAE model, and establish an anomaly detection model based on PSO-DSDAE; step S105, using a cumulative sum algorithm to determine the model reconstruction residual tolerance threshold, and establish an anomaly judgment mechanism; step S106, using data set data to train the anomaly detection model based on PSO-DSDAE, and by comparing whether the reconstruction residual between the model output and input exceeds the threshold, abnormal data detection is realized. The present invention proposes a method for detecting anomalies of intelligent online laboratory equipment with strong practicability and high accuracy. The method is based on a process data anomaly detection method of a particle swarm optimization algorithm and a deep sparse denoising autoencoder, which solves the problem that existing intelligent online laboratory equipment lacks a process anomaly detection mechanism. Compared with traditional data-driven unsupervised detection methods, the method has better anomaly recognition effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 It is the basic structure diagram of the present invention;
[0076] Figure 2 The principle flow chart of the PSO-DSDAE algorithm constructed by the present invention is as follows;
[0077] Figure 3 The reconstructed residuals and cumulative residuals and curves of normal and abnormal data of the intelligent online testing process by PSO-DSDAE model;
[0078] Figure 4 This is the result diagram of the PSO-DSDAE model reconstructed for the intelligent online test process data test; Figures ah are the weight of the empty flask, the weight of the sample to be tested, the volume of hydrochloric acid added for the first time, the volume of nitric acid added for the first time, the volume of hydrochloric acid added for the second time, the weight of the flask before volume adjustment, the volume of water added by pump #1, and the volume of water added by pump #2. DETAILED DESCRIPTION
[0079] The following will be combined Figure 1-4 The technical solution of the present invention is described in further detail.
[0080] Embodiment 1
[0081] Aiming at the problem that intelligent online testing equipment lacks intelligent operation and maintenance and correction mechanism and cannot realize real-time detection and diagnosis of abnormal conditions in the testing process, the present invention proposes an intelligent online testing process data anomaly detection method.
[0082] An intelligent online test process data anomaly detection method algorithm principle flow chart is as follows Figure 2 As shown. First, based on the intelligent online test equipment, the operation process data is collected to build a sample database, and then the Min-Max normalization method is used to preprocess the data to obtain a data set between 0 and 1; the DSDAE model is further built, and the PSO algorithm is used to optimize the number of hidden layer neurons of the DSDAE model, and an anomaly detection model based on PSO-DSDAE is established; the cumulative sum algorithm is used to determine the tolerance threshold of the model reconstruction residual, and an anomaly judgment mechanism is established. By comparing whether the reconstruction residual between the model output and input exceeds the threshold, the detection of abnormal data in the intelligent online test process is realized.
[0083] The specific implementation steps of the intelligent online test process data anomaly detection method are as follows:
[0084] Step S101, collecting operation process data based on intelligent online testing equipment and building a sample database;
[0085] Step S102, introducing the Min-Max normalization method to pre-process the data and construct a data set; the step S102 is specifically as follows:
[0086] Obtain usage data from the database and divide the data into a test set and a training set, where the test set has 500 sets of samples and the training set has 741 sets of samples;
[0087] In order to eliminate the dimensional influence between indicators, the data is normalized, and the normalization function model is:
[0088]
[0089] Where: X i is the original eigenvalue of the data, X max and X min Respectively represent the maximum and minimum eigenvalues in the data, x i is the new eigenvalue after normalization.
[0090] Step S103, building an anomaly detection model based on DSDAE so that it can learn the data characteristics of normal data after training;
[0091] The step S103 is specifically as follows:
[0092] The AE model consists of two neural networks, an encoder and a decoder, with a symmetrical structure, and the input layer and the output layer have the same size. The input feature data of the AE model is used as the input of the encoder. The encoder part of the AE model is:
[0093] h=f(x)=s e (W e x+b e ) (Formula 2)
[0095] Where: f is the encoding function; W e is the weight of the encoder neural network, b e is the bias of the encoder neural network; S e is a nonlinear activation function, specifically set to the ReLU function, namely:
[0096]
[0097] The decoder takes the output result h of the encoder as input, and the decoded result obtained is the output of the AE model. The decoder part of the AE model is:
[0098] y=g(h)=s d (W d h+b d )
[0099] (Formula 4) Where: g is the decoding function; W d is the weight of the decoder neural network, b d is the bias of the decoder neural network; S d It is a nonlinear activation function, specifically set to the Sigmoid function, that is:
[0100]
[0101] The loss function of the AE model is:
[0102]
[0103] Where: θ is the model network parameter matrix {W, b}; m is the number of input feature data; L is the mean square error function.
[0104] The input feature data x is processed by adding noise to obtain the input x with noise interference * , we get the input with noise interference, and the autoencoder model that takes it as input is the DAE model, and the feature information extracted by it has stronger robustness. The loss function of the DAE model is:
[0105]
[0106] The KL divergence is added as a penalty term on the basis of the loss function of the DAE model to obtain deeper data features, while greatly reducing the amount of calculation and achieving sparse expression of data. The resulting model is the SDAE model. The loss function of the SDAE model is:
[0107]
[0108] Where: S is the number of neurons in the hidden layer; u is the weight factor that controls the strength of the sparse term; is the relative entropy of the penalty factor, and the specific calculation formula is:
[0109]
[0110] in: Represents the average activation value of each neuron in the hidden layer of the encoder.
[0111] The encoder and decoder parts of a single sparse denoising autoencoder network each have only one hidden layer, and the encoding capacity is relatively limited. The number of hidden layers in the network is deepened to form a DSDAE model, whose network structure consists of an input layer, an output layer, and multiple hidden layers. The dimensions of the hidden layers of the encoder part and the decoder part are symmetrical. The loss function of the DSDAE model is:
[0112]
[0113] Where: Θ is the set of weight matrices and bias vectors corresponding to each hidden layer; x is the input feature data; z is the output result of the DSDAE model; S is the number of neurons in the deepest hidden layer of the encoder part, and u is the weight factor that controls the strength of the sparse term, which is specifically set to 0.1.
[0114] The number of layers in the deep network will affect the fitting effect of the model, but a model that is too complex will also affect its generalization ability. Combining previous literature and engineering experience, and considering the complexity of the operation, the encoder and decoder parts of the proposed DSDAE model each contain 3 hidden layers.
[0115] Step S104, using the PSO algorithm to optimize the number of neurons in the hidden layer of the constructed DSDAE model, so as to determine the DSDAE model framework;
[0116] The step S104 is specifically as follows:
[0117] In the PSO algorithm, a population of n particles X=(X1,X2,...,X n ) moves in the D-dimensional search space, then the position of the i-th particle in the D-dimensional search space can be expressed by the vector X i =[X i1 ,Xi2 ,...,X iD ] T To express it, the fitness function corresponding to the particle position can be calculated by the loss function of the model. The speed of the i-th particle can be expressed as: X i =[X i1 ,X i2 ,...,X iD ] T , whose individual extreme value P best and the global extremum of the population G best The vector P can be used i =[P i1 ,P i2 ,...,P iD ] T and P g =[P g1 ,P g2 ,...,P gD ] T To express.
[0118] In each iteration, the particle updates its speed and position through individual extrema and global extrema. The update formula is as follows:
[0119]
[0120] Where: ω is the inertia weight, a larger inertia weight is beneficial to global search, while a smaller inertia weight is more conducive to local search; d = 1, 2, ..., D is the search space dimension; i = 1, 2, ..., n is the number of particles; k is the current iteration number; V id is the velocity of the particle; c1 and c2 are non-negative constants, respectively called cognitive factors and social factors, collectively referred to as acceleration factors; r1 and r2 are random numbers distributed between [0,1]; represents the best historical position visited by particle i, is the optimal position found in the particle swarm; and denote the d-th dimension of the velocity and position of particle i in the k-th iteration respectively.
[0121] In the optimization problem of the number of neurons in the hidden layer of the neural network, each particle represents the number of neurons in a hidden layer, so the search space dimension d = 1; and the hidden layer dimensions of the encoder and decoder parts of the DSDAE model are symmetrical, so the number of hidden layers required for parameter optimization of the proposed DSDAE model is 3, so the number of particles n = 3; the inertia weight ω is set to 0.5; the acceleration factors c1 and c2 are both set to 0.5, and the maximum number of iterations is set to 20. At this time, the output result of the PSO algorithm is the number of neurons in the hidden layer of the constructed DSDAE model.
[0122] After determining the model structure and objective function, it is necessary to consider optimizing the learning process of continuously updating network parameters. Specifically, the adaptive matrix estimation (Adam) optimization algorithm is used to minimize the total loss function of DSDAE, that is, Formula 10, and optimize the set θ parameters of each hidden layer weight matrix and bias vector to improve the reconstruction ability of the model and reduce the subsequent anomaly detection missed rate.
[0123] Step S105, using the cumulative sum algorithm, comparing the reconstruction error of the model with the set threshold, and establishing an abnormality judgment mechanism;
[0124] The step S105 is specifically as follows:
[0125] The residual calculation formula between the reconstructed output and input of the established DSDAE model is as follows:
[0126] r i =|x i -z i |
[0127] (Formula 13) Where: x i is the input sample feature data; i is the output result of the DSDAE model. Calculate the expected value and standard deviation of the residual of the normal working condition sample data:
[0128]
[0129] Where: n is the number of sample data under normal working conditions. For each moment, the sample residual r i , calculate the residual cumulative sum:
[0130] s i =max(s i-1 +r i -δ',0)
[0131] (Formula 16)
[0132] Considering the large noise in the test process data, δ' is set to δ' = 3δ. iIs it greater than the threshold τ? If s i >τ, it means that the equipment is in an abnormal state, the system issues an alarm, the equipment stops running, and waits for the operator to make further judgment. In order to achieve better detection effect, the threshold τ is set to 3σ.
[0133] Step S106, in order to verify the effectiveness of the method proposed in the present invention for detecting abnormal data in the intelligent online testing process, verification is performed based on the actual measured data of the testing process of the intelligent online testing equipment;
[0134] The constructed PSO-DSDAE model is trained using the laboratory process data set under normal working conditions, so that the model has the ability to reconstruct normal laboratory process data; based on the normal working condition data set, abnormal working condition data is introduced to construct a test set. The model test reconstruction results of PSO-DSDAE are as follows Figure 3 ,4, see Figure 3 and 4 Before the vertical dotted line, it is a normal working condition, at which time the actual and model outputs are close; after the vertical dotted line, it is an abnormal working condition, at which time the actual and model parameters are quite different. The method proposed in the present invention uses this characteristic to perform abnormality detection.
[0135] From the results, we can see that for normal data, the residual between the reconstructed output and input of the PSO-DSDAE model is very small; for abnormal data, the residual between the reconstructed output and input of the model will increase significantly, causing the cumulative residual to exceed the set threshold, and the data will be judged as abnormal.
[0136] Although the present invention has been disclosed as above with preferred embodiments, the embodiments do not limit the present invention. Any equivalent changes or modifications made without departing from the spirit and scope of the present invention also belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the content defined by the claims of this application.
Claims
1. An intelligent online test process data anomaly detection method, characterized in that: The following steps are involved: Step S101, collecting operation process data through intelligent online testing equipment and building a sample database; Step S102, introducing the Min-Max data normalization method to pre-process the data and construct a data set; Step S103, building an anomaly detection model based on DSDAE so that it can learn the data characteristics of normal data after training; Step S104, introducing the PSO algorithm to optimize the number of neurons in the hidden layer of the constructed DSDAE model, determine the DSDAE model framework, and establish an anomaly detection model based on PSO-DSDAE; Step S105, using a cumulative sum algorithm to determine the cumulative reconstruction residual of the model, and establishing an abnormality judgment mechanism by comparing it with a tolerance threshold; Step S106, using the normal data set data to train the PSO-DSDAE-based anomaly detection model so that the model can learn the potential characteristics of normal data. When the loss function of the model converges, the model training is considered to be completed, that is, the model has the ability to reconstruct normal data; The data to be detected is input into the anomaly detection model of PSO-DSDAE, and the detection of abnormal input data is realized based on the anomaly judgment mechanism: The cumulative reconstruction residual of the model for the input data is calculated and compared with the tolerance threshold. When the cumulative reconstruction residual of the model exceeds the tolerance threshold, it is considered an abnormal situation; otherwise, it is considered normal.
2. The intelligent online test process data anomaly detection method according to claim 1, characterized in that: The characteristic variables involved in the test process data are specifically: the weight of the empty flask, the weight of the added sample, the volume of the first added hydrochloric acid, the volume of the first added nitric acid, the volume of the second added hydrochloric acid, the weight of the flask before constant volume, the volume of water added by pump #1, and the volume of water added by pump #2; The description of the feature variables is summarized in the following table: Table 1 Characteristic variables involved in the test process data of intelligent online test equipment 3. The intelligent online test process data anomaly detection method according to claim 1, characterized in that: The data preprocessing operation steps specifically include: performing Min-Max normalization processing on eight variables measured during the testing process of the intelligent online testing equipment, and the model is: Where: X i is the original eigenvalue of the data, X max and X min Respectively represent the maximum and minimum eigenvalues in the data, x i is the new eigenvalue after normalization.
4. The intelligent online test process data anomaly detection method according to claim 1, characterized in that: The detection method is based on the AE model, the encoder part of which is: h=f(x)=s e (W e x+b e ) (Formula 2) Where: f is the encoding function; W e is the weight of the encoder neural network, b e is the bias of the encoder neural network; S e is a nonlinear activation function, specifically set to the ReLU function, namely: The decoder part of the AE model is: y=g(h)=s d (W d h+b d ) (Formula 4) Where: g is the decoding function; W d is the weight of the decoder neural network, b d is the bias of the decoder neural network; S d It is a nonlinear activation function, specifically set to the Sigmoid function, that is: The loss function of the AE model is: Where: θ is the model network parameter matrix {W, b}, W is the weight matrix of each layer of the model neural network, which is used to perform linear transformation on the input data, and its role is to adjust the output according to the influence of each input feature; b is the bias vector of each layer of the neural network, which is used to translate the result of the linear transformation so that the network can better fit complex data. Here, the model network parameter matrix θ is composed of the encoding layer network parameter matrix {W e ,b e } and the decoding layer network parameter matrix {W d ,b d } together, that is, θ={W e ,b e ,W d ,b d }; m is the number of input feature data; L is the mean square error function.
5. The intelligent online test process data anomaly detection method according to claim 1, characterized in that: The method improves the denoising on the basis of the AE model and further forms the DAE model. The DAE model refers to the denoising of the input feature data x of the AE model. Therefore, the loss function of the DAE model is: Where: x * It refers to the noise processing of the original input feature data x. The specific operation is to add random Gaussian white noise to the data set.
6. The intelligent online test process data anomaly detection method according to claim 1, characterized in that: Based on the loss function of the DAE model, KL divergence (Kullback-Leibler) is added as a penalty term to achieve sparse expression of data, and further form the SDAE (Sparse Denoising Auto-Encoder, SDAE) model. The loss function of the SDAE model is: Where: S is the number of neurons in the hidden layer; u is the weight factor that controls the strength of the sparse term, is the relative entropy of the penalty factor, and the calculation formula is: in: Represents the average activation value of each neuron in the hidden layer of the encoder, and its value is determined by the response results of each neuron in the hidden layer of the trained model to the input; ρ represents sparsity.
7. The intelligent online test process data anomaly detection method according to claim 1, characterized in that: The method deepens the number of hidden layers of the network on the basis of the SDAE model network structure to improve the model encoding ability and obtain a deeper feature expression of the data, and further forms a DSDAE model. The loss function of the DSDAE model is: Where: Θ is the set of weight matrices and bias vectors corresponding to each hidden layer; x is the input feature data; z is the output result of the DSDAE model; S is the number of neurons in the deepest hidden layer of the encoder part, and u is the weight factor that controls the strength of the sparse term.
Citation Information
Patent Citations
Pile-up noise reduction own coding network bearing fault diagnosis method based on particle swarm optimization
CN106682688A
Stacked noise reduction self-coding motor fault diagnosis method based on vibration and current signals
CN107957551A
DSSAE-based intermittent process fault diagnosis method
CN109614992A
Chemical fault detection method based on particle swarm optimization and a noise reduction sparse coding machine
CN109800875A
Power distribution network district classification method integrating sparse de-noising auto-encoder dimensionality reduction and clustering
CN110263873A