CN-122019242-A - Power grid measurement data anomaly detection and repair method based on graph database
Abstract
The invention discloses a method for detecting and repairing power grid measurement data anomalies based on a graph database, which comprises the following steps of constructing a power grid attribute graph model, calculating graph signal total variation indexes through graph traversal and aggregation calculation in a graph database original query process, establishing a graph signal smoothness standard based on sliding window statistics, comparing the graph signal total variation indexes calculated in real time with the graph signal smoothness standard to identify graph signal anomalies, calculating contribution values of each side to the graph signal total variation indexes calculated in real time through contribution analysis query when the graph signal anomalies are identified, so as to position anomaly nodes, executing iterative optimization in the graph database, updating anomaly node values according to a neighbor node weighted average algorithm until the graph signal total variation indexes are converged to a preset range, and realizing data repair. The method realizes the depth fusion of the real-time storage of the graph and the computation of the graph, and ensures the real-time performance, the accuracy and the topological adaptability of the computation.
Inventors
- ZHOU YAN
- YANG LEIHONG
- ZHANG CHEN
- WU JING
Assignees
- 浙江创邻科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260413
Claims (10)
- 1. The method for detecting and repairing the power grid measurement data abnormality based on the graph database is characterized by comprising the following steps of: Uniformly storing the physical entities, the connection relations and the real-time measurement data of the power grid in a graph database in an attribute graph form, and constructing a power grid attribute graph model; calculating a total variation index of the graph signals through graph traversal and aggregation calculation in the primary query process of the graph database; establishing a graph signal smoothness reference based on sliding window statistics, and comparing a graph signal total variation index calculated in real time with the graph signal smoothness reference to identify graph signal abnormality; When the graph signal is identified to be abnormal, calculating a contribution value of each edge to the total variation index of the graph signal calculated in real time through contribution degree analysis and query, so as to position an abnormal node; and performing iterative optimization in the graph database, and updating the abnormal node value according to the neighbor node weighted average algorithm until the total variation index of the graph signal is converged to a preset range, so as to realize data restoration.
- 2. The method for detecting and repairing anomalies in measured data of a power grid based on a graph database as claimed in claim 1, wherein, Nodes in the power grid attribute graph model represent buses, power plants, substations and distribution areas, the attributes of the nodes comprise real-time measurement values, historical data and equipment parameters, edges in the power grid attribute graph model represent power transmission lines and transformers, and the attributes of the nodes comprise impedance, admittance, connection relations and measurement values.
- 3. The method for detecting and repairing anomalies in measured data of a power grid based on a graph database as claimed in claim 1, wherein, The formula of the total variation calculation of the graph signals is as follows: , Wherein x is a graph signal on a node in the power grid graph structure at a certain moment of loading, A ij is the weight of an edge between an i node and a j node, E is an edge set, and global graph signal total variation TV (x) is obtained by performing local calculation on each edge and then aggregation.
- 4. The method for detecting and repairing anomalies in measured data of a power grid based on a graph database as claimed in claim 3, wherein, The edge weight A ij is determined by line admittance or custom rules.
- 5. The method for detecting and repairing anomalies in measured data of a power grid based on a graph database as claimed in claim 3, wherein, The method for establishing the graph signal smoothness reference based on sliding window statistics comprises the following steps: Continuously calculating the mean value and standard deviation of the total variation index of the graph signals in a window of a preset time period in a graph database; when the value of the total variation index TV (x t ) of the real-time map signal conforms to the following formula, it is determined that there is a map signal abnormality: TV(x t )>a±3b, Wherein a is the average value of the total variation index of the image signal, and b is the standard deviation of the total variation index of the image signal; Based on a sliding window, setting the current time as t, and selecting total variation values of the latest N continuous sampling times to form window data: , The calculation formula of the mean value a of the total variation index of the graph signals is as follows: , the standard deviation b calculation formula of the total variation index of the graph signal is as follows: 。
- 6. The method for detecting and repairing anomalies in measured data of a power grid based on a graph database as claimed in claim 3, wherein, The formula for calculating the contribution degree of each side to the total variation index of the current image signal by the contribution degree analysis query is as follows: , , C ij is a local variation contribution value obtained by calculating edges between a node i and a node j in the graph database, and the nodes connected with the edges with the highest contribution degree R ij are marked as abnormal nodes by sequencing according to the contribution degree R ij .
- 7. The method for detecting and repairing anomalies in measured data of a power grid based on a graph database as claimed in claim 1, wherein, The calculation formula for performing iterative optimization in the graph database is as follows: , Where w i-1,i and w i,i+1 are edge weights, k is the initial kth iteration, A graph signal value of an abnormal node i; when the k+1st iteration state is entered, the graph signal value of the node i Approaching the weighted average of its neighbors, the overall variation of the entire map signal A reduction; The iterative calculation is repeated until the total variation index TV (x) of the map signal falls within the normal threshold range.
- 8. The method for anomaly detection and repair of grid measurement data based on graph database of claim 7, wherein, The graph signal value of the repaired node i And writing back the node attribute, and re-calculating the total variation index of the graph signal.
- 9. The method for detecting and repairing anomalies in measured data of a power grid based on a graph database as claimed in claim 1, wherein, Marking the positioned abnormal node, and generating an abnormal event record.
- 10. The method for detecting and repairing anomalies in measured data of a power grid based on a graph database as claimed in claim 1, wherein, The GSP calculation engine in the graph database loads the topology change information inquired by the graph database in real time, and the calculation of the total variation index of the graph signal in real time is realized.
Description
Power grid measurement data anomaly detection and repair method based on graph database Technical Field The invention belongs to the technical field of power system data processing based on a graph database, and particularly relates to a power grid measurement data anomaly detection and repair method based on the graph database. Background With the development of smart grids and energy Internet, sensors such as synchronous phasor measurement units, smart meters and the like deployed in the grids generate massive, high-dimensional and space-time associated measurement data. These data are the basis for grid state awareness, fault diagnosis and control. However, in the process of data acquisition and transmission, abnormality, such as data loss, distortion, mutation and the like, often occurs due to equipment failure, communication interference and the like, so that the accuracy of subsequent analysis is seriously affected. The existing power grid data exception handling method mainly comprises the following modes: Based on a method of statistics and rules, namely setting a threshold value or a statistics rule to judge, the scheme is insensitive to complex association and implicit anomalies in a power grid; Based on a machine learning method, a historical data training model is used for prediction or classification, but the model has poor interpretability and insufficient adaptability to the change of a power grid topological structure; Based on the graph signal processing method, the power grid is abstracted into a graph structure, the prior knowledge such as the smoothness of the graph signal is utilized for anomaly detection, and the scheme can effectively utilize topology information, but has obvious defects in the current implementation mode. Current solutions based on graph signal Processing typically employ an "off-line computing" mode, i.e., data is derived from SCADA (Supervisory Control And Data Acquisition, data acquisition and monitoring control system) or data platform, graphs are built in a separate computing environment (e.g., matlab, python) and GSP (GRAPH SIGNAL Processing) algorithms are executed, and the results are written back. The process has the problems of high data carrying cost, poor real-time performance, separation of the graph model and the service data, difficulty in supporting dynamic topology change and the like. That is, the graph database is mainly responsible for data storage and query, while complex computation such as graph signal processing still depends on an external computing engine, so that deep fusion of graph storage and graph computation cannot be realized, and the processing efficiency and the system integration level are limited. Disclosure of Invention The invention provides a graph database-based power grid measurement data anomaly detection and repair method for solving the above-mentioned technical problems, which adopts the following technical scheme: A method for detecting and repairing power grid measurement data abnormality based on a graph database comprises the following steps: Uniformly storing the physical entities, the connection relations and the real-time measurement data of the power grid in a graph database in an attribute graph form, and constructing a power grid attribute graph model; calculating a total variation index of the graph signals through graph traversal and aggregation calculation in the primary query process of the graph database; establishing a graph signal smoothness reference based on sliding window statistics, and comparing a graph signal total variation index calculated in real time with the graph signal smoothness reference to identify graph signal abnormality; When the graph signal is identified to be abnormal, calculating a contribution value of each edge to the total variation index of the graph signal calculated in real time through contribution degree analysis and query, so as to position an abnormal node; and performing iterative optimization in the graph database, and updating the abnormal node value according to the neighbor node weighted average algorithm until the total variation index of the graph signal is converged to a preset range, so as to realize data restoration. Further, nodes in the power grid attribute graph model represent buses, power plants, substations and distribution areas, the attributes of the nodes comprise real-time measurement values, historical data and equipment parameters, edges in the power grid attribute graph model represent power transmission lines and transformers, and the attributes of the nodes comprise impedance, admittance, connection relations and measurement values. Further, the formula of the total variation calculation of the graph signals is as follows: , Wherein x is a graph signal on a node in the power grid graph structure at a certain moment of loading, A ij is the weight of an edge between an i node and a j node, E is an edge set, and global graph signal total variation TV