CN102916799A - Method for time synchronization of network time protocol (NTP) server - Google Patents
Method for time synchronization of network time protocol (NTP) server Download PDFInfo
- Publication number
- CN102916799A CN102916799A CN201210445375XA CN201210445375A CN102916799A CN 102916799 A CN102916799 A CN 102916799A CN 201210445375X A CN201210445375X A CN 201210445375XA CN 201210445375 A CN201210445375 A CN 201210445375A CN 102916799 A CN102916799 A CN 102916799A
- Authority
- CN
- China
- Prior art keywords
- server
- ntp
- time
- time synchronized
- time synchronization
- 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.)
- Pending
Links
Images
Landscapes
- Computer And Data Communications (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
The invention relates to a time synchronization technique of a relevant server in an internet, in particular to a method for time synchronization of a network time protocol (NTP) server used for an internet monitoring system. The overall technical scheme of the method is that time synchronization with each server is carried out through additional arrangement of NTP-S time synchronization servers, the time synchronization is carried out between the NTP-S time synchronization servers and each relevant server, the time synchronization is carried out between the NTP-S time synchronization servers and each NTP-T server in a fixed period, problems of blocking and delaying caused by the fact that a distance between an upper layer NTP-T server and each server is long and number of visiting users is large are solved, and time of each server can effectively synchronized. The method has the advantages of achieving time synchronization of each server, avoiding confusion of clocks of each server, and accordingly enabling each relevant server based on the time synchronization to accurately and stably work. The method is particularly suitable to internet time synchronization servers.
Description
Technical field
The present invention relates to associated server Time synchronization technique in the Internet, relate to concretely a kind of method of the ntp server time synchronized for internet monitoring system.
Background technology
Many business in the video interconnect supervisory control system all depend on the time at present, such as storage, playback, the download of monitoring video, monitoring function Auto Power On, shutdown, renewal etc.Along with the development of the Internet, the various servers that need lock in time are also more and more, and this just causes NTP (Network Time Protocol) NTP(network time protocol) pressure of server is increasing.
Ntp server provides the time synchronized service for each server of video interconnect supervisory control system, the ntp server of each server direct last layer ntp server lock in time such as from the Internet in the video interconnect supervisory control system.Because it is many to be in ntp server distance, the calling party of last layer, certainly will cause blocking up and delaying time its access.
If each server in video monitoring system causes the inconsistent of each server time because the access of ntp server is blocked up and delayed time, must affect the work of the accurate stable of video monitoring system, even cause the collapse of system.
Summary of the invention
Technical problem to be solved by this invention is to block up and time-delay causes the inconsistent problem of each server time for the access of existing so ntp server, proposes a kind of method of ntp server time synchronized.
The present invention solves the problems of the technologies described above the technical scheme that adopts: a kind of method of ntp server time synchronized, it is characterized in that, and may further comprise the steps:
A., NTP-S time synchronized server is set as the upper strata time server of each service server, described NTP-S time synchronized server is synchronous with the NTP-T server time as the upper strata, the Internet of clock source;
B. NTP-S time synchronized server is repeatedly carried out time synchronized with the NTP-T server in the course of the work, draw the time difference of NTP-S time synchronized server and NTP-T server, draw the unit interval drift rate of NTP-S time synchronized server;
C. according to unit interval drift rate and each service server mistake value of tolerable maximum time of NTP-S time synchronized server, calculate the optimal period of NTP-S time synchronized server and NTP-T server sync time;
D.NTP-S time synchronized server every an optimal period just with time of NTP-T server sync, revise local clock, and provide the time synchronized service for each service server.
Concrete, step b is further comprising the steps of:
B1. when starting NTP-S time synchronized server with the NTP-T server lock in time first time, and record this moment time value;
B2. through after the time period, during NTP-S time synchronized server and NTP-T server lock in time again, calculate the time difference of NTP-S time synchronized server and NTP-T server, draw the unit interval drift rate of NTP-S time synchronized server.
Beneficial effect of the present invention is, realized the time synchronized of each server, avoided the entanglement of each server clock, thereby makes the work that each synchronous associated server of time-based can accurate stable.
Description of drawings
Fig. 1 is the workflow diagram of embodiment.
Embodiment
Below in conjunction with accompanying drawing, describe technical scheme of the present invention in detail:
The method of a kind of ntp server time synchronized of the present invention, key step is: NTP-S time synchronized server at first is set as the upper strata time server of each service server, wherein NTP-S time synchronized server is synchronous with the NTP-T server time as the upper strata, the Internet of clock source; Then NTP-S time synchronized server is repeatedly carried out time synchronized with the NTP-T server in the course of the work, draw the time difference of NTP-S time synchronized server and NTP-T server, draw the unit interval drift rate of NTP-S time synchronized server; According to unit interval drift rate and each service server mistake value of tolerable maximum time of NTP-S time synchronized server, calculate the optimal period of NTP-S time synchronized server and NTP-T server sync time again; Last NTP-S time synchronized server every an optimal period just with time of NTP-T server sync, correction local clock, and provide the time synchronized service for each service server.Overall technological scheme of the present invention, carry out time synchronized by NTP-S time synchronized server and each server that is provided in addition carrying out with each associated server time synchronized, and NTP-S time synchronized server carries out time synchronized in the fixed cycle with the NTP-T server, thereby solved because thereby upper strata NTP-T server and each server distance, calling party to be caused blocking up and the generation of the problem such as time-delay, make the time of each server can access effectively synchronous.
A kind of method of unit interval drift rate of concrete calculating NTP-S time synchronized server is:
At first when starting NTP-S time synchronized server with the NTP-T server lock in time first time, and record this moment time value; Then after through a time period, during NTP-S time synchronized server and NTP-T server lock in time again, calculate the time difference of NTP-S time synchronized server and NTP-T server, thereby draw the unit interval drift rate of NTP-S time synchronized server.
As shown in Figure 1, the concrete flow process of ntp server method for synchronizing time of the present invention is as follows:
1. at first build one from the NTP-S time synchronized server as upper strata, the Internet NTP-T server sync time of clock source;
Wherein said NTP-S server and NTP-T server retention time synchronous, and as the upper strata time server of other each service servers in the supervisory control system;
3. after system started, NTP-S server elder generation and time of NTP-T server sync recorded this moment time value T1 of NTP-S server simultaneously;
4. through after the time period, this section period take time of NTP-S server is as benchmark and be set as T, NTP-S again with time of NTP-T server sync, record simultaneously the time value T2 after lock in time, and calculate the time difference * T=|T2-(T1+T) of NTP-S server and NTP-T server |, thus calculate the unit interval drift rate Δ T=*T/T of NTP-S server;
5. according to each service server mistake value of tolerable maximum time T ' in the unit interval drift rate Δ T of NTP-S server and the supervisory control system, just can calculate NTP-S server and the optimal period ST=of NTP-T server sync time (T '/Δ T);
6.NTP-S server every an optimal period ST just with time of NTP-T server sync, revise local clock, and provide the time synchronized service for each service server.
Claims (2)
1. the method for a ntp server time synchronized is characterized in that, may further comprise the steps:
A., NTP-S time synchronized server is set as the upper strata time server of each service server, described NTP-S time synchronized server is synchronous with the NTP-T server time as the upper strata, the Internet of clock source;
B. NTP-S time synchronized server is repeatedly carried out time synchronized with the NTP-T server in the course of the work, draw the time difference of NTP-S time synchronized server and NTP-T server, draw the unit interval drift rate of NTP-S time synchronized server;
C. according to unit interval drift rate and each service server mistake value of tolerable maximum time of NTP-S time synchronized server, calculate the optimal period of NTP-S time synchronized server and NTP-T server sync time;
D.NTP-S time synchronized server every an optimal period just with time of NTP-T server sync, revise local clock, and provide the time synchronized service for each service server.
2. the method for a kind of ntp server time synchronized according to claim 1 is characterized in that, step b is further comprising the steps of:
B1. when starting NTP-S time synchronized server with the NTP-T server lock in time first time, and record this moment time value;
B2. through after the time period, during NTP-S time synchronized server and NTP-T server lock in time again, calculate the time difference of NTP-S time synchronized server and NTP-T server, draw the unit interval drift rate of NTP-S time synchronized server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210445375XA CN102916799A (en) | 2012-11-09 | 2012-11-09 | Method for time synchronization of network time protocol (NTP) server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210445375XA CN102916799A (en) | 2012-11-09 | 2012-11-09 | Method for time synchronization of network time protocol (NTP) server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102916799A true CN102916799A (en) | 2013-02-06 |
Family
ID=47615042
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210445375XA Pending CN102916799A (en) | 2012-11-09 | 2012-11-09 | Method for time synchronization of network time protocol (NTP) server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102916799A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104993920A (en) * | 2015-07-03 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | SNTP-based synchronization time method and SNTP client |
CN105119745A (en) * | 2015-08-19 | 2015-12-02 | 浪潮(北京)电子信息产业有限公司 | Method and system for improving availability of DB2 DPF |
CN106094766A (en) * | 2016-08-09 | 2016-11-09 | 红塔烟草(集团)有限责任公司 | Cigaret primacy processing line PLC clock synchronizer and Siemens Wincc industry control PLC clock synchronizer |
CN110953682A (en) * | 2019-12-17 | 2020-04-03 | 珠海格力电器股份有限公司 | Air conditioning system and time correction method of GPRS module thereof |
CN112104433A (en) * | 2019-06-18 | 2020-12-18 | 国网江苏省电力有限公司常州供电分公司 | Concentrator accurate time synchronization method based on quadratic iteration algorithm |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231656A (en) * | 2011-06-20 | 2011-11-02 | 中兴通讯股份有限公司 | Method, system and device for keeping clock synchronization of NTP (Network Time Protocol) server |
CN102684808A (en) * | 2012-06-06 | 2012-09-19 | 哈尔滨工业大学 | Self-adaptive clock synchronous system |
-
2012
- 2012-11-09 CN CN201210445375XA patent/CN102916799A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102231656A (en) * | 2011-06-20 | 2011-11-02 | 中兴通讯股份有限公司 | Method, system and device for keeping clock synchronization of NTP (Network Time Protocol) server |
CN102684808A (en) * | 2012-06-06 | 2012-09-19 | 哈尔滨工业大学 | Self-adaptive clock synchronous system |
Non-Patent Citations (2)
Title |
---|
易娜等: "遵循IEC 61850实现变电站自动化系统时间同步的频率和调节算法设计", 《电网技术》 * |
金虎等: "无线传感器网络中可变同步周期时间同步算法", 《黑龙江大学自然科学学报》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104993920A (en) * | 2015-07-03 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | SNTP-based synchronization time method and SNTP client |
CN104993920B (en) * | 2015-07-03 | 2017-10-31 | 上海斐讯数据通信技术有限公司 | A kind of lock in time method and SNTP clients based on SNTP |
CN105119745A (en) * | 2015-08-19 | 2015-12-02 | 浪潮(北京)电子信息产业有限公司 | Method and system for improving availability of DB2 DPF |
CN106094766A (en) * | 2016-08-09 | 2016-11-09 | 红塔烟草(集团)有限责任公司 | Cigaret primacy processing line PLC clock synchronizer and Siemens Wincc industry control PLC clock synchronizer |
CN112104433A (en) * | 2019-06-18 | 2020-12-18 | 国网江苏省电力有限公司常州供电分公司 | Concentrator accurate time synchronization method based on quadratic iteration algorithm |
CN110953682A (en) * | 2019-12-17 | 2020-04-03 | 珠海格力电器股份有限公司 | Air conditioning system and time correction method of GPRS module thereof |
CN110953682B (en) * | 2019-12-17 | 2021-05-11 | 珠海格力电器股份有限公司 | Air conditioning system and time correction method of GPRS module thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102916799A (en) | Method for time synchronization of network time protocol (NTP) server | |
CN103532652B (en) | A kind of time synchronism apparatus and method | |
CN102739468B (en) | Method for revising relative time stamp when real-time clock is unavailable | |
CN101446972B (en) | Method and system for dynamic data synchronization | |
CN102769504B (en) | A kind of 1588 systems and realize synchronous method | |
CN101807988A (en) | From the device, from the device time synchronization method, main device and electronic apparatus system | |
WO2015192661A1 (en) | Method, device, and system for data synchronization in distributed storage system | |
CN101820500A (en) | From the device, from the device time synchronization method, main device and electronic apparatus system | |
CN103188064A (en) | Clock synchronization method and clock synchronization device | |
WO2017162079A1 (en) | Data synchronization method and apparatus | |
CN107786293A (en) | Method for synchronizing time, clock equipment, from clockwork and clock synchronization system | |
CN103650406A (en) | Apparatus for synchronizing a data handover between a first clock domain and a second clock domain | |
CN103259641A (en) | Transmission apparatus, transmission method, program, and communication system | |
CN107040576A (en) | Information-pushing method and device, communication system | |
CN108259109A (en) | The network equipment and TOD synchronous method in PTP domains | |
CN107682139A (en) | BMC and CMC clock synchronizing method and system in a kind of cluster | |
JP2012510094A5 (en) | ||
WO2013042143A8 (en) | Management of synchronized symmetric keys for securing data exchanged by communication nodes | |
CN109379158A (en) | Increase method for synchronizing time, device and the equipment of node in a kind of storage cluster newly | |
CN102833027B (en) | A kind of synchronous regime monitoring method based on time migration | |
US9003063B2 (en) | Systems, methods, and apparatus for estimating power time of use | |
CN102546009A (en) | Optical fiber symmetry detecting method and device | |
CN105099650B (en) | Sync client and its synchronous method and system | |
CN102256128B (en) | Synchronous decoding method and device | |
CN103631680A (en) | Personnel desktop synchronous backup system based on cloud computing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20130206 |