CN110492967A - A kind of method for synchronizing time, trunking and device - Google Patents

A kind of method for synchronizing time, trunking and device Download PDF

Info

Publication number
CN110492967A
CN110492967A CN201910904083.XA CN201910904083A CN110492967A CN 110492967 A CN110492967 A CN 110492967A CN 201910904083 A CN201910904083 A CN 201910904083A CN 110492967 A CN110492967 A CN 110492967A
Authority
CN
China
Prior art keywords
time
trunking
ntp server
time synchronization
response
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.)
Granted
Application number
CN201910904083.XA
Other languages
Chinese (zh)
Other versions
CN110492967B (en
Inventor
王芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN201910904083.XA priority Critical patent/CN110492967B/en
Publication of CN110492967A publication Critical patent/CN110492967A/en
Application granted granted Critical
Publication of CN110492967B publication Critical patent/CN110492967B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0682Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging

Abstract

This application discloses a kind of method for synchronizing time, trunking and devices, this method comprises: the operating mode of the trunking is switched to relay services mode by transparent transmission mode after trunking detects that ntp server is in malfunction;Trunking under relay services mode is after receiving NTP Client and being sent to the first time synchronization request message of ntp server, first time and the second time are determined according to the temporal information being locally stored, this is used to indicate the timestamp that ntp server receives first time synchronization request message at the first time, and the second time was used to indicate the timestamp that ntp server sends first time synchronous response message;Trunking under relay services mode is sent to NTP Client carries the first time synchronous response message with the second time at the first time, so that NTP Client is synchronous with the second deadline time at the first time according to this.

Description

A kind of method for synchronizing time, trunking and device
Technical field
This application involves field of communication technology more particularly to a kind of method for synchronizing time, trunking and device.
Background technique
NTP (Network Time Protocol, Network Time Protocol) is a kind of time synchronization service agreement, purpose It is that unified time synchronization service is provided for the equipment run on network.When ntp server is in normal condition, NTP client Carry out normal NTP message interaction between end and ntp server, trunking be for above-mentioned two classes equipment it is transparent, I.e. NTP Client equipment and ntp server equipment are do not perceive trunking existing, and the mode of trunking is at this time Arq mode.When ntp server break down or ntp server and trunking between occur link failure when, NTP Client Between ntp server carry out NTP synchronize will time-out, can not synchronization time.It, may for the equipment of periodic synchronous It is a synchronization failure, but for restarting and itself there is no real-time clock (RealTime Clock, RTC) mechanism For equipment, time synchronization service is just unavailable.
Since time synchronization service is for requiring the network system of precise time most important, Time Service is improved Reliability also just seems particularly significant.In addition to this, since the network equipment is more and more, it is same that many services also all rely on the time The Time Service that service system provides is walked, therefore can continue to provide high-precision time synchronization service is also critically important one Point.Current main and common means are, by disposing multiple ntp servers in a network, therefrom choose optimal N TP in real time Server provides time synchronization service for the equipment in network, thus reliability and accuracy to guarantee network time, this Kind method needs the NTP Client in equipment to support to configure multiple ntp servers, there is certain requirement to equipment, and limitation is more, Increase the complexity of system;Additionally, due to multiple ntp servers are needed to configure, need time synchronization service system application available The licensing (license) of ntp server is also very high for the requirement in cost.In addition to need to configure multiple ntp servers it Outside, it in order to improve the time precision of system, is typically necessary NTP Client and realizes complicated ntp server selection algorithm, so as to Multiple and different grades, different location ntp server in choice accuracy highest one, which increase for NTP Client Performance requirement.
Time synchronization reliability of service how is improved, and simplifies network and saves the problem of cost is urgent need to resolve.
Summary of the invention
The embodiment of the present application provides a kind of method for synchronizing time, trunking and device, to improve time synchronization service Reliability, and simplify network save cost.
In a first aspect, a kind of method for synchronizing time is provided, when being applied to trunking, the trunking and a network Between agreement ntp server establish connection, which comprises
After trunking detects that the ntp server is in malfunction, the operating mode of the trunking is by saturating Arq mode is switched to relay services mode;
The trunking under relay services mode receives the first time that NTP Client is sent to the ntp server Synchronization request message;
The trunking under relay services mode determines first time and second according to the temporal information being locally stored Time, the temporal information include at least system time, response delay and round-trip delay;Wherein, the first time is used for Indicate that the ntp server receives the timestamp of the first time synchronization request message, second time is used to indicate institute State the timestamp that ntp server sends first time synchronous response message;The response delay is in described in normal condition The duration of ntp server response time synchronization request message, the round-trip delay are the ntp server in normal condition The transmission duration of time synchronization request message and time synchronization response message between the trunking;
The trunking under relay services mode sends first time synchronous response message to the NTP Client, Wherein, the first time synchronous response message carries the first time and second time.
Optionally, the operating mode of the trunking further includes client mode, the method also includes:
It is primary that the trunking under client mode detects that the ntp server and the NTP Client are completed After time synchronization session, the operating mode of the trunking is switched to transparent transmission mode by client mode.
Optionally, the trunking under the client mode detects the ntp server and the NTP client It completes before a time synchronization session at end, further includes:
The continuous n times of the trunking under client mode are sent according to the first setpoint frequency to the ntp server Second time synchronization request message, the second time synchronization request message carry trunking and send second time synchronization The timestamp of request message;N is the integer greater than 1;
The trunking under client mode is according to the second time response message that the ntp server returns every time And the timestamp of the second time synchronization response message is received every time, determine N number of round-trip delay and N number of response delay; Wherein, the second time synchronization response message carries the time that trunking sends the second time synchronization request message Stamp, ntp server receives the timestamp of the second time synchronization request message and ntp server sends second time The timestamp of synchronous response message;
The trunking under client mode obtains N number of round-trip delay progress average calculating operation initially average past It returns time delay and records, and initial average response time delay is obtained to N number of response delay progress average calculating operation and is recorded.
Optionally, the operating mode of the trunking is switched to after transparent transmission mode by client mode, further includes:
The trunking under transparent transmission mode is same to the ntp server transmission third time according to the second setpoint frequency Walk request message;Wherein, the third time synchronization request message carries trunking transmission third time synchronization request and disappears The timestamp of breath;
The trunking under transparent transmission mode receives the third time synchronization response message that the ntp server is sent; Wherein, the third time synchronization response message carries the timestamp that trunking sends third time synchronization request message, The ntp server receives the timestamp of third time synchronization request message, and the ntp server sends third time synchronization and rings Answer message;
The trunking under transparent transmission mode is responded according to the temporal information, the third time synchronization that are locally stored to disappear Breath and trunking receive the timestamp of the third time synchronization response message, update the round-trip delay and sound being locally stored Answer time delay.
Optionally, the temporal information being locally stored includes initial average RTT and initial average response time delay;
The trunking under the transparent transmission mode is rung according to the temporal information, the third time synchronization that are locally stored It answers message and trunking to receive the timestamp of the third time synchronization response message, updates the round-trip delay being locally stored And response delay, comprising:
The trunking under transparent transmission mode carries out summation operation to the first duration and the second duration, when obtaining round-trip Prolong, and obtained round-trip delay and the initial average RTT are subjected to average computation, obtains updated average round trip Time delay simultaneously records;Wherein, described first when a length of ntp server receive the timestamp of the third time synchronization request message with Trunking sends the difference between the timestamp of the third time synchronization request message, described second when a length of trunking The timestamp and ntp server for receiving the third time synchronization response message send the third time synchronization response message Difference between timestamp;
The ntp server is received the third time synchronization request message by the trunking under transparent transmission mode Timestamp and the ntp server send the difference between the timestamp of the third time synchronization response message, at the beginning of described Beginning average response time delay carries out average computation, obtains updated average response time delay and records.
Optionally, the temporal information being locally stored includes initial average RTT and initial average response time delay;
The trunking under the transparent transmission mode is rung according to the temporal information, the third time synchronization that are locally stored It answers message and trunking to receive the timestamp of the third time synchronization response message, updates the round-trip delay being locally stored And response delay, comprising:
The trunking under transparent transmission mode carries out summation operation to the first duration and the second duration, obtains round-trip delay And obtained round-trip delay is recorded in the register for being used to store the initial average RTT;Wherein, described first Shi Changwei ntp server receives the timestamp of the third time synchronization request message and trunking sends the third time Difference between the timestamp of synchronization request message, described second when, a length of trunking received the third time synchronization response The timestamp and ntp server of message send the difference between the timestamp of the third time synchronization response message;
The trunking under transparent transmission mode receives the third time synchronization request message to the ntp server The timestamp that timestamp and the ntp server send the third time synchronization response message carries out seeking difference operation, is rung It answers time delay and is recorded in obtained response delay in the register for being used to store the initial average response time delay.
Optionally, the method also includes:
The trunking sends fault detection request message to the ntp server according to third setpoint frequency;It is described Fault detection request message is for determining that the ntp server state in which, the state include malfunction and normal shape State;
If the trunking continuously sets number and receives the failure inspection that the ntp server is sent within the set duration Response message is surveyed, then marks the ntp server to be in normal condition, the operating mode of the trunking is by relay services mould Formula switches to transparent transmission mode;
If the trunking continuously sets number and does not receive the failure that the ntp server is sent within the set duration Response message is detected, then the ntp server is marked to be in malfunction.
Optionally, system time, average RTT are specifically included in the temporal information that the trunking is locally stored With average response delay;
The trunking under the relay services mode according to the temporal information being locally stored determine at the first time and Second time, comprising:
When the trunking under relay services mode is to the average round trip of the system time and half Prolong carry out summation operation, obtains the first time;
The trunking under relay services mode is to the system time, the average response time delay and half The average RTT carry out summation operation, obtain second time.
Optionally, system time is specifically included in the temporal information that the trunking is locally stored, sets the past of number It returns time delay and sets the response delay of number;
The trunking under the relay services mode according to the temporal information being locally stored determine at the first time and Second time, comprising:
The trunking under relay services mode is weighted and averaged operation to the round-trip delay of the setting number Average RTT is obtained, and the system time and the average RTT of half are subjected to summation operation, is obtained To the first time;
The trunking under relay services mode is weighted and averaged operation to the response delay of the setting number Average response time delay is obtained, and by the system time, when the average round trip of the average response time delay and half Prolong carry out summation operation, obtains second time.
Optionally, the ntp server is in normal condition, the method also includes:
The trunking sends the 4th time synchronization request message to the ntp server according to the 4th setpoint frequency, The 4th time synchronization request message is for updating the system time being locally stored.
Second aspect, provides a kind of trunking, and the trunking and a Network Time Protocol ntp server are established Connection, the trunking includes: detection module, mode switch module and relay service modules;
Wherein, the mode switch module, for detecting that the ntp server is in failure shape in the detection module After state, the operating mode of the trunking is switched to relay services mode by transparent transmission mode;
The relay service modules, the first time synchronization request for being sent to the ntp server for receiving NTP Client Message;First time and the second time are determined according to the temporal information being locally stored, when the temporal information includes at least system Between, response delay and round-trip delay;Wherein, when the first time is used to indicate ntp server reception described first Between synchronization request message timestamp, second time is used to indicate the ntp server and sends first time sync response The timestamp of message;The response delay is the ntp server response time synchronization request message in normal condition Duration, time synchronization request of the round-trip delay between the ntp server and the trunking in normal condition The transmission duration of message and time synchronization response message;First time synchronous response message is sent to the NTP Client, In, the first time synchronous response message carries the first time and second time.
Optionally, the operating mode of the trunking further includes client mode, the mode switch module, further For:
Detect that the ntp server and the NTP Client complete a time synchronization session in the detection module Afterwards, the operating mode of the trunking is switched to transparent transmission mode by client mode.
Optionally, the trunking further includes client modules, and the client modules are specifically used for:
Continuous n times send the second time synchronization request message to the ntp server according to the first setpoint frequency, and described the Two time synchronization request messages carry the timestamp that trunking sends the second time synchronization request message;N is greater than 1 Integer;
It is same that second time is received according to the second time response message that the ntp server returns every time and every time The timestamp for walking response message, determines N number of round-trip delay and N number of response delay;Wherein, the second time synchronization response disappears Breath carries the timestamp that trunking sends the second time synchronization request message, and ntp server receives second time The timestamp and ntp server of synchronization request message send the timestamp of the second time synchronization response message;
Initial average RTT is obtained to N number of round-trip delay progress average calculating operation and is recorded, and to described N number of Response delay carries out average calculating operation and obtains initial average response time delay and record.
Optionally, the trunking further includes transparent transmission module;
After the operating mode of the trunking is switched to transparent transmission mode by client mode, the transparent transmission module, tool Body is used for:
Third time synchronization request message is sent to the ntp server according to the second setpoint frequency;Wherein, the third Time synchronization request message carries the timestamp that trunking sends third time synchronization request message;
Receive the third time synchronization response message that the ntp server is sent;Wherein, the third time synchronization response Message carries the timestamp that trunking sends third time synchronization request message, and the ntp server receives the third time The timestamp of synchronization request message, the ntp server send third time synchronization response message;
Described the is received according to the temporal information that is locally stored, the third time synchronization response message and trunking The timestamp of three time synchronization response messages updates the round-trip delay and response delay being locally stored.
Optionally, the temporal information being locally stored includes initial average RTT and initial average response time delay Between;
The transparent transmission module, is specifically used for:
Summation operation is carried out to the first duration and the second duration, obtains round-trip delay, and by obtained round-trip delay and institute It states initial average RTT and carries out average computation, obtain updated average RTT and record;Wherein, described first when A length of ntp server receive the timestamp of the third time synchronization request message and trunking to send third time same Walk the difference between the timestamp of request message, a length of trunking received the third time synchronization response and disappeared described second when The timestamp and ntp server of breath send the difference between the timestamp of the third time synchronization response message;
The ntp server is received into the timestamp of the third time synchronization request message and the ntp server is sent out The difference between the timestamp of the third time synchronization response message is sent, carries out average meter with the initial average response time delay It calculates, obtains updated average response time delay and record.
Optionally, the temporal information being locally stored includes initial average RTT and initial average response time delay;
The transparent transmission module, is specifically used for:
Summation operation is carried out to the first duration and the second duration, round-trip delay is obtained and is recorded in obtained round-trip delay In register for storing the initial average RTT;Wherein, described first when a length of ntp server receive described the The timestamp and trunking of three time synchronization request messages are sent between the timestamp of the third time synchronization request message Difference, described second when, a length of trunking received the timestamp and ntp server of the third time synchronization response message Send the difference between the timestamp of the third time synchronization response message;
The timestamp and ntp server hair of the third time synchronization request message are received to the ntp server The timestamp of the third time synchronization response message is sent to carry out seeking difference operation, the response delay that obtains response delay and will obtain It is recorded in the register for storing the initial average response time delay.
Optionally, the trunking further includes detection module;
The detection module, is specifically used for:
Fault detection request message is sent to the ntp server according to third setpoint frequency;The fault detection request Message is for determining that the ntp server state in which, the state include malfunction and normal condition;
If the trunking continuously sets number and receives the failure inspection that the ntp server is sent within the set duration Response message is surveyed, then the ntp server is marked to be in normal condition, and triggers the mode switch module and sets the relaying Standby operating mode is by relay services pattern switching to transparent transmission mode;
If the trunking continuously sets number and does not receive the failure that the ntp server is sent within the set duration Response message is detected, then the ntp server is marked to be in malfunction.
Optionally, system time, average RTT are specifically included in the temporal information that the trunking is locally stored With average response delay;
The relay service modules, are specifically used for:
Summation operation is carried out to the average RTT of the system time and half, when obtaining described first Between;
To the system time, the average RTT of the average response time delay and half carries out summation fortune It calculates, obtains second time.
Optionally, system time is specifically included in the temporal information that the trunking is locally stored, sets the past of number It returns time delay and sets the response delay of number;
The relay service modules, are specifically used for:
Operation is weighted and averaged to the round-trip delay of the setting number and obtains average RTT, and by the system The average RTT of time and half carries out summation operation, obtains the first time;
Operation is weighted and averaged to the response delay of the setting number and obtains average response time delay, and by the system The average RTT of time, the average response time delay and half carries out summation operation, when obtaining described second Between.
Optionally, the ntp server is in normal condition, and the client modules are further used for:
The 4th time synchronization request message, the 4th time are sent to the ntp server according to the 4th setpoint frequency Synchronization request message is for updating the system time being locally stored.
The third aspect provides a kind of communication device, comprising: processor, memory and transceiver;
The memory, for storing computer instruction;
The processor, for running the computer instruction to realize the method as described in any one of first aspect.
Fourth aspect, a kind of computer readable storage medium, the computer-readable recording medium storage have computer to refer to It enables, the method as described in any one of first aspect is realized when the computer instruction is executed by processor.
In above-described embodiment of the application, trunking and a ntp server establish connection, detect in trunking After ntp server is in malfunction, the operating mode of the trunking is switched to relay services mode by transparent transmission mode;Relaying Trunking under service mode after receiving NTP Client and being sent to the first time synchronization request message of ntp server, according to The temporal information being locally stored determines first time and the second time, this is used to indicate ntp server at the first time and receives first The timestamp of time synchronization request message, the second time are used to indicate ntp server and send first time synchronous response message Timestamp;Trunking under relay services mode sends first carried at the first time with the second time to NTP Client Time synchronization response message, so that NTP Client is synchronous with the second deadline time at the first time according to this.Due to middle following the service Trunking under business mode is determined to be used to indicate ntp server receiving time to synchronize and be asked according to the temporal information being locally stored The first time of the timestamp of message is asked, and be used to indicate the timestamp of ntp server sending time synchronous response message Second time;Although ntp server is in malfunction in this way, it can also make the NTP Client deadline synchronous, improve the time The reliability of synchronous service;Also, a trunking, which is used only, to assist NTP when ntp server is in malfunction The client deadline is synchronous, without selecting other ntp servers to provide time synchronization service for the NTP Client, letter Change network structure, saves cost.
Detailed description of the invention
Fig. 1 is a kind of structural schematic diagram of time synchronization service system provided by the embodiments of the present application;
Fig. 2 is a kind of switching schematic diagram of the operating mode of trunking provided by the embodiments of the present application;
Fig. 3 is a kind of flow diagram of method for synchronizing time provided by the embodiments of the present application;
Fig. 4 is a kind of switching flow schematic diagram of trunking operating mode provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of trunking provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of communication device provided by the embodiments of the present application.
Specific embodiment
It should be noted that " first ", " second " in the embodiment of the present application, " third ", " the 4th " are similar for distinguishing Object, without being used to describe a particular order or precedence order.
It is described in detail below in conjunction with specific embodiment of the attached drawing to the application.It should be understood that this place The specific embodiment of description is only used for describing and explaining the application, is not intended to limit this application.
When ntp server breaks down or link between ntp server and the customer side NTP breaks down, NTP visitor It takes after end needs to wait the link failure recovery between ntp server fault recovery or ntp server and the customer side NTP, It can be carried out time synchronization session, the deadline is synchronous;And during failure, it restarts and itself there is no the NTP visitor of RTC mechanism It takes for end, time synchronization service is just unavailable, and the customer side NTP not can be carried out time synchronization, influence the property of the customer side NTP Can, time synchronization reliability of service reduces.
To solve the above-mentioned problems, the embodiment of the present application provides a kind of time synchronization service system.
Referring to Fig. 1, a kind of structural schematic diagram of time synchronization service system is provided for the embodiment of the present application.
As shown, the clock synchronization system includes ntp server 101, trunking 102 and NTP Client 103; Wherein, trunking 102 and a ntp server 101 establish connection, and NTP Client 103 can be multiple, only example in figure Show one to property.
Ntp server 101, for receiving the time synchronization request message from trunking 102, NTP Client 103, And in response to the time synchronization request message to 103 time of return synchronous response message of trunking 102 and NTP Client.
Trunking 102, for 101 sending time synchronization request message of ntp server and receiving ntp server 101 The time synchronization response message of return, to synchronize local system time;It will disappear from the request of the time synchronization of NTP Client 103 Breath is sent to ntp server 101, and the time synchronization response message that ntp server 101 is sent to NTP Client 103 is sent to NTP Client 103.
NTP Client 103, for by trunking 102 to 101 sending time synchronization request message of ntp server, with And the time synchronization response message that ntp server 101 is sent is received by trunking 102, to synchronize local system time.
Wherein, time synchronization request message is NTP request message, and time synchronization response message is NTP response message.
Trunking 102 provides following three kinds of operating modes: client mode, transparent transmission mode and relay services mode.
Referring to fig. 2, switch schematic diagram for the operating mode of trunking provided by the embodiments of the present application.
As shown, trunking can be switched to transparent transmission mode 202 by client mode 201, switched by transparent transmission mode 202 For relay services mode 203, transparent transmission mode 202 is switched to by relay services mode 203.
Client mode 201, trunking is lower to hang NTP Client, trunking be not detected ntp server with NTP Client completes a time synchronization session, and trunking is in client mode.In the initial stage, client mode Under trunking carry out time synchronization according to consensus standard process and ntp server, obtain the system time of trunking.
Specifically, in the initial stage, the continuous n times of trunking under client mode are according to high-frequency (the first setting Frequency, preferred first setpoint frequency are 1 time/second) to ntp server sending time synchronization request message, to obtain system Time, initial average RTT and initial average response time delay;Continuously receiving N number of corresponding time synchronization response message Afterwards, the trunking under client mode takes according to low frequency (the 4th setpoint frequency) sending time synchronization request message to NTP Business device, with the system time of poll ntp server mechanism state synchronized trunking.N is the integer greater than 1, for example N value is 15.Preferably, the 4th setpoint frequency is 64-1Secondary/second, i.e., an every 64 seconds time synchronization request messages of transmission are serviced to NTP Device.
Since trunking has relay function, in the high-frequency stage, trunking disappears according to the request of N number of time synchronization In breath, time synchronization response message and trunking receives the timestamp of each time synchronization response message, calculates N number of Ntp server is to the round-trip delay of trunking, when carrying out average calculating operation to this N number of round-trip delay and obtaining initial average round trip Prolong, is denoted as t_rtt_avg1.Trunking is according to the time in N number of time synchronization request message and time synchronization response message Stamp, calculates the duration of N number of ntp server response time synchronization request message, carries out average calculating operation to this N number of response delay and obtains To initial average response time delay, it is denoted as t_proc_avg1.When by calculated initial average RTT and initial average response Prolong and is recorded in register.
Specifically, trunking is taken in the time synchronization request message to ntp server sending time synchronization request message Tape relay equipment sends the timestamp of the time synchronization request message, and trunking receives the time synchronization that ntp server is sent Response message, the time synchronization response message carry trunking and send the timestamp of the time synchronization request message, NTP service Device receives the timestamp of the time synchronization request message and ntp server sends the timestamp of the time synchronization response message. Round-trip delay and response delay between trunking and ntp server are sought according to following formula.
T_rtt=(T2-T1)+(T4-T3) (1)
T_proc=T3-T2 (2)
Wherein, t_rtt is round-trip delay, indicate between trunking and ntp server time synchronization request message and when Between synchronous response message transmission duration;T_proc is response delay, indicates ntp server response time synchronization request message Duration;The timestamp of T1 expression trunking sending time synchronization request message;T2, which indicates that ntp server receiving time synchronizes, to be asked Seek the timestamp of message;The timestamp of T3 expression ntp server sending time synchronous response message;T4 indicates that trunking receives The timestamp of time synchronization response message.
It should be noted that the ntp server that trunking receives returns under low frequency poll ntp server state Time synchronization response message be only used for trunking system time synchronization, and be not involved in the calculating of t_rtt and t_proc.
Transparent transmission mode 202 is increased newly in network and is suspended on trunking under NTP Client, and is configured with and trunking Identical ntp server, NTP Client carry out time synchronization by trunking and ntp server.In under client mode After equipment detects that ntp server and NTP Client complete a time synchronization session, the operating mode of trunking is by visitor Family end mode 201 is switched to transparent transmission mode 202.
Wherein, ntp server and the deterministic process of a NTP Client time synchronization session of completion are as follows: as NTP client When end to ntp server sending time synchronization request message, trunking is detected and is received by message recognition mechanism Type of message be time synchronization request message, record the IP address of the NTP Client, the IP address of ntp server, message Type, and be recorded in the database of system, recognition mechanism is matching Network Time Protocol port numbers (User Datagram Protocol herein 123), Network Time Protocol type (NTP request message);Intermediate equipment forwards the time synchronization request message to ntp server;Work as NTP When server time of return synchronous response message, trunking detects the time synchronization response message by message recognition mechanism, If ntp server IP address is consistent with the NTP Client IP address recorded in the database of system, and type of message is to ring Message is answered, then is recorded as a time synchronization session between NTP Client and server, recognition mechanism is matching NTP association herein It discusses port numbers (User Datagram Protocol 123), Network Time Protocol type (NTP response message);Trunking forwards the response report later Text gives NTP Client.
Trunking judges a time whether is completed between NTP Client and ntp server according to above-mentioned deterministic process Simultaneous session, where it has, trunking enters transparent transmission mode 202 from client mode 201 immediately.
On the one hand, the trunking under transparent transmission mode is only turned the message from ntp server and NTP Client Hair, to complete the interaction between ntp server and NTP Client, trunking is for ntp server and NTP Client Transparent, ntp server and NTP Client are the presence for not perceiving trunking.
On the one hand, when the trunking under transparent transmission mode is sent according to middle frequency (the second setpoint frequency) to ntp server Between synchronization request message, receive ntp server return time synchronization response message, and according to formula (1), (2) calculate this time Round-trip delay and response delay, to update the round-trip delay and response delay that are locally stored.It specifically can be according to following two side The round-trip delay and response delay that any one update in method is locally stored.
Method one: by taking the first time synchronization request message sent after trunking enters transparent transmission mode as an example, transparent transmission Trunking under mode updates the round-trip delay and response delay being locally stored according to following formula.
T_rtt_avg2=(t_rtt_avg1+t_rtt_x)/2 (3)
T_proc_avg2=(t_proc_avg1+t_proc_x)/2 (4)
Wherein, t_rtt_avg2 is updated average RTT, when t_proc_avg2 is updated average response Prolong;T_rtt_avg1 is initial average RTT, and t_proc_avg1 is initial average response time delay;T_rtt_x is this meter Obtained round-trip delay, t_proc_x are the response delay that this is calculated.
After determining t_rtt_avg2 and t_proc_avg2, the trunking under transparent transmission mode is according to the second setting Frequency continues to ntp server sending time synchronization request message, so that trunking is right according to formula (3) and formula (4) The average RTT and average response delay being locally stored are updated.Preferably, which is 8-1Secondary/second, The time synchronization request message of transmission in i.e. every 8 seconds is to ntp server.
Method two: trunking under transparent transmission mode directly by the round-trip delay being calculated and response delay be stored in Initial average RTT and the identical register of initial average response time delay, and register is set and is saved under transparent transmission mode recently The round-trip delay and response delay being calculated every time in M (for example, M value is 6) a period, wherein M is the integer greater than 1.
Preferably, the above method one is suitable for the more stable scene of circuit delay between ntp server and trunking, on It states method two and is suitable for ntp server serious scene compared with circuit delay shake between trunking.
Wherein, the judgement of circuit delay situation is as follows between ntp server and trunking: in the initial stage, client mould Trunking under formula judges transmission duration (i.e. T2-T1) of the time synchronization request message between ntp server and trunking, It is whether big with difference of the time synchronization response message between the transmission duration (i.e. T4-T3) between ntp server and trunking In setting value;Where it has, trunking determines that circuit delay shake is than more serious between ntp server and trunking, And then trunking is switched to after transparent transmission mode and updates the round-trip delay and response delay being locally stored using method one;No In the case of, trunking determines that circuit delay is stablized between ntp server and trunking, and then trunking is switched to transparent transmission mould The round-trip delay and response delay being locally stored are updated after formula using method two.It is of course also possible to use other methods judge NTP Circuit delay situation between server and trunking, the application are not construed as limiting this.
On the one hand, when trunking is in transparent transmission mode, trunking still need in the form of NTP Client according to (the 4th setpoint frequency, the 4th setpoint frequency are 64 to low frequency-1Secondary/second) to ntp server sending time synchronization request message, To synchronize local system time.
On the other hand, after trunking enters transparent transmission mode, failure inspection is sent to ntp server according to third setpoint frequency It surveys request message (NTP request message), the fault detection request message is for determining state described in ntp server, the state Including malfunction and normal condition.Preferably, which is 8-1Secondary/second, i.e., the time synchronization of transmission in every 8 seconds Request message is to ntp server.
Specifically, it is examined when trunking does not receive the failure that ntp server is sent within the set duration (such as in 3 seconds) When surveying response message, then it is assumed that a time out event has occurred;If continuously setting number (such as 3 times) trunking all not When receiving the fault detection response message of ntp server return, then ntp server failure or ntp server and relaying are determined Link failure between equipment, and the ntp server is marked to be in malfunction.Wherein, setting duration can be by art technology Personnel determine according to link length, packet congestion situation etc. between trunking and ntp server.
In a kind of achievable scene, the second setpoint frequency value is equal to third setpoint frequency value, when for updating round-trip Prolong the time synchronization request message with response delay, requests to disappear with the fault detection for determining state described in ntp server Breath can be used the same NTP message and be sent to ntp server.It is of course also possible to be sent out in the form of the different message of different frequencies Ntp server is given, the application is not construed as limiting this.
Relay services mode 203, after determining that ntp server is in malfunction, trunking is immediately by transparent transmission mode 202 are switched to relay services mode 203.
On the one hand, the trunking under relay services mode simulates ntp server, assists the NTP Client deadline same Step.
On the other hand, the trunking under relay services mode continues according to third setpoint frequency to being identified as malfunction Ntp server send fault detection request message, so as to continue to test NTP service failure whether restore or NTP service Whether link failure is restored between device and trunking.
Specifically, trunking judges whether to have received fault detection response message every time, and time-out time is setting Duration;If continuously setting number have received fault detection response message, determine NTP service failure it is recovered or Link failure between person's ntp server and trunking is recovered, and the ntp server is marked to be in normal condition.
Trunking is after determining that ntp server is in normal condition, and the operating mode of trunking is immediately by middle following the service Business pattern switching is transparent transmission mode.
When ntp server is in malfunction, the embodiment of the present application provides a kind of method for synchronizing time, in this method It is synchronized in the trunking of relay services mode by simulating ntp server, cooperation NTP Client deadline.
It is a kind of flow diagram of method for synchronizing time provided by the embodiments of the present application referring to Fig. 3.
As shown, the method for synchronizing time includes the following steps S301-S304.
S301: after trunking detects that ntp server is in malfunction, the operating mode of trunking is by transparent transmission mould Formula is switched to relay services mode.
Wherein, ntp server is in malfunction and refers to that ntp server can not provide one kind when time synchronization services State.When link failure between ntp server failure or trunking and ntp server, ntp server is in failure shape State.Specifically, trunking sends fault detection request message to ntp server according to third setpoint frequency, if trunking Continuous setting number does not receive the fault detection response message of ntp server transmission within the set duration, then marks NTP to service Device is in malfunction, otherwise ntp server is marked to be in normal condition;Detect that ntp server is in event in trunking After barrier state, the operating mode of trunking is switched to relay services mode by transparent transmission mode immediately.
S302: the first time that the trunking reception NTP Client under relay services mode is sent to ntp server is synchronous Request message.
Trunking under relay services mode receives the first time synchronization request that NTP Client is sent to ntp server The source IP address of message, the message is NTP Client, and purpose IP address is ntp server.
S303: the trunking under relay services mode determines first time and second according to the temporal information being locally stored Time.
Wherein, it is used to indicate the timestamp that ntp server receives the first time request message, the second time at the first time It is used to indicate the timestamp that ntp server sends first time response message;When temporal information includes at least system time, response Prolong and round-trip delay;Time synchronization request of the round-trip delay between ntp server and trunking in normal condition disappears The transmission duration of breath and time synchronization response message, response delay are that the ntp server response time in normal condition is synchronous The duration of request message.Specifically, round-trip delay refers to: issuing time synchronization request message in just from trunking The ntp server of normal state receives the duration that the time synchronization request message is spent, and services with from the NTP in normal condition Device issues time synchronization response message to trunking and receives the sum of the duration that the time synchronization response message is spent, namely place Link transmission times synchronization request message and time synchronization response message institute between the ntp server and trunking of normal condition The duration of consuming.When ntp server is in normal condition, the operating mode of trunking is not at relay services mode, in It is handled after the time synchronization request of equipment and the time synchronization request of NTP Client by ntp server response.
In the embodiment of the present application, ntp server takes for that cannot provide time synchronization again when malfunction for NTP Client Business, trunking receive NTP Client and are sent to after the first time synchronization request message of ntp server no longer by the first time Synchronization request message is transmitted to ntp server but is intercepted, and trunking is as a kind of pseudo- ntp server mould at this time Intend the time synchronization function of ntp server to provide time synchronization service for NTP Client.Specifically, trunking is according to this The temporal information of ground storage estimates following two time: the first time intercepted is received under ntp server normal condition Corresponding first time sync response is sent under receiving time and ntp server normal condition when synchronization request message to disappear Sending time when breath, and two times will be estimated as at the first time with the carrying of the second time in synchronous sound at the first time It answers and returns to NTP Client in message.Wherein, trunking returns to the first time synchronous response message of NTP Client Source IP address is the IP address of ntp server, and purpose IP address is NTP Client IP address.It can be seen that NTP Client is simultaneously The simulation process of trunking is not perceived, is still considered that ntp server is providing time synchronization service for it.
In the specific implementation, when the temporal information being locally stored is system time, average RTT and average response It being delayed, the trunking under relay services mode carries out summation operation to the average RTT of system time and half, It obtains at the first time;To system time, average response time delay and half are averaged for trunking under relay services mode Round-trip delay carries out summation operation, obtains for the second time.
Specifically, first time and the second time are obtained according to following formula.
T21=t_base+t_rtt_avg/2 (5)
T31=t_base+t_rtt_avg/2+t_proc_avg (6)
Wherein, T21It indicates at the first time, T31Indicated for the second time;T_base indicates system time;T_rtt_avg is indicated Average RTT, t_proc_avg indicate average response time delay.
In the specific implementation, when the temporal information being locally stored be system time, set number (M) round-trip delay and set Determine the response delay of number, the trunking under relay services mode is weighted and averaged operation to the round-trip delay of setting number Average RTT is obtained, and system time and the average RTT of half are subjected to summation operation, when obtaining first Between;When trunking under relay services mode is weighted and averaged operation to the response delay of setting number and obtains average response Prolong, and by system time, the average RTT of average response time delay and half carries out summation operation, when obtaining second Between.
Specifically, each group round-trip delay and response delay being calculated every time in the nearest M period, root is locally stored According to the sequencing for recording each group round-trip delay and response delay under transparent transmission mode, different weights is assigned respectively, thus by M Round-trip delay is weighted and averaged to obtain corresponding average RTT, and M response delay is weighted and averaged to obtain corresponding average sound Answer time delay.Average RTT that weighted average calculation goes out and average response delay are applied to formula (5), in (6) again, thus Calculate first time and the second time.
Wherein, for M round-trip delay or M response delay weight setting, can be record the time it is more late, Corresponding weighted value is bigger.Illustratively, from morning to night according to the record time, the weight of each group of data is successively are as follows: 1,2,3 ... M, corresponding weighting coefficient is successively are as follows:
Optionally, the round-trip delay and response delay in this time interaction are calculated and is recorded, if recording time and currently this Difference between the system time of ground storage is more than preset difference (such as 3 times NTP Client synchronizing cycle), then it is assumed that this time Calculated round-trip delay and response delay failure, do not update current average RTT and average response delay, or lose Abandon this time calculated round-trip delay and response delay.
The temporal information that above-mentioned trunking is locally stored is when trunking is in client mode and trunking It is obtained when in transparent transmission mode.
In some embodiments, when the initial stage, trunking is not lower to hang NTP Client, the Working mould of trunking Formula is client mode;The continuous n times of trunking under client mode are sent according to the first setpoint frequency to ntp server Second time synchronization request message, the second time synchronization request message carry trunking and send the second time synchronization request message Timestamp;The second time response message that trunking under client mode is returned according to each ntp server and every The secondary timestamp for receiving the second time synchronization response message, determines N number of round-trip delay and N number of response delay;Wherein, second when Between synchronous response message carry trunking send the second time synchronization request message timestamp, ntp server receive second The timestamp and ntp server of time synchronization request message send the timestamp of the second time synchronization response message;Client Trunking under mode obtains initial average RTT to the progress average calculating operation of N number of round-trip delay and records, and to N number of Response delay carries out average calculating operation and obtains initial average response time delay record.
In some embodiments, the operating mode of trunking is switched to transparent transmission mode from client mode;Transparent transmission mode Under trunking according to the second setpoint frequency to ntp server send third time synchronization request message;Wherein, the third time Synchronization request message carries the timestamp that trunking sends third time synchronization request message;Relaying under transparent transmission mode is set The standby third time synchronization response message for receiving ntp server and sending;Wherein, third time synchronization response message carries relaying Equipment sends the timestamp of third time synchronization request message, and ntp server receives the time of third time synchronization request message Stamp, ntp server send third time synchronization response message;Trunking under transparent transmission mode is believed according to the time being locally stored Breath, third time synchronization response message and trunking receive the timestamp of third time synchronization response message, update local The round-trip delay and response delay of storage.
In further embodiments, the temporal information being locally stored includes initial average RTT and initial average response Time delay;Trunking under transparent transmission mode is according to temporal information, third time synchronization response message and the relaying being locally stored Equipment receives the timestamp of third time synchronization response message, updates the round-trip delay and response delay being locally stored, comprising: thoroughly Trunking under arq mode carries out summation operation to the first duration and the second duration, obtains round-trip delay, and past by what is obtained It returns time delay and initial average RTT carries out average computation, obtain updated average RTT and record;Wherein, first Shi Changwei ntp server receives the timestamp of third time synchronization request message and trunking sends the request of third time synchronization Difference between the timestamp of message, second when a length of trunking receive the timestamp of third time synchronization response message with Ntp server sends the difference between the timestamp of third time synchronization response message;Trunking under transparent transmission mode is by NTP Server receive third time synchronization request message timestamp and ntp server send third time synchronization response message when Between stamp between difference, with initial average response time delay carry out average computation, obtain updated average response time delay and record.
In further embodiments, the temporal information being locally stored includes initial average RTT and initial average response Time delay;Trunking under transparent transmission mode is according to temporal information, third time synchronization response message and the relaying being locally stored Equipment receives the timestamp of third time synchronization response message, updates the round-trip delay and response delay being locally stored, comprising: thoroughly Trunking under arq mode carries out summation operation to the first duration and the second duration, obtains round-trip delay and round-trip by what is obtained Time delay is recorded in the register for storing initial average RTT;Wherein, first when a length of ntp server receive third The timestamp and trunking of time synchronization request message send the difference between the timestamp of third time synchronization request message, A length of trunking receives the timestamp of third time synchronization response message when second and ntp server sends third time synchronization Difference between the timestamp of response message;Trunking under transparent transmission mode, which receives third time synchronization to ntp server, asks The timestamp of the timestamp and ntp server transmission third time synchronization response message of seeking message carries out seeking difference operation, is rung It answers time delay and obtained response delay is recorded in the register for being used for storing initial average response time delay.
S304: the trunking under relay services mode sends first time synchronous response message to NTP Client, In, first time synchronous response message carries first time and the second time.
Trunking under relay services mode carries calculated first time and the second time same at the first time It walks in response message, NTP Client is sent to, so that NTP Client is same with the second deadline time at the first time according to this Step operation;Wherein, the source IP address in the first time synchronous response message is the IP address of ntp server, purpose IP address For the IP address of NTP Client.
Further, the trunking under relay services mode is still according to third setpoint frequency to being currently marked as The ntp server of malfunction sends fault detection request message;If the trunking continuous device under relay services mode Number receives the fault detection response message of ntp server transmission within the set duration, then the ntp server is marked to be in normal State, the operating mode of trunking are transparent transmission mode by relay services pattern switching.
In some embodiments, the 4th setpoint frequency is lower than the second setpoint frequency, and second setpoint frequency is lower than first Setpoint frequency value;That is, when the initial stage, trunking under client mode is with upper frequency (the first setpoint frequency, such as 1 Secondary/second) to ntp server n times time synchronization request message is recurred, quickly and accurately to get ntp server return Time synchronization response message, when reaching synchronous with ntp server, and obtaining initial average RTT and initial average response Prolong;After initial stage, since trunking itself is with certain holding capacity and in order to mitigate link bandwidth load, only Ntp server is wanted to be marked as normal condition, just (the 4th sets trunking (client mode or transparent transmission mode) with lower frequency Determine frequency, such as 64-1Secondary/second) to ntp server sending time synchronization request message, to obtain the time of ntp server return Synchronous response message completes the synchronization of local system time;Under transparent transmission mode, trunking with middle frequency (the second setpoint frequency, Such as 8-1Secondary/second) to ntp server sending time synchronization request message, to obtain the time synchronization response of ntp server return Message completes the update of the round-trip delay being locally stored and response delay, is locally stored in this way in a manner of middle frequency to update Round-trip delay and response delay, can be completed to round-trip delay and response delay more in the sending cycle of NTP Client Newly, even if ntp server breaks down or the link between ntp server and trunking breaks down, trunking is current The temporal information of storage is that update is completed before the sending cycle of next NTP Client, does not have to the excessive link bandwidth that increases and bears Time synchronization reliability of service is improved while lotus.
In some embodiments, the second setpoint frequency value is equal to third setpoint frequency value, i.e., trunking is with middle frequency (ratio Such as 8-1Secondary/second) to ntp server transmission fault detection request message, to determine ntp server state in which;In this way, relaying Equipment can complete the judgement to ntp server state and the state according to ntp server in the sending cycle of NTP Client The switching of operating mode is completed, even if ntp server breaks down or event occurs for the link between ntp server and trunking Barrier, before the sending cycle of next NTP Client, trunking has been switched to relay services mode, reduces delay, when raising Between synchronous service reliability.
It should be noted that method for synchronizing time provided by the embodiments of the present application is equally applicable to ntp server and NTP visitor The one-to-many scene in family end.When the NTP Client hung under trunking be it is multiple when, if ntp server break down or After link between ntp server and trunking breaks down, trunking enters relay services mode, and that hangs instantly is multiple NTP client when at least one of NTP Client is to trunking sending time synchronization request message, under relay services mode End determines at the first time and the second time according to process shown in Fig. 3, and carries the at least one NTP Client return The time synchronization response message of one time and the second time, so that at least one NTP Client breaks down in ntp server Or deadline simultaneously operating when breaking down of the link between ntp server and trunking.
Below to hang with a NTP Client under trunking, time synchronization request message and fault detection request disappear Breath is NTP request message, and N value 15, high frequency is 1 time/second, intermediate frequency 8-1Secondary/second, low frequency 64-1For secondary/second, to relaying The switching flow of the operating mode of equipment is described in detail.
It referring to fig. 4, is a kind of switching flow figure of the operating mode of trunking provided by the embodiments of the present application.
As shown, the switching flow includes:
S401: initial stage, the trunking under client mode determine initial average RTT and initial average ring Answer time delay and synchronization system time.
Specifically, when the initial stage, trunking is not lower to hang NTP Client, and the operating mode of trunking is client Mode, the trunking under client mode continuously send 15 NTP request reports to ntp server according to the frequency of 1 time/second Text, and 15 NTP response messages according to formula (1), (2) determine 15 groups of round-trip delays and response delay based on the received, in turn It carries out average calculating operation and obtains initial average RTT and initial average response time delay and system time.
S402: after the initial stage, the trunking under client mode is according to 64-1The frequency of secondary/second is to ntp server NTP request message is sent, with the synchronization system time.
After initial stage, if trunking is not still lower to hang NTP Client, trunking is still in client mould Formula, the trunking under client mode is according to 64-1The frequency of secondary/second sends NTP request message to ntp server with synchronous system It unites the time.
S403: it is same whether the trunking detection ntp server under client mode with NTP Client completes a time Walk session;Where it has, executing S404;In a case of no, S402 is executed.
S404: the operating mode of trunking is switched to transparent transmission mode by client mode.
S405: the trunking under transparent transmission mode updates the round-trip delay and response delay being locally stored.
Specifically, after trunking enters transparent transmission mode, with 8-1The frequency of secondary/second sends NTP request report to ntp server Text is to update the round-trip delay and response delay that are locally stored according to method one or method two.
S406: the trunking synchronization system time under transparent transmission mode.
Specifically, the trunking under transparent transmission mode is according further to 64-1The frequency of secondary/second sends NTP request to ntp server Message, based on the received NTP response message synchronization system time.
S407: the trunking under transparent transmission mode determines the state of ntp server.
Specifically, the trunking under transparent transmission mode is according to 8-1The frequency of secondary/second sends NTP request report to ntp server Text, and NTP response message determines the state of ntp server based on the received.
In addition to above-mentioned S405~S407, the trunking under transparent transmission mode also needs to receive the NTP from NTP Client The NTP request message is transmitted to ntp server by request message, receives ntp server in response to the NTP from NTP Client The NTP response message of request message, and the NTP response message is transmitted to NTP Client.
S408: the trunking under transparent transmission mode judges whether ntp server is malfunction;Where it has, holding Row S409;In a case of no, S405-S407 is executed.
In S408, the trunking under transparent transmission mode determines ntp server according to NTP response message received in S406 State whether be malfunction.
S409: the operating mode of trunking is switched to relay services mode by transparent transmission mode.
S410: the trunking under relay services mode receives the NTP request message that NTP Client is sent, according to local The temporal information of storage determines first time and the second time, and by first time and the carrying of the second time in NTP response message In be sent to NTP Client.
Specifically, if after the trunking under relay services mode receives the NTP request message from NTP Client, Trunking under relay services mode calculates at the first time and the according to the temporal information being locally stored according to formula (5), (6) Two times, and will carry and be sent to NTP Client with the NTP response message of the second time at the first time, so that NTP Client It is synchronous with the second deadline time at the first time according to this.
S411: the trunking under relay services mode determines the state of ntp server.
Specifically, the trunking under relay services mode is according to 8-1The frequency of secondary/second sends NTP to ntp server and asks Message is sought, and NTP response message determines the state of ntp server based on the received.
S412: the trunking under relay services mode judges whether ntp server is normal condition;The case where being Under, execute S413;In a case of no, S410-S411 is executed.
S413: the operating mode of trunking is transparent transmission mode by relay services pattern switching.
After S413, the relay services mode under transparent transmission mode executes step shown in S405-S408.
In above-described embodiment of the application, after trunking detects that ntp server is in malfunction, the trunking Operating mode relay services mode is switched to by transparent transmission mode;Trunking under relay services mode is receiving NTP client After holding the first time synchronization request message sent, first time and the second time are determined according to the temporal information being locally stored, This is used to indicate the timestamp that ntp server receives first time synchronization request message at the first time, and the second time was used to indicate The timestamp of ntp server transmission first time synchronous response message;Trunking under relay services mode is to NTP Client Send carry at the first time and the second time first time synchronous response message so that NTP Client according to this first when Between it is synchronous with the second deadline time.
Since the trunking under relay services mode is determined to be used to indicate NTP clothes according to the temporal information being locally stored The first time of the timestamp for device receiving time synchronization request message of being engaged in, and be used to indicate ntp server sending time and synchronize Second time of the timestamp of response message;Although ntp server is in malfunction in this way, also NTP Client can be made complete At time synchronization, time synchronization reliability of service is improved.
Also, a trunking is used only in the embodiment of the present application to assist when ntp server is in malfunction Help at least one NTP Client deadline under the ntp server synchronous, without at least one under the ntp server A NTP Client selects other ntp servers to provide time synchronization service respectively, simplifies network structure, saves cost.
Based on the same technical idea, the embodiment of the present application also provides a kind of trunking, before which can realize State process performed by Fig. 3-Fig. 4 in embodiment.
As shown in figure 5, being a kind of structural schematic diagram of trunking provided by the embodiments of the present application.
As shown, the trunking includes: detection module 501, mode switch module 502 and relay service modules 503;
Wherein, the mode switch module 502, for detecting that the ntp server is in the detection module 501 After malfunction, the operating mode of the trunking is switched to relay services mode by transparent transmission mode;
The relay service modules 503, the first time that the ntp server is sent to for receiving NTP Client synchronize Request message;First time and the second time are determined according to the temporal information being locally stored, and the temporal information, which includes at least, is System time, response delay and round-trip delay;Wherein, the first time is used to indicate the ntp server and receives described the The timestamp of one time synchronization request message, it is synchronous at the first time that second time is used to indicate the ntp server transmission The timestamp of response message;The response delay is that the ntp server response time synchronization request in normal condition disappears The duration of breath, time synchronization of the round-trip delay between the ntp server and the trunking in normal condition The transmission duration of request message and time synchronization response message;First time synchronous response message is sent to the NTP Client, Wherein, the first time synchronous response message carries the first time and second time.
Optionally, the operating mode of the trunking further includes client mode, the mode switch module 502, into One step is used for:
Detect that the ntp server and the NTP Client complete a time synchronization meeting in the detection module 501 After words, the operating mode of the trunking is switched to transparent transmission mode by client mode.
Optionally, the trunking further includes client modules 504, and the client modules 504 are specifically used for:
Continuous n times send the second time synchronization request message to the ntp server according to the first setpoint frequency, and described the Two time synchronization request messages carry the timestamp that trunking sends the second time synchronization request message;N is greater than 1 Integer;
It is same that second time is received according to the second time response message that the ntp server returns every time and every time The timestamp for walking response message, determines N number of round-trip delay and N number of response delay;Wherein, the second time synchronization response disappears Breath carries the timestamp that trunking sends the second time synchronization request message, and ntp server receives second time The timestamp and ntp server of synchronization request message send the timestamp of the second time synchronization response message;
Initial average RTT is obtained to N number of round-trip delay progress average calculating operation and is recorded, and to described N number of Response delay carries out average calculating operation and obtains initial average response time delay and record.
Optionally, the trunking further includes transparent transmission module 505;
After the operating mode of the trunking is switched to transparent transmission mode by client mode, the transparent transmission module 505, It is specifically used for:
Third time synchronization request message is sent to the ntp server according to the second setpoint frequency;Wherein, the third Time synchronization request message carries the timestamp that trunking sends third time synchronization request message;
Receive the third time synchronization response message that the ntp server is sent;Wherein, the third time synchronization response Message carries the timestamp that trunking sends third time synchronization request message, and the ntp server receives the third time The timestamp of synchronization request message, the ntp server send third time synchronization response message;
Described the is received according to the temporal information that is locally stored, the third time synchronization response message and trunking The timestamp of three time synchronization response messages updates the round-trip delay and response delay being locally stored.
Optionally, the temporal information being locally stored includes initial average RTT and initial average response time delay Between;
The transparent transmission module, is specifically used for:
Summation operation is carried out to the first duration and the second duration, obtains round-trip delay, and by obtained round-trip delay and institute It states initial average RTT and carries out average computation, obtain updated average RTT and record;Wherein, described first when A length of ntp server receive the timestamp of the third time synchronization request message and trunking to send third time same Walk the difference between the timestamp of request message, a length of trunking received the third time synchronization response and disappeared described second when The timestamp and ntp server of breath send the difference between the timestamp of the third time synchronization response message;
The ntp server is received into the timestamp of the third time synchronization request message and the ntp server is sent out The difference between the timestamp of the third time synchronization response message is sent, carries out average meter with the initial average response time delay It calculates, obtains updated average response time delay and record.
Optionally, the temporal information being locally stored includes initial average RTT and initial average response time delay;
The transparent transmission module, is specifically used for:
Summation operation is carried out to the first duration and the second duration, round-trip delay is obtained and is recorded in obtained round-trip delay In register for storing the initial average RTT;Wherein, described first when a length of ntp server receive described the The timestamp and trunking of three time synchronization request messages are sent between the timestamp of the third time synchronization request message Difference, described second when, a length of trunking received the timestamp and ntp server of the third time synchronization response message Send the difference between the timestamp of the third time synchronization response message;
The timestamp and ntp server hair of the third time synchronization request message are received to the ntp server The timestamp of the third time synchronization response message is sent to carry out seeking difference operation, the response delay that obtains response delay and will obtain It is recorded in the register for storing the initial average response time delay.
Optionally, the trunking further includes detection module;
The detection module, is specifically used for:
Fault detection request message is sent to the ntp server according to third setpoint frequency;The fault detection request Message is for determining that the ntp server state in which, the state include malfunction and normal condition;
If the trunking continuously sets number and receives the failure inspection that the ntp server is sent within the set duration Response message is surveyed, then the ntp server is marked to be in normal condition, and triggers the mode switch module and sets the relaying Standby operating mode is by relay services pattern switching to transparent transmission mode;
If the trunking continuously sets number and does not receive the failure that the ntp server is sent within the set duration Response message is detected, then the ntp server is marked to be in malfunction.
Optionally, system time, average RTT are specifically included in the temporal information that the trunking is locally stored With average response delay;
The relay service modules, are specifically used for:
Summation operation is carried out to the average RTT of the system time and half, when obtaining described first Between;
To the system time, the average RTT of the average response time delay and half carries out summation fortune It calculates, obtains second time.
Optionally, system time is specifically included in the temporal information that the trunking is locally stored, sets the past of number It returns time delay and sets the response delay of number;
The relay service modules, are specifically used for:
Operation is weighted and averaged to the round-trip delay of the setting number and obtains average RTT, and by the system The average RTT of time and half carries out summation operation, obtains the first time;
Operation is weighted and averaged to the response delay of the setting number and obtains average response time delay, and by the system The average RTT of time, the average response time delay and half carries out summation operation, when obtaining described second Between.
Optionally, the ntp server is in normal condition, and the client modules are further used for:
The 4th time synchronization request message, the 4th time are sent to the ntp server according to the 4th setpoint frequency Synchronization request message is for updating the system time being locally stored.
Based on the same technical idea, the embodiment of the present application also provides a kind of communication device, which can be realized Process performed by Fig. 3-Fig. 4 in previous embodiment.
It is the structural schematic diagram of communication device provided by the embodiments of the present application, as shown, base station Ke Bao referring to Fig. 6 It includes: processor 601, memory 602, transceiver 603 and bus interface 604.
Processor 601, which is responsible for management bus architecture and common processing, memory 602, can store processor 601 and is holding Used data when row operation.Transceiver 603 is for sending and receiving data under the control of processor 601.
Bus architecture may include the bus and bridge of any number of interconnection, specifically represented by processor 601 one or The various circuits for the memory that multiple processors and memory 602 represent link together.Bus architecture can also will be such as outer Various other circuits of peripheral equipment, voltage-stablizer and management circuit or the like link together, these are all that this field institute is public Know, therefore, it will not be further described herein.Bus interface provides interface.Processor 601 is responsible for the total coil holder of management Structure and common processing, memory 602 can store the used data when executing operation of processor 601.
The process that the embodiment of the present application discloses, can be applied in processor 601, or realized by processor 601.In reality During now, each step of signal processing flow can pass through the integrated logic circuit or software of the hardware in processor 601 The instruction of form is completed.Processor 601 can be general processor, digital signal processor, specific integrated circuit, scene can compile Journey gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, may be implemented Or disclosed each method, step and logic diagram in execution the embodiment of the present application.General processor can be microprocessor Or any conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present application, can be embodied directly at hardware Reason device executes completion, or in processor hardware and software module combine and execute completion.Software module can be located at random Memory, flash memory, read-only memory, the abilities such as programmable read only memory or electrically erasable programmable memory, register In the storage medium of domain maturation.The storage medium is located at memory 602, and processor 601 reads the information in memory 602, knot Close the step of its hardware completes signal processing flow.
In the embodiment of the present application, involved in trunking 500 and communication device 600 with skill provided by the embodiments of the present application The relevant concept of art scheme is explained and is described in detail and other steps refer in preceding method or other embodiments about these The description of content, is not repeated herein.
It should be noted that the above-mentioned processor being related to of the embodiment of the present application can be central processing unit (central Processing unit, CPU), general processor, digital signal processor (digital signal processor, DSP), Specific integrated circuit (application-specific integrated circuit, ASIC), field programmable gate array It is (field programmable gate array, FPGA) or other programmable logic device, transistor logic, hard Part component or any combination thereof.It, which may be implemented or executes, combines various illustrative logic sides described in teachings herein Frame, module and circuit.Processor is also possible to realize the combination of computing function, such as includes one or more microprocessors group It closes, DSP and the combination of microprocessor etc..Wherein, the memory can integrate in the processor, can also with it is described Processor is provided separately.
Based on the same technical idea, the embodiment of the present application also provides a kind of computer readable storage mediums.Computer Readable storage medium storing program for executing is stored with computer executable instructions, and computer executable instructions are for making computer execute institute in Fig. 3-4 The process of execution.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies Within, then the application is also intended to include these modifications and variations.

Claims (22)

1. a kind of method for synchronizing time, which is characterized in that be applied to trunking, the trunking and a network time assist View ntp server establishes connection, which comprises
After trunking detects that the ntp server is in malfunction, the operating mode of the trunking is by transparent transmission mould Formula is switched to relay services mode;
The first time that trunking reception NTP Client under relay services mode is sent to the ntp server is synchronous Request message;
The trunking under relay services mode determines first time and the second time according to the temporal information being locally stored, The temporal information includes at least system time, response delay and round-trip delay;Wherein, the first time is used to indicate institute The timestamp that ntp server receives the first time synchronization request message is stated, second time is used to indicate the NTP clothes The timestamp for device transmission first time synchronous response message of being engaged in;The response delay is the NTP service in normal condition The duration of device response time synchronization request message, the round-trip delay be the ntp server in normal condition with it is described The transmission duration of time synchronization request message and time synchronization response message between trunking;
The trunking under relay services mode sends first time synchronous response message to the NTP Client, wherein The first time synchronous response message carries the first time and second time.
2. the method as described in claim 1, which is characterized in that the operating mode of the trunking further includes client mould Formula, the method also includes:
The trunking under client mode detects that the ntp server and the NTP Client complete a time After simultaneous session, the operating mode of the trunking is switched to transparent transmission mode by client mode.
3. method according to claim 2, which is characterized in that the trunking under the client mode detects institute It states before ntp server and the NTP Client complete a time synchronization session, further includes:
The continuous n times of the trunking under client mode send second to the ntp server according to the first setpoint frequency Time synchronization request message, the second time synchronization request message carry trunking and send the second time synchronization request The timestamp of message;N is the integer greater than 1;
The trunking under client mode according to the second time response message that the ntp server returns every time and The timestamp for receiving the second time synchronization response message every time, determines N number of round-trip delay and N number of response delay;Wherein, The second time synchronization response message carries the timestamp that trunking sends the second time synchronization request message, NTP Server receives the timestamp of the second time synchronization request message and ntp server sends second time synchronization and rings Answer the timestamp of message;
When the trunking under client mode obtains initial average round trip to N number of round-trip delay progress average calculating operation Prolong and record, and initial average response time delay is obtained to N number of response delay progress average calculating operation and is recorded.
4. method according to claim 2, which is characterized in that the operating mode of the trunking is switched by client mode After transparent transmission mode, further includes:
The trunking under transparent transmission mode, which sends third time synchronization to the ntp server according to the second setpoint frequency, asks Seek message;Wherein, the third time synchronization request message carries trunking and sends third time synchronization request message Timestamp;
The trunking under transparent transmission mode receives the third time synchronization response message that the ntp server is sent;Wherein, The third time synchronization response message carries the timestamp that trunking sends third time synchronization request message, described Ntp server receives the timestamp of third time synchronization request message, and the ntp server sends the response of third time synchronization and disappears Breath;
The trunking under transparent transmission mode according to be locally stored temporal information, the third time synchronization response message with And trunking receives the timestamp of the third time synchronization response message, when updating the round-trip delay being locally stored and response Prolong.
5. method as claimed in claim 4, which is characterized in that the temporal information being locally stored includes initial average round trip Time delay and initial average response time delay;
The trunking under the transparent transmission mode is responded according to the temporal information, the third time synchronization that are locally stored to disappear Breath and trunking receive the timestamp of the third time synchronization response message, update the round-trip delay and sound being locally stored Answer time delay, comprising:
The trunking under transparent transmission mode carries out summation operation to the first duration and the second duration, obtains round-trip delay, and Obtained round-trip delay and the initial average RTT are subjected to average computation, obtain updated average RTT simultaneously Record;Wherein, described first when a length of ntp server timestamp that receives the third time synchronization request message set with relaying Preparation send the difference between the timestamp of the third time synchronization request message, and described second when, a length of trunking received institute The timestamp and ntp server of stating third time synchronization response message send the timestamp of the third time synchronization response message Between difference;
The ntp server is received the time of the third time synchronization request message by the trunking under transparent transmission mode Stamp and the ntp server send the difference between the timestamp of the third time synchronization response message, initially put down with described Equal response delay carries out average computation, obtains updated average response time delay and records.
6. method as claimed in claim 4, which is characterized in that the temporal information being locally stored includes initial average round trip Time delay and initial average response time delay;
The trunking under the transparent transmission mode is responded according to the temporal information, the third time synchronization that are locally stored to disappear Breath and trunking receive the timestamp of the third time synchronization response message, update the round-trip delay and sound being locally stored Answer time delay, comprising:
The trunking under transparent transmission mode carries out summation operation to the first duration and the second duration, obtains round-trip delay and incites somebody to action Obtained round-trip delay is recorded in the register for storing the initial average RTT;Wherein, first duration The timestamp of the third time synchronization request message is received for ntp server and trunking sends the third time synchronization Difference between the timestamp of request message, described second when, a length of trunking received the third time synchronization response message Timestamp and ntp server send the difference between the timestamp of the third time synchronization response message;
The trunking under transparent transmission mode receives the time of the third time synchronization request message to the ntp server The timestamp that stamp and the ntp server send the third time synchronization response message carries out seeking difference operation, when obtaining response Prolong and is recorded in obtained response delay in the register for being used to store the initial average response time delay.
7. the method as described in claim 1, which is characterized in that further include:
The trunking sends fault detection request message to the ntp server according to third setpoint frequency;The failure Solicitation message is for determining that the ntp server state in which, the state include malfunction and normal condition;
If the trunking continuously sets number and receives the fault detection sound that the ntp server is sent within the set duration Message is answered, then the ntp server is marked to be in normal condition, the operating mode of the trunking is cut by relay services mode Shift to transparent transmission mode;
If the trunking continuously sets number and does not receive the fault detection that the ntp server is sent within the set duration Response message then marks the ntp server to be in malfunction.
8. the method as described in claim 1, which is characterized in that specifically wrapped in the temporal information that the trunking is locally stored Include system time, average RTT and average response delay;
The trunking under the relay services mode determines first time and second according to the temporal information being locally stored Time, comprising:
The trunking under relay services mode to the average RTT of the system time and half into Row summation operation obtains the first time;
The trunking under relay services mode is to the system time, the institute of the average response time delay and half It states average RTT and carries out summation operation, obtain second time.
9. the method as described in claim 1, which is characterized in that specifically wrapped in the temporal information that the trunking is locally stored System time is included, the round-trip delay of number is set and sets the response delay of number;
The trunking under the relay services mode determines first time and second according to the temporal information being locally stored Time, comprising:
The trunking under relay services mode is weighted and averaged operation to the round-trip delay of the setting number and obtains Average RTT, and the system time and the average RTT of half are subjected to summation operation, obtain institute It states at the first time;
The trunking under relay services mode is weighted and averaged operation to the response delay of the setting number and obtains Average response time delay, and by the system time, the average RTT of the average response time delay and half into Row summation operation obtains second time.
10. the method as described in claim 1, which is characterized in that the ntp server is in normal condition, and the method is also Include:
The trunking sends the 4th time synchronization request message to the ntp server according to the 4th setpoint frequency, described 4th time synchronization request message is for updating the system time being locally stored.
11. a kind of trunking, which is characterized in that the trunking and a Network Time Protocol ntp server are established and connected It connects, the trunking includes: detection module, mode switch module and relay service modules;
Wherein, the mode switch module, for detecting that the ntp server is in malfunction in the detection module Afterwards, the operating mode of the trunking is switched to relay services mode by transparent transmission mode;
The relay service modules, the first time synchronization request that the ntp server is sent to for receiving NTP Client disappear Breath;Determined at the first time and the second time according to the temporal information that is locally stored, the temporal information include at least system time, Response delay and round-trip delay;Wherein, the first time, it is same to be used to indicate the ntp server reception first time The timestamp of request message is walked, second time is used to indicate the ntp server and sends first time synchronous response message Timestamp;The response delay is the duration of the ntp server response time synchronization request message in normal condition, Time synchronization request message of the round-trip delay between the ntp server and the trunking in normal condition and The transmission duration of time synchronization response message;First time synchronous response message is sent to the NTP Client, wherein described First time synchronous response message carries the first time and second time.
12. trunking as claimed in claim 11, which is characterized in that the operating mode of the trunking further includes client End mode, the mode switch module, is further used for:
It, will after the detection module detects that the ntp server and the NTP Client complete a time synchronization session The operating mode of the trunking is switched to transparent transmission mode by client mode.
13. trunking as claimed in claim 12, which is characterized in that the trunking further includes client modules, institute Client modules are stated, are specifically used for:
Continuous n times send the second time synchronization request message to the ntp server according to the first setpoint frequency, when described second Between synchronization request message carry trunking and send the timestamp of the second time synchronization request message;N is whole greater than 1 Number;
According to the second time response message that the ntp server returns every time and receives second time synchronization every time and ring The timestamp for answering message determines N number of round-trip delay and N number of response delay;Wherein, the second time synchronization response message is taken Tape relay equipment sends the timestamp of the second time synchronization request message, and ntp server receives second time synchronization The timestamp and ntp server of request message send the timestamp of the second time synchronization response message;
Initial average RTT is obtained to N number of round-trip delay progress average calculating operation and is recorded, and to N number of response Time delay carries out average calculating operation and obtains initial average response time delay and record.
14. trunking as claimed in claim 12, which is characterized in that the trunking further includes transparent transmission module;
After the operating mode of the trunking is switched to transparent transmission mode by client mode, the transparent transmission module is specific to use In:
Third time synchronization request message is sent to the ntp server according to the second setpoint frequency;Wherein, the third time Synchronization request message carries the timestamp that trunking sends third time synchronization request message;
Receive the third time synchronization response message that the ntp server is sent;Wherein, the third time synchronization response message The timestamp that trunking sends third time synchronization request message is carried, the ntp server receives third time synchronization The timestamp of request message, the ntp server send third time synchronization response message;
When receiving the third according to the temporal information, the third time synchronization response message and the trunking that are locally stored Between synchronous response message timestamp, update the round-trip delay and response delay being locally stored.
15. trunking as claimed in claim 14, which is characterized in that the temporal information being locally stored includes initial flat Between equal round-trip delay and initial average response time delay;
The transparent transmission module, is specifically used for:
Summation operation is carried out to the first duration and the second duration, obtains round-trip delay, and by obtained round-trip delay and it is described just Beginning average RTT carries out average computation, obtains updated average RTT and records;Wherein, described first when it is a length of Ntp server receives the timestamp of the third time synchronization request message and trunking sends the third time synchronization and asks Seek the difference between the timestamp of message, described second when, a length of trunking received the third time synchronization response message Timestamp and ntp server send the difference between the timestamp of the third time synchronization response message;
The ntp server is received into the timestamp of the third time synchronization request message and the ntp server sends institute The difference between the timestamp of third time synchronization response message is stated, carries out average computation with the initial average response time delay, It obtains updated average response time delay and records.
16. trunking as claimed in claim 14, which is characterized in that the temporal information being locally stored includes initial flat Equal round-trip delay and initial average response time delay;
The transparent transmission module, is specifically used for:
Summation operation is carried out to the first duration and the second duration, obtains round-trip delay and be recorded in obtained round-trip delay to be used for In the register for storing the initial average RTT;Wherein, described first when a length of ntp server when receiving the third Between synchronization request message timestamp and trunking send the difference between the timestamp of the third time synchronization request message Value, described second when, a length of trunking received the timestamp of the third time synchronization response message and ntp server is sent Difference between the timestamp of the third time synchronization response message;
The timestamp of the third time synchronization request message is received to the ntp server and the ntp server sends institute The timestamp for stating third time synchronization response message carries out seeking difference operation, obtains response delay and records obtained response delay In the register for storing the initial average response time delay.
17. trunking as claimed in claim 11, which is characterized in that the trunking further includes detection module;
The detection module, is specifically used for:
Fault detection request message is sent to the ntp server according to third setpoint frequency;The fault detection request message For determining that the ntp server state in which, the state include malfunction and normal condition;
If the trunking continuously sets number and receives the fault detection sound that the ntp server is sent within the set duration Message is answered, then the ntp server is marked to be in normal condition, and triggers the mode switch module for the trunking Operating mode is by relay services pattern switching to transparent transmission mode;
If the trunking continuously sets number and does not receive the fault detection that the ntp server is sent within the set duration Response message then marks the ntp server to be in malfunction.
18. trunking as claimed in claim 11, which is characterized in that in the temporal information that the trunking is locally stored Specifically include system time, average RTT and average response delay;
The relay service modules, are specifically used for:
Summation operation is carried out to the average RTT of the system time and half, obtains the first time;
To the system time, the average RTT of the average response time delay and half carries out summation operation, Obtain second time.
19. trunking as claimed in claim 11, which is characterized in that in the temporal information that the trunking is locally stored System time is specifically included, the round-trip delay of number is set and sets the response delay of number;
The relay service modules, are specifically used for:
Operation is weighted and averaged to the round-trip delay of the setting number and obtains average RTT, and by the system time Summation operation is carried out with the average RTT of half, obtains the first time;
The response delay of the setting number is weighted and averaged by operation obtains average response time delay, and when by the system Between, the average RTT of the average response time delay and half carries out summation operation, obtains second time.
20. trunking as claimed in claim 11, which is characterized in that the ntp server is in normal condition, the visitor Family end module, is further used for:
The 4th time synchronization request message, the 4th time synchronization are sent to the ntp server according to the 4th setpoint frequency Request message is for updating the system time being locally stored.
21. a kind of communication device characterized by comprising processor, memory and transceiver;
The memory, for storing computer instruction;
The processor, for running the computer instruction to realize the method as described in any one of claims 1 to 10.
22. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to It enables, the computer instruction realizes method described in any one of claims 1 to 10 when being executed by processor.
CN201910904083.XA 2019-09-24 2019-09-24 Time synchronization method, relay equipment and device Active CN110492967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910904083.XA CN110492967B (en) 2019-09-24 2019-09-24 Time synchronization method, relay equipment and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910904083.XA CN110492967B (en) 2019-09-24 2019-09-24 Time synchronization method, relay equipment and device

Publications (2)

Publication Number Publication Date
CN110492967A true CN110492967A (en) 2019-11-22
CN110492967B CN110492967B (en) 2021-11-02

Family

ID=68559037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910904083.XA Active CN110492967B (en) 2019-09-24 2019-09-24 Time synchronization method, relay equipment and device

Country Status (1)

Country Link
CN (1) CN110492967B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111132302A (en) * 2019-12-27 2020-05-08 京信通信系统(中国)有限公司 Time synchronization method, device, base station equipment and computer readable storage medium
CN111225455A (en) * 2019-12-04 2020-06-02 广州市星翼电子科技有限公司 Wireless terminal equipment based on 4G network and wireless data transmission method
CN111953443A (en) * 2020-09-17 2020-11-17 苏州科达科技股份有限公司 Resource processing method, device, electronic equipment, storage medium and system
CN114553354A (en) * 2021-12-16 2022-05-27 深圳市太铭科技有限公司 Method for keeping clock synchronization of NTP (network time protocol) server
WO2022116851A1 (en) * 2020-12-01 2022-06-09 武汉绿色网络信息服务有限责任公司 Method and device for determining transmission delay information of dpi device
CN114745415A (en) * 2022-03-17 2022-07-12 中汽创智科技有限公司 Vehicle service communication data processing method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009111799A2 (en) * 2008-03-07 2009-09-11 3Tera, Inc. Globally distributed utility computing cloud
US20130121347A1 (en) * 2011-11-16 2013-05-16 Fujitsu Limited Communication apparatus
CN104662826A (en) * 2012-08-10 2015-05-27 Abb研究有限公司 Latency determination in substation networks
CN106304257A (en) * 2015-05-15 2017-01-04 上海贝尔股份有限公司 Select UE to the method for the relaying of network with for relaying the synchronous method of discovery
CN107667485A (en) * 2015-04-10 2018-02-06 维尔塞特公司 Ground antenna beam for the communication between the access node by repeater such as satellite link and user terminal shapes
CN104025701B (en) * 2011-12-30 2018-06-01 京信通信系统(中国)有限公司 The indoor distributed system of clock-switching method, device and repeater as relaying
CN109842455A (en) * 2017-11-27 2019-06-04 华为技术有限公司 Communication processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009111799A2 (en) * 2008-03-07 2009-09-11 3Tera, Inc. Globally distributed utility computing cloud
US20130121347A1 (en) * 2011-11-16 2013-05-16 Fujitsu Limited Communication apparatus
CN104025701B (en) * 2011-12-30 2018-06-01 京信通信系统(中国)有限公司 The indoor distributed system of clock-switching method, device and repeater as relaying
CN104662826A (en) * 2012-08-10 2015-05-27 Abb研究有限公司 Latency determination in substation networks
CN107667485A (en) * 2015-04-10 2018-02-06 维尔塞特公司 Ground antenna beam for the communication between the access node by repeater such as satellite link and user terminal shapes
CN106304257A (en) * 2015-05-15 2017-01-04 上海贝尔股份有限公司 Select UE to the method for the relaying of network with for relaying the synchronous method of discovery
CN109842455A (en) * 2017-11-27 2019-06-04 华为技术有限公司 Communication processing method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225455A (en) * 2019-12-04 2020-06-02 广州市星翼电子科技有限公司 Wireless terminal equipment based on 4G network and wireless data transmission method
CN111132302A (en) * 2019-12-27 2020-05-08 京信通信系统(中国)有限公司 Time synchronization method, device, base station equipment and computer readable storage medium
CN111132302B (en) * 2019-12-27 2022-05-03 京信网络系统股份有限公司 Time synchronization method, device, base station equipment and computer readable storage medium
CN111953443A (en) * 2020-09-17 2020-11-17 苏州科达科技股份有限公司 Resource processing method, device, electronic equipment, storage medium and system
WO2022116851A1 (en) * 2020-12-01 2022-06-09 武汉绿色网络信息服务有限责任公司 Method and device for determining transmission delay information of dpi device
CN114553354A (en) * 2021-12-16 2022-05-27 深圳市太铭科技有限公司 Method for keeping clock synchronization of NTP (network time protocol) server
CN114745415A (en) * 2022-03-17 2022-07-12 中汽创智科技有限公司 Vehicle service communication data processing method, device, equipment and storage medium
CN114745415B (en) * 2022-03-17 2024-03-26 中汽创智科技有限公司 Vehicle service communication data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110492967B (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN110492967A (en) A kind of method for synchronizing time, trunking and device
US10666371B2 (en) System for establishing and maintaining a clock reference indicating one-way latency in a data network
US7283568B2 (en) Methods, systems and computer program products for synchronizing clocks of nodes on a computer network
EP3016306B1 (en) Method and apparatus for providing in-vehicle network time synchronization using redundant grandmaster
KR101109897B1 (en) Server time protocol messages and methods
US8547855B1 (en) Method and apparatus to schedule multiple probes for active or passive monitoring of networks
CN108322280B (en) A kind of distributed computer network (DCN) clock synchronizing relay compensation method
CN101296048B (en) Time synchronization method and apparatus
EP1553713A1 (en) Time synchronizing device and process and associated products
CN102119499B (en) Method for synchronizing local clocks in a distributed computer network
JP2011529208A (en) Clock synchronization in asynchronous distributed systems
CN106899370A (en) A kind of clock chain circuit changing method, device and base station
CN101145896B (en) Control system and method for clock synchronization between control stations
CN112003768B (en) Multi-node test system and method for executing multi-node test
CN110601786B (en) Time synchronization method, relay equipment and device
JP2017005378A (en) Estimation device, system, method, and program
US8804770B2 (en) Communications system and related method for reducing continuity check message (CCM) bursts in connectivity fault management (CFM) maintenance association (MA)
CN117061049A (en) Data reporting method, device, equipment and storage medium
KR100581142B1 (en) A Distributed measurement system for the multipoint performance evaluation in the internet and method thereof
CN112039621A (en) Time synchronization method and system
JP5506890B2 (en) Synchronization system, time master device, time slave device, and synchronization method
CN109274546A (en) A kind of scheduling method for timer and device
EP1209850B1 (en) System and method for network element synchronization
EP3113415A1 (en) Network management commands
CN112822283A (en) Edge node control method and device, control node and storage medium

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