CN108092731B - A kind of method of clocking error when accurate school - Google Patents
A kind of method of clocking error when accurate school Download PDFInfo
- Publication number
- CN108092731B CN108092731B CN201711458392.6A CN201711458392A CN108092731B CN 108092731 B CN108092731 B CN 108092731B CN 201711458392 A CN201711458392 A CN 201711458392A CN 108092731 B CN108092731 B CN 108092731B
- Authority
- CN
- China
- Prior art keywords
- terminal
- station system
- main station
- heartbeat
- time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
- H04L7/0016—Arrangements for synchronising receiver with transmitter correction of synchronization errors
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
A kind of method of clocking error when the present invention provides accurate school, this method pass through the heartbeat frame information of terminal and main station system telecommunication link maintenance, obtain main station system accurate clock, when realizing the accurate school of terminal local clock.Present invention utilizes the link maintenance communication resources between terminal and main station system, it ensure that the accurate and reliable of terminal clock in the case where not increasing communication pressure, when the accurate school of terminal may be implemented in this method, greatly reduce field device clock failure rate, extend service life of equipment, rotation cost is reduced, it is horizontal to promote good service, and promote the development of relevant industries.
Description
Technical field
Present invention is mainly used in power information acquisition terminal (hereinafter referred to as terminal) operation, terminal is calculated using software
Mode calculates the Accuracy Error of terminal Yu main station system clock, and itself clock is calibrated, and guarantees the essence of terminal clock
Really.
Background technique
Currently, as main station system and the data interaction of each system are more and more, measuring equipment clock accuracy itself
Influence to other systems is also more and more prominent, is no longer only the simple needs for providing rate and settling accounts foundation, is even more
The accuracy of data needed for system operating analysis, demand side management provides safeguard.According to statistics, clocking error was at 5 minutes or more
Electric energy meter accounting 11.08%, in 2 hours or more electric energy meter accountings 5.44%, in 1 week or more electric energy meter accounting 0.8%.
Carry out accurate calibration method research, fundamentally solve equipment clock error problems of too, can greatly reduce existing
Field device clock failure rate extends service life of equipment, reduces rotation cost, it is horizontal to promote good service, and promote associated row
The development of industry.
Summary of the invention
During when the present invention is for the problem that terminal remote school, there are time error, the side for using software algorithm is proposed
Formula realizes a kind of scheme that long-range time correction error calculates, using main station system clock as accurate clock in scheme, by terminal with
The heartbeat frame information of main station system communication link maintenance, the method for extrapolating main station system accurate clock, thus when realizing terminal
When the accurate school of clock.
The technical scheme is that
A kind of method of clocking error when the present invention provides accurate school, it is characterised in that this method passes through terminal and system, main website
The heartbeat frame information of system telecommunication link maintenance, obtains main station system accurate clock, realizes the accurate school of terminal local clock
When;The specific steps of this method are as follows:
A, terminal logs in main station system, establishes the communication link with main station system;
B, terminal sends heartbeat frame to main station system;
C, T 1 at the time of terminal record sends heartbeat frame;
D, main station system is to terminal replies heartbeat acknowledgement frame, wherein receives the heart comprising main station system in heartbeat acknowledgement frame
T3 at the time of T2, main station system issue acknowledgement frame at the time of frame-skipping;
E, after terminal receives the acknowledgement frame of main station system, T4 at the time of record terminal receives acknowledgement frame, terminal is by T
1-T 4 is recorded as one group of heartbeat confirmation frame data;
F, terminal continuously performs b-step e, obtains the heartbeat of N group and confirms frame data, when heartbeat acknowledgement frame data group N is more than pre-
If heartbeat acknowledgement frame when needing to record total group number X1, continue to execute;
G, it according to the information in heartbeat acknowledgement frame, calculates in every group of heartbeat confirmation frame data between terminal and main station system
Time error K, formula are as follows:
U=T2-T1
V=T3-T4
K=(U-V)/2
Wherein, U, V, which respectively indicate communication delay and time error, K between terminal and main station system, indicates terminal and main website
Time error between system;
H, frame data are confirmed for N group heartbeat, rejects the minimum and maximum group of K value, obtain the effective heartbeat confirmation of N-2 group
Frame, using the time error Km between following formula computing terminals and main station system;
Km=(K0+K1+…+KN-2)/(N-2)
Wherein: K0、K1、…、KN-2Indicate the time error corresponded between the N-2 terminal filtered out and main station system;
I, according to the precise time error Km between terminal current time Ts1 and step the h terminal obtained and main station system,
Time Ts2 when calculating accurate school, time Ts2 is as present clock when the accurate school that terminal will acquire
Ts2=Ts1+Km.
Further, in step b, terminal establish with after the communication link of main station system, wait Network status stablize again to
Main station system sends heartbeat frame.
Further, in step e, at the time of terminal record sends heartbeat frame T1, main station system receive heartbeat frame when
Carve T2, at the time of main station system issues acknowledgement frame T3 and terminal at the time of receive acknowledgement frame T4 value corresponding threshold value with
It is interior, statistics is participated in as one group of data.
Further, in step f, when heartbeat acknowledgement frame data group N is more than that preset heartbeat acknowledgement frame needs to record total group
After number X1, judge it is total execute time T whether be more than user setting maximum allowable execution time T5;If not above turning to walk
Rapid g;If it does, the communication link then between terminal and main station system is unstable, abandons the heartbeat of N group and confirm frame data, wait
After continuous 3 heart beat cycles, the data communication between terminal and main station system is normal, executes b-e again.
Further, in step h, heartbeat acknowledgement frame effective for N-2 group, if effectively heartbeat acknowledgement frame record group number N-
2 are less than minimum effectively record group number, then execute b-g step again and otherwise meet statistical condition, computing terminal and main station system
Between time error Km.
Beneficial effects of the present invention:
The present invention is using main station system clock as accurate clock, by the heartbeat of terminal and the maintenance of main station system communication link
Frame information, the method for extrapolating main station system accurate clock, thus when realizing the accurate school of terminal clock.
Present invention utilizes the link maintenance communication resources between terminal and main station system, in the feelings for not increasing communication pressure
It ensure that the accurate and reliable of terminal clock under condition, when the accurate school of terminal may be implemented in this method, when greatly reducing field device
Clock failure rate extends service life of equipment, reduces rotation cost, it is horizontal to promote good service, and promote the development of relevant industries.
Other features and advantages of the present invention will then part of the detailed description can be specified.
Detailed description of the invention
Exemplary embodiment of the invention is described in more detail in conjunction with the accompanying drawings, it is of the invention above-mentioned and its
Its purpose, feature and advantage will be apparent, wherein in exemplary embodiment of the invention, identical reference label
Typically represent same parts.
Fig. 1 tests main station system schematic diagram when showing accurate school.
Fig. 2 shows operational flowcharts when accurate school.
Specific embodiment
The preferred embodiment that the present invention will be described in more detail below with reference to accompanying drawings.Although showing the present invention in attached drawing
Preferred embodiment, however, it is to be appreciated that may be realized in various forms the present invention without the embodiment party that should be illustrated here
Formula is limited.
A kind of method of clocking error when accurate school, this method pass through terminal and main station system telecommunication link maintenance
Heartbeat frame information obtains main station system accurate clock, when realizing the accurate school of terminal local clock;The specific steps of this method
Are as follows:
A, terminal logs in main station system, establishes the communication link with main station system;
B, after waiting Network status to stablize, terminal sends heartbeat frame to main station system;
C, T 1 at the time of terminal record sends heartbeat frame;
D, main station system is to terminal replies heartbeat acknowledgement frame, wherein receives the heart comprising main station system in heartbeat acknowledgement frame
T3 at the time of T2, main station system issue acknowledgement frame at the time of frame-skipping;
E, after terminal receives the acknowledgement frame of main station system, T4 at the time of record terminal receives acknowledgement frame, terminal is by T
1-T 4 is recorded as one group of heartbeat confirmation frame data;
F, terminal continuously performs b-step e, obtains the heartbeat of N group and confirms frame data, when heartbeat acknowledgement frame data group N is more than pre-
If heartbeat acknowledgement frame when needing to record total group number X1, continue to execute;
Judgement is total execute time T whether be more than user setting maximum allowable execution time T5;If not above turning to walk
Rapid g;If it does, the communication link then between terminal and main station system is unstable, abandons the heartbeat of N group and confirm frame data, wait
After continuous 3 heart beat cycles, the data communication between terminal and main station system is normal, executes b-e again;
G, it according to the information in heartbeat acknowledgement frame, calculates in every group of heartbeat confirmation frame data between terminal and main station system
Time error K, formula are as follows:
U=T2-T1
V=T3-T4
K=(U-V)/2
Wherein, U, V, which respectively indicate communication delay and time error, K between terminal and main station system, indicates terminal and main website
Time error between system;
H, frame data are confirmed for N group heartbeat, rejects the minimum and maximum group of K value, obtain the effective heartbeat confirmation of N-2 group
Frame,
If effective heartbeat acknowledgement frame record group number N-2 is less than minimum effectively record group number, b-g step is executed again,
Otherwise, meet statistical condition, using the time error Km between following formula computing terminals and main station system;
Km=(K0+K1+…+KN-2)/(N-2)
Wherein: K0、K1、…、KN-2Indicate the time error corresponded between the N-2 terminal filtered out and main station system;
I, according to the precise time error Km between terminal current time Ts1 and step the h terminal obtained and main station system,
Time Ts2 when calculating accurate school, time Ts2 is as present clock when the accurate school that terminal will acquire
Ts2=Ts1+Km.
When specific implementation:
The present invention tests main station system (as shown in Figure 1) when relying on accurate school, realizes the accurate meter of terminal clock error
When calculation and school.Wherein, terminal be responsible for heartbeat frame send and receive, the calculating of the record of heartbeat frame information, test data etc..Main website
System can send heartbeat frame automatically and can confirm to the heartbeat frame that terminal reports.
Main business workflow of the invention is as shown in Fig. 2, detailed process is as follows:
It allows terminal actively to log on to main website first, after waiting terminal operatings to stablize, formally enters testing process when accurate school,
Communication link test is initiated to terminal by main website first, main website active transmission heartbeat frame, terminal receives heartbeat frame and returns to confirmation
Frame records this heartbeat frame main website sending time, main website receives acknowledgement frame return after main website receives the heartbeat frame of terminal return
Terminal time and terminal return to the information such as confirmation frame time when time, terminal receive heartbeat frame;After main website receives acknowledgement frame, stand
It repeats to send heartbeat frame to terminal again, and records corresponding information, until transmitting-receiving heartbeat frame number reaches main website setting
Heartbeat frame stops after judging total degree;Due to during the test, in fact it could happen that communication line is unstable, and heartbeat frame is caused to be received and dispatched
It is abnormal, so a heartbeat frame information is set in main website collects maximum allowable execution time, it is more than maximum when main website executes the time
Allow to execute the time, heartbeat frame information number is also not up to X1, then may determine that communication line is unstable, when needing to wait one section
Between, stablize to terminal operating, executes aforesaid operations again.
When terminal, which is collected into heartbeat frame recording information, reaches X1, terminal calculates main website according to the heartbeat frame information of record
Time error K between terminal rejects the minimum and maximum group of K value, calculates main website and end using the method being averaged
Mean timing error Km between end chooses terminal current time Ts1, using between the terminal and main station system being calculated
Ts2 is arranged as present clock in precise time error, time Ts2 when calculating accurate school, terminal.
It due to testing selected heartbeat frame information is chosen in the time T5 of setting, it is possible to think in heartbeat
In frame information acquisition process, terminal clock operation is accurate, it can be ensured that the main website and terminal time error being calculated are accurate, guarantee
The terminal time inferred is precisely reliable.
Although the present invention is illustrated referring to attached drawing and case study on implementation, for those skilled in the art
For, the invention may be variously modified and varied.Various changes, variation and equivalent of the invention has appended right to want
The content of book is asked to cover.
Various embodiments of the present invention are described above, above description is exemplary, and non-exclusive, and
It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill
Many modifications and changes are obvious for the those of ordinary skill in art field.
Claims (5)
1. a kind of method of clocking error when accurate school, it is characterised in that this method passes through terminal and main station system telecommunication chain
The heartbeat frame information of road maintenance, obtains main station system accurate clock, when realizing the accurate school of terminal local clock;The tool of this method
Body step are as follows:
A, terminal logs in main station system, establishes the communication link with main station system;
B, terminal sends heartbeat frame to main station system;
C, T1 at the time of terminal record sends heartbeat frame;
D, main station system is to terminal replies heartbeat acknowledgement frame, wherein receives heartbeat frame comprising main station system in heartbeat acknowledgement frame
At the time of T2, main station system issue acknowledgement frame at the time of T3;
E, after terminal receives the acknowledgement frame of main station system, T4 at the time of record terminal receives acknowledgement frame, terminal makees T1-T4
Confirm that frame data are recorded for one group of heartbeat;
F, terminal continuously performs b-step e, obtains the heartbeat of N group and confirms frame data, when heartbeat acknowledgement frame data group N is more than preset
When heartbeat acknowledgement frame needs to record total group number X1, continue to execute;
G, according to the information in heartbeat acknowledgement frame, the time in every group of heartbeat confirmation frame data between terminal and main station system is calculated
Error K, formula are as follows:
U=T2-T1
V=T3-T4
K=(U-V)/2
Wherein, U, V, which respectively indicate communication delay and time error, K between terminal and main station system, indicates terminal and main station system
Between time error;
H, frame data are confirmed for N group heartbeat, rejects the minimum and maximum group of K value, obtains the effective heartbeat acknowledgement frame of N-2 group, adopt
With the time error Km between following formula computing terminals and main station system;
Km=(K0+K1+…+KN-2)/(N-2)
Wherein: K0、K1、…、KN-2Indicate the time error corresponded between the N-2 terminal filtered out and main station system;
I, it according to the precise time error Km between the terminal current time Ts1 and step h terminal obtained and main station system, calculates
Time Ts2 when accurate school out, time Ts2 is as present clock when the accurate school that terminal will acquire
Ts2=Ts1+Km.
2. the method for clocking error when a kind of accurate school according to claim 1, it is characterised in that in step b, terminal is built
After the vertical communication link with main station system, waits Network status to stablize and send heartbeat frame to main station system again.
3. the method for clocking error when a kind of accurate school according to claim 1, it is characterised in that in step e, terminal note
T3 at the time of T2, main station system issue acknowledgement frame at the time of T1, main station system receive heartbeat frame at the time of record sends heartbeat frame
And terminal at the time of receive acknowledgement frame T4 value participate in statistics as one group of data within corresponding threshold value.
4. the method for clocking error when a kind of accurate school according to claim 1, it is characterised in that in step f, work as heartbeat
Acknowledgement frame data group N is more than to judge whether total execution time T is more than use after preset heartbeat acknowledgement frame needs the total group number X1 of record
The maximum allowable execution time T5 of family setting;If not above g is gone to step;If it does, then between terminal and main station system
Communication link it is unstable, abandon the heartbeat of N group and confirm frame data, after continuous 3 heart beat cycles of waiting, terminal and main station system
Between data communication it is normal, again execute b-e.
5. the method for clocking error when a kind of accurate school according to claim 1, it is characterised in that in step h, for N-2
The effective heartbeat acknowledgement frame of group executes again if effectively heartbeat acknowledgement frame record group number N-2 is less than minimum effectively record group number
Otherwise b-g step meets statistical condition, the time error Km between computing terminal and main station system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711458392.6A CN108092731B (en) | 2017-12-28 | 2017-12-28 | A kind of method of clocking error when accurate school |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711458392.6A CN108092731B (en) | 2017-12-28 | 2017-12-28 | A kind of method of clocking error when accurate school |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108092731A CN108092731A (en) | 2018-05-29 |
CN108092731B true CN108092731B (en) | 2019-04-12 |
Family
ID=62180301
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711458392.6A Active CN108092731B (en) | 2017-12-28 | 2017-12-28 | A kind of method of clocking error when accurate school |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108092731B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110380934B (en) * | 2019-07-23 | 2021-11-02 | 南京航空航天大学 | Distributed redundancy system heartbeat detection method |
CN110953682B (en) * | 2019-12-17 | 2021-05-11 | 珠海格力电器股份有限公司 | Air conditioning system and time correction method of GPRS module thereof |
CN111025223B (en) * | 2019-12-24 | 2022-09-20 | 宁波三星医疗电气股份有限公司 | Clock correction method, device, equipment and storage medium of electric energy meter |
CN111181679A (en) * | 2019-12-25 | 2020-05-19 | 北京飞利信电子技术有限公司 | IEEE 1588-based high-speed streaming media bus accurate clock synchronization system |
CN112272070B (en) * | 2020-09-11 | 2022-12-23 | 苏州浪潮智能科技有限公司 | Method, system, equipment and readable storage medium for accurate time synchronization of SAS expander |
CN112330842A (en) * | 2020-10-23 | 2021-02-05 | 深圳云存科技有限公司 | Navigation recorder |
CN114362871B (en) * | 2021-12-28 | 2024-01-05 | 江苏林洋能源股份有限公司 | Method for self-maintaining clock of electric energy meter group |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101904129A (en) * | 2007-12-21 | 2010-12-01 | 贝拉尔网络公司 | The estimation of timing errors in packet data networks and method for supervising |
CN104464247A (en) * | 2014-12-12 | 2015-03-25 | 武汉中原电子信息公司 | Method for reducing time synchronization error of public network of concentrator |
CN105933976A (en) * | 2016-06-24 | 2016-09-07 | 北京永安信通科技有限公司 | Heartbeat locating method, device and system under one-dimensional scene |
-
2017
- 2017-12-28 CN CN201711458392.6A patent/CN108092731B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101904129A (en) * | 2007-12-21 | 2010-12-01 | 贝拉尔网络公司 | The estimation of timing errors in packet data networks and method for supervising |
CN104464247A (en) * | 2014-12-12 | 2015-03-25 | 武汉中原电子信息公司 | Method for reducing time synchronization error of public network of concentrator |
CN105933976A (en) * | 2016-06-24 | 2016-09-07 | 北京永安信通科技有限公司 | Heartbeat locating method, device and system under one-dimensional scene |
Also Published As
Publication number | Publication date |
---|---|
CN108092731A (en) | 2018-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108092731B (en) | A kind of method of clocking error when accurate school | |
CN101420714B (en) | Method for scheduling indicator for collecting key performance from communication network | |
CN109557498B (en) | Processing method for electric energy meter power-off and power-on event | |
CA2602289A1 (en) | Using a fixed network wireless data collection system to improve utility responsiveness to power outages | |
CN101189895A (en) | Abnormality detecting method and system, and upkeep method and system | |
EP2085749B1 (en) | Method and system for remote metering the consumption of electricity, water or gas | |
WO2017152951A1 (en) | Optimized smart meter reporting schedule | |
CN103081403A (en) | Method and apparatus for analysis of the operation of a communication system using events | |
CN103312563A (en) | Automatic information collection method and system based on power line carrier communication | |
CN103631245A (en) | Power distribution terminal defect diagnostic system and method | |
CN115545868A (en) | Financial service integrated fund management system for enterprise operation | |
CN116744419A (en) | 5G base station energy consumption supervision method, system and storage medium | |
CN112712606B (en) | Automatic inspection management method and system based on operation and maintenance service | |
US8521869B2 (en) | Method and system for reporting defects within a network | |
CN113034307B (en) | Data acquisition method for power enterprise | |
CN110139266B (en) | Auxiliary card transferring behavior identification method, auxiliary card transferring behavior identification device and server | |
CN102547789B (en) | Early warning method, device and system for quality of peer-to-peer service | |
CN109035746B (en) | Function judgment method and system for centralized meter reading terminal | |
CN112312376B (en) | Method and system for remotely and interactively managing multifunctional electric meter | |
US8566634B2 (en) | Method and system for masking defects within a network | |
CN114297018A (en) | Intelligent equipment management method and system based on Happy forest zone | |
CN106341107A (en) | Pulse modulation signal calibration method and pulse modulation signal calibration device | |
CN113438116A (en) | Power communication data management system and method | |
CN110097702A (en) | A kind of electric vehicle self-filling electro-detection control method | |
CN102694661B (en) | On-time charging service monitoring method based on charging server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |