CN-122027538-A - Dynamic time synchronization path optimization method and system based on topology awareness
Abstract
The invention belongs to the technical field of data center networks and clock synchronization, and discloses a dynamic time synchronization path optimization method and system based on topology awareness. The invention provides a closed loop framework of state sensing, path optimization, resource guarantee and dynamic optimization, which comprises the first stage of periodically collecting network topology, link load and PTP message performance data through an SDN controller to construct a global state view, the second stage of dynamically calculating an optimal path for PTP synchronous flow through a multi-constraint optimization algorithm with the aim of minimizing transmission delay jitter, realizing deterministic transmission by combining bandwidth reservation and priority queues, and simultaneously introducing a seamless switching mechanism of 'pre-establishment and post-disassembly', and adapting to network state change in real time. The invention obviously reduces time synchronization error on the basis of multiplexing the existing hardware, improves transmission stability and dynamic adaptability, can efficiently realize microsecond time synchronization, and is suitable for high-precision business scenes.
Inventors
- LI YONGGANG
- JI RUI
- LUO WENHAO
Assignees
- 重庆擎羚科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260205
Claims (10)
- 1. The dynamic time synchronization path optimization method based on topology awareness is characterized by comprising the following steps: S1, periodically collecting link state and PTP performance data of the whole network by an SDN controller, and maintaining a topological view and a clock relationship; s2, dynamically calculating an optimal transmission path for the PTP synchronous stream by adopting a multi-constraint optimization algorithm based on the real-time network state, so as to avoid congestion and a high-jitter link; S3, the SDN controller transmits the optimized path to the switch through the flow table, and configures a high-priority queue or time-aware shaping for the PTP message to realize resource reservation; s4, continuously monitoring PTP flow performance, and triggering path recalculation and seamless switching when path performance reduction or failure is detected; S5, protocol interaction is carried out on the PTP master-slave clock on the optimized path, and nanosecond time synchronization is achieved through stable transmission delay.
- 2. The topology aware-based dynamic time synchronization path optimization method of claim 1, wherein the total network link state and PTP performance data collected in step S1 comprises: link state information, namely bandwidth utilization rate of a link, port queue depth, link packet loss rate and link inherent delay; PTP message transmission performance parameters, namely end-to-end transmission delay, delay jitter and message loss rate; Wherein the link bandwidth utilization The calculation formula of (2) is as follows: (1) In the formula, Is the current moment; Is that Time of day link Is set in Mbps; For a link Bandwidth upper limit of (2), unit Mbps; end-to-end transmission delay The calculation formula of (2) is as follows: (2) In the formula, Identifying a master clock node; identifying for the slave clock node; The sequence number is PTP message sequence number; Is that Time master clock transmission Time stamps of the PTP messages; To receive the first clock Time stamps of the PTP messages; Delay jitter The calculation formula of (2) is as follows: (3) (4) In the formula, For the period of The total number of PTP messages transmitted internally; Is the average of the periodic end-to-end transmission delays.
- 3. The method for optimizing dynamic time synchronization paths based on topology awareness as claimed in claim 2, wherein in the step S1, SDN controller periodically collects data of full network link state and PTP performance through OpenFlow 1.5 protocol interface , the data collection period is ms, topology maintenance builds a full network topology view based on port connection relation fed back by a switch and neighbor information, and the topology view is updated every S.
- 4. The method for optimizing a dynamic time synchronization path based on topology awareness of claim 3, wherein in step S2, the objective function of the multi-constraint optimization algorithm is: (5) (6) The constraint conditions are as follows: (7) In the formula, Is that Time of day link Is a unit of μs; Is that The packet loss rate of the packet loss rate is in a value range of [0,1]; is a transmission path to be selected; Is a path An upper link; Is a path Is a predicted delay jitter of (1); As the weight coefficient of the light-emitting diode, ; Is the link delay variance; Is a link utilization threshold; as the number of hops of the path P, Is the maximum allowable hop count; Is a link stability threshold; For a link Stability index at time t.
- 5. The method for optimizing a dynamic time synchronization path based on topology awareness as recited in claim 4, wherein in the step S2, the constraint problem is solved by improving Dijkstra algorithm, and the time complexity is , In order to be able to use the number of network links, Is the number of nodes.
- 6. The topology aware-based dynamic time synchronization path optimization method of claim 5, wherein in said step S3, the protocol of resource reservation is RSVP-TE protocol, and bandwidth is reserved According to 、 The calculation is carried out, and the calculation formula is as follows: (8) Wherein, the The length of a single PTP message is in bytes; the unit is Hz for the sending frequency of PTP message.
- 7. The topology aware-based dynamic time synchronization path optimization method of claim 6, wherein in said step S3, the matching fields of the flow table entry include PTP protocol type, UDP port number, and master-slave clock IP.
- 8. The topology aware-based dynamic time synchronization path optimization method of claim 7, wherein in step S4, the triggering condition for path performance degradation comprises (1) link jitter exceeding a threshold, (2) link utilization continuously exceeding a threshold, and (3) link failure or port error count increasing.
- 9. The topology awareness-based dynamic time synchronization path optimization method of claim 8, wherein in step S5, protocol interaction is performed on the optimized path by the PTP master-slave clock, and the specific content of protocol interaction is that a Sync message is sent by a master clock, and the Sync message carries a master clock hardware time stamp After receiving Sync message from clock, recording local hardware receiving time stamp Sending delay_req messages at intervals of 1ms, wherein the delay_req messages carry slave clock hardware sending time stamps The master clock receives the delay_req message and records the local hardware receiving time stamp Sending delay_resp messages at 1ms intervals Feedback to the slave clock; After receiving delay_resp message from clock, extracting Calculating link delay, clock bias, path stability and jitter compensation values; wherein the clock is biased The calculation formula of (2) is as follows: (9) In the formula, Sending a timestamp of the Sync message for the master clock; To receive the timestamp of the Sync message from the clock, To send the timestamp of the Delay Req message from the clock, Receiving a timestamp of the delay_req message for the master clock; jitter compensation value The calculation formula of (2) is as follows: (10) In the formula, Representing a scaling factor; is a path stability factor; the slave clock calibrates the local time based on the parameters, and the calibration formula is: (11) In the formula, Is the slave clock local time; The time of the slave clock after calibration is equal to or less than 1 mu s.
- 10. The topology awareness-based dynamic time synchronization path optimization system is characterized by comprising an SDN controller, network equipment, a PTP master clock and a PTP slave clock, wherein the SDN controller is used for executing the method of any one of claims 1-9 to realize network state awareness, path computation optimization, path deployment, performance monitoring and path adjustment; The network equipment is a switch supporting the OpenFlow 1.5 protocol, has a multi-priority queue and hardware time stamp function, and is used for forwarding PTP messages and feeding back network state data; the PTP master clock adopts GPS DISCIPLINED oscillasters, and the time precision is less than or equal to 10ns; The PTP slave clock integrates a PTP protocol stack and is used for receiving a PTP message and calibrating local time.
Description
Dynamic time synchronization path optimization method and system based on topology awareness Technical Field The invention belongs to the technical field of data center networks and clock synchronization, and particularly relates to a dynamic time synchronization path optimization method and system based on topology awareness. Background With the rapid development of cloud computing, big data and distributed artificial intelligence, the scale of a data center is continuously enlarged, and the distributed application provides extremely high requirements on time synchronization precision among nodes. Precision Time Protocol (PTP) is the mainstream protocol for realizing high-precision time synchronization in the current data center, but its synchronization precision is greatly affected by network transmission delay and jitter. Data center networks typically employ multiple layers of fixed topologies, such as Fat-Tree, clos, etc., to improve bandwidth utilization through load balancing and multipath techniques. However, there is a large amount of background traffic and bursty traffic in the network, which can compete with PTP messages for network resources, causing PTP messages to experience unpredictable queuing delays and jitter, thereby severely degrading clock synchronization accuracy. Such unpredictable delay jitter is unacceptable, especially for applications requiring certainty (e.g., financial transactions, industrial control). In the prior art, the method for improving the PTP synchronization precision mainly has the following limitations that (1) the hardware timestamp can reduce the processing delay of a terminal, but can not eliminate the queuing delay caused by network congestion. (2) Priority queues-high priority may be allocated for PTP messages, but queuing delay still occurs when multiple high priority flows compete for the same port. (3) Static path configuration, namely, a special path is designated for PTP messages, but the special path cannot adapt to network state change, and flexibility is lacking. (4) Time sensitive network technology, while providing deterministic delay guarantees, requires full network equipment to support the TSN standard, is costly to deploy, and is still challenging to fully deploy in large-scale data centers. Therefore, a time synchronization optimization scheme capable of dynamically adapting to network state changes and effectively isolating synchronous traffic from traffic interference on the existing data center infrastructure is needed to achieve high-precision and deterministic clock synchronization. Disclosure of Invention The invention aims to solve the technical problems of dynamically selecting an optimal transmission path for a time synchronization message and guaranteeing the certainty of the transmission of the time synchronization message under the background of the coexistence of the static topology and the multi-service flow of the existing data center, thereby obviously reducing the synchronization error and improving the time synchronization precision of the whole network. In order to solve the technical problems, the invention provides a dynamic time synchronization path optimization method and system based on topology awareness. The method has the core ideas that the centralized control capability of a software defined network is utilized, the network topology state and the link load are perceived in real time, the low-delay and low-jitter optimization path is dynamically calculated and issued for the time synchronous message, and meanwhile, the resource reservation or isolation is carried out on the synchronous message through the traffic engineering technology, so that the deterministic transmission guarantee is provided for synchronous traffic in a shared data center network. A dynamic time synchronization path optimization method based on topology awareness comprises the following steps: S1, periodically collecting link state and PTP performance data of the whole network by an SDN controller, and maintaining a topological view and a clock relationship; s2, dynamically calculating an optimal transmission path for the PTP synchronous stream by adopting a multi-constraint optimization algorithm based on the real-time network state, so as to avoid congestion and a high-jitter link; S3, the SDN controller transmits the optimized path to the switch through the flow table, and configures a high-priority queue or time-aware shaping for the PTP message to realize resource reservation; s4, continuously monitoring PTP flow performance, and triggering path recalculation and seamless switching when path performance reduction or failure is detected; S5, protocol interaction is carried out on the PTP master-slave clock on the optimized path, and nanosecond time synchronization is achieved through stable transmission delay. Further, the whole network link state and PTP performance data collected in step S1 includes: link state information, namely bandwidth