CN115204257A - Anomaly monitoring method for sensor data - Google Patents

Anomaly monitoring method for sensor data Download PDF

Info

Publication number
CN115204257A
CN115204257A CN202210643472.3A CN202210643472A CN115204257A CN 115204257 A CN115204257 A CN 115204257A CN 202210643472 A CN202210643472 A CN 202210643472A CN 115204257 A CN115204257 A CN 115204257A
Authority
CN
China
Prior art keywords
sensor data
layer
data
convolution
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210643472.3A
Other languages
Chinese (zh)
Inventor
陈睿
夏明�
杨茵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China General Nuclear Power Corp
CGN Power Co Ltd
Suzhou Nuclear Power Research Institute Co Ltd
Original Assignee
China General Nuclear Power Corp
CGN Power Co Ltd
Suzhou Nuclear Power Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China General Nuclear Power Corp, CGN Power Co Ltd, Suzhou Nuclear Power Research Institute Co Ltd filed Critical China General Nuclear Power Corp
Priority to CN202210643472.3A priority Critical patent/CN115204257A/en
Publication of CN115204257A publication Critical patent/CN115204257A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D1/00Measuring arrangements giving results other than momentary value of variable, of general application

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention discloses an anomaly monitoring method for sensor data, which comprises an online monitoring method for detecting the data state in real time, wherein the online monitoring method comprises the steps of acquiring the sensor data in real time and inputting the sensor data into a preset target neural network model for feature extraction to obtain a data result, so as to judge the data result, if the data result exceeds a preset threshold value, marking the state of the corresponding sensor data as abnormal, and otherwise, marking the state as normal; the abnormity monitoring method also comprises an off-line training method for generating a target neural network model, wherein the off-line training method comprises the steps of acquiring off-line normal data and inputting the off-line normal data into the initial neural network model for training so as to generate the target neural network model. The invention increases the local field size of the receptor by using the cavity convolution, and simultaneously reduces network parameters by adopting the depth separable convolution, thereby improving the identification accuracy.

Description

Anomaly monitoring method for sensor data
Technical Field
The invention relates to the technical field of sensor on-line monitoring, in particular to an anomaly monitoring method for sensor data.
Background
The sensor data can reflect the running state of the equipment in real time, and the system is guided to work in the next step through a feedback mechanism. However, in the data acquisition process, the sensor may have faults, industrial network transmission errors, external unknown interference and the like, so that the sensor acquires abnormal data. If these abnormal data are not monitored in time, production safety and production quality may be seriously affected.
The most common method for researching on network anomaly monitoring mainly comprises clustering, density, distance, machine learning and the like, in the traditional monitoring, most of the methods adopt Principal Component Analysis (PCA) to monitor the data anomaly situation, a characteristic observation window is obtained in a self-adaptive mode, fourier characteristics, principal component analysis characteristics, statistical characteristics and wavelet characteristics are respectively extracted, and finally a KT-Means method is used for clustering single characteristic vectors to realize data anomaly detection.
Therefore, there is a need for an anomaly monitoring method for sensor data that can solve the above-mentioned problems, automatically establish a data quality monitoring mechanism in real time, and detect an anomaly in a data stream in time.
Disclosure of Invention
It is an object of the present invention to provide an anomaly monitoring method for sensor data with high recognition accuracy.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
an anomaly monitoring method for sensor data, the anomaly monitoring method comprising an online monitoring method for detecting data status in real time, the online monitoring method comprising: acquiring sensor data in real time and inputting the sensor data into a preset target neural network model for feature extraction to obtain a data result, so as to judge the data result, if the data result exceeds a preset threshold value, marking the state of the corresponding sensor data as abnormal, otherwise, marking the state of the corresponding sensor data as normal;
the anomaly monitoring method further comprises an offline training method for generating the target neural network model, the offline training method comprising: acquiring off-line normal data and inputting the off-line normal data into an initial neural network model for training so as to generate the target neural network model; wherein the initial neural network model comprises a 1D depth separable hole convolution layer, a BN layer, a ReLU layer, an FC layer and a flat layer.
Further, the online monitoring method further comprises: preprocessing the sensor data before inputting the sensor data into a preset target neural network model.
Further, the offline training method further comprises: and preprocessing the offline normal data before inputting the offline normal data into an initial neural network model for training.
Further, the pretreatment is performed by the following formula:
Figure BDA0003683140710000021
in the formula, X norm For preprocessed sensor data, X is raw sensor data, X max Is the maximum value, X, of the raw sensor data set min Is the minimum of the raw sensor data set.
Further, the initial neural network model sequentially comprises three groups of processing layers, a Flatten layer and two FC layers, wherein each group of processing layers sequentially comprises a 1D depth separable hole convolution layer, a BN layer and a ReLU layer;
the offline training method further comprises: and inputting the offline normal data into the initial neural network model, and training the offline normal data in the three groups of processing layers, one Flatten layer and two FC layers in sequence to generate the target neural network model.
Further, the 1D depth-separable hole convolution layer comprises an input layer, a depth convolution unit, an implied layer, a point-by-point convolution layer and an output layer, and a convolution kernel in the 1D depth-separable hole convolution layer adopts a hole convolution operator.
Further, the offline training method further includes: calculating the 1D depth separable hole convolution layer according to the following formula:
Y d =W d X+b d
in the formula, Y d Representing the output of the deep convolution, W d Weights representing deep convolution, X representing input, b d A threshold value representing a depth convolution;
outputting the 1D depth separable hole convolution layer according to:
Y=W p Y d +b p
in the formula, Y represents the output of the point-by-point convolution, W p Weight, Y, representing point-by-point convolution d Representing the output of the deep convolution, b p Representing the threshold of point-by-point convolution.
Further, the offline training method further includes: the BN layer is treated as follows:
Figure BDA0003683140710000031
y k =γ k x kk
in the formula (I), the compound is shown in the specification,
Figure BDA0003683140710000032
representing normalized eigenvalues, x k Representing the input characteristic value, E (x) k ) Representing input characteristic value x k Mean value of, var (x) k ) Representing input characteristic value x k Variance of y k Denotes the output of BN layer, γ k Representing a scaling factor, beta k Representing the shift coefficients.
The invention has the advantages that: the sensor data acquired in real time is processed through the pre-generated model to acquire data state information, a data quality monitoring mechanism is automatically established in real time, abnormal conditions in data streams can be detected in time to feed back the abnormal conditions in real time, the local field size of a receptor is increased through the use of cavity convolution, network parameters are reduced through the use of deep separable convolution, and the identification accuracy is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a functional block diagram of an anomaly monitoring method provided by an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an anomaly monitoring method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a target neural network model provided by an embodiment of the present invention;
FIG. 4 is a schematic view of a 1D depth separable hole convolution layer provided in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of an original label of a test set provided by an embodiment of the invention;
fig. 6 is a schematic diagram of a prediction result provided by the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood and more clearly understood by those skilled in the art, the technical solutions of the embodiments of the present invention will be described below in detail and completely with reference to the accompanying drawings. It should be noted that the implementations not shown or described in the drawings are in a form known to those of ordinary skill in the art. Additionally, although examples may be provided herein of parameters including particular values, it should be appreciated that the parameters need not be exactly equal to the respective values, but may approximate the respective values within acceptable error margins or design constraints. It is to be understood that the described embodiments are merely exemplary of a portion of the invention and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention. In addition, the terms "comprises" and "comprising," and any variations thereof, in the description and claims of this invention, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In one embodiment of the present invention, an anomaly monitoring method for sensor data is provided, as shown in fig. 1, the anomaly monitoring method includes an offline training portion (method) and an online monitoring portion (method).
For the off-line training part, off-line normal data are mainly obtained and input into the initial neural network model for training, and the optimal parameters and the optimal model, namely the target neural network model, are obtained through continuous training.
In this embodiment, as shown in fig. 2, the offline training is mainly implemented by the following method:
(1) Off-line normal data. Normal data is acquired by the sensor and the data set and the tags are randomly scrambled.
(2) And (4) preprocessing data. Firstly, carrying out maximum and minimum normalization preprocessing on the collected data (including health data and abnormal data) by using a linear function, and converting the original data into a range of [0,1] by using a linearization method, wherein a normalization formula is as follows:
Figure BDA0003683140710000041
in the formula, X norm For preprocessed sensor data, X is raw sensor data, X max Is the maximum value, X, of the raw sensor data set min Is the minimum of the raw sensor data set.
The machine learning and parameter optimization algorithm is directly used for data collected by the sensor nodes, and although the accuracy of abnormal value monitoring in the network can be improved, the energy expenditure of the system can be increased. The invention scales the original data in equal proportion and selects the original data not to change after the model is trained and generated so as to save energy.
(3) And (4) training a model. As shown in fig. 3, the preset target neural network model has a total of 12 layers, including 3 1D depth separable hole convolution layers, 3 BN layers, 3 ReLU layers, 2 FC layers, and 1 planar layer. As shown in fig. 4, the 1D depth separable hole convolution includes an input layer, a depth convolution unit, an implied layer, a point-by-point convolution and an output layer, and in the depth convolution, a convolution kernel employs a hole convolution operator, so that a local field can be increased without increasing data volume; the channel of the convolution kernel is equal to the input channel, and convolution is achieved.
Specifically, the 1D depth separable hole convolution calculation process is as follows:
Y d =W d X+b d
in the formula, Y d Representing the output of the deep convolution, W d Weights representing deep convolution, X representing input, b d Representing the threshold of the depth convolution.
Outputting the 1D depth separable hole convolution layer according to the following formula:
Y=W p Y d +b p
in the formula, Y represents the output of the point-by-point convolution, W p Weight, Y, representing point-by-point convolution d Representing depth volumesOutput of product, b p And a threshold value representing point-by-point convolution, wherein the size of a point-by-point convolution kernel is 1 multiplied by 1, the convolution size can be reduced, and the calculation amount is reduced.
The BN (batch normalization) layer maps the data into a positive-Taiwan distribution with a mean of 0 and a variance of 1. The BN layer is used for enabling data distribution to be consistent, and the problem that gradient disappears in the training process of the neural network is avoided.
The BN layer is treated by the following steps:
Figure BDA0003683140710000051
y k =γ k x kk
in the formula (I), the compound is shown in the specification,
Figure BDA0003683140710000052
representing the normalized eigenvalues, x k Representing the input characteristic value, E (x) k ) Representing an input feature value x k Mean value of (d), var (x) k ) Representing an input feature value x k Variance of (a), y k Denotes the output of BN layer, γ k Representing a scaling factor, beta k Representing the shift coefficients.
The neural network presents linear characteristics without the action of the activation function, and only the linear relation can be simulated. However, for non-linear relationships, the neural network will be disabled. Therefore, the invention introduces the activation function as the excitation function, so that the neural network can approach any function, part of neurons are invalid in the calculation process to cause sparse network, the interdependence relation of parameters is reduced, the occurrence of overfitting problem is relieved, and the nonlinearity of the neural network model is increased.
The ReLU function is in the negative region, with both output and gradient 0, which is defined as:
Figure BDA0003683140710000053
in the formula, z represents an input value.
The FC (full connection) layer is a single-layer BP neural network which is a single-layer structure consisting of a plurality of neurons, and the method projects the learned data features in the network into a sample space, namely converts multidimensional data output by the network into one-dimensional vectors, thereby providing data support for realizing classification subsequently.
The on-line monitoring part is mainly used for acquiring sensor data in real time and inputting the sensor data into a preset target neural network model for feature extraction to obtain a data result, so that the data state (abnormal or normal) is judged according to the data result.
In this embodiment, the online monitoring is mainly implemented by the following method:
(1) And acquiring sensor data in real time. And reading the data of the sensor on line, and transmitting the data to a data online monitoring system for subsequent monitoring steps.
(2) And (4) preprocessing data. The online data can be processed according to a preprocessing mode in offline training.
(3) And (5) extracting data features. And transmitting the preprocessed data to an optimal model obtained by off-line training, namely a target neural network model, to extract data characteristics.
(4) And identifying the data state. Obtaining a model data result, setting a threshold value, and marking the state of corresponding sensor data as abnormal if the data result exceeds the preset threshold value; if the data result is less than or equal to the threshold, then the flag is normal.
In one embodiment of the invention, a sensor is monitored for data anomaly problems by:
(1) Sensor data is acquired. In this example, the sensor data includes 10 channels, for a total of 640 data points, 8 outlier data points and 632 normal data points in the sample.
(2) And (6) classifying the data. In this embodiment, 80% of the normal data are randomly selected as training samples, and the rest abnormal data points are used as test samples, wherein the training set has 505 sample points, and the test set has 135 sample points.
(3) And (4) preprocessing data. And respectively carrying out normalization processing on the training set and the test set.
(4) And (5) training the model. In this embodiment, the sizes of the depth convolution kernels in the model are all 3 × 1, the step lengths are all 1, the fillings are all 1, and the output channels are all 1; the sizes of the point-by-point convolution kernels are all 1 multiplied by 1, the step lengths are all 1, and the output channels are respectively 5, 10 and 20; the input and output of the 3 BN layers and the ReLU layers are respectively 5 × 10, 10 × 10 and 20 × 10; the output of 1 Flatten layer is the sample number multiplied by 200; the 2 FC layer inputs and outputs are 200 × 10 and 10 × 1, respectively. The training set is input into the neural network, and the training times are 100 times.
(5) And (6) testing the model. And verifying the trained model by using the test set. The original label of the test set is shown in fig. 5, and the prediction result is shown in fig. 6. As can be seen by comparing fig. 5 and 6, the predicted results completely match the actual results.
Compared with PCA, isolated forest (iForest), k-means (k-means), local Outlier Factor (LOF) and one-class support vector machines (OCSVM), the method has the accuracy rates of 100.00%, 87.50%, 100.00%, 62.50%, 50.00% and 50.00%, and the accuracy rates are respectively as follows: 100.00%, 99.26%, 97.78%, 93.33%, 57.78%, AUC: 1.0000, 0.9375, 0.9961, 0.8125, 0.7303 and 0.4828, and the data show that the accuracy of the method is up to 100%, which is 12.5-50% higher than that of other methods, and although the accuracy of the iForest method is also 100%, the accuracy and AUC are less than those of the method, so that the method can accurately identify abnormal data and has better robustness.
The above description is only for the preferred embodiment of the present invention and is not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes that can be directly or indirectly applied to other related technical fields using the contents of the present specification and the accompanying drawings are included in the scope of the present invention.

Claims (8)

1. An anomaly monitoring method for sensor data, characterized in that the anomaly monitoring method comprises an online monitoring method for detecting data state in real time, the online monitoring method comprising: acquiring sensor data in real time and inputting the sensor data into a preset target neural network model for feature extraction to obtain a data result, so as to judge the data result, if the data result exceeds a preset threshold value, marking the state of the corresponding sensor data as abnormal, otherwise, marking the state of the corresponding sensor data as normal;
the anomaly monitoring method further comprises an offline training method for generating the target neural network model, the offline training method comprising: acquiring off-line normal data and inputting the off-line normal data into an initial neural network model for training so as to generate the target neural network model; the initial neural network model comprises a 1D depth separable cavity convolution layer, a BN layer, a ReLU layer, an FC layer and a flat layer.
2. The anomaly monitoring method for sensor data according to claim 1, further comprising: preprocessing the sensor data before inputting the sensor data into a preset target neural network model.
3. The anomaly monitoring method for sensor data according to claim 1, wherein said offline training method further comprises: and preprocessing the offline normal data before inputting the offline normal data into an initial neural network model for training.
4. An anomaly monitoring method for sensor data according to claim 2 or 3, characterized by the preprocessing by:
Figure FDA0003683140700000011
in the formula, X norm For preprocessed sensor data, X is raw sensor data, X max Is the maximum value, X, of the raw sensor data set min Is the minimum of the raw sensor data set.
5. The anomaly monitoring method for sensor data according to claim 1, wherein the initial neural network model sequentially comprises three groups of processing layers, a Flatten layer, and two FC layers, each group of processing layers sequentially comprising a 1D depth separable hole convolution layer, a BN layer, and a ReLU layer;
the offline training method further comprises: and inputting the offline normal data into the initial neural network model, and training the offline normal data in the three groups of processing layers, one Flatten layer and two FC layers in sequence to generate the target neural network model.
6. The anomaly monitoring method for sensor data according to claim 1, wherein said 1D depth-separable hole convolution layer comprises an input layer, a depth convolution unit, an implied layer, a point-by-point convolution, and an output layer, and a convolution kernel in said 1D depth-separable hole convolution layer employs a hole convolution operator.
7. The anomaly monitoring method for sensor data according to claim 6, wherein said offline training method further comprises: calculating the 1D depth separable hole convolution layer according to the following formula:
Y d =W d X+b d
in the formula, Y d Representing the output of the deep convolution, W d Weights representing deep convolution, X representing input, b d A threshold value representing a depth convolution;
outputting the 1D depth separable hole convolution layer according to:
Y=W p Y d +b p
in the formula, Y represents the output of the point-by-point convolution, W p Is shown to be one by oneWeight of the point convolution, Y d Representing the output of a deep convolution, b p Representing the threshold of point-by-point convolution.
8. The anomaly monitoring method for sensor data according to claim 1 or 5, wherein said offline training method further comprises: the BN layer is treated by the following steps:
Figure FDA0003683140700000021
y k =γ k x kk
in the formula (I), the compound is shown in the specification,
Figure FDA0003683140700000022
representing the normalized eigenvalues, x k Representing the input characteristic value, E (x) k ) Representing input characteristic value x k Mean value of (d), var (x) k ) Representing an input feature value x k Variance of y k Denotes the output of BN layer, γ k Representing a scaling factor, beta k Representing the shift coefficients.
CN202210643472.3A 2022-06-08 2022-06-08 Anomaly monitoring method for sensor data Pending CN115204257A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210643472.3A CN115204257A (en) 2022-06-08 2022-06-08 Anomaly monitoring method for sensor data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210643472.3A CN115204257A (en) 2022-06-08 2022-06-08 Anomaly monitoring method for sensor data

Publications (1)

Publication Number Publication Date
CN115204257A true CN115204257A (en) 2022-10-18

Family

ID=83575776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210643472.3A Pending CN115204257A (en) 2022-06-08 2022-06-08 Anomaly monitoring method for sensor data

Country Status (1)

Country Link
CN (1) CN115204257A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115860579A (en) * 2023-02-27 2023-03-28 山东金利康面粉有限公司 Production quality monitoring system for flour processing
CN117829381A (en) * 2024-03-05 2024-04-05 成都农业科技职业学院 Agricultural greenhouse data optimization acquisition system based on Internet of things

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115860579A (en) * 2023-02-27 2023-03-28 山东金利康面粉有限公司 Production quality monitoring system for flour processing
CN115860579B (en) * 2023-02-27 2023-05-09 山东金利康面粉有限公司 Production quality monitoring system for flour processing
CN117829381A (en) * 2024-03-05 2024-04-05 成都农业科技职业学院 Agricultural greenhouse data optimization acquisition system based on Internet of things
CN117829381B (en) * 2024-03-05 2024-05-14 成都农业科技职业学院 Agricultural greenhouse data optimization acquisition system based on Internet of things

Similar Documents

Publication Publication Date Title
CN115204257A (en) Anomaly monitoring method for sensor data
CN112508105B (en) Fault detection and retrieval method for oil extraction machine
CN114090396B (en) Cloud environment multi-index unsupervised anomaly detection and root cause analysis method
CN108073158A (en) Based on PCA and KNN density algorithm Wind turbines Method for Bearing Fault Diagnosis
CN113255848B (en) Water turbine cavitation sound signal identification method based on big data learning
CN110161388B (en) Fault type identification method and system of high-voltage equipment
CN115409131B (en) Production line abnormity detection method based on SPC process control system
CN111580506A (en) Industrial process fault diagnosis method based on information fusion
US20080052010A1 (en) Method and Apparatus for Analyzing Signal Pattern of Sensor Array
CN112904810B (en) Process industry nonlinear process monitoring method based on effective feature selection
CN116776273B (en) Running state monitoring method and system of Internet of things equipment
CN111444471A (en) Cable production quality abnormity detection method and system based on multivariate Gaussian distribution
CN114118219A (en) Data-driven real-time abnormal detection method for health state of long-term power-on equipment
CN109434562A (en) Milling cutter state of wear recognition methods based on partition clustering
CN117562311A (en) Detection system of high-performance electronic cigarette atomizer
CN110738259A (en) fault detection method based on Deep DPCA-SVM
CN117784710A (en) Remote state monitoring system and method for numerical control machine tool
Huang et al. Automatic classification of magnetic tiles internal defects based on acoustic resonance analysis
CN111428772B (en) Photovoltaic system depth anomaly detection method based on k-nearest neighbor adaptive voting
CN117633688A (en) Large-scale power data anomaly detection method based on ridge regression-k-means clustering-LOF-LSTM fusion algorithm
CN116627116B (en) Process industry fault positioning method and system and electronic equipment
CN117171702A (en) Multi-mode power grid fault detection method and system based on deep learning
CN201017233Y (en) Manufacturing production process failure diagnosis device based on wavelet analyzing
CN117557827A (en) Plate shape anomaly detection method based on self-coding cascade forests
CN107341503B (en) Identification method for multi-source energy efficiency state in cutting process

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination