CN110492967B - Time synchronization method, relay equipment and device - Google Patents
Time synchronization method, relay equipment and device Download PDFInfo
- Publication number
- CN110492967B CN110492967B CN201910904083.XA CN201910904083A CN110492967B CN 110492967 B CN110492967 B CN 110492967B CN 201910904083 A CN201910904083 A CN 201910904083A CN 110492967 B CN110492967 B CN 110492967B
- Authority
- CN
- China
- Prior art keywords
- time
- time synchronization
- delay
- ntp server
- relay
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
- H04J3/0667—Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0682—Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Telephonic Communication Services (AREA)
Abstract
The application discloses a time synchronization method, relay equipment and a device, wherein the method comprises the following steps: after the relay equipment detects that the NTP server is in a fault state, the working mode of the relay equipment is switched from a transparent transmission mode to a relay service mode; after receiving a first time synchronization request message sent to an NTP server by an NTP client, relay equipment in a relay service mode determines first time and second time according to locally stored time information, wherein the first time is used for indicating a timestamp of the NTP server for receiving the first time synchronization request message, and the second time is used for indicating the timestamp of the NTP server for sending a first time synchronization response message; the relay equipment in the relay service mode sends a first time synchronization response message carrying the first time and the second time to the NTP client so that the NTP client completes time synchronization according to the first time and the second time.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a time synchronization method, a relay device, and an apparatus.
Background
NTP (Network Time Protocol) is a Time synchronization service Protocol, and aims to provide a uniform Time synchronization service for devices running on a Network. When the NTP server is in a normal state, normal NTP message interaction is carried out between the NTP client and the NTP server, the relay equipment is transparent to the two types of equipment, namely the NTP client equipment and the NTP server equipment do not sense the existence of the relay equipment, and the mode of the relay equipment is a transparent transmission mode at the moment. When an NTP server fails or a link between the NTP server and relay equipment fails, NTP synchronization between the NTP client and the NTP server is overtime, and time cannot be synchronized. For periodically synchronized devices, there may be a synchronization failure, but for devices that restart and do not have a real time timer (RTC) mechanism of their own, the time synchronization service is not available.
Since the time synchronization service is important for a network system requiring precise time, it is very important to improve the reliability of the time service. In addition, since there are more and more network devices and many services depend on the time service provided by the time synchronization service system, it is also important to be able to continuously provide the time synchronization service with high precision. At present, the most important and common means is that a plurality of NTP servers are deployed in a network, and an optimal NTP server is selected in real time to provide time synchronization service for equipment in the network, so that the reliability and accuracy of network time are ensured; in addition, because a plurality of NTP servers need to be configured, a time synchronization service system needs to apply for a license (license) of an available NTP server, and the requirement on cost is high. In addition to the need to configure multiple NTP servers, to improve the time accuracy of the system, an NTP client is generally required to implement a complex NTP server selection algorithm so as to select one of the NTP servers at different levels and different locations with the highest accuracy, which increases the performance requirement for the NTP client.
How to improve the reliability of the time synchronization service and simplify the network to save the cost is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides a time synchronization method, relay equipment and a device, which are used for improving the reliability of time synchronization service and simplifying a network to save cost.
In a first aspect, a time synchronization method is provided, where the time synchronization method is applied to a relay device, and the relay device establishes a connection with a network time protocol NTP server, and the method includes:
after the relay equipment detects that the NTP server is in a fault state, the working mode of the relay equipment is switched from a transparent transmission mode to a relay service mode;
the method comprises the steps that the relay equipment in a relay service mode receives a first time synchronization request message sent to an NTP server by an NTP client;
the relay equipment in the relay service mode determines a first time and a second time according to locally stored time information, wherein the time information at least comprises system time, response time delay and round trip time delay; wherein the first time is a timestamp indicating that the NTP server receives the first time synchronization request message, and the second time is a timestamp indicating that the NTP server transmits a first time synchronization response message; the response delay is the time length of the response time synchronization request message of the NTP server in a normal state, and the round-trip delay is the transmission time length of the time synchronization request message and the time synchronization response message between the NTP server and the relay equipment in a normal state;
the relay device in the relay service mode sends a first time synchronization response message to the NTP client, where the first time synchronization response message carries the first time and the second time.
Optionally, the operation mode of the relay device further includes a client mode, and the method further includes:
and after the relay equipment in the client mode detects that the NTP server and the NTP client finish one time of time synchronization session, the working mode of the relay equipment is switched to a transparent transmission mode from the client mode.
Optionally, before the relay device in the client mode detects that the NTP server and the NTP client complete a time synchronization session, the method further includes:
the relay equipment in the client mode continuously sends a second time synchronization request message to the NTP server for N times according to a first set frequency, wherein the second time synchronization request message carries a timestamp of the second time synchronization request message sent by the relay equipment; n is an integer greater than 1;
the relay equipment in the client mode determines N round-trip delays and N response delays according to a second time response message returned by the NTP server every time and a timestamp of receiving the second time synchronization response message every time; the second time synchronization response message carries a timestamp of the second time synchronization request message sent by the relay device, and the NTP server receives the timestamp of the second time synchronization request message and the timestamp of the second time synchronization response message sent by the NTP server;
and in the client mode, the relay equipment performs average operation on the N round-trip time delays to obtain initial average round-trip time delays and records the initial average round-trip time delays, and performs average operation on the N response time delays to obtain initial average response time delays and records the initial average response time delays.
Optionally, after the working mode of the relay device is switched from the client mode to the transparent transmission mode, the method further includes:
the relay equipment in the transparent transmission mode sends a third time synchronization request message to the NTP server according to a second set frequency; the third time synchronization request message carries a timestamp for the relay device to send the third time synchronization request message;
the relay equipment in the transparent transmission mode receives a third time synchronization response message sent by the NTP server; the third time synchronization response message carries a timestamp of the third time synchronization request message sent by the relay device, the NTP server receives the timestamp of the third time synchronization request message, and the NTP server sends the third time synchronization response message;
and the relay equipment in the transparent transmission mode updates the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message and the timestamp of the relay equipment for receiving the third time synchronization response message.
Optionally, the locally stored time information includes an initial average round trip delay and an initial average response delay;
the updating, by the relay device in the transparent transmission mode, the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message, and the timestamp at which the relay device receives the third time synchronization response message includes:
the relay equipment in the transparent transmission mode carries out summation operation on the first time length and the second time length to obtain round-trip time delay, and carries out average calculation on the obtained round-trip time delay and the initial average round-trip time delay to obtain and record updated average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and in the transparent transmission mode, the relay equipment averagely calculates the difference between the timestamp of the NTP server for receiving the third time synchronization request message and the timestamp of the NTP server for sending the third time synchronization response message and the initial average response time delay to obtain and record the updated average response time delay.
Optionally, the locally stored time information includes an initial average round trip delay and an initial average response delay;
the updating, by the relay device in the transparent transmission mode, the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message, and the timestamp at which the relay device receives the third time synchronization response message includes:
the relay equipment in the transparent transmission mode carries out summation operation on the first time length and the second time length to obtain round-trip time delay, and records the obtained round-trip time delay in a register for storing the initial average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and in the transparent transmission mode, the relay equipment performs difference operation on the timestamp of the NTP server for receiving the third time synchronization request message and the timestamp of the NTP server for sending the third time synchronization response message to obtain response delay, and records the obtained response delay in a register for storing the initial average response delay.
Optionally, the method further comprises:
the relay equipment sends a fault detection request message to the NTP server according to a third set frequency; the fault detection request message is used for determining the state of the NTP server, and the state comprises a fault state and a normal state;
if the relay equipment receives the fault detection response message sent by the NTP server within the set time length for the continuous set times, the NTP server is marked to be in a normal state, and the working mode of the relay equipment is switched from a relay service mode to a transparent transmission mode;
and if the relay equipment does not receive the fault detection response message sent by the NTP server within the set time length for the continuous set times, marking that the NTP server is in a fault state.
Optionally, the time information locally stored by the relay device specifically includes a system time, an average round trip delay, and an average response delay;
the relay device in the relay service mode determining a first time and a second time according to locally stored time information, including:
the relay equipment in a relay service mode carries out summation operation on the system time and one half of the average round-trip delay to obtain the first time;
and the relay equipment in the relay service mode carries out summation operation on the system time, the average response time delay and one half of the average round trip time delay to obtain the second time.
Optionally, the time information locally stored by the relay device specifically includes system time, round-trip delay of a set number, and response delay of a set number;
the relay device in the relay service mode determining a first time and a second time according to locally stored time information, including:
the relay equipment in the relay service mode performs weighted average operation on the round trip time delays with the set number to obtain average round trip time delay, and performs summation operation on the system time and one half of the average round trip time delay to obtain the first time;
and in the relay service mode, the relay equipment performs weighted average operation on the response time delays with the set number to obtain average response time delay, and performs summation operation on the system time, the average response time delay and one half of the average round-trip time delay to obtain the second time.
Optionally, the NTP server is in a normal state, and the method further includes:
and the relay equipment sends a fourth time synchronization request message to the NTP server according to a fourth set frequency, wherein the fourth time synchronization request message is used for updating the locally stored system time.
In a second aspect, there is provided a relay device, the relay device establishing a connection with a network time protocol NTP server, the relay device comprising: the system comprises a detection module, a mode switching module and a relay service module;
the mode switching module is configured to switch a working mode of the relay device from a transparent transmission mode to a relay service mode after the detection module detects that the NTP server is in a failure state;
the relay service module is used for receiving a first time synchronization request message sent to the NTP server by an NTP client; determining a first time and a second time according to locally stored time information, wherein the time information at least comprises system time, response time delay and round trip time delay; wherein the first time is a timestamp indicating that the NTP server receives the first time synchronization request message, and the second time is a timestamp indicating that the NTP server transmits a first time synchronization response message; the response delay is the time length of the response time synchronization request message of the NTP server in a normal state, and the round-trip delay is the transmission time length of the time synchronization request message and the time synchronization response message between the NTP server and the relay equipment in a normal state; and sending a first time synchronization response message to the NTP client, wherein the first time synchronization response message carries the first time and the second time.
Optionally, the working modes of the relay device further include a client mode, and the mode switching module is further configured to:
and after the detection module detects that the NTP server and the NTP client finish a time synchronization session, switching the working mode of the relay equipment from a client mode to a transparent transmission mode.
Optionally, the relay device further includes a client module, where the client module is specifically configured to:
sending a second time synchronization request message to the NTP server according to the first set frequency for N times continuously, wherein the second time synchronization request message carries a timestamp for sending the second time synchronization request message by the relay equipment; n is an integer greater than 1;
determining N round-trip delays and N response delays according to a second time response message returned by the NTP server each time and a timestamp of receiving the second time synchronization response message each time; the second time synchronization response message carries a timestamp of the second time synchronization request message sent by the relay device, and the NTP server receives the timestamp of the second time synchronization request message and the timestamp of the second time synchronization response message sent by the NTP server;
and carrying out average operation on the N round-trip time delays to obtain initial average round-trip time delay and recording the initial average round-trip time delay, and carrying out average operation on the N response time delays to obtain initial average response time delay and recording the initial average response time delay.
Optionally, the relay device further includes a transparent transmission module;
after the working mode of the relay device is switched from the client mode to the transparent transmission mode, the transparent transmission module is specifically configured to:
sending a third time synchronization request message to the NTP server according to a second set frequency; the third time synchronization request message carries a timestamp for the relay device to send the third time synchronization request message;
receiving a third time synchronization response message sent by the NTP server; the third time synchronization response message carries a timestamp of the third time synchronization request message sent by the relay device, the NTP server receives the timestamp of the third time synchronization request message, and the NTP server sends the third time synchronization response message;
and updating the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message and the timestamp of the third time synchronization response message received by the relay equipment.
Optionally, the locally stored time information includes an initial average round trip delay and an initial average response delay time;
the transparent transmission module is specifically used for:
summing the first time length and the second time length to obtain round-trip time delay, and carrying out average calculation on the obtained round-trip time delay and the initial average round-trip time delay to obtain and record updated average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and carrying out average calculation on the difference value between the timestamp of the NTP server receiving the third time synchronization request message and the timestamp of the NTP server sending the third time synchronization response message and the initial average response time delay to obtain and record the updated average response time delay.
Optionally, the locally stored time information includes an initial average round trip delay and an initial average response delay;
the transparent transmission module is specifically used for:
summing the first time length and the second time length to obtain a round-trip delay, and recording the obtained round-trip delay in a register for storing the initial average round-trip delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and performing difference operation on the timestamp of the NTP server receiving the third time synchronization request message and the timestamp of the NTP server sending the third time synchronization response message to obtain response delay, and recording the obtained response delay in a register for storing the initial average response delay.
Optionally, the relay device further includes a detection module;
the detection module is specifically configured to:
sending a fault detection request message to the NTP server according to a third set frequency; the fault detection request message is used for determining the state of the NTP server, and the state comprises a fault state and a normal state;
if the relay equipment receives the fault detection response message sent by the NTP server within the set time length for the continuous set times, the NTP server is marked to be in a normal state, and the mode switching module is triggered to switch the working mode of the relay equipment from a relay service mode to a transparent transmission mode;
and if the relay equipment does not receive the fault detection response message sent by the NTP server within the set time length for the continuous set times, marking that the NTP server is in a fault state.
Optionally, the time information locally stored by the relay device specifically includes a system time, an average round trip delay, and an average response delay;
the relay service module is specifically configured to:
summing the system time and one half of the average round-trip delay to obtain the first time;
and summing the average response time delay and one half of the average round trip time delay of the system time to obtain the second time.
Optionally, the time information locally stored by the relay device specifically includes system time, round-trip delay of a set number, and response delay of a set number;
the relay service module is specifically configured to:
carrying out weighted average operation on the round trip time delays with the set number to obtain average round trip time delay, and carrying out summation operation on the system time and one half of the average round trip time delay to obtain the first time;
and carrying out weighted average operation on the response time delays with the set number to obtain average response time delay, and carrying out summation operation on the system time, the average response time delay and one half of the average round-trip time delay to obtain the second time.
Optionally, the NTP server is in a normal state, and the client module is further configured to:
and sending a fourth time synchronization request message to the NTP server according to a fourth set frequency, wherein the fourth time synchronization request message is used for updating the locally stored system time.
In a third aspect, a communication apparatus is provided, including: a processor, a memory, and a transceiver;
the memory to store computer instructions;
the processor configured to execute the computer instructions to implement the method according to any one of the first aspect.
In a fourth aspect, a computer readable storage medium stores computer instructions which, when executed by a processor, implement the method of any of the first aspects.
In the above embodiment of the present application, the relay device establishes a connection with an NTP server, and after the relay device detects that the NTP server is in a failure state, the working mode of the relay device is switched from the transparent transmission mode to the relay service mode; after receiving a first time synchronization request message sent to an NTP server by an NTP client, relay equipment in a relay service mode determines first time and second time according to locally stored time information, wherein the first time is used for indicating a timestamp of the NTP server for receiving the first time synchronization request message, and the second time is used for indicating the timestamp of the NTP server for sending a first time synchronization response message; the relay equipment in the relay service mode sends a first time synchronization response message carrying the first time and the second time to the NTP client so that the NTP client completes time synchronization according to the first time and the second time. The relay equipment in the relay service mode determines a first time of a time stamp for indicating the NTP server to receive the time synchronization request message and a second time of the time stamp for indicating the NTP server to send the time synchronization response message according to the locally stored time information; therefore, the NTP client can complete time synchronization even though the NTP server is in a fault state, and the reliability of time synchronization service is improved; in addition, only one relay device is used for assisting the NTP client to finish time synchronization when the NTP server is in a fault state, and other NTP servers do not need to be selected for the NTP client to provide time synchronization service, so that the network structure is simplified, and the cost is saved.
Drawings
Fig. 1 is a schematic structural diagram of a time synchronization service system according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating switching of an operating mode of a relay device according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a time synchronization method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a switching process of a working mode of a relay device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a relay device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a communication device according to an embodiment of the present application.
Detailed Description
It should be noted that "first", "second", "third", and "fourth" in the embodiments of the present application are used for distinguishing similar objects, and are not necessarily used for describing a specific order or sequence order.
The following detailed description of embodiments of the present application will be made with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present application, are given by way of illustration and explanation only, and are not intended to limit the present application.
When an NTP server fails or a link between the NTP server and an NTP customer service end fails, the NTP customer service end can perform time synchronization conversation after waiting for the recovery of the fault of the NTP server or the recovery of the link between the NTP server and the NTP customer service end to finish time synchronization; during the fault period, the time synchronization service is unavailable for the NTP customer service end which is restarted and does not have the RTC mechanism, the NTP customer service end cannot perform time synchronization, the performance of the NTP customer service end is affected, and the reliability of the time synchronization service is reduced.
In order to solve the above problem, an embodiment of the present application provides a time synchronization service system.
Referring to fig. 1, a schematic structural diagram of a time synchronization service system is provided for the embodiment of the present application.
As shown, the time synchronization system includes an NTP server 101, a relay device 102, and an NTP client 103; in which the relay device 102 establishes a connection with one NTP server 101, and there may be a plurality of NTP clients 103, only one of which is exemplarily shown in the figure.
The relay device 102 is configured to send a time synchronization request message to the NTP server 101 and receive a time synchronization response message returned by the NTP server 101, so as to synchronize local system time; a time synchronization request message from NTP client 103 is transmitted to NTP server 101, and a time synchronization response message transmitted by NTP server 101 to NTP client 103 is transmitted to NTP client 103.
An NTP client 103 is configured to transmit a time synchronization request message to the NTP server 101 through the relay device 102, and receive a time synchronization response message transmitted by the NTP server 101 through the relay device 102, so as to synchronize the local system time.
The time synchronization request message is an NTP request message, and the time synchronization response message is an NTP response message.
The relay device 102 provides three modes of operation: client mode, transparent transmission mode and relay service mode.
Referring to fig. 2, a schematic diagram of switching operation modes of a relay device according to an embodiment of the present application is shown.
As shown in the figure, the relay device can be switched from the client mode 201 to the transparent transmission mode 202, from the transparent transmission mode 202 to the relay service mode 203, and from the relay service mode 203 to the transparent transmission mode 202.
In the client mode 201, the relay device does not have an NTP client off-hook, the relay device does not detect that the NTP server and the NTP client complete a time synchronization session, and the relay device is in the client mode. In the initial stage, the relay device in the client mode performs time synchronization with the NTP server according to the protocol standard flow to acquire the system time of the relay device.
Specifically, in the initial stage, the relay device in the client mode continuously sends a time synchronization request message to the NTP server N times at a high frequency (a first set frequency, preferably, the first set frequency is 1 time/second) to obtain a system time, an initial average round-trip delay, and an initial average response delay; after N corresponding time synchronization response messages are continuously received, the relay device in the client mode sends a time synchronization request message to the NTP server according to a low frequency (a fourth set frequency) to poll the NTP server mechanism state to synchronize the system time of the relay device. N is an integer greater than 1, for example, N is 15. Preferably, the fourth set frequency is 64-1Time synchronization request messages are sent to the NTP server every second, i.e., every 64 seconds.
Because the relay device has a relay function, in a high-frequency stage, the relay device calculates the round-trip delay from the N NTP servers to the relay device according to the N time synchronization request messages, the time synchronization response messages and the timestamp of each time synchronization response message received by the relay device, and performs average operation on the N round-trip delays to obtain an initial average round-trip delay which is denoted as t _ rtt _ avg 1. The relay device calculates the time length of the N NTP servers responding to the time synchronization request message according to the time stamps in the N time synchronization request messages and the time synchronization response message, and performs average operation on the N response time delays to obtain an initial average response time delay, which is denoted as t _ proc _ avg 1. And recording the calculated initial average round trip delay and initial average response delay into a register.
Specifically, the relay device sends a time synchronization request message to the NTP server, where the time synchronization request message carries a timestamp of the time synchronization request message sent by the relay device, the relay device receives a time synchronization response message sent by the NTP server, and the time synchronization response message carries a timestamp of the time synchronization request message sent by the relay device, a timestamp of the time synchronization request message received by the NTP server, and a timestamp of the time synchronization response message sent by the NTP server. The round-trip delay and the response delay between the relay device and the NTP server are obtained according to the following formula.
t_rtt=(T2-T1)+(T4-T3)(1)
t_proc=T3-T2(2)
Wherein t _ rtt is round-trip delay and represents the transmission duration of time synchronization request messages and time synchronization response messages between the relay equipment and the NTP server; t _ proc is response time delay and represents the time length of the NTP server responding to the time synchronization request message; t1 denotes a time stamp at which the relay apparatus transmits the time synchronization request message; t2 represents a time stamp when the NTP server receives the time synchronization request message; t3 represents a time stamp when the NTP server transmits the time synchronization response message; t4 denotes a time stamp when the relay device receives the time synchronization response message.
It should be noted that, in the state of low-frequency polling the NTP server, the time synchronization response message returned by the NTP server received by the relay device is only used for synchronizing the system time of the relay device, and does not participate in the calculation of t _ rtt and t _ proc.
In the transparent transmission mode 202, a new NTP client is added to the network and is hung down to the relay device, and an NTP server identical to the relay device is configured, and the NTP client performs time synchronization with the NTP server through the relay device. After the relay device in the client mode detects that the NTP server and the NTP client complete a time synchronization session, the working mode of the relay device is switched from the client mode 201 to the transparent transmission mode 202.
The judgment process that the NTP server and the NTP client finish one time of time synchronization session is as follows: when an NTP client sends a time synchronization request message to an NTP server, the relay equipment detects that the type of the received message is a time synchronization request message through a message identification mechanism, records the IP address of the NTP client, the IP address of the NTP server and the message type, and records the message type into a database of the system, wherein the identification mechanism is matched with an NTP protocol port number (user datagram protocol 123) and an NTP protocol type (NTP request message); the intermediate device forwards the time synchronization request message to the NTP server; when the NTP server returns a time synchronization response message, the relay equipment detects the time synchronization response message through a message identification mechanism, if the time synchronization response message is consistent with the IP address of the NTP client recorded in a database of the system and the IP address of the NTP server, and the message type is a response message, the time synchronization session between the NTP client and the server is recorded, wherein the identification mechanism is matched with an NTP protocol port number (user datagram protocol 123) and the NTP protocol type (NTP response message); and then the relay equipment forwards the response message to the NTP client.
The relay device judges whether a time synchronization session between the NTP client and the NTP server is completed according to the above judgment process, and if so, the relay device immediately enters the transparent transmission mode 202 from the client mode 201.
On one hand, the relay device in the transparent transmission mode only forwards messages from the NTP server and the NTP client to complete interaction between the NTP server and the NTP client, the relay device is transparent to the NTP server and the NTP client, and the NTP server and the NTP client do not sense the existence of the relay device.
On one hand, the relay device in the transparent transmission mode sends a time synchronization request message to the NTP server according to the medium frequency (second set frequency), receives a time synchronization response message returned by the NTP server, and calculates the round-trip delay and the response delay of the time according to the formulas (1) and (2) to update the locally stored round-trip delay and the response delay. The locally stored round trip delay and response delay may be updated in any of the following two ways.
The method comprises the following steps: taking the first time synchronization request message sent by the relay device after entering the transparent transmission mode as an example, the relay device in the transparent transmission mode updates the locally stored round trip delay and response delay according to the 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 the updated average round-trip delay, and t _ proc _ avg2 is the updated average response delay; t _ rtt _ avg1 is the initial average round trip delay, t _ proc _ avg1 is the initial average response delay; t _ rtt _ x is the round trip delay calculated this time, and t _ proc _ x is the response delay calculated this time.
After determining t _ rtt _ avg2 and t _ proc _ avg2, the relay device in the transparent transmission mode continues to send time synchronization request messages to the NTP server according to the second set frequency, so that the relay device updates the locally stored average round trip delay and average response delay according to the formula (3) and the formula (4). Preferably, the second set frequency is 8-1Time synchronization request messages are sent to the NTP server every second, i.e., every 8 seconds.
The second method comprises the following steps: the relay device in the transparent transmission mode directly stores the calculated round-trip delay and the calculated response delay in a register which is the same as the initial average round-trip delay and the initial average response delay, and sets the register to store the round-trip delay and the calculated response delay each time in the latest M (for example, M takes a value of 6) periods in the transparent transmission mode, wherein M is an integer greater than 1.
Preferably, the first method is suitable for a scene where the line delay between the NTP server and the relay device is relatively stable, and the second method is suitable for a scene where the line delay jitter between the NTP server and the relay device is relatively serious.
The circuit delay condition between the NTP server and the relay equipment is judged as follows: in an initial stage, the relay device in the client mode judges whether a difference value between a transmission time length of the time synchronization request message between the NTP server and the relay device (i.e., T2-T1) and a transmission time length of the time synchronization response message between the NTP server and the relay device (i.e., T4-T3) is greater than a set value; if so, the relay equipment determines that the line delay jitter between the NTP server and the relay equipment is serious, and then the relay equipment updates the round-trip delay and the response delay of local storage by adopting a method I after switching to a transparent transmission mode; and if not, the relay equipment determines that the line delay between the NTP server and the relay equipment is stable, and then the relay equipment updates the round-trip delay and the response delay of local storage by adopting a second method after switching to a transparent transmission mode. Of course, other methods may also be used to determine the line delay condition between the NTP server and the relay device, which is not limited in this application.
On the one hand, when the relay device is in the transparent transmission mode, the relay device still needs to be in the form of an NTP client at a low frequency (a fourth set frequency, which is 64 times)-1Sub/sec) sends a time synchronization request message to the NTP server to synchronize the local system time.
On the other hand, after the relay device enters the transparent transmission mode, a fault detection request message (NTP request message) is sent to the NTP server according to a third set frequency, where the fault detection request message is used to determine the state of the NTP server, and the state includes a fault state and a normal state. Preferably, the third set frequency is 8-1Time synchronization request messages are sent to the NTP server every second, i.e., every 8 seconds.
Specifically, when the relay device does not receive the fault detection response message sent by the NTP server within a set time duration (for example, within 3 seconds), it is considered that a timeout event occurs; if the relay device does not receive the fault detection response message returned by the NTP server for a set number of times (for example, 3 times) continuously, judging that the NTP server has a fault or a link between the NTP server and the relay device has a fault, and marking that the NTP server is in a fault state. The set time length may be determined by a person skilled in the art according to the length of a link between the relay device and the NTP server, the message congestion condition, and the like.
In an implementable scenario, the second set frequency value is equal to the third set frequency value, and the time synchronization request message for updating the round-trip delay and the response delay and the fault detection request message for determining the state of the NTP server may be sent to the NTP server by using the same NTP message. Of course, the message may also be sent to the NTP server in different frequency and different message forms, which is not limited in this application.
And in the relay service mode 203, after the NTP server is determined to be in a failure state, the relay device is immediately switched from the transparent transmission mode 202 to the relay service mode 203.
On one hand, the relay device in the relay service mode simulates an NTP server to assist the NTP client to complete time synchronization.
On the other hand, the relay device in the relay service mode continues to send a failure detection request message to the NTP server identified as the failed state according to the third set frequency, so as to continue to detect whether the failure of the NTP service is recovered or whether the link failure between the NTP server and the relay device is recovered.
Specifically, the relay device judges whether a fault detection response message is received each time, and the timeout time is a set duration; if the failure detection response message is received for the continuously set number of times, it is determined that the failure of the NTP service has recovered or that the failure of the link between the NTP server and the relay device has recovered, and it is marked that the NTP server is in a normal state.
After the relay equipment determines that the NTP server is in a normal state, the working mode of the relay equipment is immediately switched to a transparent transmission mode from a relay service mode.
When the NTP server is in a failure state, an embodiment of the present application provides a time synchronization method, in which a relay device in a relay service mode cooperates with an NTP client to complete time synchronization by simulating the NTP server.
Referring to fig. 3, a schematic flow chart of a time synchronization method according to an embodiment of the present application is shown.
As shown, the time synchronization method includes the following steps S301 to S304.
S301: after the relay device detects that the NTP server is in a fault state, the working mode of the relay device is switched from a transparent transmission mode to a relay service mode.
The NTP server being in a failure state refers to a state in which the NTP server cannot provide time synchronization service. When the NTP server fails or a link between the relay device and the NTP server fails, the NTP server is in a failure state. Specifically, the relay device sends a fault detection request message to the NTP server according to a third set frequency, if the relay device does not receive a fault detection response message sent by the NTP server within a set time length for a continuously set number of times, the NTP server is marked to be in a fault state, otherwise, the NTP server is marked to be in a normal state; after the relay device detects that the NTP server is in a fault state, the working mode of the relay device is immediately switched from a transparent transmission mode to a relay service mode.
S302: the relay device in the relay service mode receives a first time synchronization request message sent by an NTP client to an NTP server.
The method comprises the steps that a relay device in a relay service mode receives a first time synchronization request message sent to an NTP server by an NTP client, the source IP address of the message is the NTP client, and the destination IP address is the NTP server.
S303: the relay device in the relay service mode determines the first time and the second time according to the locally stored time information.
Wherein, the first time is used for indicating the NTP server to receive the time stamp of the first time request message, and the second time is used for indicating the NTP server to send the time stamp of the first time response message; the time information at least comprises system time, response time delay and round-trip time delay; the round-trip delay is the transmission duration of the time synchronization request message and the time synchronization response message between the normal NTP server and the relay device, and the response delay is the duration of the response of the normal NTP server to the time synchronization request message. Specifically, round trip delay refers to: the sum of the time taken from the time when the relay device sends the time synchronization request message to the time when the NTP server in the normal state receives the time synchronization request message and the time taken from the time when the NTP server in the normal state sends the time synchronization response message to the time when the relay device receives the time synchronization response message, that is, the time taken for the link between the NTP server in the normal state and the relay device to transmit the time synchronization request message and the time synchronization response message. When the NTP server is in a normal state, the working mode of the relay equipment is not in a relay service mode, and the time synchronization request of the relay equipment and the time synchronization request of the NTP client are both responded and processed by the NTP server.
In the embodiment of the application, the NTP server can not provide time synchronization service for the NTP client when in a fault state, the relay equipment does not forward a first time synchronization request message sent to the NTP server by the NTP client after receiving the first time synchronization request message, but intercepts the first time synchronization request message, and at the moment, the relay equipment serves as a pseudo NTP server to simulate the time synchronization function of the NTP server to provide time synchronization service for the NTP client. Specifically, the relay device estimates the following two times according to the locally stored time information: and the receiving time when the intercepted first time synchronization request message is to be received in the normal state of the NTP server and the sending time when the corresponding first time synchronization response message is to be sent in the normal state of the NTP server, and the estimated two times are taken as the first time and the second time respectively and carried in the first time synchronization response message to be returned to the NTP client. The source IP address of the first time synchronization response message returned to the NTP client by the relay equipment is the IP address of the NTP server, and the destination IP address is the IP address of the NTP client. As can be seen, the NTP client does not sense the simulation process of the relay device, and still considers that the NTP server is providing time synchronization service for the NTP client.
In specific implementation, when the locally stored time information is system time, average round-trip delay and average response time delay, the relay device in the relay service mode performs summation operation on the system time and one half of the average round-trip delay to obtain first time; and the relay equipment in the relay service mode carries out summation operation on the system time, the average response time delay and one half of the average round trip time delay to obtain a second time.
Specifically, the first time and the second time are obtained according to the following formulas.
T21=t_base+t_rtt_avg/2 (5)
T31=t_base+t_rtt_avg/2+t_proc_avg (6)
Wherein, T21Indicating a first time, T31Representing a second time; t _ base represents the system time; t _ rtt _ avg represents the average round trip delay, and t _ proc _ avg represents the average response delay.
In specific implementation, when the locally stored time information is system time, round trip delay of a set number (M) and response delay of the set number, the relay equipment in the relay service mode performs weighted average operation on the round trip delay of the set number to obtain average round trip delay, and performs summation operation on the system time and one half of the average round trip delay to obtain first time; and the relay equipment in the relay service mode performs weighted average operation on the response time delays with the set number to obtain average response time delay, and performs summation operation on the system time, the average response time delay and one half of the average round-trip time delay to obtain second time.
Specifically, each group of round-trip delay and response delay obtained by calculation in the latest M periods is locally stored, different weights are respectively given according to the sequence of recording each group of round-trip delay and response delay in the transparent transmission mode, so that the M round-trip delays are weighted and averaged to obtain the corresponding average round-trip delay, and the M response delays are weighted and averaged to obtain the corresponding average response delay. And applying the average round trip delay and the average response delay calculated by the weighted average to the formulas (5) and (6) so as to calculate the first time and the second time.
The setting of the weight of the M round trip delays or the M response delays may be such that the later the recording time is, the larger the corresponding weight value is. Illustratively, the weights of the groups of data are, in order from morning to evening of the recording time: 1. 2, 3 … … M, the corresponding weighting coefficients are:
optionally, the round-trip delay and the response delay in the interaction are calculated and recorded, and if the difference between the recording time and the current locally stored system time exceeds a preset difference (for example, 3 times of the NTP client synchronization period), the calculated round-trip delay and the response delay are considered to be invalid, the current average round-trip delay and the average response delay are not updated, or the calculated round-trip delay and the calculated response delay are discarded.
The time information locally stored by the relay device is obtained when the relay device is in the client mode and when the relay device is in the transparent transmission mode.
In some embodiments, in the initial stage, the relay device does not have an NTP client, and the working mode of the relay device is a client mode; the relay equipment in the client mode continuously sends a second time synchronization request message to the NTP server for N times according to the first set frequency, wherein the second time synchronization request message carries a timestamp for sending the second time synchronization request message by the relay equipment; the relay equipment in the client mode determines N round-trip delays and N response delays according to a second time response message returned by the NTP server every time and a timestamp for receiving the second time synchronization response message every time; the second time synchronization response message carries a timestamp of the second time synchronization request message sent by the relay equipment, the timestamp of the second time synchronization request message received by the NTP server and the timestamp of the second time synchronization response message sent by the NTP server; and the relay equipment in the client mode performs average operation on the N round-trip time delays to obtain and record initial average round-trip time delays, and performs average operation on the N response time delays to obtain and record initial average response time delays.
In some embodiments, the operating mode of the relay device is switched from the client mode to the transparent transmission mode; the relay equipment in the transparent transmission mode sends a third time synchronization request message to the NTP server according to a second set frequency; the third time synchronization request message carries a timestamp for the relay device to send the third time synchronization request message; the relay equipment in the transparent transmission mode receives a third time synchronization response message sent by the NTP server; the third time synchronization response message carries a timestamp of the third time synchronization request message sent by the relay equipment, the NTP server receives the timestamp of the third time synchronization request message, and the NTP server sends the third time synchronization response message; and the relay equipment in the transparent transmission mode updates the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message and the timestamp of the relay equipment for receiving the third time synchronization response message.
In other embodiments, the locally stored time information includes an initial average round trip delay and an initial average response delay; the method for updating the locally stored round trip delay and response delay by the relay device in the transparent transmission mode according to the locally stored time information, the third time synchronization response message and the timestamp of the third time synchronization response message received by the relay device includes: the relay equipment in the transparent transmission mode carries out summation operation on the first time length and the second time length to obtain round-trip time delay, and carries out average calculation on the obtained round-trip time delay and the initial average round-trip time delay to obtain and record updated average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay equipment sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay equipment receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message; and the relay equipment in the transparent transmission mode carries out average calculation on the difference value between the timestamp of the NTP server for receiving the third time synchronization request message and the timestamp of the NTP server for sending the third time synchronization response message and the initial average response time delay to obtain and record the updated average response time delay.
In other embodiments, the locally stored time information includes an initial average round trip delay and an initial average response delay; the method for updating the locally stored round trip delay and response delay by the relay device in the transparent transmission mode according to the locally stored time information, the third time synchronization response message and the timestamp of the third time synchronization response message received by the relay device includes: the relay equipment in the transparent transmission mode carries out summation operation on the first time length and the second time length to obtain round-trip time delay, and records the obtained round-trip time delay in a register for storing initial average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay equipment sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay equipment receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message; and the relay equipment in the transparent transmission mode performs difference operation on the timestamp of the NTP server for receiving the third time synchronization request message and the timestamp of the NTP server for sending the third time synchronization response message to obtain response time delay, and records the obtained response time delay in a register for storing initial average response time delay.
S304: the relay equipment in the relay service mode sends a first time synchronization response message to the NTP client, wherein the first time synchronization response message carries first time and second time.
The relay equipment in the relay service mode carries the calculated first time and second time in a first time synchronization response message and sends the first time and the second time to the NTP client so that the NTP client completes time synchronization operation according to the first time and the second time; wherein, the source IP address in the first time synchronization response message is the IP address of the NTP server, and the destination IP address is the IP address of the NTP client.
Furthermore, the relay device in the relay service mode still sends a fault detection request message to the NTP server currently marked as a fault state according to a third set frequency; and if the number of times of the continuous equipment of the relay equipment in the relay service mode receives the fault detection response message sent by the NTP server within a set time length, marking that the NTP server is in a normal state, and switching the working mode of the relay equipment from the relay service mode to a transparent transmission mode.
In some embodiments, the fourth set frequency is lower than the second set frequency, and the second set frequency is lower than the first set frequency value; that is, in the initial stage, the relay device in the client mode continuously generates N time synchronization request messages to the NTP server at a higher frequency (a first set frequency, for example, 1 time/second) to quickly and accurately acquire the time synchronization response message returned by the NTP server, achieve synchronization with the NTP server, and acquire an initial average round-trip delay and an initial average response delay; after the initial stage, since the relay device itself has a certain holding capability and in order to reduce the link bandwidth load, the relay device (client mode or pass-through mode) is set at a lower frequency (fourth set frequency, such as 64) as long as the NTP server is marked as normal-1Time/second) sending a time synchronization request message to the NTP server so as to obtain a time synchronization response message returned by the NTP server and complete the synchronization of the local system time; in pass-through mode, the repeater operates at medium frequency (second set frequency, e.g. 8)-1Time/second) to obtain the time synchronization response message returned by the NTP server, and complete the update of the round trip delay and the response delay of the local storage, so that the round trip delay and the response delay of the local storage are updated in a medium-frequency mode, the update of the round trip delay and the response delay can be completed in the sending period of the NTP client, even if the NTP server fails or a link between the NTP server and the relay equipment fails, the currently stored time information of the relay equipment is updated before the sending period of the next NTP client, and the reliability of the time synchronization service is improved without excessively increasing the bandwidth load of the link.
In some embodiments, the second set frequency value is equal to the third set frequency value, i.e. the relay device is at a medium frequency (e.g. 8)-1Time/second) sending a fault detection request message to the NTP server to determine the state of the NTP server; thus, the relay device can complete the judgment of the state of the NTP server in the sending period of the NTP client and complete the switching of the working mode according to the state of the NTP server even if the NTPWhen the server fails or a link between the NTP server and the relay equipment fails, the relay equipment is switched to a relay service mode before the next transmission period of the NTP client, so that the time delay is reduced, and the reliability of time synchronization service is improved.
It should be noted that the time synchronization method provided in the embodiment of the present application is also applicable to a scenario in which an NTP server and an NTP client are one-to-many. When a plurality of NTP clients are hung on the relay device, if the NTP server fails or a link between the NTP server and the relay device fails, the relay device enters a relay service mode, when at least one of the plurality of NTP clients hung down sends a time synchronization request message to the relay device, the NTP client in the relay service mode determines a first time and a second time according to a flow shown in fig. 3, and returns a time synchronization response message carrying the first time and the second time to the at least one NTP client, so that the at least one NTP client completes time synchronization operation when the NTP server fails or the link between the NTP server and the relay device fails.
An NTP client is hung below the relay equipment, time synchronization request messages and fault detection request messages are NTP request messages, N takes a value of 15, the high frequency is 1 time/second, and the intermediate frequency is 8-1Second/second, low frequency of 64-1The second/second is taken as an example, and the switching process of the working mode of the relay device is described in detail.
Referring to fig. 4, a flowchart of switching an operating mode of a relay device according to an embodiment of the present application is provided.
As shown, the handover procedure includes:
s401: in the initial stage, the relay device in the client mode determines an initial average round trip delay and an initial average response delay, and synchronizes the system time.
Specifically, at the initial stage, the relay device does not hang the NTP client, the working mode of the relay device is the client mode, the relay device in the client mode continuously sends 15 NTP request messages to the NTP server according to the frequency of 1 time/second, and determines 15 sets of round-trip delay and response delay according to the received 15 NTP response messages according to formulas (1) and (2), and further performs average operation to obtain initial average round-trip delay, initial average response delay and system time.
S402: after the initial phase, the relay device in client mode is in accordance with 64-1The frequency of time/second sends NTP request message to NTP server to synchronize system time.
After the initial stage, if the relay device still does not hang the NTP client, the relay device is still in the client mode, and the relay device in the client mode is according to 64-1The frequency of times/second sends NTP request messages to the NTP server to synchronize system time.
S403: the method comprises the steps that relay equipment in a client mode detects whether an NTP server and an NTP client complete a time synchronization session or not; in the case of yes, S404 is executed; in the case of no, S402 is executed.
S404: the working mode of the relay equipment is switched to a transparent transmission mode from a client mode.
S405: and the relay equipment in the transparent transmission mode updates the locally stored round trip delay and response delay.
Specifically, after the relay device enters the transparent transmission mode, 8 is used-1And sending an NTP request message to the NTP server at the frequency of the second/second so as to update the round trip delay and the response delay of the local storage according to the method one or the method two.
S406: the relay device in the transparent transmission mode synchronizes the system time.
Specifically, the relay device in transparent transmission mode is further according to 64-1And transmitting an NTP request message to the NTP server at the frequency of time/second, and synchronizing the system time according to the received NTP response message.
S407: and the relay equipment in the transparent transmission mode determines the state of the NTP server.
Specifically, the relay device in the transparent transmission mode is according to 8-1And transmitting an NTP request message to the NTP server at the frequency of time/second, and determining the state of the NTP server according to the received NTP response message.
In addition to the above S405 to S407, the relay device in the transparent transmission mode needs to receive an NTP request message from the NTP client, forward the NTP request message to the NTP server, receive an NTP response message in which the NTP server responds to the NTP request message from the NTP client, and forward the NTP response message to the NTP client.
S408: the relay equipment in the transparent transmission mode judges whether the NTP server is in a fault state; in the case of yes, S409 is executed; in the case of no, S405-S407 are executed.
In S408, the relay device in the transparent transmission mode determines whether the state of the NTP server is a failure state according to the NTP response message received in S406.
S409: and the working mode of the relay equipment is switched from the transparent transmission mode to the relay service mode.
S410: the relay equipment in the relay service mode receives an NTP request message sent by an NTP client, determines first time and second time according to locally stored time information, carries the first time and the second time in an NTP response message and sends the NTP response message to the NTP client.
Specifically, after receiving an NTP request message from an NTP client, a relay device in the relay service mode calculates a first time and a second time according to locally stored time information and according to formulas (5) and (6), and sends an NTP response message carrying the first time and the second time to the NTP client, so that the NTP client completes time synchronization according to the first time and the second time.
S411: the relay device in the relay service mode determines the status of the NTP server.
Specifically, the relay device in the relay service mode is according to 8-1And transmitting an NTP request message to the NTP server at the frequency of time/second, and determining the state of the NTP server according to the received NTP response message.
S412: the relay equipment in the relay service mode judges whether the NTP server is in a normal state or not; in case of yes, S413 is executed; in the case of no, S410-S411 are executed.
S413: and the working mode of the relay equipment is switched to the transparent transmission mode from the relay service mode.
After S413, the relay service mode in the transparent transmission mode performs the steps shown in S405 to S408.
In the above embodiment of the present application, after the relay device detects that the NTP server is in a failure state, the working mode of the relay device is switched from the transparent transmission mode to the relay service mode; after receiving a first time synchronization request message sent by an NTP client, relay equipment in a relay service mode determines a first time and a second time according to locally stored time information, wherein the first time is used for indicating a timestamp of the NTP server for receiving the first time synchronization request message, and the second time is used for indicating the timestamp of the NTP server for sending a first time synchronization response message; the relay equipment in the relay service mode sends a first time synchronization response message carrying the first time and the second time to the NTP client so that the NTP client completes time synchronization according to the first time and the second time.
The relay equipment in the relay service mode determines a first time of a time stamp for indicating the NTP server to receive the time synchronization request message and a second time of the time stamp for indicating the NTP server to send the time synchronization response message according to the locally stored time information; therefore, even though the NTP server is in a fault state, the NTP client can complete time synchronization, and the reliability of time synchronization service is improved.
In addition, in the embodiment of the application, only one relay device is used to assist at least one NTP client under the NTP server to complete time synchronization when the NTP server is in a fault state, and other NTP servers do not need to be selected respectively for the at least one NTP client under the NTP server to provide time synchronization services, so that the network structure is simplified, and the cost is saved.
Based on the same technical concept, embodiments of the present application further provide a relay device, where the relay device may implement the processes performed in fig. 3 to fig. 4 in the foregoing embodiments.
Fig. 5 is a schematic structural diagram of a relay device according to an embodiment of the present application.
As shown in the figure, the relay apparatus includes: a detection module 501, a mode switching module 502 and a relay service module 503;
the mode switching module 502 is configured to switch the working mode of the relay device from a transparent transmission mode to a relay service mode after the detection module 501 detects that the NTP server is in a failure state;
the relay service module 503 is configured to receive a first time synchronization request message sent by an NTP client to the NTP server; determining a first time and a second time according to locally stored time information, wherein the time information at least comprises system time, response time delay and round trip time delay; wherein the first time is a timestamp indicating that the NTP server receives the first time synchronization request message, and the second time is a timestamp indicating that the NTP server transmits a first time synchronization response message; the response delay is the time length of the response time synchronization request message of the NTP server in a normal state, and the round-trip delay is the transmission time length of the time synchronization request message and the time synchronization response message between the NTP server and the relay equipment in a normal state; and sending a first time synchronization response message to the NTP client, wherein the first time synchronization response message carries the first time and the second time.
Optionally, the working modes of the relay device further include a client mode, and the mode switching module 502 is further configured to:
after the detection module 501 detects that the NTP server and the NTP client complete a time synchronization session, the working mode of the relay device is switched from the client mode to the transparent transmission mode.
Optionally, the relay device further includes a client module 504, where the client module 504 is specifically configured to:
sending a second time synchronization request message to the NTP server according to the first set frequency for N times continuously, wherein the second time synchronization request message carries a timestamp for sending the second time synchronization request message by the relay equipment; n is an integer greater than 1;
determining N round-trip delays and N response delays according to a second time response message returned by the NTP server each time and a timestamp of receiving the second time synchronization response message each time; the second time synchronization response message carries a timestamp of the second time synchronization request message sent by the relay device, and the NTP server receives the timestamp of the second time synchronization request message and the timestamp of the second time synchronization response message sent by the NTP server;
and carrying out average operation on the N round-trip time delays to obtain initial average round-trip time delay and recording the initial average round-trip time delay, and carrying out average operation on the N response time delays to obtain initial average response time delay and recording the initial average response time delay.
Optionally, the relay device further includes a transparent transmission module 505;
after the working mode of the relay device is switched from the client mode to the transparent transmission mode, the transparent transmission module 505 is specifically configured to:
sending a third time synchronization request message to the NTP server according to a second set frequency; the third time synchronization request message carries a timestamp for the relay device to send the third time synchronization request message;
receiving a third time synchronization response message sent by the NTP server; the third time synchronization response message carries a timestamp of the third time synchronization request message sent by the relay device, the NTP server receives the timestamp of the third time synchronization request message, and the NTP server sends the third time synchronization response message;
and updating the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message and the timestamp of the third time synchronization response message received by the relay equipment.
Optionally, the locally stored time information includes an initial average round trip delay and an initial average response delay time;
the transparent transmission module is specifically used for:
summing the first time length and the second time length to obtain round-trip time delay, and carrying out average calculation on the obtained round-trip time delay and the initial average round-trip time delay to obtain and record updated average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and carrying out average calculation on the difference value between the timestamp of the NTP server receiving the third time synchronization request message and the timestamp of the NTP server sending the third time synchronization response message and the initial average response time delay to obtain and record the updated average response time delay.
Optionally, the locally stored time information includes an initial average round trip delay and an initial average response delay;
the transparent transmission module is specifically used for:
summing the first time length and the second time length to obtain a round-trip delay, and recording the obtained round-trip delay in a register for storing the initial average round-trip delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and performing difference operation on the timestamp of the NTP server receiving the third time synchronization request message and the timestamp of the NTP server sending the third time synchronization response message to obtain response delay, and recording the obtained response delay in a register for storing the initial average response delay.
Optionally, the relay device further includes a detection module;
the detection module is specifically configured to:
sending a fault detection request message to the NTP server according to a third set frequency; the fault detection request message is used for determining the state of the NTP server, and the state comprises a fault state and a normal state;
if the relay equipment receives the fault detection response message sent by the NTP server within the set time length for the continuous set times, the NTP server is marked to be in a normal state, and the mode switching module is triggered to switch the working mode of the relay equipment from a relay service mode to a transparent transmission mode;
and if the relay equipment does not receive the fault detection response message sent by the NTP server within the set time length for the continuous set times, marking that the NTP server is in a fault state.
Optionally, the time information locally stored by the relay device specifically includes a system time, an average round trip delay, and an average response delay;
the relay service module is specifically configured to:
summing the system time and one half of the average round-trip delay to obtain the first time;
and summing the average response time delay and one half of the average round trip time delay of the system time to obtain the second time.
Optionally, the time information locally stored by the relay device specifically includes system time, round-trip delay of a set number, and response delay of a set number;
the relay service module is specifically configured to:
carrying out weighted average operation on the round trip time delays with the set number to obtain average round trip time delay, and carrying out summation operation on the system time and one half of the average round trip time delay to obtain the first time;
and carrying out weighted average operation on the response time delays with the set number to obtain average response time delay, and carrying out summation operation on the system time, the average response time delay and one half of the average round-trip time delay to obtain the second time.
Optionally, the NTP server is in a normal state, and the client module is further configured to:
and sending a fourth time synchronization request message to the NTP server according to a fourth set frequency, wherein the fourth time synchronization request message is used for updating the locally stored system time.
Based on the same technical concept, the embodiment of the present application further provides a communication device, which can implement the processes performed in fig. 3 to fig. 4 in the foregoing embodiments.
Referring to fig. 6, which is a schematic structural diagram of a communication device provided in the embodiment of the present application, as shown in the figure, the base station may include: a processor 601, a memory 602, a transceiver 603, and a bus interface 604.
The processor 601 is responsible for managing the bus architecture and general processing, and the memory 602 may store data used by the processor 601 in performing operations. The transceiver 603 is used for receiving and transmitting data under the control of the processor 601.
The bus architecture may include any number of interconnected buses and bridges, with one or more processors, represented by processor 601, and various circuits of memory, represented by memory 602, being linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface. The processor 601 is responsible for managing the bus architecture and general processing, and the memory 602 may store data used by the processor 601 in performing operations.
The processes disclosed in the embodiments of the present application can be applied to the processor 601, or implemented by the processor 601. In implementation, the steps of the signal processing flow may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 601. The processor 601 may be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like that implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the signal processing flow in combination with the hardware thereof.
In the embodiment of the present application, for concepts, explanations, detailed descriptions, and other steps related to the technical solutions provided in the embodiment of the present application, which are related to the relay device 500 and the communication apparatus 600, please refer to the descriptions of the foregoing methods or other embodiments about these contents, and no further description is given here.
It should be noted that the processor referred to in the embodiments of the present application may be a Central Processing Unit (CPU), a general purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic devices, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like. Wherein the memory may be integrated in the processor or may be provided separately from the processor.
Based on the same technical concept, the embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the processes performed in fig. 3-4.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (22)
1. A time synchronization method applied to a relay device, the relay device establishing a connection with a network time protocol NTP server, the method comprising:
after the relay equipment detects that the NTP server is in a fault state, the working mode of the relay equipment is switched from a transparent transmission mode to a relay service mode;
the method comprises the steps that the relay equipment in a relay service mode receives a first time synchronization request message sent to an NTP server by an NTP client;
the relay equipment in the relay service mode determines a first time and a second time according to locally stored time information, wherein the time information at least comprises system time, response time delay and round trip time delay; wherein the first time is a timestamp indicating that the NTP server receives the first time synchronization request message, and the second time is a timestamp indicating that the NTP server transmits a first time synchronization response message; the response delay is the time length of the response time synchronization request message of the NTP server in a normal state, and the round-trip delay is the transmission time length of the time synchronization request message and the time synchronization response message between the NTP server and the relay equipment in a normal state;
the relay device in the relay service mode sends a first time synchronization response message to the NTP client, where the first time synchronization response message carries the first time and the second time.
2. The method of claim 1, wherein the operational mode of the relay device further comprises a client mode, the method further comprising:
and after the relay equipment in the client mode detects that the NTP server and the NTP client finish one time of time synchronization session, the working mode of the relay equipment is switched to a transparent transmission mode from the client mode.
3. The method of claim 2, wherein prior to the relay device in the client mode detecting that the NTP server and the NTP client complete a time synchronization session, further comprising:
the relay equipment in the client mode continuously sends a second time synchronization request message to the NTP server for N times according to a first set frequency, wherein the second time synchronization request message carries a timestamp of the second time synchronization request message sent by the relay equipment; n is an integer greater than 1;
the relay equipment in the client mode determines N round-trip delays and N response delays according to a second time response message returned by the NTP server every time and a timestamp of receiving the second time synchronization response message every time; the second time synchronization response message carries a timestamp of the second time synchronization request message sent by the relay device, and the NTP server receives the timestamp of the second time synchronization request message and the timestamp of the second time synchronization response message sent by the NTP server;
and in the client mode, the relay equipment performs average operation on the N round-trip time delays to obtain initial average round-trip time delays and records the initial average round-trip time delays, and performs average operation on the N response time delays to obtain initial average response time delays and records the initial average response time delays.
4. The method as claimed in claim 2, wherein after the operation mode of the relay device is switched from the client mode to the transparent transmission mode, the method further comprises:
the relay equipment in the transparent transmission mode sends a third time synchronization request message to the NTP server according to a second set frequency; the third time synchronization request message carries a timestamp for the relay device to send the third time synchronization request message;
the relay equipment in the transparent transmission mode receives a third time synchronization response message sent by the NTP server; the third time synchronization response message carries a timestamp of the third time synchronization request message sent by the relay device, the NTP server receives the timestamp of the third time synchronization request message, and the NTP server sends the third time synchronization response message;
and the relay equipment in the transparent transmission mode updates the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message and the timestamp of the relay equipment for receiving the third time synchronization response message.
5. The method of claim 4, wherein the locally stored time information comprises an initial average round trip delay and an initial average response delay;
the updating, by the relay device in the transparent transmission mode, the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message, and the timestamp at which the relay device receives the third time synchronization response message includes:
the relay equipment in the transparent transmission mode carries out summation operation on the first time length and the second time length to obtain round-trip time delay, and carries out average calculation on the obtained round-trip time delay and the initial average round-trip time delay to obtain and record updated average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and in the transparent transmission mode, the relay equipment averagely calculates the difference between the timestamp of the NTP server for receiving the third time synchronization request message and the timestamp of the NTP server for sending the third time synchronization response message and the initial average response time delay to obtain and record the updated average response time delay.
6. The method of claim 4, wherein the locally stored time information comprises an initial average round trip delay and an initial average response delay;
the updating, by the relay device in the transparent transmission mode, the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message, and the timestamp at which the relay device receives the third time synchronization response message includes:
the relay equipment in the transparent transmission mode carries out summation operation on the first time length and the second time length to obtain round-trip time delay, and records the obtained round-trip time delay in a register for storing the initial average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and in the transparent transmission mode, the relay equipment performs difference operation on the timestamp of the NTP server for receiving the third time synchronization request message and the timestamp of the NTP server for sending the third time synchronization response message to obtain response delay, and records the obtained response delay in a register for storing the initial average response delay.
7. The method of claim 1, further comprising:
the relay equipment sends a fault detection request message to the NTP server according to a third set frequency; the fault detection request message is used for determining the state of the NTP server, and the state comprises a fault state and a normal state;
if the relay equipment receives the fault detection response message sent by the NTP server within the set time length for the continuous set times, the NTP server is marked to be in a normal state, and the working mode of the relay equipment is switched from a relay service mode to a transparent transmission mode;
and if the relay equipment does not receive the fault detection response message sent by the NTP server within the set time length for the continuous set times, marking that the NTP server is in a fault state.
8. The method according to claim 1, wherein the time information locally stored by the relay device specifically includes a system time, an average round trip delay, and an average response delay;
the relay device in the relay service mode determining a first time and a second time according to locally stored time information, including:
the relay equipment in a relay service mode carries out summation operation on the system time and one half of the average round-trip delay to obtain the first time;
and the relay equipment in the relay service mode carries out summation operation on the system time, the average response time delay and one half of the average round trip time delay to obtain the second time.
9. The method according to claim 1, wherein the time information locally stored by the relay device specifically includes a system time, a round trip delay of a set number, and a response delay of a set number;
the relay device in the relay service mode determining a first time and a second time according to locally stored time information, including:
the relay equipment in the relay service mode performs weighted average operation on the round trip time delays with the set number to obtain average round trip time delay, and performs summation operation on the system time and one half of the average round trip time delay to obtain the first time;
and in the relay service mode, the relay equipment performs weighted average operation on the response time delays with the set number to obtain average response time delay, and performs summation operation on the system time, the average response time delay and one half of the average round-trip time delay to obtain the second time.
10. The method of claim 1, wherein the NTP server is in a normal state, the method further comprising:
and the relay equipment sends a fourth time synchronization request message to the NTP server according to a fourth set frequency, wherein the fourth time synchronization request message is used for updating the locally stored system time.
11. A relay device, wherein said relay device establishes a connection with a network time protocol, NTP, server, said relay device comprising: the system comprises a detection module, a mode switching module and a relay service module;
the mode switching module is configured to switch a working mode of the relay device from a transparent transmission mode to a relay service mode after the detection module detects that the NTP server is in a failure state;
the relay service module is used for receiving a first time synchronization request message sent to the NTP server by an NTP client; determining a first time and a second time according to locally stored time information, wherein the time information at least comprises system time, response time delay and round trip time delay; wherein the first time is a timestamp indicating that the NTP server receives the first time synchronization request message, and the second time is a timestamp indicating that the NTP server transmits a first time synchronization response message; the response delay is the time length of the response time synchronization request message of the NTP server in a normal state, and the round-trip delay is the transmission time length of the time synchronization request message and the time synchronization response message between the NTP server and the relay equipment in a normal state; and sending a first time synchronization response message to the NTP client, wherein the first time synchronization response message carries the first time and the second time.
12. The relay device of claim 11, wherein the operating modes of the relay device further comprise a client mode, the mode switching module further configured to:
and after the detection module detects that the NTP server and the NTP client finish a time synchronization session, switching the working mode of the relay equipment from a client mode to a transparent transmission mode.
13. The relay device of claim 12, wherein the relay device further comprises a client module, the client module being specifically configured to:
sending a second time synchronization request message to the NTP server according to the first set frequency for N times continuously, wherein the second time synchronization request message carries a timestamp for sending the second time synchronization request message by the relay equipment; n is an integer greater than 1;
determining N round-trip delays and N response delays according to a second time response message returned by the NTP server each time and a timestamp of receiving the second time synchronization response message each time; the second time synchronization response message carries a timestamp of the second time synchronization request message sent by the relay device, and the NTP server receives the timestamp of the second time synchronization request message and the timestamp of the second time synchronization response message sent by the NTP server;
and carrying out average operation on the N round-trip time delays to obtain initial average round-trip time delay and recording the initial average round-trip time delay, and carrying out average operation on the N response time delays to obtain initial average response time delay and recording the initial average response time delay.
14. The relay device of claim 12, wherein the relay device further comprises a pass-through module;
after the working mode of the relay device is switched from the client mode to the transparent transmission mode, the transparent transmission module is specifically configured to:
sending a third time synchronization request message to the NTP server according to a second set frequency; the third time synchronization request message carries a timestamp for the relay device to send the third time synchronization request message;
receiving a third time synchronization response message sent by the NTP server; the third time synchronization response message carries a timestamp of the third time synchronization request message sent by the relay device, the NTP server receives the timestamp of the third time synchronization request message, and the NTP server sends the third time synchronization response message;
and updating the locally stored round trip delay and response delay according to the locally stored time information, the third time synchronization response message and the timestamp of the third time synchronization response message received by the relay equipment.
15. The relay device of claim 14, wherein the locally stored time information comprises an initial average round trip delay and an initial average response delay time;
the transparent transmission module is specifically used for:
summing the first time length and the second time length to obtain round-trip time delay, and carrying out average calculation on the obtained round-trip time delay and the initial average round-trip time delay to obtain and record updated average round-trip time delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and carrying out average calculation on the difference value between the timestamp of the NTP server receiving the third time synchronization request message and the timestamp of the NTP server sending the third time synchronization response message and the initial average response time delay to obtain and record the updated average response time delay.
16. The relay device of claim 14, wherein the locally stored time information comprises an initial average round trip delay and an initial average response delay;
the transparent transmission module is specifically used for:
summing the first time length and the second time length to obtain a round-trip delay, and recording the obtained round-trip delay in a register for storing the initial average round-trip delay; the first time length is a difference value between a timestamp of the NTP server receiving the third time synchronization request message and a timestamp of the relay device sending the third time synchronization request message, and the second time length is a difference value between a timestamp of the relay device receiving the third time synchronization response message and a timestamp of the NTP server sending the third time synchronization response message;
and performing difference operation on the timestamp of the NTP server receiving the third time synchronization request message and the timestamp of the NTP server sending the third time synchronization response message to obtain response delay, and recording the obtained response delay in a register for storing the initial average response delay.
17. The relay device of claim 11, wherein the relay device further comprises a detection module;
the detection module is specifically configured to:
sending a fault detection request message to the NTP server according to a third set frequency; the fault detection request message is used for determining the state of the NTP server, and the state comprises a fault state and a normal state;
if the relay equipment receives the fault detection response message sent by the NTP server within the set time length for the continuous set times, the NTP server is marked to be in a normal state, and the mode switching module is triggered to switch the working mode of the relay equipment from a relay service mode to a transparent transmission mode;
and if the relay equipment does not receive the fault detection response message sent by the NTP server within the set time length for the continuous set times, marking that the NTP server is in a fault state.
18. The relay device according to claim 11, wherein the time information locally stored by the relay device specifically includes a system time, an average round trip delay, and an average response delay;
the relay service module is specifically configured to:
summing the system time and one half of the average round-trip delay to obtain the first time;
and summing the average response time delay and one half of the average round trip time delay of the system time to obtain the second time.
19. The relay device according to claim 11, wherein the time information locally stored by the relay device specifically includes a system time, a round trip delay of a set number, and a response delay of a set number;
the relay service module is specifically configured to:
carrying out weighted average operation on the round trip time delays with the set number to obtain average round trip time delay, and carrying out summation operation on the system time and one half of the average round trip time delay to obtain the first time;
and carrying out weighted average operation on the response time delays with the set number to obtain average response time delay, and carrying out summation operation on the system time, the average response time delay and one half of the average round-trip time delay to obtain the second time.
20. The relay device of claim 11, wherein the NTP server is in a normal state; the relay device further includes a client module, and the client module is specifically configured to:
and sending a fourth time synchronization request message to the NTP server according to a fourth set frequency, wherein the fourth time synchronization request message is used for updating the locally stored system time.
21. A communications apparatus, comprising: a processor, a memory, and a transceiver;
the memory to store computer instructions;
the processor for executing the computer instructions to implement the method of any one of claims 1 to 10.
22. A computer-readable storage medium storing computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 10.
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 CN110492967A (en) | 2019-11-22 |
CN110492967B true 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) |
Families Citing this family (6)
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 |
CN111132302B (en) * | 2019-12-27 | 2022-05-03 | 京信网络系统股份有限公司 | Time synchronization method, device, base station equipment and computer readable storage medium |
CN111953443B (en) * | 2020-09-17 | 2023-01-31 | 苏州科达科技股份有限公司 | Resource processing method, device, electronic equipment, storage medium and system |
CN112468371B (en) * | 2020-12-01 | 2022-06-10 | 武汉绿色网络信息服务有限责任公司 | Method and equipment for determining transmission delay information of DPI equipment |
CN114553354A (en) * | 2021-12-16 | 2022-05-27 | 深圳市太铭科技有限公司 | Method for keeping clock synchronization of NTP (network time protocol) server |
CN114745415B (en) * | 2022-03-17 | 2024-03-26 | 中汽创智科技有限公司 | Vehicle service communication data processing method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009111799A3 (en) * | 2008-03-07 | 2009-12-17 | 3Tera, Inc. | Globally distributed utility computing cloud |
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 |
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 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5811794B2 (en) * | 2011-11-16 | 2015-11-11 | 富士通株式会社 | Communication device |
DK3651378T3 (en) * | 2015-04-10 | 2022-10-24 | Viasat Inc | GROUND-BASED ANTENNA BEAM SHAPING FOR COMMUNICATION BETWEEN ACCESS NODES AND USER TERMINALS CONNECTED BY A RELAY SUCH AS A SATELLITE |
-
2019
- 2019-09-24 CN CN201910904083.XA patent/CN110492967B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009111799A3 (en) * | 2008-03-07 | 2009-12-17 | 3Tera, Inc. | Globally distributed utility computing cloud |
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 |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN110492967A (en) | 2019-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110492967B (en) | Time synchronization method, relay equipment and device | |
CN110601786B (en) | Time synchronization method, relay equipment and device | |
EP2197179B1 (en) | Apparatus and method for fast detection of communication path failures | |
US7069325B1 (en) | Method and apparatus for handling requests in a network | |
KR101426325B1 (en) | Network element for a packet-switched network | |
Sousa et al. | Optimistic total order in wide area networks | |
US20160197719A1 (en) | Time Synchronization Method and Device | |
EP1553713A1 (en) | Time synchronizing device and process and associated products | |
US20090257456A1 (en) | Coordinated timing network having servers of different capabilities | |
CN108599888A (en) | A kind of distributed network clock synchronizing system | |
CN102843205A (en) | Method and device for time synchronization convergence based on precision time protocol | |
CN102257759A (en) | Master-standby switching method, system control unit and communication system | |
WO2018107606A1 (en) | Method and device for delivering messages in internet of things | |
EP1601124B1 (en) | Method and apparatus synchronizing clocks of network nodes | |
CN101355511B (en) | Method and apparatus for protecting chain polymerization traffic | |
CN113746733A (en) | Table item synchronization method, gateway equipment, networking system and storage medium | |
JP2002533990A (en) | Clock synchronization of telecommunications networks using system frame numbers | |
CN110209986A (en) | Internal storage state method of data synchronization and device | |
KR20040016137A (en) | System And Method For Synchronizing Time Between SGSN And GGSN | |
CN100484142C (en) | Method and device for correting time of customer end through network time protocol | |
CN101420281A (en) | Be used between network element, transmitting the method and apparatus of time value in a few days | |
CN107819591B (en) | Data synchronization method, device, system and network equipment | |
WO2017114568A1 (en) | Method, system and device for providing time-stamps in a network measurement test | |
CN114553354A (en) | Method for keeping clock synchronization of NTP (network time protocol) server | |
CN112822283B (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 |