Synchronous execution method, device, storage medium and equipment
By analyzing and synchronizing operation instructions in a redundant controller environment, and using the instruction count accumulation mechanism, the synchronization execution problem caused by communication exceptions of master and slave controllers is solved, achieving higher robustness and synchronous execution reliability.
Patent Information
- Application Number
- CN202311003018.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-08-10
AI Technical Summary
In the redundant controller environment, it is difficult for the prior art to ensure that the master and slave controllers simultaneously execute operation instructions when communication is abnormal, resulting in impairment of the stability of the control system.
By analyzing the operation instructions of the host computer software and synchronizing them to the slave controller, activating the command counter for accumulation until it accumulates to the threshold, executing the operation instructions, ensuring that the slave controller independently accumulates the command count, and using the message form to interact with the command, correct signal and accumulated command count.
Improves the robustness of synchronous operation when communication between master and slave controllers is abnormal in redundant environments, ensuring that all controllers perform operations simultaneously under preset conditions.
Smart Images

Figure CN117008965B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a synchronous execution method, device, storage medium and equipment, and belongs to the field of industrial process control. Background Art
[0002] In the field of industrial process control, for some critical applications, control systems require redundant controllers to ensure the safe and stable operation of the system. When the host computer software issues an operation command to the redundant controllers, it must ensure that all controllers in the redundant environment execute the operation synchronously to avoid unexpected negative effects such as data inconsistency.
[0003] Some control systems require the host computer software to issue operational instructions to all controllers simultaneously. If any of these communication links experiences an anomaly, the controllers may receive the instructions at different times, causing the instructions to be executed asynchronously or even not executed at all, impacting the stability of the entire control system.
[0004] To optimize the above problems, some control systems allow the host computer software to issue operation instructions to the master controller in the redundant controller, and then the master controller synchronizes the operation instructions to the slave controller. However, during the synchronization process, if there is an abnormality in the communication between the master and slave controllers, it is easy to cause the operation to fail to be executed synchronously or not be executed. Summary of the Invention
[0005] The present invention provides a synchronous execution method, apparatus, storage medium and device, which solve the problems disclosed in the background technology.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] A synchronous execution method, comprising:
[0008] Parse the operation instructions issued by the host computer software and synchronize the operation instructions to the slave controller;
[0009] In response to receiving the error-free signal fed back by all slave controllers, the instruction counter is activated to accumulate the instruction count and continuously synchronize the accumulated instruction count to the slave controller; wherein, when the instruction count is synchronized, the slave controller independently accumulates; on the slave controller side, if the operation instruction is parsed correctly and the communication with the master controller is normal, the error-free signal is fed back;
[0010] In response to the instruction count being accumulated to a threshold, the operation instruction is executed; wherein, on the slave controller side, when the instruction count is accumulated to a threshold, the operation instruction is also executed.
[0011] Operation instructions include file update, online value setting and mode switching; host computer software includes configuration software and monitoring software.
[0012] The instruction count is incremented by 1 in each preset operation cycle.
[0013] Operation instructions, error-free signals and accumulated instruction counts are all exchanged in the form of messages.
[0014] A synchronous execution device, comprising:
[0015] The operation instruction synchronization module parses the operation instructions issued by the host computer software and synchronizes the operation instructions to the slave controller;
[0016] The instruction count accumulation synchronization module, in response to receiving the error-free signal fed back by all slave controllers, activates the instruction counter, accumulates the instruction count, and continuously synchronizes the accumulated instruction count to the slave controller; wherein, when the instruction count is synchronized, the slave controller independently accumulates; on the slave controller side, if the operation instruction is parsed correctly and the communication with the master controller is normal, it will feedback the error-free signal;
[0017] The synchronous execution module executes the operation instruction in response to the instruction count being accumulated to a threshold value; wherein, on the slave controller side, the operation instruction is also executed when the instruction count is accumulated to a threshold value.
[0018] In the operation instruction synchronization module, the operation instructions include file update, online value setting and mode switching; the host computer software includes configuration software and monitoring software.
[0019] In the instruction count accumulation synchronization module, the instruction count is accumulated by 1 in each preset operation cycle.
[0020] Operation instructions, error-free signals and accumulated instruction counts are all exchanged in the form of messages.
[0021] A computer-readable storage medium storing one or more programs including instructions that, when executed by a computing device, cause the computing device to perform a synchronous execution method.
[0022] A computing device includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing a synchronous execution method.
[0023] The beneficial effects achieved by the present invention are as follows: the master controller of the present invention synchronizes the operation instructions to the slave controllers, activates the instruction counter after receiving the correct signals fed back by all the slave controllers, and accumulates the instruction counts. The slave controller accumulates the instruction count results of the master controller independently after receiving them. This ensures that as long as the slave controller successfully receives the synchronization instruction count of the master controller once before the master controller operation is executed (that is, before the count reaches the threshold), all controllers can execute the operation synchronously. Compared with the existing technology, the robustness of the synchronous execution of operations when communication abnormalities occur between the master controller and the slave controllers in a redundant environment is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flow chart of the method of the present invention;
[0025] Figure 2 The figure is a flow chart of an embodiment of the method of the present invention. Implementation Method
[0026] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0027] like Figure 1 As shown, a synchronous execution method includes the following steps:
[0028] Step 1: parse the operation instructions issued by the host computer software and synchronize the operation instructions to the slave controller.
[0029] Step 2, in response to receiving the correct signal fed back from all slave controllers, activate the instruction counter, accumulate the instruction count, and continuously synchronize the accumulated instruction count to the slave controller; wherein, when the instruction count is synchronized, the slave controller accumulates independently; on the slave controller side, if the operation instruction is parsed correctly and the communication with the master controller is normal, then the correct signal is fed back.
[0030] Step 3: In response to the instruction count being accumulated to a threshold, executing the operation instruction; wherein, on the slave controller side, when the instruction count is accumulated to a threshold, the operation instruction is also executed.
[0031] The above method is described from the perspective of the master controller. The master controller synchronizes the operation instructions to the slave controllers, and activates the instruction counter after receiving the correct signals fed back by all the slave controllers to accumulate the instruction count. After receiving the instruction count result from the master controller, the slave controller accumulates it alone. This ensures that as long as the slave controller successfully receives the synchronization instruction count from the master controller once before the master controller operation is executed (that is, before the accumulation reaches the threshold), all controllers can execute the operation synchronously. Compared with the existing technology, the robustness of the synchronous execution of operations when communication abnormalities occur between the master controller and the slave controllers in a redundant environment is improved.
[0032] In this field, controllers can be master and slave to each other, that is, when the master controller has certain faults, the slave controller that best meets the operating conditions will automatically be promoted to the master controller. Therefore, the above method is implemented in all controllers, and when the controller is the master controller, the above method is automatically implemented.
[0033] When all controllers are operating synchronously, the host computer software issues an operation command. The host computer software is configuration software or monitoring software. Operation commands include file updates, online value settings, and mode switching. After receiving the operation command, the master controller parses it and synchronizes the parsed results to one or more slave controllers.
[0034] The slave controller receives the signal sent by the main controller and parses it. If the parsing is correct and the communication with the main controller is normal, a correct signal is fed back to the main controller. If there is a problem with the parsing, the slave controller sends a message to inform the main controller that an error has occurred. The main controller informs the host computer software that the instruction operation has failed and stops the synchronous execution method.
[0035] When the master controller receives correct signals from all slave controllers (i.e., all connected slave controllers), it activates the instruction counter to accumulate instruction counts and synchronizes the instruction counts to the slave controllers; wherein, when the instruction counts are synchronized, the slave controllers accumulate independently; the instruction count accumulates by 1 in each preset operation cycle.
[0036] The instruction count synchronization is specifically to synchronize the slave controller multiple times continuously. If it is synchronized only once, if the slave controller does not receive the instruction count due to communication fluctuations, the synchronization execution will be directly invalid. However, if it is synchronized for multiple cycles continuously, as long as the slave controller can correctly receive the message sent by the master controller once, it can obtain the correct instruction count of the master controller. Subsequently, through self-maintenance (because the operating cycles of the master and slave controllers are the same, they can still keep their respective instruction count values consistent, that is, self-accumulation), the instruction count accumulation of the master and slave controllers can be guaranteed to be consistent.
[0037] When the instruction count on the master controller side reaches the threshold, the operation instruction is executed, and at this time the slave controller also reaches the threshold, the slave controller also executes the operation instruction
[0038] In the above method, the operation instruction, the error-free signal and the accumulated instruction count are all exchanged in the form of messages, and the number of exchanges is one or more.
[0039] The above method is applicable to distributed control systems and safety instrumented systems, see Figure 2 , which are the specific steps for applying the above method to the safety instrumented system:
[0040] 1. The host computer software sends online setting operation instructions to the main controller;
[0041] 2. The main controller parses the instruction;
[0042] 3. After the master controller confirms that the instruction is correct, it synchronizes the instruction to the slave controller;
[0043] 4. The slave controller parses the online setting operation instructions sent by the master controller;
[0044] 5. After the slave controller confirms that the command is correct and the communication is normal, it will reply the confirmation result to the master controller;
[0045] 6. After the master controller confirms that the slave controller has responded correctly, it activates the instruction counter;
[0046] 7. The master controller starts to accumulate the instruction count from zero and sends the instruction count to the slave controller three times in a row;
[0047] 8. The slave controller first synchronizes the instruction count of the master controller and then accumulates it independently;
[0048] 9. When the instruction count of all controllers reaches 3, the online setting operation instruction begins to be executed;
[0049] 10. The main controller returns the operation result to the host computer software to complete the operation.
[0050] Based on the same technical solution, the present invention also discloses a virtual device of the above method, a synchronous execution device, comprising:
[0051] The operation instruction synchronization module parses the operation instructions issued by the host computer software and synchronizes the operation instructions to the slave controller.
[0052] In the operation instruction synchronization module, the operation instructions include file update, online value setting and mode switching; the host computer software includes configuration software and monitoring software.
[0053] The instruction count accumulation synchronization module, in response to receiving the correct signal fed back from all slave controllers, activates the instruction counter, accumulates the instruction count, and continuously synchronizes the accumulated instruction count to the slave controller; wherein, when the instruction count is synchronized, the slave controller accumulates independently; on the slave controller side, if the operation instruction is parsed correctly and the communication with the master controller is normal, the correct signal is fed back; the instruction count accumulates by 1 in each preset operation cycle.
[0054] The synchronous execution module executes the operation instruction in response to the instruction count accumulating to the threshold value; wherein, on the slave controller side, the operation instruction is also executed when the instruction count accumulates to the threshold value; the operation instruction, the error-free signal and the accumulated instruction count are all exchanged in the form of messages.
[0055] The above-mentioned virtual device is automatically started in all controllers when the controller is the master controller. In the above-mentioned device, the master controller synchronizes the operation instructions to the slave controller, activates the instruction counter after receiving the correct signals fed back by all slave controllers, and accumulates the instruction count. After receiving the instruction counting result of the master controller, the slave controller accumulates it alone. It can ensure that as long as the slave controller successfully receives the synchronization instruction count of the master controller once before the master controller operation is executed (that is, before the accumulation reaches the threshold), all controllers can realize the synchronous execution of operations. Compared with the existing technology, the robustness of the synchronous execution of operations when communication abnormalities occur between the master controller and the slave controller in a redundant environment is improved.
[0056] Based on the same technical solution, the present invention also discloses a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device performs a synchronous execution method.
[0057] Based on the same technical solution, the present invention also discloses a computing device, including one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing a synchronous execution method.
[0058] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0059] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0060] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0061] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0062] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.
Claims
1. A synchronous execution method, characterized in that: include: Parse the operation instructions issued by the host computer software and synchronize the operation instructions to the slave controller; In response to receiving the error-free signal fed back by all slave controllers, the instruction counter is activated to accumulate the instruction count and continuously synchronize the accumulated instruction count to the slave controller; wherein, when the instruction count is synchronized, the slave controller independently accumulates; on the slave controller side, if the operation instruction is parsed correctly and the communication with the master controller is normal, the error-free signal is fed back; In response to the instruction count being accumulated to a threshold, the operation instruction is executed; wherein, on the slave controller side, when the instruction count is accumulated to a threshold, the operation instruction is also executed.
2. The synchronous execution method according to claim 1, characterized in that: Operation instructions include file update, online value setting and mode switching; the upper computer software is configuration software or monitoring software.
3. The synchronous execution method according to claim 1, characterized in that: The instruction count is incremented by 1 in each preset operation cycle.
4. The synchronous execution method according to claim 1, characterized in that: Operation instructions, error-free signals and accumulated instruction counts are all exchanged in the form of messages.
5. A synchronous execution device, characterized in that: include: The operation instruction synchronization module parses the operation instructions issued by the host computer software and synchronizes the operation instructions to the slave controller; The instruction count accumulation synchronization module, in response to receiving the error-free signal fed back by all slave controllers, activates the instruction counter, accumulates the instruction count, and continuously synchronizes the accumulated instruction count to the slave controller; wherein, when the instruction count is synchronized, the slave controller independently accumulates; on the slave controller side, if the operation instruction is parsed correctly and the communication with the master controller is normal, it will feedback the error-free signal; The synchronous execution module executes the operation instruction in response to the instruction count being accumulated to a threshold value; wherein, on the slave controller side, the operation instruction is also executed when the instruction count is accumulated to a threshold value.
6. The synchronous execution device according to claim 5, characterized in that: In the operation instruction synchronization module, the operation instructions include file update, online value setting and mode switching; the upper computer software is configuration software or monitoring software.
7. The synchronous execution device according to claim 5, characterized in that: In the instruction count accumulation synchronization module, the instruction count is accumulated by 1 in each preset operation cycle.
8. The synchronous execution device according to claim 5, characterized in that: Operation instructions, error-free signals and accumulated instruction counts are all exchanged in the form of messages.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform any one of the methods according to claims 1 to 4 .
10. A computing device, characterized in that: include, One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any one of the methods according to claims 1 to 4.
Citation Information
Patent Citations
Battery management system and automatic addressing method thereof
CN115528327A
Multi-machine hot standby control method
CN116500886A