Multi-cycle real-time redundancy method, device, electronic equipment and computer storage medium

By synchronizing clock ticks and data transmission between controllers, the real-time performance and resource utilization issues of redundancy schemes under multi-cycle scheduling are resolved, achieving efficient multi-cycle real-time redundancy.

CN117908431BActive Publication Date: 2026-05-29SUPCON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUPCON TECH CO LTD
Filing Date
2023-12-12
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In multi-cycle scheduling scenarios, the existing fixed scan cycle redundancy scheme cannot meet the real-time requirements, and the fast scheduling cycle will consume a lot of system resources, resulting in reduced system efficiency.

Method used

The clock cycle of the control module scheduler is synchronized through the periodic synchronization signal line between the working side and the standby side controllers, and control modules with different cycles are scheduled to be executed according to the same clock cycle. After the scheduling is executed, the working side controller sends data through the redundant port, and the standby side controller copies the data from the buffer to the memory area before scheduling.

Benefits of technology

It achieves improved system resource utilization and real-time performance while meeting redundancy requirements, and supports multi-cycle real-time redundancy with fast scheduling cycles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117908431B_ABST
    Figure CN117908431B_ABST
Patent Text Reader

Abstract

The application discloses a multi-period real-time redundancy method and device, electronic equipment and computer storage medium. The method synchronizes the clock beats of the control module scheduler between the working side controller and the standby side controller through the period synchronization signal line between the working side controller and the standby side controller, and the working side controller and the standby side controller respectively execute different period control modules according to the beat scheduling. The working side controller sends the data needing redundancy to the standby side controller through the redundancy port corresponding to the control module period after scheduling and executing the control module of one period. The standby side controller copies and updates the data needing redundancy of the working side controller from the corresponding buffer area to the memory data area running the control module before scheduling and executing the control module of one period. The control module of one period is executed after the data needing redundancy of the working side controller is updated. The multi-period real-time redundancy supporting fast scheduling period is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a multi-cycle real-time redundancy method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] Currently, when the controller is configured with redundancy, the controller in the working state sends real-time data to the standby controller in each fixed basic scan cycle. After receiving the data, the standby controller copies it to the corresponding memory area to ensure that the real-time data of the standby controller is consistent with that of the working controller, thereby achieving the purpose of synchronizing critical data.

[0003] However, during operation, the controller can only perform real-time redundancy according to a fixed scan cycle. Due to the increasing real-time requirements of application industries, the controller provides fast logic control functions, supporting a fast scheduling cycle of 20ms. Simultaneously, to improve system efficiency and resource utilization, the controller supports multi-cycle scheduling, allowing different CMs to run within the controller with different scheduling cycles. Therefore, in multi-cycle scheduling scenarios with fast cycles, a redundancy scheme with a fixed basic scan cycle cannot meet the real-time redundancy requirements of multiple cycles, while redundancy with a fast scheduling cycle would consume a large amount of system resources and severely reduce system efficiency. Summary of the Invention

[0004] In view of this, this application provides a multi-cycle real-time redundancy method, apparatus, electronic device and computer storage medium to realize multi-cycle real-time redundancy that supports fast scheduling cycles, thereby improving the rational utilization rate and real-time performance of system resources while meeting redundancy functional requirements.

[0005] The first aspect of this application provides a multi-cycle real-time redundancy method applied to a working-side controller, wherein the working-side controller sends a cycle synchronization signal to the standby-side controller through a cycle synchronization signal line in each basic scan cycle, including:

[0006] After receiving the clock synchronization request from the standby controller, the clock tick of the control module scheduler of the working controller is sent to the standby controller.

[0007] Once the clock cycles of the control module schedulers of the working side controller and the standby side controller are synchronized, the working side controller executes control modules of different cycles according to the clock cycle schedule; wherein, the clock cycle schedules of the working side controller and the standby side controller are the same;

[0008] For each cycle of the control module, after the working-side controller schedules and executes the control module for that cycle once, it sends the data that needs to be redundant to the standby-side controller through the redundant port corresponding to the control module cycle.

[0009] Optionally, the working-side controller updates the clock cycle of the control module scheduler according to the system timer.

[0010] A second aspect of this application provides a multi-cycle real-time redundancy method applied to a standby-side controller, comprising:

[0011] Upon receiving the periodic synchronization signal for the first time, a clock tick synchronization request is sent to the working-side controller; wherein, the clock tick synchronization request is used to request the clock tick of the control module scheduler of the working-side controller;

[0012] After receiving the clock tick from the control module scheduler of the working side controller, it synchronizes the clock tick of its own control module scheduler with the clock tick of the control module scheduler of the working side controller.

[0013] Once the clock cycles of the control module schedulers of the standby controller and the working controller are synchronized, the clock cycles of its own control module schedulers are continuously updated according to the periodic synchronization signal sent by the working controller.

[0014] Control modules with different cycles are executed according to a clock cycle schedule; wherein, the clock cycle schedule of the working side controller and the standby side controller is the same;

[0015] After receiving the redundant data required by the working side controller, the redundant data required by the working side controller is stored in the corresponding buffer according to the redundant port corresponding to the control module cycle.

[0016] For each cycle of the control module, before scheduling the execution of the control module for that cycle, the standby controller copies and updates the redundant data required by the working controller from the corresponding buffer to the memory data area where the control module runs.

[0017] After updating the redundant data required by the working side controller, the control module that executes the cycle is scheduled.

[0018] Optionally, redundant processes in different cycles do not affect each other.

[0019] A third aspect of this application provides a multi-cycle real-time redundancy device applied to a working-side controller, wherein the working-side controller sends a cycle synchronization signal to a standby-side controller via a cycle synchronization signal line during each basic scan cycle, including:

[0020] The first transmitting unit is used to send the clock tick of the control module scheduler of the working controller to the standby controller after receiving the clock tick synchronization request sent by the standby controller.

[0021] An execution unit is used to schedule the execution of control modules of different cycles according to the clock cycle of the control module scheduler of the working side controller and the standby side controller after the clock cycle of the control module scheduler is synchronized; wherein the clock cycle scheduling of the working side controller and the standby side controller is the same;

[0022] The second sending unit is used for each cycle of the control module. After the working-side controller schedules and executes the control module for the cycle once, it sends the data that needs to be redundant to the standby-side controller through the redundant port corresponding to the control module cycle.

[0023] Optionally, the working-side controller updates the clock cycle of the control module scheduler according to the system timer.

[0024] The fourth aspect of this application provides a multi-cycle real-time redundancy device applied to a backup-side controller, comprising:

[0025] The third transmitting unit is used to send a clock timing synchronization request to the working side controller when the periodic synchronization signal is received for the first time; wherein, the clock timing synchronization request is used to request the clock timing of the control module scheduler of the working side controller;

[0026] The synchronization unit is used to synchronize the clock of its own control module scheduler with the clock of the control module scheduler of the working side controller after receiving the clock tick of the control module scheduler of the working side controller.

[0027] The update unit is used to continuously update the clock of its own control module scheduler according to the periodic synchronization signal sent by the working side controller after the clock of the control module scheduler of the standby side controller and the working side controller has been synchronized.

[0028] The second execution unit is used to execute control modules of different cycles according to the clock schedule; wherein the clock schedule of the working side controller and the standby side controller is the same;

[0029] The storage unit is used to receive the redundant data required by the working side controller and store the redundant data required by the working side controller into the corresponding buffer according to the redundant port corresponding to the control module cycle.

[0030] The copy unit is used for each cycle of the control module. Before the backup controller schedules the execution of the control module for the cycle, it copies the redundant data required by the working controller from the corresponding buffer to the memory data area where the control module runs.

[0031] The scheduling unit is used to schedule the control module that executes the cycle after updating the redundant data required by the working side controller.

[0032] Optionally, redundant processes in different cycles do not affect each other.

[0033] The fifth aspect of this application provides an electronic device, comprising:

[0034] One or more processors;

[0035] A storage device on which one or more programs are stored;

[0036] When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-cycle real-time redundancy method as described in any of the first aspects, or the multi-cycle real-time redundancy method as described in any of the second aspects.

[0037] The sixth aspect of this application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the multi-cycle real-time redundancy method as described in any one of the first aspects, or the multi-cycle real-time redundancy method as described in any one of the second aspects.

[0038] As can be seen from the above scheme, this application provides a multi-cycle real-time redundancy method, apparatus, electronic device, and computer storage medium. This method synchronizes the clock cycle of the control module scheduler between the working-side controller and the standby-side controller via a periodic synchronization signal line. The working-side controller and the standby-side controller schedule and execute control modules of different cycles according to their respective clock cycles; wherein the clock cycles of the working-side controller and the standby-side controller are the same. After scheduling and executing the control module of the specified cycle once, the working-side controller sends the data requiring redundancy to the standby-side controller through the redundancy port corresponding to the control module cycle. Before scheduling and executing the control module of the specified cycle once, the standby-side controller copies and updates the data requiring redundancy from the corresponding buffer of the working-side controller to the memory data area where the control module runs; after updating the data requiring redundancy in the working-side controller, it schedules and executes the control module of the specified cycle. This achieves multi-cycle real-time redundancy that supports fast scheduling cycles, improving the rational utilization rate and real-time performance of system resources while meeting redundancy functional requirements. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0040] Figure 1 A schematic diagram illustrating a connection method for a redundant communication channel provided in an embodiment of this application;

[0041] Figure 2 A detailed flowchart of a multi-cycle real-time redundancy method provided in this application embodiment;

[0042] Figure 3 A schematic diagram illustrating the process of synchronizing the clock ticks of a standby state controller with a CM scheduler, provided in an embodiment of this application;

[0043] Figure 4 A schematic diagram of a multi-cycle real-time redundant data interaction process provided in an embodiment of this application;

[0044] Figure 5 A schematic diagram of a multi-cycle real-time redundancy device (working-side controller) provided for an embodiment of this application;

[0045] Figure 6 A schematic diagram of a multi-cycle real-time redundancy device (standby side controller) provided for an embodiment of this application;

[0046] Figure 7 This is a schematic diagram of an electronic device that implements a multi-cycle real-time redundancy method, as provided in an embodiment of this application. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0049] The term "comprising" and its variations as used herein are open-ended inclusion, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0050] It should be noted that the concepts of "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0051] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0052] First, the technical terms appearing in this application will be explained:

[0053] CM (Control Module): The control module typically consists of control logic, algorithms, and configuration settings. It is periodically scheduled and executed by the controller during runtime to perform control tasks and data processing.

[0054] Working side and standby side controllers: The working side controller is responsible for handling all control tasks, while the standby side controller does not participate in actual control operations but maintains communication with the working side controller. When the working side controller fails, the standby side controller will take over the operation and execute control tasks to ensure stable system operation during the failure period.

[0055] Real-time redundancy: The process by which the working-side controller synchronizes critical data with the standby-side controller during real-time operation.

[0056] like Figure 1 The diagram illustrates a connection method for a redundant communication channel provided in an embodiment of this application. The working-side controller and the standby-side controller establish a physical communication connection via a base. A periodic synchronization signal line exists between the working-side controller and the standby-side controller to synchronize the clock cycles of the CM scheduler between the controllers.

[0057] Based on the aforementioned redundant communication channel connection method, and the fact that the working-side controller sends a periodic synchronization signal to the standby-side controller via a periodic synchronization signal line during each basic scan cycle, this application embodiment provides a multi-cycle real-time redundancy method, such as... Figure 2 As shown, it includes:

[0058] S201. When the standby controller receives the periodic synchronization signal for the first time, it sends a clock cycle synchronization request to the working controller.

[0059] Among them, the clock timing synchronization request is used to request the clock timing of the control module scheduler of the working side controller.

[0060] It should be noted that the working-side controller updates the clock cycle of the CM scheduler according to its own system clock cycle. Regardless of whether the standby-side controller exists, it will output a signal to the cycle synchronization signal line every basic cycle.

[0061] In the specific implementation of this application, after the standby controller is powered on and initialized, it waits for the working controller to send a periodic synchronization signal; otherwise, CM scheduling is not performed. After receiving the periodic synchronization signal for the first time, the standby controller considers the working controller to be operating normally and sends a clock tick synchronization request to the working controller.

[0062] S202. After receiving the clock synchronization request sent by the standby controller, the working side controller sends the clock tick of the control module scheduler of the working side controller to the standby controller.

[0063] S203. After receiving the clock tick from the control module scheduler of the working controller, the standby controller synchronizes the clock tick of its own control module scheduler with the clock tick of the control module scheduler of the working controller.

[0064] S204. After the clock cycles of the control module schedulers of the working side controller and the standby side controller are synchronized, the working side controller schedules and executes control modules of different cycles according to the clock cycle.

[0065] The clock cycles of the working-side controller and the standby-side controller are identical. This ensures the consistency of the CM scheduler and clock cycles of the working-side controller and the standby-side controller.

[0066] S205. After the clock cycles of the control module schedulers of the standby controller and the working controller are synchronized, the standby controller continuously updates the clock cycles of its own control module scheduler according to the periodic synchronization signal sent by the working side, and schedules the execution of control modules of different cycles according to the cycle.

[0067] In other words, after the clock cycles of the control module schedulers of the standby controller and the working controller are synchronized, CMs with different scheduling cycles will be executed simultaneously in the controllers on both the working and standby sides.

[0068] For ease of understanding, Figure 3The flowchart illustrates the process of synchronizing the CM scheduler clock tick for the standby controller. It shows that the working controller sends a periodic synchronization signal to the standby controller every basic scan cycle and updates its own CM scheduler clock tick. After the standby controller powers on and initializes, it continuously waits for the working controller's periodic synchronization signal. Upon receiving the first periodic synchronization signal, the standby controller requests the CM scheduler clock tick from the working controller to synchronize their clock ticks. Once the standby controller receives the CM scheduler clock tick from the working controller, it synchronizes its own CM scheduler clock tick to the working controller's CM scheduler clock tick, thus completing the clock tick synchronization between the standby and working controllers.

[0069] S206. For each cycle of the control module, after the working side controller schedules and executes the control module for one cycle, it sends the data that needs to be redundant to the standby side controller through the redundant port corresponding to the control module cycle.

[0070] S207. After receiving the redundant data from the working controller, the standby controller stores the redundant data from the working controller into the corresponding buffer according to the redundant port corresponding to the control module cycle.

[0071] S208. For each cycle of the control module, before scheduling the execution of the control module for one cycle, the standby controller copies and updates the redundant data required by the working controller from the corresponding buffer to the memory data area where the control module runs.

[0072] S209. After updating the redundant data required by the working side controller, schedule the control module for this cycle to be executed.

[0073] In the specific implementation of this application, the redundancy processes of different cycles do not affect each other, and real-time redundancy with a fast scheduling cycle of 20ms is supported with less system resource consumption.

[0074] For ease of understanding, Figure 4This is a schematic diagram of a multi-cycle real-time redundant data interaction process. The standby controller includes multiple cycle buffers, such as: 20ms cycle buffer, 100ms cycle buffer, 200ms cycle buffer, 500ms cycle buffer, 1s cycle buffer, XX cycle buffer, etc. After receiving the redundant data from the working controller, the standby controller stores the redundant data from the working controller into the corresponding buffer according to the redundant port corresponding to the control module cycle (e.g., 20ms), that is, put it into the 20ms buffer. Before the standby controller schedules the 20ms CM, it copies the data in the 20ms cycle buffer to the memory data area of ​​the 20ms CM. After updating the redundant data from the working controller, it schedules and executes the 20ms CM.

[0075] As can be seen from the above scheme, this application provides a multi-cycle real-time redundancy method. Through a periodic synchronization signal line between the working-side controller and the standby-side controller, the clock cycle of the control module scheduler between the working-side controller and the standby-side controller is synchronized. The working-side controller and the standby-side controller schedule and execute control modules of different cycles according to their respective clock cycles; wherein the clock cycles of the working-side controller and the standby-side controller are the same. After scheduling and executing a control module for one cycle, the working-side controller sends the data requiring redundancy to the standby-side controller through the redundancy port corresponding to the control module cycle. Before scheduling and executing a control module for one cycle, the standby-side controller copies and updates the data requiring redundancy from the corresponding buffer of the working-side controller to the memory data area where the control module runs; after updating the data requiring redundancy in the working-side controller, it schedules and executes the control module for the cycle. This achieves multi-cycle real-time redundancy that supports fast scheduling cycles, improving the rational utilization of system resources and real-time performance while meeting redundancy requirements.

[0076] Another embodiment of this application provides a multi-cycle real-time redundancy device applied to a working-side controller. The working-side controller sends a periodic synchronization signal to the standby-side controller via a periodic synchronization signal line during each basic scan cycle. This is one implementation of the multi-cycle real-time redundancy device. Figure 5 As shown, it includes:

[0077] The first sending unit 501 is used to send the clock tick of the control module scheduler of the working side controller to the standby side controller after receiving the clock tick synchronization request sent by the standby side controller.

[0078] The execution unit 502 is used to schedule the execution of control modules of different cycles according to the clock cycle after the clock cycle of the control module scheduler of the working side controller and the standby side controller is synchronized.

[0079] The cycle time scheduling of the working side controller and the standby side controller is the same.

[0080] The second sending unit 503 is used for each cycle of the control module. After the working side controller schedules and executes the control module for one cycle, it sends the data that needs to be redundant to the standby side controller through the redundant port corresponding to the control module cycle.

[0081] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 2 As shown, it will not be elaborated further here.

[0082] Another embodiment of this application provides a multi-cycle real-time redundancy device applied to a backup-side controller, such as... Figure 6 As shown, it includes:

[0083] The third transmitting unit 601 is used to send a clock synchronization request to the working side controller when it receives the periodic synchronization signal for the first time.

[0084] Among them, the clock timing synchronization request is used to request the clock timing of the control module scheduler of the working side controller.

[0085] The synchronization unit 602 is used to synchronize its own control module scheduler's clock clock with the clock clock of the control module scheduler of the working side controller after receiving the clock clock of the control module scheduler of the working side controller.

[0086] The update unit 603 is used to continuously update the clock cycle of its own control module scheduler according to the periodic synchronization signal sent by the working side controller after the clock cycle of the control module scheduler of the standby side controller and the working side controller is synchronized.

[0087] The second execution unit 604 is used to schedule the execution of control modules of different cycles according to the clock rhythm.

[0088] The cycle time scheduling of the working side controller and the standby side controller is the same.

[0089] The storage unit 605 is used to receive the redundant data required by the working side controller and store the redundant data required by the working side controller into the corresponding buffer according to the redundant port corresponding to the control module cycle.

[0090] The copy unit 606 is used for each cycle of the control module. Before scheduling the execution of the control module for one cycle, the standby controller copies the redundant data required by the working controller from the corresponding buffer to update the memory data area where the control module runs.

[0091] The scheduling unit 607 is used to schedule the control module of the execution cycle after updating the redundant data required by the working side controller.

[0092] For details on the specific working process of the units disclosed in the above embodiments of this application, please refer to the corresponding method embodiments, such as... Figure 2 As shown, it will not be elaborated further here.

[0093] Optionally, in another embodiment of this application, the working-side controller updates the clock tick of the control module scheduler according to the system timer.

[0094] Optionally, in another embodiment of this application, the redundant processes of different cycles do not affect each other.

[0095] As can be seen from the above scheme, this application provides a multi-cycle real-time redundancy device. Through a periodic synchronization signal line between the working-side controller and the standby-side controller, the clock cycle of the control module scheduler between the working-side controller and the standby-side controller is synchronized. The working-side controller and the standby-side controller schedule and execute control modules of different cycles according to their respective clock cycles; wherein, the clock cycles of the working-side controller and the standby-side controller are the same. After scheduling and executing a control module for one cycle, the working-side controller sends the data requiring redundancy to the standby-side controller through the redundancy port corresponding to the control module cycle. Before scheduling and executing a control module for one cycle, the standby-side controller copies and updates the data requiring redundancy from the corresponding buffer of the working-side controller to the memory data area where the control module runs; after updating the data requiring redundancy in the working-side controller, it schedules and executes the control module for the cycle. This achieves multi-cycle real-time redundancy that supports fast scheduling cycles, improving the rational utilization rate and real-time performance of system resources while meeting redundancy functional requirements.

[0096] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0097] Another embodiment of this application provides an electronic device, such as... Figure 7 As shown, it includes:

[0098] One or more processors 701.

[0099] Storage device 702, on which one or more programs are stored.

[0100] When one or more programs are executed by one or more processors 701, the one or more processors 701 implement the multi-cycle real-time redundancy method as described in any of the above embodiments.

[0101] Another embodiment of this application provides a computer storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements a multi-cycle real-time redundancy method as described in any of the above embodiments.

[0102] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0103] It should be noted that the computer-readable medium described above in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0104] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0105] Another embodiment of this application provides a computer program product, which, when executed, is used to perform the multi-cycle real-time redundancy method described above.

[0106] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined in the methods of the embodiments of this application.

[0107] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A multi-cycle real-time redundancy method, characterized in that, Applied to the working-side controller, which sends a periodic synchronization signal to the standby-side controller via a periodic synchronization signal line during each basic scan cycle, including: After receiving the clock synchronization request from the standby controller, the clock tick of the control module scheduler of the working controller is sent to the standby controller. Once the clock cycles of the control module schedulers of the working side controller and the standby side controller are synchronized, the working side controller executes control modules of different cycles according to the clock cycle schedule; wherein, the clock cycle schedules of the working side controller and the standby side controller are the same; For each cycle of the control module, after the working-side controller schedules and executes the control module for that cycle once, it sends the data that needs to be redundant to the standby-side controller through the redundant port corresponding to the control module cycle.

2. The multi-cycle real-time redundancy method according to claim 1, characterized in that, The working-side controller updates the clock cycle of the control module scheduler according to the system timer.

3. A multi-cycle real-time redundancy method, characterized in that, Applications to standby-side controllers include: Upon receiving the periodic synchronization signal for the first time, a clock tick synchronization request is sent to the working-side controller; wherein, the clock tick synchronization request is used to request the clock tick of the control module scheduler of the working-side controller; After receiving the clock tick from the control module scheduler of the working side controller, it synchronizes the clock tick of its own control module scheduler with the clock tick of the control module scheduler of the working side controller. Once the clock cycles of the control module schedulers of the standby controller and the working controller are synchronized, the clock cycles of its own control module schedulers are continuously updated according to the periodic synchronization signal sent by the working controller. Control modules with different cycles are executed according to a clock cycle schedule; wherein, the clock cycle schedule of the working side controller and the standby side controller is the same; After receiving the redundant data required by the working side controller, the redundant data required by the working side controller is stored in the corresponding buffer according to the redundant port corresponding to the control module cycle. For each cycle of the control module, before scheduling the execution of the control module for that cycle, the standby controller copies and updates the redundant data required by the working controller from the corresponding buffer to the memory data area where the control module runs. After updating the redundant data required by the working side controller, the control module that executes the cycle is scheduled.

4. The multi-cycle real-time redundancy method according to claim 3, characterized in that, Redundant processes in different cycles do not affect each other.

5. A multi-cycle real-time redundancy device, characterized in that, Applied to the working-side controller, which sends a periodic synchronization signal to the standby-side controller via a periodic synchronization signal line during each basic scan cycle, including: The first transmitting unit is used to send the clock tick of the control module scheduler of the working controller to the standby controller after receiving the clock tick synchronization request sent by the standby controller. An execution unit is used to schedule the execution of control modules of different cycles according to the clock cycle of the control module scheduler of the working side controller and the standby side controller after the clock cycle of the control module scheduler is synchronized; wherein the clock cycle scheduling of the working side controller and the standby side controller is the same; The second sending unit is used for each cycle of the control module. After the working-side controller schedules and executes the control module for the cycle once, it sends the data that needs to be redundant to the standby-side controller through the redundant port corresponding to the control module cycle.

6. The multi-cycle real-time redundancy device according to claim 5, characterized in that, The working-side controller updates the clock cycle of the control module scheduler according to the system timer.

7. A multi-cycle real-time redundancy device, characterized in that, Applications to standby-side controllers include: The third transmitting unit is used to send a clock timing synchronization request to the working side controller when the periodic synchronization signal is received for the first time; wherein, the clock timing synchronization request is used to request the clock timing of the control module scheduler of the working side controller; The synchronization unit is used to synchronize the clock of its own control module scheduler with the clock of the control module scheduler of the working side controller after receiving the clock tick of the control module scheduler of the working side controller. The update unit is used to continuously update the clock of its own control module scheduler according to the periodic synchronization signal sent by the working side controller after the clock of the control module scheduler of the standby side controller and the working side controller has been synchronized. The second execution unit is used to execute control modules of different cycles according to the clock schedule; wherein the clock schedule of the working side controller and the standby side controller is the same; The storage unit is used to receive the redundant data required by the working side controller and store the redundant data required by the working side controller into the corresponding buffer according to the redundant port corresponding to the control module cycle. The copy unit is used for each cycle of the control module. Before scheduling the execution of the control module for the cycle, the standby controller copies the redundant data required by the working controller from the corresponding buffer to update the memory data area where the control module runs. The scheduling unit is used to schedule the control module that executes the cycle after updating the redundant data required by the working side controller.

8. The multi-cycle real-time redundancy device according to claim 7, characterized in that, Redundant processes in different cycles do not affect each other.

9. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-cycle real-time redundancy method as described in any one of claims 1 to 2, or the multi-cycle real-time redundancy method as described in any one of claims 3 to 4.

10. A computer storage medium, characterized in that, It stores a computer program, wherein when the computer program is executed by a processor, it implements the multi-cycle real-time redundancy method as described in any one of claims 1 to 2, or the multi-cycle real-time redundancy method as described in any one of claims 3 to 4.

Citation Information

Patent Citations

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

    CN104536350A

  • Method, device and system for synchronizing main equipment and standby equipment

    CN115276868A