A power load anomaly detection method and system based on time series correlation bias
By employing self-attention neural networks and temporal correlation bias methods, the limitations of traditional power load detection methods in long-term dependency modeling are overcome, enabling unsupervised, high-precision power load anomaly detection, which is suitable for the safety monitoring of smart grids.
Patent Information
- Application Number
- CN202511308605.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-09-15
AI Technical Summary
Traditional power load anomaly detection methods rely on labeled data, which makes it difficult to effectively model complex time-series patterns. They are particularly limited in terms of long-term dependencies and multi-dimensional feature interactions, and are difficult to adapt to the high-precision detection requirements of smart grids.
A self-attention neural network is used for feature reconstruction. By calculating the temporal correlation deviation and reconstruction error, abnormal points of power load are identified. The self-attention mechanism is used to capture long-term dependencies, and the correlation change is measured by combining JS divergence to achieve unsupervised training.
It improves the accuracy and stability of power load anomaly detection, reduces reliance on labeled data, adapts to complex load patterns and time scales, and enhances the comprehensiveness and accuracy of detection.
Smart Images

Figure CN120804723B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric power data analysis, more particularly, it relates to a power load anomaly detection method and system based on time series correlation deviation. BACKGROUND
[0002] Power load anomaly detection is a key link to ensure the stable operation of the power system, aiming to identify load fluctuation anomalies, equipment failures, control strategy failures, etc., to prevent power grid operation risks. Power load data is usually recorded in the form of time series, with obvious trend, periodicity and short-term fluctuation characteristics. Under normal circumstances, load data shows regular changes, such as seasonal fluctuations, day-night load differences, and load pattern differences between weekdays and holidays. However, abnormal situations can disrupt these regularities, resulting in sudden abnormal points. For example, short-term mutation anomalies refer to sudden increases or decreases in load within a very short period of time, trend drift anomalies show that the load continuously deviates from the normal trajectory, periodic anomalies change the fluctuation pattern due to external interference, and random noise anomalies are caused by external environment or data collection errors. These anomalies not only affect the accuracy of power dispatching, but also pose a threat to equipment safety.
[0003] Power load anomaly detection has important practical significance and application value in the smart grid environment. First, accurate identification of abnormal load can help operations personnel quickly locate the source of the fault, prevent equipment damage or fault propagation, and thus ensure the safe and stable operation of the power grid. Second, anomaly detection can provide early warning of potential risks before faults occur, providing decision support for power dispatching and optimization, and improving power supply reliability. In addition, combined with big data and artificial intelligence technology, an intelligent anomaly detection system can reduce manual intervention, achieve automated monitoring and intelligent operation and maintenance of power system equipment, improve detection efficiency and reduce operation and maintenance costs.
[0004] Traditional anomaly detection methods mainly rely on fixed rules or statistical analysis, which are difficult to effectively model complex time series patterns, especially in capturing long-term dependencies. With the expansion of the power grid scale and the improvement of the level of intelligence, load anomaly detection faces more severe challenges, including multi-scale time series dependencies, multi-dimensional feature interactions, and data uncertainty and noise interference, making it difficult for traditional methods to meet the high-precision detection requirements. Therefore, time series modeling methods based on deep learning have gradually become a research hotspot. Among them, Transformer and attention mechanism have advantages in capturing long-term dependencies and have achieved remarkable results in natural language processing and other fields, providing new solutions for complex time series anomaly detection.
[0005] In recent years, reconstruction-based unsupervised anomaly detection methods have shown good results in many fields. These methods assume that normal data can be accurately reconstructed, while the reconstruction error of abnormal data is larger, thereby achieving anomaly point identification. However, the existing methods still have the following two main problems:
[0006] (1) Dependence on normal samples: Many methods filter normal samples for training through heuristic rules, but this may introduce additional noise and affect detection accuracy;
[0007] (2) Limited time series modeling capability: Traditional methods mainly rely on recurrent neural networks (RNN) and their variants to model time series, but these methods have limitations in learning long-term dependencies and periodic features, making it difficult to adapt to long-span power load anomaly detection requirements. SUMMARY
[0008] The purpose of the present application is to provide a power load anomaly detection method and system based on time series correlation deviation, which does not rely on labeled data, can adaptively learn the long-term dependency structure of load data, and accurately identify load anomaly points, providing a more efficient solution for the safety monitoring of smart grids.
[0009] The above technical purpose of the present application is achieved by the following technical scheme:
[0010] In a first aspect, the present application provides a power load anomaly detection method based on time series correlation deviation, comprising the following specific steps:
[0011] S1, collecting time series data for power load anomaly detection and preprocessing the time series data;
[0012] S2, reconstructing the features of the preprocessed time series data through a self-attention neural network and obtaining the corresponding reconstructed sequence data;
[0013] S3, obtaining the correlation matrix in the feature reconstruction process of the self-attention neural network and calculating the time series correlation deviation of the time series data based on the correlation matrix;
[0014] S4, calculating the reconstruction error between the time series data and the corresponding reconstructed sequence data;
[0015] S5, calculating the anomaly score of the time series data using the time series correlation deviation and the reconstruction error, and performing anomaly judgment based on a set anomaly threshold.
[0016] Based on the above technical scheme, the present application can be further improved as follows. Further, the preprocessing includes normalization, specifically:
[0017] ;
[0018] wherein, is the original time series data, wherein, is the number of samples of the time series data, denotes the number of time steps of each time series; denotes the time series data after normalization processing, and denote the mean and standard deviation of each time series, respectively.
[0019] Further, the reconstructed sequence data is specifically:
[0020] ;
[0021] wherein, is the reconstructed sequence data, , , denotes the dimension of the output feature, denotes the dimension of the input feature; are the weight matrix and the bias vector of the decoder in the self-attention neural network, respectively, denotes the output of the feedforward network in the self-attention neural network.
[0022] Further, the correlation matrix represents the long and short term dependency relationship between each time step, specifically:
[0023] ;
[0024] wherein, is the correlation matrix, is the attention score matrix of the attention subnetwork in the self-attention neural network, is the number of attention subnetworks in the self-attention neural network.
[0025] Further, the time series correlation bias is specifically:
[0026] ;
[0027] wherein, denotes the time series correlation bias of the sample in the time series data, denotes the JS divergence function, is the average of the correlation matrix of all normal samples, is the correlation matrix corresponding to the sample .
[0028] Further, the self-attention neural network is obtained by the following way:
[0029] inputting the training time series sample into the neural network for processing, and calculating a time series correlation deviation loss and a reconstruction error loss of the training time series sample;
[0030] based on the time series correlation deviation loss and the reconstruction error loss, calculating a training target function of the neural network, and when the training target function does not exceed a loss threshold, determining the neural network whose training target function does not exceed the loss threshold as a self-attention neural network; the training target function is specifically:
[0031] , wherein:
[0032]
[0033] In the formula, is the value of the training target function, represents the reconstruction error loss, is the time series correlation deviation loss, is a weight parameter, is the time series correlation deviation of the sample in the time series data, is the reconstruction error of the sample in the time series data, represents the total number of samples in the training time series sample, represents the reconstructed sequence data of the sample in the time series data.
[0034] Further, the above abnormal score is specifically:
[0035]
[0036] In the formula, represents the abnormal score of the sample in the time series data, represents the reconstruction error of the sample in the time series data, represents the reconstructed sequence data of the sample in the time series data, is the time series correlation deviation of the sample in the time series data.
[0037] In a second aspect, the present application provides a power load anomaly detection system based on time series correlation deviation, which is applied to the power load anomaly detection method based on time series correlation deviation in any one of the first aspect, and comprises:
[0038] The time series data acquisition module is configured to collect time series data for power load anomaly detection and pre-process the time series data.
[0039] The time series data reconstruction module is configured to reconstruct features of the pre-processed time series data by using a self-attention neural network and obtain corresponding reconstructed sequence data.
[0040] The correlation deviation calculation module is configured to obtain a correlation matrix in the feature reconstruction process of the self-attention neural network and calculate a time series correlation deviation of the time series data based on the correlation matrix.
[0041] The reconstruction error calculation module is configured to calculate a reconstruction error between the time series data and the corresponding reconstructed sequence data.
[0042] The anomaly score judgment module is configured to calculate an anomaly score of the time series data by using the time series correlation deviation and the reconstruction error and perform anomaly judgment based on a set anomaly threshold.
[0043] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of any one of the first aspect when executing the computer program.
[0044] In a fourth aspect, the present application provides a non-transitory computer readable storage medium, which stores computer instructions, and the computer instructions make a computer execute the method of any one of the first aspect.
[0045] Compared with the prior art, the present application has at least the following beneficial effects:
[0046] In the present application, firstly, the self-attention mechanism is used to capture the long-distance dependence relationship in the time series data and learn the global pattern of load change, and by paying attention to multiple different positions in the input sequence, multi-level time series information is extracted; then, by constructing a time series correlation matrix, a time series correlation deviation between each time step is calculated, so as to quantify the change of the dependence relationship between the time steps; finally, the reconstruction error and the time series correlation deviation are used to calculate the anomaly score of the sample; the reconstruction error and the time series correlation deviation are fused, the stability of the anomaly detection is improved, compared with the traditional method which often depends on a single feature, the present method integrates the information of both, so that the detection result is more stable and accurate, and is suitable for complex power load change.
[0047] In the present application, the self-attention neural network adopts a multi-head self-attention mechanism, which can capture long-time span load change patterns and make up for the defects of RNN and LSTM in modeling long-range dependencies due to gradient disappearance; in contrast, the self-attention mechanism can simultaneously focus on multiple time steps, improve the perception of complex patterns, and more accurately depict the trend of load data changes; at the same time, the neural network adopts an unsupervised training strategy, reducing the dependence on labeled data, and the power load abnormal sample is scarce and difficult to label, and the traditional supervised learning method is limited by insufficient samples and is difficult to generalize; the method jointly optimizes the reconstruction error and the time sequence correlation deviation, accurately learns the normal mode, and identifies abnormal load points based on the abnormal scoring mechanism, has good generalization ability, and is suitable for power data of different load modes and time scales.
[0048] In the present application, the time sequence correlation deviation is introduced as an important measurement index for anomaly detection, which makes up for the shortcomings of the traditional reconstruction error method, especially for data points with small reconstruction error but abnormal dependence; the method calculates the time sequence correlation matrix and uses JS divergence to measure the deviation, accurately describes the correlation changes between time steps, and thus improves the comprehensiveness and accuracy of anomaly detection. BRIEF DESCRIPTION OF DRAWINGS
[0049] The drawings described herein are used to provide further understanding of the embodiments of the present application, constitute a part of the present application, and do not constitute a limitation on the embodiments of the present application. In the drawings:
[0050] Figure 1 The method flowchart of the detection method in the embodiments of the present application;
[0051] Figure 2 The flowchart of the detection method in the embodiments of the present application;
[0052] Figure 3 The model structure schematic diagram of the power load anomaly detection method in the embodiments of the present application;
[0053] Figure 4 The connection schematic diagram of the detection system in the embodiments of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0055] Therefore, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application claimed, but merely represents selected embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the application.
[0056] It should be noted that similar reference numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0057] In the description of embodiments of the application, "a plurality of" represents at least 2.
[0058] Embodiment 1: In order to solve the problems that the traditional network training relies on labeled data, and many methods train by screening normal samples through heuristic rules, which may introduce additional noise and affect detection accuracy, and the time series modeling capability is limited, it is difficult to adapt to the demand of long time span power load anomaly detection, etc., the embodiment provides a power load anomaly detection method based on time series correlation bias, as shown in Figure 1 and Figure 2 , comprising the following specific steps:
[0059] S1, collecting time series data for power load anomaly detection, and preprocessing the time series data.
[0060] Among them, the preprocessing includes normalization processing, specifically:
[0061] ;
[0062] In the formula, is the original time series data, , wherein, is the number of samples of the time series data, represents the number of time steps of each time series; represents the time series data after normalization processing, and respectively represent the mean and standard deviation of each time series.
[0063] S2, the preprocessed time series data is reconstructed by a self-attention neural network, and the corresponding reconstructed sequence data is obtained.
[0064] Optionally, the reconstructed sequence data is specifically:
[0065] ;
[0066] In the formula, to reconstruct the sequence data, 、 , denotes the dimension of the output feature, denotes the dimension of the input feature; respectively denote the weight matrix and the bias vector of the decoder in the self-attention neural network, denotes the output of the feedforward network in the self-attention neural network.
[0067] Specifically, when reconstructing the feature through the self-attention neural network, the following steps are mainly included:
[0068] 1) Linear embedding of the input time series data through the linear mapping of the self-attention neural network.
[0069] The normalized time series data is embedded through the linear projection layer, which can be expressed as: ;
[0070] In the formula, is the data representation obtained after embedding, is a trainable parameter, is a bias term, where is the hidden layer dimension of the self-attention neural network.
[0071] 2) Construct an encoder based on the multi-head self-attention network, which is composed of L layers of stacking, each layer containing a multi-head self-attention network and a feedforward network, as shown in Figure 3 wherein:
[0072] The multi-head self-attention network contains H sub-networks (referred to as "attention heads"); the first layer multi-head self-attention network is expressed as: wherein, denotes the multi-head self-attention network, denotes the output of the first layer; each attention sub-network contains three functions:
[0073] ;
[0074] In the above formula, is the output of the first layer, , , respectively denote three weight matrices corresponding to the query function, the key function and the value function of the attention mechanism; each attention sub-network calculates the attention score:
[0075] ;
[0076] wherein, denotes the attention score matrix of the attention subnetwork , is a normalization function, is a scaling coefficient; the output of each attention subnetwork is obtained by weighted sum of the value function using the attention score: ; the outputs of multiple attention subnetworks are spliced to obtain the output of the multi-head self-attention network: .
[0077] Further, the aforementioned feedforward network is composed of a fully connected layer, and residual connection and layer normalization operation are added:
[0078] ;
[0079] wherein, and are parameters of the feedforward network, is an activation function, denotes the layer normalization operation.
[0080] 3) decoding by the decoder to obtain the final reconstructed sequence data, which adopts a fully connected layer for decoding to reconstruct the input time series.
[0081] S3, obtaining the correlation matrix in the self-attention neural network feature reconstruction process, and calculating the time series correlation deviation of the time series data based on the correlation matrix;
[0082] wherein, based on the attention score matrix, the correlation matrix between each time step is calculated to capture the long-term and short-term dependence between time steps, i.e. the correlation matrix represents the long-term and short-term dependence between each time step, specifically:
[0083] ;
[0084] wherein, is the correlation matrix, is the attention score matrix of the attention subnetwork in the self-attention neural network, is the number of attention subnetworks in the self-attention neural network.
[0085] Further, the Jensen-Shannon divergence (JS divergence) is used to calculate the time series correlation deviation between each sample and the normal sample, and the aforementioned time series correlation deviation is specifically:
[0086] ;
[0087] wherein, a time series correlation deviation of a sample in time series data, denotes a JS divergence function, is the average of the correlation matrix of all normal samples, is a sample corresponding correlation matrix.
[0088] Specifically, the above self-attention neural network is obtained by the following way:
[0089] S31, input the training time series sample into the neural network for processing, and calculate the time series correlation deviation loss and reconstruction error loss of the training time series sample.
[0090] S32, based on the time series correlation deviation loss and the reconstruction error loss, calculate the training target function of the neural network, when the training target function does not exceed the loss threshold, determine the neural network whose training target function does not exceed the loss threshold as the self-attention neural network.
[0091] Wherein, during training, the learning rate of the neural network can be set to 0.0001, the model parameters of the neural network can be updated by Adam optimizer, the hidden layer dimension parameter of the proposed neural network is set to d=128, and the self-attention network can contain 4 layers and 8 groups of multi-head self-attention modules.
[0092] Optionally, the training target function is specifically:
[0093] , wherein:
[0094] ; ;
[0095] In the formula, is the value of the training target function, denotes the reconstruction error loss, is the time series correlation deviation loss, is a weight parameter, a time series correlation deviation of a sample in time series data, a reconstruction error of a sample in time series data, denotes the total number of samples in the training time series sample, denotes the reconstruction sequence data of a sample in time series data.
[0096] S4, based on the time series data and the corresponding reconstruction sequence data, the reconstruction error between each other is calculated; wherein, is the reconstruction error of a sample The reconstruction error.
[0097] S5 uses time series correlation deviation and reconstruction error to calculate the anomaly score of time series data, and makes anomaly judgment based on the set anomaly threshold.
[0098] Specifically, the above-mentioned abnormal scores are as follows:
[0099] ;
[0100] In the formula, Represents samples in time series data The anomaly score indicates that the higher the value, the greater the likelihood of an anomaly (in power load) in the data sequence. Represents samples in time series data Reconstruction error, Represents samples in time series data Reconstructed sequence data, Samples in time series data The temporal correlation deviation.
[0101] Specifically, when performing anomaly detection based on a set anomaly threshold, the anomaly threshold can be set as follows: If the sample Abnormal scoring If so, the sample is considered abnormal.
[0102] Example 2: This application provides a power load anomaly detection system based on time-series correlation deviation, applied to a power load anomaly detection method based on time-series correlation deviation in Example 1, such as... Figure 4 As shown, it includes:
[0103] The time-series data acquisition module is used to collect time-series data for power load anomaly detection and to preprocess the time-series data.
[0104] The time series data reconstruction module is used to reconstruct the features of the preprocessed time series data through a self-attention neural network and obtain the corresponding reconstructed sequence data.
[0105] The correlation deviation calculation module is used to obtain the correlation matrix in the feature reconstruction process of the self-attention neural network, and calculate the temporal correlation deviation of the time series data based on the correlation matrix.
[0106] The reconstruction error calculation module is used to calculate the reconstruction error between the time series data and the corresponding reconstruction sequence data.
[0107] Anomaly score determination module, configured to calculate an anomaly score of the time series data by using the time series correlation deviation and the reconstruction error, and determine an anomaly based on a set anomaly threshold.
[0108] Embodiment 3: The embodiment of the application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the method of embodiment 1 when executing the computer program.
[0109] Embodiment 4: The embodiment of the application provides a non-transitory computer readable storage medium, which stores computer instructions, and the computer instructions cause a computer to execute the method of embodiment 1.
[0110] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system, or a computer program product. Therefore, the application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program code.
[0111] The application is described with reference to the flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The means for implementing the functions specified in one or more flows and / or blocks.
[0112] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction means, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The means for implementing the functions specified in one or more flows and / or blocks.
[0113] These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operational steps are performed on the computer or other programmable data processing device to generate a computer implemented process, so that the instructions executed on the computer or other programmable data processing device provide a process for implementing the functions specified in the flowchart Figure 1 one flow or multiple flows and / or the functions specified in the block Figure 1 one flow or multiple flows and / or the functions specified in the block
[0114] Those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned facts and methods can be completed by programs instructing relevant hardware, and the programs involved or the programs mentioned can be stored in a computer-readable storage medium. When the program is executed, the following steps are included: at this time, the corresponding method steps are derived, and the storage medium can be ROM / RAM, a magnetic disc, an optical disc, etc.
[0115] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A power load anomaly detection method based on timing correlation bias, characterized in that, The method comprises the following specific steps: S1, collecting time series data for power load anomaly detection, and preprocessing the time series data; S2, reconstructing features of the preprocessed time series data through a self-attention neural network, and obtaining corresponding reconstructed sequence data; S3, obtaining a correlation matrix in the feature reconstruction process of the self-attention neural network, and calculating a time series correlation deviation of the time series data based on the correlation matrix; S4, calculating reconstruction errors between each other based on the time series data and the corresponding reconstructed sequence data; S5, calculating an anomaly score of the time series data by using the time series correlation deviation and the reconstruction error, and performing anomaly judgment based on a set anomaly threshold; The correlation matrix represents the long-term and short-term dependence relationship between each time step, specifically as follows: ; wherein is a correlation matrix, is an attention score matrix of an attention subnetwork in a self-attention neural network is an attention score matrix of an attention subnetwork in a self-attention neural network is the number of attention subnetworks in a self-attention neural network; The time series correlation deviation is specifically as follows: ; wherein denotes the time series correlation deviation of a sample in the time series data, denotes the JS divergence function, denotes the average of the correlation matrices of all normal samples, is the correlation matrix of the sample corresponding to the sample. 2.The power load anomaly detection method based on time-series correlation bias according to claim 1, wherein, The preprocessing includes normalization processing, specifically as follows: ; wherein, is the original time series data, wherein, is the number of samples of the time series data, denotes the number of time steps of each time series; denotes the normalized time series data, and denote the mean and the standard deviation of each time series, respectively. 3.The power load anomaly detection method based on time-series correlation bias according to claim 1, wherein, The reconstructed sequence data is specifically as follows: ; wherein to reconstruct the sequence data, , , denotes the dimension of the output features, denotes the dimension of the input features; are a weight matrix and a bias vector of the decoder in the self-attention neural network, respectively, denotes the output of the feed-forward network in the self-attention neural network.
4. The method of claim 1, wherein, The self-attention neural network is obtained by the following way: Input the training time series sample into the neural network for processing, and calculate the time series correlation deviation loss and the reconstruction error loss of the training time series sample; Based on the time series correlation deviation loss and the reconstruction error loss, a training target function of the neural network is calculated, and when the training target function does not exceed the loss threshold, the neural network whose training target function does not exceed the loss threshold is determined as the self-attention neural network; the training target function is specifically as follows: ; Wherein: ; ; wherein, is a value of the training objective function, denotes a reconstruction error loss, is a temporal correlation bias loss, is a weight parameter, is a temporal correlation bias of a sample in the time series data, is a reconstruction error of a sample in the time series data, denotes a total number of samples in the training time series samples, denotes reconstruction sequence data of a sample in the training time series samples.
5. The method of claim 1, wherein, The anomaly score is specifically as follows: ; wherein represents an anomaly score of a sample in time series data, represents a reconstruction error of a sample in time series data, represents reconstructed sequence data of a sample in time series data, is a temporal correlation deviation of a sample in time series data.
6. A power load anomaly detection system based on timing association bias, characterized by, It comprises: A time series data acquisition module is configured to collect time series data for power load anomaly detection, and preprocess the time series data; A time series data reconstruction module is configured to reconstruct features of the preprocessed time series data through a self-attention neural network, and obtain corresponding reconstructed sequence data; A correlation deviation calculation module is configured to obtain a correlation matrix in the feature reconstruction process of the self-attention neural network, and calculate a time series correlation deviation of the time series data based on the correlation matrix; A reconstruction error calculation module is configured to calculate reconstruction errors between each other based on the time series data and the corresponding reconstructed sequence data; An anomaly score judgment module is configured to calculate an anomaly score of the time series data by using the time series correlation deviation and the reconstruction error, and perform anomaly judgment based on a set anomaly threshold; The correlation matrix represents the long-term and short-term dependence relationship between each time step, specifically as follows: ; wherein is a correlation matrix, is an attention score matrix of an attention subnetwork in a self-attention neural network, is an attention score matrix of an attention subnetwork in a self-attention neural network, is the number of attention subnetworks in a self-attention neural network; The time series correlation deviation is specifically as follows: ; wherein denotes the time series correlation deviation of a sample in the time series data, denotes the JS divergence function, denotes the average of the correlation matrices of all normal samples, is the correlation matrix of the sample corresponding to the sample.
7. An electronic device, comprising: The non-transitory computer readable storage medium stores computer instructions, and the computer instructions make the computer execute the power load anomaly detection method based on the time series correlation deviation.
8. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions, and the computer instructions make the computer execute the power load anomaly detection method based on the time series correlation deviation.
Citation Information
Patent Citations
Unsupervised electricity larceny detection method based on deep twin autoregressive network
CN117056874A
VAE and association difference-based multivariate time series data anomaly detection method
CN119783010A