A fast redundancy method for multi-task control systems

By performing data redundancy in stages according to user data retrieval in a multi-task control system, the problem of insufficient speed in the redundancy process in existing technologies is solved, and real-time and fast data redundancy is achieved.

CN114609892BActive Publication Date: 2025-12-02SUPCON TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111669840.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-12-02
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing multi-task control systems cannot meet the speed requirements during redundancy processes, lacking both real-time and speed-based data redundancy.

Method used

Based on the usage of user data in each task, the corresponding data is immediately redundant after the relevant task is completed. By statistically analyzing and calculating all related data variables of each user task, the data variables that have not been called by other low-priority user tasks are redundantly added in advance when high-priority user tasks are completed. Redundancy is then added sequentially when subsequent user tasks are completed, achieving step-by-step and real-time data synchronization.

Benefits of technology

While ensuring the integrity of redundant data, the real-time and speed requirements of redundancy are met, and the data variable redundancy time is reduced after the lowest priority user task is completed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114609892B_ABST
    Figure CN114609892B_ABST
Patent Text Reader

Abstract

This invention discloses a fast redundancy method for a multi-task control system, comprising: statistically analyzing all associated data variables of each user task; detecting and analyzing redundant data variables corresponding to each user task; and performing redundancy on the redundant data variables corresponding to the user task at the end of the user task. This invention can perform redundancy on the redundant data variables corresponding to each user task at the end of the user task; furthermore, by determining the lowest priority task associated with each data variable, the corresponding data variables marked as associated with the user task are redundant at the end of the user task. This ensures that high-priority user tasks end first, and the corresponding redundant data variables are redundant first, achieving step-by-step, real-time redundancy synchronization of data variables. This reduces the data variable redundancy time after the lowest priority user task is completed, satisfying the requirements of real-time redundancy and speed while ensuring the integrity of the redundant data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-task control technology, and more specifically to a fast redundancy method for multi-task control systems. Background Technology

[0002] As control systems become increasingly intelligent, multi-task control systems are becoming more and more common. Currently, the redundancy method in multi-task control systems generally involves not distinguishing the usage of user data variables in related tasks, and directly applying redundancy to all user data after the lowest priority user task is completed. While this method ensures the integrity of the data redundancy, it lacks the real-time and speed of data redundancy.

[0003] For example, Chinese Patent CN104536350B, published on April 12, 2017, discloses a working, standby, and preemptive real-time multi-task controller and its redundancy synchronization method. The method involves the working controller, after completing all user tasks, sending the data to be synchronized to the standby controller via a redundant communication channel. After completing all user tasks, the standby controller, if it finds any previously received synchronization data that has not been processed, saves the synchronization data to the user task's data area to ensure that the preemptive real-time multi-task controller maintains data consistency throughout the redundancy synchronization process. While this method ensures the integrity of data redundancy, it lacks the real-time and speed characteristics of data redundancy. Summary of the Invention

[0004] The technical problem this invention aims to solve is that current multi-task control systems cannot meet the requirements for speed during redundancy. This invention proposes a fast redundancy method for multi-task control systems that, based on the user data's usage in each task, immediately performs redundancy on the corresponding data after the relevant task is completed. This method ensures the integrity of the redundant data while also meeting the requirements for real-time redundancy and speed.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by this invention is as follows: a fast redundancy method for a multi-task control system, comprising several data variables and several user tasks, including the following steps: statistically analyzing all associated data variables of each user task; analyzing and calculating the redundant data variables corresponding to each user task; and redundantizing the redundant data variables corresponding to the user task at the end of the user task. The data variables that a user task needs to call are the associated data variables corresponding to that user task. When executing a low-priority user task, if the low-priority user task is continuously interrupted and inserted by a higher-priority user task, a situation may occur where the higher-priority user task completes first and the lowest-priority user task completes last. The current multi-task control system only redundantizes all user data when the lowest-priority user task completes, that is, all data variables are uniformly redundant only after the lowest-priority user task ends.

[0006] This method first calculates the lowest priority user task and redundant data variables for each data variable. When a high-priority user task completes, it preemptively adds redundancy to data variables not yet called by other user tasks with lower priorities. Subsequent user tasks also add redundancy sequentially when they complete. In other words, when user tasks of different priority levels are interrupted and interleaved, the high-priority user task (the one that completes first) adds redundancy to data variables not yet called by other user tasks. This step-by-step, real-time redundancy synchronization of data variables reduces the redundancy time after the lowest-priority user task completes, ensuring the integrity of the redundant data while meeting the requirements for real-time and speed redundancy.

[0007] Preferably, the redundant data variables are: among all associated data variables of a user task, those data variables that have not been invoked by user tasks with a lower priority than that user task. Each data variable is invoked by one or more user tasks, meaning each user task is associated with one or more data variables. Let the data variables include variables V1, V2, V3, V4, and V5, and the user tasks include tasks F1, F2, F3, and F4 with different priorities. Task F4 has a higher priority than task F3, task F3 has a higher priority than task F2, and task F2 has a higher priority than task F1. The redundant data variable for task F4 is equal to the data variables associated with task F4 minus the data variables associated with tasks F3, F2, and F1; the redundant data variable for task F3 is equal to the data variables associated with task F3 minus the data variables associated with tasks F2 and F1; and so on. For example, if task F4 is associated with variables V2, V4, and V5, and variable V4 exists in the data variables associated with task F3, and variable V2 exists in the data variables associated with task F2, then the redundant data variable for task F4 is variable V5.

[0008] As a preferred approach, when calculating all associated data variables for each user task, the data variables invoked by each user task are placed into an association set V, resulting in an association set V = {V}. i |i=1,2,3...,n}; the redundant data variables of each user task correspond to the redundant set R={V j |j=1,2,3,...,n}, redundant set R∈associative set V, redundant set R=V 关联 -V 低优先级调用 The associative set V = {V} i |i=1,2,3...,n}, the associated set V is the total set of all called data variables, and the redundant sets R and V are corresponding to each user task. 关联 and set V 低优先级调用 All are subsets of the association set V. The redundancy set R of each user task is calculated as: Redundancy set R = W 关联 -V 低优先级调用 V 关联 V is the set of associated data variables for this user task itself. 低优先级调用 V is the set of all associated data variables of this user task that are invoked by user tasks with lower priority than this user task. 低优先级调用 It is set V 关联 A subset of.

[0009] Preferably, when obtaining the association set V, the data variables within association set V are sorted and marked. The data variables invoked by each user task in the multi-task control system are statistically analyzed, randomly arranged, and then placed into association set V and marked in order. Subsequently, the association data variable set V corresponding to each user task is determined. 关联 By directly using the labels of each data variable in the associated set V as the set, the difficulty of identification is reduced and the comparison and calculation of the redundant set R is facilitated.

[0010] Preferably, if the redundant set R corresponding to the user task is an empty set, then no data variable redundancy is performed when the user task is executed.

[0011] The formula for calculating the redundant set R is: Redundant set R = V 关联 -V 低优先级调用 When set V 低优先级调用 Equal to set V 关联 When the user task is executed, all associated data variables are called by low-priority user tasks, and the number of redundant data variables is zero. When the user task is executed, no data variable redundancy is performed, and subsequent tasks are executed directly.

[0012] Preferably, each user task has a different priority level than other user tasks. When a user task is being executed, if a user task with a higher priority level reaches its execution cycle, the lower-priority user task is interrupted, and the higher-priority user task is executed first. If a higher-priority task reaches its execution cycle during the execution of a lower-priority task, the lower-priority task will be interrupted by the higher-priority task until the higher-priority task has completed its execution, after which the lower-priority task will continue to execute.

[0013] Preferably, this method also includes: statistically analyzing the calling status of each data variable in different user tasks; determining the lowest priority task associated with each data variable and marking the association; and redundancy of the corresponding data variables that have been marked for association in the user task at the end of the user task.

[0014] Each invoked data variable can be invoked by one or more user tasks. The lowest priority user task corresponding to each invoked data variable can be analyzed based on priority levels. When a user task finishes execution, it checks if there exists a lowest priority task corresponding to that data variable. If so, the corresponding data variable is redundantly added; otherwise, subsequent user tasks continue execution. This method, unlike calculating redundant data variables, achieves step-by-step redundancy of data variables.

[0015] Preferably, each user task has at least one associated data variable. Each user task can call one or more data variables. During the statistical analysis, all data variables called by each user task need to be recorded for subsequent calculation of redundant data variables corresponding to each user task.

[0016] The substantial effects of this invention are: it can statistically analyze all associated data variables of each user task; analyze and calculate redundant data variables corresponding to each user task; and redundancy the redundant data variables corresponding to the user task at the end of the user task. Furthermore, by determining the lowest priority task associated with each data variable, redundancy is achieved on the corresponding data variables marked for that user task at the end of the user task. This ensures that high-priority user tasks finish first and redundancy is applied to their corresponding redundant data variables first, achieving step-by-step, real-time redundancy synchronization of data variables. This reduces the redundancy time of data variables after the lowest priority user task is completed, satisfying the requirements for real-time redundancy and speed while ensuring the integrity of the redundant data. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the process of performing step-by-step redundancy by calculating redundant data variables in this embodiment;

[0018] Figure 2 This is a schematic diagram illustrating how the variable data in this embodiment is accessed by relevant tasks;

[0019] Figure 3 This is a schematic diagram illustrating the redundant synchronization of relevant variables after each task in this embodiment is completed;

[0020] Figure 4 This is a flowchart illustrating the step-by-step redundancy process in this embodiment, which involves determining the lowest priority task associated with the data variables. Detailed Implementation

[0021] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0022] A fast redundancy method for multi-task control systems, such as Figure 1 As shown, the main steps include: statistically analyzing the calling status of each data variable in different user tasks; analyzing and calculating redundant data variables for each user task; and redundanting the redundant data variables corresponding to the user task at the end of the user task.

[0023] When calculating all associated data variables for each user task, the data variables that will be invoked by each user task are placed into the associated set V, resulting in the associated set V = {V}. i|i=1,2,3...,n}; The association set V is the total set of all called data variables. When obtaining the association set V, the data variables within V can be sorted and marked, which can reduce the difficulty of identification and facilitate the subsequent comparison and calculation of the redundant set R. The redundant data variables of each user task correspond to the redundant set R={V j The redundancy set R for each user task is calculated as follows: Redundancy set R = V 关联 -V 低优先级调用 V 关联 V is the set of associated data variables for this user task itself. 低优先级调用 This is the set of all associated data variables of this user task that are invoked by user tasks with lower priority than this user task.

[0024] A multi-task control system includes several data variables and several user tasks, such as... Figure 2 As shown, assume that the redundant data required by the control system includes V1 to Vn, where V1 to V5 are five data variables. F1 to F4 are four user tasks in the control system, with the following priority: F4 has a higher priority than F3, F3 has a higher priority than F2, and F2 has a higher priority than F1.

[0025] Generally, when a low-priority task is being executed, if the cycle of a high-priority task arrives, the low-priority task will be interrupted by the high-priority task until the high-priority task is completed, at which point the low-priority task will continue to execute.

[0026] This embodiment takes the redundancy of data variables V1 to V5 according to the task call situation as an example. By determining the related variables that need to be redundant for each task, the data variables that need to be redundant for each task are as follows: the data variables that need to be redundant for task F1 are V1 and V4; the data variables that need to be redundant for task F2 are V2 and V3; task F3 has no data variables that need to be redundant; the data variable that needs to be redundant for task F4 is V5.

[0027] When complex situations arise, such as Figure 3As shown, at time T1, task F1 is interrupted and inserted by task F2 during execution; at time T2, task F2 is interrupted and inserted by task F3 during execution; at time T3, task F3 is interrupted and inserted by task F4 during execution; at time T4, task F4 completes; at time T8, task F2 is interrupted by task F4 and the cycle of task F3 has not yet expired. When the tasks end, the associated variables are redundantly synchronized in stages: at times T4 and T9, task F4 completes execution, and variable V5 is redundantly synchronized to the backup controller; at times T6 and T10, task F2 completes execution, and variables V2 and V3 are redundantly synchronized to the backup controller; at time T11, task F1 completes execution, and variables V1 and V4 are redundantly synchronized to the backup controller.

[0028] Because at times T4 and T9, task F4 completes execution, such as Figure 2 As shown. Although the variables associated with F4 include V2, V4, and V5, V2 and V4 are also called by low-priority tasks. For low-priority tasks, they are still intermediate values. To ensure data integrity, V2 and V4 cannot be redundant at this time. Therefore, at times T4 and T9, after task F4 is executed, variable V5 is redundantly synchronized to the backup controller. Similarly, at time T5, the redundancy set of task F3 is empty, and no variables need redundancy; at times T6 and T10, variables V2 and V3 need redundancy; at time T11, after task F1 is executed, variables V1 and V4 need redundancy.

[0029] In addition, such as Figure 4 As shown, step-by-step redundancy can be achieved by determining the lowest priority task corresponding to each data point. The calling behavior of data variables V1 to V5 in each task is as follows: data variable V1 is called only by task F1, and the lowest priority task associated with V1 is determined to be F1; data variable V2 is called by tasks F2 and F4, and the lowest priority task associated with V2 is determined to be F2; data variable V3 is called only by task F2, and the lowest priority task associated with V3 is determined to be F2; data variable V4 is called by tasks F1, F3, and F4, and the lowest priority task associated with V4 is determined to be F1; data variable V5 is called only by task F4, and the lowest priority task associated with V5 is determined to be F4. In this case, simply redundant the corresponding data variable at the end of the lowest priority task achieves the same step-by-step redundancy effect.

[0030] In a multi-task control system, if a general redundancy synchronization method is used, all data variables need to be redundantly synchronized after the lowest priority task is completed, such as at time T11 in the example above. This only ensures the integrity of the data. With this solution, each data variable can be redundantly synchronized directly after the relevant task is completed, ensuring both data integrity and the real-time and speed of redundancy.

[0031] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention.

Claims

1. A fast redundancy method for a multi-task control system, characterized in that, Including several data variables and several user tasks, the redundancy process of a multi-task control system includes the following steps: statistically analyzing all related data variables of each user task; analyzing and calculating the redundant data variables corresponding to each user task; and redundancy processing of the redundant data variables corresponding to the user task at the end of the user task. Redundant data variables are those data variables that are not accessed by user tasks with a lower priority than the user task itself, among all associated data variables of the user task.

2. The fast redundancy method for a multi-task control system according to claim 1, characterized in that, When calculating all associated data variables for each user task, the data variables that will be invoked by each user task are placed into the associated set V, resulting in the associated set V = {V t =1, 2, 3, ..., n}; the redundant data variables of each user task correspond to the redundant set R = {V j |j=1,2,3,...,n}, redundant set R∈associative set V, redundant set R=V 关联 -V 低优先级调用 .

3. The fast redundancy method for a multi-task control system according to claim 2, characterized in that, When obtaining the association set V, sort and mark the data variables within the association set V.

4. The fast redundancy method for a multi-task control system according to claim 2, characterized in that, If the redundant set R corresponding to a user task is an empty set, then no data variable redundancy will be performed when the user task finishes execution.

5. The fast redundancy method for a multi-task control system according to claim 1, characterized in that, Each user task has a priority level different from other user tasks; when a user task is being executed, if a user task with a higher priority level arrives at the execution cycle, the lower priority user task is interrupted and the higher priority user task is executed first.

6. A fast redundancy method for a multi-task control system according to claim 1 or 5, characterized in that, It also includes statistical analysis of the calling status of each data variable in different user tasks; determining the lowest priority task associated with each data variable and marking the association; and redundancy of the corresponding data variables that have been marked for association in the user task at the end of the user task.

7. The fast redundancy method for a multi-task control system according to claim 1, characterized in that, Each user task must have at least one associated data variable.

Citation Information

Patent Citations

  • Working, standby, and preemptive real-time multi-task controllers and their redundancy synchronization methods

    CN104536350B

  • Work, standby and preemption type real-time multi-task controller and redundancy synchronous method thereof

    CN104536350A

  • Real-time data synchronization system based on multi-cluster operation, implementation method and storage medium

    CN112751938A