Method and system for terminal to detect millisecond error of clock of electric energy meter

By deploying analog tables on the main station hardware device, using millisecond-level communication protocol to interact clock data, the problem of insufficient accuracy of terminal and meter clock error detection is solved, and the accuracy and timeliness of millisecond-level errors are realized, which improves the accuracy and timeliness of meter data.

CN120455309APending Publication Date: 2025-08-08HENAN XJ INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510470416.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

When detecting the clock error of the terminal and the meter, the prior art is susceptible to signal interference and transmission delay, resulting in insufficient detection accuracy and inaccurate millisecond-level errors, which affects the accuracy and timeliness of the meter data.

Method used

Deploy an analog table on the main station hardware device, interacting with clock data through millisecond level communication protocol, and sending a power meter reference clock when the terminal detects the clock exceeds the difference. The analog table sends the current clock to the main station through millisecond level protocol, and the main station calculates clock errors to reduce transmission delay interference.

Benefits of technology

Effectively detect millisecond-level clock errors, improve the accuracy of clock management calibration, and ensure the accuracy and timeliness of meter data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455309A_ABST
    Figure CN120455309A_ABST
Patent Text Reader

Abstract

The invention relates to a method and a system for detecting millisecond errors of a clock of an electric energy meter by a terminal, and belongs to the field of clock synchronization error detection. Firstly, a simulation meter used for simulating and realizing a real ammeter clock management function is constructed, and the simulation meter and a master station are deployed on the same hardware equipment, so that data interaction can be performed through a set communication protocol. When the terminal detects that a clock out-of-tolerance phenomenon occurs in the analog meter, an electric meter reference clock is sent to the analog meter, then the analog meter sends a current clock to the master station through a millisecond-level communication protocol, and then the master station calculates a clock error according to the current clock of the master station and the current clock of the analog meter. Since the simulation table sends the current clock to the master station through the millisecond-level communication protocol instead of transmitting the current clock through a physical interface, the interference caused by transmission delay is effectively reduced, and the millisecond-level time synchronization error is detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and system for detecting millisecond-level errors of a terminal on an electric energy meter clock, and belongs to the field of clock synchronization error detection. Background Art

[0002] Currently, 24-bit standard terminal products are widely used for data collection, management, and event reporting of electricity meters in utility areas. These meters are typically designed for a service life of approximately 10 years, but the lifespan of their internal clock batteries is often shorter than the overall lifespan of the meter. This characteristic can easily cause clock errors when the meter is powered on again after a power outage, affecting the accuracy and timeliness of data.

[0003] To address this issue, existing technologies primarily use 24-bit standard terminals (hereinafter referred to as terminals) to manage and calibrate electricity meter clocks. This involves transmitting the current clock (the terminal's reference clock is obtained from the master station) through the physical interface between the terminal and the meter. Upon receiving this clock, the meter uses it as its own reference clock. However, there are significant deficiencies in the accuracy of time synchronization between the terminal and meter. Specifically, existing methods involve obtaining the current clocks of both the terminal and meter through their external physical interfaces (such as 485 or Ethernet), then comparing the two clocks to determine the clock error for clock management calibration. However, because clock data can be affected by various factors in the physical transmission channel, such as signal interference, transmission delays, and manual asynchrony, the calculated clock error can exhibit errors on the order of seconds.

[0004] As the requirements for 24-standard terminal products continue to rise, they are subject to pre-sale inspection to evaluate their various functions. Only terminals that meet these requirements are approved for sale. The accuracy of the terminal's clock management calibration is a key evaluation factor. Different evaluation criteria are assigned based on the timing error; lower timing errors, i.e., higher timing accuracy, result in a higher evaluation. If a terminal submitted for inspection actually has a timing error of milliseconds, using existing technology to measure the timing error may instead detect an error of seconds, resulting in an inaccurate evaluation of the terminal. Summary of the Invention

[0005] The purpose of the present invention is to provide a method and system for detecting millisecond-level errors of a terminal's clock on an electric energy meter, so as to solve the problem of how to detect that the clock error of the terminal's clock management calibration is at the millisecond level.

[0006] To achieve the above object, the solution of the present invention includes: The present invention provides a method for detecting millisecond-level errors in the clock of an electric energy meter by a terminal, comprising the following steps: 1) when a terminal used for clock management and calibration of an electric energy meter detects that a clock deviation occurs in an analog meter, a meter reference clock is sent to the analog meter based on the current clock of the terminal; the analog meter is used to simulate the clock management of a real electric energy meter; the master station and the analog meter are deployed on the same hardware device; the terminal current clock is obtained based on the terminal reference clock, and the terminal reference clock is obtained based on the master station current clock sent by the master station; 2) when the master station receives the analog meter current clock uploaded by the analog meter through a communication protocol with a set transmission delay of milliseconds, a clock error is obtained based on the current clock of the master station and the current clock of the analog meter, and the clock error is used to evaluate the time synchronization accuracy of the terminal clock management and calibration; the analog meter current clock is obtained based on the electric energy meter reference clock.

[0007] Furthermore, the communication protocol is TCP, UDP or HTTP.

[0008] Furthermore, the master station sends the current clock of the master station to the terminal according to the corresponding communication protocol.

[0009] Furthermore, when the terminal detects that the clock deviation of the analog meter is less than a set threshold, the terminal generates a meter reference clock to the analog meter according to the current clock of the terminal.

[0010] Furthermore, the threshold is set to 5 minutes.

[0011] A system for detecting millisecond-level errors in the clock of an electric energy meter by a terminal includes a master station. The master station is used to obtain a clock error based on the current clock of the analog meter and its own current clock when receiving the current clock of the analog meter sent by the analog meter through a communication protocol with a transmission delay set at the millisecond level. The clock error is used to evaluate the time synchronization accuracy of the terminal clock management and calibration; the analog meter is used to simulate the clock management of a real electric meter; the current clock of the analog meter is obtained based on the electric meter reference clock issued by the terminal for clock management and calibration of the electric meter, and the electric meter reference clock is obtained based on the terminal current clock; the terminal current clock is obtained based on the terminal reference clock, and the terminal reference clock is obtained based on the master station current clock issued by the master station.

[0012] Furthermore, the communication protocol is TCP, UDP or HTTP.

[0013] Furthermore, the master station sends the current clock of the master station to the terminal according to the corresponding communication protocol.

[0014] Furthermore, when the terminal detects that the clock deviation of the analog meter is less than a set threshold, the terminal generates a meter reference clock to the analog meter according to the current clock of the terminal.

[0015] Furthermore, the threshold is set to 5 minutes.

[0016] The beneficial effects of the present invention are as follows: the present invention is a pioneering invention, which first constructs an analog meter for simulating the clock management function of a real electric meter. The analog meter and the main station are deployed on the same hardware device, so that data can be exchanged through a set communication protocol. When the terminal detects that the clock of the analog meter is out of tolerance, it sends the reference clock of the electric meter to the analog meter, and then the analog meter sends the current clock to the main station through a millisecond-level communication protocol, so that the main station calculates the clock error based on its own current clock and the current clock of the analog meter. Among them, the reference clock of the terminal is issued by the main station according to the current clock, so the clock error obtained by the main station can be used to represent the clock error of the terminal's clock management calibration of the electric meter. Since the analog meter sends the current clock to the main station through a millisecond-level communication protocol instead of transmitting the current clock through a physical interface, the present invention effectively reduces the interference caused by transmission delays, thereby detecting millisecond-level timing errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of a system architecture of the present invention; Figure 2 This is a schematic diagram of a clock error detection process of the present invention. DETAILED DESCRIPTION

[0018] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.

[0019] The concept of the present invention is to reduce the transmission delays caused by physical interfaces and artificial synchronization. A simulation meter is deployed on the hardware device associated with the master station to simulate the clock management functions of a real electricity meter. The simulation meter exchanges clock data with the master station via a communication protocol with millisecond transmission delays. The clock data uploaded by the simulation meter is sent by the terminal, simulating the terminal's clock management of the electricity meter in real scenarios. Since the terminal's reference clock is sent by the master station, the master station can calculate the terminal's time calibration error with the electricity meter.

[0020] System Example: This embodiment provides a system for detecting millisecond-level errors of the electric energy meter clock by a terminal. The detection system adopts a layered architecture, such as Figure 1As shown, the system comprises an upstream master station layer, an upstream channel layer, a downstream channel layer, and a downstream simulated meter layer. The upstream master station layer is primarily responsible for sending precise reference clock signals, distributing parameters, processing event reports, and sending simulated meter message notifications. The upstream channel layer is responsible for data exchange between the master station and terminals (terminals under test), as well as between the master station and simulated meters. The downstream channel layer is responsible for data exchange between terminals and simulated meters, as well as between the simulated meters and the master station. The downstream simulated meter layer implements the functions of a real electricity meter and simulates the clock management process in a real environment. It includes a MongoDB database, a process message processing module, a meter event reporting module, a data source acquisition module, a reference clock source acquisition module, a meter data recovery module, and an encryption machine connection module. The master station and simulated meter are located in the same hardware device.

[0021] The clock management calibration process of this embodiment includes: like Figure 2 As shown, since analog meters also require a reference clock, the master station transmits its current clock to the terminal and analog meter via a communication protocol with millisecond-level transmission delays. Both the terminal and the analog meter use the received master station clock as their own reference clock. The analog meter then randomly scrambles its own clock to simulate clock deviations in real meters. When the terminal detects a clock deviation in the analog meter, it determines whether the deviation is within 5 minutes. If so, the terminal transmits its current clock to the analog meter via a simulated physical interface (485 or CCO) as the meter's reference clock. The analog meter uses the received reference clock as its own reference clock. When the master station needs to perform clock error detection, the analog meter transmits its current clock to the master station via the corresponding communication protocol. The master station then calculates the clock error based on the current clocks of the master station and the analog meter. Because the terminal's reference clock is also sent from the master station via a communication protocol with millisecond-level transmission delays, the master station and the terminal are essentially synchronized. Consequently, the clock error obtained at the master station based on the current clock and the analog meter's current clock represents the clock error used by the terminal to calibrate the meter's clock. The current clocks of the terminal and the analog meter are each derived from their own reference clocks.

[0022] In the above process, a corresponding communication protocol needs to be used. As an optional implementation, the communication protocol is TCP, UDP or HTTP. For the sake of reliable transmission, as a preferred implementation of the present invention, the communication protocol is TCP.

[0023] Method Example: This embodiment provides a method for detecting millisecond-level errors in the terminal's measurement of the electric energy meter's clock. This detection method is used to design a system for detecting millisecond-level errors in the terminal's measurement of the electric energy meter's clock, as described in the system embodiment. Since the introduction to this system is clear enough, it will not be repeated here.

[0024] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A method for detecting millisecond-level errors of a terminal to an electric energy meter clock, characterized in that: The method comprises the following steps: 1) when a terminal for clock management and calibration of an electric meter detects that a clock deviation occurs in an analog meter, a meter reference clock is supplied to the analog meter according to the current clock of the terminal; the analog meter is used to simulate the clock management of a real electric meter; The master station and the analog meter are deployed on the same hardware device; The terminal current clock is obtained according to the terminal reference clock, and the terminal reference clock is obtained according to the master station current clock issued by the master station; 2) When the master station receives the analog meter's current clock uploaded via a communication protocol with a transmission delay set at the millisecond level, it obtains a clock error based on the master station's current clock and the analog meter's current clock. The clock error is used to evaluate the time synchronization accuracy of the terminal clock management calibration; The current clock of the analog meter is obtained according to the reference clock of the electric meter.

2. The method for detecting millisecond-level error of a terminal to an electric energy meter clock according to claim 1, characterized in that: The communication protocol is TCP, UDP or HTTP.

3. The method for detecting millisecond-level error of the electric energy meter clock by a terminal according to claim 2, characterized in that: The master station sends the current clock of the master station to the terminal according to the corresponding communication protocol.

4. The method for detecting millisecond-level error of a terminal to an electric energy meter clock according to claim 1, characterized in that: When the terminal detects that the clock deviation of the analog meter is less than a set threshold, the terminal generates a meter reference clock to the analog meter according to the current clock of the terminal.

5. The method for detecting millisecond-level error of the electric energy meter clock by a terminal according to claim 4, characterized in that: The set threshold is 5 minutes.

6. A system for detecting millisecond-level errors of a terminal to an electric energy meter clock, characterized in that: The master station is configured to obtain a clock error based on the analog meter's current clock and its own current clock when receiving the analog meter's current clock via a communication protocol with a transmission delay set to milliseconds. The clock error is used to evaluate the time synchronization accuracy of the terminal clock management calibration. The analog meter is used to simulate the clock management of a real meter; the current clock of the analog meter is obtained based on the meter reference clock issued by the terminal for clock management and calibration of the meter, and the meter reference clock is obtained based on the current clock of the terminal; The terminal current clock is obtained according to the terminal reference clock, and the terminal reference clock is obtained according to the master station current clock issued by the master station.

7. The system for detecting millisecond-level errors of a terminal to an electric energy meter clock according to claim 6, characterized in that: The communication protocol is TCP, UDP or HTTP.

8. The system for detecting millisecond-level errors of a terminal to an electric energy meter clock according to claim 7, characterized in that: The master station sends the current clock of the master station to the terminal according to the corresponding communication protocol.

9. The system for detecting millisecond-level errors of a terminal to an electric energy meter clock according to claim 6, characterized in that: When the terminal detects that the clock deviation of the analog meter is less than a set threshold, the terminal generates a meter reference clock to the analog meter according to the current clock of the terminal.

10. The system for detecting millisecond-level errors of a terminal to an electric energy meter clock according to claim 9, characterized in that: The set threshold is 5 minutes.