Electric meter measurement error correction method and system based on time sequence anomaly detection and electric meter

By using a metering error correction method based on time-series anomaly detection, and by filtering data using a suspicion function, fusing multiple algorithms, and online learning, real-time and accurate detection of multi-source heterogeneous data is achieved. This solves the problem of identifying power load anomalies in multiple sources and scenarios, and improves the efficiency of power grid operation and maintenance and system stability.

CN120951224BActive Publication Date: 2025-12-30LIYANG HUAPENG ELECTRIC POWER METER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511470425.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2025-12-30
Estimated Expiration
2045-10-15

AI Technical Summary

Technical Problem

Existing anomaly detection technologies are unable to promptly identify and classify power consumption anomalies under conditions of multi-source heterogeneity, high-frequency large-scale data, and real-time changing load patterns, leading to false alarms or missed detections, which affects the safe and economical operation of the power grid.

Method used

A metering error correction method based on time-series anomaly detection is adopted. Data is filtered by a suspicion degree function, and multiple algorithms are combined with online learning. By utilizing differential parameter sharing and global aggregation, a lightweight model is deployed to improve real-time performance and reliability.

Benefits of technology

Significantly reduce false alarm and false alarm rates, improve grid operation and maintenance efficiency, adapt to diverse changes in load behavior, and ensure the safe and economical operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120951224B_ABST
    Figure CN120951224B_ABST
Patent Text Reader

Abstract

The application discloses a metering error correction method and system based on time sequence anomaly detection and a meter, relates to the technical field of metering error correction of meters, and proposes an intelligent anomaly detection method fusing multi-source data preprocessing, online learning and federal cooperation for a power system coexisting with distributed energy and diversified loads. In the first step, a suspiciousness function is used to dynamically filter and cache original data and output high-quality input. In the second step, online learning is performed through multi-algorithm fusion and expert knowledge constraint to realize accurate determination of traditional and emerging modes. In the third step, based on difference parameter sharing and global aggregation, multi-region collaborative gain is realized. In the fourth step, a feedback evaluation and model distillation are used to deploy a light-weight model at an edge end, so that the real-time performance and reliability are improved. As a result, the false alarm rate and the missing alarm rate can be significantly reduced, the diversified changes of load behaviors can be effectively adapted, the power grid operation and maintenance efficiency is improved, and data privacy and security and cooperation are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity meter measurement error correction technology, specifically to an electricity meter measurement error correction method, system, and electricity meter based on timing anomaly detection. Background Technology

[0002] In modern power systems, with the widespread integration of distributed energy resources and the rapid development of various types of loads (such as electric vehicle charging, rooftop photovoltaics, and energy storage devices), electricity consumption behavior is exhibiting highly complex characteristics and interwoven across multiple spatiotemporal scales. Taking urban residential areas as an example, concentrated charging of electric vehicles at night can boost loads during off-peak hours, and high-penetration photovoltaic areas may experience significant grid injection or even backfeeding at midday. Simultaneously, industrial users' production activities fluctuate frequently, and commercial users' electricity demand exhibits strong seasonality or holiday characteristics. The superposition of these multiple factors leads to new characteristics in load curves, such as nonlinearity, multiple peak values, and rapid abrupt changes, significantly increasing load uncertainty. Because power systems require stable operation, operators must not only monitor massive amounts of metering data but also combine external environmental data, such as meteorological information and industrial activity data, to help determine the rationality of actual load changes. This multi-source, heterogeneous, and dynamically interactive scenario presents entirely new challenges to traditional single-data-source dependence and static analysis methods.

[0003] Against this backdrop, existing anomaly detection technologies often struggle to achieve consistently stable detection performance when faced with multi-source heterogeneous, high-frequency, large-scale data and real-time changing load patterns. In particular, when concept drift or extreme load patterns occur, offline models based on historical experience are prone to high false alarms or serious missed detections.

[0004] The core technical challenge lies in how to promptly identify and classify genuine power consumption anomalies amidst constantly emerging new load patterns and fault scenarios, while simultaneously ensuring data privacy and real-time performance in large-scale deployments across multiple regions. Improper handling of this issue can lead to maintenance personnel being overwhelmed by numerous false alarms or overlooking critical fault hazards, and can also undermine user trust in smart metering and distributed dispatch systems, further increasing the power company's maintenance and management costs. This technical challenge is even more pronounced in complex, high-concurrency application scenarios: for example, peak loads caused by widespread electric vehicle charging, if not effectively monitored and identified, could lead to localized grid overload or even equipment damage; in areas with high-penetration distributed photovoltaic systems, if abnormal values ​​from metering equipment are not effectively corrected over a long period, it can cause errors in electricity billing and distribution network dispatching, thereby affecting the safe and economical operation of the system.

[0005] Therefore, the technology for real-time detection and intelligent judgment of power load anomalies from multiple sources and in multiple scenarios has become a core challenge that the power industry urgently needs to overcome in its digital upgrade. Summary of the Invention

[0006] (a) Technical problems to be solved

[0007] To address the shortcomings of existing technologies, this invention provides a method, system, and meter for correcting metering errors based on time-series anomaly detection. It employs a suspicion degree function to dynamically filter and cache raw data, outputting high-quality input; utilizes multi-algorithm fusion and expert knowledge constraints for online learning to accurately determine traditional and emerging patterns; achieves multi-regional collaborative gains based on differential parameter sharing and global aggregation; and deploys lightweight models at the edge using feedback evaluation and model distillation to improve real-time performance and reliability. In summary, this significantly reduces false alarm and false negative rates, effectively adapts to diverse load behavior changes, and improves power grid operation and maintenance efficiency; it also solves the technical problems described in the background section.

[0008] (II) Technical Solution

[0009] To achieve the above objectives, the present invention provides the following technical solution:

[0010] A method for correcting metering errors based on timing anomaly detection includes,

[0011] When multi-source heterogeneous data access is detected and the noise risk is higher than expected, the edge-side preliminary filtering component is invoked to identify and remove invalid data using a suspiciousness function. Metadata is recorded through block caching and data identification to form preprocessed data.

[0012] Unsupervised detection and CNN / LSTM feature extraction are performed to generate multi-dimensional scores for each record and produce fusion judgment values. After determining the initial abnormal labels, the fusion weight matrix and deep detection model parameters are iteratively updated using an online learning mechanism.

[0013] When a region obtains incremental information or confirms a new fault sample, the update information of each node is merged through anonymization and incremental upload. The global model parameters are generated by weighted aggregation using a positive semidefinite matrix, and each region is allowed to refine the parameters locally based on its own business rules.

[0014] When the hierarchical evaluation function detects a high false alarm rate or false negative rate for a certain type and triggers an operation and maintenance alarm, the fusion weights or federated increments are corrected through multi-dimensional backhaul. The deep model is compressed into a student model by teacher-student distillation and pruning, and then deployed to the edge.

[0015] Furthermore, when continuous access to multi-source heterogeneous data is detected, an adjustable sensitivity coefficient is set to initially filter invalid readings, a corresponding metadata directory is established, and a unique identifier is created for each data item to synchronously record metadata information.

[0016] Furthermore, by using block caching to archive the preprocessed data, when the suspicion level is higher than a preset threshold, it is marked or removed; the filtered and retained data is block-cached according to time periods to form a cache set and retain the corresponding metadata records.

[0017] Furthermore, feature extraction and time series reconstruction are performed on the preprocessed data and its metadata;

[0018] After evaluating the sequence prediction or reconstruction error by the pre-built unsupervised detection module and deep learning detection module, the scoring vectors are output separately and then merged into an anomaly scoring vector. The fusion function outputs a fusion judgment value. If the fusion judgment value is greater than the judgment threshold, the data is marked as a suspected anomaly.

[0019] Furthermore, for data marked as suspected abnormal or normal, an online learning strategy is introduced to iteratively correct the fusion weight matrix and deep detection model parameters, and power grid expert experience and physical constraints are introduced to correct some detection results.

[0020] Furthermore, when any region receives incremental information or detects a new fault type, it shares the incremental information with other regions through anonymization. When a region receives incremental information or a new anomaly feature summary shared by other regions, it performs local rapid verification.

[0021] If a similar anomaly occurs in its own dataset, the corresponding region will locally load the differential parameters provided by the other party. If no similar scenario is matched, it will be stored in the local cache.

[0022] Furthermore, the incremental parameters of each region are weighted using a positive semidefinite matrix and aggregated into global model parameters. Each region then refines the global model locally based on its local business rules.

[0023] After the global model is aggregated, each node will perform several rounds of localized fine-tuning of the global model based on its own unique load characteristics or anomaly patterns.

[0024] Furthermore, the anomaly detection results are evaluated from multiple dimensions, and the false positive rate and false negative rate are output according to the evaluation function. If any of the indicators exceeds the preset threshold, the feedback process is triggered, and the corresponding data identifier is sent back to the online learning module or federated server for different levels of correction, including lightweight correction, federated correction and data collection strategy optimization.

[0025] Furthermore, the distillation process is invoked to perform teacher-student comparisons on the high-dimensional deep model and the lightweight model. The model size is reduced and a simplified model is generated through pruning and weight merging. This simplified model is then deployed at different levels of the edge to achieve real-time decision-making in constrained scenarios.

[0026] A metering error correction system based on timing anomaly detection includes,

[0027] When the data processing unit detects multi-source heterogeneous data access and the noise risk is higher than expected, it calls the edge-side preliminary filtering component to use the suspicion degree function to identify and remove invalid data, and records metadata through block caching and data identification to form preprocessed data.

[0028] The judgment unit performs unsupervised detection and CNN / LSTM feature extraction, generates multi-dimensional scores for each record and produces a fusion judgment value, and after determining the initial abnormal label, it uses an online learning mechanism to iteratively update the fusion weight matrix and deep detection model parameters.

[0029] The adaptive update unit merges the update information of each node through anonymization and incremental uploading when a region obtains incremental information or confirms a new fault sample. It generates global model parameters by weighted aggregation of semi-positive definite matrices and allows each region to refine the parameters locally based on its own business rules.

[0030] The feedback adjustment unit, when the hierarchical evaluation function detects a high false alarm rate or false negative rate and triggers an operation and maintenance alarm, corrects the fusion weights or federated increments through multi-dimensional backhaul, and compresses the deep model into a student model for deployment to the edge by means of teacher-student distillation and pruning.

[0031] An electricity meter includes at least one processor;

[0032] A memory for storing executable instructions that are executed by at least one of the processors to cause the at least one of the processors to perform the steps of the intelligent manufacturing advanced planning and scheduling method.

[0033] (III) Beneficial Effects

[0034] This invention provides a method, system, and meter for correcting metering errors based on timing anomaly detection, which has the following beneficial effects:

[0035] By closely integrating four key aspects—multi-source data access and dynamic preprocessing, adaptive anomaly detection and online learning, federated learning and cross-regional collaborative enhancement, and dynamic decision feedback and model compression deployment—the accuracy and scalability of power system anomaly detection are comprehensively improved. Specifically:

[0036] Based on raw data The filtering and suspiciousness functions, combined with identifiers A dynamic fusion and block caching mechanism for multi-source data was established to output preprocessed data. This data is used for the second step of model training to ensure data quality and traceability.

[0037] In depth detection model parameters With the fusion weight matrix Based on this, through the fusion function It is compatible with unsupervised scoring methods such as clustering and isolated forests, as well as deep features of CNN / LSTM, enabling the detection model to evolve online. This not only enhances the accuracy of judging traditional load patterns, but also captures abnormal signs in emerging patterns in a timely manner.

[0038] By anonymizing and differentially sharing the regional incremental parameters, and employing matrix correction and local refinement, the global model can simultaneously absorb knowledge from multiple regions while retaining personalized features, forming a cross-node synergistic gain of "1+1>2".

[0039] By leveraging multidimensional evaluation functions and hierarchical backhaul, false alarm and missed detection information can be corrected in a timely manner; and by using teacher-student distillation and pruning strategies, the massive model can be deployed to the edge in a lightweight manner, enabling real-time response in high-concurrency scenarios.

[0040] Overall, by constructing a continuously iterative closed-loop detection system, significant synergistic advantages are demonstrated in distributed applications while ensuring the safety, accuracy, and resilience of the power system. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of the metering error correction method based on timing anomaly detection of the present invention.

[0042] Figure 2 This is a schematic diagram of the metering error correction system based on timing anomaly detection of the present invention. Detailed Implementation

[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and 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.

[0044] Please see Figure 1 This invention provides a method for correcting metering errors based on timing anomaly detection, including:

[0045] Step 1: When multi-source heterogeneous data is detected When there is continuous access and a high risk of noise, the edge-side preliminary filtering component is invoked to apply the suspicion function. Identify and remove invalid reads through block caching and data identification. Perform metadata recording to form preprocessed data. This ensures that subsequent model training has high-quality, traceable, and context-sensitive data input, thus providing a stable foundation for online learning and federated collaboration;

[0046] Step one includes the following:

[0047] Step 101: Unified Access and Labeling of Multi-Source Data

[0048] For external data such as electricity metering data, meteorological data, industry activity information, and holiday schedules, unified access adapters are established to ensure that multi-source heterogeneous data can be acquired under the same time index; the collected raw data are uniformly named in this solution. ,in: Represents a timestamp; An index number indicating the data source (e.g., meter ID, weather station number, industrial load monitoring point identifier, etc.);

[0049] In the original data After integration, a corresponding metadata directory will be created for it. Metadata catalog Record the sampling frequency, sensor status, data validity period, and other attribute information corresponding to the data, and use a unique identifier. Bind it to the original data;

[0050] Through metadata catalog Recording sampling strategies and sensor status enables rapid identification of potential sources when suspected anomalies or deviations occur, significantly improving the efficiency of data error investigation and correction. By incorporating both time and data source dimensions into the identification system, the stability and consistency of data references can be guaranteed even in scenarios with large-scale parallel access from multiple data sources, laying the foundation for subsequent data sharing in distributed or federated environments.

[0051] Step 102, Advanced Dynamic Data Filtering and Caching

[0052] After completing the raw data After multi-source integration and metadata tagging, the raw data is subjected to advanced filtering, dynamic caching, and traceability management based on these tags to output preprocessed data. For subsequent use; of which:

[0053] To eliminate obviously invalid readings or noise, a doubtfulness function is introduced, where:

[0054] Indicates the timestamp and data source index The raw electricity metering data (or other relevant main variables) collected below; Indicates targeting the data source ,time The dynamic threshold or benchmark information is used to reflect the adaptation to the external environment (meteorology, holidays, industrial activities, etc.) in a multi-source environment;

[0055] The sensitivity coefficient, representing the susceptibility function, is a positive real constant and can be within a certain range (e.g., Configure according to the needs of the scenario; This represents the discrete time step or sampling interval, used for normalization when calculating the time derivative (or difference); based on this, the coupling feature vector is defined. and an adjustable weight matrix :

[0056]

[0057] By incorporating the original data and dynamic thresholds into the same computational structure using a 2D vector approach, the calculation of suspicion can take into account both drastic changes in the main variable itself and changes in the threshold baseline.

[0058]

[0059] in These are the weights assigned to the main data mutation portion and the threshold mutation portion, respectively. ;

[0060] Since the data is usually in discrete time steps For data acquisition, you can first define the discrete-time derivative (difference) operator. for:

[0061]

[0062] This operator can be understood as an operation on vectors. The rate of change estimate between adjacent sampling points, after expansion:

[0063]

[0064] In obtaining Then, it is converted into a scalar mutation magnitude using the following formula:

[0065]

[0066] in: The diagonal weighted matrix mentioned above is used to... As a regulating factor;

[0067] We obtain a non-negative real number, representing the values ​​under different weights. The changes are comprehensive.

[0068] In this way, This simultaneously characterizes the relative change intensity of the main variable and the dynamic threshold between adjacent time points, and through... and It allows for flexible differentiation of attention levels.

[0069] After obtaining the mutation magnitude Then, the suspiciousness function is defined as follows:

[0070]

[0071] when A larger value means that both the original data and its corresponding threshold have fluctuated significantly at that moment. Under the amplification effect, It will grow exponentially, which is used to indicate significant anomalies or extremely high suspicion.

[0072] when When approaching 0, It will approach 1, indicating that the fluctuation range is relatively stable or tolerable.

[0073] in: Two-dimensional vector ; It is a discrete difference operator; Indicates to A comprehensive measure of mutation intensity over time;

[0074] When the degree of suspicion When the value exceeds the preset threshold, it indicates that the original data has undergone a significant change at the current moment and needs to be further marked or removed. For the data that still needs to be retained after being filtered by the above formula, it is cached in blocks according to time periods to form a cache set. ,in This indicates the cache block number; the block cache can be loaded on demand in the subsequent model training stage (i.e., the second step), reducing memory and bandwidth consumption.

[0075] For each cache set Retain corresponding metadata records, such as the actual noise rate discarded and the acquisition latency within the same time window, and update them in the metadata directory. The extended fields in the code ensure that the source can still be traced and the filtering strategy can be modified again.

[0076] By defining the suspiciousness function The mutation detection threshold can be flexibly adjusted according to the actual application scenario, significantly reducing the probability of false filtering or missed filtering; using dynamic thresholds The algorithm re-evaluates data mutations by considering multi-dimensional external factors (such as weather and industrial activity intensity), enabling it to dynamically adapt to different regions and time periods; and it uses a cache collection. It also stores the corresponding filtering strategy execution results, which can facilitate the rapid loading of data for a specific time period during the subsequent online training or batch analysis, thereby improving the overall processing efficiency.

[0077] Step 2: When preprocessing data When a detection requirement is triggered and there are potential new or unknown load patterns, the adaptive detection module utilizes a fusion weight matrix. With depth detection model parameters Parallel execution of unsupervised clustering, isolated forest, and CNN / LSTM scoring to generate fused decision values. It dynamically updates weights and thresholds for suspected anomalies and outputs online learning results to quickly adapt to and capture emerging anomalies.

[0078] Step two includes the following:

[0079] Step 201: Initial screening and detection using multi-algorithm fusion

[0080] Upon receiving preprocessed data After obtaining its metadata, feature extraction and time series reconstruction are performed first, as follows:

[0081]

[0082] in Indicates to Multidimensional feature vectors obtained after performing time-domain, frequency-domain, or other higher-order mappings.

[0083] For feature extraction operators, use a unique identifier from step one. Binding allows for tracing back to the specific original data source and time window during subsequent feedback; feature extraction operators Specifically, it can be defined as a multimodal feature concatenation of readings, spectrum, temporal gradient, and wavelet. Its function is to map the one-dimensional time series quantity after edge preprocessing into a high-dimensional feature vector, so as to simultaneously characterize the temporal variation, frequency energy distribution, and multi-scale abrupt change characteristics of the original reading sequence.

[0084] Within the multi-algorithm fusion framework, the following two main detection modules are introduced:

[0085] Unsupervised detection module: Includes extended variants of methods such as clustering, isolation forest, and principal component analysis, used to identify electricity consumption behaviors that differ significantly from normal distributions and generate unsupervised scoring vectors. ;

[0086] Deep learning detection module: includes CNN-based local pattern extraction and LSTM-based long-term dependency capture, for the same batch of features Perform sequence prediction or reconstruction error assessment and output depth scoring vector. .

[0087] These two types of scoring vectors are merged into an abnormal scoring vector:

[0088]

[0089] Where the anomaly scoring vector It may be a multidimensional vector (the dimension is determined by the number of outputs from each detection module);

[0090] To generate a unified anomaly scoring vector from the outputs of the aforementioned multiple algorithms. The fusion function outputs the fusion determination value:

[0091]

[0092] in: This is the amplification factor, a positive real number, used to adjust the overall detection sensitivity;

[0093] To fuse the weight matrix, its size is related to the anomaly score vector. The dimensional matching can be continuously adjusted through the online learning process in step 202; Indicates based on a custom positive definite matrix The generalized norm is defined as:

[0094]

[0095] in Represents any vector, It is a diagonal or positive semi-definite matrix, used to differentiate or suppress scores of different dimensions in the calculation results;

[0096] When both unsupervised detection and deep learning detection give high scores to a piece of data, a larger fusion value will be obtained after calculation (i.e., the anomalous signal is amplified). Conversely, if a certain score approaches normal, it can be calculated using a positive semi-definite matrix. Or fusion weight matrix The overall output is reduced under its influence, making the results more robust and dynamically adjustable.

[0097] Combine the judgment value and the judgment threshold Compare, if:

[0098]

[0099] Then the data will be identified. Mark as suspected anomaly and output to step 202; otherwise, temporarily consider as normal or low-risk data. This threshold... It can be dynamically updated based on the results of online learning or operation and maintenance strategies.

[0100] Compared to single-algorithm detection, employing unsupervised and deep learning parallel scoring followed by fusion effectively reduces dependence on specific algorithms, thereby improving compatibility with different types of anomalies (such as abrupt and slowly changing anomalies); this is achieved through an adjustable multi-dimensional scoring mechanism: a positive semi-definite matrix. Or fusion weight matrix It can flexibly set the weights and amplification methods of each model's output in the final fusion, achieving adaptive support for multiple scenario requirements.

[0101] Step 202: Online Updates and Expert Knowledge Embedding

[0102] For data marked as potentially abnormal or normal in step 201, based on subsequent manual review results or short-term verification feedback, an online learning strategy is introduced to adjust the fusion weight matrix. and depth detection model parameters For iterative correction, the update formula can be defined as follows:

[0103]

[0104] in: Indicates the first The fusion weight matrix at the next iteration; Represents the parameter vector of a deep learning model (such as the weights of a CNN or LSTM). and These are the online update step sizes, both of which are positive real numbers;

[0105] and To update the direction calculation function, based on feedback information (For example, whether it is truly confirmed as an anomaly, the specific anomaly type, etc.) to dynamically determine the gradient or update amount; where: in sub-step 202, the function and They are used to calculate the fusion weight matrix respectively. and depth detection model parameters Update direction:

[0106] For each returned sample (including time-meter pairs and their manual labels), the difference between the fusion judgment value and the true label is compared, and then multiplied by that judgment value in the fusion weight matrix. The sensitivity (i.e., gradient) of the samples is then averaged to determine the direction of the correction of the fusion matrix.

[0107] The mean squared error loss is calculated for the difference between the neural network output and the manual label for each sample, and this loss is then applied to the depth detection model parameters. The gradients are averaged to determine the adjustment direction of the deep model. Combined with the learning rate step size, this enables joint online iterative optimization of the fusion strategy and network parameters.

[0108] Data Identifier Maintain consistency with the identifiers retained in the first step to ensure traceability;

[0109] Whenever the final review result of a piece of data is inconsistent with the model's judgment, the fusion weight matrix is ​​used. and depth detection model parameters Targeted corrections will be made to gradually reduce false alarms or missed alarms;

[0110] In addition, to avoid excessive false alarms or blind spots in the model when electricity consumption behavior fluctuates drastically, some detection results are corrected by incorporating the experience of power grid experts and physical constraints:

[0111] If a suspected anomaly is detected, but according to the power flow equation... If the calculations are still within a reasonable range, the anomaly score will be appropriately reduced and a manual review will be requested; The power flow equations are a set of nonlinear equations describing the power balance relationship between nodes in a power system under steady state. For each node... List the active and reactive power balances separately: The active power equation is:

[0112]

[0113] The reactive power equation is:

[0114]

[0115] : Net reactive power injection of bus (node) i; positive value indicates injection (reactive power generation), negative value indicates absorption (load / compensation absorption). N Total number of power system buses (number of nodes participating in power flow calculation). , : Voltage amplitudes at bus i and j, commonly used pu It indicates that the typical range is approximately 0.9 1.1pu ; 、 : busbar i, j Voltage phase angle (in radians, or degrees; the reference bus phase angle is usually taken as 0). The phase angle difference between the two busbars; if a phase-shifting transformer exists, the phase-shifting angle is usually deducted from the difference in engineering practice. , Bus admittance matrix Elements (real part is conductance, imaginary part is susceptance / susceptance matrix entries): for Mutual admittance determined by the series admittance of branches and the connection method (usually) 、 For inductive circuits (mostly negative); for i=j : This is the self-admittance, which is equal to the algebraic sum of the admittances of each branch connected to bus i, plus the parallel susceptance / compensation (capacitors, reactors, etc.) of this bus. , Trigonometric functions are used to project the phase angle difference onto the coupling relationship between reactive and reactive power. Summation. For all busbars in the entire network j Summation, including j=i The self-item.

[0116] : The nodal admittance matrix, G: The real part of the matrix is ​​called the conductance matrix, which reflects the active power loss coupling caused by network resistance. B: The imaginary part of the matrix is ​​called the susceptance matrix, which reflects the coupling of reactive power and voltage by the inductor / capacitor. j: imaginary unit. (Unlike the previous j, the former is an index) represents the phase relationship under steady-state AC.

[0117] By solving this set of equations, it is possible to verify whether the system voltage and phase angle satisfy energy conservation and equipment operation constraints under given power injection and network parameters, thereby determining whether the current operating state is reasonable.

[0118] In scenarios with large-scale distributed power sources, if there is no obvious abnormality in the overall regional energy balance, the model's output score should be verified a second time, even if it is high, to prevent widespread false alarms.

[0119] In specific industry activity patterns (such as large-scale factory rush production), if an operations and maintenance expert has registered the special load arrangement in advance, the system will add a normal fluctuation label in the later stages of scoring to prevent abnormal scores from being too high. Thus, through the above mechanism, knowledge from fields such as physics and business logic can be introduced in addition to the mathematical model to help the model maintain accuracy and reduce unnecessary alarms when facing extreme scenarios.

[0120] Online updates allow model parameters and fusion weights to be optimized in real time as user-side modes change, improving stability during long-term deployment. Integrating the power flow equations and energy conservation principles of the power grid into the detection results can effectively reduce the probability of false anomalies and further distinguish true anomalies, achieving dual physical and empirical correction.

[0121] Traditional solutions often only update a single model or perform threshold adjustments; this solution simultaneously updates the fusion weight matrix. and depth detection model parameters Incremental training is performed to develop a more comprehensive self-correction mechanism.

[0122] Through the coordinated efforts of steps 201 and 202, an anomaly detection framework with both heterogeneous model fusion and online self-learning capabilities was constructed. In step 201, a multivariate detection algorithm (unsupervised and deep learning) was combined to obtain multidimensional scores, and a fusion formula was used... A unified judgment is made; in step 202, the fusion weight matrix is ​​adjusted based on the actual feedback information. and depth detection model parameters Iterative corrections are made, and expert knowledge on grid power flow feasibility and energy conservation is incorporated to provide a more robust identification capability for emerging power consumption patterns or extreme scenarios.

[0123] Step 3, when the area When acquiring incremental information or identifying entirely new anomalous samples and requiring cross-regional knowledge sharing, the federated learning module merges the updated information from each node through anonymization and incremental uploading, using a positive semi-definite matrix. Weighted aggregation generates global model parameters And allow each region to base its decisions on its own business rules. Local refinement allows for the rapid dissemination of novel anomaly detection capabilities while maintaining personalized characteristics.

[0124] Step three includes the following:

[0125] Step 301: Cross-regional migration and knowledge exchange

[0126] When a certain area During the second step of the detection process, a new type of anomaly was discovered (confirmed in the final manual verification to be a novel fault or a sudden extreme load). The corresponding key incremental information was anonymously shared with other regions. This incremental information includes:

[0127] Abnormal data index and summary: such as data identifier and a small amount of feature summaries; model update differentials: such as This indicates the amount of improvement to the local depth model parameters, or This indicates modifications to the fusion weight matrix, etc.

[0128] To prevent the leakage of sensitive user information, anonymization and controlled sharing mechanisms are introduced: data identifiers are processed using hashing or encryption. Only necessary anomaly indicators are retained, without exposing the specific user's location or identity;

[0129] For incremental parameters: Incremental parameters of the deep model Fusion matrix weight increment Perturbation can be performed before transmission (such as adding small noise) to ensure that the complete original data distribution cannot be reconstructed by reverse engineering.

[0130] Set up an access whitelist so that only regional nodes with the same or higher security level can access this incremental information, thus strictly controlling the scope of sharing.

[0131] When a region receives incremental information or novel anomaly feature summaries shared by other regions, it will perform local rapid verification: if similar power consumption anomalies also appear in its own dataset, and the matching judgment shows a high similarity to the novel anomaly pattern provided by the other region, then the region will locally load the differential parameters provided by the other region, that is, the deep model parameter increments. Fusion matrix weight increment To accelerate the identification of this new anomaly;

[0132] If no similar scenario is found, this incremental information can be stored in the local cache for quick activation when similar behavior occurs in the future.

[0133] When in use, once a region first identifies and resolves a new anomaly, other regions can gain corresponding detection experience through this step, significantly shortening the response time to unknown scenarios. By leveraging anonymization and incremental propagation, the risk of data leakage from the centralization of large-scale raw data can be avoided, maintaining the effectiveness of cross-regional collaboration.

[0134] Step 302: Global Model Aggregation and Local Refinement

[0135] After implementing the interaction of data increments and anomaly features between regions in step 301, step 302 will achieve the core objective of cross-regional collaborative enhancement through global model aggregation and regional personalized refinement, wherein:

[0136] Assume the entire federal system includes Each region node, Its local depth model parameters (or fusion matrix) ) in the After each round of training / update, local parameter increments are generated. ;

[0137] Perform the following aggregation operation on the federated server or central coordination point to generate global model parameters. (The same principle can be applied to) ):

[0138]

[0139] in: Indicates the first The global model parameters during round aggregation can be initially blank or generated from pre-training in a certain region;

[0140] This is the step size factor for global aggregation; It is a diagonal or positive semi-definite matrix, used to perform overall optimization of the increments in each region, to prevent local abnormal updates from having too much impact on the global model; For the region The weighting coefficients measure their importance in the global aggregation and can be dynamically set based on factors such as the amount of regional data and credibility.

[0141] For nodes The local parameter increments are compatible with the information shared in step 301 or the online update results in step 2.

[0142] After the global model is aggregated, each node will perform localized fine-tuning of the global model based on its own unique load characteristics or anomaly patterns:

[0143]

[0144] in: Indicates the first Post-wheel node The final model parameters;

[0145] For the region The refinement function is used to adjust the global model based on region-specific industrial activity patterns or environmental variables; where: region refinement function This can be specifically defined as "local gradient update with business constraints":

[0146]

[0147] in: After global aggregation, it is sent to the region. Model parameters;

[0148] It is a region Locally labeled sample set The average loss on For binary classification or regression loss;

[0149] Based on region Business rule set The regularization term is used to incorporate local power grid topology, billing policies or limit constraints into the model to ensure that the refined parameters do not violate local operating requirements.

[0150] and They are respectively regions The learning rate and business constraint weights are dynamically set according to regional computing power and business importance;

[0151] This represents a negative update along the gradient direction of the total loss (local data loss + business constraints). Therefore, the local model parameters are updated as follows:

[0152]

[0153] It enables each region to make personalized adjustments based on its own business characteristics while absorbing global knowledge.

[0154] Indicates the region Predefined local business rules or expert knowledge (which can be linked with the expert knowledge base in step two) ensure personalized correction.

[0155] After several rounds Alternation (aggregation) (Through local refinement), the regional models and the global model will gradually reach a balance: preserving regional differences while rapidly learning new anomaly patterns through incremental updates shared by the federation. The model updates in this process can also form a closed loop with the first and second steps, continuously training and iterating on newly arriving data or detection results.

[0156] By aggregating global models, the system quickly absorbs the latest anomaly information from multiple regions; then, through local refinement, it retains the personalized detection needs of each region, ensuring detection accuracy under different load structures or business scenarios; matrix with weighting coefficients This process can filter out some noisy increments or the influence of abnormal regions, improving the robustness of the global model and preventing data bias in a single region. The third step, through the two-level collaboration of steps 301 and 302, constructs a federated learning and cross-regional collaborative enhancement system with high scalability, high confidentiality, and the ability to rapidly disseminate new anomaly detection knowledge. Step 301 achieves knowledge sharing based on differential parameters and anonymous indexes, helping other regions to build up their detection capabilities for new anomaly scenarios in advance. Step 302 further aggregates increments from multiple regions on the federated server or central node, and allows regional nodes to refine their localization, forming a unified framework of global sharing plus localized features.

[0157] Step 4: When evaluating the hierarchical function When a high false alarm or false negative rate is detected for a certain type, triggering an operational alarm, the dynamic decision feedback module corrects the second-step fusion weights or the third-step federated increments through multi-dimensional feedback. Subsequently, it compresses the massive deep model into a student model using teacher-student distillation and pruning techniques. Deployed to the edge, it enables layered collaboration and continuous closed-loop iteration while taking into account both computational efficiency and timeliness.

[0158] Step four includes the following:

[0159] Step 401: Multidimensional Decision Feedback and Iterative Correction

[0160] After completing the third step of cross-regional collaboration, each region or center can obtain the latest model parameters, including deep model parameters. Fusion weight matrix and federal global parameters When any node (edge ​​or center) performs anomaly detection and provides a result, the detection result is comprehensively evaluated based on multiple dimensions:

[0161] Detection accuracy: The accuracy is measured by comparing the current prediction with historically confirmed abnormal / normal records.

[0162] False negative rate: The percentage of known true anomalies that are not detected in a timely manner;

[0163] False alarm rate: Statistics on alarm interference caused by false alarms and anomalies, resulting in an additional burden on operation and maintenance personnel;

[0164] Average response time: The time consumed from data generation to the output of detection results, directly reflecting real-time performance.

[0165] Each evaluation indicator is evaluated according to the hierarchical evaluation function defined within this step. To perform aggregate calculations, where Corresponding to the unique identifier retained in the first step, This represents a set of multiple evaluation dimensions, such as the current detection result category or latency information; for example, the hierarchical evaluation function takes the form of a weighted average of the above multiple dimensions under dimensionless conditions.

[0166] If the above assessment finds that:

[0167] A continuously rising false alarm rate for a certain category indicates that this category of data is being over-classified as abnormal under the current model parameters. The corresponding data should be flagged. The excessive alarm feedback is collected and packaged, and sent back to the second-step online learning module to adjust its fusion weight or correct the threshold.

[0168] Frequent missed detections of a certain type of fault indicate that the model has not learned enough about this type of anomaly. It is necessary to re-input the corresponding features or incremental information into the second or third step to adjust the fusion weight matrix. and federal global parameters Make targeted updates;

[0169] Excessive response delay: If the detection process experiences high latency at certain nodes / edges, feedback is sent to step 402, reminding it to focus more on reducing model size and inference time during the next round of model compression or pruning.

[0170] Depending on the type of feedback, different levels of correction can be triggered:

[0171] Lightweight adjustment: only for local fusion weights or individual nodes in the second step. Make adjustments;

[0172] Federal Revision: In the third step, the federal global model is revised. Perform an additional round of aggregation or local refinement;

[0173] Data acquisition strategy optimization: If false alarms / missed alarms are caused by sensor failures or improper scene configuration, the feedback can be traced back to the first step to make appropriate updates to the multi-source data access and preprocessing process.

[0174] When used, multi-dimensional evaluation can capture problems in different aspects such as alarm accuracy and latency, making subsequent corrections more accurate; it provides differentiated correction paths for problems of different severity, reducing unnecessary large-scale changes to the global model and realizing a hierarchical feedback mechanism.

[0175] Step 402, Model Distillation and Edge Deployment

[0176] Since the deep models obtained in the second and third steps are usually large in scale (e.g., CNN+LSTM combination), direct deployment to edge devices is often difficult due to limitations in computing power and bandwidth. Step 402 introduces the following model distillation and pruning strategy:

[0177] Teacher-student distillation: This involves having a complex model (teacher model) and a lightweight model (student model) to be deployed perform inference on the same input set, and minimizing the difference in their feature outputs.

[0178]

[0179] in and This represents the feature mappings of the teacher and student outputs at the corresponding layers. A penalty matrix specifically defined for step 402 The norm of the feature map difference; where: in substep 402, the penalty norm of the feature map difference can be defined as:

[0180]

[0181] in, It is the difference in feature vectors output by the teacher model and the student model at the same layer. It is a diagonal or positive semi-definite matrix whose diagonal elements Used for the first Different penalty weights are applied to each feature dimension. By assigning different importance coefficients to each dimension, norm calculation can both quantify the overall difference and highlight the error on key dimensions, thereby achieving refined knowledge transfer control in distillation loss.

[0182] Pruning is performed on unimportant or redundant neuron connections to reduce the number of parameters; and the remaining parameters are shared (e.g., similar weights are merged) to further reduce storage usage. Unimportant connections can be determined using either gradient sensitivity or weight magnitude metrics.

[0183] This step involves deploying differentiated models at different levels (central and edge):

[0184] Deploy high-precision models at the central end: retain or partially prune complex models to handle high-risk or uncertain samples; deploy lightweight models at the edge end: use distilled and pruned student models to quickly respond to common abnormal scenarios and reduce dependence on network bandwidth and central computing power.

[0185] Hierarchical decision-making and division of labor: When the confidence level of the edge model is lower than expected (e.g., the score of a sample is close to the threshold), the sample can be uploaded to the central end for further precise judgment, and then the judgment result is fed back to the edge end; where: the edge model refers to a lightweight inference model deployed at the network edge, close to the electricity meter or substation site, corresponding to the high-precision "teacher model" running in the cloud or center. It is usually through methods such as distillation and pruning to transform the complex deep model (including) trained at the central end. and fusion matrix Compressed into a student model with fewer parameters and lower computational cost (denoted as...) This model resides on a distribution box, edge server, or smart gateway, directly processing locally collected pre-processed data. Perform anomaly detection and preliminary judgment to achieve real-time detection capabilities with low latency and high concurrency.

[0186] When step 401 indicates that the response latency is too long or the false alarm rate is too high for a certain type of task, step 402 can perform targeted pruning or distillation on the relevant task or sub-model, and automatically distribute it to edge devices in the next version upgrade. Furthermore, if some edge devices have strong computing power, only a small amount of pruning can be performed to retain more layers of depth, forming a lightweight model deployment scheme that is customized on demand. Through teacher-student distillation and pruning techniques, the computational load and parameter scale can be significantly reduced while preserving the model's recognition capabilities to the greatest extent, ensuring efficient inference at the edge and balancing accuracy and real-time performance. The central and edge models each leverage their strengths: the edge quickly identifies common scenarios, while the central model supplements high-precision decision-making, improving the overall real-time performance of the system and ensuring reliability in heterogeneous scenarios, achieving multi-level collaboration. The distillation configuration and pruning strategy can be adjusted at any time based on the feedback from step 401 to specifically address latency or misjudgment issues in certain scenarios, demonstrating continuous optimization characteristics.

[0187] Please see Figure 2 This invention provides a metering error correction system based on timing anomaly detection, comprising:

[0188] When the data processing unit detects multi-source heterogeneous data access and the noise risk is higher than expected, it calls the edge-side preliminary filtering component to use the suspicion degree function to identify and remove invalid data, and records metadata through block caching and data identification to form preprocessed data.

[0189] The judgment unit performs unsupervised detection and CNN / LSTM feature extraction, generates multi-dimensional scores for each record and produces a fusion judgment value, and after determining the initial abnormal label, it uses an online learning mechanism to iteratively update the fusion weight matrix and deep detection model parameters.

[0190] The adaptive update unit merges the update information of each node through anonymization and incremental uploading when a region obtains incremental information or confirms a new fault sample. It generates global model parameters by weighted aggregation of semi-positive definite matrices and allows each region to refine the parameters locally based on its own business rules.

[0191] The feedback adjustment unit, when the hierarchical evaluation function detects a high false alarm rate or false negative rate and triggers an operation and maintenance alarm, corrects the fusion weights or federated increments through multi-dimensional backhaul, and compresses the deep model into a student model for deployment to the edge by means of teacher-student distillation and pruning.

[0192] This invention provides an electricity meter, including at least one processor;

[0193] A memory for storing executable instructions that are executed by at least one of the processors to cause the at least one of the processors to perform the steps of the intelligent manufacturing advanced planning and scheduling method.

[0194] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0195] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0196] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0197] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0198] 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 scope of the technology 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 method for correcting metering error of an electric meter based on timing anomaly detection, characterized in that: comprising, When multi-source heterogeneous data access is detected and noise risk is higher than expected, call the edge side preliminary filtering component to identify and remove invalid data using the suspiciousness function, record metadata through block caching and data identification, and form preprocessed data; Unsupervised detection and CNN / LSTM feature extraction are performed to generate multi-dimensional scores for each record and produce a fusion decision value. After determining the preliminary abnormal label, the fusion weight matrix and deep detection model parameters are updated iteratively using an online learning mechanism. When a region obtains incremental information or confirms new fault samples, update information from each node is merged through anonymization and incremental uploading, and global model parameters are generated by semi-positive matrix weighted aggregation. Each region refines the global model based on its own business rules. When any region obtains incremental information or detects a new fault type, it shares the incremental information with other regions through anonymization. When a region receives incremental information or new abnormal feature summaries shared by other regions, it performs local rapid verification: If similar anomalies appear in its own data set, the corresponding region will locally load the difference parameters provided by the other party. If no similar scenarios are matched, store them in the local cache; Use semi-positive matrices to weight and aggregate the incremental parameters of each region into global model parameters, and refine the global model locally by each region in combination with local business rules; After the global model is aggregated, the nodes will perform several rounds of local alternation fine-tuning on the global model based on their unique load characteristics or abnormal patterns. When the hierarchical evaluation function detects a high false positive rate or a high false negative rate for a certain type and triggers an operation and maintenance alarm, the multi-dimensional backtracking correction fusion weight or federated increment is used to compress the deep model into a student model and deploy it to the edge.

2. The electric meter measurement error correction method based on time series anomaly detection according to claim 1, characterized in that: When multi-source heterogeneous data continues to access, set an adjustable sensitivity coefficient to preliminarily filter out invalid readings, establish a corresponding metadata directory, and record metadata information for each data with a unique identifier.

3. The electric meter measurement error correction method based on time series anomaly detection according to claim 2, characterized in that: By using block caching, preprocessed data is archived, and when the suspiciousness is higher than the preset threshold, it is marked or removed. The data retained after screening is block cached by time period to form a cache set and retain the corresponding metadata records.

4. The electric meter measurement error correction method based on time series anomaly detection according to claim 3, characterized in that: Feature extraction and time series reconstruction are performed on the preprocessed data and its metadata; After sequence prediction or reconstruction error evaluation by the pre-constructed unsupervised detection module and deep learning detection module, score vectors are output and combined into an anomaly score vector. The fusion function outputs a fusion decision value. If the fusion decision value is greater than the decision threshold, the data identifier is marked as suspected abnormal.

5. The electric meter measurement error correction method based on time series anomaly detection according to claim 4, characterized in that: For the data labeled as suspected abnormal or normal, an online learning strategy is introduced to iteratively correct the fusion weight matrix and the deep detection model parameters, and expert experience and physical constraints are introduced to correct part of the detection results.

6. The electric meter measurement error correction method based on timing anomaly detection according to claim 5, characterized in that: The abnormal detection results are evaluated in multiple dimensions and the false positive rate and the false negative rate are output according to the evaluation function. If any of the indicators is higher than the preset threshold, the feedback process is triggered, and the corresponding data is identified and returned to the online learning module or the federal server for correction at different levels, including light correction, federal correction and data collection strategy optimization.

7. The electric meter measurement error correction method based on timing anomaly detection according to claim 6, characterized in that: The distillation process is called to perform teacher-student comparison on high-dimensional deep models and light models, reduce the model size through pruning and weight merging, and generate a simplified model. The differential model deployment is performed at different levels of edge to complete real-time judgment in limited scenarios.

8. A system for correcting metering errors of an electricity meter based on timing anomaly detection, applying the method of any one of claims 1 to 7, characterized in that: including, The data processing unit detects that multiple source heterogeneous data access and noise risk are higher than expected, calls the edge side preliminary filtering component, uses the suspiciousness function to identify and eliminate invalid data, records metadata through block caching and data identification, and forms preprocessed data; The determination unit performs unsupervised detection and CNN / LSTM feature extraction, generates a multi-dimensional score for each record, and produces a fusion decision value. After determining the preliminary abnormal label, the online learning mechanism is used to iteratively update the fusion weight matrix and the deep detection model parameters; The adaptive updating unit combines the node update information through anonymization and incremental uploading when the region obtains incremental information or confirms new fault samples, generates global model parameters by semi-definite matrix weighted aggregation, and allows each region to be locally refined based on its own business rules; When the layered evaluation function detects that the false positive rate or the false negative rate of a certain type is high and causes operation and maintenance alarm, the feedback adjustment unit corrects the fusion weight or federal increment through multi-dimensional back correction, and compresses the deep model into a student model through teacher-student distillation and pruning and deploys it to the edge.

9. An electricity meter characterized by: including, At least one processor; Memory for storing executable instructions, the executable instructions being executed by at least one of the processors to cause the at least one processor to perform the steps of the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Metering error remote online detection method of reinforcement learning algorithm

    CN111596255A

  • Electric energy meter dynamic metering error prediction analysis method and system

    CN120161403A