Internal and external synchronization method of Byzantine computer system based on TTE network

By adjusting the internal synchronization period of the Byzantine computer system to align it with the TTE network synchronization period, the problem of the synchronization period misalignment of the system after accessing the TTE network is solved, and the reliability of the system and the running speed of the processor are improved.

CN119449212AActive Publication Date: 2025-02-14BEIJING INST OF CONTROL ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411462055.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-14
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

After the Byzantine computer system is connected to the TTE network, the internal synchronization period is not aligned with the TTE network synchronization period, which affects the high reliability of the system and the operating speed of the processor.

Method used

By obtaining the running cycles of the Byzantine computer system and the TTE network, adjusting them for each internal synchronization cycle to align them in real time with the TTE network synchronization cycle. The specific steps include obtaining the current TTE network synchronization period, determining the initial time, and performing periodic compensation based on the difference.

Benefits of technology

Real-time alignment between the internal synchronization cycle of Byzantine computer system and the synchronization cycle of TTE network is achieved, ensuring high reliability of the system and stable operation of the processor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449212A_ABST
    Figure CN119449212A_ABST
Patent Text Reader

Abstract

The invention provides an internal and external synchronization method for a Byzantine computer system based on a TTE network, and the method is applied to the Byzantine computer system in which the TTE network is introduced. Comprising the following steps: acquiring a first operation cycle comprising a plurality of first synchronization cycles of a Byzantine computer system adopting a synchronous Byzantine protocol and a second operation cycle comprising a plurality of second synchronization cycles input by a TTE network; for each first synchronization period, executing the following steps: acquiring a current second synchronization period corresponding to the first synchronization period, and determining a first initial moment of the first synchronization period and a second initial moment of the current second synchronization period; and adjusting the first synchronization period according to the first initial moment and the second initial moment to obtain a corrected synchronization period, and completing synchronization. The internal and external synchronization of the Byzantine computer system based on the TTE network provided by the scheme realizes the synchronization of the internal synchronization period and the external synchronization period, and ensures the high reliability of the Byzantine computer system.
Need to check novelty before this filing date? Find Prior Art

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 are usually composed of multiple hot backup machines. Multiple single machines with isomorphic designs receive and process information at the same time, and the result data is output after voting, so it has extremely high reliability. In order to achieve synchronization of output, Byzantine fault-tolerant computers and other multi-machine hot backup computers require a common synchronization cycle to complete tasks such as calculations and data comparison within the same cycle. The synchronization cycle of multiple machines is a prerequisite for the normal operation of Byzantine computers. In order to ensure the reliability of manned spacecraft, the control computer of the manned spacecraft is required to have the ability to recover from Byzantine faults.

[0003] With the development of spacecraft, the computing tasks undertaken by onboard computers have the characteristics of high integration, high computing power and high bandwidth. Byzantine computers are often connected to networks with strong real-time performance. Computers in TTE networks perform operations and other tasks in the same schedule and control cycle, while Byzantine computers work under the internal synchronization cycle of multiple machines. The cycles of the two are not synchronized, which will affect the high reliability of the Byzantine computer system and the operating speed of the processor. Therefore, it is urgent to provide an internal and external synchronization method for the Byzantine computer system based on the TTE network. 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 cycle of the Byzantine computer system with the synchronization cycle 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, and includes:

[0006] Acquire a first operation cycle of the Byzantine computer system using a synchronous Byzantine protocol and a second operation cycle of the TTE network input; wherein the first operation cycle includes a plurality of first synchronization cycles, and the second operation 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 cycle is adjusted according to the first initial moment and the second initial moment to obtain a modified synchronization cycle, thereby completing the synchronization between the first synchronization cycle and the current second synchronization cycle.

[0010] Optionally, the acquiring 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:

[0011] For the first first synchronization period after the TTE network is introduced, executing:

[0012] Acquire a rising edge signal of the first synchronization period and latch it to obtain the first initial time;

[0013] When a rising edge signal of a second synchronization cycle of the TTE network is obtained within the period length 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 of the second synchronization periods;

[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, the adjusting the first synchronization period according to the first initial moment and the second initial moment 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 modified synchronization period.

[0022] Optionally, after determining whether the difference is greater than a correction threshold, the method further includes:

[0023] Determine 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 modified synchronization period is shorter than the first synchronization period, the tasks included in the modified 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 safety level, importance level and necessity level of each task included in the modified synchronization cycle;

[0027] Determining a priority score for each of the tasks according to the safety level, the importance level, and the necessity level;

[0028] Sorting the tasks in descending order of priority scores 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 characterize the modified synchronization period; T n is used to characterize the first synchronization period; t1 is used to characterize the second initial moment; t0 is used to characterize 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, used to acquire a first operation cycle of the Byzantine computer system using a synchronous Byzantine protocol and a second operation cycle of the TTE network input; wherein the first operation cycle includes a plurality of first synchronization cycles, and the second operation 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 cycle is adjusted according to the first initial moment and the second initial moment to obtain a modified synchronization cycle, thereby completing the synchronization between the first synchronization cycle and the current second synchronization cycle.

[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 modified synchronization period.

[0045] In a third aspect, the present invention further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the internal and external synchronization method of the Byzantine computer system based on the TTE network as described in any one of the above items is implemented.

[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 of a Byzantine computer system based on a TTE network. In the Byzantine computer system introduced with the TTE network, a method of correcting the internal synchronization cycle of the Byzantine computer system is adopted to align the internal control cycle with the control cycle of the TTE network in real time, so that the internal control cycle compensation amount is much smaller than the width of the corresponding internal control cycle, and thus 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 of 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. 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 It 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 is a hardware architecture diagram of a computing device provided by an embodiment of the present invention;

[0051] Figure 3 It is a structural diagram of an internal and external synchronization device of a Byzantine computer system based on a TTE network provided by an 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, rather than all the embodiments. Based on the embodiments in 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 The 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, and includes:

[0054] Step 100, obtaining a first operation cycle of a Byzantine computer system using a synchronous Byzantine protocol and a second operation cycle input by a TTE network; wherein the first operation cycle includes a plurality of first synchronization cycles, and the second operation 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 modified synchronization period, and completing the 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 internal control cycle compensation amount 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 of 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 the various steps are performed.

[0060] First, for step 100, obtain the first operation cycle of the Byzantine computer system using the synchronous Byzantine protocol and the second operation cycle of the TTE network input; wherein the first operation cycle includes multiple first synchronization cycles, and the second operation cycle includes multiple second synchronization cycles. It should be noted that when designing the network, the cycle length of the first synchronization cycle is the same as the cycle length of the second synchronization cycle, but due to the operation error of the actual system, the difference in cycle lengths fluctuates by a small amount.

[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] Acquire the rising edge signal of the first first synchronization cycle and latch it to obtain the first initial moment;

[0064] Within the period length of the first synchronization period, when a rising edge signal of the second synchronization period of the TTE network is obtained, latching is performed to obtain a second initial time; and the second synchronization period is used as the current second synchronization period;

[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 Within the cycle length, when the rising edge signal of the second synchronization cycle of the TTE network is obtained, latching is performed to obtain the second initial time t1; and the second synchronization cycle is used as the current second synchronization cycle T TTE1 It should be noted that before the introduction of the TTE network, the duration of each first synchronization cycle is T n , and T n1 =t2-t0, t1 is any time from t0 to t2. Since both the first operation cycle and the second operation cycle include multiple synchronization cycles, and the cycle lengths of the first synchronization cycles and the second synchronization cycles are the same or substantially the same, each initial moment of the 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 previous example, in the first synchronization period T n1 In 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), and since the first synchronization cycle is the same or substantially the same as the second synchronization cycle, the first synchronization cycle is compensated by calculating the difference between the initial times 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 the out-of-step threshold and whether the corrected synchronization period is shorter than the first synchronization period; wherein the out-of-step 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 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, the initial network synchronization is considered to be 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 time. If the difference is less than the correction threshold, the time difference between the first synchronization cycle inside 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, and there is no need to compensate for the first synchronization cycle. At this time, internal and external synchronization has been achieved. In order to further ensure real-time internal and external synchronization, each first synchronization cycle can also be monitored in real time for 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 internal and external synchronization is required, 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 internal and external synchronization is out of step and the cycle difference is too large. At this time, the first synchronization cycle is 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 the execution of important tasks that are important to safety and mission.

[0086] In a preferred embodiment, after determining whether the difference is greater than the correction threshold, a second solution is also included:

[0087] Determine whether the difference is greater than the out-of-step threshold and whether the corrected synchronization period is shorter than the first synchronization period; wherein the out-of-step 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 out-of-step threshold and the corrected synchronization cycle is shorter than the first synchronization cycle, the cycle duration of the corrected synchronization cycle is too short, resulting in the inability to execute some tasks. Therefore, in order to avoid the first synchronization cycle after correction being too short, the difference is no longer used directly to compensate the first synchronization cycle, but 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 cycle duration of the updated corrected synchronization cycle is longer and more tasks can be executed. Thus, in this case, the preset compensation amount is used to asymptotically approximate the external control cycle 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 cycle, which can better ensure the high reliability operation of the Byzantine computer system.

[0090] In a preferred embodiment, the tasks included in the modified synchronization cycle are executed according to the preset task priority, including:

[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 each task in descending order according to the priority score to obtain 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 given 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 the present invention, according to the application scenario and high reliability requirements, users can flexibly set the weight values ​​of the security level, importance level, and necessary level, and the higher the score of each level, the higher the corresponding level. It should be noted that the necessary level is the level of necessary tasks that have to be performed only to ensure the realization of other tasks; the importance level is to ensure the level of important tasks in the corresponding application scenario; the security level is to ensure the level of safe tasks.

[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 latching the star time and difference calculation, and the software and hardware overheads are very small; at the same time, it can also be widely used in application scenarios that require network periodic coordinated synchronization, giving full play to the computing speed of the processor, and being able to improve the accuracy of the internal and external coordinated synchronization of the network to the level of the processor's operating speed.

[0101] like Figure 2 , Figure 3As shown, an embodiment of the present invention provides an internal and external synchronization device of a Byzantine computer system based on a TTE network. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 2 As shown, 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 in the figure, the computing device in which the device is located in the embodiment may also generally 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 device in a logical sense, 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] The acquisition module 300 is used to acquire a first operation cycle of a Byzantine computer system using a synchronous Byzantine protocol and a second operation cycle input by a TTE network; wherein the first operation cycle includes a plurality of first synchronization cycles, and the second operation 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 cycle is adjusted according to the first initial time and the second initial time to obtain a modified synchronization cycle, thereby completing the synchronization between the first synchronization cycle and the current second synchronization cycle.

[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] Acquire the rising edge signal of the first first synchronization cycle and latch it to obtain the first initial moment;

[0110] Within the period length of the first synchronization period, when a rising edge signal of the second synchronization period of the TTE network is obtained, latching is performed to obtain a second initial time; and the second synchronization period is used as the current second synchronization period;

[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 the out-of-step threshold and whether the corrected synchronization period is shorter than the first synchronization period; wherein the out-of-step threshold is greater than the correction threshold;

[0120] 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;

[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 the out-of-step threshold and whether the corrected synchronization period is shorter than the first synchronization period; wherein the out-of-step threshold is greater than the correction threshold;

[0129] 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;

[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 each task in descending order according to the priority score to obtain the priority order;

[0139] During the correction synchronization cycle, tasks are executed in order of priority.

[0140] It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on an internal and external synchronization device of a Byzantine computer system based on a TTE network. In other embodiments of the present invention, an internal and external synchronization device of a Byzantine computer system based on a TTE network may include more or fewer components than shown in the figure, or combine some components, or split some 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 and other contents 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 the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given 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, and 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, on which a computer program is stored. 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 in any embodiment of the present invention.

[0144] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code 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 a part of the present invention.

[0146] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0147] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0148] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to 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-mentioned embodiments.

[0149] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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 statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.

[0150] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments 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 method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic 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 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 that introduce TTE networks, including: Acquire a first operation cycle of the Byzantine computer system using a synchronous Byzantine protocol and a second operation cycle of the TTE network input; wherein the first operation cycle includes a plurality of first synchronization cycles, and the second operation 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 cycle is adjusted according to the first initial moment and the second initial moment to obtain a modified synchronization cycle, thereby completing the synchronization between the first synchronization cycle and the current second synchronization cycle.

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, comprises: For the first first synchronization period after the TTE network is introduced, executing: Acquire a rising edge signal of the first synchronization period and latch it to obtain the first initial time; When a rising edge signal of a second synchronization cycle of the TTE network is obtained within the period length 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 of the second synchronization periods; 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 modified 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: Determine 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 modified synchronization period is shorter than the first synchronization period, the tasks included in the modified 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 cycle according to the preset task priority includes: Obtaining the safety level, importance level and necessity level of each task included in the modified synchronization cycle; Determining a priority score for each of the tasks according to the safety level, the importance level, and the necessity level; Sorting the tasks in descending order of priority scores 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 characterize the modified synchronization period; T n is used to characterize the first synchronization period; t1 is used to characterize the second initial moment; t0 is used to characterize 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, used to acquire a first operation cycle of the Byzantine computer system using a synchronous Byzantine protocol and a second operation cycle of the TTE network input; wherein the first operation cycle includes a plurality of first synchronization cycles, and the second operation 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 cycle is adjusted according to the first initial moment and the second initial moment to obtain a modified synchronization cycle, thereby completing the synchronization between the first synchronization cycle and the current second synchronization cycle.

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 modified 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