Data cleaning method and device, electronic equipment and computer readable storage medium
By combining anomaly detection models and cross-validation of physical equations, accurate cleaning of distribution network data is achieved, solving the problem of erroneous cleaning in existing technologies and improving the accuracy and security of data cleaning.
Patent Information
- Application Number
- CN202611439854.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies struggle to effectively distinguish between real physical operational events and data quality defects in power distribution network data cleaning, leading to a high risk of false cleaning and impacting the accuracy of subsequent analysis models and business applications.
By combining the initial anomaly confidence score output by the anomaly detection model with the physical verification factor based on the set physical equation, a joint judgment of data-driven initial judgment and physical mechanism verification is achieved. Cross-verification is performed using electrical topology association information, the joint anomaly confidence score is calculated, and targeted cleaning operations are performed.
It improves the accuracy of abnormal data identification, reduces the risk of real physical operation events being mistakenly cleaned, and ensures the accuracy of data cleaning and engineering security.
Smart Images

Figure CN123178783A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a data cleaning method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] With the advancement of new power system construction, the sources of distribution network operation data are becoming increasingly abundant, forming a multi-source heterogeneous data system that includes high-frequency measurement data from distribution automation or SCADA systems, low-frequency data collected by smart meters, data from transformer monitoring terminals, distributed power source monitoring data, and switch status data. This data forms a crucial foundation for supporting operational applications such as distribution network state estimation, power flow calculation, line loss analysis, low-voltage management, fault diagnosis, and dispatching decision support.
[0003] However, in actual operation, due to factors such as the accuracy of data acquisition devices, communication link quality, terminal clock deviation, sensor drift, electromagnetic interference, and topology maintenance lag, the raw data of the distribution network often contains data quality problems such as missing data, noise, jumps, dead values, timing misalignments, and cross-source inconsistencies. If such data is not effectively identified and cleaned, it can easily affect the accuracy of subsequent analysis models and business applications. Summary of the Invention
[0004] In view of this, the purpose of the embodiments of this application is to provide a data cleaning method, apparatus, electronic device and computer-readable storage medium that can reduce the risk of real physical operation events being mistakenly cleaned.
[0005] In a first aspect, embodiments of this application provide a data cleaning method, comprising: acquiring a primary detection data source and an auxiliary verification data source; performing initial anomaly detection on the primary detection data source using an anomaly detection model to obtain an initial anomaly confidence level; performing physical cross-validation on the primary detection data source using the auxiliary verification data source based on a set physical equation to calculate a physical verification factor; fusing the initial anomaly confidence level and the physical verification factor to calculate a joint anomaly confidence level; and performing targeted cleaning operations on the anomaly data in the primary detection data source based on the joint anomaly confidence level.
[0006] In the above implementation process, by combining the initial anomaly confidence level output by the anomaly detection model with the physical verification factor calculated based on the set physical equation, it is possible to achieve joint judgment of data-driven initial judgment and physical mechanism verification, thereby improving the accuracy of anomaly data identification and reducing the risk of real physical operation events being mistakenly cleared.
[0007] In one embodiment, the step of performing physical cross-validation on the main detection data source based on the set physical equation and using the auxiliary verification data source to calculate the physical verification factor includes: performing physical cross-validation on the main detection data source based on the set physical equation, the auxiliary verification data source, and electrical topology association information to obtain physical residuals; inputting the physical residuals into a nonlinear mapping function to generate the physical verification factor; wherein, the physical verification factor is used to characterize the degree of physical consistency between data sources.
[0008] In the above implementation process, by using electrical topology association information to participate in physical cross-validation and inputting physical residuals into a nonlinear mapping function to generate physical validation factors, it is possible to achieve a quantitative representation of the degree of physical consistency from physical residuals, thereby improving the accuracy and interpretability of physical cross-validation.
[0009] In one embodiment, the anomaly detection model is a multi-branch network based on a gating mechanism; the multi-branch network based on the gating mechanism includes a gating unit, multiple quality defect determination branches, and a fusion output unit; the gating unit is used to calculate the activation weight of each of the quality defect determination branches according to the main detection data source; the fusion output unit is used to perform weighted fusion of the outputs of the multiple quality defect determination branches according to the activation weights, and output the initial anomaly confidence.
[0010] In the above implementation process, the activation weight of each quality defect judgment branch is dynamically calculated by the gating unit and then weighted by the fusion output unit. This enables adaptive selection or combination of quality defect judgment branches for different data formats, thereby improving the targeting and flexibility of initial anomaly detection.
[0011] In one embodiment, the plurality of quality defect determination branches include at least one of the following: missing value detection expert, jump anomaly detection expert, impulse noise detection expert, persistent dead value detection expert, sensor drift detection expert, timing misalignment detection expert, cross-source inconsistency detection expert, and logical contradiction detection expert; wherein, different quality defect determination branches are used to extract quality defect-related features from different perspectives.
[0012] In the above implementation process, by setting up multiple quality defect judgment branches, it is possible to extract quality defect-related features from different perspectives, thereby improving the coverage of different types of quality defects by the initial anomaly detection.
[0013] In one embodiment, after obtaining the main detection data source and auxiliary verification data source within the same electrical connection area in the power distribution network, the method further includes: resampling multiple main detection data sources and auxiliary verification data sources to a unified time base slice; and projecting the resampled main detection data source vector and auxiliary verification data source vector to the unified semantic feature space through a learned feature mapping network to obtain aligned multi-source features.
[0014] In the above implementation process, by resampling data with different sampling frequencies to a unified time reference slice, and projecting data vectors of different dimensions to a unified semantic feature space through a learnable feature mapping network, the alignment of multi-source heterogeneous data under a unified time section and a unified semantic space can be achieved, providing a unified data foundation for initial anomaly detection and physical cross-validation.
[0015] In one embodiment, the step of fusing the initial anomaly confidence level and the physical verification factor to calculate the joint anomaly confidence level includes: determining that the anomaly event belongs to a real physical operation event when the physical verification factor satisfies the physical algebra constraint; and determining that the anomaly event belongs to a data quality defect when the physical verification factor does not satisfy the physical algebra constraint.
[0016] In the above implementation process, the distinction between real physical operation events and data quality defects can be achieved by checking whether the physical verification factor meets the physical algebra constraints. This can decouple the two types of events and prevent the original waveforms of real physical operation events from being accidentally cleaned and destroyed.
[0017] In one embodiment, performing targeted cleaning operations on abnormal data in the main detection data source based on the joint anomaly confidence level includes: suppressing automatic cleaning operations on abnormal data when the abnormal event is determined to be a real physical operation event based on the joint anomaly confidence level; and triggering targeted cleaning and repair of the abnormal data when the abnormal event is determined to be a quality defect based on the joint anomaly confidence level.
[0018] In the above implementation process, by automatically cleaning up abnormal data that is determined to be a real physical operation event and triggering targeted cleaning and repair for abnormal data that is determined to be a quality defect, the targeted execution of cleaning operations can be achieved, thereby improving the engineering security of the data governance process.
[0019] In one embodiment, the method further includes: determining the defect type of the quality defect if the abnormal event is determined to be a quality defect based on the joint anomaly confidence level; and performing adaptive data repair according to the defect type.
[0020] In the above implementation process, by determining the defect type of the quality defect and performing adaptive data repair that matches the defect type, the repair strategy can be matched with the defect characteristics, thereby improving the accuracy of data repair.
[0021] In one embodiment, performing adaptive data repair based on the defect type includes: when the defect type is a jump or missing defect, performing cross-source data interpolation using aligned auxiliary verification data sources; when the defect type is a persistent dead value defect, reconstructing based on temporal correlation and historical data; when the defect type is a temporal deviation defect, determining and correcting the time offset between different data sources using a time delay estimation method; and when the defect type is a neighborhood anomaly defect, determining and correcting the contribution of adjacent reference data sources based on topological correlation and correlation weights.
[0022] In the above implementation process, by adopting corresponding repair methods for different defect types, targeted repair of abnormal data can be achieved, improving the pertinence and reliability of data repair.
[0023] Secondly, embodiments of this application also provide a data cleaning apparatus, comprising: an acquisition module for acquiring a main detection data source and an auxiliary verification data source; an anomaly detection module for performing initial anomaly detection on the main detection data source using an anomaly detection model to obtain an initial anomaly confidence level; a verification module for performing physical cross-verification on the main detection data source based on a set physical equation and using the auxiliary verification data source to calculate a physical verification factor; a calculation module for fusing the initial anomaly confidence level and the physical verification factor to calculate a joint anomaly confidence level; and an execution module for performing targeted cleaning operations on the abnormal data in the main detection data source based on the joint anomaly confidence level.
[0024] In the above implementation process, through the coordinated cooperation of the acquisition module, anomaly detection module, verification module, calculation module and execution module, it is possible to achieve joint judgment of data-driven initial judgment and physical cross-verification, as well as targeted cleaning, thereby improving the accuracy of data cleaning and engineering security.
[0025] Thirdly, embodiments of this application also provide an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method described in the first aspect above, or any possible implementation of the first aspect.
[0026] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the data cleaning method described in the first aspect or any possible implementation of the first aspect.
[0027] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, specific embodiments are described below in conjunction with the accompanying drawings. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A block diagram illustrating an electronic device provided in an embodiment of this application; Figure 2 A flowchart illustrating the data cleaning method provided in this application embodiment; Figure 3 This is a schematic diagram of the functional modules of the data cleaning apparatus provided in an embodiment of this application. Detailed Implementation
[0030] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0031] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0032] Through long-term research, the inventors of this application have discovered that existing methods for anomaly detection or data cleaning to address power or sensor data quality issues have at least the following shortcomings: First, anomaly detection methods based on hybrid expert models, autoencoders, or reconstruction errors primarily rely on statistical distribution deviations to determine anomalies, lacking constraints on the physical operating mechanisms of the power grid. In distribution network scenarios, real short-term faults, rapid load changes, switching operations, or distributed power source fluctuations can also cause abrupt changes in voltage, current, and power curves. If cleaning is based solely on waveform abrupt changes or reconstruction errors, real physical operating events can easily be misjudged as data quality defects, thereby destroying the original operating waveforms and affecting fault assessment and operational analysis.
[0033] Secondly, existing industrial knowledge fusion methods mostly rely on soft constraints at the knowledge graph, rule base, or semantic prompt level, lacking a mechanism to directly embed the physical algebraic equations of the power system into the data quality assessment process. There are clear physical relationships between distribution network operation data, such as the balance between feeder head power and downstream transformer load and line loss, upstream and downstream current consistency, voltage drop along the topology, and consistency between switch status and power flow direction. Existing methods struggle to utilize these physical residuals to verify and arbitrate data-driven anomaly detection results.
[0034] Third, existing methods mostly target single data sources or homogeneous data for anomaly detection, lacking a unified spatiotemporal alignment mechanism for data with different sampling frequencies, units, and timestamp precisions. This makes it difficult to achieve cross-verification between primary and secondary data within a unified time frame and semantic space. When a measurement point experiences communication anomalies or acquisition errors, single-source models are prone to lacking external verification.
[0035] Therefore, how to improve the accuracy, interpretability, and engineering applicability of multi-source heterogeneous data cleaning while reducing the risk of accidental cleaning of real physical operation events is an urgent problem to be solved.
[0036] In view of this, this application proposes a data cleaning method that integrates the initial anomaly confidence level output by the anomaly detection model with the physical verification factor calculated based on the set physical equation. This method can achieve joint judgment of data-driven initial judgment and physical mechanism verification, improve the accuracy of anomaly data identification, and reduce the risk of real physical operation events being mistakenly cleaned.
[0037] To facilitate understanding of this embodiment, the electronic device that performs the data cleaning method disclosed in this application embodiment will first be described in detail.
[0038] like Figure 1 The diagram shown is a block illustration of an electronic device. The electronic device 100 may include a memory 111 and a processor 113. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device 100. For example, the electronic device 100 may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0039] The aforementioned memory 111 and processor 113 are electrically connected to each other directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The aforementioned processor 113 is used to execute executable modules stored in the memory.
[0040] The memory 111 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 111 stores programs, and the processor 113 executes these programs upon receiving execution instructions. The methods executed by the electronic device 100 as defined in any embodiment of this application can be applied to the processor 113, or implemented by the processor 113.
[0041] The aforementioned processor 113 may be an integrated circuit chip with signal processing capabilities. The processor 113 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a digital signal processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor.
[0042] The electronic device 100 in this embodiment can be used to execute various steps in the various methods provided in the embodiments of this application. The implementation process of the data cleaning method is described in detail below through several embodiments.
[0043] Please see Figure 2 This is a flowchart of the data cleaning method provided in the embodiments of this application. The following will describe... Figure 2 The specific process shown will be explained in detail.
[0044] Step 201: Obtain the main detection data source and the auxiliary verification data source.
[0045] In one embodiment, a multi-source time-series raw dataset can be synchronously acquired within the same electrical connection area based on a topological connection model of the power distribution network. This multi-source time-series raw dataset may include a primary detection data source and auxiliary verification data sources.
[0046] The same electrical connection area here can be a feeder, a transformer substation, a low-voltage outgoing line area of a distribution transformer, a feeder branch area, or a local distribution network area that includes a distributed power source access point, etc. The same electrical connection area can be selected according to the actual situation.
[0047] The primary data source refers to the main data source from which data quality assessment and cleaning are performed. In a distribution network scenario, the primary data source can be high-frequency measurement data from the SCADA system at the feeder head end, distribution automation terminal, FTU, DTU, TTU, or station-side measurement devices. This data includes, but is not limited to, three-phase voltage, three-phase current, active power, reactive power, power factor, switch status, protection action signals, and equipment operating status. It typically has a high sampling frequency, such as second-level, minute-level, or event-triggered level.
[0048] Auxiliary verification data sources refer to other data sources used for cross-verification of the main detection data source. In the distribution network scenario, auxiliary verification data sources can be aggregated data from downstream smart meters, transformer monitoring data, distribution transformer terminal data, distributed power source monitoring data, adjacent measurement point data, fault indicator data, or user-side collected data, including but not limited to active power of the distribution area, reactive power of the distribution area, user-side voltage, user-side current, user electricity consumption, distribution transformer load rate, distributed photovoltaic output, energy storage charging and discharging power, adjacent branch current, and fault indication status, etc. They usually have relatively low or different sampling frequencies, such as 5 minutes, 15 minutes, hourly, or event-driven reporting.
[0049] In one embodiment, electrical topology association information between the primary detection data source and the auxiliary verification data source can also be obtained. This electrical topology association information may include the connection relationship between feeders and transformer substations, the affiliation between transformer substations and user meters, the connection relationship between main lines and branch lines, the location of distributed power supply access, switch on / off status, line length and impedance parameters, transformer capacity, phase affiliation, power supply path, and topology change information. This electrical topology association information provides the basis for subsequent physical cross-verification.
[0050] In one embodiment, the electrical topology association information is based on the topological relationship between feeders, transformer areas, users, distributed power sources and switch states, and the features of multiple auxiliary verification data sources are aggregated to form auxiliary comprehensive features corresponding to the main detection data source.
[0051] Optionally, the aggregation methods include, but are not limited to, capacity-weighted aggregation, topological distance-weighted aggregation, historical correlation-weighted aggregation, phase attribution-weighted aggregation, and data source credibility-weighted aggregation.
[0052] Understandably, by acquiring the main detection data source, auxiliary verification data source, and electrical topology association information within the same electrical connection area, the association between the main detection data source and the auxiliary verification data source can be established, providing a data foundation for subsequent joint judgment.
[0053] Step 202: Perform initial anomaly detection on the main detection data source using the anomaly detection model to obtain the initial anomaly confidence level.
[0054] The initial anomaly confidence score refers to the preliminary score for determining data quality defects calculated by the anomaly detection model based on data features. It is used to characterize the probability of a certain type of data quality defect existing at the current time section or current measurement point. This initial anomaly confidence score reflects the preliminary judgment obtained by the data-driven model based on historical statistical distribution, temporal variation characteristics, and cross-source feature relationships. In this embodiment, it is not directly used as the final cleaning basis.
[0055] In one embodiment, the main detection data source can be input into the anomaly detection model. The anomaly detection model can preliminarily determine whether there are data quality defects at the measurement points of the current time section based on the time-series statistical distribution pattern of the data, and output the initial anomaly confidence level.
[0056] Understandably, by using an anomaly detection model to perform initial anomaly detection on the main detection data source, preliminary screening of data quality defects can be achieved, providing a data-driven basis for subsequent physical cross-validation and joint judgment.
[0057] The initial anomaly confidence level mentioned above can be represented as a matrix, vector, or set of label probabilities. The initial anomaly confidence level for the current time-segmented data indicating quality defects. Values ;in, The total number of defined quality defect types. When When the value of a certain dimension approaches 1, the anomaly detection model, based on the time-series statistical distribution of pure data, preliminarily determines that there are serious data quality defects at the measurement points of the current time section.
[0058] Step 203: Based on the established physical equations, use the auxiliary verification data source to perform physical cross-verification on the main detection data source and calculate the physical verification factor.
[0059] Among them, the physical verification factor refers to the quantitative factor generated after cross-verifying the consistency between the main detection data source and the auxiliary verification data source based on the set physical equation, which is used to characterize the degree of physical consistency between data sources.
[0060] Understandably, the initial anomaly confidence score only outputs a preliminary judgment result. For anomaly types such as jumps, sudden drops, sudden increases, and violent fluctuations that may resemble the patterns of real physical operational events, physical cross-validation can be performed for further verification.
[0061] In one embodiment, to prevent the anomaly detection model from misjudging real power grid physical mutations as dirty data, a rigid physical law at the underlying level can be forcibly introduced. The unbalanced residual between the main detection data source and the auxiliary verification data source is calculated based on the set physical equation, and a physical verification factor is generated accordingly.
[0062] It should be understood that by using physical cross-validation based on set physical equations, the verification of whether changes in the main detection data source can be explained by the auxiliary verification data source and electrical topology relationship can provide a physical mechanism constraint basis for joint judgment.
[0063] Step 204: Combine the initial anomaly confidence level and the physical verification factor to calculate the joint anomaly confidence level.
[0064] Among them, the joint anomaly credibility refers to the data quality defect probability score obtained by simultaneously considering data-driven anomaly characteristics and physical consistency constraints, which is used as the basis for the final cleaning, retention or review decision.
[0065] Specifically, the initial anomaly confidence level can be mathematically fused with the physical verification factor to output the final joint anomaly confidence level, thereby decoupling real physical operation events from data quality defects.
[0066] In one embodiment of this application, the joint anomaly confidence level is calculated using the following formula: ; in, The initial anomaly confidence level. This is the physical check factor.
[0067] It should be understood that by mathematically fusing the initial anomaly confidence level with the physical verification factor, a joint scoring of data-driven judgment and physical mechanism verification can be achieved, providing a quantitative basis for distinguishing between real physical operation events and data quality defects.
[0068] Step 205: Based on the joint anomaly confidence level, perform targeted cleaning operations on the abnormal data in the main detection data source.
[0069] Among them, the anomaly detection model outputs the initial anomaly confidence based on the multi-source alignment features, the physical cross-validation outputs the physical verification factor based on the power topology relationship and physical constraints, and the joint decision calculates the joint anomaly confidence based on the two, and outputs the decision to retain, clean or review accordingly.
[0070] For time segments that are jointly identified as having data quality defects, targeted data correction is performed based on the defect type. The corrected values replace the original bad data, and a high-fidelity, high-reliability running dataset is output.
[0071] It should be understood that by performing targeted cleaning based on joint anomaly confidence, it is possible to repair only the data that is determined to have data quality defects, thereby avoiding indiscriminate cleaning from destroying the original waveform of real physical operation events.
[0072] In the above implementation process, by combining the initial anomaly confidence level output by the anomaly detection model with the physical verification factor calculated based on the set physical equation, it is possible to achieve joint judgment of data-driven initial judgment and physical mechanism verification, thereby improving the accuracy of anomaly data identification and reducing the risk of real physical operation events being mistakenly cleared.
[0073] In one possible implementation, step 203 includes: performing physical cross-validation on the main detection data source based on the set physical equation, auxiliary verification data source, and electrical topology association information to obtain physical residuals; and inputting the physical residuals into a nonlinear mapping function to generate physical verification factors.
[0074] The physical verification factor is used to characterize the degree of physical consistency between data sources.
[0075] The physical residuals here may include one or more of the following: active power balance residuals, reactive power balance residuals, current consistency residuals, voltage topology consistency residuals, switching state and topology state consistency residuals.
[0076] Among them, the active power balance residual is calculated based on the active power at the feeder head or main detection point, the active power of the downstream transformer area or auxiliary measurement point, the theoretical line loss, the output of distributed power sources and the charging and discharging power of energy storage. It is used to determine whether the active power change of the main detection data can be explained by the downstream auxiliary data and topology. The reactive power balance residual is calculated based on the reactive power at the main detection point, the reactive power at the downstream auxiliary measurement point, the reactive power loss, and the status of the reactive power compensation device. It is used to help determine abnormal reactive power measurement, abnormal status of the compensation device, or inconsistency of reactive power data across sources. The current consistency residual is calculated based on the main line current, downstream branch line current and switch status, and is used to identify problems such as sudden changes in current measurement, local acquisition anomalies, transformer anomalies or inconsistent branch data. Voltage topology consistency residuals are calculated based on line impedance, topology connection relationships, power flow direction, and upstream and downstream voltage measurements. They are used to identify voltage anomalies, single meter acquisition anomalies, local low voltage events in transformer areas, or errors in topology relationship maintenance. The topology state consistency residual is obtained by verifying the logical relationship between the current switch state, topology power supply path, measurement data and power flow direction. It is used to identify problems such as topology state maintenance errors, abnormal switch states, unsynchronized power supply states and inconsistent power supply paths.
[0077] In one embodiment of this application, taking active power as an example, for time segment t, the measured values (such as active power and reactive power) with strong electrical topology coupling are extracted from the main detection data source and the auxiliary verification data source. The theoretical imbalance residual between the multi-source data is calculated based on Kirchhoff's laws, and the physical residual is calculated using the following formula: ; in, The total active power at the head end. For downstream Active power of each node substation area This represents the total number of downstream nodes. This is a theoretical estimate of line loss based on electrical topology calculations.
[0078] In one embodiment of this application, the physical verification factor is defined as a nonlinear mapping based on the physical residual, and the physical verification factor is calculated using the following formula: ; in, This is the threshold for the normal, permissible measurement error of the feeder. This is the sensitivity adjustment coefficient.
[0079] This formula can be used to determine: if the theoretical physical constraints are perfectly closed (residuals are minimal), then the penalty factor... It strictly approaches 1; if the physical constraints are severely broken, then It decays rapidly, approaching 0.
[0080] The aforementioned physical verification factor is used to characterize the degree of physical consistency between the current primary detection data source and the secondary verification data source. This physical verification factor serves as an important input for the joint anomaly confidence calculation, used to review and correct the initial judgment results of the anomaly detection model.
[0081] It should be understood that when the physical residual is within the allowable error range, the physical verification factor indicates a high degree of physical consistency between the primary detection data source and the secondary verification data source; when the physical residual significantly exceeds the allowable error range, the physical verification factor indicates a significant physical inconsistency between the primary detection data source and the secondary verification data source.
[0082] Understandably, by using electrical topology association information to participate in physical cross-validation and inputting physical residuals into a nonlinear mapping function to generate physical validation factors, it is possible to achieve a quantitative representation of the degree of physical consistency from physical residuals, thereby improving the accuracy and interpretability of physical cross-validation.
[0083] In the above implementation process, by using electrical topology association information to participate in physical cross-validation and inputting physical residuals into a nonlinear mapping function to generate physical validation factors, it is possible to achieve a quantitative representation of the degree of physical consistency from physical residuals, thereby improving the accuracy and interpretability of physical cross-validation.
[0084] In one possible implementation, the anomaly detection model is a multi-branch network based on a gating mechanism.
[0085] In one embodiment, the multi-branch network based on the gating mechanism includes a gating unit, multiple quality defect determination branches, and a fusion output unit.
[0086] The gating unit is used to calculate the activation weight of each quality defect judgment branch based on the main detection data source; the fusion output unit is used to perform weighted fusion of the outputs of multiple quality defect judgment branches based on the activation weights and output the initial anomaly confidence.
[0087] The gating mechanism-based multi-branch network here is used to perform preliminary identification of quality defects in the main detection data source and the auxiliary verification data source, and output the initial anomaly confidence level.
[0088] The initial anomaly confidence score refers to the preliminary score for judging data quality defects calculated by a gating-based multi-branch network based on the main detection data source and the auxiliary verification data source. It is used to characterize the probability of a certain type of data quality defect existing at the current time section or the current measurement point. This initial anomaly confidence score reflects the preliminary judgment obtained by the data-driven model based on historical statistical distribution, temporal variation characteristics, and cross-source characteristic relationships, and is not directly used as the final cleaning basis.
[0089] The aforementioned gating unit receives the main detection data source and the auxiliary verification data source, and dynamically calculates the activation weights of different quality defect judgment branches based on the input main detection data source and auxiliary verification data source. Through the gating unit, the system can adaptively select or combine corresponding branches for different data formats and different anomaly patterns, thereby improving the targeting of the initial identification.
[0090] The fusion output unit is used to perform weighted fusion of the judgment results of each expert branch based on the activation weights output by the gating unit, and output the initial anomaly confidence of various quality defects existing in the current time segment.
[0091] Optionally, the initial anomaly confidence can be represented as a matrix, vector, or set of labeled probabilities to indicate the initial anomaly probability corresponding to different defect types.
[0092] In one embodiment, the multi-branch network based on the gating mechanism only outputs preliminary judgment results. For anomaly types that may be similar to the patterns of real physical operation events, such as jumps, sudden drops, sudden rises, and violent fluctuations, verification can be performed through physical residual cross-validation.
[0093] Understandably, by dynamically calculating the activation weights of each quality defect judgment branch through the gating unit and then performing weighted fusion by the fusion output unit, it is possible to adaptively select or combine quality defect judgment branches for different data formats and different anomaly patterns, thereby improving the targeting and flexibility of initial anomaly detection.
[0094] In the above implementation process, the activation weight of each quality defect judgment branch is dynamically calculated by the gating unit and then weighted by the fusion output unit. This enables adaptive selection or combination of quality defect judgment branches for different data formats, thereby improving the targeting and flexibility of initial anomaly detection.
[0095] In one possible implementation, the multiple quality defect detection branches include at least one of the following: missing value detection expert, jump anomaly detection expert, impulse noise detection expert, persistent dead value detection expert, sensor drift detection expert, timing misalignment detection expert, cross-source inconsistency detection expert, and logical contradiction detection expert.
[0096] Different quality defect determination branches are used to extract quality defect-related features from different perspectives.
[0097] For example, the missing value detection expert is used to identify consecutive null values, zero values occupying space, or data acquisition interruptions; the jump anomaly detection expert is used to identify short-term spikes, drops, or outliers; the persistent dead value detection expert is used to identify data acquisition freeze phenomena where values remain unchanged across multiple consecutive time segments; the time sequence misalignment detection expert is used to identify time offsets between different data sources; and the cross-source inconsistency detection expert is used to identify inconsistencies in the statistical characteristics of primary and secondary data.
[0098] Understandably, by setting up multiple quality defect judgment branches, quality defect-related features can be extracted from different perspectives, thereby improving the coverage of different types of quality defects in the initial anomaly detection.
[0099] In the above implementation process, by setting up multiple quality defect judgment branches, it is possible to extract quality defect-related features from different perspectives, thereby improving the coverage of different types of quality defects by the initial anomaly detection.
[0100] In one possible implementation, after step 201, the method further includes: resampling multiple main detection data sources and auxiliary verification data sources to a unified time reference slice; and projecting the resampled main detection data source vectors and auxiliary verification data source vectors to a unified semantic feature space by learning a feature mapping network to obtain aligned multi-source features.
[0101] Resampling can be performed in the following ways: For high-frequency primary detection data, time-series mean aggregation, maximum value retention, minimum value retention, slope extraction, mutation amplitude extraction, or event-preserving aggregation methods can be used to avoid the loss of short-term mutation information during aggregation. For low-frequency auxiliary verification data, nearest neighbor matching, linear interpolation, cubic spline interpolation, or historical trend estimation methods can be used. For example, cubic spline interpolation or time-series mean aggregation algorithms can be used to resample the high-frequency primary detection data source and the low-frequency auxiliary verification data source onto a unified time base slice.
[0102] In one embodiment, after aligning the multi-source features, different types of data (e.g., voltage, current, active power, reactive power, power factor, load rate, switching status, etc.) can be standardized.
[0103] The standardization process here includes, but is not limited to, normalization, standardization, per-unit conversion, discrete state encoding, missing tag encoding, and data source identifier encoding. After standardization, data with different dimensions, ranges, and representations can enter a unified model input space.
[0104] It should be understood that by resampling data with different sampling frequencies to a unified time reference slice, and by projecting data vectors of different dimensions to a unified semantic feature space through a learned feature mapping network, alignment of multi-source heterogeneous data under a unified time section and a unified semantic space is achieved, providing a unified data foundation for initial anomaly detection and physical cross-validation.
[0105] The aforementioned learning feature mapping network is used to project the main detection data source vector and the auxiliary verification data source vector into a high-dimensional aligned feature vector.
[0106] The high-dimensional aligned feature vectors here are used to represent the unified semantic features between the main detection data source and the auxiliary verification data source within the same time section and the same electrical topology area, providing input for the anomaly detection model and physical cross-verification.
[0107] Optionally, the feature mapping learning network can be implemented using linear mapping, multilayer perceptron, autoencoder, temporal convolutional network, lightweight Transformer network, or a combination thereof. The feature mapping learning network can be configured according to specific circumstances.
[0108] In one embodiment, the feature space alignment mapping can be implemented using a specific learned feature mapping network. The resampled main data vector is... The auxiliary data vector is The pre-trained mapping matrix is used to uniformly project the features into an aligned feature representation, and the feature mapping formula is as follows: ; ; in, The feature alignment weight matrix is the main detection data source. To assist in verifying the feature alignment weight matrix of the data source, and For bias vectors, It is a non-linear activation function. and This is the high-dimensional aligned feature vector after mapping.
[0109] In the above implementation process, by resampling data with different sampling frequencies to a unified time reference slice, and projecting data vectors of different dimensions to a unified semantic feature space through a learnable feature mapping network, the alignment of multi-source heterogeneous data under a unified time section and a unified semantic space can be achieved, providing a unified data foundation for initial anomaly detection and physical cross-validation.
[0110] In one possible implementation, step 204 includes: determining that the abnormal event belongs to a real physical operation event if the physical verification factor satisfies the physical algebra constraint; and determining that the abnormal event belongs to a data quality defect if the physical verification factor does not satisfy the physical algebra constraint.
[0111] Among them, physical algebraic constraints refer to the algebraic relationships that the physical quantities represented by the physical equations should satisfy between the main detection data source and the auxiliary verification data source. Examples include active power balance relationships, reactive power balance relationships, current consistency relationships, voltage topology consistency relationships, and consistency relationships between switching states and power flow direction.
[0112] If the physical verification factor satisfies the physical algebra constraint, it indicates that the physical residual is within the allowable error range, meaning that the main detection data source and the auxiliary verification data source are physically consistent. If the physical verification factor does not satisfy the physical algebra constraint, it indicates that the physical residual significantly exceeds the allowable error range, meaning that the main detection data source and the auxiliary verification data source are physically inconsistent.
[0113] Real physical operation events refer to the actual changes in measured data such as voltage, current, and power caused by changes in the actual operating state of the power grid, including but not limited to rapid load changes, switching operations, short-term fault fluctuations, sudden changes in the output of distributed power sources, and real low voltage events in distribution areas.
[0114] Data quality defects refer to problems with the data itself caused by sensors, communication, or data acquisition links, including but not limited to packet loss, sensor drift, data acquisition freeze, sudden noise, timestamp misalignment, terminal failure, and cross-source data inconsistency.
[0115] It should be understood that distinguishing between real physical operation events and data quality defects by whether the physical verification factor meets the physical algebra constraints can achieve decoupling of the two types of events and avoid the original waveform of real physical operation events being mistakenly cleaned and destroyed.
[0116] In the above implementation process, the distinction between real physical operation events and data quality defects can be achieved by checking whether the physical verification factor meets the physical algebra constraints. This can decouple the two types of events and prevent the original waveforms of real physical operation events from being accidentally cleaned and destroyed.
[0117] In one possible implementation, step 205 includes: suppressing automatic cleaning of abnormal data when the abnormal event is determined to be a real physical operation event based on the joint anomaly confidence level; and triggering targeted cleaning and repair of abnormal data when the abnormal event is determined to be a quality defect based on the joint anomaly confidence level.
[0118] In one embodiment, when the master data undergoes a drastic change, i.e. the initial anomaly confidence is high, but the upstream and downstream physical residuals are closed, i.e. the physical check factor approaches 1, it indicates that a real systemic fault or real operational event, such as a short circuit, has occurred. At this time, the joint anomaly confidence is forcibly suppressed by the physical check factor, the system determines it as a real physical operational event, refuses to perform smoothing and cleaning, and retains the original fluctuation trajectory.
[0119] When a sudden change occurs in the master data, causing a severe imbalance in the power equation (i.e., a huge physical residual and a physical check factor approaching 0), it indicates that the change is a data quality defect caused by local device communication interference. At this time, the joint anomaly confidence remains high, and the system determines it to be a data quality defect and enters the cleaning process.
[0120] In another embodiment, when the initial anomaly confidence level, physical verification factor, auxiliary data integrity, or topological association information is in an uncertain range, automatic cleaning can be temporarily suspended, and verification markers and related evidence can be output.
[0121] The verification markers and related evidence here include, but are not limited to, initial anomaly confidence, physical residuals, joint anomaly confidence, data sources involved in the verification, topological regions, suspected defect types, and recommended handling strategies.
[0122] Understandably, by suppressing automatic cleaning of abnormal data that is determined to be real physical operation events and triggering targeted cleaning and repair of abnormal data that is determined to be quality defects, the targeted execution of cleaning operations can be achieved, thereby improving the engineering security of the data governance process.
[0123] In one embodiment, during the targeted cleaning and repair process, the original value, the corrected value, the defect type, the initial anomaly confidence level, the physical residual, the joint anomaly confidence level, the data source involved in the verification, the cleaning strategy, and the processing time can also be saved to form a traceable data quality governance record, which can be used to support manual review, audit traceability, model optimization, and downstream business application verification.
[0124] After correction, a running dataset with quality labels can be output. These quality labels include, but are not limited to, labels for missing values, jumps, impulse noise, persistent dead values, sensor drift, temporal misalignment, cross-source inconsistencies, preservation of real physical running events, and manual verification.
[0125] In the above implementation process, by automatically cleaning up abnormal data that is determined to be a real physical operation event and triggering targeted cleaning and repair for abnormal data that is determined to be a quality defect, the targeted execution of cleaning operations can be achieved, thereby improving the engineering security of the data governance process.
[0126] In one possible implementation, the method further includes: determining the defect type of the quality defect when the abnormal event is determined to be a quality defect based on the joint anomaly confidence level; and performing adaptive data repair according to the defect type.
[0127] Understandably, by identifying the defect type of a quality defect and performing adaptive data repair that matches the defect type, it is possible to match the repair strategy with the defect characteristics, thereby improving the accuracy of data repair.
[0128] In the above implementation process, by determining the defect type of the quality defect and performing adaptive data repair that matches the defect type, the repair strategy can be matched with the defect characteristics, thereby improving the accuracy of data repair.
[0129] In one possible implementation, adaptive data repair is performed based on the defect type, including: in the case of defects of the jump or missing type, cross-source data interpolation is performed using aligned auxiliary verification data sources; in the case of defects of the persistent dead value type, reconstruction is performed based on temporal correlation and historical data; in the case of defects of the temporal deviation type, time offset between different data sources is determined and corrected using a time delay estimation method; in the case of defects of the neighborhood anomaly type, the contribution of adjacent reference data sources is determined and corrected based on topological correlation and correlation weight.
[0130] Cross-source numerical interpolation here can reconstruct missing, abrupt, or impulse noise data based on auxiliary verification data, historical concurrent load baselines, adjacent time-section data, and topological proximity data. During the interpolation process, the weights of different auxiliary data sources can be determined based on data source reliability, topological distance, historical correlation, phase attribution, and current residual contribution.
[0131] Historical data reconstruction can combine historical data from the same period, holiday types, load levels, transformer capacity, and seasonal characteristics to correct long-term dead values, abnormal drifts, or continuous abnormal segments. This method is suitable for data repair scenarios where auxiliary data is incomplete but historical patterns are relatively stable.
[0132] Timing misalignment correction can be achieved by using cross-correlation analysis, dynamic time warping, or time delay estimation algorithms to determine the time offset between different data sources and to correct the time axis of abnormal data sources. This method is suitable for scenarios where there are timestamp discrepancies between smart meters, photovoltaic inverters, distribution area terminals, or distribution automation terminals.
[0133] Neighborhood-weighted correction can calculate the reference weights of adjacent topology nodes or in-phase neighboring users during the repair process based on topological distance, historical correlation, phase assignment, equipment capacity, and data source reliability. This method is suitable for scenarios such as abnormal voltage on the user side, local anomalies in the transformer area, and abnormal measurement on branch lines.
[0134] Understandably, by adopting appropriate repair methods for different defect types, targeted repair of abnormal data can be achieved, improving the pertinence and reliability of data repair.
[0135] In the above implementation process, by adopting corresponding repair methods for different defect types, targeted repair of abnormal data can be achieved, improving the pertinence and reliability of data repair.
[0136] To facilitate understanding, the data cleaning method in this application embodiment is illustrated below with an example, further demonstrating the technical advantages brought by this application embodiment. Specifically, the example is the joint determination and cleaning of power fluctuation data of a 10kV feeder of a municipal power supply company during the peak summer season: The system collects SCADA measurement data from the feeder's head end as the primary detection data source, with a sampling frequency of 1 minute. The data includes three-phase voltage, three-phase current, active power, and reactive power. Simultaneously, the system collects aggregated data from smart terminals and smart meters in 45 downstream distribution transformer areas as an auxiliary verification data source, with a sampling frequency of 15 minutes. This data includes active power, reactive power, and user-side voltage data for each transformer area. Based on the distribution network topology model, the system establishes the connection relationship between the feeder's head end and the 45 downstream transformer areas, and obtains information on line length, line loss estimation parameters, transformer capacity, and power supply path.
[0137] Since SCADA data is granular at 1-minute intervals while downstream transformer data is granular at 15-minute intervals, the system employs an event-preserving aggregation method to align the SCADA data to a 15-minute timeframe. During aggregation, in addition to calculating the mean, features such as maximum and minimum values, abrupt change magnitude, maximum slope, and duration are retained to prevent the loss of short-term abrupt change information. Subsequently, the system inputs the primary detection data and auxiliary verification data into a feature mapping network to obtain primary and auxiliary aligned features at the same timeframe. These aligned features are simultaneously input into anomaly detection and physical cross-validation.
[0138] For the time segment where a power drop occurred, the anomaly detection model detected a significant deviation between the active power drop at the feeder's head end and the historical stable load distribution. The gating unit activated the jump anomaly detection expert and the impulse noise detection expert, and the system output an initial anomaly confidence level of 0.96 for the jump-type quality defect. This result indicates that, from the perspective of data pattern and historical statistical distribution, there is a high probability of a jump-type quality defect at this time segment. However, this result does not directly trigger cleaning; it still needs to enter the physical residual cross-validation stage.
[0139] Operating Condition A: Possible Real-World Physical Event. At the first sudden drop in power, the system extracts the active power at the feeder's head end and sums it up with the total active power of the 45 downstream transformer substations, while also factoring in theoretical line losses. The system calculations reveal that although the power at the feeder's head end experiences a sudden drop, the aggregated power in the downstream transformer substations also decreases synchronously in the same direction within the same timeframe. The active power balance residual is within the allowable error threshold, and the reactive power and current consistency residuals show no significant anomalies. The system obtains a physical verification factor α = 0.98. The joint anomaly confidence level is 0.0192.
[0140] Since the reliability of the joint anomaly is lower than the cleaning trigger threshold, the system determines that the sudden drop in this time segment is more likely to be a real physical operational event, such as load shedding, switching operation, or short-term fault fluctuation. The system suppresses automatic cleaning, preserves the original waveform, and generates an event preservation flag.
[0141] Condition B: Data quality defects. At the second sudden drop time segment, the anomaly detection model also outputs a high initial anomaly confidence level of 0.96 for the jump type. However, physical residual cross-validation revealed a sharp drop in active power at the feeder's head end, while the aggregated power of the 45 downstream transformer substations remained stable at a high load, without a synchronous decrease. At this point, the active power balance residual increased significantly, indicating that this sudden change could not be explained by actual downstream load variations. The system obtained a physical verification factor α = 0.05. The joint anomaly confidence level was 0.912.
[0142] Since the reliability of the joint anomaly is higher than the cleaning trigger threshold, the system determines that the sudden drop in this time section is more likely caused by packet loss in the communication of the feeder head acquisition terminal, interference from the current transformer, or an anomaly in the local acquisition link, and enters the cleaning state.
[0143] For the time segment identified as having a data quality defect in operating condition B, the system invokes adaptive data repair. Utilizing the auxiliary aggregated power from 45 downstream transformer areas, historical load curves for the same period, and load trends from adjacent time segments, the system reconstructs and corrects the abnormal drop value at the feeder head. The system outputs the corrected feeder head power value, while retaining the original value, corrected value, defect type, initial anomaly confidence level, physical verification factor, joint anomaly confidence level, data sources involved in the verification, and cleaning strategy, forming a traceable data quality governance record.
[0144] Continuing with the example of identifying and cleaning abnormal voltage data on the user side during low-voltage management analysis in a certain transformer area: The system collects the user's smart meter voltage data as the primary detection data source, with a sampling period of 15 minutes. Simultaneously, the system collects the following auxiliary verification data sources: transformer substation outlet voltage; voltage of adjacent users in the same phase; total load of the substation; transformer load rate; three-phase imbalance; voltage of other users on the same branch line; and substation topology and phase assignment. Through the above data collection, the system forms a multi-source data set with user voltage as the primary detection object and substation and adjacent user data in the same phase as auxiliary verification bases.
[0145] The system uses a 15-minute timeframe to align user-side voltage, transformer outlet voltage, voltage of adjacent users in the same phase, transformer load rate, and three-phase imbalance. Subsequently, the system uses a feature mapping network to map single-user voltage curves, voltage curves of adjacent users in the same phase, and transformer operating status data to a unified semantic alignment space, forming primary and secondary aligned features under the same timeframe.
[0146] The anomaly detection model detected that the user's voltage was below the low voltage threshold at multiple consecutive sampling points, and the waveform showed a significant decrease compared to the same period in history. The jump anomaly detection expert was activated, and the system output a high initial anomaly confidence level of 0.91. This result indicates that, based on the user's own voltage curve and historical statistical characteristics, the current segment has a high probability of being an anomaly. However, whether this segment is a genuine low voltage event or a single meter data quality defect requires further judgment by combining data from the entire transformer area and neighboring users in the same phase.
[0147] The system enters the physical residual cross-verification process to compare the relationship between the user's voltage change and the transformer area outlet voltage, the voltage of adjacent users in the same phase, the transformer area load rate, and the three-phase imbalance.
[0148] Condition A: Real-world low-voltage operation event. If the voltage of multiple neighboring users in the same phase drops synchronously, the output voltage of the transformer substation also shows a downward trend, and the load factor of the substation increases, it indicates that the voltage anomaly is consistent with the overall operating status of the substation. In this case, the physical verification factor is high, for example, α = 0.90. The confidence level of the joint anomaly is suppressed to 0.091 by the physical verification factor.
[0149] Since the reliability of the joint anomaly is low, the system determines that the segment is more likely to be a real low-voltage operation event, does not perform cleaning, retains the original voltage curve, and outputs a low-voltage event label for subsequent low-voltage governance analysis.
[0150] Condition B: Single-meter data quality defect. If only the voltage of this user experiences a sudden drop, while the voltages of adjacent users in the same phase, the outlet voltage of the transformer area, the load factor of the transformer area, and the three-phase imbalance remain normal, it indicates that the anomaly lacks physical support from the transformer area side and the user side in the same phase. It is more likely caused by a single-meter data acquisition anomaly, a communication link problem, or a meter failure. In this case, the physical verification factor is low, for example, α = 0.12. The confidence level of the joint anomaly is 0.8008.
[0151] Because the joint anomaly has a high degree of reliability, the system determines that the segment belongs to a data quality defect and enters the cleaning state.
[0152] For voltage segments identified as having single-meter data quality defects, the system reconstructs and corrects them using voltages of adjacent users in the same phase, transformer outlet voltages, historical voltage curves for the same period, and voltage values from adjacent time sections. The system outputs the corrected user voltage curves while retaining the original values, corrected values, defect type, initial anomaly confidence level, physical verification factor, joint anomaly confidence level, data sources involved in the verification, and low-voltage event determination results.
[0153] Based on the same application concept, this application also provides a data cleaning device corresponding to the data cleaning method. Since the principle of the device in this application is similar to that of the aforementioned data cleaning method, the implementation of the device in this application can refer to the description in the above method embodiments, and the repeated parts will not be described again.
[0154] Please see Figure 3 This is a functional module diagram of the data cleaning apparatus provided in this application embodiment. Each module in the data cleaning apparatus of this embodiment is used to execute the steps in the above method embodiments. The data cleaning apparatus includes an acquisition module 301, an anomaly detection module 302, a verification module 303, a calculation module 304, and an execution module 305; wherein, The acquisition module 301 is used to acquire the main detection data source and the auxiliary verification data source.
[0155] The anomaly detection module 302 is used to perform initial anomaly detection on the main detection data source through the anomaly detection model to obtain an initial anomaly confidence level.
[0156] The verification module 303 is used to perform physical cross-verification on the main detection data source based on the set physical equation and the auxiliary verification data source, and calculate the physical verification factor.
[0157] The calculation module 304 is used to fuse the initial anomaly confidence and the physical verification factor to calculate the joint anomaly confidence.
[0158] The execution module 305 is used to perform targeted cleaning operations on the abnormal data in the main detection data source based on the joint anomaly confidence level.
[0159] In the above implementation process, through the coordinated cooperation of the acquisition module, anomaly detection module, verification module, calculation module and execution module, it is possible to achieve joint judgment of data-driven initial judgment and physical cross-verification, as well as targeted cleaning, thereby improving the accuracy of data cleaning and engineering security.
[0160] In one possible implementation, the verification module 303 is specifically used to: perform physical cross-verification on the main detection data source based on the set physical equation, auxiliary verification data source, and electrical topology association information to obtain physical residuals; input the physical residuals into a nonlinear mapping function to generate the physical verification factor; wherein, the physical verification factor is used to characterize the degree of physical consistency between data sources.
[0161] In one possible implementation, the data cleaning device further includes an alignment module for resampling multiple primary detection data sources and auxiliary verification data sources to a unified time reference slice; and projecting the resampled primary detection data source vectors and auxiliary verification data source vectors to the unified semantic feature space by learning a feature mapping network to obtain aligned multi-source features.
[0162] In one possible implementation, the calculation module 304 is specifically used to: determine that the abnormal event belongs to a real physical operation event when the physical verification factor satisfies the physical algebra constraint; and determine that the abnormal event belongs to a data quality defect when the physical verification factor does not satisfy the physical algebra constraint.
[0163] In one possible implementation, the execution module 305 is specifically configured to: suppress automatic cleaning of abnormal data when the abnormal event is determined to be a real physical operation event based on the joint anomaly confidence level; and trigger targeted cleaning and repair of the abnormal data when the abnormal event is determined to be a quality defect based on the joint anomaly confidence level.
[0164] In one possible implementation, the data cleaning apparatus further includes a repair module, used to determine the defect type of the quality defect when the abnormal event is determined to be a quality defect based on the joint anomaly confidence level; and to perform adaptive data repair according to the defect type.
[0165] In one possible implementation, the repair module is specifically used for: when the defect type is a jump or missing defect, performing cross-source data interpolation using an aligned auxiliary verification data source; when the defect type is a persistent dead value defect, reconstructing based on temporal correlation and historical data; when the defect type is a temporal deviation defect, determining and correcting the time offset between different data sources using a time delay estimation method; and when the defect type is a neighborhood anomaly defect, determining and correcting the contribution of adjacent reference data sources based on topological correlation and correlation weights.
[0166] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the data cleaning method described in the above method embodiments.
[0167] The computer program product of the data cleaning method provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the data cleaning method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0168] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0169] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0170] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0171] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0172] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data cleaning method, characterized in that, include: Obtain the main detection data source and the auxiliary verification data source; The initial anomaly confidence level is obtained by performing initial anomaly detection on the main detection data source using an anomaly detection model. Based on the established physical equations, the auxiliary verification data source is used to perform physical cross-verification on the main detection data source, and the physical verification factor is calculated. The joint anomaly confidence level is calculated by combining the initial anomaly confidence level and the physical verification factor. Based on the joint anomaly confidence level, a targeted cleaning operation is performed on the abnormal data in the main detection data source.
2. The method according to claim 1, characterized in that, The process of performing physical cross-validation on the main detection data source based on the established physical equations and using the auxiliary verification data source to calculate the physical verification factor includes: Based on the established physical equations, auxiliary verification data sources, and electrical topology association information, physical cross-verification is performed on the main detection data source to obtain physical residuals. The physical residual is input into a nonlinear mapping function to generate the physical verification factor; wherein the physical verification factor is used to characterize the degree of physical consistency between data sources.
3. The method according to claim 1, characterized in that, in, The anomaly detection model is a multi-branch network based on a gating mechanism; The multi-branch network based on the gating mechanism includes a gating unit, multiple quality defect determination branches, and a fusion output unit; The gating unit is used to calculate the activation weight of each quality defect determination branch based on the main detection data source; The fusion output unit is used to perform weighted fusion of the outputs of multiple quality defect determination branches according to the activation weight, and output the initial anomaly confidence level.
4. The method according to claim 3, characterized in that, in, The multiple quality defect detection branches include at least one of the following: missing value detection expert, jump anomaly detection expert, impulse noise detection expert, persistent dead value detection expert, sensor drift detection expert, timing misalignment detection expert, cross-source inconsistency detection expert, and logical contradiction detection expert. Different quality defect determination branches are used to extract quality defect-related features from different perspectives.
5. The method according to claim 1, characterized in that, After obtaining the main detection data source and auxiliary verification data source within the same electrical connection area in the distribution network, the method further includes: The multiple primary detection data sources and the auxiliary verification data sources are resampled to a unified time base slice; By learning a feature mapping network, the resampled main detection data source vector and auxiliary verification data source vector are projected onto the unified semantic feature space to obtain aligned multi-source features.
6. The method according to claim 1, characterized in that, The calculation of joint anomaly confidence by fusing the initial anomaly confidence score and the physical verification factor includes: If the physical verification factor satisfies the physical algebra constraint, the abnormal event is determined to be a real physical operation event. If the physical check factor does not satisfy the physical algebra constraint, the abnormal event is determined to be a data quality defect.
7. The method according to claim 6, characterized in that, The step of performing targeted cleaning operations on abnormal data in the main detection data source based on the joint anomaly confidence level includes: If the abnormal event is determined to be a real physical operation event based on the joint anomaly confidence level, the automatic cleaning operation of the abnormal data is suppressed. If the abnormal event is determined to be a quality defect based on the joint anomaly confidence level, targeted cleaning and repair of the abnormal data is triggered.
8. The method according to claim 6, characterized in that, The method further includes: If the abnormal event is determined to be a quality defect based on the joint anomaly confidence level, then the defect type of the quality defect is determined. Perform adaptive data repair based on the defect type.
9. The method according to claim 8, characterized in that, The step of performing adaptive data repair based on the defect type includes: In the case where the defect type is a jump or missing type defect, cross-source data interpolation is performed using the aligned auxiliary verification data source. In the case where the defect type is a persistent dead value defect, reconstruction is performed based on temporal correlation and historical data; In the case where the defect type is a timing deviation defect, a time delay estimation method is used to determine and correct the time offset between different data sources; In the case of a neighborhood anomaly defect, the contribution of adjacent reference data sources is determined based on topological association and correlation weights for correction.
10. A data cleaning apparatus, characterized in that, include: The acquisition module is used to acquire the main detection data source and the auxiliary verification data source; The anomaly detection module is used to perform initial anomaly detection on the main detection data source through an anomaly detection model to obtain an initial anomaly confidence level; The verification module is used to perform physical cross-verification on the main detection data source based on the set physical equation and the auxiliary verification data source, and calculate the physical verification factor. The calculation module is used to fuse the initial anomaly confidence level and the physical verification factor to calculate the joint anomaly confidence level; The execution module is used to perform targeted cleaning operations on the abnormal data in the main detection data source based on the joint anomaly confidence level.
11. An electronic device, characterized in that, include: Processor, memory, the memory storing machine-readable data that the processor can execute. The read instruction, when the electronic device is running, performs the steps of the method as described in any one of claims 1 to 9 when the machine-readable instruction is executed by the processor.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method as described in any one of claims 1 to 9.
