Method and device for calibrating time in redundant network

By calculating and selecting the time difference and delay time difference on the transmission path in the redundant network, and dynamically adjusting the target path, the problem of stability and accuracy of timing path selection in the redundant network is solved, and time synchronization is achieved. Efficiency and stability.

CN113556221BActive Publication Date: 2024-10-29SIEMENS AG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010328268.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-23
Publication Date
2024-10-29
Estimated Expiration
2040-04-23

AI Technical Summary

Technical Problem

In a redundant network, how to select a timing path among multiple transmission paths to achieve time synchronization, especially when all paths are not faulty, to ensure the stability and accuracy of network transmission.

Method used

By obtaining target packet information on multiple transmission paths every preset period, calculating the time difference and delay time difference on each path, and selecting the smallest time difference or delay time difference as the target path, so that The receiving end transmits the time message according to this path to calibrate the time, and maintains the current path under certain conditions to ensure stability.

Benefits of technology

Dynamically adjust the target path to ensure the accuracy and stability of time synchronization, reduce network burden, improve the real-time and accuracy of time adjustment, and ensure the normal operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113556221B_ABST
    Figure CN113556221B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for calibrating time in a redundant network. A redundant network includes a sending end and a receiving end, the sending end is used to send a target message, and the receiving end is used to receive the target message sent by the sending end, and there are multiple transmission paths between the sending end and the receiving end. The method comprises: obtaining target information of each target message transmitted through multiple measured paths every preset period, and the measured paths belong to multiple transmission paths; according to each target information, determining a target path from the measured paths, so that the receiving end performs time calibration according to at least one calibration message transmitted by the target path, and the sending time of the calibration message from the sending end is later than the time when the target path is determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of electric power systems, and in particular to a method and device for calibrating time in a redundant network. Background Art

[0002] In the power system network, there are real-time requirements for the network, and the network is not allowed to fail. Once a failure occurs, it will bring huge economic losses. However, the network involves many links, such as lines, basebands, telecommunications equipment, etc., all of which may have problems. If any link has a problem, the entire network transmission operation will stop. Therefore, users should be provided with a redundant network, which is called a redundant network.

[0003] like Figure 1 As shown in FIG. 1 , a schematic diagram of a redundant network structure is shown. There are multiple transmission paths ( Figure 1 Only three transmission paths are shown in the figure, and each transmission path has multiple forwarding terminals 13. In this way, even if one of the transmission paths fails, other transmission paths can be used to transmit the message. However, the problem that follows is how to select a synchronization message of a transmission path from multiple transmission paths for time synchronization when none of the transmission paths fails. Summary of the invention

[0004] In view of this, the present invention proposes a method for calibrating time in a redundant network, wherein the redundant network includes a sending end, a receiving end, and multiple transmission paths between the sending end and the receiving end, each transmission path can transmit at least one target message, and the method includes:

[0005] At every preset period, target information of each target message transmitted through a plurality of measured paths is obtained, wherein the measured paths belong to the plurality of transmission paths;

[0006] According to each of the target information, a target path is determined from the measured paths, so that the receiving end performs time synchronization according to a synchronization message transmitted by the target path, and the transmission time of the synchronization message from the transmitting end is later than the time when the target path is determined.

[0007] According to the method as described above, optionally,

[0008] The target information of each target message transmitted through multiple paths under test is obtained, including:

[0009] Obtaining a sending time when a target message on each measured path is sent from the sending end and a receiving time when the target message arrives at the receiving end;

[0010] Determining a target path from the measured paths according to each of the target information includes:

[0011] Obtain the time difference between the receiving time and the sending time corresponding to each group;

[0012] A minimum time difference is selected from each time difference, and the measured path corresponding to the minimum time difference is used as the target path.

[0013] According to the method as described above, optionally, after selecting a minimum time difference from the time differences and before taking the measured path corresponding to the minimum time difference as the target path, the method further includes:

[0014] If the absolute value of the difference between the minimum time difference and the time difference corresponding to the current target path is less than or equal to a first preset threshold, the current target path is maintained.

[0015] According to the method as described above, optionally,

[0016] The target information of each target message transmitted through multiple paths under test is obtained, including:

[0017] Obtaining the sum of delay time differences of the target message on each measured path, wherein the sum of delay time differences is the sum of all delay time differences of a single measured path, wherein the delay time difference is the difference between the delay times corresponding to the two adjacent ends, each of which is the transmission time of the target message between the two adjacent ends, and the delay time corresponding to each end is obtained according to the target message sent by the end;

[0018] Determining a target path from the measured paths according to each of the target information includes:

[0019] A minimum delay time difference sum is selected from each of the delay time difference sums, and the measured path corresponding to the minimum delay time difference sum is used as the target path.

[0020] According to the method as described above, optionally, after selecting a minimum delay time difference sum from the delay time difference sums and before taking the measured path corresponding to the minimum delay time difference sum as the target path, it also includes:

[0021] If the absolute value of the difference between the minimum delay time difference sum and the delay time difference sum corresponding to the current target path is less than a second preset threshold value, the current target path is maintained.

[0022] According to the method as described above, optionally,

[0023] The target information of each target message transmitted through multiple paths under test is obtained, including:

[0024] Obtaining a sending time when a target message on each of the measured paths is sent from the sending end and a receiving time when the target message arrives at the receiving end;

[0025] Determining a target path from the measured paths according to each of the target information includes:

[0026] Obtaining the time difference between the receiving time and the sending time corresponding to each group, and obtaining the sum of the delay time differences of each target message on each measured path, wherein the sum of the delay time differences is the sum of all delay time differences on a single measured path, and the delay time difference is the difference between the delay times corresponding to the two adjacent ends, each of which is the transmission time of the target message between the two adjacent ends, and the delay time corresponding to each end is obtained according to the target message sent by the end;

[0027] Selecting a minimum time difference value from each time difference value, and selecting a minimum delay time difference sum from each delay time difference sum;

[0028] If the measured paths corresponding to the smallest time difference value and the smallest sum of delay time differences are the same measured path, the same measured path is used as the target path.

[0029] According to the method as described above, optionally, it is characterized in that each transmission path has n+1 forwarding ends, (n+1) is an integer and (n+1)≥0, then obtaining the sum of the delay time differences of a target message on each measured path includes:

[0030] The total delay time difference is determined using the following formula:

[0031]

[0032] Among them, 0≤i≤n+1, Δt PathDelay (i)=|t PathDelay (i) -t′ PathDelay (i)|,Δt PathDelay (i) represents the delay time difference corresponding to the i-th end, t PathDelay (i) represents the delay time between the target message sent from the i-th end and the i-th end, t′ PathDelay (i) represents the delay time of the target message sent from the i+1th end between the i+1th end and the i-th end, the sending end is the 0th end, the receiving end is the n+2th end, and the forwarding ends are arranged in sequence from the 1st end to the n+1th end.

[0033] According to the method described above, optionally, each t PathDelay (i) and t′ PathDelay (i) The following formula is used to obtain:

[0034]

[0035]

[0036] Among them, t 1 (i) is the time when a target message is sent at the i-th end, t 4 (i) is the time at which the first response message is received at the i-th end, the first response message corresponding to the target message sent by the i-th end, t 3 (i+1) is the sending time of the first response message from the adjacent i+1th end, t 2 (i+1) is the time when the target message sent by the i-th terminal arrives at the i+1-th terminal;

[0037] t 1 ′(i+1) is the sending time of a target message at the i+1th end, t 4 '(i+1) is the time when the i+1th end receives the second response message, the second response message corresponds to the target message sent by the i+1th end, t 3 ′(i) is the sending time of the second response message at the i-th end, t 2 ′(i) is the reception time when the target message sent by the i+1th end arrives at the ith end.

[0038] According to the method described above, optionally, if the measured paths corresponding to the smallest time difference value and the smallest sum of delay time differences are not the same measured path, the current target path is maintained.

[0039] According to the method as described above, optionally, it also includes:

[0040] If the target path is selected for the first time, the target path is determined in one of the following ways;

[0041] Method 1: randomly selecting one of the measured paths corresponding to the smallest time difference value and the smallest sum of delay time differences as the target path;

[0042] Method 2: taking the measured path corresponding to the smallest time difference as the target path;

[0043] Method three: taking the measured path corresponding to the minimum total delay time difference as the target path.

[0044] The present invention also provides a device for calibrating time in a redundant network, wherein the redundant network includes a transmitting end, a receiving end, and a plurality of transmission paths between the transmitting end and the receiving end, each transmission path can transmit at least one target message, and the device includes:

[0045] an acquisition unit, configured to acquire target information of each target message transmitted through a plurality of measured paths at every preset period, wherein the measured paths belong to the plurality of transmission paths;

[0046] A determination unit is used to determine a target path from the measured paths according to each of the target information, so that the receiving end performs time calibration according to a calibration message transmitted by the target path, and the sending time of the calibration message from the sending end is later than the time when the target path is determined.

[0047] According to the device as described above, optionally,

[0048] The acquisition unit is specifically used to: acquire a sending time when a target message on each measured path is sent from the sending end and a receiving time when the target message arrives at the receiving end;

[0049] The determining unit is specifically used for:

[0050] Obtain the time difference between the receiving time and the sending time corresponding to each group;

[0051] A minimum time difference is selected from each time difference, and the measured path corresponding to the minimum time difference is used as the target path.

[0052] According to the above device, optionally, the determining unit is further configured to:

[0053] If the absolute value of the difference between the minimum time difference and the time difference corresponding to the current target path is less than or equal to a first preset threshold, the current target path is maintained.

[0054] According to the device as described above, optionally,

[0055] The acquisition unit is specifically used for:

[0056] Obtaining the sum of delay time differences of the target message on each measured path, wherein the sum of delay time differences is the sum of all delay time differences of a single measured path, wherein the delay time difference is the difference between the delay times corresponding to the two adjacent ends, each of which is the transmission time of the target message between the two adjacent ends, and the delay time corresponding to each end is obtained according to the target message sent by the end;

[0057] The determining unit is specifically used for:

[0058] A minimum delay time difference sum is selected from each of the delay time difference sums, and the measured path corresponding to the minimum delay time difference sum is used as the target path.

[0059] According to the above device, optionally, the determining unit is further configured to:

[0060] If the absolute value of the difference between the minimum delay time difference sum and the delay time difference sum corresponding to the current target path is less than a second preset threshold value, the current target path is maintained.

[0061] According to the device as described above, optionally,

[0062] The acquisition unit is specifically used to: acquire a sending time when a target message on each of the measured paths is sent from the sending end and a receiving time when the target message arrives at the receiving end;

[0063] The determining unit is specifically used for:

[0064] Obtaining the time difference between the receiving time and the sending time corresponding to each group, and obtaining the sum of the delay time differences of each target message on each measured path, wherein the sum of the delay time differences is the sum of all delay time differences on a single measured path, and the delay time difference is the difference between the delay times corresponding to the two adjacent ends, each of which is the transmission time of the target message between the two adjacent ends, and the delay time corresponding to each end is obtained according to the target message sent by the end;

[0065] Selecting a minimum time difference value from each time difference value, and selecting a minimum delay time difference sum from each delay time difference sum;

[0066] If the measured paths corresponding to the smallest time difference value and the smallest sum of delay time differences are the same measured path, the same measured path is used as the target path.

[0067] According to the above device, optionally, the acquisition unit is specifically used for:

[0068] The total delay time difference is determined using the following formula:

[0069]

[0070] Among them, 0≤i≤n+1, Δt PathDelay (i)=|t PathDelay (i) -t′ PathDelay (i)|,Δt PathDelay (i) represents the delay time difference corresponding to the i-th end, tPathDelay (i) represents the delay time between the target message sent from the i-th end and the i-th end, t′ PathDelay (i) represents the delay time of the target message sent from the i+1th end between the i+1th end and the ith end, the sending end is the 0th end, the receiving end is the n+2th end, and the forwarding ends are arranged in sequence from the 1st end to the n+1th end;

[0071] Each t PathDelay (i) and t′ PathDelay (i) The following formula is used to obtain:

[0072]

[0073]

[0074] Among them, t 1 (i) is the time when a target message is sent at the i-th end, t 4 (i) is the time at which the first response message is received at the i-th end, the first response message corresponding to the target message sent by the i-th end, t 3 (i+1) is the sending time of the first response message from the adjacent i+1th end, t 2 (i+1) is the time when the target message sent by the i-th terminal arrives at the i+1-th terminal;

[0075] t 1 ′(i+1) is the sending time of a target message at the i+1th end, t 4 '(i+1) is the time when the i+1th end receives the second response message, the second response message corresponds to the target message sent by the i+1th end, t 3 ′(i) is the sending time of the second response message at the i-th end, t 2 ′(i) is the reception time when the target message sent by the i+1th end arrives at the ith end.

[0076] According to the above device, optionally, the determining unit is further configured to:

[0077] If the measured paths corresponding to the smallest time difference value and the smallest delay time difference sum are not the same measured path, the current target path is maintained.

[0078] The present invention also provides a device for calibrating time in a redundant network, wherein the redundant network includes a transmitting end, a receiving end, and a plurality of transmission paths between the transmitting end and the receiving end, each transmission path can transmit at least one target message, and the device includes:

[0079] at least one memory for storing instructions;

[0080] At least one processor is configured to execute the method for calibrating time in a redundant network according to any one of the above items according to the instructions stored in the memory.

[0081] The present invention further provides a readable storage medium, wherein the readable storage medium stores machine-readable instructions. When the machine-readable instructions are executed by a machine, the machine executes the method for calibrating time in a redundant network as described in any one of the above items. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings so that the above and other features and advantages of the present invention will be more apparent to those skilled in the art. In the accompanying drawings:

[0083] Figure 1 A schematic diagram of the structure of a redundant network.

[0084] Figure 2A The figure is a schematic diagram of various information of a message transmitted on a single transmission path according to an embodiment of the present invention.

[0085] Figure 2B The figure is a schematic diagram of the delay time of a message on a single transmission path according to an embodiment of the present invention.

[0086] Figure 3 The figure is a flow chart of a method for calibrating time in a redundant network according to an embodiment of the present invention.

[0087] Figure 4 FIG. 4 is a flow chart of a method for calibrating time in a redundant network according to another embodiment of the present invention.

[0088] Figure 5 The figure is a flow chart of a method for calibrating time in a redundant network according to yet another embodiment of the present invention.

[0089] Figure 6 FIG. 4 is a flow chart of a method for calibrating time in a redundant network according to another embodiment of the present invention.

[0090] Figure 7 Schematic diagram of the structure of a time calibration device in a redundant network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0091] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail with reference to the following embodiments.

[0092] For a redundant network, which includes multiple transmission paths, the inventors have considered multiple factors on how to select the best transmission path among the multiple transmission paths, one of which is the accuracy of time synchronization, and the other is the accuracy of delay time calculation for message transmission. These two factors can be considered separately or in combination. Each transmission path may include n+1 forwarding ends, where (n+1)≥0 and (n+1) is an integer. As an exemplary illustration, Figure 1 As shown, each transmission path in the present invention includes at least one forwarding end. In the present invention, the sending end 11 includes a master clock 101 (Master Clock), the receiving end 12 includes a slave clock 102 (Slave Clock), and the forwarding end 13 includes an intermediate clock 103. The message will record the sending time of the message sent by the sending end.

[0093] like Figure 2A As shown, it is the transmission process of a message in a transmission path, and the vertical line represents time. At the sending end 11, the timestamp of the sending moment of the message is T1, and the timestamp of the receiving moment of the message at the receiving end 12 is T2. There are n+1 forwarding ends 13, which are arranged in the order of message transmission, the first, the second, ... the n+1th. The transmission time of the message between the two adjacent ends is the delay time, and the residence time of the message at different ends is the residence time, which is equal to the time difference between the end forwarding the message and receiving the message. That is, for each transmission path of the present invention, it has the same sending end and receiving end. Of course, there may be no forwarding end on the transmission path, that is, there is only one sending end and one receiving end.

[0094] Embodiment 1

[0095] This embodiment provides a method for calibrating time in a redundant network. The executor of the method is a device for calibrating time in a redundant network. The device can be located in a relay protection device, specifically a slave clock 102 (SlaveClock) in the relay protection device, or other separate devices, which will not be described in detail here.

[0096] like Figure 3 FIG. 1 is a flow chart of a method for calibrating time in a redundant network according to this embodiment. The method includes:

[0097] Step 301: Obtain target information of each target message transmitted through multiple tested paths at every preset period.

[0098] In a redundant network, various messages are transmitted on each transmission path, and the target information of the corresponding message can be selected according to actual needs. For example, receiving calibration messages, actively sending management messages to obtain reply information, etc. How to transmit the message can be based on the relevant provisions of the protocol. The device selects the messages transmitted on multiple tested paths according to actual needs. Of course, for a single transmission path, the device can select one target message or multiple target messages to be transmitted. For multiple target messages, each target message can be of a different type.

[0099] The measured paths belong to the transmission paths. The multiple measured paths can be all transmission paths or part of transmission paths, which can be selected according to actual needs.

[0100] The preset period in this step can be determined according to actual needs, for example, 1 second.

[0101] When each preset period arrives, the device can actively obtain the target information of each target message, and can also receive the target information of the target message sent by other devices, which will not be repeated here.

[0102] Step 302, according to each target information, a target path is determined from the measured paths, so that the receiving end performs time calibration according to a calibration message transmitted by the target path, and the transmission time of the calibration message is later than the time of determining the target path.

[0103] The synchronization message of this embodiment is a message used for synchronization on the network to synchronize the time of the sending end and the receiving end. Of course, the target message required can be a synchronization message. The definition of the synchronization message and the method of synchronizing the time according to the synchronization message are introduced in the communication standard, such as the protocol IEEE Std 1588 TM -2008. It should be noted that, in fact, the calibration message is sent at a certain period, for example, once per second.

[0104] There are many ways to determine the target path based on the target information. For example, it can be determined based on the transmission time of the target message at the sending end and the receiving end, or it can be determined based on the delay time when the target message is transmitted at each end, and the details will not be repeated. After determining the target path, the receiving end 12 can know the target path, for example, it is sent to it by the device that determines the target path or it is determined by itself. Next, the receiving end 12 can calibrate the time according to the message obtained on the target path. Since the period for adjusting the target path is a preset period, the receiving end 12 can use the calibration message on the target path determined by the above method to calibrate the time before determining the new target path.

[0105] In the present invention, target information of target messages on multiple measured paths is obtained at every preset period, and a target path is selected from the measured paths according to the target information, and then the slave clock is gradually synchronized with the master clock through the message on the target path. By dynamically adjusting the target path in this way, the real-time performance of selecting the best path for time calibration can be guaranteed as much as possible, and then the synchronization of the slave clock with the master clock can be guaranteed as much as possible.

[0106] Embodiment 2

[0107] This embodiment further supplements the method for synchronizing time in a redundant network in Embodiment 1. In this embodiment, the accuracy of time synchronization between the sending end 11 and the receiving end 12 is mainly considered.

[0108] like Figure 2A As shown in the figure, for a message on a transmission path, the total delay time is:

[0109]

[0110] Among them, 0≤i≤n+1, t PathDelay (i) represents the delay time of the message between the i+1th end and the ith end. It should be understood that when i=0, it represents the delay time of the message between the first forwarding end 13 and the sending end 11, and when i=n+1, it represents the delay time of the message between the receiving end 12 and the n+1th forwarding end 13. The time the message stays at the i-th forwarding end 13 is recorded as t Residence (i) Thus, the total residence time of a message on a single transmission path is

[0111] Among them, 0≤i≤n+1, t PathDelay (i) represents the delay time of the message between the i+1th end and the ith end. It should be understood that when i=0, it represents the delay time of the message between the first forwarding end 13 and the sending end 11, and when i=n+1, it represents the delay time of the message between the receiving end 12 and the n+1th forwarding end 13. The time the message stays at the i-th forwarding end 13 is recorded as t Residence (i) Thus, the total residence time of a message on a single transmission path is

[0112] Thus, the deviation ofm between the clock of the receiving end 12 and the clock of the transmitting end 11 is:

[0113]

[0114] In the time synchronization process described by this formula, there are two factors that affect the deviation between the master clock 101 and the slave clock 102. One factor is the inaccuracy of the timestamp of each clock itself, and the other factor is the deviation of the frequency between the clocks, that is, the frequency difference. As for the factor of the inaccuracy of the timestamp of each clock itself, each transmission path is the same. In this way, for a transmission path, the time deviation e1 between the master clock 101 and the slave clock 102 can be determined by the deviation of the frequency of each clock on the transmission path. Assuming e1 = k f (T 2 -T 1 ), where k f is the average frequency difference of each clock on a transmission path, which is caused by physical properties (clock oscillation). The frequency difference here refers to the frequency difference between other clocks and the main clock. f The difference is small, so e1 is mainly related to T 2 -T 1 According to T 2 With T 1 The difference between the two determines the minimum e1 value. That is, if the T of a transmission path 2 -T 1 If the value is the smallest, it means that the clock deviation between the master clock 101 and the slave clock 102 is the smallest, and the receiving end 12 can perform time synchronization according to the synchronization message sent on the transmission path. How to perform time synchronization according to the synchronization message belongs to the prior art.

[0115] Therefore, the method for synchronizing target messages in a redundant network of this embodiment includes:

[0116] Step 401, every preset period, obtain a sending time of a target message on each measured path from the sending end and a receiving time of a target message arriving at the receiving end, and there are multiple measured paths.

[0117] The target message of this embodiment can be a message that needs to be transmitted in the redundant network itself, or a specific message sent for selecting a transmission path, and is not specifically limited. For example, the target message can be a calibration message, and the target information is, for example, the time when the calibration message is sent from the sending end 11 and the time when the receiving end 12 receives the calibration message.

[0118] The target message may be each target message within a certain time period. For example, if the calibration message is sent once every 1 second on each transmission path, the calibration message on each transmission path within this 1 second can be obtained. In practice, the sending end 11 can send a calibration message on each transmission path at the same time, so the target information of these calibration messages sent simultaneously can be obtained. The target information includes, for example, the sending time 11 of the calibration message and the receiving times when the calibration message arrives at the receiving end 12.

[0119] The sending end 11 determines the sending time of the multiple target messages to be sent. Specifically, the sending end 11 determines the sending time according to the built-in master clock 101 and writes the sending time into the target message. How to write the target message belongs to the prior art and will not be described in detail here. The sending end 11 can actively send each sending time to the device for calibrating the time in the redundant network, which will not be described in detail.

[0120] Similarly, the receiving end 12 can determine the receiving time when the receiving end 12 receives the target message according to the built-in slave clock 102. Specifically, the number of paths to be tested can be selected according to actual needs, for example, all transmission paths can be selected. The receiving end 12 can actively send each receiving time to the device for calibrating the target message in the redundant network, or the device can obtain each receiving time from the receiving end 12, which will not be described in detail. Of course, if the receiving end 12 performs the operation of selecting the path, it does not need to send it to other devices.

[0121] Each receiving time corresponds to a sending time, that is, a target message has a receiving time and a sending time, which are a set of corresponding receiving time and sending time. In this embodiment, each measured path corresponds to a target information, which includes a sending time and a receiving time as a set.

[0122] This step 401 indicates that the operation of obtaining the target information of each target message transmitted by the multiple tested paths is triggered every preset period. The preset period can be determined according to actual needs, for example, consistent with the period of obtaining the target message, or can be determined according to actual needs, for example, 1 minute. The preset period is also the period of adjusting the target path. Appropriately selecting the frequency of adjusting the target path can reduce the burden on the network.

[0123] Step 402, obtaining the time difference between the receiving time and the sending time corresponding to each group.

[0124] Each target message corresponds to a sending time at the sending end 11 and a receiving time at the receiving end 12. By subtracting the sending time from the receiving time, the time difference corresponding to each target message can be obtained.

[0125] Step 403, selecting a minimum time difference from each time difference, and taking the measured path corresponding to the minimum time difference as the target path, so that the receiving end performs time synchronization according to at least one synchronization message transmitted by the target path.

[0126] Optionally, after selecting the smallest time difference from each time difference, and before taking the measured path corresponding to the smallest time difference as the target path, it also includes: if the absolute value of the difference between the smallest time difference and the time difference corresponding to the current target path is less than or equal to a first preset threshold value, then the current target path is maintained. Assuming that the smallest time difference is S1, the time difference corresponding to the current target path is S2, and the first preset threshold value is L1, if |S1-S2|≤L1, then the current target path is maintained. This is because if the quality of the synchronization message transmitted by the updated target path is similar to that of the current target path, then it is better not to switch the transmission path frequently, so as to improve the stability of the synchronization and ensure the accuracy of the synchronization. The first preset threshold value here can be set according to actual needs, which will not be repeated here.

[0127] According to this embodiment, a measured path with the smallest difference between the receiving time and the sending time of the target message is selected as the target path, that is, a measured path with the highest time synchronization accuracy is selected as the target path, so that the clocks of the sending end 11 and the receiving end 12 are synchronized as much as possible, so that the accuracy of the time recorded in the target message can be guaranteed as much as possible, which is conducive to comprehensive, real-time and accurate monitoring of the operating status of the power system, so as to analyze the process and cause of the development of the accident.

[0128] Embodiment 3

[0129] This embodiment further supplements the method of calibrating time in a redundant network in the first embodiment. This embodiment mainly considers the calculation of the delay time of the target message transmission. The delay time difference of the same transmission path reflects the frequency difference of each clock. Figure 5 FIG. 1 is a flow chart of a method for synchronizing target messages in a redundant network according to this embodiment. The method includes:

[0130] Step 501: Obtain the delay time of the target message corresponding to each end on each tested path every preset period.

[0131] The delay time difference is the difference between the delay times corresponding to the two adjacent ends. Each delay time is the transmission time of the target message between the two adjacent ends. The delay time corresponding to each end is obtained based on the target message sent by the end. For the specific meaning of the delay time, please refer to the protocol IEEE Std 1588 TM -2008.

[0132] For example, the sending end 11 and the first forwarding end 13 are two adjacent ends, the receiving end 12 and the last forwarding end 13 are two adjacent ends, and every two adjacent forwarding ends 13 are also two adjacent ends.

[0133] It should be noted that the target message here is a message used to obtain the delay time, and its number and type can be determined according to actual needs. For example, the target message is a message specifically used to determine the delay time between each two ends. For example, at a certain moment, each end sends a target message for determining the time, then the delay time of the target message of each end at this moment can be obtained in this step. If multiple target messages are sent by each end on a transmission path within a preset period, then the delay time corresponding to each target message at a certain moment can be selected according to actual needs.

[0134] Step 502: Obtain the corresponding total delay time difference according to each delay time on each measured path.

[0135] The total delay time difference here is the total delay time difference of a single measured path.

[0136] like Figure 2A As shown, for a target message on a transmission path, the total delay time difference e2 is:

[0137]

[0138] Among them, 0≤i≤n+1, Δt PathDelay (i)=|t PathDelay (i) -t′ PathDelay (i)|,Δt PathDelay (i) represents the delay time difference corresponding to the i-th end, t PathDelay (i) represents the delay time between the target message sent from the i-th end and the i-th end, t′ PathDelay (i) represents the delay time between the i+1th end and the i-th end of the target message sent from the i+1th end. The sending end is the 0th end, the receiving end is the n+2th end, and the forwarding ends are arranged in sequence from the 1st end to the i+1th end.

[0139] Optionally, each t PathDelay (i) and t′ PathDelay It can be obtained using the following formula:

[0140]

[0141]

[0142] Among them, t 1(i) is the time when a target message is sent at the i-th end, t 4 (i) is the time when the first response message is received at the i-th end, and the first response message corresponds to the target message sent by the i-th end, t 3 (i+1) is the sending time of the first response message from the adjacent i+1th end, t 2 (i+1) is the reception time of the target message sent by the i-th terminal and reaches the i+1-th terminal;

[0143] t′ 1 (i+1) is the time when a target message is sent from the i+1th end, t′ 4 (i+1) is the time when the second response message is received at the i+1th end. The second response message corresponds to the target message sent by the i+1th end. t′ 3 (i) is the sending time of the second response message sent by the i-th end, t′ 2 (i) is the time when the target message sent by the i+1th end arrives at the ith end. The target message is, for example, P delay request , the response message is, for example, P delay response , also in the protocol IEEE Std 1588 TM -As stipulated in 2008.

[0144] like Figure 2B As shown, the target message can be transmitted between the two ends 13, and the end receiving the target message can return a response message, which is equivalent to a target message going back and forth between the two forwarding ends 13 once. Figure 2B The figure shows the sending end 11 and the first forwarding end 13. The time for sending a target message from the sending end 11 is t 1 (0), the time when the first forwarding end 13 receives the target message is t 2 (1) The time when the forwarding end 13 sends a response message is t 3 (0), the time when the response message sent by the forwarding end 13 arrives at the receiving end 11 is t 4 (0) The time it takes to send a target message from the first forwarding end 13 is t′ 1 (1) The time when the first forwarding end 13 receives the response message is t′ 4 (1) The time when the target message sent by the forwarding end 13 arrives at the receiving end 11 is t′ 3 (0), the time when the receiving end 11 sends the response message is t′ 2 (0).

[0145] Obtaining the delay time difference corresponding to each end is equivalent to obtaining the frequency difference of the clock between the end and the next adjacent end. If the frequency difference of the clock is the smallest, the delay time difference is the smallest.

[0146] Step 503, select a minimum delay time difference sum from each delay time, and use the measured path corresponding to the minimum delay time difference sum as the target path, so that the receiving end performs time synchronization according to at least one synchronization message transmitted by the target path.

[0147] The smallest e2 is the smallest total delay time difference, and the measured path corresponding to the smallest e2 is taken as the target path.

[0148] Optionally, after selecting the smallest delay sum from the sums of the delay time differences, and before taking the measured path corresponding to the smallest delay time difference sum as the target path, it also includes: if the absolute value of the difference between the smallest delay time difference sum and the delay time difference sum of the current target path is less than a second preset threshold value, then the current target path is maintained. Assuming that the smallest delay time difference sum is N1, the delay time difference sum of the current target path is N2, and the second preset threshold value is L2, then if |N1-N2|≤L2, the current target path is maintained. This is because if the quality of the synchronization message transmitted by the updated target path is similar to that of the current target path, then it is better not to switch the transmission path frequently, so as to reduce the stability of the synchronization and ensure the synchronization accuracy. The second preset threshold value here can be set according to actual needs.

[0149] Of course, the delay time may also be obtained periodically, and may be set according to actual needs.

[0150] In this embodiment, the measured path corresponding to the minimum total delay time difference is used as the target path, so that the receiving end 12 performs time synchronization according to the synchronization message transmitted on the target path, thereby ensuring the accuracy of time synchronization as much as possible.

[0151] Embodiment 4

[0152] This embodiment further supplements the method for synchronizing time in a redundant network in Embodiment 1. This embodiment simultaneously considers the accuracy of time synchronization itself and the total delay time difference of target message transmission.

[0153] like Figure 6 FIG. 1 is a flow chart of a method for synchronizing target messages in a redundant network according to this embodiment. The method includes:

[0154] Step 601, every preset period, obtain a sending time of a target message on each measured path from the sending end and a receiving time of a target message arriving at the receiving end, and obtain the delay time corresponding to each end on each measured path according to each target message.

[0155] This step is consistent with step 401 and step 501 and will not be described again here.

[0156] Step 602: Obtain the time difference between the sending time and the receiving time corresponding to each group, and obtain the total delay time difference on each measured path according to each delay time.

[0157] Each target message corresponds to a sending time at the sending end 11 and a receiving time at the receiving end 12. By subtracting the sending time from the receiving time, the time difference corresponding to each target message can be obtained. The total delay time difference is the sum of all delay time differences on a single measured path. The method for obtaining the total delay time difference of the target message is consistent with the description of the aforementioned embodiment three.

[0158] Step 603: Select a minimum time difference value from each time difference value, and select a minimum delay time difference sum from each delay time difference sum.

[0159] The steps of selecting the smallest time difference value and the smallest total delay time difference may not have a specific order, and either operation may be performed first, and of course, they may be performed simultaneously.

[0160] Step 604 , determining whether the measured paths corresponding to the minimum time difference and the minimum delay time are the same transmission path, if so, executing step 605 , otherwise, turning to step 606 .

[0161] Optionally, when selecting the target path for the first time, any of the following methods can be used to determine the final target path:

[0162] Method 1: Randomly select one of the tested paths corresponding to the minimum time difference and the minimum delay time difference sum as the target path;

[0163] Method 2: The measured path corresponding to the minimum time difference is used as the target path;

[0164] Method 3: The measured path corresponding to the minimum total delay time difference is set as the target path.

[0165] Step 605: The measured path is used as the target path, so that the receiving end performs timing according to at least one timing message transmitted by the target path.

[0166] Step 606: Maintain the current target path so that the receiving end can continue to perform time synchronization according to at least one synchronization message transmitted by the current target path.

[0167] In this way, the stability of time synchronization can be improved to ensure the accuracy of time synchronization.

[0168] According to this embodiment, by combining the accuracy of time synchronization and the total delay time difference of target message transmission, the best transmission path can be selected from multiple transmission paths, so that the synchronization of the clocks of the receiving end 12 and the sending end 11 can be guaranteed as much as possible, which is conducive to comprehensive, real-time and accurate monitoring of the operating status of the power system, so as to analyze the process and causes of the development of the accident.

[0169] Embodiment 5

[0170] This embodiment uses a specific example to illustrate the method for calibrating time in a redundant network in any of the above embodiments.

[0171] To simplify redundant networks, such as Figure 1 As shown, it is assumed that there are three transmission paths in the redundant network, namely transmission path E, transmission path F and transmission path G. The current target path is transmission path E, which can be selected randomly or according to the method of any of the above embodiments.

[0172] In the first preset cycle, it is assumed that the transmitting end 11 sends three target messages at the same time T1, and these three target messages pass through transmission path E, transmission path F and transmission path G respectively. The time when the receiving end 12 of transmission path E receives the target message is T21, the time when the receiving end 12 of transmission path F receives the target message is T22, and the time when the receiving end 12 of transmission path G receives the target message is T23. The total delay time difference on transmission path E is B1, the total delay time difference on transmission path F is B2, and the total delay time difference on transmission path G is B3. The time difference values ​​are T21-T1, T22-T1, and T23-T1 respectively. The smallest value is selected from these three time difference values. Assuming that the smallest time difference value is T22-T1 and the smallest total delay time difference value is B2, transmission path F is used as the target path. In the next second preset cycle, the receiving end 12 performs time synchronization according to the synchronization message transmitted by path F.

[0173] When this second preset cycle arrives, through the method of the aforementioned embodiment, assuming that the smallest one of the time differences corresponds to the transmission path E, and the smallest one of the total delay time differences corresponds to the transmission path F, then it can be selected to keep the current transmission path F as the target path, that is, before determining the new target path, the synchronization message on the transmission path F is still used for synchronization.

[0174] When the third preset cycle arrives, it is also necessary to obtain the time difference and the total delay time difference on each transmission path. Assuming that the smallest time difference corresponds to transmission path E, and the smallest total delay time difference corresponds to transmission path G, F can be kept as the target path. That is, before determining the new target path, the synchronization message on transmission path F is still used for synchronization.

[0175] Dynamically adjusting the optimal transmission path within each preset period in this way can ensure the real-time and accuracy of target message transmission.

[0176] Embodiment 6

[0177] This embodiment provides a device for calibrating time in a redundant network. The device can execute the method for calibrating time in a redundant network of Embodiment 1. The device can be set in the receiving end 12, or can be set separately, which will not be described in detail here.

[0178] like Figure 7 FIG. 7 is a schematic diagram of the structure of a device for calibrating time in a redundant network according to this embodiment. The device includes an acquisition unit 701 and a determination unit 702 .

[0179] Among them, the acquisition unit 701 is used to obtain the target information of each target message transmitted through multiple measured paths every preset period, and the measured paths belong to multiple transmission paths; the determination unit 702 is used to determine a target path from the measured paths according to each target information, so that the receiving end can calibrate the time according to at least one calibration message transmitted by the target path, and the sending time of the calibration message from the sending end is later than the time when the target path is determined.

[0180] The working methods of each unit in this embodiment are the same as those in the previous embodiment and will not be described again here.

[0181] In this embodiment, at every preset period, the device obtains the target information of the target messages on the multiple paths under test and selects a target path from the paths under test according to the target information, and then gradually synchronizes the slave clock with the master clock through the message on the target path. In this way, the target path is adjusted dynamically, so that the real-time performance of selecting the best path for time calibration can be guaranteed as much as possible, and thus the synchronization of the slave clock with the master clock can be guaranteed as much as possible.

[0182] Embodiment 8

[0183] This embodiment further supplements the time calibration device in the redundant network of the seventh embodiment.

[0184] The acquisition unit 701 of this embodiment is specifically used to: acquire a sending time when a target message on each measured path is sent from the sending end and a receiving time when the target message arrives at the receiving end. Specifically, the sending time can be directly acquired from the transmitted target message.

[0185] Accordingly, the determining unit 702 of this embodiment is specifically configured to:

[0186] Get the time difference between the receiving time and sending time corresponding to each group;

[0187] A minimum time difference is selected from each time difference, and the measured path corresponding to the minimum time difference is used as the target path.

[0188] Optionally, the determining unit 702 is further configured to: if the absolute value of the difference between the minimum time difference and the time difference corresponding to the current target path is less than or equal to a first preset threshold value, maintain the current target path.

[0189] The working methods of each unit in this embodiment are the same as those in the previous embodiment and will not be described again here.

[0190] According to this embodiment, a measured path with the smallest difference between the receiving time and the sending time of the target message is selected as the target path, that is, a measured path with the highest time synchronization accuracy is selected as the target path, so that the clocks of the sending end 11 and the receiving end 12 are synchronized as much as possible, so that the accuracy of the time recorded in the target message can be guaranteed as much as possible, which is conducive to comprehensive, real-time and accurate monitoring of the operating status of the power system, so as to analyze the process and cause of the development of the accident.

[0191] Embodiment 9

[0192] This embodiment further supplements the time calibration device in the redundant network of the seventh embodiment.

[0193] The acquisition unit 701 of this embodiment is specifically used to: acquire the total delay time difference of the target message on each measured path, the total delay time difference is the sum of all delay time differences of a single measured path, the delay time difference is the difference between the delay times corresponding to the two adjacent ends, each delay time is the transmission time of the target message between the two adjacent ends, and the delay time corresponding to each end is acquired according to the target message sent by the end;

[0194] The determining unit 702 is specifically configured to: select a minimum delay time difference sum from each delay time difference sum, and use the measured path corresponding to the minimum delay time difference sum as the target path.

[0195] Optionally, the determining unit 702 is further configured to:

[0196] If the absolute value of the difference between the minimum delay time difference sum and the delay time difference sum corresponding to the current target path is smaller than a second preset threshold value, the current target path is maintained.

[0197] Optionally, the acquiring unit 701 is specifically configured to:

[0198] The total delay time difference is determined using the following formula:

[0199]

[0200] Among them, 0≤i≤n+1, Δt PathDelay (i)=|t PathDelay (i) -t′ PathDelay (i)|,Δt PathDelay (i) represents the delay time difference corresponding to the i-th end, t PathDelay (i) represents the delay time between the target message sent from the i-th end and the i-th end, t′ PathDelay (i) represents the delay time between the i+1th end and the i-th end of the target message sent from the i+1th end. The sending end is the 0th end, the receiving end is the n+2th end, and the forwarding ends are arranged in sequence from the 1st end to the n+1th end.

[0201] Optionally, each t PathDelay (i) and t′ PathDelay (i) can be obtained using the following formula:

[0202]

[0203]

[0204] Among them, t 1 (i) is the time when a target message is sent at the i-th end, t 4 (i) is the time when the first response message is received at the i-th end, and the first response message corresponds to the target message sent by the i-th end, t 3 (i+1) is the sending time of the first response message from the adjacent i+1th end, t 2 (i+1) is the reception time of the target message sent by the i-th terminal and reaches the i+1-th terminal;

[0205] t 1 ′(i+1) is the sending time of a target message at the i+1th end, t 4 ′(i+1) is the time when the second response message is received at the i+1th end. The second response message corresponds to the target message sent by the i+1th end. 3′(i) is the sending time of the second response message at the ith end, t 2 ′(i) is the reception time when the target message sent by the i+1th end arrives at the ith end.

[0206] The working methods of each unit in this embodiment are the same as those in the previous embodiment and will not be described again here.

[0207] In this embodiment, the measured path corresponding to the minimum total delay time difference is used as the target path, so that the receiving end 12 performs time synchronization according to the synchronization message transmitted on the target path, thereby ensuring the accuracy of time synchronization as much as possible.

[0208] Embodiment 10

[0209] This embodiment further supplements the time calibration device in the redundant network of the seventh embodiment.

[0210] The acquisition unit 701 of this embodiment is specifically used to: acquire a sending time when a target message on each measured path is sent from the sending end and a receiving time when the target message arrives at the receiving end. Specifically, the sending time can be directly acquired from the transmitted target message.

[0211] Accordingly, the determining unit 702 of this embodiment is specifically configured to:

[0212] Get the time difference between the receiving time and sending time corresponding to each group;

[0213] Select the smallest time difference from each time difference and obtain the total delay time difference of each target message on each measured path, wherein the total delay time difference is the sum of all delay time differences on a single measured path, the delay time difference is the difference between the delay times corresponding to the two adjacent ends, each delay time is the transmission time of the target message between the two adjacent ends, and the delay time corresponding to each end is obtained according to the target message sent by the end;

[0214] Select the smallest delay time difference sum from among the delay time difference sums;

[0215] If the measured paths corresponding to the minimum time difference value and the minimum delay time difference sum are the same measured path, the same measured path is used as the target path.

[0216] Optionally, the acquisition unit 701 may specifically use the following formula to determine the total delay time difference:

[0217]

[0218] Among them, 0≤i≤n+1, Δt PathDelay (i)=|t PathDelay (i) -t′ PathDelay(i)|,Δt PathDelay (i) represents the delay time difference corresponding to the i-th end, t PathDelay (i) represents the delay time between the target message sent from the i-th end and the i-th end, t′ PathDelay (i) represents the delay time between the i+1th end and the i-th end of the target message sent from the i+1th end. The sending end is the 0th end, the receiving end is the n+2th end, and the forwarding ends are arranged in sequence from the 1st end to the n+1th end.

[0219] Optionally, each t PathDelay (i) and t′ PathDelay (i) The following formula is used to obtain:

[0220]

[0221]

[0222] Among them, t 1 (i) is the time when a target message is sent at the i-th end, t 4 (i) is the time when the first response message is received at the i-th end, and the first response message corresponds to the target message sent by the i-th end, t 3 (i+1) is the sending time of the first response message from the adjacent i+1th end, t 2 (i+1) is the reception time of the target message sent by the i-th terminal and reaches the i+1-th terminal;

[0223] t 1 ′(i+1) is the sending time of a target message at the i+1th end, t 4 ′(i+1) is the time when the second response message is received at the i+1th end. The second response message corresponds to the target message sent by the i+1th end. 3 ′(i) is the sending time of the second response message at the ith end, t 2 ′(i) is the reception time when the target message sent by the i+1th end arrives at the ith end.

[0224] Optionally, the determining unit 702 of this embodiment is further configured to:

[0225] If the target path is selected for the first time, the target path is determined in one of the following ways;

[0226] Method 1: Randomly select one of the tested paths corresponding to the minimum time difference and the minimum delay time difference sum as the target path;

[0227] Method 2: The measured path corresponding to the minimum time difference is used as the target path;

[0228] Method 3: The measured path corresponding to the minimum total delay time difference is used as the target path.

[0229] The working methods of each unit in this embodiment are the same as those in the previous embodiment and will not be described again here.

[0230] This embodiment can select the best transmission path from multiple transmission paths by combining the accuracy of time synchronization and the total delay time difference of target message transmission, so as to ensure the synchronization of the clocks of the receiving end 12 and the sending end 11 as much as possible, which is conducive to comprehensive, real-time and accurate monitoring of the operating status of the power system, so as to analyze the process and causes of the development of the accident.

[0231] The present invention also provides a device for calibrating time in a redundant network, comprising at least one memory and at least one processor. The memory is used to store instructions. The processor is used to execute the method for calibrating time in a redundant network described in any of the above embodiments according to the instructions stored in the memory.

[0232] An embodiment of the present invention further provides a readable storage medium in which machine-readable instructions are stored, and when the machine-readable instructions are executed by a machine, the machine executes the method for calibrating time in a redundant network described in any of the above embodiments.

[0233] The readable medium stores machine-readable instructions, which, when executed by the processor, cause the processor to execute any of the aforementioned methods. Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the machine-readable instructions stored in the readable storage medium.

[0234] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above-mentioned embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute a part of the present invention.

[0235] Examples of readable storage media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or a cloud via a communication network.

[0236] Those skilled in the art should understand that the various embodiments disclosed above can be modified and altered in various ways without departing from the essence of the invention. Therefore, the protection scope of the present invention should be defined by the appended claims.

[0237] It should be noted that not all steps and units in the above-mentioned processes and system structure diagrams are necessary, and some steps or units can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The device structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some units may be implemented by the same physical entity, or some units may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.

[0238] In the above embodiments, the hardware unit can be realized by mechanical means or electrical means. For example, a hardware unit or a processor can include permanent dedicated circuits or logic (such as special processors, FPGA or ASIC) to complete the corresponding operation. The hardware unit or the processor can also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set by software to complete the corresponding operation. Concrete implementation (mechanical means or dedicated permanent circuits or temporarily set circuits) can be determined based on cost and time considerations.

[0239] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for calibrating time in a redundant network, wherein a redundant network comprises a transmitting end, a receiving end, and a plurality of transmission paths between the transmitting end and the receiving end, each transmission path being capable of transmitting at least one target message, characterized in that: The method comprises: At every preset period, target information of each target message transmitted through a plurality of measured paths is obtained, wherein the measured paths belong to the plurality of transmission paths; According to each of the target information, a target path is determined from the measured paths, so that the receiving end performs time synchronization according to a synchronization message transmitted by the target path, and the transmission time of the synchronization message from the transmitting end is later than the time when the target path is determined and the synchronization message is within a current preset period; The target information of each target message transmitted through multiple paths under test is obtained, including: Obtaining a sending time when a target message on each of the measured paths is sent from the sending end and a receiving time when the target message arrives at the receiving end; Determining a target path from the measured paths according to each of the target information includes: Obtaining the time difference between the receiving time and the sending time corresponding to each group, and obtaining the sum of the delay time differences of each target message on each measured path, wherein the sum of the delay time differences is the sum of all delay time differences on a single measured path, and the delay time difference is the difference between the delay times corresponding to the two adjacent ends, each of which is the transmission time of the target message between the two adjacent ends, and the delay time corresponding to each end is obtained according to the target message sent by the end; Selecting a minimum time difference value from each time difference value, and selecting a minimum delay time difference sum from each delay time difference sum; If the measured paths corresponding to the smallest time difference value and the smallest sum of delay time differences are the same measured path, the same measured path is used as the target path; If the measured paths corresponding to the smallest time difference value and the smallest delay time difference sum are not the same measured path, the current target path is maintained.

2. The method according to claim 1, characterized in that Each transmission path has n+1 forwarding ends, (n+1) is an integer and (n+1)≥0, then the sum of the delay time difference of a target message on each measured path is obtained including: The total delay time difference is determined using the following formula: Among them, 0≤i≤n+1, Δt PathDelay (i)=|t PathDelay (i) -t′ PathDelay (i)|,Δt PathDelay (i) represents the delay time difference corresponding to the i-th terminal, t PathDelay (i) represents the delay time between the target message sent from the i-th end and the i-th end, t′ PathDelay (i) represents the delay time of the target message sent from the i+1th end between the i+1th end and the i-th end, the sending end is the 0th end, the receiving end is the n+2th end, and the forwarding ends are arranged in sequence from the 1st end to the n+1th end.

3. The method according to claim 2, characterized in that Each t PathDelay (i) and t′ PathDelay (i) The following formula is used to obtain: Wherein, t1(i) is the sending time of a target message sent by the i-th end, t4(i) is the receiving time of a first response message received by the i-th end, the first response message corresponds to the target message sent by the i-th end, t3(i+1) is the sending time of the first response message sent by the adjacent i+1-th end, and t2(i+1) is the receiving time of the target message sent by the i-th end arriving at the i+1-th end; t′1(i+1) is the sending time when a target message is sent from the i+1th end, t′4(i+1) is the receiving time when a second response message is received at the i+1th end, the second response message corresponds to the target message sent from the i+1th end, t′3(i) is the sending time when the second response message is sent from the i-th end, and t′2(i) is the receiving time when the target message sent from the i+1th end arrives at the i-th end.

4. The method according to claim 1, characterized in that Also includes: If the target path is selected for the first time, the target path is determined in one of the following ways; Method 1: randomly selecting one of the measured paths corresponding to the smallest time difference value and the smallest sum of delay time differences as the target path; Method 2: taking the measured path corresponding to the smallest time difference as the target path; Method three: taking the measured path corresponding to the minimum total delay time difference as the target path.

5. A device for calibrating time in a redundant network, wherein a redundant network comprises a transmitting end, a receiving end, and a plurality of transmission paths between the transmitting end and the receiving end, each transmission path being capable of transmitting at least one target message, characterized in that: The device comprises: an acquisition unit, configured to acquire target information of each target message transmitted through a plurality of measured paths at every preset period, wherein the measured paths belong to the plurality of transmission paths; a determination unit, configured to determine a target path from the measured paths according to each of the target information, so that the receiving end performs time calibration according to a calibration message transmitted by the target path, wherein the calibration message is sent from the transmitting end at a time later than the time when the target path is determined and the calibration message is within a current preset period; The acquisition unit is specifically used to: acquire a sending time when a target message on each of the measured paths is sent from the sending end and a receiving time when the target message arrives at the receiving end; The determining unit is specifically used for: Obtaining the time difference between the receiving time and the sending time corresponding to each group, and obtaining the sum of the delay time differences of each target message on each measured path, wherein the sum of the delay time differences is the sum of all delay time differences on a single measured path, and the delay time difference is the difference between the delay times corresponding to the two adjacent ends, each of which is the transmission time of the target message between the two adjacent ends, and the delay time corresponding to each end is obtained according to the target message sent by the end; Selecting a minimum time difference value from each time difference value, and selecting a minimum delay time difference sum from each delay time difference sum; If the measured paths corresponding to the smallest time difference value and the smallest sum of delay time differences are the same measured path, the same measured path is used as the target path; If the measured paths corresponding to the smallest time difference value and the smallest delay time difference sum are not the same measured path, the current target path is maintained.

6. The device according to claim 5, characterized in that Each transmission path has n+1 forwarding ends, (n+1) is an integer and (n+1)≥0, then the acquisition unit is specifically used for: The total delay time difference is determined using the following formula: Among them, 0≤i≤n+1, Δt PathDelay (i)=|t PathDelay (i) -t′ PathDelay (i)|,Δt PathDelay (i) represents the delay time difference corresponding to the i-th terminal, t PathDelay (i) represents the delay time between the target message sent from the i-th end and the i-th end, t′ PathDelay (i) represents the delay time of the target message sent from the i+1th end between the i+1th end and the i-th end, the sending end is the 0th end, the receiving end is the n+2th end, and the forwarding ends are arranged in sequence from the 1st end to the n+1th end.

7. The device according to claim 6, characterized in that Each t PathDelay (i) and t′ PathDelay (i) The following formula is used to obtain: Wherein, t1(i) is the sending time of a target message sent by the i-th end, t4(i) is the receiving time of a first response message received by the i-th end, the first response message corresponds to the target message sent by the i-th end, t3(i+1) is the sending time of the first response message sent by the adjacent i+1-th end, and t2(i+1) is the receiving time of the target message sent by the i-th end arriving at the i+1-th end; t′1(i+1) is the sending time when a target message is sent from the i+1th end, t′4(i+1) is the receiving time when a second response message is received at the i+1th end, the second response message corresponds to the target message sent from the i+1th end, t′3(i) is the sending time when the second response message is sent from the i-th end, and t′2(i) is the receiving time when the target message sent from the i+1th end arrives at the i-th end.

8. A time calibration device in a redundant network, wherein a redundant network comprises a transmitting end, a receiving end, and a plurality of transmission paths between the transmitting end and the receiving end, each transmission path being capable of transmitting at least one target message, characterized in that: The device comprises: at least one memory for storing instructions; At least one processor is configured to execute the method for synchronizing time in a redundant network according to any one of claims 1 to 4 according to the instructions stored in the memory.

9. A readable storage medium, characterized in that: The readable storage medium stores machine-readable instructions. When the machine-readable instructions are executed by a machine, the machine executes the method for calibrating time in a redundant network according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Clock synchronization using multiple network paths

    CN104247309A

  • Method and system for synchronously inserting network time

    CN105099649A