Multi-port PTP time service device and time service method thereof
By designing a multi-port PTP timing device, including a primary time server, an auxiliary time server and a multi-port PTP switch, the problem that the existing PTP timing device cannot provide high-precision time synchronization services for multiple devices at the same time is solved, and high-precision and reliable time synchronization is achieved to adapt to complex network environments and multi-device needs.
Patent Information
- Application Number
- CN202411452195.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-03-07
AI Technical Summary
The existing PTP timing devices cannot provide high-precision time synchronization services for multiple devices at the same time. In the case of complex network conditions or numerous devices, synchronization accuracy may be affected, lack of dynamic adjustment mechanisms, and insufficient compensation for clock deviations and network delays.
A multi-port PTP timing device is designed, including a primary time server, an auxiliary time server and a multi-port PTP switch. It receives and forwards synchronization messages and delay request/response messages through the multi-port PTP switch, and dynamically adjusts synchronization policies and compensates clock deviation and network delay with the support of the network bandwidth optimization module and the synchronization accuracy optimization module.
It realizes the provision of high-precision time synchronization services for multiple devices at the same time, improves synchronization accuracy, enhances the reliability and stability of the system, and can dynamically adjust the synchronization strategy according to network conditions and the number of devices to ensure that the synchronization accuracy is not affected.
Smart Images

Figure CN119582996A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PTP timing service, and more particularly to a multi-port PTP timing service device and a timing service method thereof. Background Art
[0002] With the rapid development of information technology, the requirements for time synchronization accuracy are getting higher and higher. In many fields, such as financial transactions, telecommunications networks, industrial automation, scientific research, etc., accurate time synchronization is crucial to the normal operation of the system. Although the traditional NTP (Network Time Protocol) timing technology can provide millisecond-level time synchronization accuracy, it can no longer meet the needs in some application scenarios that require higher time synchronization accuracy.
[0003] In order to achieve higher-precision time synchronization, PTP (Precision Time Protocol) technology came into being. PTP is a network timing protocol that can provide sub-microsecond time synchronization accuracy.
[0004] However, existing PTP timing devices usually only support single-port timing, that is, they can only provide time synchronization services for one device. In a complex network environment with multiple devices and multiple nodes, a single-port PTP timing device cannot meet the needs of high-precision time synchronization of multiple devices at the same time.
[0005] In addition, the PTP timing device has the following disadvantages:
[0006] Limited synchronization accuracy: When network conditions are complex or there are many devices, the synchronization accuracy of existing PTP timing devices may be affected and cannot achieve the expected sub-microsecond accuracy;
[0007] Lack of dynamic adjustment mechanism: Existing PTP timing devices lack a mechanism to dynamically adjust the synchronization strategy according to network conditions and the number of devices, resulting in a decrease in synchronization accuracy when the network environment changes or the number of devices increases;
[0008] Insufficient compensation for clock deviation and network delay: Existing PTP timing devices are deficient in the estimation and compensation of clock deviation and network delay, which affects the synchronization accuracy.
[0009] Therefore, how to provide a multi-port PTP timing device that can provide high-precision time synchronization services to multiple devices at the same time is a problem that those skilled in the art need to solve urgently. Summary of the invention
[0010] In view of this, the present invention provides a multi-port PTP timing device and a timing method thereof to solve some of the technical problems mentioned in the background technology.
[0011] In order to achieve the above object, the present invention adopts the following technical solution:
[0012] A multi-port PTP timing device, comprising:
[0013] The main time server is used to provide high-precision time information;
[0014] Auxiliary time server, used to provide time information when the primary time server fails;
[0015] Multi-port PTP switch with multiple network interfaces for connecting the primary time server, auxiliary time server and multiple time synchronization clients;
[0016] Multiple time synchronization clients are used to receive time information and perform time synchronization.
[0017] Preferably, for a multi-port PTP switch:
[0018] a. Receive synchronization messages from the master time server and broadcast the synchronization messages to all connected time synchronization clients;
[0019] b. Receive a delay request message from the time synchronization client and forward the delay request message to the primary time server;
[0020] c. Receive the delay response message from the master time server and forward the delay response message to the corresponding time synchronization client.
[0021] Preferably, the specific content of the time synchronization client is:
[0022] a. Receive synchronization messages and record timestamps;
[0023] b. Send a delay request message and record the sending timestamp;
[0024] c. Receive the delayed response message and record the receiving timestamp;
[0025] d. Calculate the time difference based on the timestamps of the synchronization message and the delayed response message, and adjust the local clock to achieve time synchronization.
[0026] Preferably, the multi-port PTP switch includes multiple network interfaces, specifically a physical interface, a logical interface, a wireless interface, a fiber optic interface and a virtual interface;
[0027] Physical interface, used for connecting a multi-port PTP switch to a primary time server and a secondary time server, and connecting multiple time synchronization clients through multiple physical interfaces;
[0028] Logical interfaces, which are used to create multiple logical network interfaces on a single physical interface to isolate the time synchronization traffic of different time synchronization clients;
[0029] Wireless interface, used to connect a multi-port PTP switch to a wireless time synchronization client;
[0030] Virtual interface, used to connect virtual networks and achieve time synchronization between virtual machines in a virtualized environment;
[0031] Fiber optic interface for connecting to a fiber optic network to achieve high-speed time synchronization.
[0032] Preferably, the multi-port PTP timing device further includes a server status detection and switching module, which is used to detect the status of the main time server and automatically switch to the auxiliary time server when the main time server fails.
[0033] Preferably, the multi-port PTP timing device further includes a network bandwidth optimization module for reducing bandwidth consumption through flow control, message compression, message caching and bandwidth management.
[0034] Preferably, the network bandwidth optimization module includes a traffic control unit, a message compression unit, a message cache unit and a bandwidth management unit;
[0035] A traffic control unit, used to dynamically adjust the sending frequency of synchronization messages and delay request / response messages according to network bandwidth usage;
[0036] A message compression unit, used to compress synchronization messages and delay request / response messages to reduce the amount of data transmission;
[0037] The message cache unit is used to cache synchronization messages and delayed request / response messages. When receiving a message request with the same content, the message is directly obtained from the cache to reduce repeated sending;
[0038] The bandwidth management unit is used to dynamically allocate bandwidth resources, dynamically adjust the transmission priority of different types of messages according to bandwidth usage, and give priority to the transmission of time synchronization messages.
[0039] Preferably, the multi-port PTP timing device further includes a synchronization accuracy optimization module, which is used to improve the synchronization accuracy when the network conditions are complex or there are many devices through clock deviation estimation compensation, network delay estimation compensation and synchronization strategy adjustment.
[0040] Preferably, the synchronization accuracy optimization module includes a clock deviation estimation unit, a network delay estimation unit and a synchronization strategy adjustment unit;
[0041] A clock deviation estimation unit, used for estimating the clock deviation and compensating for it;
[0042] A network delay estimation unit, used to estimate network delay and compensate for it;
[0043] The synchronization strategy adjustment unit is used to dynamically adjust the synchronization strategy according to network conditions and the number of devices.
[0044] A timing method for a multi-port PTP timing device, based on the multi-port PTP timing device, comprises:
[0045] S1. Initialization, all devices are connected to the improved multi-port PTP switch;
[0046] S2. The master time server sends synchronization messages to the multi-port PTP switch and caches and compresses them. The synchronization messages are dynamically adjusted according to the network bandwidth usage. The multi-port PTP switch broadcasts the compressed synchronization messages to all time synchronization clients.
[0047] S3. The time synchronization client sends a delay request message to the multi-port PTP switch and caches and compresses it. The multi-port PTP switch forwards the compressed delay request message to the master time server. The master time server sends a compressed delay response message to the multi-port PTP switch and caches and compresses it. The multi-port PTP switch forwards the compressed delay response message to the corresponding time synchronization client, and dynamically adjusts the frequency of sending the delay request / response message according to the network bandwidth usage;
[0048] S4. Monitor network bandwidth usage and dynamically adjust the transmission priority of different types of messages based on bandwidth usage;
[0049] S5. The time synchronization client calculates the time difference based on the timestamps of the synchronization message and the delayed response message, and adjusts the local clock to achieve time synchronization;
[0050] S6. Regularly check the status of the primary time server and automatically switch to the secondary time server when the primary time server fails;
[0051] S7. Regularly measure clock deviation and compensate for it, regularly measure network delay and compensate for it, and dynamically adjust the synchronization strategy according to network conditions and the number of devices.
[0052] It can be seen from the above technical solution that, compared with the prior art, the present invention discloses a multi-port PTP timing device, which has the following advantages:
[0053] Multi-port timing: It can provide time synchronization services for multiple devices at the same time, meeting the time synchronization requirements in complex network environments with multiple devices and multiple nodes;
[0054] Optimized synchronization accuracy: By adopting higher-precision timestamps, clock sources, and synchronization algorithms, the synchronization accuracy can be effectively improved;
[0055] Clock deviation and network delay compensation: The clock deviation estimation module and the network delay estimation module can accurately estimate and compensate for the clock deviation and network delay, further improving the synchronization accuracy.
[0056] Dynamic synchronization strategy adjustment: The synchronization strategy adjustment module can dynamically adjust the synchronization strategy according to network conditions and the number of devices, ensuring that the synchronization accuracy is not affected when the network environment changes or the number of devices increases;
[0057] Improve system reliability: It also provides a secondary time server monitoring function, which can automatically switch to the secondary time server when the primary time server fails, improving the reliability and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0059] Figure 1 A schematic diagram of a multi-port PTP timing device provided by the present invention;
[0060] Figure 2 A schematic diagram of the network interface of a multi-port PTP converter provided by the present invention;
[0061] Figure 3 A schematic diagram of a network bandwidth optimization module provided by the present invention;
[0062] Figure 4 A schematic diagram of a synchronization accuracy optimization module provided by the present invention;
[0063] Figure 5 A schematic diagram of a timing method for a multi-port PTP timing device provided by the present invention. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] The embodiment of the present invention discloses a multi-port PTP timing device, such as Figure 1 ,include:
[0066] The main time server is used to provide high-precision time information;
[0067] Auxiliary time server, used to provide time information when the primary time server fails;
[0068] Multi-port PTP switch with multiple network interfaces for connecting the primary time server, auxiliary time server and multiple time synchronization clients;
[0069] Multiple time synchronization clients are used to receive time information and perform time synchronization.
[0070] In order to further implement the above technical solution, for a multi-port PTP switch:
[0071] a. Receive synchronization messages from the master time server and broadcast the synchronization messages to all connected time synchronization clients;
[0072] b. Receive a delay request message from the time synchronization client and forward the delay request message to the primary time server;
[0073] c. Receive the delay response message from the master time server and forward the delay response message to the corresponding time synchronization client.
[0074] In this embodiment, the synchronization message includes: the source timestamp, i.e., the sending time, the follow-up timestamp, i.e., the confirmation of the sending time, and the precise time, i.e., the current time of the master time server; the purpose of the synchronization message is to let the time synchronization client know the current time of the master time server so that the client can start calculating the time difference;
[0075] The delay request message is sent by the time synchronization client to the master time server to request the master time server to send its current time; the delay request message includes a source timestamp (the time when the client sends the request). By sending the delay request message, the client requests the master time server to send its current time so that the client can calculate the round-trip time;
[0076] The delay response message is the master time server's response to the client's delay request, including the time when the master time server received the request and the time when it sent the response. The delay response message includes a receive timestamp (the time when the master time server received the delay request) and a send timestamp (the time when the master time server sent the delay response). The client uses these timestamps to calculate the round-trip time, and then subtracts half of it to get the one-way delay from the client to the master time server.
[0077] In order to further implement the above technical solution, the specific content of the time synchronization client is:
[0078] a. Receive synchronization messages and record timestamps;
[0079] b. Send a delay request message and record the sending timestamp;
[0080] c. Receive the delayed response message and record the receiving timestamp;
[0081] d. Calculate the time difference based on the timestamps of the synchronization message and the delayed response message, and adjust the local clock to achieve time synchronization.
[0082] In order to further implement the above technical solution, the multi-port PTP switch includes multiple network interfaces, such as Figure 2 , specifically physical interface, logical interface, wireless interface, optical fiber interface and virtual interface;
[0083] Physical interface, used for connecting a multi-port PTP switch to a primary time server and a secondary time server, and connecting multiple time synchronization clients through multiple physical interfaces;
[0084] Logical interfaces, which are used to create multiple logical network interfaces on a single physical interface to isolate the time synchronization traffic of different time synchronization clients;
[0085] Wireless interface, used to connect a multi-port PTP switch to a wireless time synchronization client;
[0086] Virtual interface, used to connect virtual networks and achieve time synchronization between virtual machines in a virtualized environment;
[0087] Fiber optic interface for connecting to a fiber optic network to achieve high-speed time synchronization.
[0088] In actual deployment, the configuration and use of these interfaces depend on the network architecture, time synchronization requirements, and device compatibility. The system uses the PTP protocol to ensure the time synchronization accuracy of all devices in the network. The PTP switch can manage multiple interfaces to support different types and numbers of time synchronization clients.
[0089] In a multi-port PTP timing device, the functions of multiple network interfaces include:
[0090] Scalability: allows more devices to connect to the timing system, achieving wider network coverage;
[0091] Redundancy: Provide redundant connections through multiple interfaces to improve system reliability;
[0092] Load balancing: distributes traffic among multiple interfaces to reduce the load on a single interface;
[0093] Isolation: Isolate different network segments through logical interfaces to improve network security;
[0094] Flexibility: Allows flexible configuration of timing services based on different network requirements and topologies.
[0095] In order to further implement the above technical solution, a multi-port PTP timing device also includes a server status detection and switching module, which is used to detect the status of the main time server and automatically switch to the auxiliary time server when the main time server fails.
[0096] In order to further implement the above technical solution, a multi-port PTP timing device, such as Figure 3 , also includes a network bandwidth optimization module for reducing bandwidth consumption through flow control, message compression, message caching and bandwidth management.
[0097] In order to further implement the above technical solution, the network bandwidth optimization module includes a traffic control unit, a message compression unit, a message cache unit and a bandwidth management unit;
[0098] A traffic control unit, used to dynamically adjust the sending frequency of synchronization messages and delay request / response messages according to network bandwidth usage;
[0099] A message compression unit, used to compress synchronization messages and delay request / response messages to reduce the amount of data transmission;
[0100] The message cache unit is used to cache synchronization messages and delayed request / response messages. When receiving a message request with the same content, the message is directly obtained from the cache to reduce repeated sending;
[0101] The bandwidth management unit is used to dynamically allocate bandwidth resources, dynamically adjust the transmission priority of different types of messages according to bandwidth usage, and give priority to the transmission of time synchronization messages to reduce delays and jitter.
[0102] In order to further implement the above technical solution, a multi-port PTP timing device, such as Figure 4 ,It also includes a synchronization accuracy optimization module, which is used to improve the synchronization accuracy when the network conditions are complex or there are many devices through clock deviation estimation compensation, network delay estimation compensation and synchronization strategy adjustment.
[0103] In order to further implement the above technical solution, the synchronization accuracy optimization module includes a clock deviation estimation unit, a network delay estimation unit and a synchronization strategy adjustment unit;
[0104] A clock deviation estimation unit, used for estimating the clock deviation and compensating for it;
[0105] Specifically, it includes temperature compensation and aging compensation. The frequency of the clock may change with temperature, so the temperature of the clock environment can be monitored through a temperature sensor, and the clock frequency can be adjusted according to the temperature change. Over time, the clock components may age, causing frequency drift. Through long-term monitoring and modeling, this aging can be predicted and compensated.
[0106] A network delay estimation unit, used to estimate network delay and compensate for it;
[0107] Specifically, network topology awareness provides an in-depth understanding of the physical and logical structure of the network, which helps to estimate network latency more accurately, including network mapping, topology database, path analysis, latency measurement, path selection, network simulation, machine learning, etc.
[0108] A synchronization strategy adjustment unit, used to dynamically adjust the synchronization strategy according to network conditions and the number of devices;
[0109] Specifically include: Dynamic synchronization interval: Dynamically adjust the frequency of sending synchronization messages according to network conditions and the number of devices. When the network load is low, the synchronization frequency can be increased to improve accuracy; when the load is high, the synchronization frequency can be reduced to reduce the network burden; Priority adjustment: Set high priority for time synchronization messages to ensure that they are transmitted first in the network; Redundant path: Set redundant paths in the network so that when there is a problem with the main path, you can switch to the backup path to reduce synchronization interruption; Load balancing: In the configuration of multiple master time servers, dynamically allocate clients according to the load of the server to avoid overloading a single server; Adaptive algorithm: Use adaptive algorithms (such as genetic algorithms, machine learning algorithms) to optimize synchronization strategies and automatically adjust synchronization parameters according to real-time data.
[0110] A timing method for a multi-port PTP timing device, based on a multi-port PTP timing device, such as Figure 5 ,include:
[0111] S1. Initialization, all devices are connected to the improved multi-port PTP switch;
[0112] S2. The master time server sends synchronization messages to the multi-port PTP switch and caches and compresses them. The synchronization messages are dynamically adjusted according to the network bandwidth usage. The multi-port PTP switch broadcasts the compressed synchronization messages to all time synchronization clients.
[0113] S3. The time synchronization client sends a delay request message to the multi-port PTP switch and caches and compresses it. The multi-port PTP switch forwards the compressed delay request message to the master time server. The master time server sends a compressed delay response message to the multi-port PTP switch and caches and compresses it. The multi-port PTP switch forwards the compressed delay response message to the corresponding time synchronization client, and dynamically adjusts the frequency of sending the delay request / response message according to the network bandwidth usage;
[0114] S4. Monitor network bandwidth usage and dynamically adjust the transmission priority of different types of messages based on bandwidth usage;
[0115] S5. The time synchronization client calculates the time difference based on the timestamps of the synchronization message and the delayed response message, and adjusts the local clock to achieve time synchronization;
[0116] S6. Regularly check the status of the primary time server and automatically switch to the secondary time server when the primary time server fails;
[0117] S7. Regularly measure clock deviation and compensate for it, regularly measure network delay and compensate for it, and dynamically adjust the synchronization strategy according to network conditions and the number of devices.
[0118] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0119] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A multi-port PTP timing device, characterized in that: include: The main time server is used to provide high-precision time information; Auxiliary time server, used to provide time information when the primary time server fails; Multi-port PTP switch with multiple network interfaces for connecting the primary time server, auxiliary time server and multiple time synchronization clients; Multiple time synchronization clients are used to receive time information and perform time synchronization.
2. A multi-port PTP timing device according to claim 1, characterized in that: For multi-port PTP switches: a. Receive synchronization messages from the master time server and broadcast the synchronization messages to all connected time synchronization clients; b. Receive a delay request message from the time synchronization client and forward the delay request message to the primary time server; c. Receive the delay response message from the master time server and forward the delay response message to the corresponding time synchronization client.
3. A multi-port PTP timing device according to claim 1, characterized in that: The specific contents of the time synchronization client are: a. Receive synchronization messages and record timestamps; b. Send a delay request message and record the sending timestamp; c. Receive the delayed response message and record the receiving timestamp; d. Calculate the time difference based on the timestamps of the synchronization message and the delayed response message, and adjust the local clock to achieve time synchronization.
4. A multi-port PTP timing device according to claim 1, characterized in that: The multi-port PTP switch includes multiple network interfaces, specifically physical interfaces, logical interfaces, wireless interfaces, optical fiber interfaces, and virtual interfaces; Physical interface, used for connecting a multi-port PTP switch to a primary time server and a secondary time server, and connecting multiple time synchronization clients through multiple physical interfaces; Logical interfaces, which are used to create multiple logical network interfaces on a single physical interface to isolate the time synchronization traffic of different time synchronization clients; Wireless interface, used to connect a multi-port PTP switch to a wireless time synchronization client; Virtual interface, used to connect virtual networks and achieve time synchronization between virtual machines in a virtualized environment; Fiber optic interface for connecting to a fiber optic network to achieve high-speed time synchronization.
5. A multi-port PTP timing device according to claim 1, characterized in that: It also includes a server status detection and switching module, which is used to detect the status of the main time server and automatically switch to the auxiliary time server when the main time server fails.
6. A multi-port PTP timing device according to claim 1, characterized in that: It also includes a network bandwidth optimization module for reducing bandwidth consumption through flow control, message compression, message caching and bandwidth management.
7. A multi-port PTP timing device according to claim 6, characterized in that: The network bandwidth optimization module includes a traffic control unit, a message compression unit, a message cache unit and a bandwidth management unit; A traffic control unit, used to dynamically adjust the sending frequency of synchronization messages and delay request / response messages according to network bandwidth usage; A message compression unit, used to compress synchronization messages and delay request / response messages to reduce the amount of data transmission; The message cache unit is used to cache synchronization messages and delayed request / response messages. When receiving a message request with the same content, the message is directly obtained from the cache to reduce repeated sending; The bandwidth management unit is used to dynamically allocate bandwidth resources, dynamically adjust the transmission priority of different types of messages according to bandwidth usage, and give priority to the transmission of time synchronization messages.
8. A multi-port PTP timing device according to claim 1, characterized in that: It also includes a synchronization accuracy optimization module, which is used to improve the synchronization accuracy when the network conditions are complex or there are many devices through clock deviation estimation compensation, network delay estimation compensation and synchronization strategy adjustment.
9. A multi-port PTP timing device according to claim 8, characterized in that: The synchronization accuracy optimization module includes a clock deviation estimation unit, a network delay estimation unit and a synchronization strategy adjustment unit; A clock deviation estimation unit, used for estimating the clock deviation and compensating for it; A network delay estimation unit, used to estimate network delay and compensate for it; The synchronization strategy adjustment unit is used to dynamically adjust the synchronization strategy according to network conditions and the number of devices.
10. A timing method for a multi-port PTP timing device, characterized in that: A multi-port PTP timing device according to any one of claims 1 to 9, comprising: S1. Initialization, all devices are connected to the improved multi-port PTP switch; S2. The master time server sends synchronization messages to the multi-port PTP switch and caches and compresses them. The synchronization messages are dynamically adjusted according to the network bandwidth usage. The multi-port PTP switch broadcasts the compressed synchronization messages to all time synchronization clients. S3. The time synchronization client sends a delay request message to the multi-port PTP switch and caches and compresses it. The multi-port PTP switch forwards the compressed delay request message to the master time server. The master time server sends a compressed delay response message to the multi-port PTP switch and caches and compresses it. The multi-port PTP switch forwards the compressed delay response message to the corresponding time synchronization client, and dynamically adjusts the frequency of sending the delay request / response message according to the network bandwidth usage; S4. Monitor network bandwidth usage and dynamically adjust the transmission priority of different types of messages based on bandwidth usage; S5. The time synchronization client calculates the time difference based on the timestamps of the synchronization message and the delayed response message, and adjusts the local clock to achieve time synchronization; S6. Regularly check the status of the primary time server and automatically switch to the secondary time server when the primary time server fails; S7. Regularly measure clock deviation and compensate for it, regularly measure network delay and compensate for it, and dynamically adjust the synchronization strategy according to network conditions and the number of devices.
Citation Information
Cited By
Digital clock remote metering method based on network delay suppression
CN120320891A