Intelligent electric power metering anomaly detection method and system based on energy flow dynamic mapping

By building a spatio-temporal graph neural network with energy flow perception mechanism, the problem of untimely and inaccurate detection of abnormal abnormalities in the power system caused by relying on predefined rules in the prior art is solved, and timely and accurate detection and response to abnormal abnormalities in the power system is achieved, and the stability and safety of the power system are improved.

CN120030478APending Publication Date: 2025-05-23JIANGSU YUANBOQUN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510141579.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The prior art relies on predefined rules and is difficult to detect and respond to abnormal situations in the power system in a timely and accurate manner, such as power leakage, equipment failures and abnormal load fluctuations, affecting the stability and safety of the power system.

Method used

Using an intelligent power metering abnormal detection method based on dynamic mapping of energy flow, a space-time graph neural network with the introduction of energy flow perception mechanism is used to monitor the energy flow situation in the power system in real time and detect abnormal phenomena in a timely manner.

Benefits of technology

It realizes timely and accurate detection and response to abnormal situations in the power system, improves the stability and safety of the power system, and optimizes the management and allocation of power resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030478A_ABST
    Figure CN120030478A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power measurement and anomaly detection, and discloses an intelligent electric power measurement anomaly detection method and system based on energy flow dynamic mapping, and the method comprises the following specific steps: obtaining training electric power data; constructing a space-time diagram neural network in which an energy flow sensing mechanism is introduced; performing energy flow dynamic mapping on the training power data by adopting a space-time diagram neural network, and training the space-time diagram neural network; and obtaining to-be-detected power data of a to-be-detected power system, and performing anomaly detection on the to-be-detected power data based on the trained time-space diagram neural network. The method solves the problem that the prior art depends on predefined rules, and has the characteristic that the abnormal condition in the power system can be timely and accurately detected and responded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power metering and anomaly detection, and more specifically, to an intelligent power metering anomaly detection method and system based on dynamic mapping of energy flow. Background Art

[0002] With the development of smart grids, the complexity and scale of power systems continue to increase. Traditional power metering and monitoring methods face many challenges in dealing with large-scale and diverse power data.

[0003] The prior art includes a method and system for intelligent collection, control and analysis of metering data, which relates to the field of power data analysis and processing. The method includes: metering and capacity prediction of demand-side resources, specifically realizing cluster load prediction of residential users through a method based on the combination of pK-means clustering and adaptive spatiotemporal synchronous graph convolutional neural network (ASTSGCN) model; using software robots to capture metering collection index data; identifying specific load user status through non-invasive load monitoring methods; establishing an electric energy meter operation status model to monitor the current operation status of the electric energy meter.

[0004] Existing technologies mainly rely on predefined rules, which makes it difficult to timely and accurately detect and respond to abnormal situations in the power system, such as power leakage, equipment failure, abnormal load fluctuations, etc. This not only affects the stability and security of the power system, but may also lead to economic losses and waste of resources.

[0005] In summary, how to invent an intelligent power metering anomaly detection method and system based on dynamic mapping of energy flow is a technical problem that urgently needs to be solved in this technical field. Summary of the invention

[0006] In order to solve the problem that the prior art relies on predefined rules, the present invention provides an intelligent power metering anomaly detection method and system based on dynamic mapping of energy flow, which has the characteristics of being able to detect and respond to abnormal situations in the power system in a timely and accurate manner.

[0007] In order to achieve the above-mentioned purpose of the present invention, the technical scheme adopted is as follows: A smart power metering anomaly detection method based on energy flow dynamic mapping includes the following specific steps: Obtain training power data; Construct a spatiotemporal graph neural network that introduces an energy flow perception mechanism; Use spatiotemporal graph neural network to dynamically map the energy flow of training power data and train the spatiotemporal graph neural network; The power data to be tested of the power system to be tested is obtained, and anomaly detection is performed on the power data to be tested based on the trained spatiotemporal graph neural network.

[0008] Preferably, a spatiotemporal graph neural network that introduces an energy flow perception mechanism is constructed, with the following specific steps: Build a dynamic mapping block for representing power data as a graph structure; Construct a spatial convolution for extracting spatial features between nodes of the graph structure: Construct a temporal convolution for extracting temporal features: Construct energy conservation constraints; Construct loss function; Combining dynamic mapping blocks, spatial convolution, temporal convolution, energy conservation constraints, and loss functions, we obtain a spatiotemporal graph neural network that introduces an energy flow perception mechanism.

[0009] Furthermore, a spatiotemporal graph neural network is used to dynamically map the energy flow of the training power data and train the spatiotemporal graph neural network. The specific steps are as follows: The dynamic mapping block is used to dynamically map the energy flow of the training data set to obtain the graph structure; Use spatial convolution to extract the spatial features of graph structure; Based on spatial features, temporal convolution is used to further extract temporal features and obtain the node feature matrix; Introducing energy conservation constraints in each node of the node feature matrix and the loss function of the spatiotemporal graph neural network; The loss function is used to perform iterative training to obtain a trained energy flow-aware spatiotemporal graph neural network.

[0010] Furthermore, the dynamic mapping block is used to dynamically map the energy flow of the training data set to obtain a graph structure, which is as follows: For the power data in the training data set Normalization is performed to eliminate the influence of different dimensions, and we get :

[0011] in, is the mean, is the standard deviation; based on , the power system is represented as a graph structure G=(V,E), where: V= The power equipment node representing the power data, E= Represents the energy transmission path between power equipment; the graph structure updates the energy flow status in real time through time series data analysis to form a dynamic mapping.

[0012] Furthermore, spatial convolution is used to extract the spatial features of the graph structure. Specifically, a graph neural network is used to extract the spatial features H of the graph structure layer by layer:

[0013] in, =A+I, A is the adjacency matrix of the graph structure, and I is its self-loop; for The degree matrix of is the node feature matrix of the lth layer of the graph structure; is the weight matrix of the lth layer; is the activation function.

[0014] Furthermore, based on the spatial features, temporal convolution is used to further extract the temporal features and obtain the node feature matrix, which is as follows:

[0015] in, is the spatial feature at time t, is the hidden state at time t; Update hidden state ; The updated hidden state Node feature matrix as subsequent energy flow prediction .

[0016] Furthermore, hidden state The generation and update methods are: At each time step t, the LSTM receives the current input features and the hidden state at the previous moment , through several gating mechanisms to calculate and update the hidden state of the current moment ; The gating mechanism specifically includes: Forget Gate:

[0017] Input Gate:

[0018] Candidate memory:

[0019] Memory unit update:

[0020] Output Gate:

[0021] Hide status updates:

[0022] in, represents the output of the forget gate, represents the input gate output, represents the candidate memory output, Represents the memory unit update output, represents the output gate output, represents the sigmoid activation function, represents element-wise multiplication, , , , They represent the LSTM weight matrices corresponding to different gating mechanisms, , , , They represent the bias vectors corresponding to different gating mechanisms respectively.

[0023] Furthermore, energy conservation constraints are introduced into each node of the node feature matrix and the loss function of the spatiotemporal graph neural network. The specific steps are as follows: Node feature matrix Each power equipment node in , assuming that the input energy is equal to the output energy:

[0024] in, From neighboring nodes The input power, Output to neighbor nodes The power, For Node The load power, For Node The power loss; Incorporating energy conservation constraints into the loss function L of spatiotemporal graph neural networks As a regularization term:

[0025] in, , = , is the number of iterations, For the The predicted value of the iteration, For the The expected value of the iteration.

[0026] Furthermore, when abnormality detection is performed on the power data to be detected, the specific determination method is as follows: Calculating prediction error - ; calculate ,in Indicates the first values; judge Is it greater than the set abnormal threshold? θ .

[0027] An intelligent power metering anomaly detection system based on energy flow dynamic mapping includes a data acquisition module, a model building module, an energy flow dynamic mapping module, a model training module, and an anomaly detection module: The data acquisition module is used to acquire training power data and to acquire power data to be tested of the power system to be tested; The model building module is used to build a spatiotemporal graph neural network that introduces an energy flow perception mechanism; The energy flow dynamic mapping module is used to perform energy flow dynamic mapping on the training power data using a spatiotemporal graph neural network; The model training module is used to train the spatiotemporal graph neural network; The anomaly detection module is used to perform anomaly detection on the power data to be detected based on the trained spatiotemporal graph neural network.

[0028] The beneficial effects of the present invention are as follows: The present invention discloses an intelligent power metering anomaly detection method based on dynamic mapping of energy flow. By constructing a spatiotemporal graph neural network that introduces an energy flow perception mechanism, it can monitor the energy flow in the power system in real time and accurately, and detect abnormal phenomena in time, thereby improving the stability and safety of the power system and optimizing the management and allocation of power resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 The present invention is a flowchart of an intelligent power metering anomaly detection method based on dynamic mapping of energy flow. Figure 2 It is a schematic diagram of the specific process of constructing a spatiotemporal graph neural network that introduces an energy flow perception mechanism.

[0030] Figure 3 It uses a space-time graph neural network to dynamically map the energy flow of training power data, and trains a specific process diagram of the space-time graph neural network.

[0031] Figure 4 It is a schematic block diagram of an intelligent power metering anomaly detection system based on dynamic mapping of energy flow. DETAILED DESCRIPTION

[0032] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] Example 1 like Figure 1As shown, a smart power metering anomaly detection method based on energy flow dynamic mapping includes the following specific steps: Obtain training power data; Construct a spatiotemporal graph neural network that introduces an energy flow perception mechanism; Use spatiotemporal graph neural network to dynamically map the energy flow of training power data and train the spatiotemporal graph neural network; The power data to be tested of the power system to be tested is obtained, and anomaly detection is performed on the power data to be tested based on the trained spatiotemporal graph neural network.

[0034] In a specific embodiment, Figure 2 As shown in the figure, a spatiotemporal graph neural network with energy flow perception mechanism is constructed. The specific steps are as follows: Build a dynamic mapping block for representing power data as a graph structure; Construct a spatial convolution for extracting spatial features between nodes of the graph structure: Construct a temporal convolution for extracting temporal features: Construct energy conservation constraints; Construct loss function; Combining dynamic mapping blocks, spatial convolution, temporal convolution, energy conservation constraints, and loss functions, we obtain a spatiotemporal graph neural network that introduces an energy flow perception mechanism.

[0035] This intelligent power metering anomaly detection method based on dynamic mapping of energy flow adopts a spatiotemporal graph neural network that introduces an energy flow perception mechanism, integrates physical laws (such as energy conservation) into the model, and constrains the energy flow pattern through regularization terms, thereby enhancing the model's understanding of normal energy flow and improving the accuracy of anomaly detection. At the same time, graph neural networks and LSTM are used to comprehensively capture the spatial and temporal characteristics of the power system and enhance the ability to recognize complex abnormal patterns. During anomaly detection, the threshold can be dynamically adjusted and automatically set according to the distribution of historical data to improve the adaptability and robustness of the system.

[0036] Example 2 More specifically, in a specific embodiment, Figure 3 As shown in the figure, a spatiotemporal graph neural network is used to dynamically map the energy flow of the training power data and train the spatiotemporal graph neural network. The specific steps are as follows: The dynamic mapping block is used to dynamically map the energy flow of the training data set to obtain the graph structure; Use spatial convolution to extract the spatial features of graph structure; Based on spatial features, temporal convolution is used to further extract temporal features and obtain the node feature matrix; Introducing energy conservation constraints in each node of the node feature matrix and the loss function of the spatiotemporal graph neural network; The loss function is used to perform iterative training to obtain a trained energy flow-aware spatiotemporal graph neural network.

[0037] In a specific embodiment, a dynamic mapping block is used to dynamically map the energy flow of the training data set to obtain a graph structure, specifically: For the power data in the training data set Normalization is performed to eliminate the influence of different dimensions, and we get :

[0038] in, is the mean, is the standard deviation; based on , the power system is represented as a graph structure G=(V,E), where: V= The power equipment node representing the power data, E= Represents the energy transmission path between power equipment; the graph structure updates the energy flow status in real time through time series data analysis to form a dynamic mapping.

[0039] In a specific embodiment, spatial convolution is used to extract the spatial features of the graph structure, specifically: a graph neural network is used to extract the spatial features H of the graph structure layer by layer:

[0040] in, =A+I, A is the adjacency matrix of the graph structure, and I is its self-loop; for The degree matrix of is the node feature matrix of the lth layer of the graph structure; is the weight matrix of the lth layer; is the activation function.

[0041] In a specific embodiment, based on the spatial features, temporal convolution is used to further extract the temporal features to obtain a node feature matrix, which is specifically:

[0042] in, is the spatial feature at time t, is the hidden state at time t; Update hidden state ; The updated hidden state Node feature matrix as subsequent energy flow prediction .

[0043] In one embodiment, the hidden state The generation and update methods are: At each time step t, the LSTM receives the current input features and the hidden state at the previous moment , through several gating mechanisms to calculate and update the hidden state of the current moment ; The gating mechanism specifically includes: Forget Gate:

[0044] Input Gate:

[0045] Candidate memory:

[0046] Memory unit update:

[0047] Output Gate:

[0048] Hide status updates:

[0049] in, represents the output of the forget gate, represents the input gate output, represents the candidate memory output, Represents the memory unit update output, represents the output gate output, represents the sigmoid activation function, represents element-wise multiplication, , , , They represent the LSTM weight matrices corresponding to different gating mechanisms, , , , They represent the bias vectors corresponding to different gating mechanisms respectively.

[0050] In a specific embodiment, an energy conservation constraint is introduced into each node of the node feature matrix and the loss function of the spatiotemporal graph neural network. The specific steps are: Node feature matrix Each power equipment node in , assuming that the input energy is equal to the output energy:

[0051] in, From neighboring nodes The input power, Output to neighbor nodes The power, For Node The load power, For Node The power loss; Incorporating energy conservation constraints into the loss function L of spatiotemporal graph neural networks As a regularization term:

[0052] in, , = , is the number of iterations, For the The predicted value of the iteration, For the The expected value of the iteration.

[0053] In a specific embodiment, when abnormality detection is performed on the power data to be detected, the specific determination method is: Calculating prediction error - ; calculate ,in Indicates the Values; judge Is it greater than the set abnormal threshold? θ .

[0054] In this embodiment, when an abnormality is detected, an alarm message is automatically generated and sent to relevant personnel through a preset communication method. At the same time, according to the type and severity of the abnormality, predetermined response measures are automatically executed, such as cutting off the faulty line, adjusting the load distribution, starting the backup equipment, etc., to reduce the impact of the abnormality on the power system.

[0055] Example 3 In this embodiment, the spatiotemporal graph neural network EFA-STGNN based on energy flow perception, traditional GNN, LSTM, and random forest of the present invention are used in the smart grid of a university campus to conduct anomaly detection experiments; the power system to be detected covers multiple key nodes, including substations, distribution networks, and end users; the power parameter data of the experiment include voltage (V), current (A), power (kW), frequency (Hz), and power factor; environmental data include temperature (°C) and humidity (%); abnormal event data include power leakage, equipment failure (such as transformer failure), and abnormal load fluctuation; the data collection cycle is once per minute, covering six months of operation data. This includes normal operation data and data during failures, which are used for model training and testing.

[0056] The experimental results are shown in Table 1: Table 1

[0057] In the table, Accuracy is the ratio of correctly detected abnormal events to total events; Recall is the ratio of correctly detected abnormal events to actual abnormal events; F1-Score is the harmonic mean of Accuracy and Recall; False Positive Rate is the ratio of normal events that are mistakenly judged as abnormal to total normal events.

[0058] As shown in Table 1, EFA-STGNN has significantly improved accuracy compared with traditional GNN, LSTM and random forest, indicating that it is more reliable in correctly identifying normal and abnormal events; EFA-STGNN is also significantly better than other algorithms in recall rate, indicating that it is more sensitive in detecting actual abnormal events and reduces missed reports; considering the accuracy and recall rate, EFA-STGNN has the highest F1 score, reflecting its overall performance advantage; EFA-STGNN has the lowest false alarm rate, which reduces interference in normal operation of the system and improves the practicality of the system.

[0059] In summary, through application and experimental verification in actual power systems, the energy flow perception-based spatiotemporal graph neural network EFA-STGNN of the present invention performs well in power system anomaly detection. Experimental results show that the algorithm is not only superior to traditional methods in accuracy and recall rate, but also has a lower false alarm rate, and has high practical value and promotion potential.

[0060] Example 4 like Figure 4 As shown, an intelligent power metering anomaly detection system based on energy flow dynamic mapping includes a data acquisition module, a model building module, an energy flow dynamic mapping module, a model training module, and an anomaly detection module: The data acquisition module is used to acquire training power data and to acquire power data to be tested of the power system to be tested; The model building module is used to build a spatiotemporal graph neural network that introduces an energy flow perception mechanism; The energy flow dynamic mapping module is used to perform energy flow dynamic mapping on the training power data using a spatiotemporal graph neural network; The model training module is used to train the spatiotemporal graph neural network; The anomaly detection module is used to perform anomaly detection on the power data to be detected based on the trained spatiotemporal graph neural network.

[0061] In this embodiment, an alarm and response module is also included. When an abnormality is detected, the abnormality detection module outputs an alarm message and sends it to relevant personnel through a preset communication method. At the same time, the system can automatically execute predetermined response measures according to the type and severity of the abnormality, such as cutting off the faulty line, adjusting the load distribution, starting the backup equipment, etc., to reduce the impact of the abnormality on the power system.

[0062] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A smart power metering anomaly detection method based on energy flow dynamic mapping, characterized in that: The specific steps include: Obtain training power data; Construct a spatiotemporal graph neural network that introduces an energy flow perception mechanism; Use spatiotemporal graph neural network to dynamically map the energy flow of training power data and train the spatiotemporal graph neural network; The power data to be tested of the power system to be tested is obtained, and anomaly detection is performed on the power data to be tested based on the trained spatiotemporal graph neural network.

2. The method for detecting anomalies in intelligent power metering based on dynamic mapping of energy flow according to claim 1 is characterized in that: Construct a spatiotemporal graph neural network that introduces an energy flow perception mechanism. The specific steps are: Build a dynamic mapping block for representing power data as a graph structure; Construct a spatial convolution for extracting spatial features between nodes of the graph structure: Construct a temporal convolution for extracting temporal features: Construct energy conservation constraints; Construct loss function; Combining dynamic mapping blocks, spatial convolution, temporal convolution, energy conservation constraints, and loss functions, we obtain a spatiotemporal graph neural network that introduces an energy flow perception mechanism.

3. The method for detecting anomalies in intelligent power metering based on dynamic mapping of energy flow according to claim 2 is characterized in that: The spatiotemporal graph neural network is used to dynamically map the energy flow of the training power data and train the spatiotemporal graph neural network. The specific steps are as follows: The dynamic mapping block is used to dynamically map the energy flow of the training data set to obtain the graph structure; Use spatial convolution to extract the spatial features of graph structure; Based on spatial features, temporal convolution is used to further extract temporal features and obtain the node feature matrix; Introducing energy conservation constraints in each node of the node feature matrix and the loss function of the spatiotemporal graph neural network; The loss function is used to perform iterative training to obtain a trained energy flow-aware spatiotemporal graph neural network.

4. The method for detecting anomalies in intelligent power metering based on dynamic mapping of energy flow according to claim 3 is characterized in that: The dynamic mapping block is used to dynamically map the energy flow of the training data set to obtain the graph structure, which is as follows: For the power data in the training data set Normalization is performed to eliminate the influence of different dimensions, and we get : in, is the mean, is the standard deviation; based on , the power system is represented as a graph structure G=(V,E), where: V= The power equipment node representing the power data, E= Represents the energy transmission path between power equipment; the graph structure updates the energy flow status in real time through time series data analysis to form a dynamic mapping.

5. The method for detecting anomalies in intelligent power metering based on dynamic mapping of energy flow according to claim 4 is characterized in that: Spatial convolution is used to extract the spatial features of the graph structure. Specifically, a graph neural network is used to extract the spatial features H of the graph structure layer by layer: in, =A+I, A is the adjacency matrix of the graph structure, and I is its self-loop; for The degree matrix of is the node feature matrix of the lth layer of the graph structure; is the weight matrix of the lth layer; is the activation function.

6. The method for detecting anomalies in intelligent power metering based on dynamic mapping of energy flow according to claim 5 is characterized in that: Based on the spatial features, temporal convolution is used to further extract the temporal features and obtain the node feature matrix, which is as follows: in, is the spatial feature at time t, is the hidden state at time t; Update hidden state ; The updated hidden state Node feature matrix as subsequent energy flow prediction .

7. The method for detecting anomalies in intelligent power metering based on dynamic mapping of energy flow according to claim 6 is characterized in that: Hidden State The generation and update methods are: At each time step t, the LSTM receives the current input features and the hidden state at the previous moment , through several gating mechanisms to calculate and update the hidden state of the current moment ; The gating mechanism specifically includes: Forget Gate: Input Gate: Candidate memory: Memory unit update: Output Gate: Hide status updates: in, represents the output of the forget gate, represents the input gate output, represents the candidate memory output, Represents the memory unit update output, represents the output gate output, represents the sigmoid activation function, represents element-wise multiplication, , , , They represent the LSTM weight matrices corresponding to different gating mechanisms, , , , They represent the bias vectors corresponding to different gating mechanisms respectively.

8. The method for detecting anomalies in intelligent power metering based on dynamic mapping of energy flow according to claim 7 is characterized in that: Energy conservation constraints are introduced into each node of the node feature matrix and the loss function of the spatiotemporal graph neural network. The specific steps are as follows: Node feature matrix Each power equipment node in , assuming that the input energy is equal to the output energy: in, From neighboring nodes The input power, Output to neighbor nodes The power, For Node The load power, For Node The power loss; Incorporating energy conservation constraints into the loss function L of spatiotemporal graph neural networks As a regularization term: in, , = , is the number of iterations, For the The predicted value of the iteration, For the The expected value of the iteration.

9. The method for detecting anomalies in intelligent power metering based on dynamic mapping of energy flow according to claim 8 is characterized in that: When performing abnormal detection on the power data to be detected, the specific determination method is as follows: Calculating prediction error - ; calculate ,in Indicates the Values; judge Is it greater than the set abnormal threshold? θ .

10. An intelligent power metering anomaly detection system based on dynamic mapping of energy flow, characterized in that: Including data acquisition module, model building module, energy flow dynamic mapping module, model training module, anomaly detection module: The data acquisition module is used to acquire training power data and to acquire power data to be tested of the power system to be tested; The model building module is used to build a spatiotemporal graph neural network that introduces an energy flow perception mechanism; The energy flow dynamic mapping module is used to perform energy flow dynamic mapping on the training power data using a spatiotemporal graph neural network; The model training module is used to train the spatiotemporal graph neural network; The anomaly detection module is used to perform anomaly detection on the power data to be detected based on the trained spatiotemporal graph neural network.