Power distribution network abnormal data identification and recovery method based on multi-scale adaptive fusion

By employing a multi-scale time-frequency decomposition and adaptive feature fusion method, combined with Transformer networks and robust Kalman filtering, the problem of abnormal data identification and recovery in distribution networks is solved, achieving high-precision data identification and recovery, and is suitable for online monitoring and fault diagnosis of active distribution networks.

CN122241493APending Publication Date: 2026-06-19STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST
Filing Date
2026-01-27
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies are ill-suited to the multi-scale and non-stationary operation characteristics of distribution networks, resulting in low accuracy in abnormal data identification and insufficient recovery quality. In particular, false alarms and missed detections are prone to occur under complex disturbances, and existing recovery algorithms do not fully utilize the spatiotemporal correlation between nodes.

Method used

A multi-scale time-frequency decomposition algorithm is used to extract frequency and time domain features. Feature fusion is performed through an adaptive weighting mechanism. Anomaly identification is performed by combining the Transformer network. Data recovery is performed by spatiotemporal correlation and adaptive optimization methods. Finally, global consistency verification is performed by robust Kalman filtering.

Benefits of technology

It improves the sensitivity and stability of abnormal data identification, enhances the accuracy and consistency of data recovery, and possesses real-time performance and parameter self-learning capabilities, making it suitable for online monitoring and fault diagnosis in active distribution networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122241493A_ABST
    Figure CN122241493A_ABST
Patent Text Reader

Abstract

This invention discloses a method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion; belonging to the field of power system information sensing and data processing technology; addressing the problem of improving the accuracy of abnormal data identification and the quality of data recovery in distribution networks under multi-source heterogeneous environments; including: multi-scale time-frequency decomposition and feature extraction of distribution network measurement signals; fusion of multi-scale features through an adaptive weighting mechanism; anomaly identification and classification using an improved Transformer network; repair and reconstruction of abnormal data based on spatiotemporal constraints and Kalman gain adjustment; optimization of data credibility through global consistency verification; and finally, closed-loop self-repair and real-time updates; this invention can effectively identify various anomaly types, improve data recovery accuracy and system robustness, and is applicable to scenarios such as online monitoring, state estimation, and data governance of active distribution networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system information perception and intelligent data processing technology, and relates to a method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion. Background Technology

[0002] With the large-scale integration of various resources such as distributed energy, energy storage devices, and electric vehicles, modern distribution networks are gradually evolving into active distribution networks with high penetration, strong time-varying characteristics, and high dynamics. During operation, the system needs to collect real-time operational measurement data such as voltage, current, and power to support functions such as state estimation, energy management, and fault diagnosis. However, in actual operation, factors such as communication delays, sensor drift, data loss, noise interference, and sudden environmental changes often lead to abnormal fluctuations, abrupt distortions, missing data, or inconsistent sampling, seriously affecting the operational safety and dispatch accuracy of the distribution network.

[0003] Currently, common anomaly detection methods mainly include statistical feature-based detection methods (such as mean-variance method and Z-score method) and model-based discriminant methods (such as principal component analysis and Kalman filtering). These methods typically assume stable data distribution and are difficult to adapt to the time-varying operating conditions and heterogeneous multi-source data of power distribution networks. In addition, single-scale or fixed-parameter models have limited accuracy under complex disturbances and are prone to false alarms and missed detections. Although machine learning and deep learning models (such as SVM, autoencoders, and CNNs) have been introduced to improve detection accuracy, they are highly dependent on training samples, have weak generalization ability, and poor physical interpretability.

[0004] In data recovery, methods such as linear interpolation, spline interpolation, and Kalman estimation are effective for short-term missing data, but their performance degrades significantly under long-term anomalies, strong noise, or nonlinear perturbations. Most existing recovery algorithms do not fully utilize the spatiotemporal correlation between nodes, resulting in locally effective but globally inconsistent recovery results.

[0005] Therefore, there is an urgent need for an abnormal data identification and recovery method that can adapt to the multi-scale and non-stationary operation characteristics of the power distribution network and has high robustness, adaptability and strong interpretability. Summary of the Invention

[0006] The technical solution of this invention is used to solve the problem of how to improve the accuracy of abnormal data identification and data recovery quality in a multi-source heterogeneous environment of a power distribution network.

[0007] The present invention solves the above-mentioned technical problems through the following technical solutions:

[0008] This invention provides a method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion, comprising the following steps: S1. Based on the multi-scale time-frequency decomposition algorithm, the distribution network measurement signal is preprocessed and multi-scale feature is extracted to obtain the frequency domain and time domain features at each time scale. S2. A multi-scale feature matrix is ​​constructed using a feature fusion strategy. The dynamic fusion of features at different scales is achieved through an adaptive weighting mechanism to obtain the final fused features. S3. Use an improved anomaly detection model to identify and classify fused features, and accurately locate abnormal data and their types; S4. A distribution network anomaly data recovery method based on spatiotemporal correlation and adaptive optimization, which repairs and reconstructs the anomaly data to restore its true value; S5. Optimize the spatiotemporal consistency and reliability of the recovered data through global consistency verification and error compensation algorithms; S6. Input the identified and recovered data into the distribution network state estimation module to achieve data closed-loop self-repair and real-time update.

[0009] Furthermore, the multi-scale time-frequency decomposition algorithm in step S1 is variational mode decomposition, which is used to decompose the preprocessed signal into multiple modal components, and extract the root mean square value and kurtosis of each mode as time-domain features, and extract the instantaneous frequency of each mode as frequency-domain features.

[0010] Furthermore, the adaptive weighting mechanism described in step S2 dynamically assigns weights based on the noise intensity of each scale component, and the weight calculation formula is as follows:

[0011] in, For adjustment coefficients, Let be the noise intensity of the k-th component. For the first The noise intensity of each component The number of modal components; The final fusion feature is represented as follows:

[0012] in, Let be the final fused feature representation at time t. Let be the eigenvector obtained from the k-th sub-feature source at time t.

[0013] Furthermore, the anomaly detection model in step S3 adopts a Transformer network based on an attention mechanism. It dynamically captures anomaly features by calculating the correlation weights between the query, key, and value matrices, and outputs an anomaly confidence vector to determine the anomaly type.

[0014] Furthermore, the method for obtaining the anomaly confidence vector is as follows: The output layer of the Transformer network is mapped to an anomaly confidence vector through a fully connected network. as follows:

[0015] in, Let be the anomaly probabilities at time steps 1, 2, ..., i, n, respectively. , It is the Sigmoid activation function. and For training parameters, The output feature vector of the Transformer network at time step i is the deep feature representation of the input data at the corresponding time step; when When this happens, the data point is determined to be abnormal. The threshold value is used.

[0016] Furthermore, the anomaly type includes at least one of sensor drift, data mutation, communication interruption, and noise interference.

[0017] Furthermore, the distribution network anomaly data recovery method based on spatiotemporal correlation and adaptive optimization described in step S4 is as follows: Based on the spatiotemporal similarity between nodes, a normalized spatial weight matrix is ​​constructed using the exponential distance kernel function. This matrix is ​​then used to weight and fuse the data of neighboring nodes. A time delay term is introduced to compensate for communication lag, thus achieving the initial recovery of missing data. A dynamic weighted least squares method is used to globally optimize the recovery results, and the accuracy is further improved by minimizing the temporal reconstruction error. The results are verified by calculating the reconstructed mean square error and setting a confidence interval. If the error exceeds the limit, the weights are iteratively updated using the gradient descent method, forming a closed-loop feedback mechanism with self-correction capabilities, thereby ensuring the reliability and adaptability of data recovery.

[0018] Furthermore, the global consistency check described in step S5 employs robust Kalman filtering and introduces an anomaly suppression term to dynamically adjust the measurement noise covariance in order to suppress the impact of abnormal observations on state estimation.

[0019] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the above-described method for identifying and recovering abnormal data in a distribution network based on multi-scale adaptive fusion, and the processor is configured to execute the program stored in the memory.

[0020] The present invention also provides a storage medium storing a computer program, which, when run by a processor, executes the steps of the above-described method for identifying and recovering abnormal data in a power distribution network based on multi-scale adaptive fusion.

[0021] The beneficial effects of this invention are as follows: This invention introduces a multi-scale time-frequency decomposition and feature adaptive fusion mechanism, which can accurately extract signal features at different time scales and effectively identify various anomaly types such as sudden anomalies, gradual drift, and periodic disturbances. It has higher sensitivity and stability than traditional single-scale detection methods. In the process of anomaly data recovery, a dynamic weighting and spatiotemporal correlation constraint model is adopted, which can realize adaptive data repair and global consistency verification based on the information coupling relationship between nodes, significantly improving the recovery accuracy. By combining robust Kalman filtering and online weight update mechanism, the model can maintain stable operation under the uncertainty of multi-source data, and has the advantages of strong real-time performance and self-learning parameters. It is suitable for application scenarios such as online monitoring, state estimation, and fault diagnosis of active distribution networks. Attached Figure Description

[0022] Figure 1 This is an overall flowchart of the method of the present invention; Figure 2 The accuracy curve for identifying and recovering abnormal data in the power distribution network using the method of this invention; Figure 3 This is the curve showing the change in the loss value of the loss function during the training and updating process of the method of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments: Example 1 like Figure 1 As shown in the figure, this invention provides a method for identifying and recovering abnormal data in a distribution network based on multi-scale adaptive fusion, including the following steps: Step 1: Multi-scale time-frequency feature construction and decomposition: Based on the multi-scale time-frequency decomposition algorithm, the distribution network measurement signal is preprocessed and multi-scale features are extracted to obtain the frequency domain and time domain features at each time scale.

[0025] Step 1.1: Signal Acquisition and Preprocessing Voltage is obtained from multiple measurement points in the power distribution network. Current Active power With reactive power The signals, composed of a multidimensional input vector, are as follows: (1) The multidimensional input vector reflects the transient state information of the distribution network at different nodes and branches, and can provide global feature support for subsequent feature construction.

[0026] To suppress random noise and sampling errors, the multidimensional input vector... Preprocessing (denoising filtering, normalization): (2) in, The preprocessed multidimensional input vector, and These represent the signal mean and standard deviation, respectively.

[0027] Preprocessing steps can ensure consistency across dimensions and avoid feature bias caused by differences in the scale of data from different measurement points.

[0028] Step 1.2, Multiscale Decomposition After signal normalization, in order to further separate the dynamic components at different time scales in the distribution network operation data, the variational mode decomposition (VMD) algorithm is used to transform the preprocessed multidimensional input vector. Decomposed into K submodal components: (3) in, For the first Each mode reflects the variation characteristics of the signal within a specific frequency band; This is the residual.

[0029] Each modal component satisfies the optimization conditions: (4) in, For the first The center frequency of each mode The impulse function is used for convolution and constructing analytic signals. The imaginary unit, To find the derivative with respect to time t, This refers to the 2-norm operation.

[0030] The optimization conditions are solved using the Lagrange multiplier method, which can simultaneously minimize the bandwidth of each mode and ensure that the decomposition results do not overlap in the time-frequency domain, thereby achieving the optimal decomposition of the time-frequency components.

[0031] The advantages of VMD algorithm decomposition are: 1) It can adaptively determine the center frequency of each mode. ;2) It can effectively avoid the mode aliasing problem in empirical mode decomposition (EMD);3) The decomposition process is robust and repeatable, and is suitable for real-time distribution network data stream processing.

[0032] Step 1.3, Feature Extraction After completing the multi-scale decomposition, time-domain and frequency-domain features are extracted for each mode. The root mean square value is a measure of the mode. The square root of the time series reflects the energy magnitude or amplitude of the mode over a period of time, and belongs to the time domain characteristics; kurtosis is also a statistical measure of the time series and belongs to the time domain characteristics; instantaneous frequency describes how the frequency of the signal changes over time, reflecting the dynamic changes of the spectrum, and belongs to the frequency domain characteristics.

[0033] The root mean square (RMS) value is extracted to reflect the modal energy intensity. The formula for calculating the RMS value is as follows: (5) in, The root mean square value, The duration of the signal.

[0034] Kurtosis is extracted to measure the sharpness of the modal distribution. The formula for calculating kurtosis is as follows: (6) in, For kurtosis, For mathematical expectation calculation, and The first The mean and standard deviation of each mode; when the kurtosis is significantly higher than the normal range, it indicates that the signal may contain abrupt changes or abnormal pulse components.

[0035] The instantaneous frequency is extracted to reflect the dynamic characteristics of the signal's spectrum. The formula for calculating the instantaneous frequency is as follows: (7) in, Instantaneous frequency, Indicates to Perform the Hilbert transform. It is used for argument (phase) operations of complex numbers; by calculating the trend of instantaneous frequency changes, abnormal disturbances or nonlinear oscillations can be identified.

[0036] Step 2, Multi-scale adaptive fusion feature construction: A multi-scale feature matrix is ​​constructed using a feature fusion strategy, and the dynamic fusion of features at different scales is achieved through an adaptive weighting mechanism.

[0037] Step 2.1: Feature Fusion and Dimensionality Reduction The multi-scale feature matrix is ​​constructed as follows: (8) The multi-scale feature matrix includes Each mode, These features fully characterize the multidimensional distribution of distribution network signals in time, frequency, and energy space.

[0038] To reduce feature dimension redundancy and highlight key information components, principal component analysis (PCA) is used to reduce the dimensionality of the multi-scale feature matrix. (9) in, The multi-scale feature matrix after dimensionality reduction. The eigenvector matrix, The characteristic mean is denoted as .

[0039] The eigenvector matrix The eigenvalues ​​are obtained from the eigenvalue decomposition of the characteristic covariance matrix: (10) (11) in, The characteristic covariance matrix, For the sample size, It is the eigenvalue matrix.

[0040] The energy contribution rate corresponding to the principal component is: (12) in, Let be the variance contribution rate of the i-th principal component, representing the proportion of the i-th principal component to the total information / total variance. Covariance matrix The i-th eigenvalue corresponds to the variance (energy magnitude) of the i-th principal component. For all eigenvalues.

[0041] Principal components with a cumulative variance contribution rate greater than 95% are retained to achieve optimal dimensionality reduction and maximize the preservation of effective feature information. The resulting multi-scale feature matrix after dimensionality reduction. This eliminates the linear correlation between features and provides a compact and efficient input representation for subsequent adaptive weighting.

[0042] Step 2.2, Adaptive Weight Allocation Even after feature reduction, components at different scales still possess differentiated importance. Therefore, an adaptive weighting mechanism based on noise level is designed, dynamically adjusting the contribution of each scale using a soft maximization function. Dynamic weights are assigned to each scale component. The dynamic weights satisfy: (13) in, For adjustment coefficients, Let be the noise intensity of the k-th component. For the first The noise intensity of each component The number of modal components.

[0043] when When the value is large, the system suppresses high noise components more effectively; when When the scale is small, the weights across different scales tend to be evenly distributed. To adapt to different working conditions, It can adaptively adjust according to the noise level of the real-time signal, for example: (14) in, This is the initial adjustment coefficient. To prevent tiny constants with a denominator of zero, Standard deviation of each mode The average value.

[0044] The final fusion characteristics are: (15) in, The combined features after weighted fusion Let be the value of the feature sequence / feature component of the k-th mode at time t.

[0045] This fusion feature possesses both global representation capabilities for multi-scale information and noise resistance, providing high-quality input for subsequent anomaly identification and data recovery modules.

[0046] Step 3, Anomaly Data Identification and Classification: The improved anomaly detection model is used to identify and classify the fused features, accurately locating the anomaly data and its type.

[0047] Step 3.1, Anomaly Detection Model The anomaly detection model uses an attention-based Transformer network, and the feature mapping relationship is as follows: (16) in , , These are the query, key, and value matrices for the features.

[0048] The feature mapping process dynamically adjusts the degree of feature attention by calculating the correlation weights between different time steps or feature dimensions, thereby achieving sensitive capture of abnormal features.

[0049] The output layer of the Transformer network is mapped to an anomaly confidence vector through a fully connected network. as follows: (17) in, Let be the anomaly probabilities at time steps 1, 2, ..., i, n, respectively. , It is the Sigmoid activation function. and For training parameters, The encoding result of the Transformer at time step i; when When this happens, the data point is determined to be abnormal. The threshold value is used.

[0050] The threshold It can be adaptively adjusted according to the application scenario: (18) in, The mean of the anomaly probability. Standard deviation, This is an empirical coefficient.

[0051] Step 3.2, Anomaly Classification After detecting abnormal data, the system uses the anomaly confidence vector. Based on the time-frequency response patterns of the fused features, anomalous samples are classified into four typical types. The classification is based on the matching results of the feature cluster centers output by the Transformer encoder and the template labels. According to the model labels, anomalous data are classified as follows: Type A: Sensor drift; characterized by long-term signal offset or slow drift, with frequency domain energy concentrated in the low-frequency region; can be accurately identified through trend line regression and residual analysis.

[0052] (19) in, This represents the residual (offset). This represents the actual measurement value of the sensor at time t. The fitted / predicted values ​​are obtained by trendline regression of the signal under normal operating conditions. As the drift determination threshold, when At that moment, it is assumed that there is sensor drift.

[0053] Type B: Data mutation; manifested as short-term drastic fluctuations or abrupt changes, with a significant increase in the time-domain derivative or instantaneous power; determined by comparison with a high-pass filter and a threshold.

[0054] (20) in, The value of the monitored time series signal at time t. The threshold for mutation determination is when It is assumed that a sudden change occurred at that moment.

[0055] Type C: Communication interruption; manifested as data interval exceeding the limit, signal loss, or repetition; can be resolved by timestamp differentiation. judge.

[0056] (twenty one) in, For the first The timestamp / sampling time of each data point Let i be the timestamp / sampling time of the i-th data point. The maximum allowed time interval threshold; when the time interval between two adjacent points... When that happens, an "interruption" exception is determined to have occurred at that point.

[0057] Type D: Noise interference; characterized by high-frequency random disturbances and dense expansion of the power spectrum; identified by variance spectrum or wavelet energy ratio analysis.

[0058] (twenty two) in, This is an indicator of the proportion of high-frequency energy. The energy of the signal in the high-frequency band. This represents the total energy of the signal across the entire frequency band. The threshold for determining noise interference.

[0059] Step 4, Abnormal Data Recovery and Reconstruction: Based on the spatiotemporal correlation and adaptive optimization, the abnormal data of the distribution network is repaired and reconstructed to restore its true value.

[0060] Step 4.1, Spatiotemporal Constraint Recovery Model To address the issue of missing data for anomalous nodes, a spatial weight matrix for neighboring nodes is first established based on the spatiotemporal similarity between nodes. This is used to quantify the correlation strength between different nodes; the formula for the neighborhood node spatial weight matrix is ​​as follows: (twenty three) in, and Representing nodes respectively and The spatiotemporal feature vector, The scale parameter determines the smoothing range of the neighborhood; Satisfy normalization conditions This matrix is ​​constructed using an exponential distance kernel function, ensuring that nodes that are spatially close and have similar characteristic change trends have higher weights, thereby enhancing the impact of local constraints on the recovery results.

[0061] Based on neighborhood information, nodes The missing data is recovered using a weighted summation method, as shown in the following formula: (twenty four) in, Let i be the recovered (estimated) data value of node i at time t. The time alignment delay term is used to compensate for the phase shift caused by communication lag; multi-node spatiotemporal collaborative interpolation is achieved through a weighting mechanism, which effectively suppresses abrupt change errors.

[0062] Step 4.2, Integration, Repair, and Optimization To further improve reconstruction accuracy, a dynamic weighted least squares (DWLS)-based method is used to globally optimize the recovered values ​​and minimize the reconstruction error. (25) in, Let be the weighted error objective function (weighted mean square error) for node i over the entire time series, used to measure / optimize the overall accuracy of data recovery. It is a time-weighted factor used to highlight the repair accuracy during critical periods (such as peak load and disturbance phases).

[0063] The optimal recovery solution can be obtained by taking the partial derivative, such that... about Find the partial derivative and set it to zero: (26) in, Let be the optimal recovery result vector for node i, that is, the set of optimal estimates obtained at all times. Let i be the original observation data vector of node i, which is composed of the data at each time step. The data is composed of "target" data used for weighted least squares solutions.

[0064] The optimization process is solved in matrix form, equivalent to generalized linear regression interpolation, which minimizes the overall time series error and automatically adjusts the weight distribution between nodes; the dynamism of DWLS lies in... It can adaptively adjust over time, enabling the algorithm to maintain stable reconstruction even when data fluctuates drastically.

[0065] Step 4.3, Error Constraints and Confidence Interval Correction To ensure the validity and confidence of the reconstructed data, an error constraint mechanism and a weight iterative update strategy were designed. First, the mean squared error of the reconstruction was calculated: (27) like If the result meets the accuracy requirements, the recovery result is valid; otherwise, the weights are updated using gradient descent. (28) in, For learning rate, This represents the sensitivity gradient of the error to the weights. This represents the value of the k-th weight in the t-th iteration (the current weight). This represents the value of the k-th weight in the (t+1)th iteration (the updated weight).

[0066] After updating, the weights need to be normalized again to prevent numerical drift. Through multiple iterations, the weights gradually converge to the optimal distribution, minimizing the recovery error. This process is equivalent to a self-feedback mechanism, enabling the system to have self-correction and self-learning capabilities.

[0067] In addition, to improve the reliability of data recovery, confidence intervals can be further defined. : (29) in, Let be the expected value of the estimated / recovered value of node i. The standard normal distribution is at a confidence level of 1. Critical value under α for The standard deviation is used to characterize the uncertainty of the estimate.

[0068] If the actual observed value If the value falls within this range, the reconstruction is considered reliable; otherwise, an update is triggered.

[0069] Step 5, Global Consistency Verification and State Optimization: Optimize the spatiotemporal consistency and reliability of the recovered data through global consistency verification and error compensation algorithms.

[0070] Step 5.1: Robust Kalman Filter Consistency Estimation Using the recovered time series data as input, dynamic consistency estimation is performed using the system state equation and measurement equation.

[0071] The system state equations are as follows: (30) in, , These are all system state vectors (such as node voltage, current, or power characteristics). Here is the state transition matrix. For the control matrix, For input quantity, For process noise, satisfy , Let be the process noise covariance matrix.

[0072] The measurement equation is as follows: (31) in, For measurement vectors, For the observation matrix, To measure noise, meet the following requirements , To measure the noise covariance.

[0073] Based on the predicted variance Covariance of measurement noise Calculate the Kalman gain: (32) in, Kalman gain; Kalman gain determines the fusion weight of prediction and observation results in the update process, and its magnitude reflects the system's degree of trust in the current measurement data.

[0074] To improve robustness, this invention calculates... Introducing an abnormality suppression term Through dynamic adjustment Achieving adaptive weighted suppression of anomalous residuals: (33) in, This is a robust adjustment factor used to limit the impact of mutation observations; Let R be the adaptive measurement noise covariance matrix at time k, dynamically adjusted according to the residual magnitude. Let k be the prior state estimate at time k. The initial / nominal measurement noise covariance matrix serves as the baseline for adaptive adjustment.

[0075] When the residual When it increases (there may be anomalous observations), Get bigger, and then The increase in size leads to a decrease in the Mann gain, which reduces the weight of the current observation and thus "suppresses" anomalous observations.

[0076] According to the standard update mechanism of Kalman filtering, the update state is as follows: (34) Simultaneously update the covariance matrix: (35) in, Let be the covariance matrix of the posterior state estimate at time k. It is an identity matrix.

[0077] Through the above recursive process, the system can achieve state consistency estimation across the entire network, ensuring that the repaired data satisfies statistical stationarity in both time and space dimensions. When excessive residuals are detected among multiple nodes, the system will trigger an adaptive covariance adjustment mechanism to adaptively suppress abnormal residuals by dynamically adjusting the R and Q matrices.

[0078] Step 5.2, Credibility Assessment After completing the consensus estimation, the nodes are computed. The credibility index is used to assess the credibility of the data quality at each monitoring node; the node The formula for calculating the credibility index is as follows: (36) in, These are measured values. This is the filtered estimate. The maximum value is measured for all nodes and used for normalization; The value range is [0,1], representing the reliability of the measurement results at this node; when When ≈1, it indicates that the observation results of this node are highly consistent with the system state; when When a node is marked as "low confidence," a retraining mechanism is triggered. This is the threshold parameter.

[0079] Step 6, Online Learning and System Deployment: Input the identified and recovered data into the distribution network state estimation module to achieve data closed-loop self-repair and real-time updates.

[0080] Step 6.1: Online Model Update During system operation, new monitoring data is constantly generated. To maintain the model's adaptability to time-varying features and dynamic anomalies, this invention proposes an online learning mechanism based on a sliding time window to update model parameters in real time. The sliding window is based on historical repair data. Dynamically update the weight matrix: (37) in, For the i-th weight at time... The updated value, Let be the current value of the i-th weight at time t. For loss function, Forgetting factor, .

[0081] When the system environment or data distribution changes rapidly, take the smaller value. To improve the model's response speed; when the system state is stable, take a larger value. To enhance model robustness, this update strategy achieves a dynamic balance of "smooth forgetting of old parameters and rapid fusion of new samples," enabling the model to adapt to different stages of operation.

[0082] Step 6.2, Real-time System Embedding The method of this invention is embedded in the "acquisition-transmission-analysis" link of the power grid monitoring master station in a modular manner. The core computing unit is deployed on the edge server or the master station data center, and low-latency computing is achieved through lightweight model compression (such as parameter pruning and quantization). Embedding the method of this invention into the distribution network monitoring master station forms an automatic anomaly detection and self-repair closed loop, realizing real-time data management and high-reliability operation.

[0083] Verification Test like Figure 2 As shown, with the increase in the number of training rounds, the accuracy of the method of this invention in the task of identifying and recovering abnormal data in distribution networks rapidly improves, reaching over 95% within about ten epochs, and then gradually converges and stabilizes at a high level close to 100%. This result demonstrates that, through multi-scale feature extraction, spatiotemporal feature fusion, and joint modeling of the Transformer anomaly identification and recovery mechanism, the method of this invention can accurately identify and effectively recover abnormal data, exhibiting strong fitting ability and stable identification performance.

[0084] like Figure 3 As shown, during the training and update process, the loss function value rapidly decreases from an initial high level, and after several iterations, it stabilizes and remains at a low level close to 0, with only minor fluctuations. This indicates that the model parameters are continuously optimized during the iteration process and eventually achieve good convergence. This phenomenon verifies that the designed loss function and forgetting factor-controlled online update strategy are effective, ensuring the stability and robustness of the anomaly identification and data recovery process.

[0085] This invention's method, through multi-scale time-frequency decomposition and adaptive feature fusion, can accurately identify various anomaly types such as sudden anomalies, gradual drift, and periodic disturbances, improving detection sensitivity and stability. Combining spatiotemporal correlation constraints and a dynamic weighted recovery mechanism, it achieves high-precision data repair and global consistency optimization. Introducing robust Kalman filtering and online learning mechanisms enhances the system's adaptability to multi-source uncertainties, offering advantages such as strong real-time performance, parameter self-learning, and adaptive operation. The overall method possesses strong interpretability, high robustness, and good engineering applicability, providing reliable data support for the safe operation and intelligent dispatch of power distribution networks.

[0086] Example 2 An electronic device includes a memory and a processor, the memory being used to store a program that supports the processor in executing the distribution network anomaly data identification and recovery method based on multi-scale adaptive fusion as described in Embodiment 1, and the processor being configured to execute the program stored in the memory.

[0087] Example 3 A storage medium storing a computer program, which, when run by a processor, executes the steps of the distribution network anomaly data identification and recovery method based on multi-scale adaptive fusion in Embodiment 1.

[0088] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion, characterized in that, Includes the following steps: S1. Based on the multi-scale time-frequency decomposition algorithm, the distribution network measurement signal is preprocessed and multi-scale feature is extracted to obtain the frequency domain and time domain features at each time scale. S2. A multi-scale feature matrix is ​​constructed using a feature fusion strategy. The dynamic fusion of features at different scales is achieved through an adaptive weighting mechanism to obtain the final fused features. S3. Use an improved anomaly detection model to identify and classify fused features, and accurately locate abnormal data and their types; S4. A method for recovering abnormal data in distribution networks based on spatiotemporal correlation and adaptive optimization, which repairs and reconstructs abnormal data to restore its true value; S5. Optimize the spatiotemporal consistency and reliability of the recovered data through global consistency verification and error compensation algorithms; S6. Input the identified and recovered data into the distribution network state estimation module to achieve data closed-loop self-repair and real-time update.

2. The method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion according to claim 1, characterized in that, The multi-scale time-frequency decomposition algorithm mentioned in step S1 is variational mode decomposition, which is used to decompose the preprocessed signal into multiple mode components and extract the root mean square value and kurtosis of each mode as time-domain features, and extract the instantaneous frequency of each mode as frequency-domain features.

3. The method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion according to claim 2, characterized in that, The adaptive weighting mechanism described in step S2 dynamically assigns weights based on the noise intensity of each scale component. The weight calculation formula is as follows: in, For adjustment coefficients, Let be the noise intensity of the k-th component. For the first The noise intensity of each component, The number of modal components; The final fusion feature is represented as follows: in, Let be the final fused feature representation at time t. Let be the eigenvector obtained from the k-th sub-feature source at time t.

4. The method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion according to claim 1, characterized in that, The anomaly detection model described in step S3 uses a Transformer network based on an attention mechanism. It dynamically captures anomaly features by calculating the correlation weights between the query, key, and value matrices, and outputs an anomaly confidence vector to determine the anomaly type.

5. The method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion according to claim 4, characterized in that, The method for obtaining the anomaly confidence vector is as follows: The output layer of the Transformer network is mapped to an anomaly confidence vector through a fully connected network. as follows: in, Let be the anomaly probabilities at time steps 1, 2, ..., i, n, respectively. , It is the Sigmoid activation function. and For training parameters, The output feature vector of the Transformer network at time step i is the deep feature representation of the input data at the corresponding time step; when When this happens, the data point is determined to be abnormal. The threshold value is used.

6. The method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion according to claim 5, characterized in that, The anomaly types include at least one of sensor drift, data mutation, communication interruption, and noise interference.

7. The method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion according to claim 1, characterized in that, The distribution network anomaly data recovery method based on spatiotemporal correlation and adaptive optimization described in step S4 is as follows: Based on the spatiotemporal similarity between nodes, a normalized spatial weight matrix is ​​constructed using the exponential distance kernel function. This matrix is ​​then used to weight and fuse the data of neighboring nodes. A time delay term is introduced to compensate for communication lag, thus achieving the initial recovery of missing data. A dynamic weighted least squares method is used to globally optimize the recovery results, and the accuracy is further improved by minimizing the temporal reconstruction error. The results are verified by calculating the reconstructed mean square error and setting a confidence interval. If the error exceeds the limit, the weights are iteratively updated using the gradient descent method, forming a closed-loop feedback mechanism with self-correction capabilities, thereby ensuring the reliability and adaptability of data recovery.

8. The method for identifying and recovering abnormal data in distribution networks based on multi-scale adaptive fusion according to claim 1, characterized in that, The global consistency check described in step S5 uses robust Kalman filtering and introduces an anomaly suppression term to dynamically adjust the measurement noise covariance in order to suppress the impact of abnormal observations on state estimation.

9. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the distribution network anomaly data identification and recovery method based on multi-scale adaptive fusion as described in any one of claims 1 to 8, and the processor is configured to execute the program stored in the memory.

10. A storage medium storing a computer program, characterized in that, When a computer program is run by a processor, it executes the steps of the method for identifying and recovering abnormal data in a distribution network based on multi-scale adaptive fusion as described in any one of claims 1 to 8.