Smart power grid data anomaly identification method and system

By fusion of the abnormal transformer model and graph attention mechanism in time-feature dimensions, the accuracy and efficiency problems of traditional methods when processing smart grid data are solved, more efficient abnormal detection is achieved, operation and maintenance costs are reduced, and power is improved. System stability and reliability.

CN119202972APending Publication Date: 2024-12-27NARI NANJING CONTROL SYSTEM CO LTD

Patent Information

Application Number
CN202411197630.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The traditional smart grid data anomaly detection method performs poorly when processing time series data of nonlinear and multidimensional features, and the existing Transformer model ignores the correlation between time series between different time scales and feature dimensions, resulting in false positives. and missed reports affect the accuracy and reliability of detection.

Method used

Using the time-feature dimension fusion anomaly transformer model, combined with the graph attention mechanism and Transformer architecture, the multi-dimensional features of the time series are learned in parallel, and the feature dimension and time dimension features are extracted, and the abnormal score is calculated through abnormal attention operations, and the reconstruction loss is used. Perform training and optimization.

Benefits of technology

It significantly improves the accuracy and efficiency of abnormal detection, reduces false detection and missed detection, enhances the generalization ability of the model, reduces operation and maintenance costs, improves the stability and reliability of the power system, and supports sustainable development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202972A_ABST
    Figure CN119202972A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent power grid data anomaly identification method and system, and the method comprises the steps: carrying out the anomaly identification of power grid index data through building an abnormal transformer model, employing a graph attention mechanism, and learning a complex dependency relationship between multivariable time sequences from a time dimension and a feature dimension in parallel; and processing the fused hidden features through an abnormal Transform model to generate an abnormal score, thereby more accurately capturing an abnormal mode in the time sequence data. According to the method, the accuracy of anomaly detection is improved, and the multi-dimensional information of the time sequence data can be utilized more comprehensively. The method has a wide application prospect, and can significantly improve the accuracy and efficiency of fault detection especially in the intelligent operation and maintenance of a power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of time series anomaly detection, and in particular to a method and system for identifying anomaly in smart grid data. Background Art

[0002] With the development of smart grid technology, the power system has become more and more complex, involving a large number of sensors and devices, which generate massive amounts of time series data. These data not only include the operating status of power equipment, but also cover key indicators such as load, voltage, and current of the power grid. Effective monitoring and analysis of these data are crucial to preventing equipment failures, optimizing power grid operations, and improving energy efficiency.

[0003] However, traditional anomaly detection methods have some limitations. First, they usually rely on thresholds or simple statistical models, which perform poorly when dealing with time series data with nonlinear and multidimensional features. Second, many methods only focus on data within a specific time window, ignoring the correlation between time series at different time scales and feature dimensions. This may lead to false positives or false negatives, affecting the accuracy and reliability of anomaly detection.

[0004] To overcome these challenges, deep learning techniques have made significant progress in the field of time series anomaly detection in recent years. Deep learning models, especially recurrent neural networks (RNNs) and long short-term memory networks (LSTMs), have attracted attention for their ability to capture long-term dependencies in time series. However, these models suffer from low computational efficiency and difficulty in parallelization when processing large-scale datasets. The emergence of the Transformer architecture provides a new approach to solving these problems. The Transformer model effectively processes sequence data through a self-attention mechanism without loops or convolution operations, thereby improving computational efficiency and allowing parallel processing. Despite this, there are still challenges in directly applying the Transformer model to time series anomaly detection. Time series data has unique properties such as trends, seasonality, and periodicity, which require specific processing methods; in addition, existing Transformer models tend to ignore the correlation between multiple dimensions. Summary of the invention

[0005] Purpose of the invention: The purpose of the present invention is to provide a method and system for identifying anomalies in smart grid data, which improves the accuracy and efficiency of anomaly detection by establishing a time-feature dimension fusion anomaly transformer model, combining the advantages of the graph attention mechanism and the Transformer architecture, and learning the multi-dimensional features of time series in parallel. The model can process not only univariate time series, but also multivariate time series, making it suitable for a wider range of application scenarios.

[0006] Technical solution: The method for identifying abnormality of smart grid data of the present invention comprises the following steps: collecting smart grid index data, inputting it into an abnormal transformer model, and obtaining abnormality identification results of the smart grid index data;

[0007] The abnormal transformer model includes a time feature dimension fusion module and an encoder module. The time feature dimension fusion module uses a graph attention mechanism to extract feature dimension features and time dimension features from the preprocessed smart grid indicator data, respectively, and concatenates and fuses the preprocessed smart grid indicator data, feature dimension features and time dimension features to obtain a second output feature, which is input into the encoder module.

[0008] A first output feature obtained by passing the smart grid indicator data through the first data embedding layer;

[0009] The encoder module includes four anomaly transformers connected in sequence, and the second output feature is added to the second output feature after passing through the first anomaly transformer and then input into the second anomaly transformer;

[0010] The output of the fourth transformer is passed through a mapping layer to obtain an abnormality recognition result of the smart grid indicator data.

[0011] Further, the time-feature dimension fusion module includes a time-dimension graph attention module and a feature-dimension graph attention module;

[0012] The feature dimension graph attention module regards the multivariate time series of smart grid indicator data as a complete graph, in which each node represents a certain feature, and obtains the relationship between adjacent nodes through the graph attention operation to obtain the feature dimension feature.

[0013] The time dimension graph attention module regards all timestamps in the sliding window of smart grid indicator data as a complete graph, in which each node represents the feature vector at the timestamp. The relationship between adjacent nodes is obtained through graph attention operation to obtain the time dimension features.

[0014] Furthermore, the anomaly attention operation solves the anomaly score by respectively calculating the prior association and the sequence association through two branches; the prior association branch uses a learnable Gaussian kernel to calculate the prior about the relative time distance; the sequence association branch learns the association from the original sequence and adaptively finds the most effective association.

[0015] Furthermore, the abnormal transformer model adopts reconstruction loss and uses the minimax strategy for training and optimization.

[0016] The smart grid data anomaly identification system of the present invention comprises an abnormal transformer model, which is used to input smart grid index data into the abnormal transformer model to obtain an abnormal identification result of the smart grid index data;

[0017] The abnormal transformer model includes a time feature dimension fusion module and an encoder module. The time feature dimension fusion module uses a graph attention mechanism to extract feature dimension features and time dimension features from the preprocessed smart grid indicator data, respectively, and splices and fuses the preprocessed smart grid indicator data, feature dimension features and time dimension features to obtain a second output feature, which is input into the encoder module; the first output feature of the smart grid indicator data is obtained by the first data embedding layer;

[0018] The encoder module includes four anomaly transformers connected in sequence, and the second output feature is added to the second output feature after passing through the first anomaly transformer and then input into the second anomaly transformer;

[0019] The output of the fourth transformer is passed through a mapping layer to obtain an abnormality recognition result of the smart grid indicator data.

[0020] Further, the time-feature dimension fusion module includes a time-dimension graph attention module and a feature-dimension graph attention module;

[0021] The feature dimension graph attention module regards the multivariate time series of smart grid indicator data as a complete graph, in which each node represents a certain feature, and obtains the relationship between adjacent nodes through the graph attention operation to obtain the feature dimension feature.

[0022] The time dimension graph attention module regards all timestamps in the sliding window of smart grid indicator data as a complete graph, in which each node represents the feature vector at the timestamp. The relationship between adjacent nodes is obtained through graph attention operation to obtain the time dimension features.

[0023] Furthermore, the abnormal attention operation solves the abnormality score by calculating the prior association and the sequence association respectively through two branches; the prior association branch uses a learnable Gaussian kernel to calculate the prior about the relative time distance; the sequence association branch learns the association from the original sequence and adaptively finds the most effective association.

[0024] Furthermore, the abnormal transformer model adopts reconstruction loss and uses the minimax strategy for training and optimization.

[0025] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the method for identifying anomalies in smart grid data is implemented.

[0026] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the method for identifying anomalies in smart grid data is implemented.

[0027] Beneficial effects: The present invention proposes an abnormal transformer model, which has the following advantages compared with the prior art:

[0028] 1) Improve detection accuracy: The anomaly transformer model captures the intrinsic structure and complex dependencies of multivariate time series data more comprehensively by fusing information from the time dimension and feature dimension. This fusion strategy significantly improves the accuracy of anomaly detection, reduces false detections and missed detections, and ensures the stable operation of the power system.

[0029] 2) Enhanced generalization ability: Due to the use of unsupervised learning methods, the Anomaly Transformer model does not rely on a specific training dataset and has stronger generalization ability. This means that the model can adapt to different data distributions and environments, and can maintain high detection performance even when the data samples are limited or the data distribution changes.

[0030] 3) Reduce operation and maintenance costs: Traditional anomaly detection methods often require a large amount of labeled data and complex feature engineering, which not only increases operation and maintenance costs but also prolongs the deployment cycle. The unsupervised nature of the anomaly transformer model reduces the reliance on labeled data and simplifies the data processing process, thereby effectively reducing operation and maintenance costs.

[0031] 4) Enhance system reliability: The stable operation of the power system is crucial to the normal operation of the economy and society. The abnormal transformer model can detect and respond to potential faults and problems in a timely manner through accurate anomaly detection, thereby enhancing the reliability and safety of the power system.

[0032] 5) Promote intelligent development: With the rapid development of artificial intelligence technology, intelligence has become an important development direction for all walks of life. The introduction of the abnormal transformer model provides strong technical support for the intelligent upgrade of key areas such as power systems, and promotes the entire industry to develop in a more efficient and intelligent direction.

[0033] 6) Supporting sustainable development: The efficient operation of the power system is of great significance to achieving sustainable use of energy. The abnormal transformer model helps to optimize the allocation and management of power resources, reduce energy waste, and support the implementation of sustainable development strategies through accurate anomaly detection.

[0034] In summary, the abnormal transformer model provides an innovative, efficient and reliable solution for anomaly detection in power systems and other related fields with its many beneficial effects such as high accuracy, strong generalization ability, high efficiency, low cost, high reliability, cross-domain applicability, intelligent development and sustainable development support. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a structural diagram of an abnormal transformer model of the present invention;

[0036] Figure 2 This is a structural diagram of a graph attention module according to an embodiment of the present invention;

[0037] Figure 3 This is a structural diagram of an abnormal transformer according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0039] The method for identifying abnormality in smart grid data of the present invention comprises the following steps: collecting smart grid index data, inputting it into an abnormal transformer model, and obtaining abnormality identification results of the smart grid index data. Smart grid index data includes:

[0040] ① Power system frequency: Monitor frequency changes in the power grid. Abnormal frequencies may indicate system stability issues.

[0041] ②Grid node voltage: monitor the voltage level of each grid node. Abnormal voltage fluctuations may be a sign of grid failure.

[0042] ③ Line flow: Monitor the flow of power in the transmission line. Abnormal flow may be a sign of overload or line failure.

[0043] ④ Load changes: Monitor real-time changes in power load. Abnormal load surges or decreases may indicate demand-side problems or equipment failures.

[0044] ⑤ Power generation and consumption: Monitor the matching of power generation and consumption. Abnormal power generation or consumption may indicate problems on the production or consumption side.

[0045] ⑥ Protection device status: monitor the working status of relay protection devices, including circuit breakers, relays, etc. Their abnormal operation may indicate power grid faults.

[0046] ⑦Signal transmission system status: monitor the smoothness of the signal transmission system, including the on / off status of the communication channel. Communication failure may affect the transmission of control instructions.

[0047] ⑧ Response of automatic control system: Monitor the response of automatic control system to grid changes, including frequency regulation, voltage regulation, etc. Abnormal response may indicate control system failure.

[0048] like Figure 1 The network structure diagram of the anomaly transformer model is shown. The anomaly transformer model of the present invention is a temporal-feature fusion anomaly transformer (Temporal-Feature Fusion Anomaly Transformer, TFFAT) model, which is used for anomaly detection of unsupervised multivariable power grid indicator data. The core of the TFFAT model is the temporal-feature fusion module (Temporal-Feature Fusion module, TFFM) and the encoder module composed of the anomaly transformer (Anomaly Transformer, AT). First, the input time series variable is extracted from the time and space dimensions by the TFFM module using the graph attention mechanism, and the two parallel output features are spliced ​​with the original input features, and then the spliced ​​result is input into the first DataEmbedding module for feature fusion. At the same time, TFFAT uses the second DataEmbedding module to preprocess the input time series variable and use it as an input of the encoder network. Wherein DataEmbedding is composed of Token Embedding and PositionalEmbedding, that is, DataEmbedding(x)=TokenEmbedding(x)+PositionalEmbedding(x)

[0049] The output features of the TFFM module are first input to the first AT block of the encoder module, and then the output of the second DataEmbedding module is added to the output of the first AT Block to perform a variety of feature aggregation, which can capture richer context information and help to mine the potential dependencies between time series of different variables. The encoder module consists of 4 AT Blocks, and the output features processed by the encoder module are input to a mapping layer (Projector) for feature reconstruction.

[0050] TFFAT uses the TFFM module to learn the complex dependencies between multivariate time series from the time dimension and feature dimension in parallel, and uses the Anomaly Transformer (AT) encoder to process the fused hidden features and calculate the anomaly score. The specific contents of each module are as follows.

[0051] (1) Time-Feature Fusion Module (TFFM)

[0052] like Figure 2 As shown in Figure 1, the core of the TFFM module is the Graph Attention Mechanism (GAT), namely the Temporal Graph Attention Module (TGAM) and the Feature Graph Attention Module (FGAM). GAT can model the relationship between nodes in any graph. Suppose there are n nodes in a graph, such as {v1, v2, …, v n}, where v i is the feature vector of each node, and the output of each node calculated by GAT is expressed as follows:

[0053]

[0054] where h i represents the output representation of node i, which is consistent with the input v i have the same shape; σ represents the sigmoid activation function. αij is the attention score that measures the contribution of node j to node i, where j is one of the neighboring nodes of node i. L represents the number of neighboring nodes of node i.

[0055] The calculation formula of attention score αij is as follows:

[0056]

[0057] In the formula represents the concatenation operation, w is a column vector of learnable parameters, and LeakyReLU is a nonlinear activation function.

[0058] 1) Feature Dimension Graph Attention Module. GAT treats the multivariate time series as a complete graph, where each node represents a certain feature and each edge represents the relationship between two corresponding features. In this way, the relationship between adjacent nodes can be carefully captured through the graph attention operation. Specifically, each node xi is represented by a sequential vector xi = {xi, t|t∈[0,n)}, and there are a total of k nodes, where n is the total number of timestamps and k is the total number of multivariate features.

[0059] 2) Time dimension graph attention module. The time dimension GAT uses a graph attention network to capture the temporal dependencies in time series. GAT considers all timestamps within the sliding window as a complete graph. Specifically, a node xt represents the feature vector at timestamp t, and its adjacent nodes include all other timestamps in the current sliding window.

[0060] The output of the feature dimension graph attention module is a matrix of shape k×n, where each row is an n-dimensional vector representing the output of each node, with a total of k nodes. Similarly, the output shape of the time dimension graph attention module is n×k. TFFM concatenates the output features of the time dimension and feature dimension graph attention modules with the output features of the preprocessing, with a shape of n×3k, where each row represents the timestamp of a 3k-dimensional feature vector, and then uses the DataEmbedding module to fuse information from different sources.

[0061] (2) Abnormal transformer module (AT)

[0062] The encoder module of TFFAT is composed of 4 abnormal transformer modules. Figure 3 As shown in Figure 1, AT follows the classic Transformer architecture and replaces the original Transformer's Multi-Head Self-Attention (MHSA) with the AnomalyAttention (AnomalyAttention) mechanism. The encoder module of TFFAT models and reconstructs the time series by stacking multiple AT modules. Given X l-1 Input feature for the lth AT module, X l For the output feature of the lth AT module, the calculation formula of the abnormal transformer is as follows.

[0063] Z l =LN(AnomalyAttention(X l-1 )+X l-1 ) (4)

[0064] X l =LN(FeedForward(Z l )+Z l ) (5)

[0065] Among them, LN is the LayerNorm regularization operation, Z l is the hidden layer feature of the lth AT module. AnomalyAttention aims to calculate the difference of associations, and FeedForward is implemented by MLP (Multi-layer Perceptron).

[0066] like Figure 3As shown in (a), the anomaly attention solves the anomaly score by calculating the prior association and series association through two branches. The prior association branch uses a learnable Gaussian kernel to calculate the prior about the relative time distance. Due to the unimodal nature of the Gaussian kernel, this design can pay more attention to adjacent horizons. The anomaly attention also uses a learnable scale parameter σ for the Gaussian kernel to adapt the prior association to different time series patterns, such as anomaly segments of different lengths.

[0067] The sequence association branch learns associations from the original sequence and can adaptively find the most effective associations. These two forms maintain the temporal dependency of each time point, which is more informative than point-level representations. They also reflect the adjacent centralized priors and learned associations, respectively, and their differences should be distinguishable between normal and abnormal. The calculation formula for abnormal attention at the lth layer is as follows.

[0068]

[0069] Where Q, K, V, σ represent query, key, self-attention value and learned scale parameter respectively. l is based on the learned scale parameter σ and the element σ corresponding to the i-th time point i Specifically, for the i-th time point, its association weight with the j-th time point is calculated by the Gaussian kernel, as shown in formula (7). In addition, the Rescale operation is used to convert the association weight into a discrete distribution P by dividing by the row sum. l . S l represents the sequence association, and the Softmax function normalizes the attention map along the last dimension, S l Each row of forms a discrete distribution. is the hidden representation of the anomaly attention at the lth layer. Formulas (6) to (9) constitute the anomaly attention, which can be expressed by AnomalyAttention().

[0070] The Anomaly Transformer formalizes the association discrepancy as the symmetric KL divergence between the prior association and the sequence association, which represents the information gain between the two distributions. The Anomaly Transformer averages the association discrepancy across multiple layers and combines the associations of multiple levels of features into a more informative metric, calculated as follows:

[0071]

[0072] Among them, KL(·||·) is the value corresponding to Pl and S l The KL divergence is calculated between two discrete distributions for each row of . AssDis(P, S; X) is the point-wise association difference of X with respect to the prior association P and sequence association S from multiple layers. The i-th element of AssDis corresponds to the i-th time point of X. In the Anomaly Transformer, the AssDis(P, S; X) of anomaly points is smaller than that of normal time points, which makes AssDis intrinsically distinguishable.

[0073] (3) Loss Function

[0074] TFFAT, like the Anomaly Transformer, uses reconstruction loss to optimize the model. The reconstruction loss will guide the sequence association to find the most informative association. To further amplify the difference between normal and abnormal time points, the Anomaly Transformer uses an additional loss to amplify the difference in associations. Due to the unimodal nature of the prior associations, the difference loss will cause the series associations to focus more on non-adjacent regions, which makes the reconstruction of anomalies more difficult, so anomalies are easier to identify. The loss function for the input sequence X is defined as follows:

[0075]

[0076] In the formula, represents the reconstruction of X. ||·|| F ,||·|| K represents the Frobenius and k-norm, k = 1. λ is a loss balance parameter. When λ>0, the optimization is to expand the correlation difference.

[0077] Considering that directly maximizing the association difference will greatly reduce the scale parameter of the Gaussian kernel, making the previous association meaningless. In order to better control the association learning, the anomaly transformer proposed a maximum-minimum strategy, and the TFFAT in this paper also uses the maximum-minimum strategy to train the model. Specifically, for the minimization stage, the anomaly transformer drives the prior association P l To approximate the sequence association S learned from the original sequence l . This process can adapt the preferential association to different temporal patterns. For the maximization stage, the anomaly transformer optimizes the sequence association to expand the association difference. This process forces the sequence association to pay more attention to non-adjacent horizons. Therefore, combined with the reconstruction loss, the loss function of the two stages is defined as follows.

[0078]

[0079] Where λ>0, *detach means stopping the associated gradient back propagation. When P is close to S in the minimization stage detachWhen , the maximization stage will impose stronger constraints on the sequence association, forcing the time points to focus more on non-adjacent regions. In the case of reconstruction loss, outliers are more difficult to realize than normal time points, thus amplifying the normal-outlier distinguishability of association differences.

[0080] The Anomaly Transformer incorporates the normalized correlation differences into the reconstruction criterion, which will simultaneously exploit the benefits of temporal representation and distinguishable correlation differences. The calculation formula for the anomaly score of the input sequence X is defined as follows.

[0081]

[0082] Where AnomalyScore(X) represents the pointwise anomaly score of X. For better reconstruction, anomalies usually reduce the associated difference, which results in a higher anomaly score. Therefore, this design can make the reconstruction error and the associated difference synergistically improve the anomaly detection performance.

[0083] The smart grid data anomaly identification system of the present invention comprises an abnormal transformer model, which is used to input smart grid index data into the abnormal transformer model to obtain an abnormal identification result of the smart grid index data;

[0084] The abnormal transformer model includes a time feature dimension fusion module and an encoder module. The time feature dimension fusion module uses a graph attention mechanism to extract feature dimension features and time dimension features from the preprocessed smart grid indicator data, respectively, and splices and fuses the preprocessed smart grid indicator data, feature dimension features and time dimension features to obtain a second output feature, which is input into the encoder module; the first output feature of the smart grid indicator data is obtained by the first data embedding layer;

[0085] The encoder module includes four anomaly transformers connected in sequence, and the second output feature is added to the second output feature after passing through the first anomaly transformer and then input into the second anomaly transformer;

[0086] The output of the fourth transformer is passed through a mapping layer to obtain an abnormality recognition result of the smart grid indicator data.

Claims

1. A method for identifying anomalies in smart grid data, characterized in that: The method comprises the following steps: collecting smart grid indicator data, inputting the data into an abnormal transformer model, and obtaining an abnormal identification result of the smart grid indicator data; The abnormal transformer model includes a time feature dimension fusion module and an encoder module. The time feature dimension fusion module uses a graph attention mechanism to extract feature dimension features and time dimension features from the preprocessed smart grid indicator data, respectively, and concatenates and fuses the preprocessed smart grid indicator data, feature dimension features and time dimension features to obtain a second output feature, which is input into the encoder module. A first output feature obtained by passing the smart grid indicator data through the first data embedding layer; The encoder module includes four anomaly transformers connected in sequence, and the second output feature is added to the second output feature after passing through the first anomaly transformer and then input into the second anomaly transformer; The output of the fourth transformer is passed through a mapping layer to obtain an abnormality recognition result of the smart grid indicator data.

2. The method for identifying anomalies in smart grid data according to claim 1, characterized in that: The time-feature dimension fusion module includes a time-dimensional graph attention module and a feature-dimensional graph attention module; The feature dimension graph attention module regards the multivariate time series of smart grid indicator data as a complete graph, in which each node represents a certain feature, and obtains the relationship between adjacent nodes through the graph attention operation to obtain the feature dimension feature. The time dimension graph attention module regards all timestamps in the sliding window of smart grid indicator data as a complete graph, in which each node represents the feature vector at the timestamp. The relationship between adjacent nodes is obtained through graph attention operation to obtain the time dimension features.

3. The method for identifying anomalies in smart grid data according to claim 1, characterized in that: The anomaly attention operation solves the anomaly score by calculating the prior association and the sequence association respectively through two branches; the prior association branch uses a learnable Gaussian kernel to calculate the prior about the relative time distance; the sequence association branch learns the association from the original sequence and adaptively finds the most effective association.

4. The method for identifying anomalies in smart grid data according to claim 1, characterized in that: The anomaly transformer model adopts reconstruction loss and uses the minimax strategy for training and optimization.

5. A smart grid data anomaly identification system, characterized in that: It includes an abnormal transformer model, which is used to input smart grid indicator data into the abnormal transformer model to obtain an abnormal identification result of the smart grid indicator data; The abnormal transformer model includes a time feature dimension fusion module and an encoder module. The time feature dimension fusion module uses a graph attention mechanism to extract feature dimension features and time dimension features from the preprocessed smart grid indicator data, respectively, and splices and fuses the preprocessed smart grid indicator data, feature dimension features and time dimension features to obtain a second output feature, which is input into the encoder module; the first output feature of the smart grid indicator data is obtained by the first data embedding layer; The encoder module includes four anomaly transformers connected in sequence, and the second output feature is added to the second output feature after passing through the first anomaly transformer and then input into the second anomaly transformer; The output of the fourth transformer is passed through a mapping layer to obtain an abnormality recognition result of the smart grid indicator data.

6. The smart grid data anomaly identification system according to claim 5, characterized in that: The time-feature dimension fusion module includes a time-dimensional graph attention module and a feature-dimensional graph attention module; The feature dimension graph attention module regards the multivariate time series of smart grid indicator data as a complete graph, in which each node represents a certain feature, and obtains the relationship between adjacent nodes through the graph attention operation to obtain the feature dimension feature. The time dimension graph attention module regards all timestamps in the sliding window of smart grid indicator data as a complete graph, in which each node represents the feature vector at the timestamp. The relationship between adjacent nodes is obtained through graph attention operation to obtain the time dimension features.

7. The smart grid data anomaly identification system according to claim 5, characterized in that: The anomaly attention operation solves the anomaly score by calculating the prior association and the sequence association respectively through two branches; the prior association branch uses a learnable Gaussian kernel to calculate the prior about the relative time distance; the sequence association branch learns the association from the original sequence and adaptively finds the most effective association.

8. The smart grid data anomaly identification system according to claim 5, characterized in that: The anomaly transformer model adopts reconstruction loss and uses the minimax strategy for training and optimization.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the method for identifying anomalies in smart grid data according to any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for identifying anomalies in smart grid data according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • BGP anomaly detection method and system based on graph attention network

    CN114221790A

  • Time sequence anomaly detection method and system based on hypergraph attention network

    CN117290800A

  • System detection method and apparatus based on multi-source heterogeneous data

    WO2024148880A1

Cited By

  • Identification and traceability method and system for power data exception

    CN121480998A