A remote monitoring method for electrically replacing the continuous metering of a meter
By constructing a data format conversion model and a Kalman filtering algorithm, the problems of data inheritance errors and insufficient status monitoring during live meter replacement are solved, realizing the continuity of metering data and the reliability of anomaly detection, which is suitable for meter replacement in smart grid environments.
Patent Information
- Application Number
- CN202511243802.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-09-02
AI Technical Summary
During the process of replacing electricity meters while the power is on, existing technologies suffer from problems such as data inheritance errors and insufficient equipment status monitoring, which affect the continuity and security of metering data.
By constructing a data format conversion model between old and new meters, a standardized mapping of data formats is achieved. Furthermore, a state estimation and anomaly detection mechanism based on Kalman filtering is introduced to ensure that data is continuously inherited in the new meters and that the metering status is monitored.
It achieves continuity and consistency of metering data under uninterrupted power supply conditions, avoids data migration errors, and improves the sensitivity of anomaly detection and the system's intelligent diagnostic capabilities.
Smart Images

Figure CN120750030B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote monitoring technology for continuous metering, and more specifically, to a remote monitoring method for continuous metering with live meter replacement. Background Technology
[0002] Live meter replacement is used to ensure the normal operation of electricity metering equipment without affecting the power supply. During live meter replacement, the system can replace the meter using technologies such as wireless communication and data synchronization without interrupting the power supply. However, the following potential faults and threats may still occur during this process:
[0003] Data inheritance errors: When an electricity meter is replaced, the data from the old meter needs to be accurately migrated to the new meter. Errors during data transmission, network instability, equipment malfunctions, or incompatibility issues may lead to incomplete or incorrect data inheritance, affecting subsequent electricity billing and customer service.
[0004] Insufficient equipment status monitoring: During live meter replacement, if problems such as improper meter installation or abnormal meter connection occur, the existing monitoring system may not be able to detect them in time, thus delaying fault handling and potentially causing electrical fires or other serious safety hazards.
[0005] To address the above problems, this invention proposes a solution. Summary of the Invention
[0006] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a remote monitoring method for continuous metering during live meter replacement. This method addresses technical problems such as data migration distortion, inability to perceive state changes, and interruption of continuous metering during meter replacement by constructing a data format conversion model adapted to the new and old meter protocols, achieving standardized inheritance of historical data, and introducing a state estimation and anomaly detection mechanism based on Kalman filtering.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A remote monitoring method for continuous metering during live meter replacement includes the following steps: receiving raw data from the new meter using a remote monitoring system, parsing its data structure, and constructing a data format conversion model; applying the data format conversion model to the real-time metering data of the old meter to obtain a standardized data packet; synchronizing the standardized data packet to the new meter and performing data verification to complete the inheritance of the meter's historical data; and analyzing the sensor observation data of the new meter using a Kalman filter algorithm to complete meter status estimation and anomaly detection.
[0009] In a preferred embodiment, the process of receiving raw data from the new meter, parsing its data structure, and constructing a data format conversion model based on the remote monitoring system involves: the new meter sending raw data packets to the remote monitoring system via its built-in communication module; the remote monitoring system parsing the communication protocol structure of the raw data packets to generate a protocol dictionary containing field definitions, encoding rules, and verification mechanisms; and constructing a data format conversion model based on the protocol dictionary, wherein the model includes mapping functions from old meter data fields to new meter fields.
[0010] In a preferred embodiment, the new meter sends raw data packets to the remote monitoring system through its built-in communication module. Specifically, when the new meter first connects to the remote monitoring system, it reports device identification information, protocol type, data frame structure, business field definitions, and test data samples to the remote monitoring system through its built-in communication module (which supports communication methods such as GPRS, NB-IoT, or PLC), thus forming raw data packets.
[0011] In a preferred embodiment, the remote monitoring system parses data packets to obtain a protocol dictionary, and constructs a data format conversion model based on the protocol dictionary. The specific steps are as follows: Parse each business field of the new meter based on the protocol dictionary, and establish a one-to-one field mapping relationship with the unified standard format (IEC 62056 protocol or enterprise internal standard) adopted by the remote monitoring system; detect the data unit system and precision parameters of each business field of the new meter, and record them in the mapping rules for subsequent unified processing of old meter data; parse the timestamp format of the new meter and generate a unified timestamp conversion rule so that the time axis of the old meter data and the new meter data can be directly aligned; identify the communication frame verification method used by the new meter and incorporate the verification method into the model to ensure that the old meter data meets the same integrity verification logic after conversion; integrate the above field mapping relationship, unit and precision parameters, timestamp conversion rules and verification logic to construct a data format conversion model, and store it in the remote monitoring system for direct use in subsequent old meter data format conversion.
[0012] In a preferred embodiment, applying the data format conversion model to the real-time metering data of the old meter to obtain a standardized data packet specifically involves: collecting the operating parameters of the old meter through the communication module built into the meter to obtain the raw dataset; inputting the raw dataset into the data format conversion model to generate a standardized data packet containing the main data.
[0013] In a preferred embodiment, the step of collecting the operating parameters of the old meter through the built-in communication module of the meter to obtain the original dataset is as follows: the old meter uses its built-in communication module to collect parameters such as voltage, current, active power, reactive power, instantaneous load, cumulative electrical energy and collection timestamp in real time to form the original dataset.
[0014] In a preferred embodiment, the steps of inputting the original dataset into the data format conversion model to generate a standardized data packet containing the main data are as follows: According to the field mapping relationship of the data format conversion model, the data fields of the old meters are mapped one-to-one to the unified standard format fields; based on the unit and precision parameters of the data format conversion model, the units and precision of the old meter data are standardized to ensure data consistency between the old and new meters; according to the timestamp conversion rules preset by the data format conversion model, the timestamp encoding format of the old meters is converted to a unified standard timestamp; source device information, acquisition frequency, protocol version, and data conversion rule identifier are written into the standardized data packet to automatically verify data compatibility when the new meter inherits the data; a cyclic redundancy check (CRC) polynomial operation is performed on the main data of the standardized data packet to generate a checksum for subsequent data integrity verification; the checksum is appended to the end of the standardized data packet to form the final transmission data packet; the final transmission data packet is sent to the remote monitoring system through the communication network as the data packet for subsequent new meter inheritance.
[0015] In a preferred embodiment, synchronizing standardized data packets to the new meter and performing data verification to complete the inheritance of historical meter data includes the following steps: detecting the access status of the new meter and receiving the final transmission data packet from the old meter or data relay device; extracting the Cyclic Redundancy Check (CRC) code from the tail of the final transmission data packet; recalculating the CRC value for the main body data of the final transmission data packet; comparing the recalculated check value with the extracted check code: if the check values match, parsing the main body data and synchronizing it with the new meter; if the check values do not match, generating an error information packet containing an error identifier and uploading the error information packet to the system backend.
[0016] In a preferred embodiment, the step of analyzing the sensor observation data of a new meter based on the Kalman filter algorithm to complete meter state estimation and anomaly detection includes the following steps: constructing an observation data vector based on the sensor observation data of the new meter, and initializing the input parameters of the Kalman filter algorithm, including an initial state estimation vector, an initial covariance matrix, a state transition matrix, and an observation noise covariance matrix; executing the iterative process of the Kalman filter algorithm, and calculating the optimal smoothed state estimation vector at the current moment based on the current state estimation vector and covariance matrix through the state update equation; calculating the residual between the observation data vector and the optimal smoothed state estimation vector, and determining whether the magnitude of the residual exceeds a preset anomaly threshold: if yes, it is determined that the current operating state of the meter is abnormal; otherwise, it returns to the previous step.
[0017] In a preferred embodiment, the state transition matrix is generated by a historical load training model, which includes online modeling of the state transition relationship based on the historical load curve of the new meter and real-time power fluctuation characteristics, and iterative adjustment of the parameters of the state transition matrix.
[0018] In a preferred embodiment, the anomaly threshold is determined based on the confidence level set by the system, combined with the Mahalanobis distance of the residuals and the current covariance matrix, and calculated according to the chi-square distribution critical value, and is used to determine whether the current state is within the range of statistical anomalies.
[0019] A remote monitoring device for continuous metering during live meter replacement includes: a conversion model construction module, used to receive raw data from the new meter based on the remote monitoring system, parse its data structure, and construct a data format conversion model; a format conversion module, used to apply the data format conversion model to the real-time metering data of the old meter to obtain a standardized data packet; a data integration module, used to synchronize the standardized data packet to the new meter and perform data verification to complete the inheritance of the meter's historical data; and an anomaly detection module, used to analyze the sensor observation data of the new meter based on the Kalman filter algorithm to complete meter status estimation and anomaly detection.
[0020] A remote monitoring device for continuous metering with live replacement includes a memory and a processor: the memory is used to store a program; the processor is used to execute the program to implement the various steps of the remote monitoring method for continuous metering with live replacement.
[0021] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a remote monitoring method for continuous metering with live replacement of meters.
[0022] The technical effects and advantages of the remote monitoring method for continuous metering during live meter replacement according to the present invention are as follows:
[0023] 1. This invention constructs a data format conversion model between old and new meters, realizing a unified and standardized mapping under different communication protocols, electricity metering units, and timestamp formats. This enables the historical data of the old meters to be successfully inherited to the new meters without interrupting power supply, ensuring the continuity and consistency of metering data during the replacement process, and avoiding errors and workload caused by manual meter reading or data migration.
[0024] 2. This invention introduces a dynamic state estimation method based on Kalman filtering, combines real-time observation data from new meters with historical operating loads, and establishes a system state adaptive prediction mechanism. This mechanism can effectively identify metering anomalies and system drift. Furthermore, by iteratively optimizing the state transition matrix parameters, it improves the stability of state estimation and the sensitivity of anomaly detection, thereby enhancing the intelligent diagnostic capabilities of the remote monitoring system in complex power grid environments. Attached Figure Description
[0025] Figure 1 A flowchart illustrating a remote monitoring method for continuous metering during live meter replacement, provided by an embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram of the mean residual convergence curve during the state transition matrix parameter optimization process provided in this embodiment of the invention.
[0027] Figure 3 This is a schematic diagram of a remote monitoring device for continuous metering with live meter replacement, provided as an embodiment of the present invention.
[0028] Figure 4 This is a structural block diagram of an exemplary electronic device provided for implementing embodiments of the present disclosure.
[0029] Figure 5 This is a schematic diagram of an exemplary storage medium that can be used to implement embodiments of the present disclosure, as provided in the embodiments of the present invention. Detailed Implementation
[0030] 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.
[0031] Example 1, Figure 1 This invention provides a remote monitoring method for continuous metering during live meter replacement, comprising the following steps:
[0032] S1, based on the remote monitoring system, receives the raw data from the new meter, parses its data structure and constructs a data format conversion model;
[0033] S2, apply the data format conversion model to the real-time metering data of the old meters to obtain standardized data packets;
[0034] S3 synchronizes the standardized data packets to the new meter and performs data verification to complete the inheritance of the meter's historical data.
[0035] S4 analyzes the sensor observation data of the new meter based on the Kalman filter algorithm to complete the meter status estimation and anomaly detection.
[0036] This embodiment constructs a data format conversion model between old and new meters, achieving standardized mapping and inheritance of historical data, ensuring the continuity and structural compatibility of metering data during the replacement of new meters. Simultaneously, it introduces a dynamic state estimation and residual monitoring mechanism based on Kalman filtering, which not only improves the operational reliability of new meters in the initial stage of connection but also provides adaptive modeling capabilities for operational state drift. The state transition matrix parameters are initialized through fitting historical load sequences and can be iteratively optimized under residual-driven conditions, thereby improving the accuracy and robustness of state estimation. Overall, this invention provides a remote monitoring method that supports live replacement, continuous metering, anomaly detection, and parameter adaptation capabilities, suitable for ensuring operational stability in large-scale smart meter connection scenarios.
[0037] S1, based on the remote monitoring system receiving raw data from the new meter, parses its data structure and constructs a data format conversion model, specifically:
[0038] S11, the new meter sends raw data packets to the remote monitoring system through its built-in communication module;
[0039] S12, the remote detection system parses the communication protocol structure of the original data packet and generates a protocol dictionary containing field definitions, encoding rules and verification mechanisms;
[0040] S13, Construct a data format conversion model based on the protocol dictionary, the model containing mapping functions from old meter data fields to new meter fields.
[0041] In this embodiment, the new meter sends raw data packets to the remote monitoring system through its built-in communication module, specifically:
[0042] When the new meter is first connected to the remote monitoring system, it reports the device identification information, protocol type, data frame structure, business field definition and test data sample to the remote monitoring system through its built-in communication module (which supports communication methods such as GPRS, NB-IoT or PLC), forming a raw data packet.
[0043] The remote detection system parses the communication protocol structure of the original data packets and generates a protocol dictionary containing field definitions, encoding rules, and verification mechanisms, specifically:
[0044] After receiving the raw data packets, the remote monitoring system parses the packets using a protocol parsing engine, extracting and identifying various elements of the communication protocol, including field order, field length, data type, encoding method, timestamp format, unit system, precision parameters, and verification rules. These elements are then systematically organized to generate a protocol dictionary. This protocol dictionary serves as the foundational reference document for subsequent data format conversions.
[0045] The specific steps for constructing the data format conversion model based on the protocol dictionary are as follows:
[0046] S131, based on the protocol dictionary, parses the various business fields of the new meter and establishes a one-to-one field mapping relationship with the unified standard format (IEC 62056 protocol or enterprise internal standard) adopted by the remote monitoring system, forming the basic framework of the mapping function;
[0047] S132, detect the data unit system and precision parameters of each business field of the new meter, record them in the mapping rules, and construct a numerical conversion function for subsequent unified processing of the old meter data;
[0048] S133, parse the timestamp format of the new meter, generate a unified timestamp conversion function, and ensure that the time axis of the old meter data and the new meter data can be directly aligned;
[0049] S134, Identify the communication frame verification method used by the new meter, construct a verification conversion function, incorporate the verification method into the model, and ensure that the old meter data meets the same integrity verification logic after conversion;
[0050] S135 integrates the above field mapping relationships, numerical conversion functions, timestamp conversion functions, and verification conversion functions to form a complete mapping function system, constructs a data format conversion model, and stores it in the remote monitoring system for direct use in subsequent old meter data format conversions.
[0051] The mapping function specifically includes:
[0052] Field mapping function: Implements the conversion of old meter field names and locations to corresponding fields in the new meter;
[0053] Numerical conversion functions: Enable numerical conversion between different unit systems and precision parameters;
[0054] Timestamp conversion function: Implements conversion between different timestamp formats;
[0055] Verification conversion function: Implements conversion and verification between different verification algorithms.
[0056] In summary, through this embodiment, the remote monitoring system obtains a data format conversion model, ensuring that historical data from old meters and real-time data from new meters can be integrated under a unified data structure and accuracy standard, providing a foundation for subsequent continuous metering and anomaly detection.
[0057] S2 applies the data format conversion model to the real-time metering data of the old meters to obtain standardized data packets, specifically:
[0058] S21, collects the operating parameters of the old meter through the built-in communication module of the meter to obtain the raw dataset;
[0059] S22, input the original dataset into the data format conversion model to generate a standardized data package containing the main data.
[0060] In this embodiment, the process of collecting the operating parameters of the old meter through the built-in communication module of the meter to obtain the raw dataset is as follows:
[0061] The old meters used their built-in communication modules to collect parameters such as voltage, current, active power, reactive power, instantaneous load, cumulative electrical energy, and collection timestamps in real time, forming a raw dataset.
[0062] The specific steps for converting the original dataset into a data format conversion model to generate a standardized data package containing the main data are as follows:
[0063] S221, according to the field mapping relationship of the data format conversion model, map the data fields of the old meters to the unified standard format fields one by one;
[0064] S222, based on the unit and precision parameters of the data format conversion model, standardizes the unit and precision of the old meter data to ensure the consistency of data between the old and new meters.
[0065] S223, according to the timestamp conversion rules preset in the data format conversion model, convert the old meter timestamp encoding format into a unified standard timestamp;
[0066] S224: Write source device information, acquisition frequency, protocol version and data conversion rule identifier into the standardized data packet so that data compatibility can be automatically verified when new meters are inherited in the future.
[0067] S225, Perform Cyclic Redundancy Check (CRC) polynomial operation on the main data of the standardized data packet to generate a number of check bits for subsequent data integrity verification; append the check bits to the end of the standardized data packet to form the final transmission data packet; the final transmission data packet is sent to the remote monitoring system through the communication network as the data packet inherited by subsequent new meters.
[0068] S3 synchronizes the standardized data packet to the new meter and performs data verification to complete the inheritance of historical meter data, including the following steps:
[0069] S31, detects the connection status of the new meter and receives the final transmission data packet from the old meter or data relay equipment;
[0070] S32, Extract the Cyclic Redundancy Check (CRC) code from the tail of the final transmitted data packet;
[0071] S33, recalculate the cyclic redundancy check value for the main data of the final transmitted data packet;
[0072] S34, compare the recalculated verification value with the extracted verification code: if the verification values match, parse the main data and synchronize the data with the new meter; if the verification values do not match, generate an exception information packet containing an error identifier and upload the exception information packet to the system backend.
[0073] Specifically: After a new meter is put into service, its communication module establishes a connection with the remote monitoring system via a network. The remote monitoring system confirms successful connection of the new meter through polling and obtains its device identification code, which serves as the basis for subsequent data matching.
[0074] The remote monitoring system extracts the CRC checksum at the end of the data packet associated with the new meter in a fixed format. The CRC checksum, calculated based on the main data in step S2, is located several bytes at the end of the data packet.
[0075] The remote monitoring system re-performs CRC polynomial calculation on the main body of the standardized data packet (using the same polynomial and initial values as when constructing the model) to generate a new checksum, which is then compared byte-by-byte with the original checksum extracted in step S32. If the checksums match, data synchronization is performed; otherwise, an error message containing an error code is uploaded to the system backend.
[0076] This embodiment ensures that the synchronization process of historical data between old and new meters has a strict data integrity verification mechanism, avoiding the inheritance of errors caused by transmission damage or equipment malfunction, and providing a reliable data foundation for subsequent continuous metering and anomaly detection.
[0077] S4 analyzes the sensor observation data of the new meter based on the Kalman filter algorithm to complete the meter status estimation and anomaly detection.
[0078] It should be noted that, in order to distinguish between the Kalman filter time step and the modeling window of the state transition matrix parameters, the discrete time step in the filtering process is represented by the subscript k in this embodiment, while the data samples involved in the state transition matrix training process are represented by the corresponding timestamp t.
[0079] In this embodiment, the step of analyzing the sensor observation data of the new meter based on the Kalman filter algorithm to complete the meter status estimation and anomaly detection includes the following steps:
[0080] S41, construct an observation data vector based on the sensor observation data of the new meter, and initialize the input parameters of the Kalman filter algorithm, including the initial state estimation vector, the initial covariance matrix, the state transition matrix, and the observation noise covariance matrix;
[0081] S42 executes the iterative process of the Kalman filter algorithm, and calculates the optimal smooth state estimate vector at the current time through the state update equation based on the current state estimate vector and covariance matrix.
[0082] S43, calculate the residual between the observed data vector and the optimal smooth state estimation vector, and determine whether the magnitude of the residual exceeds the preset abnormal threshold: if yes, it is determined that the current operating state of the meter is abnormal; otherwise, return to the previous step S42.
[0083] The state update equation is the process of calculating the predicted state vector and updating the optimal smooth state estimation vector using Kalman filtering.
[0084] Specifically, the new meter's sensors collect observation data including voltage U, current I, active power P, and reactive power Q, and upload this data to the remote monitoring system to construct an observation data vector. ;
[0085] At the same time, the initial state estimation vector is set according to the system initialization settings. The covariance matrix is initialized as a diagonal positive definite matrix, representing the historical mean. State transition matrix Generated by training the model with historical load;
[0086] Observation noise covariance matrix (Process noise) and (Environmental noise) Initial values are set based on the manufacturer's specified accuracy and empirical values of on-site environmental noise during initialization;
[0087] The remote monitoring system first uses the state estimation vector from the previous moment. With state transition matrix Perform state prediction calculations and output the predicted state vector. ;
[0088] Subsequently, based on the prediction covariance update formula and combined with the process observation noise covariance matrix, the prediction covariance matrix is calculated. ;
[0089] By calculating the Kalman gain matrix Combined with the observation data vector at the current moment For the predicted state vector Make corrections and output the optimal smooth state estimate vector. And update the covariance matrix simultaneously. ;
[0090] The difference between the current observation vector and the optimal smooth state estimate vector is calculated to form the residual vector. ;
[0091] The residual vector Substitute into the Mahalanobis distance calculation model, and combine with the current covariance matrix Solving for weighted distance ;
[0092] The obtained weighted distance With abnormal threshold Compare:
[0093] If the weighted distance exceeds the anomaly threshold, the system determines that there is an anomaly in the current observation, automatically records the anomaly points and uploads them;
[0094] If the weighted distance is within the abnormal threshold range, the system determines that the current estimate is reliable and returns to S42 to perform the state update for the next time step;
[0095] The observation data vector is a column vector arranged in order of sampling period, and has been processed by time alignment and unit standardization.
[0096] The abnormal threshold Based on the confidence level set by the system The value is determined by combining the Mahalanobis distance of the residuals with the current covariance matrix and calculating according to the chi-square distribution critical value. This value is used to determine whether the current state is within the range of statistical anomalies, where n is the vector dimension of the residuals.
[0097] The specific formula for the observation data vector is as follows:
[0098]
[0099] In the formula, k represents the current sampling time.
[0100] The specific formula for the initial state estimation vector is as follows:
[0101]
[0102] In the formula, W is the length of the history window used for initialization. For mathematical expectation, This means that for the observed data z between the selected time window kW and k, the mean vector is calculated in each dimension as the initial state estimate.
[0103] The state covariance matrix is initialized as a diagonal positive definite matrix, as shown in the following formula:
[0104]
[0105] In the formula, It is the identity matrix. The state error variance is a built-in parameter of the system.
[0106] The specific formula for calculating the predicted state vector is as follows:
[0107]
[0108] In the formula, Represented as the state estimation vector from the previous time step. and state transition matrix The predicted state vector obtained by performing matrix multiplication.
[0109] The specific formula for calculating the predicted covariance matrix is as follows:
[0110]
[0111] The specific formula for calculating the Kalman gain matrix is as follows:
[0112]
[0113] In the formula, Define the mapping relationship between the state vector and the observation vector for the current observation matrix. To adapt to changes in observation channels, sensor configurations, or observation accuracy over time, It is usually dynamically adjusted over time. If the system observation structure is fixed, it can be set as a constant matrix.
[0114] The specific formula for calculating the optimal smooth state estimation vector is as follows:
[0115]
[0116] The specific formula for updating the covariance matrix is as follows:
[0117]
[0118] The specific formula for calculating the residual vector is as follows:
[0119]
[0120] The specific formula for calculating the weighted distance is as follows:
[0121]
[0122] In the formula, For residual covariance.
[0123] In this embodiment, the state transition matrix is generated by a historical load training model, including online modeling of the state transition relationship based on the historical load curves of the new meters and real-time power fluctuation characteristics, and iterative adjustment of the parameters of the state transition matrix, specifically:
[0124] Using the historical active power sequence of newly connected meters over a recent period as the data basis, a sliding time window of length N is set to extract the original load sequence. and instantaneous fluctuation As a feature of the training data, the instantaneous fluctuation is obtained through first-order difference calculation, as shown in the following formula:
[0125]
[0126] The above features are combined with the input vector at each time step to construct the input feature matrix. At the same time, the observation state is defined as... Collect the corresponding state sequences Ultimately, and Align them to form N state transition samples. , used to fit the state transition model.
[0127] Then, based on the state transition sample sequence constructed above, the Exponentially Weighted Recursive Least Squares (EWRLS) method is used to process the state transition matrix in the linear state-space model. The initial parameters are fitted and estimated. Specifically:
[0128] Let the recurrence relation be In Flattened into a parameter vector Each sample is then converted into a regression form, as shown in the following expression:
[0129]
[0130] in, For the Kronecker product operation of matrices, the parameter vector is obtained through the above steps. The estimated value is continuously updated with each sample iteration, and the result of each recursive iteration is denoted as . Finally, the converged estimate is obtained. , as the parameter vector of the first round state transition matrix Reconstruct the initial state transition matrix .
[0131] Embedding the initial state transition matrix parameters into the Kalman filter state prediction stage, running at multiple time steps, and collecting the residual sequence between the predicted state and the actual observation. Calculate their mean Standard deviation Covariance ;
[0132] Based on the assumption that the historical residual sequence follows an approximately Gaussian distribution, a drift judgment threshold is set. This is used to identify whether the parameters of the state transition matrix deviate significantly from the actual operating characteristics;
[0133] If the current residual mean If the state transition matrix exceeds the drift detection threshold, it is determined that the current state transition matrix has drifted and needs to be corrected, specifically as follows:
[0134] With residuals As the gradient signal of the objective function, the stochastic gradient descent (SGD) algorithm is used to evaluate the parameters of the state transition matrix. Iterative optimization is performed, and the specific iterative formula is as follows:
[0135]
[0136] In the formula, i represents the iteration round. Learning rate, loss function The weighted residual squared term is calculated using the following formula:
[0137]
[0138] gradient term The specific calculation formula is as follows:
[0139]
[0140] In the formula, For predicting the state;
[0141] To verify convergence, the mean residual was recorded after each iteration. If the mean value shows a monotonically decreasing trend and converges with each iteration, then the state transition matrix is considered to have successfully fitted the current running state.
[0142] Finally, output the parameters of the converged state transition matrix. This is then continuously used in subsequent Kalman filtering processes to achieve dynamic adaptation of the model to changes in power grid operating conditions and improve the accuracy of state estimation.
[0143] The specific formula for calculating the drift judgment threshold is as follows:
[0144]
[0145] Example 2: To verify that the proposed residual-driven adaptive optimization method has good convergence and practical tracking ability when the state transition matrix drifts, the following simulation experiments were conducted in this example:
[0146] (1) Setting the real state transition matrix
[0147] The actual state transition matrix of the system is set as follows:
[0148]
[0149] The initial state is set to Under ideal conditions with no process noise interference, the simulation generates a state sequence of length L = 200, and its update formula is:
[0150]
[0151] (2) Setting the initial state transition matrix
[0152] Suppose that the initial state transition matrix obtained using exponentially weighted recursive least squares (EWRLS) is:
[0153]
[0154] Because of parameter drift from the real system, the state estimate obtained by Kalman prediction will continue to produce systematic residuals.
[0155] (3) Iterative optimization process
[0156] Using the true state as the observation value, and based on The residuals between the estimated states obtained by Kalman prediction are used as the optimization objective.
[0157] The loss function is constructed as follows:
[0158]
[0159] To simplify experimental implementation and focus on verifying the state transition matrix parameter optimization strategy, this embodiment sets the residual loss function to be... This means that the state prediction residuals are measured in the form of the squared L2 norm. This form applies when the covariance matrix is an identity matrix (i.e., ...). Under the assumption that ), the weighted Mahalanobis distance loss function is:
[0160]
[0161] Essentially equivalent. In practical engineering applications, if the errors in each dimension of the state exhibit heteroscedasticity or statistical correlation, covariance estimation can be introduced to further enhance robustness. In this embodiment, to avoid the interference of covariance estimation errors on optimization convergence, the identity matrix is used as a covariance approximation, thereby more purely observing the adaptive adjustment capability of the state transition matrix parameters and the monotonically converging trend of the residual mean.
[0162] Furthermore, stochastic gradient descent (SGD) is used on the state transition matrix parameter vector. Update:
[0163]
[0164] Learning rate The gradient is calculated according to the chain rule.
[0165] (4) Calculate the mean residual after each iteration. Plot the curve of the mean residual as a function of iteration rounds to test convergence. The results are as follows: Figure 2 As shown, with the iteration, the mean residual shows a monotonically decreasing trend and eventually converges, verifying the effectiveness and robustness of the state transition matrix optimization method under noise-free ideal conditions.
[0166] Example 3,
[0167] A remote monitoring device for continuous metering during live meter replacement, such as Figure 3 As shown, it includes:
[0168] The conversion model building module is used to receive raw data from new meters via a remote monitoring system, parse its data structure, and build a data format conversion model.
[0169] The format conversion module is used to apply the data format conversion model to the real-time metering data of old meters to obtain standardized data packets;
[0170] The data integration module is used to synchronize standardized data packets to the new meter and perform data verification, thus completing the inheritance of the meter's historical data.
[0171] The anomaly detection module is used to analyze the sensor observation data of the new meter based on the Kalman filter algorithm, and to complete the meter status estimation and anomaly detection.
[0172] Example 4,
[0173] A remote monitoring device for continuous metering during live meter replacement, such as Figure 4 As shown, it includes a memory and a processor: the memory is used to store a program; the processor is used to execute the program to implement any of the embodiments in Example 1.
[0174] Since the remote monitoring device for continuous metering with live replacement described in this embodiment is the same device used to implement the method in Embodiment 1 of this invention, those skilled in the art can understand the specific implementation methods and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in this application embodiment will not be described in detail here. Any device used by those skilled in the art to implement the method in this application embodiment falls within the scope of protection of this application.
[0175] Example 5,
[0176] A readable storage medium having a computer program stored thereon, such as Figure 5 As shown, when the computer program is executed by the processor, it implements any of the embodiments in Example 1.
[0177] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0178] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.
[0179] Those skilled in the art will recognize that the modules 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.
[0180] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0181] 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.
[0182] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A remote monitoring method for continuous metering during live meter replacement, characterized in that, Includes the following steps: Based on the remote monitoring system receiving raw data from the new meter, parsing its data structure, and constructing a data format conversion model, the process is as follows: the new meter sends raw data packets to the remote monitoring system through its built-in communication module; the remote monitoring system parses the communication protocol structure of the raw data packets and generates a protocol dictionary containing field definitions, encoding rules, and verification mechanisms; based on the protocol dictionary, a data format conversion model is constructed, which includes mapping functions from old meter data fields to new meter fields. The data format conversion model is applied to the real-time metering data of old meters to obtain standardized data packets. Specifically, the operating parameters of old meters are collected through the built-in communication module of the meter to obtain the raw dataset; the raw dataset is input into the data format conversion model to generate a standardized data packet containing the main data. The standardized data packets are synchronized to the new meter and data verification is performed to complete the inheritance of the meter's historical data. Specifically, this involves: detecting the access status of the new meter and receiving the final transmission data packet from the old meter or data relay device; extracting the cyclic redundancy check (CRC) code from the end of the final transmission data packet; recalculating the CRC value for the main body data of the final transmission data packet; comparing the recalculated check value with the extracted check code; if the check values match, parsing the main body data and synchronizing it with the new meter. If the checksum does not match, an exception information packet containing an error identifier is generated and uploaded to the system backend. The sensor observation data of the new meter are analyzed based on the Kalman filter algorithm to complete the meter status estimation and anomaly detection.
2. The remote monitoring method for continuous metering with live meter replacement according to claim 1, characterized in that, The process of analyzing sensor observation data from new meters based on the Kalman filter algorithm to complete meter status estimation and anomaly detection includes the following steps: Based on the sensor observation data of the new meter, an observation data vector is constructed, and the input parameters of the Kalman filter algorithm are initialized, including the initial state estimation vector, the initial covariance matrix, the state transition matrix, and the observation noise covariance matrix. The iterative process of executing the Kalman filter algorithm calculates the optimal smooth state estimate vector at the current time step through the state update equation based on the current state estimate vector and covariance matrix. Calculate the residual between the observed data vector and the optimal smoothed state estimation vector, and determine whether the magnitude of the residual exceeds the preset anomaly threshold: if yes, it is determined that the current operating state of the meter is abnormal; otherwise, return to the previous step.
3. The remote monitoring method for continuous metering with live meter replacement according to claim 2, characterized in that, The state transition matrix is generated by a historical load training model, which includes online modeling of state transition relationships based on the historical load curves of new meters and real-time power fluctuation characteristics, and iterative adjustment of the parameters of the state transition matrix.
4. The remote monitoring method for continuous metering with live meter replacement according to claim 3, characterized in that, The anomaly threshold is obtained by comparing the Mahalanobis distance of the residuals with the threshold of the chi-square distribution.
5. A remote monitoring device for continuous metering during live meter replacement, characterized in that, include: The conversion model construction module is used to receive raw data from new meters via a remote monitoring system, parse its data structure, and construct a data format conversion model. Specifically, the new meter sends raw data packets to the remote monitoring system through its built-in communication module; the remote monitoring system parses the communication protocol structure of the raw data packets and generates a protocol dictionary containing field definitions, encoding rules, and verification mechanisms; and constructs a data format conversion model based on the protocol dictionary. The model includes mapping functions from old meter data fields to new meter fields. The format conversion module is used to apply the data format conversion model to the real-time metering data of old meters to obtain standardized data packets. Specifically, it collects the operating parameters of old meters through the built-in communication module of the meter to obtain the raw dataset; and inputs the raw dataset into the data format conversion model to generate a standardized data packet containing the main data. The data integration module is used to synchronize standardized data packets to the new meter and perform data verification, completing the inheritance of historical data of the meter. Specifically, it detects the access status of the new meter and receives the final transmission data packet from the old meter or data relay equipment; extracts the cyclic redundancy check code from the end of the final transmission data packet; recalculates the cyclic redundancy check value for the main data of the final transmission data packet; compares the recalculated check value with the extracted check code; if the check values match, it parses the main data and synchronizes it with the new meter. If the checksum does not match, an exception information packet containing an error identifier is generated and uploaded to the system backend. The anomaly detection module is used to analyze the sensor observation data of the new meter based on the Kalman filter algorithm, and to complete the meter status estimation and anomaly detection.
6. A remote monitoring device for continuous metering with live replacement of meters, characterized in that, Including memory and processor: The memory is used to store programs; The processor is used to execute the program to implement the various steps of the remote monitoring method for continuous metering with live replacement as described in any one of claims 1-4.
7. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements each step of the remote monitoring method for continuous metering with live replacement as described in any one of claims 1-4.
Citation Information
Patent Citations
Meter changing operation method based on data backtracking mechanism
CN106681967A
Computer equipment fault monitoring system and method based on artificial intelligence
CN120508477A
CAN bus intrusion detection method based on adaptive unscented Kalman filtering
CN120528633A