Sensor anomaly detection method based on conditional diffusion probability model and related system

By adopting sensor abnormality detection method based on conditional diffusion probability model in the NCS monitoring system, the problems of insufficient monitoring accuracy, weak noise resistance and low detection targeting are solved, and higher monitoring accuracy and system reliability are achieved.

CN119513761APending Publication Date: 2025-02-25CHN ENERGY JIUJIANG POWER GENERATION CO LTD

Patent Information

Application Number
CN202411536445.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When monitoring high-voltage isolation switches, existing NCS monitoring systems have problems such as insufficient monitoring accuracy, weak noise resistance and low detection targeting, which may cause false alarms and reduce system reliability.

Method used

The sensor anomaly detection method based on the conditional diffusion probability model is adopted. By training the detection model, including the conditional probability diffusion model and the U-Net model, the abnormality is detected and the noise anti-noise ability is improved, thereby improving the accuracy and pertinence of monitoring.

Benefits of technology

It improves monitoring accuracy, reduces the risk of false alarms, enhances noise immunity and detection targeting, thereby improving the overall reliability of the NCS monitoring system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513761A_ABST
    Figure CN119513761A_ABST
Patent Text Reader

Abstract

The invention discloses a sensor anomaly detection method based on a conditional diffusion probability model and a related system, the system comprises a data acquisition processing unit, a detection model unit and an anomaly detection unit, anomaly is detected by using the conditional probability diffusion model, noise is predicted by adding and removing noise and using a U-Net model, and data is reconstructed. Completing the training of a detection model, and obtaining a trained detection model; and taking the distance between the to-be-detected data and the noise reconstruction data obtained by the trained detection model corresponding to the to-be-detected data as an abnormal score, and if the abnormal score exceeds a threshold value, determining that the data is abnormal. According to the invention, the monitoring accuracy is improved, the false alarm is reduced, the anti-noise capability is enhanced, the noise is effectively identified, and the pertinence is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information processing methods, and mainly relates to a sensor anomaly detection method based on a conditional diffusion probability model and a related system. Background Art

[0002] In the power system, high-voltage disconnectors are indispensable key equipment, mainly used in substations to ensure the safe isolation, connection and conversion of circuits. These switchgear are exposed to the outdoor environment for a long time, which is prone to oxidation corrosion of the metal transmission mechanism and deterioration and loss of grease. Therefore, real-time monitoring of high-voltage disconnectors to prevent potential problems such as insulator breakage, overheating of the conductive circuit, and mechanical failure is crucial to ensure the stable operation of the power system. Existing technologies mainly rely on the network control system (NCS) monitoring system to monitor the status of high-voltage disconnectors. These systems provide opening and closing signals through auxiliary contacts to indicate the operating status of the disconnector.

[0003] However, the NCS monitoring system technology has the following problems and shortcomings: (1) Insufficient monitoring accuracy. The existing NCS monitoring system relies on the opening and closing signals emitted by the auxiliary contacts to inform the operator of the status of the disconnector, but this does not ensure that the disconnector is actually operated properly, and there is a risk of false alarms, which may lead to serious accidents. (2) Weak noise resistance. Since there is a situation where noise data may be mislabeled, the noise resistance of the monitoring system is weak. For example, if the data in the monitoring system is mistakenly labeled as normal, but actually contains abnormal information, the anomaly detection performance of the model may be affected, thereby reducing the overall reliability of the NCS monitoring system. (3) Low detection targeting. When facing a complex and changeable operating environment, the NCS monitoring system is unable to accurately identify anomalies for specific operating conditions or equipment states, which affects the early detection and prevention of potential failures of key equipment, thereby reducing the efficiency and reliability of anomaly detection. Summary of the invention

[0004] Purpose of the invention: In order to overcome the problems of insufficient monitoring accuracy, weak noise resistance and low targeting of the NCS monitoring system in the prior art, the present invention provides a sensor anomaly detection method based on a conditional diffusion probability model, which reduces the risk of false alarms by enhancing the noise resistance of the anomaly detection model.

[0005] Technical solution: To achieve the above purpose, the technical solution adopted by the present invention is:

[0006] A sensor anomaly detection method based on a conditional diffusion probability model comprises the following steps:

[0007] Step S1, data preparation: collect and preprocess the power plant equipment monitoring data to obtain the training set and support set.

[0008] Step S2, training the detection model through the training set, the detection model includes a conditional probability diffusion model and a U-Net model, using the conditional probability diffusion model to detect anomalies, adding noise and removing noise, and using the U-Net model to predict noise and reconstruct data, completing the training of the detection model to obtain a trained detection model.

[0009] Step S3, anomaly detection: use the mean square error to calculate the distance between the normal data in the support set and the noise reconstructed data obtained by the corresponding trained detection model, and determine the threshold. The distance between the data to be detected and the noise reconstructed data obtained by the corresponding trained detection model is used as the anomaly score. If the anomaly score exceeds the threshold, it is judged as abnormal.

[0010] Preferably, the method for training the detection model in step S2 is as follows:

[0011] Step S201, forward diffusion process: diffusing data samples from an initial state to a high noise state.

[0012] Step S202, reverse diffusion process: The reverse process is intended to restore data from a high-noise state to clean data.

[0013] Step S203: Introduction of conditional information. Simple CDPM generates samples unconditionally, so a model is trained at the same time to learn to generate data under conditional settings.

[0014]

[0015] in, represents the noise variable, Indicates that the condition The predicted noise is represents the new state generated by adding noise at time t, represents the noise of the unconditional prediction, represents the adjustment factor, corresponds to the unconditional model, while The model is adjusted to the conditional model.

[0016] Preferably, the forward diffusion process in step S201 includes the following steps:

[0017] Step S2011, set the initial state data sequence to .

[0018] Step S2012, by initiating the state data sequence Gradually introduce Gaussian noise sequence to obtain a series of noise data The diffusion variance ϵ of the intermediate state is determined, that is, with a known noise enhancement amplitude parameter, which represents a parameter for controlling the diffusion of random noise.

[0019] Preferably, the process of introducing a Gaussian noise sequence in step S2012 to obtain a series of noise data is as shown in the following formula.

[0020]

[0021] in, represents the conditional distribution in the forward diffusion process, Indicates that at time t, the image state generates a new state by adding noise, represents the time step, represents a normal distribution, represents the scaling factor of the covariance matrix, represents the identity matrix;

[0022] Step S2013, obtain the noise data sequence .

[0023] Preferably, the reverse diffusion process in step S202 includes the following steps:

[0024] Step S2021, using the conditional distribution in the forward diffusion process learned in step S2012 , combined with denoising neural network on the U-Net model For each backward step, it is expected to recover the original features lost in the forward process and restore the data to a cleaner state.

[0025] Step S2022: During the reverse diffusion process The calculation formula is as follows:

[0026]

[0027] Step S2023: During the reverse diffusion process The calculation formula is as follows:

[0028]

[0029] in, represents the clean data after denoising, represents the weight coefficient, represents the noise state at the current time step, represents random noise from a standard normal distribution, Indicates that given the current noise state and time step t, predict the previous time step The mean of

[0030] Step S2024: Find the parameters of the reverse process and To iteratively denoise and restore .

[0031] Preferably, the conditional distribution in the reverse diffusion process in step S2021 is expressed as:

[0032]

[0033] in, represents the conditional distribution in the reverse diffusion process, represents a normal distribution, represents the mean function, represents the covariance matrix of the conditional distribution, represents the learnable parameters of the model, represents the mean function, represents the covariance matrix of the conditional distribution, Represents the learnable parameters of the model.

[0034] Preferably: in the reverse diffusion process in step S2021, arrive The transition is smooth and continuous:

[0035]

[0036] in, represents the mean function of the conditional distribution, Indicates the size of the covariance.

[0037] Preferred: The update formula is:

[0038]

[0039] The update formula is:

[0040]

[0041] in, Indicated in and The mean function under the condition, represents the scalar factor of the covariance matrix, represents the time-dependent parameter, represents another time-dependent parameter, Represents the original data, represents noisy data.

[0042] Optimum: The loss function of the training detection model is:

[0043]

[0044] in, represents the loss function, Represents the input data and actual noise expectations, Represents input data, represents the actual noise, represents the difference between the predicted noise and the actual noise, represents the prediction noise, represents the weight coefficient, Represents the time step.

[0045] Preferred: Mean function The calculation formula is.

[0046]

[0047] in, represents the mean function under the conditional distribution, Represents input data, represents the time step, represents the time-dependent parameter, represents another time-dependent parameter, Represents the weight coefficient, usually Related, represents the prediction noise.

[0048] Preferably, the abnormality detection in step S3 includes the following steps:

[0049] Step S301: Threshold setting: Calculate the average Euclidean distance between the data in the support set and the data generated by the trained detection model, and use it as the threshold.

[0050] Step S302, mean square error calculation.

[0051] Step S3021, input the data to be detected into the trained detection model to obtain the reconstructed data of the data to be detected output by the model.

[0052] Step S3022, calculating the mean square error between the reconstructed data of the data to be detected and the data to be detected.

[0053] Step S3023, if the calculated mean square error exceeds the previously set threshold, this will be regarded as a significant abnormal signal, which means that the data point is likely not to belong to the normal data distribution. Therefore, it is marked as abnormal and removed from subsequent analysis and calculation to avoid interference with the final result.

[0054] Step S3024: If the mean square error of the data to be detected is lower than the threshold obtained by training the conditional diffusion probability model, this indicates that the deviation between the data point and the normal mode is small, and therefore it is considered to be normal data.

[0055] Preferably, an alarm mechanism is also included, and the alarm mechanism includes the following steps:

[0056] Step S401, real-time monitoring: continuously apply the trained detection model in the real-time data stream to calculate the mean square error between the current sensor data and the model prediction data.

[0057] Step S402, abnormal alarm: if abnormal data is detected, the alarm mechanism is triggered, and further analysis and processing are performed on it.

[0058] Step S403, feedback mechanism: record the processing results of each alarm, continuously optimize the model, and improve the accuracy of anomaly detection.

[0059] Step S4031, collect exception handling results, including exception causes, handling measures and effects.

[0060] Step S4032, analyze the exception handling results and evaluate the accuracy and effectiveness of the alarm mechanism.

[0061] Preferably: the alarm mechanism also includes regular training and optimization of the conditional diffusion probability model, and introduction of new abnormal patterns and learning experiences.

[0062] Preferably, the data preparation in step S1 includes the following steps:

[0063] Step S101, data collection: deploy sensor nodes to monitor and collect data from power plant equipment in real time.

[0064] Step S102, data preprocessing: clean the collected data and delete data with missing values ​​and obvious outliers to ensure the quality of the training data.

[0065] Step S103, data partitioning: the data set is divided into a training set, a support set, and a test set in a ratio of 6:2:2 to ensure that the model can be verified and evaluated at different stages.

[0066] Another object of the present invention is to provide a sensor anomaly detection system based on a conditional diffusion probability model, which is used to implement the sensor anomaly detection method based on the conditional diffusion probability model, including a data acquisition processing unit, a detection model unit, and an anomaly detection unit, wherein:

[0067] The data acquisition and processing unit is used to collect and pre-process the power plant equipment monitoring data to obtain a training set and a support set.

[0068] The detection model unit is used to train the detection model through a training set. The detection model includes a conditional probability diffusion model and a U-Net model. The conditional probability diffusion model is used to detect anomalies. By adding and removing noise, and using the U-Net model to predict noise and reconstruct data, the detection model training is completed to obtain a trained detection model.

[0069] The anomaly detection unit is used to calculate the distance between the normal data in the support set and the noise reconstructed data obtained by the corresponding trained detection model using the mean square error to determine the threshold. The distance between the data to be detected and the noise reconstructed data obtained by the corresponding trained detection model is used as the anomaly score. If the anomaly score exceeds the threshold, it is determined to be abnormal.

[0070] Preferably, the detection model unit includes a conditional diffusion probability model module and a U-Net model module, wherein the conditional diffusion probability model module is used to detect anomalies using a conditional probability diffusion model, and the U-Net model module is used to predict noise and reconstruct data using a U-Net model.

[0071] Another object of the present invention is to provide an electronic device, comprising: at least one processor, at least one memory and a communication interface. The processor, memory and communication interface communicate with each other. The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the sensor abnormality detection method based on the conditional diffusion probability model.

[0072] Another object of the present invention is to provide a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the sensor abnormality detection method based on the conditional diffusion probability model.

[0073] Compared with the prior art, the present invention has the following beneficial effects:

[0074] (1) Improve monitoring accuracy. The conditional diffusion probability model can more accurately judge the actual operating status of the disconnector by directly analyzing sensor data instead of relying on auxiliary contact signals, effectively reducing the risk of false alarms and thus avoiding potential accidents.

[0075] (2) Enhanced noise resistance: The conditional diffusion probability model can better process and identify noisy data. Even in the case of imperfect data labeling, it can maintain a high anomaly detection performance and improve the reliability of the NCS monitoring system in complex environments.

[0076] (3) Improve the detection targeting. The conditional diffusion probability model can accurately identify anomalies for specific working conditions or equipment states, improve the early detection and prevention capabilities of potential failures of key equipment, and enhance the efficiency of anomaly detection and the reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] Figure 1 It is the overall framework diagram.

[0078] Figure 2 It is the conditional diffusion probability model diagram. DETAILED DESCRIPTION

[0079] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0080] like Figure 1 , 2 As shown, this embodiment designs a sensor anomaly detection method based on a conditional diffusion probability model, which consists of four parts. First, in the data preparation stage, the multi-dimensional technical parameters of key equipment are collected by arranging sensor nodes, and data cleaning and division are performed to ensure the quality of training data and the generalization ability of the verification model. In the training stage of the conditional diffusion probability model, the forward and reverse diffusion processes are used in combination with the U-Net model to predict and reconstruct the data, and conditional information is introduced to improve the pertinence of the model. In the anomaly detection stage, the threshold is determined by calculating the mean square error (MSE) between the normal data in the support set and the noisy reconstructed data, and the distance between the test data and the noisy reconstructed data is used as the anomaly score to determine whether the data point is abnormal. Finally, in the alarm mechanism stage, the sensor data is monitored in real time. Once an anomaly is detected, an alarm is triggered immediately, and the model is optimized through the feedback mechanism to improve the detection accuracy. Specifically, the following steps are included:

[0081] Step S1, data preparation: collect and preprocess the power plant equipment monitoring data to obtain the training set and support set.

[0082] In another embodiment, data preparation includes the following steps:

[0083] Step S101, data collection: deploy sensor nodes to conduct real-time monitoring of power plant equipment such as generators, transformers, switches, etc. The collected power plant equipment monitoring data includes the equipment's temperature, humidity, vibration, flow, gas concentration, atmospheric pressure, and maximum wind speed, and the data is transmitted to the monitoring center.

[0084] Step S102, data preprocessing: clean the collected data and delete data with missing values ​​and obvious outliers to ensure the quality of the training data.

[0085] Step S103, data partitioning: the data set is divided into a training set, a support set, and a test set in a ratio of 6:2:2 to ensure that the model can be verified and evaluated at different stages.

[0086] The technical data such as temperature, pressure, flow, etc. collected from sensors are cleaned and standardized, and then divided into training, support, and test sets to ensure the data quality for model training and evaluation.

[0087] Step S2, training the detection model through the training set, using the conditional probability diffusion model to detect anomalies, adding and removing noise, and using the U-Net model to predict noise and reconstruct data, completing the training of the detection model to obtain a trained detection model.

[0088] The detection model consists of three processes during training: forward diffusion process, backward diffusion process, and introduction of conditional information. First, a Gaussian noise sequence is gradually introduced into the initial data to generate a series of noisy data. This process can be represented as a Markov chain, which gradually diffuses the sample from the initial state to the high-noise state. Then, the learned conditional distribution is used, combined with the previously trained denoising neural network, and iterates continuously to restore the noisy data sequence to clean data. Finally, in order to enrich the diversity and flexibility of generated data and enable the conditional model to generate more fine-grained and high-fidelity samples, a model is trained to learn to generate data under conditional and unconditional settings.

[0089] In another embodiment, if Figure 1 , 2 As shown, the method for training the detection model in step S2 is as follows:

[0090] Step S201, forward diffusion process (encoding process): diffuse data samples from an initial state to a high noise state.

[0091] Step S2011, set the initial state data sequence to .

[0092] Step S2012, by initiating the state data sequence Gradually introduce Gaussian noise sequence to obtain a series of noise data The diffusion variance ϵ of the intermediate state is determined, that is, with a known noise enhancement amplitude parameter, which represents a parameter for controlling the diffusion of random noise.

[0093] The process of introducing a Gaussian noise sequence to obtain a series of noise data is shown in formula (1).

[0094] (1)

[0095] in, represents the conditional distribution in the forward diffusion process, It means that a new state is generated by adding noise at time t. represents the time step, represents a normal distribution, represents the scaling factor of the covariance matrix, Represents the identity matrix.

[0096] Step S2013, obtain the noise data sequence .

[0097] Step S202, reverse diffusion process (decoding process): the reverse process is intended to restore data from a high noise state to clean data.

[0098] Step S2021, using the conditional distribution in the forward diffusion process learned in step S2012 , combined with denoising neural network on the U-Net model (from arrive ) for training. For each backward step, it is expected to recover the original features lost in the forward process and restore the data to a cleaner state.

[0099] The conditional distribution in the back diffusion process can be expressed as:

[0100] (2)

[0101] in, represents the conditional distribution in the reverse diffusion process, represents a normal distribution, represents the mean function, represents the covariance matrix of the conditional distribution, Represents the learnable parameters of the model.

[0102] from arrive The transition is smooth and continuous:

[0103] (3)

[0104] in, represents the mean function of the conditional distribution, Indicates the size of the covariance.

[0105] and is the updated parameter.

[0106] (4)

[0107] (5)

[0108] Step S2022: derive formula (6):

[0109] (6)

[0110] Step S2023: Setting As shown in formula (7):

[0111] (7)

[0112] To simplify, we can Expressed as , noise variables and , function of these time-dependent parameters.

[0113] Step S2024: Find the parameters of the reverse process and To iteratively denoise and restore .

[0114] Step S2025: The following loss function is defined, which is the expectation of data and noise:

[0115] (8)

[0116] in, represents the loss function, Represents the input data and actual noise expectations, Represents input data, represents the actual noise, represents the difference between the predicted noise and the actual noise, represents the prediction noise, represents the weight coefficient, Represents the time step.

[0117] Mean function It can be calculated by this loss function.

[0118] (9)

[0119] in, represents the mean function under the conditional distribution, Represents input data, represents the time step, represents the time-dependent parameter, represents another time-dependent parameter, Represents the weight coefficient, usually Related, represents the prediction noise.

[0120] Step S203: Introduction of conditional information. Simple CDPM generates samples unconditionally, so a model is trained at the same time to learn to generate data under conditional settings.

[0121] (10)

[0122] in, represents the noise variable, Indicates that the condition The predicted noise is represents the new state generated by adding noise at time t, represents the noise of the unconditional prediction, represents the adjustment factor, corresponds to the unconditional model, while The model is adjusted to the conditional model.

[0123] Step S3, anomaly detection: Use the mean square error (MSE) to calculate the distance between the normal data in the support set and the noise reconstructed data obtained by the corresponding trained detection model, and determine the threshold. The distance between the data to be detected and the noise reconstructed data obtained by the corresponding trained detection model is used as the anomaly score. If the anomaly score exceeds the threshold, it is judged as an anomaly.

[0124] First, the threshold is set, and the average Euclidean distance between the data in the support set and the data generated by the conditional diffusion probability model (CDPM) is used as the threshold. Then the data to be tested is input into the trained CDPM, and the degree of abnormality of the data is evaluated by calculating the mean square error between the reconstructed data output by the model and the actual input data. When testing, if the calculated MSE value exceeds the previously set threshold, it is marked as abnormal data; if the MSE value of the data to be tested is lower than the threshold obtained by CDPM training, it can be considered normal data.

[0125] In another embodiment, anomaly detection includes the following steps:

[0126] Step S301: Threshold setting: Calculate the average Euclidean distance between the data in the support set and the data generated by the trained detection model, and use it as the threshold.

[0127] Step S302, mean square error calculation.

[0128] Step S3021, input the data to be detected into the trained detection model to obtain the reconstructed data of the data to be detected output by the model.

[0129] Step S3022, calculating the mean square error between the reconstructed data of the data to be detected and the data to be detected.

[0130] Step S3023, if the calculated mean square error exceeds the previously set threshold, this will be regarded as a significant abnormal signal, which means that the data point is likely not to belong to the normal data distribution. Therefore, it is marked as abnormal and removed from subsequent analysis and calculation to avoid interference with the final result.

[0131] Step S3024: If the mean square error of the data to be detected is lower than the threshold obtained by training the conditional diffusion probability model, this indicates that the deviation between the data point and the normal mode is small, and therefore it is considered to be normal data.

[0132] In another embodiment, step S4, an alarm mechanism, is also included.

[0133] Specifically, the alarm mechanism is mainly divided into the following three parts:

[0134] Step S401, real-time monitoring: continuously apply the trained detection model in the real-time data stream to calculate the mean square error between the current sensor data and the model prediction data.

[0135] Step S402, abnormal alarm: if abnormal data is detected, the alarm mechanism is triggered to notify relevant personnel for further analysis and processing.

[0136] Step S403, feedback mechanism: record the processing results of each alarm, continuously optimize the model, and improve the accuracy of anomaly detection.

[0137] Step S4031, collect exception handling results, including exception causes, handling measures and effects.

[0138] Step S4032, analyze the exception handling results and evaluate the accuracy and effectiveness of the alarm mechanism.

[0139] Step S4033, regularly train and optimize the conditional diffusion probability model, introduce new abnormal patterns and learning experiences, and improve the generalization ability of the model and the accuracy of abnormality detection.

[0140] The alarm mechanism triggers abnormal alarms in a timely manner by monitoring sensor data in real time and calculating MSE, and continuously optimizes the model by recording and processing alarm results, thereby improving the overall accuracy and efficiency of anomaly detection.

[0141] Another embodiment provides a sensor anomaly detection system based on a conditional diffusion probability model, such as Figure 2 As shown, the method for implementing the sensor anomaly detection method based on the conditional diffusion probability model includes a data acquisition processing unit, a detection model unit, and an anomaly detection unit, wherein:

[0142] The data acquisition and processing unit is used to collect and pre-process the power plant equipment monitoring data to obtain a training set and a support set.

[0143] The detection model unit is used to train the detection model through a training set. The detection model includes a conditional probability diffusion model and a U-Net model. The conditional probability diffusion model is used to detect anomalies. By adding and removing noise, and using the U-Net model to predict noise and reconstruct data, the detection model training is completed to obtain a trained detection model.

[0144] The anomaly detection unit is used to calculate the distance between the normal data in the support set and the noise reconstructed data obtained by the corresponding trained detection model using the mean square error to determine the threshold. The distance between the data to be detected and the noise reconstructed data obtained by the corresponding trained detection model is used as the anomaly score. If the anomaly score exceeds the threshold, it is determined to be abnormal.

[0145] The detection model unit includes a conditional diffusion probability model module and a U-Net model module, wherein the conditional diffusion probability model module is used to detect anomalies using a conditional probability diffusion model, and the U-Net model module is used to predict noise and reconstruct data using a U-Net model.

[0146] The detection model unit includes an encoder and a decoder, wherein the encoder includes an input layer, a first convolutional layer 1, a maximum pooling layer 1, a first convolutional layer 2, a first convolutional layer 3, a maximum pooling layer 2, a first convolutional layer 4, a first convolutional layer 5, a maximum pooling layer 3, a first convolutional layer 6, a first convolutional layer 7, and a first convolutional layer 8 connected in sequence, wherein the first convolutional layer 2 is connected to the first residual module 1, and the first convolutional layer 3 is connected to the first embedding module 1; the first convolutional layer 4 is connected to the first residual module 2, and the first convolutional layer 5 is connected to the first embedding module 2; the first convolutional layer 6 is connected to the first residual module 3, and the first convolutional layer 7 is connected to the first embedding module 3; the decoder includes a second convolutional layer connected in sequence 1. upsampling layer 1, second convolutional layer 2, second convolutional layer 3, upsampling layer 2, second convolutional layer 4, second convolutional layer 5, upsampling layer 3, second convolutional layer 6, second convolutional layer 7, second convolutional layer 8, the second convolutional layer 2 is connected to the second residual module 1, and the second convolutional layer 3 is connected to the second embedding module 1; the second convolutional layer 4 is connected to the second residual module 2, and the second convolutional layer 5 is connected to the second embedding module 2; the second convolutional layer 6 is connected to the second residual module 3, and the second convolutional layer 7 is connected to the second embedding module 3; the first convolutional layer 5 is jump-connected to the second convolutional layer 2, the first convolutional layer 3 is jump-connected to the second convolutional layer 4, and the first convolutional layer 1 is jump-connected to the second convolutional layer 6. The first convolution layer 1, the first convolution layer 2, the first convolution layer 3, the first convolution layer 4, the first convolution layer 5, the first convolution layer 6, the first convolution layer 7, the first convolution layer 8, the second convolution layer 1, the second convolution layer 2, the second convolution layer 3, the second convolution layer 4, the second convolution layer 5, the second convolution layer 6, and the second convolution layer 7 are two one-dimensional convolution layers, each of which is composed of 3 convolution kernels and a ReLU activation function. The maximum pooling layer 1, the maximum pooling layer 2, and the maximum pooling layer 3 are one-dimensional maximum pooling layers, and the pooling window size is 2. The upsampling layer 1, the upsampling layer 2, and the upsampling layer 3 upsample the spatial dimension of the input data by two times. The second convolution layer 8 is a one-dimensional convolution layer, which is composed of 3 convolution kernels and a ReLU activation function. The first embedding module 1, the first embedding module 2, the first embedding module 3, the second embedding module 1, the second embedding module 2, and the second embedding module 3 are used for embedding steps and labels. The first residual module 1, the first residual module 2, the first residual module 3, the second residual module 1, the second residual module 2, and the second residual module 3 are used to calculate the residual.

[0147] Another embodiment provides an electronic device, comprising: at least one processor, at least one memory and a communication interface. The processor, memory and communication interface communicate with each other. The memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the sensor abnormality detection method based on the conditional diffusion probability model.

[0148] Another embodiment provides a non-transitory computer-readable storage medium storing computer instructions, which enable the computer to execute the sensor abnormality detection method based on the conditional diffusion probability model.

[0149] This embodiment improves monitoring accuracy, directly analyzes sensor data, reduces false alarms, and avoids accidents; enhances noise resistance, effectively identifies noise, and ensures monitoring reliability in complex environments; improves detection targeting, accurately identifies anomalies, and enhances early detection of key equipment failures and system reliability.

[0150] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A sensor anomaly detection method based on a conditional diffusion probability model, characterized in that: The following steps are involved: Step S1, data preparation: collect and preprocess the power plant equipment monitoring data to obtain the training set and support set; Step S2, training a detection model using a training set, wherein the detection model includes a conditional probability diffusion model and a U-Net model, using the conditional probability diffusion model to detect anomalies, adding noise and removing noise, and using the U-Net model to predict noise and reconstruct data, completing the training of the detection model to obtain a trained detection model; Step S3, anomaly detection: use the mean square error to calculate the distance between the normal data in the support set and the noise reconstructed data obtained by the corresponding trained detection model, and determine the threshold; the distance between the data to be detected and the noise reconstructed data obtained by the corresponding trained detection model is used as the anomaly score, and if the anomaly score exceeds the threshold, it is judged as an anomaly.

2. The sensor anomaly detection method based on the conditional diffusion probability model according to claim 1 is characterized in that: The method for training the detection model in step S2 is as follows: Step S201, forward diffusion process: diffuse data samples from an initial state to a high noise state; Step S202, reverse diffusion process: the reverse process is intended to restore data from a high noise state to clean data; Step S203: Introduction of conditional information; the simple CDPM generates samples unconditionally, so a model is trained at the same time to learn to generate data under conditional settings; in, represents the noise variable, Indicates that the condition The predicted noise is represents the new state generated by adding noise at time t, represents the noise of the unconditional prediction, represents the adjustment factor, corresponds to the unconditional model, while It is adjusted to a conditional model; power plant equipment includes generators, transformers, and switches.

3. The sensor anomaly detection method based on the conditional diffusion probability model according to claim 2 is characterized in that: The forward diffusion process in step S201 includes the following steps: Step S2011, set the initial state data sequence to ; Step S2012, by initiating the state data sequence Gradually introduce Gaussian noise sequence to obtain a series of noise data ; The diffusion variance ϵ of the intermediate state is determined, that is, with a known noise enhancement amplitude parameter, the known noise enhancement amplitude parameter represents a parameter for controlling the diffusion of random noise; in, represents the conditional distribution in the forward diffusion process, It means that a new state is generated by adding noise at time t. represents the time step, represents a normal distribution, represents the scaling factor of the covariance matrix, represents the identity matrix; Step S2013, obtain the noise data sequence The collected power plant equipment monitoring data include equipment temperature, humidity, vibration, flow, gas concentration, atmospheric pressure, and maximum wind speed.

4. The sensor anomaly detection method based on the conditional diffusion probability model according to claim 3 is characterized by: The reverse diffusion process in step S202 includes the following steps: Step S2021, using the conditional distribution in the forward diffusion process learned in step S2012 , combined with denoising neural network on the U-Net model Conduct training; for each backward step, it is expected to recover the original features lost in the forward process and restore the data to a cleaner state; The conditional distribution in the reverse diffusion process is expressed as: in, represents the conditional distribution in the reverse diffusion process, represents a normal distribution, represents the mean function, represents the covariance matrix of the conditional distribution, Represents the learnable parameters of the model; Step S2022: During the reverse diffusion process The calculation formula is as follows: Step S2023: During the reverse diffusion process The calculation formula is as follows: in, represents the clean data after denoising, represents the weight coefficient, represents the noise state at the current time step, represents random noise from a standard normal distribution, Indicates that given the current noise state and time step t, predict the previous time step The mean of Step S2024: Find the parameters of the reverse process and To iteratively denoise and restore .

5. The sensor anomaly detection method based on the conditional diffusion probability model according to claim 4 is characterized in that: In the reverse diffusion process in step S2021, arrive The transition is smooth and continuous: in, represents the mean function of the conditional distribution, Indicates the size of the covariance.

6. The sensor anomaly detection method based on the conditional diffusion probability model according to claim 5 is characterized in that: The update formula is: The update formula is: in, Indicated in and The mean function under the condition, represents the scalar factor of the covariance matrix, represents the time-dependent parameter, represents another time-dependent parameter, Represents the original data, represents noisy data; The collected power plant equipment monitoring data is transmitted to the monitoring center.

7. The sensor anomaly detection method based on the conditional diffusion probability model according to claim 6 is characterized by: The loss function for training the detection model is: in, represents the loss function, Represents the input data and actual noise expectations, Represents input data, represents the actual noise, represents the difference between the predicted noise and the actual noise, represents the prediction noise, represents the weight coefficient, represents the time step; Mean function The calculation formula is; in, represents the mean function under the conditional distribution, Represents input data, represents the time step, represents the time-dependent parameter, represents another time-dependent parameter, Represents the weight coefficient, usually Related, represents the prediction noise.

8. The sensor anomaly detection method based on the conditional diffusion probability model according to any one of claims 1 to 7, characterized in that: The abnormality detection in step S3 includes the following steps: Step S301: Threshold setting: Calculate the average Euclidean distance between the data in the support set and the data generated by the trained detection model, and use it as the threshold; Step S302, mean square error calculation; Step S3021, input the data to be detected into the trained detection model to obtain the reconstructed data of the data to be detected output by the model; Step S3022, calculating the mean square error between the reconstructed data of the data to be detected and the data to be detected; Step S3023, if the calculated mean square error exceeds the previously set threshold, this will be regarded as a significant abnormal signal, which means that the data point is likely not to belong to the normal data distribution; therefore, it is marked as abnormal and removed from subsequent analysis and calculation to avoid interference with the final result; Step S3024: If the mean square error of the data to be detected is lower than the threshold obtained by training the conditional diffusion probability model, this indicates that the deviation between the data point and the normal mode is small, and therefore it is considered to be normal data.

9. The sensor anomaly detection method based on the conditional diffusion probability model according to any one of claims 1 to 7, characterized in that: Also included is an alarm mechanism, the alarm mechanism comprising the following steps: Step S401, real-time monitoring: continuously applying the trained detection model in the real-time data stream to calculate the mean square error between the current sensor data and the model prediction data; Step S402, abnormal alarm: if abnormal data is detected, the alarm mechanism is triggered, and further analysis and processing are performed on it; Step S403, feedback mechanism: record the processing results of each alarm, continuously optimize the model, and improve the accuracy of anomaly detection; Step S4031, collecting exception handling results, including exception causes, handling measures and effects; Step S4032, analyze the exception handling results and evaluate the accuracy and effectiveness of the alarm mechanism.

10. The sensor anomaly detection method based on the conditional diffusion probability model according to any one of claims 1 to 7, characterized in that: The data preparation in step S1 includes the following steps: Step S101, data collection: deploy sensor nodes to monitor and collect data from power plant equipment in real time; Step S102, data preprocessing: clean the collected data and delete data with missing values ​​and obvious outliers to ensure the quality of training data; Step S103, data partitioning: the data set is divided into a training set, a support set, and a test set in a ratio of 6:2:2 to ensure that the model can be verified and evaluated at different stages.

11. A sensor anomaly detection system based on a conditional diffusion probability model, characterized in that: A sensor anomaly detection method based on a conditional diffusion probability model for implementing any one of claims 1 to 10, comprising a data acquisition processing unit, a detection model unit, and an anomaly detection unit, wherein: the data acquisition processing unit is used to collect and pre-process power plant equipment monitoring data to obtain a training set and a support set; The detection model unit is used to train the detection model through the training set, the detection model includes a conditional probability diffusion model and a U-Net model, the conditional probability diffusion model is used to detect anomalies, and the training of the detection model is completed by adding and removing noise, and using the U-Net model to predict noise and reconstruct data, thereby obtaining a trained detection model; The anomaly detection unit is used to use the mean square error to calculate the distance between the normal data in the support set and the noise reconstructed data obtained by the corresponding trained detection model, and determine the threshold; the distance between the data to be detected and the noise reconstructed data obtained by the corresponding trained detection model is used as the anomaly score, and if the anomaly score exceeds the threshold, it is judged as an anomaly.

12. The sensor anomaly detection system based on the conditional diffusion probability model according to claim 11, characterized in that: The detection model unit includes a conditional diffusion probability model module and a U-Net model module. The conditional diffusion probability model module is used to detect anomalies using a conditional probability diffusion model; the U-Net model module is used to predict noise and reconstruct data using a U-Net model.

13. An electronic device, characterized in that: include: at least one processor, at least one memory, and a communication interface; The processor, memory and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the sensor abnormality detection method based on the conditional diffusion probability model according to any one of claims 1-10.

14. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the sensor abnormality detection method based on the conditional diffusion probability model as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Chromosome anomaly detection system and method based on de-noising diffusion probability model

    CN117011234A

  • Double-stage unmanned aerial vehicle remote sensing image recognition method based on diffusion model

    CN118015500A

  • Generative image anomaly detection method based on diffusion model and uncertainty estimation

    CN118037672A

  • Trajectory processing method and device based on diffusion model

    CN118760731A

  • Deep sea sensing signal fault diagnosis method and system based on diffusion type contrast learning

    CN118797352A

Cited By

  • Network element anomaly prediction method and device, network equipment, medium and program product

    CN120475429A

  • Network element anomaly prediction methods, devices, network equipment, media, and software products

    CN120475429B

  • E-commerce platform traffic anomaly detection method based on time-frequency potential diffusion model

    CN120675731A

  • An anomaly detection method for e-commerce platform traffic based on a time-frequency latent diffusion model

    CN120675731B

  • Woven fabric defect detection method based on AnDDPM unsupervised learning

    CN121053436A