An intelligent online assay process data anomaly detection method
By combining the particle swarm optimization algorithm with a deep sparse denoising autoencoder, the problem of the lack of anomaly detection mechanism in intelligent online testing equipment was solved, real-time anomaly detection was achieved, and testing efficiency and accuracy were improved.
Patent Information
- Application Number
- CN202411507154.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-10-28
AI Technical Summary
Existing intelligent online testing equipment lacks intelligent operation and maintenance and correction mechanisms, and is unable to detect and diagnose abnormal conditions in real time, which affects testing efficiency and accuracy.
A method based on particle swarm optimization algorithm and deep sparse denoising autoencoder is adopted. By collecting test process data, Min-Max normalization processing is performed, a DSDAE model is built, the PSO algorithm is used to optimize the number of hidden layer neurons, and the cumulative sum algorithm is combined to establish an abnormal judgment mechanism to realize the detection of abnormal data.
It realizes real-time anomaly detection of intelligent online testing equipment, improves the efficiency and accuracy of the testing process, and reduces the missed reporting rate of anomaly detection.
Smart Images

Figure CN119474670B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent testing equipment operation and maintenance in the mine dressing process, 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 the process of separating useful minerals from useless or harmful minerals in raw materials, or separating multiple useful minerals, using physical or chemical methods. my country's mineral dressing production process is relatively mature, consisting of various stages including raw material transportation, crushing, ball milling, flotation, and testing.
[0003] Chemical analysis is a crucial step in the mineral processing process. It involves measuring the grade of the concentrate product obtained through the preceding mineral processing steps using various methods. Currently, most on-site processes still rely on manual chemical analysis, where the concentrate product is sent to a dedicated laboratory where experienced operators perform a titration analysis using the sample titration method.
[0004] Since manual methods have the disadvantages of long testing cycles, high labor intensity, low efficiency, large errors, and inability to provide real-time guidance on the grinding production process, intelligent online testing equipment has been designed, using robotic equipment to replace manual operations, realizing intelligent online automated operation of the testing process.
[0005] However, the currently designed intelligent online testing equipment still lacks intelligent operation and maintenance and correction mechanisms, and is unable to 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 and detection and diagnosis mechanism of abnormal conditions in intelligent online test equipment.
[0007] The technical solutions of the invention are as follows:
[0008] An intelligent online test process data anomaly detection method includes 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 preprocess 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, determining the DSDAE model framework, and establishing 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: Use 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 abnormal input data is detected 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 model building process is as follows: S104 establishes the main model (i.e., the IPSO-DSDAE model) -> S105 establishes the anomaly detection mechanism -> S106 trains the model using normal data. For the trained model, the application process is as follows: data is input into the main model (i.e., the IPSO-DSDAE model) -> the model generates output -> the anomaly detection mechanism established in S105 analyzes the model output -> and a determination is made as to whether the data is abnormal.
[0018] This paper provides a new solution to the problem of intelligent online testing equipment lacking anomaly detection mechanisms. Testing is a crucial step in the ore dressing industry. Intelligent testing refers to the process of using automated equipment to measure the grade of concentrate products obtained through the beneficiation process. Taking the intelligent online testing process for slurry powder deployed on-site as an example, the process can be divided into two steps: acid digestion and weighing and volume adjustment. The characteristic variables involved in the testing process data are: the weight of the empty flask, the weight of the added sample, the volume of the first hydrochloric acid addition, the volume of the first nitric acid addition, the volume of the second hydrochloric acid addition, 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.
[0019] The hydrochloric acid concentration involved is: 1.18g / mL, and the nitric acid concentration is: 1.407g / mL; Pump #1 and Pump #2 both refer to liquid injection pumps used when weighing and fixing the volume of the sample to be tested. Pump #1 is a high-power liquid pump for transporting large amounts of negative materials, with a power range of between 2 and 5W; Pump #2 is a low-power liquid pump responsible for precise reagent delivery, with a power range of between 0.1 and 0.5W (hereinafter, for simplicity, Pump #1 and Pump #2 are referred to as the large pump and the small pump, respectively).
[0020] The description of the characteristic variables is summarized in Table 1 below.
[0021] Table 1 Characteristic variables involved in the test process data of intelligent online testing 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 Represent the maximum and minimum eigenvalues in the data, respectively, x i is the new eigenvalue after normalization.
[0027] An auto-encoder (AE) consists of two neural networks, an encoder and a decoder. Its structure is symmetrical, and the input and output layers have the same size. The input feature data of the AE model is used as the input of the encoder. The detection method is 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 )
[0029] (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 It is a nonlinear activation function, specifically set to the ReLU function, that is:
[0031]
[0032] The decoder part of the AE model is:
[0033] y=g(h)=s d (W d h+b d )
[0034] (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 an encoder and a decoder, both of which are neural network structures, the model's "network parameter matrix θ" should be composed of the network parameters of the encoder and decoder. m is the number of input feature data; L is the mean squared error function.
[0040] The input feature data x is subjected to noise processing to obtain the input x with noise interference *The autoencoder model that takes it as input is called the denoising autoencoder (DAE), and the feature information it extracts has stronger robustness. This method improves the AE model by performing denoising, further forming the DAE model. The DAE model refers to the AE model input feature data x that is subjected to denoising. Therefore, the loss function of the DAE model is:
[0041]
[0042] Where: x * This refers to the process of adding noise to the original input feature data x. Specifically, this process involves adding random Gaussian white noise to the dataset. This diversifies the input data and allows the model to be trained using noisy inputs, thereby reducing overfitting in deep learning and making the extracted feature information more robust.
[0043] The KL divergence (Kullback-Leibler) is added to the loss function of the DAE model as a penalty term to achieve sparse representation of the data, further forming 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 the weight factor that controls the strength of the sparse term, which is generally a small positive number in the interval (0, 1). 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 their encoding capabilities are relatively limited. By deepening the number of hidden layers in the network, a deep sparse denoising auto-encoder network (DSDAE) is formed. 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. Based on the SDAE model network structure, the number of hidden layers in the network is deepened to improve the model's encoding capabilities 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 controlling the strength of the sparsity term, which is specifically set to 0.1.
[0052] Compared with a single-layer autoencoder, the DSDAE network can obtain 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] The Particle Swarm Optimization (PSO) algorithm, inspired by the regular foraging behavior of bird flocks, is a global optimization algorithm capable of intelligently searching for optimal solutions across the entire space. During the search, each particle represents an element in the solution space, and each particle has a fitness value calculated by a fitness function. Particles search for optimal solutions in the space of possible solutions, their direction and distance determined by their speed. During the search, particles dynamically adjust their speed based on their own movement and that of other particles. Particles search for a local optimal solution in their local space, and then all particles "communicate" to adjust their speed and direction until a 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 represented 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 , its individual extreme value P best and the global extreme value G of the population best Vector P can be used to i =[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 own speed and position through individual extreme values and global extreme values. The update formula is as follows:
[0058]
[0059] Where: ω is the inertia weight. A larger inertia weight is more conducive 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. Vid 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 for the number of neurons in a neural network's hidden layer, each particle represents the number of neurons in a hidden layer, so the search space dimension d = 1. Since the hidden layer dimensions of the encoder and decoder parts of the DSDAE model are symmetrical, the number of hidden layers required for parameter optimization in 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. The output 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 that continuously updates the network parameters. Specifically, the adaptive matrix estimation (Adam) optimization algorithm is used to minimize the total DSDAE loss function, Formula 10, as the training objective. The set Θ parameters of the weight matrix and bias vector of each hidden layer are optimized to improve the model's reconstruction ability and reduce the subsequent anomaly detection false negative rate.
[0062] Step S105: using a cumulative sum algorithm, comparing the reconstruction error of the model with a set threshold to establish 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; z i is the output 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 normal working condition sample data. For each moment sample residual r i , calculate the cumulative sum of residuals:
[0068] s i =max(s i-1 +r i -δ',0)
[0069] (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 If the value is greater than τ, the device is in an abnormal state, the system issues an alarm, and the device stops operating, waiting for further judgment by the operator. To achieve better detection results, 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 construction: Using the PSO algorithm, the number of neurons in the hidden layer of the constructed DSDAE model is optimized 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 intelligent online test equipment, collects operation process data and builds a sample database; Step S102, performs a Min-Max normalization preprocessing operation on the data; Step S103, builds 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, uses a particle swarm optimization (PSO) algorithm to optimize the number of hidden layer neurons of the DSDAE model and establishes an anomaly detection model based on PSO-DSDAE; Step S105, uses a cumulative sum algorithm to determine a model reconstruction residual tolerance threshold and establish an anomaly judgment mechanism; Step S106, uses data from the data set to train the anomaly detection model based on PSO-DSDAE, and compares whether the reconstruction residual between the model output and input exceeds the threshold, thereby realizing abnormal data detection. The present invention proposes a highly practical and accurate anomaly detection method for intelligent online laboratory equipment. The process data anomaly detection method is based on 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, it has better anomaly recognition effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 This is the basic structure diagram of the present invention;
[0076] Figure 2 The flowchart of the principle of the PSO-DSDAE algorithm constructed by the present invention is as follows;
[0077] Figure 3 The reconstructed residual sum and cumulative residual sum curve of normal data and abnormal data of the intelligent online testing process by the PSO-DSDAE model;
[0078] Figure 4 This is the reconstructed result diagram of the PSO-DSDAE model for the intelligent online laboratory process data test; Figures ah are the weight of the empty flask, the weight of the sample to be tested, the volume of the first hydrochloric acid added, the volume of the first nitric acid added, the volume of the second hydrochloric acid added, 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] Example 1
[0081] Aiming at the problem that intelligent online testing equipment lacks intelligent operation and maintenance and correction mechanisms 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 in the figure, the operating process data of the intelligent online testing equipment is collected to build a sample database. The data is then preprocessed using the Min-Max normalization method to obtain a data set with a range between 0 and 1. A DSDAE model is then built, and the PSO algorithm is used to optimize the number of hidden layer neurons in the DSDAE model to establish an anomaly detection model based on PSO-DSDAE. The cumulative sum algorithm is used to determine the tolerance threshold of the model reconstruction residual error, and an anomaly judgment mechanism is established. By comparing the reconstruction residual error between the model output and input to see if it exceeds the threshold, anomaly detection data in the intelligent online testing process can be detected.
[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 the intelligent online testing equipment and building a sample database;
[0085] Step S102, introducing the Min-Max normalization method to preprocess 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 a total of 500 samples and the training set has a total of 741 samples;
[0087] In order to eliminate the dimensional influence between indicators, the data is normalized. The normalization function model is:
[0088]
[0089] Where: X i is the original eigenvalue of the data, X max and X min Represent the maximum and minimum eigenvalues in the data, respectively, 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. Its structure is symmetrical, and the input layer and 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 )
[0094] (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 It is a nonlinear activation function, specifically set to the ReLU function, that is:
[0096]
[0097] The decoder takes the encoder output h as input, and the decoded result is the output of the AE model. The AE model decoder part 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 subjected to noise processing 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, which extracts feature information with stronger robustness. The loss function of the DAE model is:
[0105]
[0106] The KL divergence is added as a penalty term to the loss function of the DAE model to obtain deeper data features, greatly reduce the amount of calculation, and achieve sparse representation of the 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] In a single sparse denoising autoencoder network, both the encoder and decoder have only one hidden layer, resulting in relatively limited encoding capabilities. By increasing the number of hidden layers in the network, a DSDAE model is formed. Its network structure consists of an input layer, an output layer, and multiple hidden layers. The dimensions of the encoder and decoder hidden layers 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 controlling the strength of the sparsity 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 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 represented 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 , its individual extreme value P best and the global extreme value G of the population best Vector P can be used to 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 own speed and position through individual extreme values and global extreme values. The update formula is as follows:
[0119]
[0120] Where: ω is the inertia weight. A larger inertia weight is more conducive 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 for the number of neurons in a neural network's hidden layer, each particle represents the number of neurons in a hidden layer, so the search space dimension d = 1. Since the hidden layer dimensions of the encoder and decoder parts of the DSDAE model are symmetrical, the number of hidden layers required for parameter optimization in 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. The output 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 that continuously updates the network parameters. Specifically, the adaptive matrix estimation (Adam) optimization algorithm is used to minimize the total DSDAE loss function, Formula 10, as the training objective. The set Θ parameters of the weight matrix and bias vector of each hidden layer are optimized to improve the model's reconstruction ability and reduce the subsequent anomaly detection false negative rate.
[0123] Step S105: using a cumulative sum algorithm, comparing the reconstruction error of the model with a set threshold to establish 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; z iis the output 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 normal working condition sample data. For each moment sample residual r i , calculate the cumulative sum of residuals:
[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δ. i Is it greater than the threshold τ? If s i If the value is greater than τ, the device is in an abnormal state, the system issues an alarm, and the device stops operating, waiting for further judgment by the operator. To achieve better detection results, 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 abnormalities in data during the intelligent online testing process, verification is performed based on the actual measured data during 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 this invention uses this characteristic to perform abnormality detection.
[0135] The results show 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 above with reference to 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 fall within the scope of protection of the present invention. Therefore, the scope of protection 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 preprocess 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, determining the DSDAE model framework, and establishing 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: Use 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 abnormal input data is detected based on the anomaly judgment mechanism: Calculate the cumulative reconstruction residual of the model for the input data and compare it 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. 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 hydrochloric acid added, the volume of the first nitric acid added, the volume of the second hydrochloric acid added, 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; The description of the characteristic variables is summarized in the following table: Table 1 Characteristic variables involved in the test process data of intelligent online testing equipment The anomaly detection model of the DSDAE is established based on the AE model. The encoder part of the AE model 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 It is a nonlinear activation function, specifically set to the ReLU function, that is: 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; 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; The KL divergence is added as a penalty term on the basis of the DAE model loss function to achieve sparse representation of the data, and the SDAE model is further formed. 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 of each neuron in the hidden layer of the trained model to the input; ρ represents sparsity; The method deepens the number of hidden layers of the network based on the SDAE model network structure to improve the model encoding ability and obtain a deeper feature expression of the data, further forming the 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.
2. 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 the 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 Represent the maximum and minimum eigenvalues in the data, respectively, x i is the new eigenvalue after normalization.
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