Intelligent electric energy meter calibration system online checking and fault diagnosis method and system

By training a long short-term memory network model locally at smart meter nodes and employing federated learning, combined with optimal resource allocation and differential privacy protection, the problems of low efficiency, privacy leakage, and poor real-time performance in traditional electricity meter verification systems are solved. This enables high-precision, low-latency online fault diagnosis, improving the operational reliability and intelligence level of the power grid.

CN122506478APending Publication Date: 2026-08-04STATE GRID TIANJIN ELECTRIC POWER COMPANY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID TIANJIN ELECTRIC POWER COMPANY
Filing Date
2026-06-30
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Traditional electricity meter verification systems suffer from low efficiency, high risk of data privacy leakage, and poor real-time performance in data processing and condition diagnosis. In particular, they are unable to provide high-precision personalized diagnostic services under the non-independent and identically distributed data characteristics, and cannot meet the real-time requirements of the power grid for second-level or even millisecond-level response.

Method used

A multi-hop wireless network architecture is adopted, in which each smart meter node trains a long short-term memory network model locally, performs online diagnosis through federated learning, and dynamically adjusts the model parameters through optimal resource allocation strategy and personalized learning rate, combined with differential privacy noise protection model parameters, to achieve efficient and real-time fault diagnosis.

Benefits of technology

This enables high-precision, low-latency, and adaptive online verification and maintenance of smart meter nodes while protecting user data privacy, thereby improving the reliability and intelligence level of power grid operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122506478A_ABST
    Figure CN122506478A_ABST
Patent Text Reader

Abstract

This invention discloses an online verification and fault diagnosis method and system for smart energy meter calibration, belonging to the interdisciplinary field of smart grid and distributed machine learning. The system consists of a global calibration server and multi-hop networked smart energy meter nodes, employing federated learning combined with an LSTM model. The method first involves the server broadcasting global model parameters, with each node jointly optimizing the calculation frequency and transmission power to reduce transmission latency. Then, the optimal learning rate is adaptively selected to complete local model iterative updates. Subsequently, the parameters are uploaded to the server for weighted aggregation, generating a new global model which is then distributed across the entire network. Finally, each node uses the new model to perform real-time metering error verification and equipment fault diagnosis, determining equipment status based on probability rules and triggering alarms and maintenance work orders. This invention balances data privacy, real-time diagnostics, and heterogeneous data adaptability, enabling high-precision online calibration and intelligent operation and maintenance of energy meters, thus improving the reliability of power grid operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary technical fields of smart grid, power metering automation, distributed machine learning and industrial Internet of Things, and particularly relates to an online verification and fault diagnosis method and system for smart energy meter calibration system. Background Technology

[0002] With the deepening development of the global energy internet and smart grids, smart meters, as a core component of the grid's end-sensing layer and advanced metering infrastructure (AMI), directly impact the grid's economic efficiency and the fairness of power supply through their metering accuracy, communication reliability, and operational stability. Traditional meter verification typically relies on periodic manual on-site sampling or centralized verification. To improve efficiency and accuracy, modern power systems have introduced automated verification systems, which can perform batch, efficient verification and condition monitoring of large-scale meters remotely or centrally. However, traditional automated verification systems still face significant challenges in data processing and condition diagnosis.

[0003] Load data, operating parameters, and calibration error data collected by electricity meters are highly sensitive information. Uploading millions or even hundreds of millions of raw data points from terminals to a cloud server for unified analysis significantly increases the risks of data leakage, hacking attacks, and privacy violations. Therefore, centralized data processing models are unsustainable. Furthermore, smart meters come from different manufacturers and are deployed in different regions, resulting in significant differences in their operating environments and metering characteristics. In addition, different calibration terminals within the calibration system may also exhibit differences in the distribution of fault characteristics they collect due to hardware aging and subtle variations in calibration parameters. This non-independent and identically distributed (Non-IID) data characteristic makes traditional centralized diagnostic models difficult to train, has poor generalization ability, and struggles to provide high-precision, personalized diagnostic services for each terminal.

[0004] Furthermore, automated verification systems require rapid response and immediate diagnosis of abnormal states in electricity meters or verification terminals. The centralized uploading of large-scale data and complex model training lead to significant communication and computational delays, failing to meet the power grid's real-time requirements for second-level or even millisecond-level responses, rendering online verification and self-diagnosis functions ineffective. Summary of the Invention

[0005] In view of the technical problems mentioned in the background art, such as low efficiency, data privacy leakage and poor real-time performance of traditional electricity meter verification, the purpose of this invention is to provide an online verification and fault diagnosis method and system for smart electricity meter verification.

[0006] To achieve the objectives of this invention, the technical solution provided by this invention is as follows: First aspect This invention provides an online verification and fault diagnosis method for a smart energy meter calibration system. The method is applied to a system including a global calibration server and systems deployed in the power grid. In a system of smart energy meter nodes; It should be noted that the smart energy meter nodes form a multi-hop wireless network, which is divided into multiple paths. Each path contains a terminal node and one or more relay nodes. Data starts from the terminal node, is forwarded hop by hop by relay nodes, and finally converges to the global verification server.

[0007] Each smart meter node possesses a local detection dataset during each global communication round. This dataset contains its collected time-series operational data, such as voltage U, current I, active power P, reactive power Q, power factor PF, and historical error values ​​ε. Each smart meter node locally trains a Long Short-Term Memory (LSTM) network model as an online diagnostic model, whose parameter vector is represented as follows: The goal of the model is to learn a mapping function that predicts the output based on the input features.

[0008] This invention aims to minimize the global loss function of all meter diagnostic models while simultaneously minimizing the total system latency for completing a round of federated training. This is a multi-objective optimization problem, decomposed into coupled model optimization and resource optimization sub-problems. The global loss function measures the overall performance of the model across all data distributions, while the total system time is determined by the sum of the completion times of the slowest path in each round.

[0009] The method includes the following steps: Step 1: The global verification server will set the current global model parameters. The training configuration for this round is packaged and broadcast via a multi-hop network to the set of nodes selected to participate in the training for this round. All smart energy meter nodes The smart energy meter node Includes terminal nodes and relay nodes; Step 2: Each smart meter node Receive global model parameters After configuring this round of training, the following operations will be executed in parallel: Operation 1: Solve for the smart energy meter nodes Optimal resource allocation strategy ,in, To achieve the optimal transmission power, To optimize the calculation frequency; dynamically adjust the nodes of the smart energy meter. The local CPU frequency is And set the transmission power to ; Operation 2: Smart meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. and use Detecting datasets locally Above, execute After the next iteration, the updated local model parameters are obtained. ; By dynamically selecting the learning rate that best suits the current data characteristics for each smart meter node, the client drift problem caused by non-IID data is effectively alleviated, the model convergence is accelerated, and the accuracy of personalized diagnosis is improved.

[0010] Step 3: Smart meter node Will Utilizing optimal transmission power Upload; Step 4: The global verification server checks the received data... Perform global model aggregation to obtain a new global model. ; Step 5: The global verification server will generate the new global model. Distribute the data to all smart meter nodes in the power grid; Step 6: Each smart meter node will... This serves as the online diagnostic model for online verification and fault self-diagnosis in this round.

[0011] It should be noted that new data generated during online diagnosis (including error estimates from the model output, triggered alarm records, and possible subsequent manual verification labels) is automatically added to the local historical dataset of the smart meter node. This labeled new data will participate in subsequent rounds of federated learning training. Through this closed-loop feedback mechanism, the diagnostic model can continuously learn new operating modes, equipment aging patterns, and early fault characteristics, achieving online adaptive evolution of the model and continuously improving diagnostic accuracy and robustness. Subsequently, it returns to begin a new round (k+1) of federated learning iterations, forming a continuous intelligent management closed loop.

[0012] Furthermore, in step 1, the global model adopts a long short-term memory network structure, including an input layer, a hidden layer, and an output layer; the output layer includes a regression head that outputs the measurement error estimate at the current time and a classification head that outputs the probability distribution of the health status.

[0013] Furthermore, to meet the real-time requirements of online verification and self-diagnosis, this invention jointly optimizes the computational and communication resources of all smart meter nodes in the network to minimize the completion time of each round of federated learning. In step 2, the solution obtains the smart meter nodes... Optimal resource allocation strategy This includes the following sub-steps: Step 2.11: Calculate the terminal node Delay The formula is as follows: ; in, Calculate the time locally; For model upload time; For terminal nodes The number of local training iterations; For terminal nodes The average number of CPU cycles required to process one data sample; For terminal nodes The size of the local dataset; For terminal nodes CPU calculation frequency, in Hz; This refers to the size of the model parameter vector, in bits. To be assigned to terminal nodes Uplink communication bandwidth, in Hz; For terminal nodes The transmit power, measured in W; For terminal nodes Channel power gain to its parent node; This represents the noise power spectral density, in W / Hz. Step 2.12: Calculate relay nodes Delay The formula is as follows: ; in, For relay nodes The calculation time; For relay nodes Upload time; The forwarding time required to forward all of its child node model parameters; For relay nodes The number of local training iterations; For relay nodes Average number of CPU cycles required to process a single sample; For relay nodes The size of the local dataset; For relay nodes The CPU has a high computing frequency, measured in Hz; For relay nodes The number of child nodes; For relay nodes Uplink speed; To be assigned to relay nodes Uplink communication bandwidth, in Hz; For relay nodes The transmit power, in watts (W); For relay nodes Channel power gain to its parent node; Step 2.13: Based on the terminal node Delay and relay nodes Delay The optimization objective is to minimize the total system latency in this training round, as shown in the following formula: ; in, Total system delay; The total number of global rounds executed in the entire federated learning task; A set of terminal nodes; For terminal nodes The set of all relay nodes on the parameter upload path; For global communication rounds; Step 2.14: Construct the following constraints: Each smart energy meter node Calculation frequency The upper limit is the maximum currently available computation frequency. Transmission power The maximum transmit power currently available The upper limit of energy consumption is ; Step 2.15: Solve for the smart energy meter nodes based on the objective function and constraints. Optimal resource allocation strategy ; Since the objective function and some constraints are non-convex, this invention employs the block coordinate descent method and successive convex approximation technique.

[0014] Step 2.15.1: Decompose the objective function and constraints into two non-convex subproblems: terminal nodes Optimization block (optimization) and relay nodes Optimization block (optimization) ; Step 2.15.2: For the non-convex communication rate terms in the two non-convex subproblems The lower bound is approximated at its first-order Taylor expansion point, thereby transforming the non-convex constraint into a convex constraint; where, This refers to the transmission power of the transmitting end; This represents the channel power gain of the communication link. Uplink communication bandwidth allocated to the link; The noise one-sided power spectral density; Step 2.15.3: Alternately fix the variables in one optimization block and solve the convex optimization problem of another optimization block until convergence; Specifically, this involves allocating resources to fixed relay nodes by independently solving a convex optimization subproblem for each terminal node to obtain the optimal solution. ; Resource allocation for fixed terminal nodes involves independently solving a convex optimization subproblem for each relay node to obtain the optimal solution. ; Finally, all smart energy meter nodes are obtained. Optimal resource allocation strategy ; By jointly optimizing the computation frequency and transmission power, the end-to-end latency of model synchronization is significantly reduced while meeting the equipment energy constraints, enabling online verification and self-diagnosis to be completed in near real time.

[0015] Step 2.16: Dynamically adjust the local CPU frequency of the terminal node and relay node to... And set the transmission power to .

[0016] Furthermore, in step 2, the smart energy meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. This includes the following sub-steps: Step 2.21: Smart Energy Meter Node receive Then, in a local temporary verification set Above, for a set of predefined candidate learning rates Perform rapid evaluation; for each candidate learning rate , Smart energy meter nodes Perform gradient descent and compute its value at the candidate learning rate. loss value on The formula is as follows: ; in, It is a smart energy meter node exist Gradient estimation at , These are real labels; Step 2.22: Smart Energy Meter The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. The formula is as follows: .

[0017] Furthermore, in step 2, the smart energy meter The local update rules are as follows: ; in, For smart energy meter nodes In the In the round of global training, the first... The model parameter vector updated after the next local iteration; For smart energy meter nodes In the In the round of global training, the first... The model parameter vector updated after the next local iteration; For smart energy meter nodes The local loss function gradient operator; From A batch of data randomly sampled from the data; This represents the number of steps in the local iteration; after After the second iteration, the locally updated model parameters are obtained. .

[0018] Further, in step 4, the global verification server, based on the received... Perform global model aggregation to obtain a new global model. The formula is as follows: ; in, Indicates the first The smart meter node at the The local dataset used during global training.

[0019] The weights are determined by the amount of local data at each node, ensuring that nodes with larger data contributions have a greater impact on the global model. Differential privacy noise can be added during the aggregation process to further enhance privacy protection.

[0020] Furthermore, in step 6, the online verification and fault self-diagnosis include the following: Step 6.1: The smart energy meter nodes collect operational data in real time; the operational data is then input into the online diagnostic model according to a preset cycle; Step 6.2: The regression head of the online diagnostic model outputs the current time-to-time measurement error estimate. ;Will Compare with a preset error threshold; if | If the preset error threshold is met, an error exceeding the tolerance alarm will be generated immediately and transmitted to the global calibration server and operation and maintenance management system through the event reporting mechanism. Meanwhile, the classification head output health status probability distribution of the online diagnostic model is as follows: [ ]; in: The probability that a smart meter node is in a healthy state; The probability that a smart meter node is in a slightly aged state; The probability that a smart energy meter node is in a Class A potential fault state; The probability that a smart meter node is in a Class B potential fault state; the sum of the four probabilities is 1. The smart energy meter node determines its status according to preset status rules.

[0021] Furthermore, the preset state rules include the following: when If the value is greater than 0.8, the status is determined to be healthy; when If the probability is the highest among the four categories and this condition persists for three diagnostic cycles, the condition is determined to be mild aging, and periodic check-ups are recommended. when or If the value is greater than 0.6, the status is determined to be a potential fault, a predictive maintenance work order is generated, and the result is reported to the global calibration server.

[0022] Second aspect This invention also provides an online verification and fault diagnosis system for smart energy meter calibration, the system comprising a global calibration server and systems deployed in the power grid. One smart energy meter node; The system is used to perform the following steps: Step 1: The global verification server will set the current global model parameters. The training configuration for this round is packaged and broadcast via a multi-hop network to the set of nodes selected to participate in the training for this round. All smart energy meter nodes The smart energy meter node Includes terminal nodes and relay nodes; Step 2: Each smart meter node Receive global model parameters After configuring this round of training, the following operations will be executed in parallel: Operation 1: Solve for the smart energy meter nodes Optimal resource allocation strategy ,in, To achieve the optimal transmission power, To optimize the calculation frequency; dynamically adjust the nodes of the smart energy meter. The local CPU frequency is And set the transmission power to ; Operation 2: Smart meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. and use Detecting datasets locally Above, execute After the next iteration, the updated local model parameters are obtained. ; Step 3: Smart meter node Will Utilizing optimal transmission power Upload; Step 4: The global verification server checks the received data... Perform global model aggregation to obtain a new global model. ; Step 5: The global verification server will generate the new global model. Distribute the data to all smart meter nodes in the power grid; Step 6: Each smart meter node will... This serves as the online diagnostic model for online verification and fault self-diagnosis in this round.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: The method of this invention is deployed in a multi-hop network consisting of a verification server, relay nodes, and terminal nodes. Both relay nodes and terminal nodes are smart meter nodes. Efficient and accurate diagnosis is achieved through the coordinated operation of these three core components, as detailed below: First, this invention introduces a personalized model update mechanism based on meta-learning, in which each model dynamically selects the optimal learning rate for local training based on its own data characteristics, effectively overcoming data heterogeneity and improving the adaptability and accuracy of the diagnostic model.

[0024] Secondly, this invention designs a joint optimization strategy for latency and resources for multi-hop networks. By modeling and calculating communication latency, and using distributed algorithms to collaboratively optimize the calculation frequency and transmission power of each node, the overall system latency is significantly reduced under energy constraints, ensuring the real-time performance of online verification. Finally, the privacy of model parameters is protected through secure aggregation technology, and the updated global model is used to perform real-time error monitoring and health status self-diagnosis.

[0025] This invention, while protecting user data privacy, enables high-precision, low-latency, and adaptive online verification and maintenance of smart energy meter nodes, thereby improving the reliability and intelligence level of power grid operation. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the online verification and fault diagnosis method for the smart energy meter calibration system provided in this embodiment of the invention. Detailed Implementation

[0027] 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0028] It should be noted that the acquisition of data and collection of information in this application are legal, compliant, or obtained with the consent of the subject of the data collection.

[0029] like Figure 1 As shown, this embodiment provides an online verification and fault diagnosis method for a smart energy meter calibration system. The method is applied to a system including a global calibration server and systems deployed in the power grid. In a system of smart energy meter nodes; It should be noted that the global verification server, deployed in the power company's data center or cloud, possesses strong computing and storage capabilities and is responsible for the initialization, broadcasting, aggregation, and distribution of the global model, as well as system monitoring and management. On the software side, a federated learning management platform is deployed, with built-in model aggregation algorithms, node scheduling strategies, resource optimization solvers, and a system monitoring interface.

[0030] Global model initialization: Before the first round of training begins ( k =0), the server initializes a basic diagnostic model. The model uses a Long Short-Term Memory (LSTM) network structure, with the following specific parameters: Input layer: Accepts time-series characteristics of a fixed time window (e.g., the past 24 hours, one point every 15 minutes, for a total of 96 time steps), including voltage (V), current (I), active power (P), reactive power (Q), power factor (PF), and reference error value (if any). Hidden layers: 2 layers of LSTM, 128 units per layer; Output layer: 1) Regression head: Outputs the current measurement error estimate (unit: %); 2) Classification head: Outputs the probability distribution of health status (e.g., probability of normal, slightly aged, potential fault A, potential fault B). Loss function: Uses combined loss, total loss = λ1 Mean Squared Error (MSE, used for regression) + λ2 Cross-entropy loss (used for classification), where λ1 and λ2 are hyperparameters, which can be set to 0.7 and 0.3, respectively. Initial model. Pre-training can be performed using publicly available, de-identified historical test data to accelerate convergence.

[0031] The smart meter nodes include terminal nodes and relay nodes. Terminal nodes, deployed on the user side, are the direct data acquisition and diagnostic execution units. Each terminal node embeds a standard-compliant metering module, a communication module (such as 4G / 5G, HPLC, RF, etc.), and an edge computing unit (such as an ARM Cortex-A series processor), possessing local model training and inference capabilities. Relay nodes, consisting of specific models of smart meters with strong communication and computing capabilities, are deployed at key network nodes such as substations, distribution rooms, or concentrators. Their functions include model parameter forwarding, local training, and possible preliminary data aggregation. A lightweight federated learning client program, including a local training engine, communication protocol stack, resource management module, and diagnostic inference module, is deployed in the embedded system of each smart meter node.

[0032] The network topology adopts a multi-hop wireless mesh network. Before system startup, network self-organization and route discovery must be completed to determine the unique or optimal data transmission path from each terminal node to the global verification server, and each relay node must be identified. m child node set child(m) This forms a stable tree-like or network topology.

[0033] The method includes the following steps: Step 1: The global verification server will set the current global model parameters. The training configuration for this round is packaged and broadcast via a multi-hop network to the set of nodes selected to participate in the training for this round. All smart energy meter nodes ; It should be noted that the global verification server determines the set of nodes participating in this round of training. Strategies such as random selection, data freshness-based selection, or previous contribution-based selection can be adopted. For example, 30% of the smart meter nodes in the entire network can be randomly selected to participate in this round of training.

[0034] Step 2: Each smart meter node Receive global model parameters After configuring this round of training, the following operations will be executed in parallel: Operation 1: Solve for the smart energy meter nodes Optimal resource allocation strategy ,in, To achieve the optimal transmission power, To optimize the calculation frequency; dynamically adjust the nodes of the smart energy meter. The local CPU frequency is And set the transmission power to ; The solution obtains the smart energy meter node. Optimal resource allocation strategy This includes the following sub-steps: Step 2.11: Calculate the terminal node Delay The formula is as follows: ; in, Calculate the time locally; For model upload time; For terminal nodes The number of local training iterations; For terminal nodes The average number of CPU cycles required to process one data sample; For terminal nodes The size of the local dataset; For terminal nodes CPU calculation frequency, in Hz; This refers to the size of the model parameter vector, in bits. To be assigned to terminal nodes Uplink communication bandwidth, in Hz; For terminal nodes The transmit power, measured in W; For terminal nodes Channel power gain to its parent node; This represents the noise power spectral density, in W / Hz. Step 2.12: Calculate relay nodes Delay The formula is as follows: ; in, For relay nodes The calculation time; For relay nodes Upload time; The forwarding time required to forward all of its child node model parameters; For relay nodes The number of local training iterations; For relay nodes Average number of CPU cycles required to process a single sample; For relay nodes The size of the local dataset; For relay nodes The CPU has a high computing frequency, measured in Hz; For relay nodes The number of child nodes; For relay nodes Uplink speed; To be assigned to relay nodes Uplink communication bandwidth, in Hz; For relay nodes The transmit power, in watts (W); For relay nodes Channel power gain to its parent node; Step 2.13: Based on the terminal node Delay and relay nodes Delay The optimization objective is to minimize the total system latency in this training round, as shown in the following formula: ; in, Total system delay; The total number of global rounds executed in the entire federated learning task; A set of terminal nodes; For terminal nodes The set of all relay nodes on the parameter upload path; For global communication rounds; Step 2.14: Construct the following constraints: Each smart energy meter node Calculation frequency The upper limit is the maximum currently available computation frequency. Transmission power The maximum transmit power currently available The upper limit of energy consumption is ; Step 2.15: Solve for the smart energy meter nodes based on the objective function and constraints. Optimal resource allocation strategy ; Step 2.16: Dynamically adjust the local CPU frequency of the terminal node and relay node to... And set the transmission power to .

[0035] Operation 2: Smart meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. and use Detecting datasets locally Above, execute After the next iteration, the updated local model parameters are obtained. ; Among them, the smart energy meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. This includes the following sub-steps: Step 2.21: Smart Energy Meter Node receive Then, in a local temporary verification set Above, for a set of predefined candidate learning rates Perform rapid evaluation; for each candidate learning rate , Smart energy meter nodes Perform gradient descent and compute its value at the candidate learning rate. loss value on The formula is as follows: ; in, It is a smart energy meter node exist Gradient estimation at , These are real labels; It should be noted that in this step, the latest local dataset is used. 10% of the data is randomly selected as a temporary validation set. The remaining 90% is used as the training set.

[0036] Step 2.22: Smart Energy Meter The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. The formula is as follows: .

[0037] Among them, smart energy meters The local update rules are as follows: ; in, For smart energy meter nodes In the In the round of global training, the first... The model parameter vector updated after the next local iteration; For smart energy meter nodes In the In the round of global training, the first... The model parameter vector updated after the next local iteration; For smart energy meter nodes The local loss function gradient operator; From A batch of data randomly sampled from the data; This represents the number of steps in the local iteration; after After the second iteration, the locally updated model parameters are obtained. .

[0038] Step 3: Smart meter node Will Utilizing optimal transmission power Upload; Step 4: The global verification server checks the received data... Perform global model aggregation to obtain a new global model. The formula is as follows: ; in, Indicates the first The smart meter node at the The local dataset used during global training.

[0039] Step 5: The global verification server will generate the new global model. Distribute the data to all smart meter nodes in the power grid; Step 6: Each smart meter node will... This serves as the online diagnostic model for online verification and fault self-diagnosis in this round.

[0040] The online verification and fault self-diagnosis include the following: Step 6.1: The smart energy meter nodes collect operational data in real time; according to a preset cycle (e.g., 5 minutes), the operational data of the most recent time window (96 points) is input into the online diagnostic model; Step 6.2: The regression head of the online diagnostic model outputs the current time-to-time measurement error estimate. ;Will Compare with a preset error threshold; if | If the preset error threshold is met, an error exceeding the tolerance alarm will be generated immediately and transmitted to the global calibration server and operation and maintenance management system through the event reporting mechanism. Meanwhile, the classification head output health status probability distribution of the online diagnostic model is as follows: [ ]; in: The probability that a smart meter node is in a healthy state; The probability that a smart meter node is in a slightly aged state; The probability that a smart energy meter node is in a Class A potential fault state; The probability that a smart meter node is in a Class B potential fault state; the sum of the four probabilities is 1. The smart energy meter node determines its status according to preset status rules.

[0041] The preset state rules include the following: when If the value is greater than 0.8, the status is determined to be healthy; when If the probability is the highest among the four categories and this condition persists for three diagnostic cycles, the condition is determined to be mild aging, and periodic check-ups are recommended. when or If the value is greater than 0.6, the status is determined to be a potential fault, a predictive maintenance work order is generated, and the result is reported to the global calibration server.

[0042] Application Examples The complete implementation process of the method of the present invention is described for an urban substation area containing N=500 smart energy meter nodes. During system initialization, the global verification server is located at the center of the substation, and the smart energy meter nodes are connected through a LoRa multi-hop network. The network topology is automatically generated based on geographical location, and the number of hops in each path does not exceed 5 hops to ensure communication reliability.

[0043] I. System Modeling and Problem Definition (1) Network topology construction The global verification server acts as the root node, discovering all smart meter nodes through wireless scanning and calculating the shortest path topology using Dijkstra's algorithm, dividing the smart meters into R=5 paths. Each path starts from a terminal node (such as a smart meter deployed in a residential area), and forwards hop-by-hop to the global verification server via relay nodes (smart meters deployed on streetlight poles or transformers). For example, a typical path includes a terminal point r=1 (Mr=3 relay nodes). The path loss model adopts the Okumura-Hata model, considering shadow fading in urban environments and channel power gain. Based on real-time RSSI measurements (typical -90 dBm).

[0044] (2) Data and model initialization Each smart meter node n (n ∈ {1,2,...,500}) participates in the global communication rounds. k When =1, collect the local detection dataset. This dataset contains time-series operational data, such as voltage values ​​U (range 220V ± 10%), current values ​​I (0-100A), active power P (0-22kW), reactive power Q (0-10kVar), power factor PF (0.5-1.0), and historical error values ​​ε (±0.5%). Dataset size. =1000 samples, sampling frequency 1Hz. The diagnostic model is an LSTM network, the input feature x is time series data of the past 24 hours (dimension [24,6]), and the output... The current error state (regression value) ), fault type (classification: [normal, aging, interference]) and health score (0-100 points).

[0045] Initial parameter vector Initialize from a standard normal distribution, and then use the global model of the global verification server. Random initialization.

[0046] (3) Definition of objective function.

[0047] This invention minimizes the global loss function. Simultaneously minimize total system latency. ,in and This includes computational and communication latency. Constraints include power. =0.1W, frequency =100Hz. This multi-objective optimization problem is decomposed into model optimization and resource optimization subproblems using the Lagrange multiplier method.

[0048] II. Personalized Meta-Learning Model Update Mechanism To overcome the challenges of non-IID data (such as data distribution shifts caused by differences in electromagnetic interference in different regions), a meta-learning-based personalized update is introduced.

[0049] (1) Initialization and global broadcast exist k =1 round, global check server selects subset (∣) |=300 (based on random sampling) will participate in the training. Broadcast to Broadcasts use the CSMA / CA protocol to avoid collisions, with a delay of less than 1 second.

[0050] (2) Personalized selection of optimal learning rate Each smart energy meter n from Partitioning the temporary verification set (20% of the data, 200 samples). Candidate learning rates {α1=0.001, α2=0.005, ..., =0.1} (J=10). For each Perform one gradient descent: ; in, Estimated using the Adam optimizer (momentum β1=0.9, β2=0.999).

[0051] choose For example, for a smart energy meter with strong electromagnetic interference at node n=100, =0.005 to accommodate rapidly changing data.

[0052] (3) Local model training use and complete Perform L=10 local iterations: ; in, For a batch size of 32, there are random samples.

[0053] Training was performed using the PyTorch framework on the embedded processor of the smart energy meter node, with a single iteration time of <0.1s.

[0054] (4) Parameter upload Uploaded to the parent node, Gaussian noise (σ=0.01) is added to protect parameters using differential privacy. The upload protocol is TDMA, and time slots are allocated based on path priority.

[0055] III. Multi-hop Network Latency Optimization Strategies Jointly optimize computing and communication resources to minimize latency in each round.

[0056] (1) End-to-end delay modeling. For terminal nodes r : ; in, =106 periods / sample =1000, =-174dBm / Hz.

[0057] For relay nodes m : ; in, , =5, =125 kHz.

[0058] (2) Optimize problem construction: ; Among them, the transmission power of each smart energy meter node The upper limit is Calculate frequency The upper limit is and the upper limit of energy consumption .

[0059] (3) Problem Solving. Block coordinate descent is adopted: first fix the relay node. Optimize terminal nodes Using successive convex approximation, for At the Taylor expansion reference point Taylor expands the lower bound: ; The convex subproblem was solved using the CVXPY tool (in simulation), and converged after 10 iterations.

[0060] IV. Model Aggregation and Self-Diagnosis Execution (1) Model aggregation Global verification server receives back, ; Add differential privacy noise 0.005.

[0061] (2) Model distribution and self-diagnosis Distribute the data to all smart meter nodes. Perform online verification, inputting window data every 1 minute for calculation. ,like Trigger alarm reporting (via SMS or APP). Self-diagnose and output probability [normal: 0.9, aging: 0.05, fault A: 0.05]. If the fault probability > 0.2 for 3 minutes, generate a maintenance work order.

[0062] (3) Data closure and continuous model evolution. New data (such as...) Add alarm tags to (Weak labels are generated using threshold rules), and the results are returned to form a closed loop.

[0063] In addition, this embodiment also provides an online verification and fault diagnosis system for smart energy meter calibration, the system including a global calibration server and systems deployed in the power grid. One smart energy meter node; The system is used to perform the following steps: Step 1: The global verification server will set the current global model parameters. The training configuration for this round is packaged and broadcast via a multi-hop network to the set of nodes selected to participate in the training for this round. All smart energy meter nodes The smart energy meter node Includes terminal nodes and relay nodes; Step 2: Each smart meter node Receive global model parameters After configuring this round of training, the following operations will be executed in parallel: Operation 1: Solve for the smart energy meter nodes Optimal resource allocation strategy ,in, To achieve the optimal transmission power, To optimize the calculation frequency; dynamically adjust the nodes of the smart energy meter. The local CPU frequency is And set the transmission power to ; Operation 2: Smart meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. and use Detecting datasets locally Above, execute After the next iteration, the updated local model parameters are obtained. ; Step 3: Smart meter node Will Utilizing optimal transmission power Upload; Step 4: The global verification server checks the received data... Perform global model aggregation to obtain a new global model. ; Step 5: The global verification server will generate the new global model. Distribute the data to all smart meter nodes in the power grid; Step 6: Each smart meter node will... This serves as the online diagnostic model for online verification and fault self-diagnosis in this round.

[0064] Finally, it should be noted that the above embodiments are merely illustrative and explanatory of the present invention, and are not intended to limit the present invention to the scope of the described embodiments. Furthermore, those skilled in the art will understand that the present invention is not limited to the above embodiments, and many more variations and modifications can be made based on the teachings of the present invention, all of which fall within the scope of protection claimed by the present invention.

Claims

1. A method for online verification and fault diagnosis of a smart energy meter calibration system, characterized in that, The method is applied to systems including a global verification server and systems deployed in the power grid. In a system of smart energy meter nodes; The method includes the following steps: Step 1: The global verification server will set the current global model parameters. The training configuration for this round is packaged and broadcast via a multi-hop network to the set of nodes selected to participate in the training for this round. All smart energy meter nodes The smart energy meter node Includes terminal nodes and relay nodes; Step 2: Each smart meter node Receive global model parameters After configuring this round of training, the following operations will be executed in parallel: Operation 1: Solve for the smart energy meter nodes Optimal resource allocation strategy ,in, To achieve the optimal transmission power, To optimize the calculation frequency; dynamically adjust the nodes of the smart energy meter. The local CPU frequency is And set the transmission power to ; Operation 2: Smart meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. and use Detecting datasets locally Above, execute After the next iteration, the updated local model parameters are obtained. ; Step 3: Smart meter node Will Utilizing optimal transmission power Upload; Step 4: The global verification server checks the received data... Perform global model aggregation to obtain a new global model. ; Step 5: The global verification server will generate the new global model. Distribute the data to all smart meter nodes in the power grid; Step 6: Each smart meter node will... This serves as the online diagnostic model for online verification and fault self-diagnosis in this round.

2. The online verification and fault diagnosis method for a smart energy meter calibration system according to claim 1, characterized in that, In step 1, the global model adopts a long short-term memory network structure, including an input layer, a hidden layer, and an output layer; the output layer includes a regression head that outputs the measurement error estimate at the current time and a classification head that outputs the probability distribution of the health status.

3. The online verification and fault diagnosis method for a smart energy meter calibration system according to claim 2, characterized in that, In step 2, the solution obtains the smart energy meter node. Optimal resource allocation strategy This includes the following sub-steps: Step 2.11: Calculate the terminal node Delay The formula is as follows: ; in, Calculate the time locally; For model upload time; For terminal nodes The number of local training iterations; For terminal nodes The average number of CPU cycles required to process one data sample; For terminal nodes The size of the local dataset; For terminal nodes CPU calculation frequency, in Hz; This refers to the size of the model parameter vector, in bits. To be assigned to terminal nodes Uplink communication bandwidth, in Hz; For terminal nodes The transmit power, measured in W; For terminal nodes Channel power gain to its parent node; This represents the noise power spectral density, in W / Hz. Step 2.12: Calculate relay nodes Delay The formula is as follows: ; in, For relay nodes The calculation time; For relay nodes Upload time; The forwarding time required to forward all of its child node model parameters; For relay nodes The number of local training iterations; For relay nodes Average number of CPU cycles required to process a single sample; For relay nodes The size of the local dataset; For relay nodes The CPU has a high computing frequency, measured in Hz; For relay nodes The number of child nodes; For relay nodes Uplink speed; To be assigned to relay nodes Uplink communication bandwidth, in Hz; For relay nodes The transmit power, in watts (W); For relay nodes Channel power gain to its parent node; Step 2.13: Based on the terminal node Delay and relay nodes Delay The optimization objective is to minimize the total system latency in this training round, as shown in the following formula: ; in, Total system delay; The total number of global rounds executed in the entire federated learning task; A set of terminal nodes; For terminal nodes The set of all relay nodes on the parameter upload path; For global communication rounds; Step 2.14: Construct the following constraints: Each smart energy meter node Calculation frequency The upper limit is the maximum currently available computation frequency. Transmission power The maximum transmit power currently available The upper limit of energy consumption is ; Step 2.15: Solve for the smart energy meter nodes based on the objective function and constraints. Optimal resource allocation strategy ; Step 2.16: Dynamically adjust the local CPU frequency of the terminal node and relay node to... And set the transmission power to .

4. The online verification and fault diagnosis method for a smart energy meter calibration system according to claim 3, characterized in that, In step 2, the smart energy meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. This includes the following sub-steps: Step 2.21: Smart Energy Meter Node receive Then, in a local temporary verification set Above, for a set of predefined candidate learning rates Perform rapid evaluation; for each candidate learning rate , Smart energy meter nodes Perform gradient descent and compute its value at the given candidate learning rate. loss value on The formula is as follows: ; in, It is a smart energy meter node exist Gradient estimation at , These are real labels; Step 2.22: Smart Energy Meter The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. The formula is as follows: 。 5. The online verification and fault diagnosis method for a smart energy meter calibration system according to claim 4, characterized in that, In step 2, the smart energy meter The local update rules are as follows: ; in, For smart energy meter nodes In the In the round of global training, the first... The model parameter vector updated after the next local iteration; For smart energy meter nodes In the In the round of global training, the first... The model parameter vector updated after the next local iteration; For smart energy meter nodes The local loss function gradient operator; From A batch of data randomly sampled from the data; This represents the number of steps in the local iteration; after After the second iteration, the locally updated model parameters are obtained. .

6. The online verification and fault diagnosis method for a smart energy meter calibration system according to claim 5, characterized in that, In step 4, the global verification server, based on the received... Perform global model aggregation to obtain a new global model. The formula is as follows: ; in, Indicates the first The smart meter node at the The local dataset used during global training.

7. The online verification and fault diagnosis method for a smart energy meter calibration system according to claim 6, characterized in that, Step 6, the online verification and fault self-diagnosis, includes the following: Step 6.1: The smart energy meter nodes collect operational data in real time; the operational data is then input into the online diagnostic model according to a preset cycle; Step 6.2: The regression head of the online diagnostic model outputs the current time-to-time measurement error estimate. ;Will Compare with a preset error threshold; if | If the preset error threshold is met, an error exceeding the tolerance alarm will be generated immediately and transmitted to the global calibration server and operation and maintenance management system through the event reporting mechanism. Meanwhile, the classification head output health status probability distribution of the online diagnostic model is as follows: [ ]; in: The probability that a smart meter node is in a healthy state; The probability that a smart meter node is in a slightly aged state; The probability that a smart energy meter node is in a Class A potential fault state; The probability that a smart meter node is in a Class B potential fault state; the sum of the four probabilities is 1. The smart energy meter node determines its status according to preset status rules.

8. The online verification and fault diagnosis method for a smart energy meter calibration system according to claim 7, characterized in that, The preset state rules include the following: when If the value is > 0.8, the status is determined to be healthy; when If the probability is the highest among the four categories and this condition persists for three diagnostic cycles, the condition is determined to be mild aging, and periodic check-ups are recommended. when or If the value is greater than 0.6, the status is determined to be a potential fault, a predictive maintenance work order is generated, and the result is reported to the global calibration server.

9. An online verification and fault diagnosis system for a smart energy meter calibration system, characterized in that, The system includes a global verification server and components deployed in the power grid. One smart energy meter node; The system is used to perform the following steps: Step 1: The global verification server will set the current global model parameters. The training configuration for this round is packaged and broadcast via a multi-hop network to the set of nodes selected to participate in the training for this round. All smart energy meter nodes The smart energy meter node Includes terminal nodes and relay nodes; Step 2: Each smart meter node Receive global model parameters After configuring this round of training, the following operations will be executed in parallel: Operation 1: Solve for the smart energy meter nodes Optimal resource allocation strategy ,in, To achieve the optimal transmission power, To optimize the calculation frequency; dynamically adjust the nodes of the smart energy meter. The local CPU frequency is And set the transmission power to ; Operation 2: Smart meter node The candidate learning rate that produces the minimum loss value is selected as the optimal personalized learning rate for this round. and use Detecting datasets locally Above, execute After the next iteration, the updated local model parameters are obtained. ; Step 3: Smart meter node Will Utilizing optimal transmission power Upload; Step 4: The global verification server checks the received data... Perform global model aggregation to obtain a new global model. ; Step 5: The global verification server will generate the new global model. Distribute the data to all smart meter nodes in the power grid; Step 6: Each smart meter node will... This serves as the online diagnostic model for online verification and fault self-diagnosis in this round.