Method for calculating network delay between board cards
By recording and calculating the timestamps during the step period between the calculation boards and cards, the problem of calculating the network delay between the boards and cards is solved, real-time calculation of delays in both positive and negative directions and guaranteeing pace consistency.
Patent Information
- Application Number
- CN202411485553.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the security computing platform in the field of railway signals, the problem of network delay between calculation boards affects the consistency of the program. It is difficult for the existing technology to effectively consider network delays in both positive and negative directions and calculate in real time in each step cycle. .
By sending a notification message to the board n-1 in the same synchronization cycle, the board n-1 sends a notification message to the board n-1 and records the corresponding timestamp; the board n sends a notification feedback message to the board n-1 and records the corresponding timestamp; These timestamps perform network delay calculations, and use specific formulas to calculate network delay.
The network delay in both positive and negative directions is fully considered, and it can be calculated in real time in each step cycle, achieving the pace consistency of multiple computer board programs.
Smart Images

Figure CN119440980A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for calculating network delay between boards. Background Art
[0002] In the field of railway signaling, the safety computing platform mostly adopts the safety platform of two-out-of-two or three-out-of-two mechanism. In these safety platforms, the programs in multiple computer boards need to keep pace. When implementing the synchronization function, some data is realized by network communication. As long as there is a network, there will be delay, so the synchronization function must consider the impact of network delay.
[0003] Therefore, a method for calculating the network delay between boards is provided. Summary of the invention
[0004] The purpose of the present invention is to overcome the existing defects and provide a method for calculating the network delay between boards, which fully considers the network delay in both positive and negative directions and can be calculated in real time in each pacing cycle.
[0005] The technical solution to achieve the above purpose is:
[0006] A method for calculating network delay between boards, in the same pacing cycle, calculating network delay of board n, comprising:
[0007] Step S1: Board n-1 sends a message containing T n-1_1 Notification message to board n;
[0008] Step S2: After receiving the notification message from board n-1, board n records T n-1_1 and T n_1 ;
[0009] Step S3: Board n sends a message containing T n_2 The notification feedback message is sent to board n-1;
[0010] Step S4: After receiving the notification feedback message from board n, board n-1 records T n_2 and T n-1_2 ;
[0011] Step S5: Board n-1 sends a message containing T n-1_2 and T n-1_3 The notification feedback message is sent to the board n;
[0012] Step S6: After receiving the notification feedback message from board n-1, board n records T n-1_2 , T n-1_3 and T n_3 ;
[0013] Step S7, calculating the network delay according to the recorded basic data.
[0014] Preferably, in step S1, T n-1_1 The time when the notification message is sent to board n-1.
[0015] Preferably, in step S2, T n_1 The time when board n receives the notification message.
[0016] Preferably, in step S3, T n_2 The time when the notification feedback message is sent to board n.
[0017] Preferably, in step S4, T n-1_2 The time when board n-1 receives the notification feedback message.
[0018] Preferably, in step S5, T n-1_3 The time when the notification feedback is sent to board n-1.
[0019] Preferably, in step S6, T n_3 The time when board n receives the notification feedback.
[0020] Preferably, in step S7, the basic data includes: n_1 、T n_2 、T n_3 、T n-1_1 、T n-1_2 and T n-1_3 .
[0021] Preferably, in step S7, the formula for calculating the network delay is as follows:
[0022] T nd =((T n-1_2 -T n-1_1 –(T n_2 -T n_1 )) / 2+(T n_3 -T n_2 –(T n-1_3 -T n-1_2 )) / 2) / 2.
[0023] The beneficial effect of the present invention is that the present invention sends a signal including T via board n-1. n-1_1 After receiving the notification message from board n-1, board n records T n-1_1 and T n_1 ; Board n sends a message containing T n_2 The notification feedback message is sent to the board n-1; after receiving the notification feedback message from the board n, the board n-1 records T n_2 and T n-1_2 ; Board n-1 sends a message containing Tn-1_2 and T n-1_3 The notification feedback message is sent to the board n; after receiving the notification feedback message from the board n-1, the board n records T n-1_2 , T n-1_3 and T n_3 It fully considers the network delay in both the forward and reverse directions, and can calculate in real time in each pacing cycle, thereby ensuring that the programs of multiple computer boards remain in sync. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a process of a method for calculating network delay between boards of the present invention;
[0025] Figure 2 This is a flow chart of the board n obtaining basic data of network delay in the present invention. DETAILED DESCRIPTION
[0026] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. In the description of the present invention, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0027] The present invention will be further described below in conjunction with the accompanying drawings.
[0028] like Figure 1 , 2 As shown, a method for calculating the network delay between boards, in the same pacing cycle, calculating the network delay of board n, includes:
[0029] Step S1: Board n-1 sends a message containing T n-1_1 The notification message is sent to board n.
[0030] In the embodiment, T n-1_1 The time when the notification message is sent to board n-1.
[0031] Step S2: After receiving the notification message from board n-1, board n records T n-1_1 and T n_1 .
[0032] In the embodiment, T n_1 The time when board n receives the notification message.
[0033] Step S3: Board n sends a message containing T n_2 The notification feedback message is sent to board n-1.
[0034] In the embodiment, T n_2 The time when the notification feedback message is sent to board n.
[0035] Step S4: After receiving the notification feedback message from board n, board n-1 records T n_2 and T n-1_2 .
[0036] In the embodiment, T n-1_2 The time when board n-1 receives the notification feedback message.
[0037] Step S5: Board n-1 sends a message containing T n-1_2 and T n-1_3 The notification feedback message is given to board n.
[0038] In the embodiment, T n-1_3 The time when the notification feedback is sent to board n-1.
[0039] Step S6: After receiving the notification feedback message from board n-1, board n records T n-1_2 、T n-1_3 and T n_3 .
[0040] In the embodiment, T n_3 The time when board n receives the notification feedback.
[0041] Step S7, calculating the network delay according to the recorded basic data.
[0042] In the embodiment, the basic data includes: T n_1 、T n_2 、T n_3 、T n-1_1 、T n-1_2 and T n-1_3 .
[0043] In the embodiment, the formula for calculating the network delay is as follows:
[0044] T nd =((T n-1_2 -T n-1_1 –(T n_2 -T n_1 )) / 2+(T n_3 -T n_2 –(T n-1_3 -T n-1_2 )) / 2) / 2.
[0045] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some or all of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for calculating network delay between boards, characterized in that: In the same pacing cycle, the network delay of board n is calculated, including: Step S1: Board n-1 sends a message containing T n-1_1 Notification message to board n; Step S2: After receiving the notification message from board n-1, board n records T n-1_1 and T n_1 ; Step S3: Board n sends a message containing T n_2 The notification feedback message is sent to board n-1; Step S4: After receiving the notification feedback message from board n, board n-1 records T n_2 and T n-1_2 ; Step S5: Board n-1 sends a message containing T n-1_2 and T n-1_3 The notification feedback message is sent to the board n; Step S6: After receiving the notification feedback message from board n-1, board n records T n-1_2 、T n-1_3 and T n_3 ; Step S7, calculating the network delay according to the recorded basic data.
2. A method for calculating inter-board network delay according to claim 1, characterized in that: In step S1, T n-1_1 The time when the notification message is sent to board n-1.
3. The method for calculating the network delay between boards according to claim 1, characterized in that: In step S2, T n_1 The time when board n receives the notification message.
4. The method for calculating the network delay between boards according to claim 1, characterized in that: In step S3, T n_2 The time when the notification feedback message is sent to board n.
5. The method for calculating inter-board network delay according to claim 1, characterized in that: In step S4, T n-1_2 The time when board n-1 receives the notification feedback message.
6. The method for calculating inter-board network delay according to claim 1, characterized in that: In step S5, T n-1_3 The time when the notification feedback is sent to board n-1.
7. The method for calculating inter-board network delay according to claim 1, characterized in that: In step S6, T n_3 The time when board n receives the notification feedback.
8. The method for calculating inter-board network delay according to claim 1, characterized in that: In step S7, the basic data includes: n_1 、T n_2 、T n_3 、T n-1_1 、T n-1_2 and T n-1_3 .
9. The method for calculating the network delay between boards according to claim 1, characterized in that: In step S7, the formula for calculating the network delay is as follows: T nd =((T n-1_2 -T n-1_1 –(T n_2 -T n_1 )) / 2+(T n_3 -T n_2 –(T n-1_3 -T n-1_2 )) / 2) / 2。
Citation Information
Patent Citations
Clock synchronization method and device
CN108988972A
Method and apparatus for obtaining network delay and computer storage medium
CN108989152A
Network delay measurement method and device, equipment and medium
CN110890997A
ONU, method for adjusting PTP time information output by ONU and application
CN113489562A
Round-trip delay measurement method, round-trip delay measurement system and storage medium
CN113923140A