A method for internal and external synchronization of a Byzantine computer system based on TTE network
By adjusting the internal synchronization period of the Byzantine computer system to align with the synchronization period of the TTE network, the synchronization problem is solved, and the normal operation of the Byzantine computer system with high reliability and high synchronization accuracy in the TTE network is achieved.
Patent Information
- Application Number
- CN202411462055.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-10-18
AI Technical Summary
In the TTE network, the internal synchronization cycle of the Byzantine computer system is not synchronized with the synchronization cycle of the external TTE network, which affects the high reliability of the system and the operating speed of the processor.
By obtaining the operating cycles of the Byzantine computer system and the TTE network, the internal synchronization cycle is adjusted to align with the external synchronization cycle. Dynamic synchronization is performed using the method of correcting the synchronization cycle to ensure real-time alignment between the internal control cycle and the external network cycle.
The high reliability of the Byzantine computer system is achieved, ensuring the internal synchronization of a single machine and the normal operation of the network. Prioritizing the internal synchronization of a single machine, preventing internal and external desynchronization, and improving the synchronization accuracy of the system and the computing speed of the processor.
Smart Images

Figure CN119449212B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of synchronous communication technology, and in particular to an internal and external synchronization method of a Byzantine computer system based on a TTE network. Background Art
[0002] Byzantine fault-tolerant computers typically consist of multiple hot-standby machines. Multiple homogeneously designed standalone machines simultaneously receive and process information, and the resulting data is then voted on and output, resulting in extremely high reliability. To achieve output synchronization, Byzantine fault-tolerant computers and other multi-machine hot-standby systems require a common synchronization cycle, completing tasks such as computation and data comparison within the same cycle. This multi-machine synchronization cycle is a prerequisite for the proper functioning of Byzantine computers. To ensure the reliability of manned spacecraft, their control computers must be resilient to Byzantine faults.
[0003] With the development of spacecraft, the computing tasks undertaken by onboard computers require high integration, high computing power, and high bandwidth. Byzantine computers are often connected to networks with strong real-time requirements. Computers in a TTE network perform operations and other tasks within the same schedule and control cycle, while Byzantine computers operate within the internal synchronization cycle of multiple machines. The cycles of the two machines are not synchronized, which affects the high reliability of the Byzantine computer system and the operating speed of the processor. Therefore, there is an urgent need to provide an internal and external synchronization method for Byzantine computer systems based on TTE networks. Summary of the Invention
[0004] The present invention provides an internal and external synchronization method of a Byzantine computer system based on a TTE network, which can align the internal synchronization period of the Byzantine computer system with the synchronization period of the TTE network in real time.
[0005] In a first aspect, the present invention provides an internal and external synchronization method of a Byzantine computer system based on a TTE network, which is applied to a Byzantine computer system that introduces a TTE network, comprising:
[0006] Obtaining a first operating cycle of the Byzantine computer system using a synchronous Byzantine protocol and a second operating cycle input by the TTE network; wherein the first operating cycle includes a plurality of first synchronization cycles, and the second operating cycle includes a plurality of second synchronization cycles;
[0007] For each of the first synchronization cycles, the following steps are performed:
[0008] Acquire a current second synchronization cycle corresponding to the first synchronization cycle, and determine a first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle;
[0009] The first synchronization period is adjusted according to the first initial time and the second initial time to obtain a revised synchronization period, thereby completing the synchronization between the first synchronization period and the current second synchronization period.
[0010] Optionally, acquiring a current second synchronization cycle corresponding to the first synchronization cycle, and determining a first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle includes:
[0011] For the first synchronization period after the TTE network is introduced, executing:
[0012] Obtaining a rising edge signal of the first synchronization period and latching it to obtain the first initial moment;
[0013] When a rising edge signal of a second synchronization cycle of the TTE network is obtained within the duration of the first synchronization cycle, latching is performed to obtain the second initial time; and the second synchronization cycle is used as the current second synchronization cycle;
[0014] and / or,
[0015] For each of the first synchronization cycles after the first first synchronization cycle, executing:
[0016] Determine a current second synchronization period corresponding to the first synchronization period in chronological order; wherein each of the first synchronization periods corresponds to one second synchronization period;
[0017] A first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle are determined.
[0018] Optionally, adjusting the first synchronization period according to the first initial time and the second initial time to obtain a modified synchronization period includes:
[0019] performing a difference operation on the second initial moment and the first initial moment to obtain a difference;
[0020] Determining whether the difference is greater than a calibration threshold;
[0021] If the difference is greater than the correction threshold, the first synchronization period is compensated according to the difference to obtain a corrected synchronization period.
[0022] Optionally, after determining whether the difference is greater than a correction threshold, the method further includes:
[0023] Determining whether the difference is greater than a desynchronization threshold and whether the modified synchronization period is shorter than the first synchronization period; wherein the desynchronization threshold is greater than the correction threshold;
[0024] If the difference is greater than the desynchronization threshold and the revised synchronization period is shorter than the first synchronization period, the tasks included in the revised synchronization period are executed according to the preset task priority.
[0025] Optionally, executing the tasks included in the modified synchronization period according to preset task priorities includes:
[0026] Obtaining the security level, importance level, and necessity level of each task included in the modified synchronization period;
[0027] Determining a priority score for each of the tasks according to the safety level, the importance level, and the necessity level;
[0028] Sort the tasks in descending order of priority to obtain a priority order;
[0029] The tasks are executed sequentially in the priority order within the modified synchronization period.
[0030] Optionally, the priority score is determined by the following formula:
[0031] S i =α i x1+β i x2+γ i x3
[0032] Among them, S i The priority score used to characterize the i-th task; α i is the score of the security level corresponding to the i-th task; β i is the importance level score corresponding to the i-th task; γ i is the score of the necessary level corresponding to the i-th task; x1 is the weight value of the safety level; x2 is the weight value of the importance level; x3 is the weight value of the necessary level.
[0033] Optionally, the modified synchronization period is determined by the following formula:
[0034] T n+1 =T n +(t1-t0)
[0035] Among them, T n+1 Used to represent the modified synchronization period; T n is used to represent the first synchronization period; t1 is used to represent the second initial moment; t0 is used to represent the first initial moment.
[0036] In a second aspect, the present invention further provides an internal and external synchronization device of a Byzantine computer system based on a TTE network, comprising:
[0037] an acquisition module, configured to acquire a first operating cycle of the Byzantine computer system using a synchronous Byzantine protocol and a second operating cycle input by the TTE network; wherein the first operating cycle includes a plurality of first synchronization cycles, and the second operating cycle includes a plurality of second synchronization cycles;
[0038] For each of the first synchronization cycles, the synchronization module executes:
[0039] Acquire a current second synchronization cycle corresponding to the first synchronization cycle, and determine a first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle;
[0040] The first synchronization period is adjusted according to the first initial time and the second initial time to obtain a revised synchronization period, thereby completing the synchronization between the first synchronization period and the current second synchronization period.
[0041] Optionally, the synchronization module is further configured to perform the following operations:
[0042] performing a difference operation on the second initial moment and the first initial moment to obtain a difference;
[0043] Determining whether the difference is greater than a calibration threshold;
[0044] If the difference is greater than the correction threshold, the first synchronization period is compensated according to the difference to obtain a corrected synchronization period.
[0045] In a third aspect, the present invention further provides a computing device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements any of the above-mentioned internal and external synchronization methods of a Byzantine computer system based on a TTE network.
[0046] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute any of the above-mentioned internal and external synchronization methods of a Byzantine computer system based on a TTE network.
[0047] The present invention provides an internal and external synchronization method for a Byzantine computer system based on a TTE network. In the Byzantine computer system introduced with the TTE network, the internal synchronization cycle of the Byzantine computer system is corrected to align the internal control cycle with the control cycle of the TTE network in real time, so that the compensation amount in the internal control cycle is much smaller than the width of the corresponding internal control cycle, thereby not affecting the execution of normal control cycle tasks. At the same time, dynamic synchronization is performed in real time to prevent the control cycle gap from being too large, which would cause internal and external desynchronization, thereby further ensuring the internal synchronization of a single machine in the Byzantine computer system, the access of a single machine to the network, and the normal operation of a single machine within the network. In addition, the internal synchronization of a single machine is prioritized, thereby ensuring the high reliability advantage of the Byzantine computer system. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 This is a flowchart of an internal and external synchronization method of a Byzantine computer system based on a TTE network provided by an embodiment of the present invention;
[0050] Figure 2 This is a hardware architecture diagram of a computing device provided by one embodiment of the present invention;
[0051] Figure 3 This is a structural diagram of an internal and external synchronization device of a Byzantine computer system based on a TTE network provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0053] Please refer to Figure 1 An embodiment of the present invention provides an internal and external synchronization method of a Byzantine computer system based on a TTE network, which is applied to a Byzantine computer system that introduces a TTE network, including:
[0054] Step 100: Obtain a first operating cycle of a Byzantine computer system using a synchronous Byzantine protocol and a second operating cycle input by a TTE network; wherein the first operating cycle includes a plurality of first synchronization cycles, and the second operating cycle includes a plurality of second synchronization cycles;
[0055] Step 102: For each first synchronization period, execute:
[0056] Acquire a current second synchronization cycle corresponding to the first synchronization cycle, and determine a first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle;
[0057] Step 104 : adjusting the first synchronization period according to the first initial time and the second initial time to obtain a revised synchronization period, thereby completing synchronization between the first synchronization period and the current second synchronization period.
[0058] In the present invention, in a Byzantine computer system that introduces a TTE network, a method of correcting the internal synchronization cycle of the Byzantine computer system is adopted to align the internal control cycle (i.e., the first operating cycle) with the control cycle of the TTE network (i.e., the second operating cycle) in real time, so that the compensation amount in the internal control cycle is much smaller than the width of the corresponding internal control cycle, and therefore does not affect the execution of normal control cycle tasks; at the same time, dynamic synchronization is performed in real time to prevent the control cycle gap from being too large, causing internal and external desynchronization, thereby further ensuring the internal synchronization of a single machine in the Byzantine computer system, the access of a single machine to the network, and the normal operation of a single machine within the network, and giving priority to ensuring the internal synchronization of a single machine, thereby ensuring the high reliability advantage of the Byzantine computer system.
[0059] Described below Figure 1 How to perform the steps shown.
[0060] First, with respect to step 100, a first operating cycle of a Byzantine computer system using a synchronous Byzantine agreement and a second operating cycle input by a TTE network are obtained; the first operating cycle includes multiple first synchronization cycles, and the second operating cycle includes multiple second synchronization cycles. It should be noted that during network design, the duration of the first synchronization cycle is the same as the duration of the second synchronization cycle. However, due to operational errors in the actual system, the difference in the duration of the cycles may fluctuate slightly.
[0061] Then, for step 102, obtaining the current second synchronization cycle corresponding to the first synchronization cycle, and determining the first initial time of the first synchronization cycle and the second initial time of the current second synchronization cycle include:
[0062] For the first synchronization cycle after the introduction of the TTE network, execute:
[0063] Obtaining a rising edge signal of a first synchronization cycle and latching it to obtain a first initial moment;
[0064] During the first synchronization cycle, when a rising edge signal of a second synchronization cycle of the TTE network is obtained, latching is performed to obtain a second initial time; and the second synchronization cycle is used as the current second synchronization cycle;
[0065] and / or,
[0066] For each first synchronization cycle after the first first synchronization cycle, execute:
[0067] Determine a current second synchronization period corresponding to the first synchronization period in chronological order; wherein each first synchronization period corresponds to a second synchronization period;
[0068] A first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle are determined.
[0069] Specifically, in the first synchronization cycle T after the Byzantine computer system is introduced into the TTE network n1 , get the first synchronization period T n1 The rising edge signal is latched to obtain the first initial time t0. In the first synchronization period T n1 During the period of time, the rising edge signal of the second synchronization period of the TTE network is obtained and latched to obtain the second initial time t1; and the second synchronization period is used as the current second synchronization period T TTE1 It should be noted that before the introduction of the TTE network, the duration of each first synchronization cycle was T n , and T n1 =t2-t0, t1 is any time between t0 and t2. Since both the first operation cycle and the second operation cycle include multiple synchronization cycles, and the period lengths of the first synchronization cycles and the second synchronization cycles are the same or substantially the same, the initial moment of each first synchronization cycle corresponds to a second synchronization cycle. For example, the first operation cycle includes: T n1 , T n2 , T n3 …T n10 ; The second operation cycle includes: T TTE1 , T TTE2 , T TTE3 …T TTE10 , if in T n1 Got T TTE1 The rising edge signal, T n1 The corresponding current second synchronization period is T TTE1 , after which T n2 The corresponding current second synchronization period is T TTE2, T n10 The corresponding current second synchronization period is T TTE10 ; If in T n2 Got T TTE1 The rising edge signal, T n2 The corresponding current second synchronization period is T TTE1 , after which T n3 The corresponding current second synchronization period is T TTE2 , T n10 The corresponding current second synchronization period is T TTE9 .
[0070] Following the above example, in the first synchronization period T n1 Each subsequent first synchronization cycle, for example, in the first first synchronization cycle T n1 After the second first synchronization period T n2 , determine the first synchronization period T in chronological order n2 The corresponding current second synchronization period T TTE2 , determine the first synchronization period T n2 The first initial moment and the current second synchronization period T TTE2 The second initial moment.
[0071] In step 104, the first synchronization period is adjusted according to the first initial time and the second initial time to obtain a modified synchronization period, including:
[0072] Performing a difference operation on the second initial moment and the first initial moment to obtain a difference;
[0073] Determine whether the difference is greater than a calibration threshold;
[0074] If the difference is greater than the correction threshold, the first synchronization period is compensated according to the difference to obtain a modified synchronization period.
[0075] In the present invention, since the control cycle of the TTE network and the internal control cycle of a single machine are offset at different times, it is necessary to locate the internal and external control cycles at the same time by acquiring the first initial moment and the second initial moment in real time, and dynamically synchronize the internal control cycle of the single machine (i.e., compensate for the first synchronization cycle) based on the difference between the first initial moment and the second initial moment to prevent the internal and external desynchronization caused by the control cycle difference being too large.
[0076] In a preferred embodiment, the modified synchronization period is determined by the following formula:
[0077] T n+1 =T n +(t1-t0)
[0078] Among them, Tn+1 Used to characterize the modified synchronization period; T n It is used to represent the first synchronization period; t1 is used to represent the second initial moment; and t0 is used to represent the first initial moment.
[0079] It should be noted that T n+1 、T n Specifically refers to the length of the cycle.
[0080] In the present invention, since the TTE network is equivalent to a bus, the internal part must be synchronized with the external part, so it is necessary to compensate for the internal control cycle of the Byzantine computer system (i.e., the first synchronization cycle). Moreover, since the first synchronization cycle is the same or substantially the same as the second synchronization cycle, the first synchronization cycle can be compensated by calculating the difference between the initial moments of the corresponding first synchronization cycle and the second synchronization cycle, thereby completing the correction of the first synchronization cycle.
[0081] In a preferred embodiment, after determining whether the difference is greater than the correction threshold, the method further includes:
[0082] Determine whether the difference is greater than a desynchronization threshold and whether the revised synchronization period is shorter than the first synchronization period; wherein the desynchronization threshold is greater than the correction threshold;
[0083] If the difference is greater than the out-of-step threshold and the revised synchronization period is shorter than the first synchronization period, the tasks included in the revised synchronization period are executed according to the preset task priority.
[0084] Following the previous example, for the first synchronization period T after the introduction of the TTE network n1 If the calculated difference is greater than the out-of-step threshold, the first synchronization period T n1 Compensate; after compensation, continue to obtain the next first synchronization cycle T n2 , and calculate the difference at this time. If the difference is less than the desynchronization threshold, it is considered that the initial network synchronization is completed, and the first synchronization period T n2 Continue to perform dynamic compensation to further achieve internal and external coordinated synchronization. Then continue to obtain the next first synchronization period T n3 , and calculate the difference at this point. If the difference is less than the correction threshold, the time difference between the first synchronization cycle within the Byzantine computer system and the second synchronization cycle input by the TTE network is controlled to a level that can be ignored by the application. There is no need to compensate for the first synchronization cycle, and internal and external synchronization has been achieved. To further ensure real-time internal and external synchronization, each first synchronization cycle can be monitored in real time to perform real-time dynamic compensation.
[0085] In the present invention, if the difference between the second initial moment and the first initial moment is less than the correction threshold, the first synchronization cycle remains unchanged and the periodic tasks within the cycle proceed normally; if the difference is greater than the correction threshold and less than the out-of-step threshold, it is considered that the inside and outside need to be synchronized, and the first synchronization cycle needs to be dynamically fine-tuned according to the difference; if the difference is greater than the out-of-step threshold, it is considered that the inside and outside are out of step and the cycle difference is too large. At this time, the first synchronization cycle is first compensated based on the difference; and when the cycle length of the corrected synchronization cycle is shorter than the cycle length of the first synchronization cycle, the task priority within the control cycle is set. Since the corrected synchronization cycle length becomes shorter, some tasks cannot be completed. Therefore, it is necessary to execute the control cycle tasks in sequence according to the order of preset task priorities to give priority to ensuring the execution of important tasks that are safety-critical and mission-critical.
[0086] In a preferred embodiment, after determining whether the difference is greater than the correction threshold, the second solution is also included:
[0087] Determine whether the difference is greater than a desynchronization threshold and whether the revised synchronization period is shorter than the first synchronization period; wherein the desynchronization threshold is greater than the correction threshold;
[0088] If the difference is greater than the out-of-step threshold and the corrected synchronization period is shorter than the first synchronization period, the first synchronization period is compensated according to the preset compensation amount to obtain an updated corrected synchronization period, and the tasks included in the updated corrected synchronization period are executed according to the preset task priority; wherein the preset compensation amount is less than the difference.
[0089] In the present invention, when the difference is greater than the desynchronization threshold and the corrected synchronization period is shorter than the first synchronization period, the period length of the corrected synchronization period is too short, resulting in the inability to execute some tasks. Therefore, in order to avoid the corrected first synchronization period being too short, the difference is no longer directly used to compensate the first synchronization period. Instead, a preset compensation amount that is smaller than the difference is selected for compensation. Although it is impossible to achieve internal and external synchronization in one step, it ensures that the period length of the updated corrected synchronization period is longer, and more tasks can be executed. In this case, the preset compensation amount is used to gradually approach the external control period multiple times to achieve closed-loop control of internal and external synchronization, rather than using the difference to compensate once to synchronize with the external control period, which can better ensure the high reliability operation of the Byzantine computer system.
[0090] In a preferred embodiment, executing the tasks included in the modified synchronization period according to the preset task priority includes:
[0091] Obtain the safety level, importance level and necessity level of each task included in the revised synchronization cycle;
[0092] Determine the priority score of each task based on safety level, importance level and necessity level;
[0093] Sort the tasks in descending order of priority to get the priority order;
[0094] During the correction synchronization cycle, tasks are executed in order of priority.
[0095] In the present invention, since the length of the corrected synchronization cycle becomes shorter after compensation, the tasks originally within the first synchronization cycle may not be fully completed. Therefore, in order to give priority to the execution of important tasks that are critical to safety and mission, priority scores are assigned according to the safety level, importance level and necessity level of each task. Tasks with higher priority scores are executed first to ensure that the Byzantine computer system can still operate stably and reliably.
[0096] In a more preferred embodiment, the priority score is determined by the following formula:
[0097] S i =α i x1+β i x2+γ i x3
[0098] Among them, S i Used to characterize the priority score of the i-th task; α i is the score of the security level corresponding to the i-th task; β i is the importance level score corresponding to the i-th task; γ i is the score of the necessary level corresponding to the i-th task; x1 is the weight value of the safety level; x2 is the weight value of the importance level; x3 is the weight value of the necessary level.
[0099] In this invention, users can flexibly set the weights of the security level, importance level, and necessity level based on the application scenario and high reliability requirements. Higher scores for each level correspond to higher levels. It should be noted that the necessity level is the level of tasks that must be performed solely to ensure the completion of other tasks; the importance level is the level of tasks that are important in the corresponding application scenario; and the safety level is the level of tasks that are intended to ensure safety.
[0100] In the present invention, priority is given to ensuring the internal synchronization of a single machine of the Byzantine computer system, ensuring the high reliability advantage of the Byzantine computer system, so that the Byzantine computer can access the high-speed TTE network; at the same time, a pure software internal and external coordination method is adopted, which can be achieved by only locking the star time and difference calculation, and the software and hardware overhead is very small; at the same time, it can also be widely used in application scenarios that require network cycle coordinated synchronization, giving full play to the processor's computing speed, and can improve the network internal and external coordinated synchronization accuracy to the processor's operating speed level.
[0101] like Figure 2 、 Figure 3As shown, the embodiment of the present invention provides an internal and external synchronization device for a Byzantine computer system based on a TTE network. The device embodiment can be implemented by software, hardware, or a combination of software and hardware. From the hardware level, as Figure 2 As shown in FIG, a hardware architecture diagram of a computing device where an internal and external synchronization device of a Byzantine computer system based on a TTE network is located is provided in an embodiment of the present invention. Figure 2 In addition to the processor, memory, network interface, and non-volatile memory shown, the computing device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 3 As shown, as a logical device, the CPU of the computing device in which it is located reads the corresponding computer program in the non-volatile memory into the memory and runs it. This embodiment provides an internal and external synchronization device of a Byzantine computer system based on a TTE network, including:
[0102] An acquisition module 300 is configured to acquire a first operating cycle of a Byzantine computer system using a synchronous Byzantine protocol and a second operating cycle inputted by a TTE network; wherein the first operating cycle includes a plurality of first synchronization cycles, and the second operating cycle includes a plurality of second synchronization cycles;
[0103] The synchronization module 302 executes, for each first synchronization period:
[0104] Acquire a current second synchronization cycle corresponding to the first synchronization cycle, and determine a first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle;
[0105] The first synchronization period is adjusted according to the first initial time and the second initial time to obtain a revised synchronization period, thereby completing the synchronization between the first synchronization period and the current second synchronization period.
[0106] In some specific implementations, the acquisition module 300 may be used to execute the above step 100 , and the synchronization module 302 may be used to execute the above steps 102 and 104 .
[0107] In some specific implementations, the synchronization module 302 is further configured to perform the following operations:
[0108] For the first synchronization cycle after the introduction of the TTE network, execute:
[0109] Obtaining a rising edge signal of a first synchronization cycle and latching it to obtain a first initial moment;
[0110] During the first synchronization cycle, when a rising edge signal of a second synchronization cycle of the TTE network is obtained, latching is performed to obtain a second initial time; and the second synchronization cycle is used as the current second synchronization cycle;
[0111] and / or,
[0112] For each first synchronization cycle after the first first synchronization cycle, execute:
[0113] Determine a current second synchronization period corresponding to the first synchronization period in chronological order; wherein each first synchronization period corresponds to a second synchronization period;
[0114] A first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle are determined.
[0115] In some specific implementations, in solution 1, the synchronization module 302 is further configured to perform the following operations:
[0116] Performing a difference operation on the second initial moment and the first initial moment to obtain a difference;
[0117] Determine whether the difference is greater than a calibration threshold;
[0118] If the difference is greater than the correction threshold, the first synchronization period is compensated according to the difference to obtain a corrected synchronization period;
[0119] Determine whether the difference is greater than a desynchronization threshold and whether the revised synchronization period is shorter than the first synchronization period; wherein the desynchronization threshold is greater than the correction threshold;
[0120] If the difference is greater than the out-of-sync threshold and the revised synchronization period is shorter than the first synchronization period, the tasks included in the revised synchronization period are executed according to the preset task priority;
[0121] The modified synchronization period is determined by the following formula:
[0122] T n+1 =T n +(t1-t0)
[0123] Among them, T n+1 Used to characterize the modified synchronization period; T n It is used to represent the first synchronization period; t1 is used to represent the second initial moment; and t0 is used to represent the first initial moment.
[0124] In some specific implementations, in solution 1, the synchronization module 302 is further configured to perform the following operations:
[0125] Performing a difference operation on the second initial moment and the first initial moment to obtain a difference;
[0126] Determine whether the difference is greater than a calibration threshold;
[0127] If the difference is greater than the correction threshold, the first synchronization period is compensated according to the difference to obtain a corrected synchronization period;
[0128] Determine whether the difference is greater than a desynchronization threshold and whether the revised synchronization period is shorter than the first synchronization period; wherein the desynchronization threshold is greater than the correction threshold;
[0129] If the difference is greater than the out-of-step threshold and the revised synchronization period is shorter than the first synchronization period, the first synchronization period is compensated according to a preset compensation amount to obtain an updated revised synchronization period, and the tasks included in the updated revised synchronization period are executed according to a preset task priority; wherein the preset compensation amount is less than the difference;
[0130] The modified synchronization period is determined by the following formula:
[0131] T n+1 =T n +(t1-t0)
[0132] Among them, T n+1 Used to characterize the modified synchronization period; T n It is used to represent the first synchronization period; t1 is used to represent the second initial moment; and t0 is used to represent the first initial moment.
[0133] In some more specific implementations, the synchronization module 302 is further configured to perform the following operations:
[0134] Obtain the safety level, importance level and necessity level of each task included in the revised synchronization cycle;
[0135] The priority score of each task is determined based on the safety level, importance level and necessity level; the priority score is determined by the following formula:
[0136] S i =α i x1+β i x2+γ i x3
[0137] Among them, S i Used to characterize the priority score of the i-th task; α i is the score of the security level corresponding to the i-th task; β i is the importance level score corresponding to the i-th task; γ i is the score of the necessary level corresponding to the i-th task; x1 is the weight value of the safety level; x2 is the weight value of the importance level; x3 is the weight value of the necessary level;
[0138] Sort the tasks in descending order of priority to get the priority order;
[0139] During the correction synchronization cycle, tasks are executed in order of priority.
[0140] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the internal / external synchronization device for a Byzantine computer system based on a TTE network. In other embodiments of the present invention, an internal / external synchronization device for a Byzantine computer system based on a TTE network may include more or fewer components than illustrated, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0141] The information interaction, execution process, etc. between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention and will not be repeated here.
[0142] An embodiment of the present invention further provides a computing device including a memory and a processor, wherein the memory stores a computer program. When the processor executes the computer program, an internal and external synchronization method of a Byzantine computer system based on a TTE network in any embodiment of the present invention is implemented.
[0143] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor executes an internal and external synchronization method of a Byzantine computer system based on a TTE network according to any embodiment of the present invention.
[0144] Specifically, a system or device equipped with a storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program codes stored in the storage medium.
[0145] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.
[0146] Examples of storage media for providing program code 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 can be downloaded from a server computer via a communication network.
[0147] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.
[0148] In addition, it can be understood that the program code read from the storage medium is written into a memory provided in an expansion board inserted into the computer or into a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.
[0149] It should be noted that, in this article, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical factors in the process, method, article or device comprising the elements.
[0150] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc. Various media that can store program codes.
[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for internal and external synchronization of a Byzantine computer system based on a TTE network, characterized in that: Applied to Byzantine computer systems introduced into the TTE network, including: Obtaining a first operating cycle of the Byzantine computer system using a synchronous Byzantine protocol and a second operating cycle input by the TTE network; wherein the first operating cycle includes a plurality of first synchronization cycles, and the second operating cycle includes a plurality of second synchronization cycles; For each of the first synchronization cycles, the following steps are performed: Acquire a current second synchronization cycle corresponding to the first synchronization cycle, and determine a first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle; The first synchronization period is adjusted according to the first initial time and the second initial time to obtain a revised synchronization period, thereby completing the synchronization between the first synchronization period and the current second synchronization period.
2. The method according to claim 1, characterized in that The acquiring of the current second synchronization cycle corresponding to the first synchronization cycle, and determining the first initial time of the first synchronization cycle and the second initial time of the current second synchronization cycle, includes: For the first synchronization period after the TTE network is introduced, executing: Obtaining a rising edge signal of the first synchronization period and latching it to obtain the first initial moment; When a rising edge signal of a second synchronization cycle of the TTE network is obtained within the duration of the first synchronization cycle, latching is performed to obtain the second initial time; and the second synchronization cycle is used as the current second synchronization cycle; and / or, For each of the first synchronization cycles after the first first synchronization cycle, executing: Determine a current second synchronization period corresponding to the first synchronization period in chronological order; wherein each of the first synchronization periods corresponds to one second synchronization period; A first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle are determined.
3. The method according to claim 1, characterized in that The adjusting the first synchronization period according to the first initial time and the second initial time to obtain a modified synchronization period includes: performing a difference operation on the second initial moment and the first initial moment to obtain a difference; Determining whether the difference is greater than a calibration threshold; If the difference is greater than the correction threshold, the first synchronization period is compensated according to the difference to obtain a corrected synchronization period.
4. The method according to claim 3, characterized in that After determining whether the difference is greater than the correction threshold, the method further includes: Determining whether the difference is greater than a desynchronization threshold and whether the modified synchronization period is shorter than the first synchronization period; wherein the desynchronization threshold is greater than the correction threshold; If the difference is greater than the desynchronization threshold and the revised synchronization period is shorter than the first synchronization period, the tasks included in the revised synchronization period are executed according to the preset task priority.
5. The method according to claim 4, characterized in that The performing of the tasks included in the modified synchronization period according to the preset task priority includes: Obtaining the security level, importance level, and necessity level of each task included in the modified synchronization period; Determining a priority score for each of the tasks according to the safety level, the importance level, and the necessity level; Sort the tasks in descending order of priority to obtain a priority order; The tasks are executed sequentially in the priority order within the modified synchronization period.
6. The method according to any one of claims 3 to 5, characterized in that The modified synchronization period is determined by the following formula: T n+1 =T n +(t1-t0) Among them, T n+1 Used to represent the modified synchronization period; T n is used to represent the first synchronization period; t1 is used to represent the second initial moment; t0 is used to represent the first initial moment.
7. An internal and external synchronization device of a Byzantine computer system based on a TTE network, characterized in that: include: an acquisition module, configured to acquire a first operating cycle of the Byzantine computer system using a synchronous Byzantine protocol and a second operating cycle input by the TTE network; wherein the first operating cycle includes a plurality of first synchronization cycles, and the second operating cycle includes a plurality of second synchronization cycles; For each of the first synchronization cycles, the synchronization module executes: Acquire a current second synchronization cycle corresponding to the first synchronization cycle, and determine a first initial time of the first synchronization cycle and a second initial time of the current second synchronization cycle; The first synchronization period is adjusted according to the first initial time and the second initial time to obtain a revised synchronization period, thereby completing the synchronization between the first synchronization period and the current second synchronization period.
8. The device according to claim 7, characterized in that The synchronization module is also used to perform the following operations: performing a difference operation on the second initial moment and the first initial moment to obtain a difference; Determining whether the difference is greater than a calibration threshold; If the difference is greater than the correction threshold, the first synchronization period is compensated according to the difference to obtain a corrected synchronization period.
9. A computing device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Synchronization method for task partitioning and communication scheduling in time trigger network
CN105577310A
Configuration and method to guarantee high integrity data in a redundant voting data system
US20200089583A1