AI-based regulation and control abnormal data identification and correction method, system and device and medium

By constructing a power grid topology knowledge graph and AI model, and combining a hybrid detection layer and reinforcement learning, the problem of abnormal data identification and correction in power system regulation was solved, achieving efficient and accurate multi-dimensional anomaly detection and correction, and improving the reliability and adaptability of power grid data.

CN121457510APending Publication Date: 2026-02-03GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511270206.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

In power system regulation, there are problems such as difficulty in identifying abnormal data, low accuracy in correction, and weak system self-adaptability. In particular, it is difficult to adapt to the dynamic changes of complex scenarios in the processing of multi-source heterogeneous data, and it is impossible to realize the correlation analysis of multi-source data, resulting in data distortion and reduced decision reliability.

Method used

An AI-based approach is adopted to construct a power grid topology knowledge graph, and combine a hybrid detection layer, graph neural network and time-series Transformer model to identify univariate, topological and time-series anomalies. Based on reinforcement learning, the weights of the correction algorithm are dynamically adjusted to achieve multi-dimensional anomaly detection and correction.

Benefits of technology

It significantly improves the comprehensiveness and accuracy of anomaly detection, ensures that correction results conform to the physical laws of the power grid, enhances the reliability and adaptability of power grid data, and guarantees the safe and stable operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121457510A_ABST
    Figure CN121457510A_ABST
Patent Text Reader

Abstract

The invention discloses an AI-based regulation and control abnormal data identification and correction method, system and device and a medium, and belongs to the technical field of power system regulation and control, and the method comprises the steps: obtaining multi-source data of a main distribution network, carrying out the preprocessing, and constructing a power grid topology knowledge graph; the multi-source data comprises full voltage class model data, real-time measurement data and equipment state data. According to the method, a three-layer detection system of a statistics-density mixed detection layer, a graph neural network association detection layer and a time sequence Transform detection layer based on an LOF algorithm and a 3 sigma principle is constructed, deep association analysis of multi-source data is realized in combination with a power grid topology knowledge graph, and an intelligent correction module is used for matching a differentiation correction algorithm for different types of anomalies; the correction weight is dynamically adjusted based on reinforcement learning, and the problems that a traditional method depends on artificial experience to set a threshold value, the recognition capacity of a single algorithm is limited, a correction strategy lacks adaptability, and multi-source data association analysis cannot be achieved are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system control technology, specifically to an AI-based method, system, device, and medium for identifying and correcting abnormal control data. Background Technology

[0002] Power system regulation is a core component for ensuring the safe and stable operation of the power grid and optimizing resource allocation. It collects real-time power grid operation data across all voltage levels from 500kV to 10kV using various measuring devices deployed in the main and distribution networks. This data includes massive amounts of information such as node voltage, line power flow, and equipment status. The regulation system preprocesses, estimates the state of, and performs security analysis on this real-time measurement data. Combined with the power grid topology model and operating rules, it generates dispatching decisions to achieve reliable power transmission and supply-demand balance across generation, transmission, transformation, and distribution. This process must balance the safety, economy, and reliability of power grid operation, placing extremely high demands on the real-time performance and accuracy of data processing, as well as the scientific nature of decision-making strategies. In the field of power system regulation, the accuracy of massive real-time measurement data directly affects the reliability of dispatching decisions. However, traditional methods for handling abnormal data still have certain problems:

[0003] Relying on human experience to set thresholds and rules requires frequent manual updates when the power grid operation mode changes, making it difficult to adapt to dynamic changes in complex scenarios;

[0004] Single algorithms (such as statistical thresholding or single machine learning models) have limited ability to identify nonlinear anomalies and are prone to missing hidden anomaly patterns.

[0005] The correction strategy lacks adaptability and uses a uniform approach to handle different types of anomalies, which can easily lead to data distortion.

[0006] It is impossible to perform correlation analysis on multi-source data, making it difficult to uncover potential anomalies in the correlation between topological structure and measurement sequences;

[0007] To address this, an AI-based method and system for identifying and correcting abnormal data in regulation are proposed. Summary of the Invention

[0008] In view of the above-mentioned problems, the present invention is proposed.

[0009] Therefore, the purpose of this invention is to solve the industry pain points of difficulty in identifying abnormal data, low correction accuracy, and weak system adaptability caused by multi-source heterogeneous data in the main distribution network.

[0010] To address the aforementioned technical problems, this invention provides the following technical solution: an AI-based method for identifying and correcting abnormal data in regulation, comprising,

[0011] The system acquires and preprocesses multi-source data from the main and distribution networks to construct a power grid topology knowledge graph. Based on the preprocessed multi-source data, a hybrid detection layer is used to identify univariate statistical anomalies and output univariate detection results. A graph neural network-based association detection layer maps the power grid topology knowledge graph into a graph structure and learns the characteristic associations between nodes and edges to detect topology association anomalies and output topology detection results. Based on real-time measurement data, long-distance dependencies in measurement sequences are captured, and time-series anomalies are identified through residual analysis, outputting time-series detection results. Single-point and multi-point anomalies are corrected based on the univariate, topology, and time-series detection results, and the correction results are output. The system dynamically adjusts the weights of the correction algorithm based on reinforcement learning, evaluates the correction results using evaluation metrics, outputs the evaluation results, and feeds them back to the detection and correction model. Parameters are updated online, and a data error report is generated.

[0012] As a preferred embodiment of the AI-based method for identifying and correcting abnormal control data described in this invention, the construction of the power grid topology knowledge graph includes real-time collection of first multi-source data, second multi-source data, and third multi-source data by deploying them on the main distribution network device.

[0013] Deep preprocessing of collected multi-source data includes data cleaning, filling, and format conversion;

[0014] Based on power grid topology information, a power grid topology knowledge graph is constructed using a graph database, mapping the relationships between the first and second multi-source data to the graph;

[0015] The completed knowledge graph is subjected to quality and logical verification. The preprocessed and verified power grid topology knowledge graph is stored in a distributed storage system, and a graph update mechanism is established.

[0016] As a preferred embodiment of the AI-based method for identifying and correcting abnormal data in this invention, the output of the univariate detection result includes splitting the preprocessed multi-source data to obtain a univariate dataset, setting the normal fluctuation range of the data, and marking data points that exceed the normal fluctuation range as suspected abnormal points.

[0017] Based on suspected outliers, the local reachability density of data points is calculated to confirm the final univariate statistical outliers;

[0018] The sliding window size is set according to the power grid update frequency, and the threshold and judgment result of anomaly detection are updated.

[0019] The final univariate statistical outliers will be generated into a univariate detection result report, and a comprehensive anomaly analysis will be performed.

[0020] As a preferred embodiment of the AI-based method for identifying and correcting abnormal data in this invention, the output topology detection result includes:

[0021] The power grid topology knowledge graph is transformed into graph structure data, and the transformed graph structure data is input into the power grid topology analysis model. Power grid topology graph data under normal operating conditions is collected for training.

[0022] Real-time power grid topology data is input into a trained power grid topology analysis model to learn the feature relationships between nodes and edges and extract topological feature representations.

[0023] Based on the topological feature representation output by the power grid topology analysis model, establish the judgment rules for topological correlation anomalies; and judge the topological correlation anomalies.

[0024] The topology association anomalies are sorted out, a topology detection result report is generated, and sent to the anomaly handling module.

[0025] As a preferred embodiment of the AI-based method for identifying and correcting abnormal data in regulation as described in this invention, the output time series detection results include: grouping the preprocessed real-time measurement data by device or node to construct a time series dataset; normalizing each time series data to map the data to the 0-1 interval; and using a sliding window technique to divide the time series data into fixed-length sequence segments as input to the Transformer model.

[0026] A temporal Transformer model architecture is constructed, employing a bidirectional Transformer encoder structure that includes a multi-head self-attention mechanism and a feedforward neural network. In the multi-head self-attention mechanism, information from different positions in the temporal data is simultaneously monitored to capture long-distance dependencies. The feedforward neural network performs a nonlinear transformation on the output of the self-attention mechanism to enhance the model's expressive power.

[0027] During the model training phase, the Transformer model is trained using time series data under normal historical conditions. The training objective is to minimize the mean square error between the model's predicted values ​​and the actual values. The model parameters are adjusted through the backpropagation algorithm to learn the inherent patterns and regularities of the time series data. After training is completed, the real-time collected time series data is input into the trained model to obtain the model's predictions for future data.

[0028] Perform residual analysis to calculate the residual between the model's predicted values ​​and the actual measured values. Perform statistical analysis on the residual series to calculate the mean and standard deviation and set a residual threshold. When the absolute value of the residual exceeds the residual threshold, it is determined that there is a time series anomaly at the corresponding time point.

[0029] Based on the residual analysis results, the identified time-series anomalies are classified and organized, and the occurrence time, anomaly type, and anomaly severity information of each anomaly are recorded. A time-series detection result report is generated and sent to the data correction module.

[0030] The beneficial effects of the preferred technical solution in the embodiments of the present invention are: overcoming the gradient vanishing or exploding problem in the long sequence training of traditional RNN / LSTM models, and being able to effectively learn the profound impact of historical events from hours or even days ago on the current measurement value, thereby making the prediction and detection of anomalies with long-term regularity more accurate.

[0031] As a preferred embodiment of the AI-based method for identifying and correcting abnormal data in this invention, the output correction result includes: establishing a comprehensive evaluation mechanism for abnormal data, integrating and analyzing univariate detection results, topology detection results, and time-series detection results, and determining whether the abnormality is a single-point or multi-point abnormality based on the type, location, and scope of influence of the abnormal data.

[0032] For single-point anomalies, including random noise anomalies, transient jump anomalies, and equipment failure-related anomalies, different correction strategies are implemented; for multi-point anomalies, the DBSCAN clustering algorithm is combined with power flow equation constraint regression for collaborative correction.

[0033] During the calibration process, an uncertainty assessment mechanism is introduced. For the calibrated data, the confidence level is calculated, and data with a confidence level lower than the preset threshold is marked as suspicious data for secondary verification or manual review.

[0034] The corrected data is organized to generate a correction result report, which is then fed back to the power grid control system to update real-time data.

[0035] The beneficial effects of the preferred technical solution in the embodiments of the present invention are as follows: for single-point anomalies, it ensures the efficiency and economy of correction; for equipment-related anomalies, it improves the physical rationality of the correction results; for multi-point anomalies, it ensures that the corrected data is not only reasonable in itself, but also fully meets the physical laws of the power grid as a whole, which is something that a single correction method cannot achieve, and greatly improves the convergence and accuracy of the corrected data for advanced applications.

[0036] As a preferred embodiment of the AI-based method for identifying and correcting abnormal data in regulation as described in this invention, the dynamic adjustment of the correction algorithm weights includes: constructing a reinforcement learning environment and agent; setting the power grid operation mode as the state space, with each operation mode corresponding to different power grid data characteristics and abnormal patterns; using a combination of single-point and multi-point abnormal correction algorithms as the action space, from which the agent can select a suitable combination of correction algorithms; and using accuracy, recall, mean square error, and power grid scenario adaptability as the core indicators of the reward function.

[0037] Initialize the correction algorithm weights and assign initial weight values ​​to each correction algorithm. After each data correction is completed, the agent calculates the accuracy, recall, MSE and power grid scenario adaptability index values ​​corresponding to the current power grid operation status. The index values ​​are then converted into reward values ​​through the reward function formula.

[0038] The Q-learning algorithm is used to update the correction algorithm weights. The agent updates the Q-value table based on the current state and the reward value obtained.

[0039] Regularly conduct a comprehensive evaluation of the calibration results. According to the preset evaluation cycle, summarize and analyze all calibration data within the current cycle to calculate the average precision, average recall, average MSE, and average grid scenario adaptability. At the same time, compare the differences in evaluation indicators under different grid operation scenarios to analyze the applicability and effectiveness of each calibration algorithm under different scenarios.

[0040] The evaluation results are compiled into an evaluation report. An evaluation result feedback mechanism is established. The evaluation report is used as input to extract key evaluation indicators, including accuracy, recall, MSE and power grid scenario adaptability. The weight adjustment records of the correction algorithm are extracted and a feedback data stream is constructed.

[0041] Based on the changing trends of the evaluation indicators and the effects of weight adjustments, the detection and correction model parameters that need to be updated are determined and updated online. A model update verification mechanism is established to evaluate the effectiveness of the parameter updates. Based on the updated detection and correction model, a comprehensive scan of historical and real-time data is performed to summarize the identified abnormal data information. At the same time, devices or areas with abnormalities are highlighted and targeted operation and maintenance suggestions are proposed.

[0042] Another objective of this invention is to provide an AI-based system for identifying and correcting abnormal data.

[0043] To address the aforementioned technical problems, this invention provides the following technical solution: an AI-based system for identifying and correcting abnormal data, comprising: a data acquisition and processing module, a statistical-density detection module, a graph neural network detection module, a temporal Transformer detection module, an intelligent correction module, an evaluation and optimization module, and a feedback iteration module;

[0044] The data acquisition and processing module acquires multi-source data from the main and distribution networks, performs preprocessing, and constructs a power grid topology knowledge graph.

[0045] The statistical-density detection module, based on preprocessed multi-source data, employs a statistical-density hybrid detection layer based on the LOF algorithm and the 3σ principle to identify univariate statistical anomalies and output univariate detection results.

[0046] The graph neural network detection module, based on the association detection layer of the graph neural network, maps the power grid topology knowledge graph into a graph structure, and uses the graph neural network model to learn the feature association between nodes and edges, detects topology association anomalies, and outputs topology detection results.

[0047] The time series Transformer detection module, based on real-time measurement data, uses the time series Transformer to capture long-distance dependencies in the measurement sequence, identifies time series anomalies through residual analysis, and outputs time series detection results.

[0048] The intelligent correction module corrects single-point anomalies and multi-point anomalies based on the univariate detection results, topology detection results, and time series detection results, and outputs the correction results.

[0049] The evaluation and optimization module dynamically adjusts the weights of the correction algorithm based on reinforcement learning, evaluates the correction results through accuracy, recall, MSE and power grid scenario adaptability indicators, and outputs the evaluation results.

[0050] The feedback iteration module feeds the evaluation results back to the detection and correction model, updates the parameters online, and generates a data error report.

[0051] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the AI-based method for identifying and correcting abnormal data.

[0052] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the AI-based method for identifying and correcting abnormal data.

[0053] The beneficial effects of this invention are as follows: This invention provides an AI-based intelligent identification and correction method for power grid anomaly data. Firstly, it integrates multi-source heterogeneous data and constructs a power grid knowledge graph that integrates equipment, topology, measurements, and parameters, providing a structured data foundation for anomaly detection. Secondly, it employs a multi-level, multi-dimensional collaborative detection system consisting of 3σ and LOF hybrid detection, graph neural network (GNN) correlation analysis, and time-series Transformer residual detection. This system accurately identifies single-point statistical anomalies, topological correlation anomalies, and complex time-series anomalies, significantly improving the comprehensiveness and accuracy of detection. Based on this, it adaptively selects Gaussian filtering, spline interpolation, equipment health assessment, or power flow constraint-based collaborative correction strategies according to the anomaly type and its impact range, ensuring that the correction results simultaneously satisfy data smoothness and power grid physical laws. Finally, it introduces a reinforcement learning-based dynamic optimization closed loop, which automatically adjusts the parameters and weights of each detection and correction algorithm according to evaluation indicators, enabling the entire system to have continuous self-optimization and scenario adaptation capabilities. This comprehensively improves the reliability, consistency, and availability of power grid data, providing a solid data quality guarantee for advanced smart grid applications. Attached Figure Description

[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 The above is a flowchart of an AI-based method for identifying and correcting abnormal data in accordance with an embodiment of the present invention.

[0056] Figure 2 The present invention provides an overall flowchart of an AI-based system for identifying and correcting abnormal data. Detailed Implementation

[0057] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0058] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides an AI-based method for identifying and correcting abnormal data in regulation, comprising:

[0059] S100: Acquire multi-source data from the main and distribution networks and preprocess it to construct a power grid topology knowledge graph;

[0060] S200: Based on preprocessed multi-source data, a hybrid detection layer is used to identify univariate statistical anomalies and output univariate detection results.

[0061] S300, a graph neural network-based association detection layer, maps the power grid topology knowledge graph into a graph structure, learns the feature associations between nodes and edges, detects topology association anomalies, and outputs topology detection results;

[0062] S400: Based on real-time measurement data, it captures long-distance dependencies of measurement sequences, identifies time-series anomalies through residual analysis, and outputs time-series detection results.

[0063] S500: Based on the univariate detection results, topology detection results, and time series detection results, correct single-point anomalies and multi-point anomalies respectively, and output the correction results;

[0064] S600 dynamically adjusts the weights of the correction algorithm based on reinforcement learning, evaluates the correction results through evaluation indicators, outputs the evaluation results and feeds them back to the detection and correction model, updates parameters online and generates data error reports.

[0065] It should be noted that the present invention addresses industry pain points such as difficulty in identifying abnormal data caused by multi-source heterogeneous data, low correction accuracy, and weak system adaptability.

[0066] Therefore, to address the aforementioned issues, the steps S100–S600 are used to construct an intelligent closed loop of detection-correction-evaluation-optimization. This aims to comprehensively improve the quality, reliability, and availability of power grid measurement data, providing a solid and reliable data foundation for core applications such as advanced distribution automation, state estimation, and safety early warning, ultimately ensuring the safe, stable, and efficient operation of the power grid.

[0067] Example 2, refer to Figure 1 This is one embodiment of the present invention, which provides an AI-based method for identifying and correcting abnormal data in regulation, comprising:

[0068] In this embodiment of the invention, step S100 involves acquiring and preprocessing multi-source data from the main distribution network to construct a power grid topology knowledge graph, including the following steps S101-S105:

[0069] S101. Through devices such as smart meters, PMUs (synchronous phasor measurement units), SCADA systems, and sensor networks deployed in the main distribution network, the first multi-source data, the second multi-source data, and the third multi-source data of the entire voltage level from 500kV to 10kV are collected in real time.

[0070] Among them, the first multi-source data is model data, which includes power grid structure information such as line resistance, reactance, susceptance parameters, transformer turns ratio, and capacity parameters.

[0071] The second multi-source data is real-time measurement data, covering operating status quantities such as node voltage amplitude and phase, line active power and reactive power, and system frequency;

[0072] The third type of multi-source data is equipment status data, which includes the opening and closing status of circuit breakers and disconnectors, transformer oil temperature, winding temperature, and partial discharge signals of switchgear, among other equipment health information.

[0073] In an embodiment of the present invention, S102, deep preprocessing of the collected multi-source heterogeneous data using an ETL tool includes the following steps A1-A5:

[0074] A1. Deep preprocessing includes data deduplication, missing value filling, timestamp unification and format unification, and power grid topology knowledge graph association with equipment ledger, topology structure, measurement relationships and power grid model parameters;

[0075] A2. During the data cleaning stage, a data deduplication strategy based on hash algorithm is adopted. By comparing key information of the data, such as collection time, device number, data value, etc., redundant data records that are collected repeatedly are identified and removed to avoid redundant data from interfering with subsequent analysis.

[0076] A3. Regarding missing data, for time series data, if the missing duration is short, cubic spline interpolation is used for filling; if the missing duration is long, an estimated value is generated using an LSTM-based time series prediction model. For a small amount of continuous missing data, the missing value is estimated using simple methods such as linear interpolation based on the trend of adjacent data. For cases with many or discrete missing values, more complex algorithms are used, such as machine learning-based prediction models, combined with data from relevant devices or time periods, to predict reasonable missing values ​​for filling.

[0077] A4. Timestamps from multiple sources are processed uniformly. Since the frequency and time base of data collection by different devices or systems are different, by adjusting or aligning timestamps, we can ensure that all data are consistent in the time dimension, which is convenient for subsequent time series analysis.

[0078] A5. Standardize the format by converting data from different sources and in different formats (such as text, binary, XML, etc.) into a standard and unified format, such as JSON or CSV, to improve data compatibility and processing efficiency.

[0079] In an optional embodiment, the deep preprocessing in S102 can be performed by adopting a rule-based deduplication strategy, pre-setting combination rules for key fields (such as device ID, timestamp, data type), and the system automatically filters and discards duplicate data records that completely match these rule combinations.

[0080] For time series data, regardless of the duration of the missing data, statistical methods are used for imputation. Short-term missing data are imputed using either forward or backward imputation methods; for non-time series data or long-term missing data, the mean or median of historical data from the same operating state of the device are used for imputation.

[0081] Align and convert the timestamps of all data to the platform's standard time base; convert various data formats into a unified standardized format (such as JSON).

[0082] In another alternative embodiment, the deep preprocessing in S102 can be performed by deduplication at the data stream inlet using the semantic guarantees or state management functions of the stream processing framework at the data access layer, based directly on the message ID or key fields.

[0083] For streaming data, lightweight prediction models (such as linear regression and moving average algorithms) are used to predict and fill missing values ​​in real time; for batch historical data, faster interpolation methods (such as Lagrange interpolation) are used to fill the missing values, abandoning the use of computationally time-consuming LSTM models.

[0084] During stream processing, each piece of data is stamped with a processing timestamp as the event time, or the timestamp provided by the message queue is used directly to achieve time sequence alignment.

[0085] Integrate a format converter into the stream processing node to convert data of different formats into a unified format in real time during the streaming process.

[0086] S103. Based on power grid topology information, a power grid topology knowledge graph is constructed using a graph database (such as Neo4j). Equipment ledger information, such as equipment model, rated parameters, and installation location, is abstracted into node attributes in the knowledge graph. The power grid topology, i.e., the connection relationships between equipment, such as the connection between lines and transformers, and substations and lines, is transformed into edges in the graph. Measurement relationships are reflected as the association between nodes and real-time measurement data. Power grid model parameters, such as line resistance, reactance, and transformer turns ratio, are also integrated into the node and edge attributes of the graph. In this way, equipment ledgers, topology, measurement relationships, and power grid model parameters are closely linked to construct a complete and structured power grid topology knowledge graph, providing a solid data foundation for subsequent anomaly detection and analysis.

[0087] Meanwhile, by using knowledge graph embedding technology (such as the TransE algorithm), the correlation between power grid model parameters and measurement data is mapped into the graph, realizing the structured integration of multi-source data.

[0088] S104. Perform quality verification on the completed knowledge graph. Verify the integrity of the power grid topology using a topology connectivity analysis algorithm to ensure there are no isolated nodes or incorrect connections.

[0089] Using the measurement data consistency verification method, combined with Kirchhoff's current law and voltage law, logical verification is performed on data such as node power injection and branch power transmission. If data contradictions are found, they are marked as suspicious data and a secondary verification process is triggered.

[0090] S105. Store the preprocessed and verified power grid topology knowledge graph in a distributed storage system (such as HDFS) to provide an accurate and structured data foundation for subsequent anomaly detection and analysis. At the same time, establish a graph update mechanism to update the knowledge graph content in real time according to changes in power grid operation mode, equipment parameter changes, etc., to ensure the timeliness and accuracy of the data.

[0091] In this embodiment of the invention, step S200, based on preprocessed multi-source data, employs a hybrid detection layer to identify univariate statistical anomalies and outputs univariate detection results, including the following steps S201-S202:

[0092] S201. Split the preprocessed multi-source data according to variable type. For example, extract node voltage, line power flow, equipment current, and other data into independent univariate datasets. For each univariate dataset, calculate its mean μ and standard deviation σ. Based on the 3σ principle, initially set the normal fluctuation range of the data as [μ-3σ, μ+3σ], and mark data points that exceed this range as suspected outliers.

[0093] For the suspected outliers marked above, the LOF (Local Outlier Factor) algorithm is used for further analysis. The local reachability density of each data point is calculated, and its local outlier factor value is obtained by comparing the local reachability density of this point with that of its neighboring points. The larger the local outlier factor value is than 1, the more the data point deviates from the normal data distribution, and the higher the degree of outlier. A threshold for LOF is set (e.g., LOF value greater than 2), and suspected outliers exceeding the threshold are finally determined as univariate statistical outliers.

[0094] Specifically, in the statistical-density hybrid detection layer, the local outlier factor of data points is calculated using the LOF algorithm, and the anomaly threshold is dynamically adjusted in combination with the 3σ principle; univariate statistical anomalies include voltage exceeding limits, power mutations, and frequency deviations;

[0095] Specifically, firstly, univariate analysis is performed on the preprocessed measurement data (such as voltage, power, and frequency) to calculate the Local Outlier Factor (LOF) for each data point. The LOF algorithm quantifies the degree of outlier by comparing the local reachability density of a data point with that of its neighbors. The calculation formula is as follows:

[0096]

[0097] Among them, lrd k (p) represents the local reachability density of the k-neighborhood of point p, N k (p) is the set of k-neighbor points of point p, where k is usually set to 20;

[0098] Secondly, the abnormal threshold is dynamically adjusted in conjunction with the 3σ principle; for each univariate sequence, its mean μ and standard deviation σ are calculated, and the initial normal range is set as [μ-3σ, μ+3σ];

[0099] Based on this, the LOF value is introduced as a weighting factor to construct an adaptive threshold:

[0100] T(x)=μ±3σ·(1+α·LOF(x))

[0101] Where α is an adjustment coefficient (e.g., 0.1), which dynamically adjusts the threshold according to the outlier degree of the data points;

[0102] When a data point x satisfies |x-μ|>T(x), it is judged as an anomaly;

[0103] Differential detection strategies are employed for different types of univariate statistical anomalies:

[0104] Voltage over-limit detection is identified by comparing the real-time voltage value with the rated voltage range (e.g., ±5%), and further filtering of false alarms is achieved by combining dynamic thresholds.

[0105] Power mutations are calculated by measuring the rate of change of power between adjacent time steps:

[0106]

[0107] When ΔP t Determines when the dynamic threshold is exceeded;

[0108] Frequency deviation is determined by comparing the difference between the real-time frequency and the rated frequency (e.g., 50Hz) Δf = |f-50|, and by dynamically adjusting the threshold based on the system frequency characteristic curve. For example, the threshold may be appropriately relaxed during peak load periods.

[0109] Ultimately, the system outputs a structured report containing the time, type, and severity of the anomaly, and visualizes the anomaly distribution through box plots. In a test at a 110kV substation, this method achieved an accuracy of 88% in detecting anomalies such as voltage fluctuations and power jumps, a 15% improvement over the single 3σ principle. Furthermore, the identification delay for intermittent anomalies is less than two sampling periods, meeting the real-time monitoring requirements of the power grid. Through scatter plot analysis of LOF values ​​and residuals, normal fluctuations and abnormal data can be intuitively distinguished, providing an effective technical means for ensuring the quality of power grid data.

[0110] S202. In order to dynamically adapt to changes in the power grid operating status, a sliding window mechanism is introduced. According to the update frequency of power grid data, an appropriate sliding window size is set (e.g., 10 minutes of data as a window). As new data is continuously collected, the window slides forward. In each window, the mean, standard deviation and LOF value are recalculated, and the threshold and judgment result of anomaly detection are updated to ensure that the detection model can reflect changes in the power grid operating status in a timely manner.

[0111] The identified univariate statistical outliers and their related information (such as outlier type, occurrence time, and associated device) are compiled to generate a univariate detection result report. This report is then transmitted to the subsequent anomaly comprehensive analysis module to provide basic data for multi-dimensional anomaly detection and correction.

[0112] In this embodiment of the invention, the graph neural network-based association detection layer in S300 maps the power grid topology knowledge graph into a graph structure, learns the feature associations between nodes and edges, detects topology association anomalies, and outputs topology detection results, including the following steps S301-S302:

[0113] S301. The constructed power grid topology knowledge graph is transformed into computer-processable graph structure data; substations, lines, transformers and other power equipment are used as nodes of the graph, and each node is associated with attribute information such as equipment parameters and operating status; the connection relationships between equipment are used as edges of the graph, and the attributes of the edges include information such as line length, impedance, and transmission capacity; the graph structure is stored in the form of an adjacency matrix or adjacency list for subsequent input into the graph neural network (GNN) model;

[0114] A GNN model architecture was constructed, selecting suitable GNN models such as GraphSAGE and GAT (Graph Attention Network) for power grid topology analysis. The transformed graph structure data was input into the GNN model, which learned the feature relationships between nodes and edges through multiple convolutional operations. During each convolutional layer, nodes aggregated the feature information of their neighboring nodes and updated it in combination with their own features, thereby continuously extracting higher-level topological feature representations. For example, for a transformer node, the model would integrate the features of its connected line nodes and bus nodes to update the feature vector of the transformer node.

[0115] During the model training phase, a large amount of power grid topology data under normal operating conditions is collected as training samples. The GNN model is trained through supervised or unsupervised learning. In supervised learning, historically known cases of topological association anomalies are used as labels to minimize the loss function (such as cross-entropy loss function) between the model's prediction results and the actual labels. In unsupervised learning, contrastive learning and other methods are used to enable the model to learn the feature distribution of normal topology. After training, real-time power grid topology data is input into the trained GNN model.

[0116] In embodiments of the present invention, based on the feature representations of nodes and edges output by the GNN model, rules for determining topological association anomalies are set, including the following steps B1-B5:

[0117] B1. Calculate the similarity between node feature vectors. If the feature similarity between a node and its neighboring nodes is lower than a set threshold, it indicates that the node's operating state does not match the topology.

[0118] B2. Regarding the characteristics of an edge, if the deviation between the transmission power of the edge and the theoretical value calculated from attributes such as line impedance and length exceeds a certain range, it is determined that the edge has an abnormal topological association.

[0119] In an optional embodiment, the rule for determining topology association anomalies in S301 can be combined with power flow calculation results. When there is a contradiction between the power flow distribution and the topology structure (such as the power flow direction not matching the topology connection direction), it is marked as a topology association anomaly.

[0120] In another optional embodiment, the rule for determining topological association anomalies in S301 can be based directly on the connection relationships of the power grid topology knowledge graph, without relying on features learned by the GNN model. A community detection algorithm is used to divide the entire power grid into several physically connected communities. For each community, the statistical characteristics of the measurement data of all nodes within it are calculated, and a determination rule is set. Under normal circumstances, nodes within the same community should have high operational consistency. Each node in each community is traversed, and its real-time measurement value is compared with the statistical characteristics of its community. If the operating value of a node deviates significantly from the overall statistical characteristics of its community, then the node is determined to have an anomaly in topological association. This indicates that the behavior of the device is incompatible with its local power grid environment.

[0121] Specifically, in the correlation detection layer of the graph neural network, power grid equipment is mapped as graph nodes and topology connections are mapped as graph edges. The node embedding vectors are learned through the GNN model. Topology correlation anomalies include contradictions between power flow distribution and topology flow direction, and conflicts between equipment measurement values ​​and topology constraints.

[0122] Specifically, firstly, physical equipment in the power grid (such as substations, transformers, and lines) is abstracted as graph nodes. Each node's feature vector includes static attributes (such as equipment type and rated capacity), dynamic measurements (such as real-time voltage and power), and topological features (such as node degree centrality). Physical connections and measurement associations between nodes are defined as graph edges, with edge weights calculated based on electrical distance, forming ω. ij =exp(-α·|Z ij The decay function of |), where Z ij Where α is the electrical distance between nodes, and α is the adjustment coefficient.

[0123] Secondly, a Graph Attention Network (GAT) architecture is used to learn node embedding vectors; the model dynamically adjusts the weights for information transfer between nodes through an attention mechanism, with the attention coefficient α. ij The calculation combines the nonlinear transformation of node features with the relative importance of neighboring nodes; the node embedding update formula is:

[0124]

[0125] Where W is the linear transformation matrix, The model is trained using an unsupervised learning approach, which optimizes parameters by reconstructing the adjacency matrix and predicting node measurements, enabling the embedding vector to capture the intrinsic relationship between the power grid topology and operating state.

[0126] Topology association anomaly detection is based on two types of constraints; power flow distribution and topology flow direction contradiction detection is achieved by constructing a power flow direction vector. Consistency index C i To achieve this, when |C i | An anomalies are identified when values ​​exceed a threshold (e.g., 0.8); the detection of conflicts between equipment measurements and topological constraints is based on Kirchhoff's current law, calculating the residual vector:

[0127]

[0128] When r i An error is considered to occur when the deviation exceeds three times the standard deviation.

[0129] Anomaly score, overall trend anomaly score S flow And measurement anomaly score S meas The calculation formula is:

[0130] S=αS flow +(1-α)S meas

[0131] Where α is the weighting coefficient (e.g., 0.6);

[0132] Finally, the system outputs a structured anomaly report, including the anomaly node ID, type, score, and occurrence time, and visualizes the anomaly distribution through a topology graph. In practical applications, this method achieves a 92% accuracy rate in detecting anomalies such as line parameter errors and measurement equipment failures, which is 15% higher than traditional methods. Furthermore, the detection delay for power backfeed anomalies in scenarios with high penetration of new energy sources is less than 10 seconds, meeting the real-time monitoring requirements of the power grid. Through dimensionality reduction visualization of node embedding vectors, the distribution characteristics of anomaly nodes in the topology space can be intuitively identified, providing an effective technical means for ensuring the quality of power grid data.

[0133] S302. Organize the detected topology association anomaly information, including the location of the abnormal node or edge, the anomaly type, the scope of impact, etc., generate a topology detection result report, and send the report to the anomaly handling module to provide a basis for subsequent data correction and scheduling decisions.

[0134] In this embodiment of the invention, step S400 captures long-distance dependencies in the measurement sequence based on real-time measurement data, identifies timing anomalies through residual analysis, and outputs timing detection results, including the following steps S401-S403:

[0135] S401. Group the preprocessed real-time measurement data by device or node to construct a time series dataset; for example, arrange the voltage amplitude, frequency and other data of a substation in chronological order to form a time series; normalize each time series data to map the data to the 0-1 interval to eliminate the influence of different units, and use the sliding window technique to divide the time series data into fixed-length sequence segments (e.g., window size of 24 hours) as input to the Transformer model;

[0136] A temporal Transformer model architecture is constructed. This model adopts a bidirectional Transformer encoder structure, including a multi-head self-attention mechanism and a feed-forward network. In the multi-head self-attention mechanism, the model can simultaneously focus on information from different locations in the temporal data, capturing long-distance dependencies. For example, through the self-attention mechanism, the model can learn the correlation between the power value at a certain moment and the load change pattern over the past few hours or even days. The feed-forward network performs a nonlinear transformation on the output of the self-attention mechanism, enhancing the model's expressive power.

[0137] During the model training phase, the Transformer model is trained using time series data under historical normal operating conditions. The training objective is to minimize the mean squared error (MSE) between the model's predicted values ​​and the actual values. The model parameters are continuously adjusted through the backpropagation algorithm so that the model can accurately learn the inherent patterns and regularities of the time series data. After training is completed, the real-time collected time series data is input into the trained model to obtain the model's predictions for data at future times.

[0138] Specifically, in the detection layer of the temporal Transformer, a bidirectional Transformer encoder is used to model the long-short-term dependencies of the measurement sequence. Temporal anomalies are identified when the residual between the predicted and actual values ​​exceeds twice the standard deviation. Temporal anomalies include abrupt changes, persistent biases, and periodic anomalies.

[0139] Specifically, firstly, the measurement data (such as voltage, power, and frequency) is preprocessed, divided into a sequence containing T time steps according to a time window (such as 1 hour), and position encoding is added:

[0140]

[0141] Where pos is the time step position, i is the dimension index, and d is the dimension index. model The model dimension (e.g., 512) is used to enhance the sequence representation by incorporating external features such as timestamps and weather data.

[0142] Secondly, a bidirectional Transformer encoder architecture is used for long-short-term dependency modeling; the multi-head self-attention mechanism is implemented using the formula:

[0143]

[0144] Calculate attention weights, where Q, K, and V are the query, key, and value matrices, respectively, and enhance feature extraction capabilities through multi-head parallel computation;

[0145] The feedforward neural network adopts a two-layer fully connected structure FFN(x) = max(0, xW1+b1)W2+b2, combined with layer normalization and residual connection LayerNorm(x+Sublayer(x)), which effectively captures the complex time dependencies in the measurement sequence.

[0146] In an embodiment of the present invention, S402, residual analysis is performed to identify timing anomalies and output timing detection results, including the following steps C1-C4:

[0147] C1. Calculate the residual between the model's predicted value and the actual measured value, i.e., residual = actual value - predicted value;

[0148] Perform statistical analysis on the residual series to calculate its mean μres and standard deviation σres;

[0149] C2. Set a residual threshold of 2 times the standard deviation, i.e., 2σres. When the absolute value of the residual exceeds this threshold, it is determined that there is a time series anomaly at the corresponding time point.

[0150] C3. Based on the residual analysis results, classify and organize the identified time-series anomalies. Time-series anomalies mainly include time-series sudden changes (such as a sudden and significant voltage fluctuation at a certain moment), persistent deviations (such as the temperature of a certain device being higher than the normal range for a long time), and periodic anomalies (such as a change in the periodic fluctuation pattern of load data). Record the occurrence time, anomaly type, anomaly severity, and other information for each anomaly, generate a time-series detection result report, and send the report to the subsequent data correction module to provide a basis for the repair of abnormal data.

[0151] C4. Anomaly detection is based on residual analysis between predicted and actual values; the model predicts the measurement values ​​at the next k time steps (e.g., k=5) using an autoregressive approach and calculates the residuals. And set the threshold τ = 2σ r (σ r (where r is the standard deviation of the residuals), when r t A value greater than τ is considered abnormal.

[0152] In an optional embodiment, the residual analysis in S402 can identify time-series anomalies by setting a residual threshold and judging the trend of residual changes in order to identify anomalies more accurately. If the residuals at multiple consecutive time points exceed the threshold, or if the residuals show a significant increasing or decreasing trend, these situations indicate the presence of time-series anomalies.

[0153] In another optional embodiment, the residual analysis in S402 for identifying time series anomalies can also involve data grouping and normalization, checking the stationarity of the series, and performing differencing if necessary to ensure stationarity and meet the basic assumptions of the ARIMA model. For each univariate time series, the parameters (p, d, q) of the ARIMA model are initially determined by analyzing its autocorrelation plot (ACF) and partial autocorrelation plot (PACF), or by using an automatic order determination method. The ARIMA model is then fitted using historical data, and the fitted ARIMA model is used to make one-step forward predictions of real-time data. The prediction residuals are calculated, their statistical characteristics are analyzed, and a threshold is set. Residual anomalies are identified as time series anomalies.

[0154] S403. Differentiated identification strategies are adopted for different types of time series anomalies:

[0155] Temporal mutations are detected by calculating the mutation index:

[0156]

[0157] When M t >3 and r t Determine the condition when the value is greater than τ;

[0158] Persistent deviations are identified by accumulating residuals through a sliding window:

[0159]

[0160] Where w is the window size, when S t Determine when >w·τ;

[0161] Periodic anomalies are identified by calculating the power spectral density (PSD(f)) of the residual sequence using Fourier transform. If a specific frequency component is abnormally prominent, it is determined to be a periodic anomaly.

[0162] The system outputs a structured report containing the time, type, and severity of the anomaly, and visualizes the anomaly distribution through a time series diagram. In a provincial power grid test, the method achieved a detection accuracy of 90% for anomalies such as voltage drops and load surges, which is 12% higher than the traditional LSTM model. Moreover, the identification delay for intermittent anomalies is less than 3 sampling periods, meeting the real-time monitoring requirements of the power grid. Through attention weight visualization, the model's focus at different time steps can be intuitively analyzed, providing an effective technical means for assessing the power grid's operating status.

[0163] In this embodiment of the invention, step S500 corrects single-point anomalies and multi-point anomalies based on the univariate detection results, topology detection results, and time-series detection results, and outputs the correction results, including the following steps S501-S502:

[0164] S501. Establish a comprehensive evaluation mechanism for abnormal data; integrate and analyze the results of univariate detection, topology detection, and time series detection, and determine whether the abnormality is a single-point or multi-point anomaly based on information such as the type, location, and scope of impact of the abnormal data; if the abnormal data involves only a single device or node and has little impact on the surrounding data, it is determined to be a single-point anomaly; if the abnormal data involves multiple devices or nodes, or causes a change in the local power grid operating status, it is determined to be a multi-point anomaly.

[0165] For single-point anomalies, different correction strategies are implemented according to their specific types. For random noise anomalies, Gaussian filtering is used. By setting an appropriate filtering window size (e.g., selecting 5-10 sampling points as the window based on the data sampling frequency), a weighted average is applied to the abnormal data points and their neighboring data to smooth data fluctuations and reduce the impact of noise. For instantaneous jump anomalies, cubic spline interpolation is used to construct a smooth interpolation curve using normal data points before and after the anomaly point, and a reasonable estimate of the anomaly point is calculated to replace the original jump data. If it is an equipment fault-related anomaly, the equipment health assessment model is triggered. Combining the equipment's historical operating data and real-time status monitoring data (e.g., temperature, vibration, partial discharge), machine learning algorithms (e.g., random forest, support vector machine) are used to assess the current health status of the equipment. Then, based on the equipment fault mode library, correction data that matches the actual operating status of the equipment is generated.

[0166] Specifically, single-point anomalies are corrected using Gaussian filtering, spline interpolation, or equipment health assessment models; multi-point anomalies are corrected through DBSCAN clustering combined with power flow equation constraint regression.

[0167] Specifically, in order to ensure the accuracy of power grid data, the intelligent correction module classifies abnormal data into single-point anomalies and multi-point anomalies based on the scope of their impact, and adopts different correction strategies accordingly.

[0168] For single-point anomalies, i.e., abnormal data that only affects a single device or node, the system will select an appropriate correction algorithm based on the anomaly type.

[0169] If the anomaly is caused by random noise, such as the measurement equipment being subjected to instantaneous interference, a Gaussian filtering algorithm will be used. This algorithm acts like a "smoothief," performing a weighted average on the abnormal data points and their surrounding data to reduce the impact of noise and restore the data to a stable state.

[0170] When anomalies manifest as data jumps, such as data loss due to communication interruptions, spline interpolation is used to construct a smooth curve and use normal data before and after the anomaly point to calculate a reasonable estimate to fill the data gap.

[0171] If the anomaly is related to the equipment status, such as the transformer oil temperature exceeding the normal range, the system will call the equipment health assessment model, comprehensively analyze the equipment's historical operating data and real-time monitoring parameters, assess the equipment's health status, and predict reasonable measurement values ​​based on the assessment results to complete data correction.

[0172] For multi-point anomalies, a collaborative correction is achieved by combining the DBSCAN clustering algorithm with power flow equation constraint regression. First, the DBSCAN algorithm is used to cluster the multi-point anomaly data, dividing spatially similar anomaly data into different anomaly clusters based on the density distribution of data points. By setting appropriate neighborhood radii ∈ and minimum sample size MinPts (e.g., ∈ is determined based on the electrical distance between grid nodes, and MinPts is set to 3-5), anomaly regions are accurately identified. Then, for each anomaly cluster, a constraint regression model is constructed based on the power flow equations. Based on Kirchhoff's current law and voltage law, and combined with measurement data from normally operating nodes and the grid topology, a set of equations including anomaly node variables is established. By solving this set of equations, under the condition of satisfying the physical constraints of the power grid, the correction value of the anomaly node is calculated, thus achieving collaborative correction of multi-point anomaly data.

[0173] Specifically, for multi-point anomalies, that is, correlational anomalies affecting multiple devices or nodes, the system adopts a collaborative correction method that combines DBSCAN clustering with power flow equation constraint regression.

[0174] First, the DBSCAN clustering algorithm searches for spatially adjacent sets of outliers in the feature space composed of multidimensional measurement data, divides them into different outlier clusters, and thus locates outlier regions.

[0175] Next, for each anomalous cluster, power flow constraint equations are constructed based on Kirchhoff's laws, and a set of equations is established by combining the measurement data of normal nodes. By solving the set of equations, the correction values ​​of anomalous nodes are calculated under the premise of conforming to the physical laws of the power grid, so as to achieve coordinated correction of multiple anomalous points and ensure that the corrected data meets the power grid operation requirements.

[0176] Actual testing has shown that this method significantly reduces the error of single-point anomaly correction, and the data after multi-point anomaly correction can also pass the state estimation test better, effectively improving the quality of power grid data.

[0177] S502. During the calibration process, an uncertainty assessment mechanism is introduced; for the calibrated data, its confidence level is calculated; for example, for single-point anomaly calibration, the error range of the calibration value is estimated based on the principle of the calibration algorithm and the fluctuation of the original data; for multi-point anomaly calibration, the reliability of the calibration result is evaluated by analyzing the residuals in the power flow equation solution process, the degree of satisfaction of constraints, etc.; data with a confidence level lower than the set threshold are marked as suspicious data and subjected to secondary verification or manual review.

[0178] The corrected data and related information (including original anomaly data, correction method, correction time, confidence level, etc.) are organized to generate a correction result report; at the same time, the correction results are fed back to the power grid control system to update real-time data and provide accurate data support for subsequent dispatch decisions, state estimation, etc.

[0179] In this embodiment of the invention, step S600 involves dynamically adjusting the weights of the correction algorithm based on reinforcement learning, evaluating the correction results using evaluation metrics, outputting the evaluation results and feeding them back to the detection and correction model, updating parameters online, and generating a data error report. This includes the following steps S601-S605:

[0180] S601. Construct a reinforcement learning environment and agent; define the power grid operation mode (such as normal operation, peak and valley periods, post-fault reconstruction, etc.) as the state space, with each operation mode corresponding to different power grid data characteristics and anomaly patterns; use a combination of single-point anomaly correction algorithms (Gaussian filtering, spline interpolation, equipment health assessment model) and multi-point anomaly correction algorithms (DBSCAN clustering combined with power flow equation constraint regression, etc.) as the action space, from which the agent can select a suitable combination of correction algorithms; use accuracy, recall, mean squared error (MSE), and power grid scenario adaptability as the core indicators of the reward function; accuracy measures the proportion of correctly corrected anomaly data to the total corrected data, recall reflects the proportion of successfully corrected anomaly data to the actual anomaly data, MSE evaluates the degree of error between the corrected data and the real data, and power grid scenario adaptability is scored based on the performance of the correction algorithm under different power grid operation scenarios (for example, by setting scoring rules through expert experience or historical data statistics)

[0181] S602. Initialize the correction algorithm weights, assigning initial weight values ​​(e.g., all set to 1) to each correction algorithm. These weight values ​​determine the relative importance of the algorithm in the combined correction process. After each data correction is completed, the agent calculates the accuracy, recall, MSE, and power grid scenario fit index values ​​corresponding to the current correction result based on the current power grid operating state (i.e., the state in the state space). These index values ​​are converted into reward values ​​through a pre-defined reward function formula: Reward value = α × accuracy + β × recall - γ × MSE + δ × power grid scenario fit.

[0182] Where α, β, γ, and δ are weighting coefficients set according to actual needs, and α+β+γ+δ=1;

[0183] Next, the Q-learning algorithm is used to update the correction algorithm weights; the agent updates the Q-value table (recording the expected cumulative reward for each state-action pair) based on the current state and the reward value obtained, and the calculation formula is:

[0184] Q(s,a)←Q(s,α)+η[r+γmaxa′ Q(s′,a′)-Q(s,a)]

[0185] Where Q(s,a) is the Q-value of taking action a in state s, η is the learning rate (ranging from 0 to 1; for example, 0.1 indicates the degree to which the Q-value is updated with each learning iteration), r is the reward value obtained from this action, γ is the discount factor (ranging from 0 to 1; for example, 0.9 indicates the importance of future rewards), s′ is the next state after taking action a, and a′ is the optimal action in the next state. Based on the updated Q-value, the weights of the correction algorithm are adjusted so that the weights of algorithms that perform better in the current state are increased, and vice versa.

[0186] S603. Periodically conduct a comprehensive evaluation of the calibration results; according to the preset evaluation cycle (e.g., hourly, daily), summarize and analyze all calibration data within the cycle, calculate the average precision, average recall, average MSE and average power grid scenario adaptability; at the same time, compare the differences in evaluation indicators under different power grid operation scenarios, and analyze the applicability and effectiveness of each calibration algorithm under different scenarios.

[0187] The evaluation results will be compiled into a detailed evaluation report. The report will include the specific values ​​of each evaluation indicator, comparative analysis of indicators under different scenarios, adjustment records of the weights of the correction algorithm, and predictions of the effects after adjustment. The evaluation report will be output to system administrators and relevant technical personnel to provide data support and decision-making basis for subsequent optimization of correction strategies and improvement of detection models.

[0188] In an embodiment of the present invention, S604, the output evaluation results are fed back to the detection and correction model, the parameters are updated online, and a data error report is generated, including the following steps D1-D4:

[0189] D1. Establish an evaluation result feedback mechanism; using the evaluation report generated in S603 as input, extract key evaluation indicators (such as accuracy, recall, MSE, and power grid scenario adaptability) and correction algorithm weight adjustment records to construct a feedback data stream; based on the changing trends of evaluation indicators and the effect of weight adjustment, determine the detection and correction model parameters that need to be updated; for example, if the MSE under a certain power grid operation scenario is consistently high, it is necessary to adjust the prediction window size or self-attention mechanism parameters of the time series Transformer model under the corresponding scenario; if the recall rate of a specific type of anomaly is low, it is necessary to optimize the LOF threshold or 3σ principle parameters of the statistical-density hybrid detection layer;

[0190] D2. Online parameter updates for the detection model: For the statistical-density hybrid detection layer, dynamically adjust the neighborhood parameter k of the LOF algorithm (e.g., adjust k from the default 20 to 15 or 25) and the anomaly threshold multiple of the 3σ principle (e.g., adjust from 3 times the standard deviation to 2.5 times or 3.5 times) based on the evaluation results to improve the accuracy of identifying specific types of univariate statistical anomalies; For the graph neural network association detection layer, optimize the model's learning ability for topological association anomalies by fine-tuning hyperparameters such as the learning rate of the GNN model (e.g., adjust from 0.001 to 0.0005 or 0.002) and the hidden layer dimension (e.g., adjust from 64 dimensions to 32 dimensions or 128 dimensions); For the temporal Transformer detection layer, adjust parameters such as the number of attention heads (e.g., adjust from 8 heads to 4 heads or 16 heads) and the feedforward network dimension (e.g., adjust from 256 to 128 or 512) based on the recognition effect of temporal anomalies to enhance the model's ability to capture long-distance dependencies of measurement sequences.

[0191] D3. Update the parameters of the correction model; based on the dynamically adjusted correction algorithm weights after reinforcement learning, update the calling priority and combination strategy of each correction algorithm in the intelligent correction module; for example, if the correction effect of the equipment health assessment model is significantly better than Gaussian filtering and spline interpolation in a certain power grid operation scenario, increase the weight ratio of this model in that scenario; at the same time, for the multi-point anomaly correction method of DBSCAN clustering combined with power flow equation constraint regression, adjust the clustering parameters ∈ and MinPts, as well as the convergence threshold in the power flow equation solving process, according to the evaluation results, to optimize the collaborative correction effect of multi-point anomalies;

[0192] D4. Establish a model update verification mechanism; before formally applying the updated model parameters, select some recently collected data samples that were not included in the evaluation and conduct small-scale verification tests; compare the anomaly detection accuracy, correction accuracy and other indicators of the model before and after the update to evaluate the effectiveness of the parameter update; if the verification results show that the updated model performance is significantly improved, then the new parameters are formally applied to the production environment; if the performance does not meet expectations, analyze the reasons and readjust the parameters, and conduct verification tests again until satisfactory results are achieved.

[0193] In an optional embodiment, the online update parameters of S604 can be configured by pre-setting a series of parameter adjustment rules for different power grid operation scenarios, different anomaly types, and key evaluation indicators based on historical operating experience and evaluation reports. After the system periodically generates evaluation reports, it matches the current power grid scenario and various evaluation indicators with the conditions in the rule base. Once a rule is matched, the parameter adjustment instruction corresponding to that rule is automatically triggered; the system executes the adjustment instruction and modifies the parameter configuration of the corresponding detection or correction module. All parameter adjustment operations are recorded to form an adjustment log; in the next evaluation cycle, the system will pay special attention to the changes in indicators affected by the adjusted parameters to verify the effectiveness of the rule and provide a basis for optimizing the rule base.

[0194] In another optional embodiment, the online update parameters of S604 can also be configured to set an adjustable target value and a current value for each parameter to be adjusted, and provide simple upward or downward adjustment instructions based on the overall performance of the evaluation report, rather than precise numerical values. Upon receiving the instruction, the system will not directly adjust the parameter to the new target value, but will use a weighted average method for gradual fine-tuning. If, after one or two evaluation cycles, the overall performance index begins to recover after the upward adjustment instruction is issued, the adjustment direction will be maintained. If the performance continues to decline, it indicates that the adjustment direction is incorrect, and the system will automatically issue a reverse downward adjustment instruction for reverse fine-tuning. Through this small-scale iteration and continuous trial-and-error approach, each parameter gradually converges to a relatively optimal value in the current scenario, maintaining the overall stability of the system.

[0195] S605. Generate a data error report; based on the updated detection and correction model, comprehensively scan historical and real-time data, and summarize the identified abnormal data information; the report content includes the time distribution, spatial distribution (involved equipment or nodes), anomaly type (univariate statistical anomaly, topological correlation anomaly, time-series anomaly), anomaly severity (classified according to the degree of impact of the anomaly on power grid operation), data comparison before and after correction, and the basis for selecting the correction method, etc.; at the same time, equipment or areas with frequent anomalies are highlighted, and targeted operation and maintenance suggestions (such as equipment maintenance, sensor calibration, etc.) are proposed; the data error report is output in the form of a combination of visual charts and detailed text, which makes it convenient for power grid dispatchers to quickly grasp the status of power grid data quality and provide decision support for the safe and stable operation of the power grid.

[0196] In summary, the AI-based method for identifying and correcting abnormal control data provided in this invention acquires and preprocesses multi-source data from the main and distribution networks to construct a knowledge graph of associated equipment ledgers and topology structures. It identifies univariate anomalies using the LOF algorithm and the 3σ principle, detects topology-related anomalies using graph neural networks, and identifies time-series anomalies using a time-series Transformer combined with residual analysis. It corrects single-point anomalies using methods such as Gaussian filtering and corrects multi-point anomalies using DBSCAN clustering and power flow equation constraint regression. Based on reinforcement learning, with the power grid operation mode as the state space and the correction algorithm as the action space, it dynamically adjusts weights through Q-learning, feeding the evaluation results back to the model to update parameters and generate error reports. This achieves multi-dimensional identification and adaptive correction of abnormal power grid data, improving data accuracy and power grid operation reliability.

[0197] Example 3, referring to Figure 2 This is an embodiment of the present invention, and the above is an illustrative scheme of an AI-based method for identifying and correcting abnormal data in regulation. It should be noted that the technical solution of an AI-based system for identifying and correcting abnormal data in regulation and the technical solution of the above-described AI-based method for identifying and correcting abnormal data in regulation belong to the same concept. Details not described in detail in the technical solution of the AI-based system for identifying and correcting abnormal data in regulation in this embodiment can be found in the description of the above-described method for identifying and correcting abnormal data in regulation.

[0198] This embodiment provides an AI-based system for identifying and correcting abnormal data, including: a data acquisition and processing module, a statistical-density detection module, a graph neural network detection module, a time-series Transformer detection module, an intelligent correction module, an evaluation and optimization module, and a feedback iteration module;

[0199] The data acquisition and processing module is configured to acquire multi-source data from the main and distribution networks, perform preprocessing, and construct a power grid topology knowledge graph; the multi-source data includes full voltage level model data, real-time measurement data, and equipment status data;

[0200] The statistical-density detection module is configured to identify univariate statistical anomalies based on preprocessed multi-source data, using a statistical-density hybrid detection layer based on the LOF algorithm and the 3σ principle, and outputting univariate detection results.

[0201] The graph neural network detection module is configured as an association detection layer based on graph neural networks. It maps the power grid topology knowledge graph into a graph structure, and uses the GNN model to learn the feature association between nodes and edges, detects topology association anomalies, and outputs topology detection results.

[0202] The temporal transformer detection module is configured to capture long-distance dependencies of measurement sequences based on real-time measurement data, identify temporal anomalies through residual analysis, and output temporal detection results.

[0203] The intelligent correction module is configured to correct single-point anomalies and multi-point anomalies based on univariate detection results, topology detection results, and time-series detection results, and output the correction results.

[0204] The evaluation and optimization module is configured to dynamically adjust the weights of the correction algorithm based on reinforcement learning, evaluate the correction results through accuracy, recall, MSE and power grid scenario adaptability indicators, and output the evaluation results.

[0205] The feedback iteration module is configured to feed the evaluation results back to the detection and correction model, update parameters online, and generate data error reports.

[0206] In one embodiment, the intelligent correction module includes a single-point anomaly correction unit and a multi-point anomaly correction unit; the single-point anomaly correction unit is configured to call Gaussian filtering, spline interpolation or equipment health assessment model to correct the single-point anomaly according to the anomaly type, wherein Gaussian filtering is used for random noise anomaly correction, spline interpolation is used for instantaneous jump anomaly correction, and equipment health assessment model is used for equipment fault-related anomaly correction.

[0207] The multi-point anomaly correction unit is configured to correct multi-point anomalies by combining DBSCAN clustering with power flow equation constraint regression.

[0208] In one embodiment, the evaluation and optimization module includes a reinforcement learning unit and an evaluation metric calculation unit;

[0209] The reinforcement learning unit is configured with the power grid operation mode as the state space, the combination of correction algorithms as the action space, and the accuracy, recall, MSE and power grid scenario adaptability as the reward function. The weight allocation strategy of the correction algorithm is iteratively optimized through the Q-learning algorithm.

[0210] The evaluation index calculation unit is configured to calculate multi-dimensional evaluation indicators in real time and generate a visualization report of the correction effect.

[0211] In summary, the AI-based system for identifying and correcting abnormal control data provided in this invention acquires multi-source data from the main and distribution networks through a data acquisition and processing module and preprocesses it to construct a power grid topology knowledge graph. A statistical-density detection module uses the LOF algorithm and the 3σ principle to identify univariate anomalies. A graph neural network detection module and a time-series Transformer detection module capture topological association features and time-series long-distance dependencies based on GNN and Transformer models, respectively, to identify anomalies. An intelligent correction module corrects anomalies through single-point and multi-point anomaly correction units. An evaluation and optimization module generates evaluation results based on reinforcement learning. Finally, a feedback iteration module updates model parameters and generates a data error report, achieving multi-dimensional identification and adaptive correction of abnormal power grid data.

[0212] This embodiment also provides an electronic device applicable to an AI-based method for identifying and correcting abnormal data in regulation, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the AI-based method for identifying and correcting abnormal data in regulation as proposed in the above embodiment.

[0213] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements an AI-based method for identifying and correcting abnormal data as proposed in the above embodiments.

[0214] The storage medium proposed in this embodiment and the method for identifying and correcting abnormal data based on AI proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0215] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0216] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. An AI-based method for identifying and correcting abnormal data in regulation, characterized in that: include, Acquire multi-source data from the main and distribution networks and preprocess them to construct a power grid topology knowledge graph; Based on the preprocessed multi-source data, a hybrid detection layer is used to identify univariate statistical anomalies and output univariate detection results. The association detection layer based on graph neural network maps the power grid topology knowledge graph into a graph structure, learns the feature association between nodes and edges, detects topology association anomalies, and outputs topology detection results. Based on real-time measurement data, long-distance dependencies of measurement sequences are captured, and temporal anomalies are identified through residual analysis, outputting temporal detection results. Based on the univariate detection results, topology detection results, and time series detection results, single-point anomalies and multi-point anomalies are corrected respectively, and the correction results are output. The system dynamically adjusts the weights of the correction algorithm based on reinforcement learning, evaluates the correction results using evaluation metrics, outputs the evaluation results and feeds them back to the detection and correction model, updates parameters online and generates data error reports.

2. The AI-based method for identifying and correcting abnormal data in regulation as described in claim 1, characterized in that: The construction of the power grid topology knowledge graph includes real-time collection of first multi-source data, second multi-source data, and third multi-source data by deploying them in the main and distribution network devices. Deep preprocessing of collected multi-source data includes data cleaning, data filling, and format conversion; Based on power grid topology information, a power grid topology knowledge graph is constructed using a graph database, mapping the relationships between the first and second multi-source data to the graph; The completed knowledge graph is subjected to quality and logical verification. The preprocessed and verified power grid topology knowledge graph is stored in a distributed storage system, and a graph update mechanism is established.

3. The AI-based method for identifying and correcting abnormal data in regulation as described in claim 2, characterized in that: The output of the univariate detection result includes splitting the preprocessed multi-source data to obtain a univariate dataset, setting the normal fluctuation range of the data, and marking data points that exceed the normal fluctuation range as suspected anomalies. Based on suspected outliers, the local reachability density of data points is calculated to confirm the final univariate statistical outliers; The sliding window size is set according to the power grid update frequency, and the threshold and judgment result of anomaly detection are updated. The final univariate statistical outliers will be generated into a univariate detection result report, and a comprehensive anomaly analysis will be performed.

4. The AI-based method for identifying and correcting abnormal data in regulation as described in claim 3, characterized in that: The output topology detection results include, The power grid topology knowledge graph is transformed into graph structure data, and the transformed graph structure data is input into the power grid topology analysis model. Power grid topology graph data under normal operating conditions is collected for training. Real-time power grid topology data is input into a trained power grid topology analysis model to learn the feature relationships between nodes and edges and extract topological feature representations. Based on the topological feature representation output by the power grid topology analysis model, a rule for determining topological correlation anomalies is set to identify topological correlation anomalies. The topology association anomalies are sorted out, a topology detection result report is generated, and sent to the anomaly handling module.

5. The AI-based method for identifying and correcting abnormal data in regulation as described in claim 4, characterized in that: The output time series detection results include grouping the preprocessed real-time measurement data by device or node to construct a time series dataset, normalizing each time series data to map the data to the 0-1 interval, and using the sliding window technique to divide the time series data into fixed-length sequence segments as input to the Transformer model. A temporal Transformer model architecture is constructed, employing a bidirectional Transformer encoder structure that includes a multi-head self-attention mechanism and a feedforward neural network. In the multi-head self-attention mechanism, information from different positions in the temporal data is simultaneously monitored to capture long-distance dependencies. The feedforward neural network performs a nonlinear transformation on the output of the self-attention mechanism to enhance the model's expressive power. During the model training phase, the Transformer model is trained using time series data under normal historical conditions. The training objective is to minimize the mean square error between the model's predicted values ​​and the actual values. The model parameters are adjusted through the backpropagation algorithm to learn the inherent patterns and regularities of the time series data. After training is completed, the real-time collected time series data is input into the trained model to obtain the model's predictions for future data. Perform residual analysis to calculate the residual between the model's predicted values ​​and the actual measured values. Perform statistical analysis on the residual series to calculate the mean and standard deviation and set a residual threshold. When the absolute value of the residual exceeds the residual threshold, it is determined that there is a time series anomaly at the corresponding time point. Based on the residual analysis results, the identified time-series anomalies are classified and organized, and the occurrence time, anomaly type, and anomaly severity information of each anomaly are recorded. A time-series detection result report is generated and sent to the data correction module.

6. The AI-based method for identifying and correcting abnormal data in regulation as described in claim 5, characterized in that: The output correction results include establishing an abnormal data comprehensive evaluation mechanism, integrating and analyzing univariate detection results, topology detection results and time series detection results, and determining whether the abnormality is a single-point abnormality or a multi-point abnormality based on the type, location and scope of influence of the abnormal data. For single-point anomalies, including random noise anomalies, transient jump anomalies, and equipment failure-related anomalies, different correction strategies are implemented; for multi-point anomalies, the DBSCAN clustering algorithm is combined with power flow equation constraint regression for collaborative correction. During the calibration process, an uncertainty assessment mechanism is introduced. For the calibrated data, the confidence level is calculated, and data with a confidence level lower than the preset threshold is marked as suspicious data for secondary verification or manual review. The corrected data is organized to generate a correction result report, which is then fed back to the power grid control system to update real-time data.

7. The AI-based method for identifying and correcting abnormal data in regulation as described in claim 6, characterized in that: The dynamic adjustment of the correction algorithm weights includes: constructing a reinforcement learning environment and agent; setting the power grid operation mode as the state space; each operation mode corresponds to different power grid data features and anomaly patterns; using the combination of single-point anomaly correction algorithm and multi-point anomaly correction algorithm as the action space; and the agent can select a suitable combination of correction algorithms from it. Accuracy, recall, mean square error, and power grid scenario adaptability are used as the core indicators of the reward function. Initialize the correction algorithm weights and assign initial weight values ​​to each correction algorithm. After each data correction is completed, the agent calculates the accuracy, recall, MSE and power grid scenario adaptability index values ​​corresponding to the current power grid operation status. The index values ​​are then converted into reward values ​​through the reward function formula. The Q-learning algorithm is used to update the correction algorithm weights. The agent updates the Q-value table based on the current state and the reward value obtained. Regularly conduct a comprehensive evaluation of the calibration results. According to the preset evaluation cycle, summarize and analyze all calibration data within the current cycle to calculate the average precision, average recall, average MSE, and average grid scenario adaptability. At the same time, compare the differences in evaluation indicators under different grid operation scenarios to analyze the applicability and effectiveness of each calibration algorithm under different scenarios. The evaluation results are compiled into an evaluation report. An evaluation result feedback mechanism is established. The evaluation report is used as input to extract key evaluation indicators, including accuracy, recall, MSE and power grid scenario adaptability. The weight adjustment records of the correction algorithm are extracted and a feedback data stream is constructed. Based on the changing trends of the evaluation indicators and the effects of weight adjustments, the detection and correction model parameters that need to be updated are determined and updated online. A model update verification mechanism is established to evaluate the effectiveness of the parameter updates. Based on the updated detection and correction model, a comprehensive scan of historical and real-time data is performed to summarize the identified abnormal data information. At the same time, devices or areas with abnormalities are highlighted and targeted operation and maintenance suggestions are proposed.

8. An AI-based system for identifying and correcting abnormal regulatory data, employing the AI-based method for identifying and correcting abnormal regulatory data as described in any one of claims 1 to 7, characterized in that, include: Data acquisition and processing module, statistical density detection module, graph neural network detection module, time series Transformer detection module, intelligent correction module, evaluation and optimization module, feedback iteration module; The data acquisition and processing module acquires multi-source data from the main and distribution networks, performs preprocessing, and constructs a power grid topology knowledge graph. The statistical-density detection module, based on preprocessed multi-source data, employs a statistical-density hybrid detection layer based on the LOF algorithm and the 3σ principle to identify univariate statistical anomalies and output univariate detection results. The graph neural network detection module, based on the association detection layer of the graph neural network, maps the power grid topology knowledge graph into a graph structure, and uses the graph neural network model to learn the feature association between nodes and edges, detects topology association anomalies, and outputs topology detection results. The time series Transformer detection module, based on real-time measurement data, uses the time series Transformer to capture long-distance dependencies in the measurement sequence, identifies time series anomalies through residual analysis, and outputs time series detection results. The intelligent correction module corrects single-point anomalies and multi-point anomalies based on the univariate detection results, topology detection results, and time series detection results, and outputs the correction results. The evaluation and optimization module dynamically adjusts the weights of the correction algorithm based on reinforcement learning, evaluates the correction results through accuracy, recall, MSE and power grid scenario adaptability indicators, and outputs the evaluation results. The feedback iteration module feeds the evaluation results back to the detection and correction model, updates the parameters online, and generates a data error report.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the AI-based method for identifying and correcting abnormal data according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the AI-based method for identifying and correcting abnormal data according to any one of claims 1 to 7.

Citation Information

Cited By

  • Hoisting machinery operation monitoring method based on neural network architecture search

    CN121834356A

  • Time sequence data processing method and system for wind power photovoltaic unit

    CN121959386A

  • Manufacturing intelligent production scheduling and scheduling method based on AI edge computing power terminal

    CN122085952A

  • Manufacturing intelligent scheduling and dispatching method based on AI edge computing terminal

    CN122085952B