Primary and standby machine data synchronization method, device, equipment and medium for redundant system
By judging data synchronization type and priority in a redundant system, formulating synchronization rules and data tracking guarantees, the seamless switching problem of data synchronization between master and standby machines is solved, and system stability and data security are improved.
Patent Information
- Application Number
- CN202111658757.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In the prior art, the data synchronization of the master and standby machine of the redundant system cannot be switched quickly and seamlessly when the master controller fails, resulting in insufficient system stability and data integrity and difficult to ensure data security.
In the redundant state, when data synchronization is performed between the master and the backup machine, the data synchronization type is judged first and priority is obtained, synchronization rules are formulated based on priority, data synchronization is synchronized dynamically, and synchronization is ensured through data tracking and corresponding guarantee methods.
It improves the operation efficiency of redundant systems and the correctness of data synchronization, ensures that the system can quickly replace the backup function when the main controller fails, and the system will automatically recover and maintain data integrity and security.
Smart Images

Figure CN114528152B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial automation control, and particularly relates to a master-slave data synchronization method, device, equipment, and medium for a redundant system. Background Art
[0002] Since industrial control systems need to continuously control equipment for a long time, users have requirements for the continuous operation and real-time performance of the control system. To ensure the safety and reliability of industrial control systems, using a redundant system is an effective solution. Redundant systems generally adopt a master-backup switching method during operation. If the master controller fails, the backup controller can automatically take over, enabling the system to continue operating normally in its original state. To achieve seamless connection between the master and backup controllers, real-time data synchronization measures are required between the master and backup controllers.
[0003] Data synchronization technology mainly refers to data synchronization between the master and backup controllers in a redundant state, mainly dealing with operations related to data synchronization between redundant control stations, including a series of operations such as pre-synchronization preparation, synchronization, and post-synchronization processing, which are only effective in redundant systems. In the case of a single machine state, the relevant synchronization functions are not executed.
[0004] In view of this, the present invention proposes a master-slave data synchronization method for a redundant system to improve the stability and reliability of industrial control systems, ensuring that when the master controller fails, the backup controller can quickly take over and the system can automatically recover, and the data in the controller remains intact and the data security is guaranteed. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a master-slave data synchronization method for a redundant system to improve the stability and reliability of industrial control systems, ensuring that when the master controller fails, the backup controller can quickly take over and the system can automatically recover, and the data in the controller remains intact and the data security is guaranteed.
[0006] In a first aspect, the present invention provides a master-slave data synchronization method for a redundant system. In a redundant state, when normal synchronization or triggered synchronization occurs between the master controller and the backup controller, first determine the data synchronization type, and obtain the corresponding priority according to the data synchronization type; combine the data synchronization type and the corresponding priority to dynamically formulate specific synchronization rules, and enter the data synchronization process according to the synchronization rules; during the data synchronization process, data tracking is also performed and corresponding guarantee methods are adopted according to the data synchronization type to ensure the correctness of data synchronization.
[0007] In a second aspect, the present invention provides a master-slave data synchronization device for a redundant system, including:
[0008] A judgment module, configured to judge the data synchronization type first when normal synchronization or trigger synchronization is performed between the master machine and the standby machine in the redundant state.
[0009] A priority module, configured to obtain the corresponding priority according to the data synchronization type.
[0010] A synchronization rule module, configured to dynamically formulate specific synchronization rules by combining the data synchronization type and the corresponding priority.
[0011] A synchronization module, configured to enter the data synchronization process according to the synchronization rules.
[0012] A tracking guarantee module, configured to perform data tracking during the data synchronization process and adopt corresponding guarantee methods according to the data synchronization type to guarantee the correctness of data synchronization.
[0013] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the first aspect is implemented.
[0014] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect is implemented.
[0015] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: The present invention first classifies data synchronization according to the actual data situation. On the premise of meeting the data synchronization requirements of the master and standby machines, the performance resources are reasonably utilized and allocated by using priorities and synchronization rules, improving the operation efficiency of the redundant system. During synchronization, data tracking is also performed and corresponding guarantee methods are adopted according to the data synchronization type to guarantee the correctness of data synchronization. There are differences in data under different guarantee methods and they are distinguished, ensuring the correctness of data synchronization and improving the security of data information.
[0016] The above description is only an overview of the technical solutions of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the following specifically describes the embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be further described below with reference to the accompanying drawings in conjunction with embodiments.
[0018] Figure 1 It is the flowchart of the method in Embodiment 1 of the present invention;
[0019] Figure 2 It is the flowchart of the data synchronization sending stage in the embodiments of the present invention;
[0020] Figure 3 This is the flowchart of the data synchronization receiving stage in the embodiment of the present invention;
[0021] Figure 4 This is the structural schematic diagram of the device in the second embodiment of the present invention;
[0022] Figure 5 This is the structural schematic diagram of the electronic device in the third embodiment of the present invention;
[0023] Figure 6 This is the structural schematic diagram of the medium in the fourth embodiment of the present invention. Detailed implementation manners
[0024] By providing a master-slave data synchronization method for a redundant system in the embodiment of the present application, the stability and reliability of the industrial control system are improved, so as to ensure that when the main control machine fails, the backup machine can quickly take over and the system can automatically recover, and the data in the controller remains complete, and the data security is guaranteed.
[0025] The overall idea of the technical solution in the embodiment of the present application is as follows: First, the present invention classifies the data synchronization according to the actual situation of the data. On the premise of realizing the data synchronization requirements of the master-slave machines, the priority and synchronization rules are used to reasonably allocate the performance resources and improve the operation efficiency of the redundant system. When performing synchronization, data tracking is also carried out, and corresponding guarantee methods are adopted according to the data synchronization type to ensure the correctness of data synchronization. Under different guarantee methods, the data also has differences and is distinguished, ensuring the correctness of data synchronization and improving the security of data information. Embodiment 1
[0026] As Figure 1 shown, this embodiment provides a master-slave data synchronization method for a redundant system, and the characteristics are:
[0027] In the redundant state, when normal synchronization or trigger synchronization is performed between the main control machine and the backup machine, first judge the data synchronization type, and obtain the corresponding priority according to the data synchronization type;
[0028] Combined with the data synchronization type and the corresponding priority, dynamically formulate specific synchronization rules, and enter the data synchronization process according to the synchronization rules;
[0029] During the data synchronization process, data tracking is also carried out, and corresponding guarantee methods are adopted according to the data synchronization type to ensure the correctness of data synchronization.
[0030] Among them, as a more optimal or more specific implementation manner of this embodiment:
[0031] The data synchronization types include initialization synchronization, system structure synchronization, logical synchronization, normal input synchronization, and normal process synchronization; the initialization synchronization, system structure synchronization, and logical synchronization are trigger synchronizations, and the normal input synchronization and normal process synchronization are normal synchronizations;
[0032] The priority relationship of various data synchronization types is as follows: initialization synchronization > system structure synchronization and logical synchronization > normal input synchronization, normal process synchronization. Among them, although the priorities of system structure synchronization and logical synchronization are the same, the execution order of system structure synchronization is prior to that of logical synchronization. Similarly, although the priorities of normal input synchronization and normal process synchronization are the same, the execution order of normal input synchronization is prior to that of normal process synchronization;
[0033] The synchronization rules include: when a synchronization command with a higher priority is received, the currently executing synchronization is abandoned; when synchronization commands with the same priority arrive simultaneously, synchronization is performed in the order of execution.
[0034] There are 4 corresponding guarantee methods for various data synchronization types, which are the following (1) - (4):
[0035] (1) When the control system is running normally, it includes two types: input synchronization and process synchronization:
[0036] The input synchronization includes LDYZ synchronization, LAYZ synchronization, and synchronization of the control station status word. LDYZ synchronization and LAYZ synchronization are used to synchronize the DT105[25000…26999] array and the DT106[25000…26999] array, and the control station status word synchronization is used to synchronize the DT501[14…18] array; as shown in the following table:
[0037]
[0038] The process synchronization only synchronizes the data that affects the program operation, including the synchronization of P90 dual-machine redundant synchronization data, that is, the DT318[1..450001] and DT319[1..48003] arrays; as shown in the following table:
[0039]
[0040] (2) When the standby machine is powered on, the standby machine synchronizes most of the data of the control station, including the P90 array, global variables, hardware configuration data structure, human-machine interface communication data structure, and synchronizes the DT301[0] and DT301[1] arrays; as shown in the following table:
[0041]
[0042] After the main controller system structure is modified, the standby controller synchronizes the hardware configuration data structure, namely the DT302 array;
[0043] (4)After the IAPlogic logic of the main controller is modified offline or online, the standby controller synchronizes the P90 array and the DT301[0] and DT301[1] arrays.
[0044] The above (1) belongs to normal synchronization, and (2), (3), and (4) belong to trigger synchronization. The above arrays are all independent storage spaces divided in the memory area for storing different types of data.
[0045] As Figure 2 shown, the data synchronization process includes a data synchronization sending stage, a data synchronization stage, and a data synchronization receiving stage. The data synchronization sending stage specifically includes the following steps:
[0046] S11. Identify whether the device is the main controller. If the device is the main controller, proceed to the next step; if the device is not the main controller, end the data synchronization process;
[0047] S12. When the device is the main controller, check whether there is a data synchronization initialization synchronization command. If there is, set the initialization synchronization flag to 1; if not, the initialization flag remains unchanged and is still zero;
[0048] S13. Determine whether the main controller has been modified in terms of system structure. If so, set the system synchronization flag to 1; if not, the system synchronization flag remains unchanged and is still zero;
[0049] S14. Determine whether the IAPlogic logic of the main controller is for online or offline transfer. If so, count the redundant exchange volume and set the logic trigger synchronization flag value to 1; if not, proceed to the next step;
[0050] S15. Determine whether the normal input synchronization reaches the cycle. If so, proceed to step S6 to determine whether the normal input synchronization ends; if not, proceed to step S7 to determine whether the normal process synchronization reaches the cycle;
[0051] S16. When the normal input synchronization reaches the cycle, check whether the normal input synchronization ends. If so, set the normal input synchronization flag to 1; if not, the normal input synchronization flag remains unchanged and is still zero;
[0052] S17. When the normal input synchronization does not reach the cycle, determine whether the normal process synchronization reaches the cycle. If it reaches, proceed to the next step; if it does not reach, end the data synchronization process;
[0053] S18. When the normal process synchronously reaches the period, it is necessary to identify whether the compression of the master computer has ended. If it has ended, the normal process synchronization flag is set to 1, and data compression is performed; if the compression of the master computer has not ended, the data synchronization process ends;
[0054] S19. After the data compression is completed, it is judged whether the standby computer is running. If the standby computer is running, data synchronization is performed. After the synchronization is completed, the synchronization flag bit is cleared, and the data synchronization process ends; if the standby computer is not running, the synchronization flag bit is cleared, and the data synchronization process ends;
[0055] As Figure 3 shown, the specific data synchronization stage is as follows:
[0056] Execute according to the synchronization flag bit. As long as the synchronization flag bit is 1, the corresponding type of data synchronization is executed, and the normal synchronization is executed once every 1 second;
[0057] The specific data synchronization receiving stage includes the following steps:
[0058] S21. Identify whether the device is the master computer. If the device is not the master computer, proceed to the next step; if the device is the master computer, end the data synchronization process;
[0059] S22. When the device is not the master computer, check whether it is initialization synchronization or logical synchronization. If so, count the redundant exchange volume and receive the synchronization data; if not, directly receive the synchronization data;
[0060] S23. After receiving the synchronization data, it is necessary to judge whether it is normal process synchronization. If it is normal process synchronization, proceed to the next step; if not, end the data synchronization process;
[0061] S24. When it is normal process synchronization, it is necessary to check whether the data is consistent. If the data is consistent, perform data decompression. After decompression, end the data synchronization process; if not, directly end the data synchronization process.
[0062] Based on the same inventive concept, the present application also provides a device corresponding to the method in Embodiment 1. For details, see Embodiment 2. Embodiment 2
[0063] As Figure 3 shown, in this embodiment, a main-standby data synchronization device for a redundant system is provided, including:
[0064] A judgment module, configured to, in a redundant state, when normal synchronization or trigger synchronization is performed between the master computer and the standby computer, first judge the data synchronization type, and obtain the corresponding priority according to the data synchronization type;
[0065] A synchronization rule module, which is used to dynamically formulate specific synchronization rules by combining data synchronization types and corresponding priorities;
[0066] A synchronization module, which is used to enter the data synchronization process according to the synchronization rules;
[0067] A tracking and guarantee module, which is used to perform data tracking during the data synchronization process and adopt corresponding guarantee methods according to the data synchronization type to ensure the correctness of data synchronization.
[0068] Among them, as a more optimal or more specific implementation manner of this embodiment:
[0069] The data synchronization types include initialization synchronization, system structure synchronization, logical synchronization, normal input synchronization, and normal process synchronization; the initialization synchronization, system structure synchronization, and logical synchronization are trigger synchronizations, and the normal input synchronization and normal process synchronization are normal synchronizations;
[0070] The priority relationship of various data synchronization types is: initialization synchronization > system structure synchronization and logical synchronization > normal input synchronization, normal process synchronization. Among them, although the priorities of system structure synchronization and logical synchronization are the same, the execution order of system structure synchronization is prior to that of logical synchronization. Similarly, although the priorities of normal input synchronization and normal process synchronization are the same, the execution order of normal input synchronization is prior to that of normal process synchronization;
[0071] The synchronization rules include: when a synchronization command with a higher priority is received, the currently executing synchronization is abandoned; when synchronization commands with the same priority arrive simultaneously, synchronization is performed in the order of execution.
[0072] There are 4 corresponding guarantee methods for various data synchronization types, which are respectively the following (1) to (4):
[0073] (1) When the control system is running normally, it includes two types: input synchronization and process synchronization:
[0074] The input synchronization includes LDYZ synchronization, LAYZ synchronization, and synchronization of the control station status word. LDYZ synchronization and LAYZ synchronization are used to synchronize the DT105[25000…26999] array and the DT106[25000…26999] array, and the control station status word synchronization is used to synchronize the DT501[14…18] array; as shown in the following table:
[0075]
[0076] The process synchronization only synchronizes the data that affects the program operation, including the synchronization of P90 dual-machine redundant synchronization data, that is, the DT318[1..450001] and DT319[1..48003] arrays; as shown in the following table:
[0077]
[0078] (2)When the standby machine is powered on, most of the data of the standby machine synchronization control station is synchronized, including the P90 array, global variables, hardware configuration data structure, human-machine interface communication data structure, and the synchronization of the DT301[0] and DT301[1] arrays; as shown in the following table:
[0079]
[0080] (3)After the main control machine system structure is modified, the standby machine synchronizes the hardware configuration data structure, that is, the DT302 array;
[0081] (4)After the IAPlogic logic of the main control machine is modified offline or online, the standby machine synchronizes the P90 array and the DT301[0] and DT301[1] arrays.
[0082] The above (1) belongs to normal synchronization, and (2), (3), and (4) belong to trigger synchronization.
[0083] As Figure 2 shown, the data synchronization process performed by the synchronization module includes a data synchronization sending stage, a data synchronization stage, and a data synchronization receiving stage. The data synchronization sending stage specifically includes the following steps:
[0084] S11. Identify whether the device is the main control machine. If the device is the main control machine, proceed to the next step; if the device is not the main control machine, end the data synchronization process;
[0085] S12. When the device is the main control machine, check whether there is a data synchronization initialization synchronization command. If there is, set the initialization synchronization flag to 1; if not, the initialization flag remains unchanged and is still zero;
[0086] S13. Determine whether the main control machine has been modified in terms of system structure. If so, set the system synchronization flag to 1; if not, the system synchronization flag remains unchanged and is still zero;
[0087] S14. Determine whether the IAPlogic logic of the main control machine is for online or offline transfer. If so, count the redundant exchange volume and set the logical trigger synchronization flag value to 1; if not, proceed to the next step;
[0088] S15. Determine whether the normal input synchronization reaches the cycle. If so, proceed to step S6 to determine whether the normal input synchronization ends; if not, proceed to step S7 to determine whether the normal process synchronization reaches the cycle;
[0089] S16. When the normal input synchronization reaches the period, check whether the normal input synchronization ends. If it does, set the normal input synchronization flag to 1; if not, the normal input synchronization flag remains unchanged and is still zero.
[0090] S17. When the normal input synchronization does not reach the period, determine whether the normal process synchronization reaches the period. If it does, proceed to the next step; if not, end the data synchronization process.
[0091] S18. When the normal process synchronization reaches the period, it is necessary to identify whether the compression of the master controller has ended. If it has, set the normal process synchronization flag to 1 and perform data compression; if the compression of the master controller has not ended, end the data synchronization process.
[0092] S19. After the data compression is completed, determine whether the backup machine is running. If the backup machine is running, perform data synchronization. After the synchronization is completed, clear the synchronization flag and end the data synchronization process; if the backup machine is not running, clear the synchronization flag and end the data synchronization process.
[0093] As Figure 3 shown, the specific data synchronization stage is as follows:
[0094] Execute according to the synchronization flag. As long as the synchronization flag is 1, perform the corresponding type of data synchronization, and the normal synchronization is executed once every 1 second.
[0095] The specific data synchronization reception stage includes the following steps:
[0096] S21. Identify whether the device is the master controller. If the device is not the master controller, proceed to the next step; if the device is the master controller, end the data synchronization process.
[0097] S22. When the device is not the master controller, check whether it is initialization synchronization or logical synchronization. If it is, count the redundant exchange volume and receive the synchronization data; if not, directly receive the synchronization data.
[0098] S23. After receiving the synchronization data, it is necessary to determine whether it is normal process synchronization. If it is normal process synchronization, proceed to the next step; if not, end the data synchronization process.
[0099] S24. When it is normal process synchronization, it is necessary to check whether the data is consistent. If the data is consistent, perform data decompression. After the decompression, end the data synchronization process; if the data is inconsistent, directly end the data synchronization process.
[0100] Since the device introduced in the second embodiment of the present invention is the device adopted for implementing the method of the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, those skilled in the art can understand the specific structure and variations of the device, so it will not be elaborated herein. Any device adopted for the method of the first embodiment of the present invention falls within the scope of protection of the present invention.
[0101] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to the first embodiment. For details, see the third embodiment. Embodiment Three
[0102] This embodiment provides an electronic device, as Figure 5 shown, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, any implementation manner in the first embodiment can be realized.
[0103] Since the electronic device introduced in this embodiment is the device adopted for implementing the method in the first embodiment of this application, based on the method introduced in the first embodiment of this application, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment. Therefore, how this electronic device implements the method in the embodiments of this application will not be introduced in detail herein. As long as the device adopted by those skilled in the art for implementing the method in the embodiments of this application falls within the scope of protection of this application.
[0104] Based on the same inventive concept, this application provides a storage medium corresponding to the first embodiment. For details, see the fourth embodiment. Embodiment Four
[0105] This embodiment provides a computer-readable storage medium, as Figure 6 shown, on which a computer program is stored. When the computer program is executed by a processor, any implementation manner in the first embodiment can be realized.
[0106] The technical solutions provided in the embodiments of this application at least have the following technical effects or advantages: The present invention first classifies data synchronization according to the actual situation of the data. On the premise of meeting the data synchronization requirements of the primary and standby machines, the priority and synchronization rules are used to reasonably allocate performance resources and improve the operation efficiency of the redundant system. During synchronization, data tracking is also performed, and corresponding guarantee methods are adopted according to the data synchronization type to ensure the correctness of data synchronization. Data also has differences and is distinguished under different guarantee methods, ensuring the correctness of data synchronization and improving the security of data information.
[0107] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, apparatus or system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0108] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows 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 the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0109] These computer program instructions can 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, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0111] Although the specific embodiments of the present invention have been described above, those skilled in the art of this technology should understand that the specific embodiments we described are illustrative rather than used to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be covered by the scope protected by the claims of the present invention.
Claims
1. A method for master-slave data synchronization in a redundant system, characterized in that: In the redundant state, when normal synchronization or triggered synchronization is performed between the master control machine and the standby machine, first judge the data synchronization type, and obtain the corresponding priority according to the data synchronization type; Combined with the data synchronization type and the corresponding priority, dynamically formulate specific synchronization rules, and enter the data synchronization process according to the synchronization rules; During the data synchronization process, data tracking is also performed and corresponding guarantee methods are adopted according to the data synchronization type to ensure the correctness of data synchronization; The data synchronization types include initialization synchronization, system structure synchronization, logical synchronization, normal input synchronization, and normal process synchronization; the initialization synchronization, system structure synchronization, and logical synchronization are triggered synchronizations, and the normal input synchronization and normal process synchronization are normal synchronizations; The priority relationship of various data synchronization types is: initialization synchronization > system structure synchronization and logical synchronization > normal input synchronization, normal process synchronization. Among them, although the priorities of system structure synchronization and logical synchronization are the same, the execution order of system structure synchronization is prior to that of logical synchronization. Similarly, although the priorities of normal input synchronization and normal process synchronization are the same, the execution order of normal input synchronization is prior to that of normal process synchronization; The synchronization rules include: when a synchronization command with a higher priority is received, the currently executing synchronization is abandoned; when synchronization commands with the same priority arrive simultaneously, synchronization is performed in the order of execution; The corresponding guarantee methods for various data synchronization types are: (1) When the control system is running normally, it includes two types: input synchronization and process synchronization: The input synchronization includes LDYZ synchronization, LAYZ synchronization, and synchronization of the control station status word. LDYZ synchronization and LAYZ synchronization are used to synchronize the DT105[25000…26999] array and the DT106[25000…26999] array respectively, and the control station status word synchronization is used to synchronize the DT501[14…18] array; The process synchronization only synchronizes data that affects program operation, including P90 dual-machine redundant synchronization data, and the P90 dual-machine redundant synchronization data is the DT318[1..450001] and DT319[1..48003] arrays; (2) When the standby machine is powered on, the standby machine synchronizes the data of the control station, including P90 dual-machine redundant synchronization data, global variables, hardware configuration data structure, human-machine interface communication data structure, and synchronizes the DT301[0] and DT301[1] arrays; (3) After the master control machine system structure is modified, the standby machine synchronizes the hardware configuration data structure, that is, the DT302 array; (4) After the master control machine IAPlogic logic is offline or online modified, the standby machine synchronizes the P90 array and the DT301[0], DT301[1] arrays.
2. The master-slave data synchronization method for a redundant system according to claim 1, wherein: The data synchronization process includes a data synchronization sending stage, a data synchronization stage, and a data synchronization receiving stage. The data synchronization sending stage specifically includes the following steps: S11. Identify whether the device is the master control machine. If it is, proceed to the next step; if not, end the data synchronization process. S12. When the device is the master control machine, check if there is a data initialization synchronization command. If so, set the initialization synchronization flag bit to 1. If not, the initialization synchronization flag bit remains unchanged and is still zero. S13. Determine whether the master control machine has undergone system structure modification. If so, set the system synchronization flag bit to 1; if not, the system synchronization flag bit remains unchanged and is still zero. S14. Determine whether the IAPlogic logic of the master control machine is for transmission. If so, count the redundant exchange volume and set the logic trigger synchronization flag value to 1; if not, proceed to the next step. S15. Determine whether the normal input synchronization has reached its cycle. If so, proceed to step S16 to check if the normal input synchronization has ended; if not, proceed to step S17 to check if the normal process synchronization has reached its cycle. S16. When the normal input synchronization reaches its cycle, check if the normal input synchronization has ended. If so, set the normal input synchronization flag bit to 1; if not, the normal input synchronization flag bit remains unchanged and is still zero. S17. When the normal input synchronization has not reached its cycle, check if the normal process synchronization has reached its cycle. If it has, proceed to the next step; if not, end the data synchronization process. S18. When the normal process synchronization reaches its cycle, it is necessary to identify whether the master control machine has completed compression. If it has, set the normal process synchronization flag to 1 and perform data compression; if the master control machine has not completed compression, end the data synchronization process. S19. After the data compression is completed, check if the backup machine is running. If the backup machine is running, perform data synchronization. After the synchronization is completed, clear the synchronization flag bit and end the data synchronization process; if the backup machine is not running, clear the synchronization flag bit and end the data synchronization process. The specific data synchronization stage is as follows: Execute according to the synchronization flag bit. As long as the synchronization flag bit is 1, perform the corresponding type of data synchronization, and the normal synchronization is executed once every 1 second. The specific data synchronization reception stage includes the following steps: S21. Identify whether the device is the master control machine. If the device is not the master control machine, proceed to the next step; if the device is the master control machine, end the data synchronization process. S22. When the device is not the master control machine, check if it is after initialization synchronization or logic synchronization. If so, count the redundant exchange volume and receive the synchronization data; if not, directly receive the synchronization data. S23. After receiving the synchronization data, it is necessary to determine whether it is a normal process synchronization. If it is a normal process synchronization, proceed to the next step; if not, end the data synchronization process. S24. When it is a normal process synchronization, it is necessary to check if the data is consistent. If the data is consistent, perform data decompression. After decompression, end the data synchronization process; if it is inconsistent, directly end the data synchronization process.
3. A master-slave data synchronization device for a redundant system, characterized in that: It includes: A judgment module, used to first judge the data synchronization type when the master control machine and the backup machine perform normal synchronization or trigger synchronization in the redundant state. A priority module, used to obtain the corresponding priority according to the data synchronization type. A synchronization rule module, which is used to dynamically formulate specific synchronization rules by combining data synchronization types and corresponding priorities; A synchronization module, which is used to enter the data synchronization process according to the synchronization rules; A tracking guarantee module, which is used to perform data tracking during the data synchronization process and adopt corresponding guarantee methods according to the data synchronization type to guarantee the correctness of data synchronization; The data synchronization types include initialization synchronization, system structure synchronization, logic synchronization, normal input synchronization, and normal process synchronization; the initialization synchronization, system structure synchronization, and logic synchronization are trigger synchronizations, and the normal input synchronization and normal process synchronization are normal synchronizations; The priority relationship of various data synchronization types is: initialization synchronization > system structure synchronization and logic synchronization > normal input synchronization, normal process synchronization. Among them, although the priorities of system structure synchronization and logic synchronization are the same, the execution order of system structure synchronization is prior to that of logic synchronization. Similarly, although the priorities of normal input synchronization and normal process synchronization are the same, the execution order of normal input synchronization is prior to that of normal process synchronization; The synchronization rules include: when a synchronization command with a higher priority is received, the currently executing synchronization is abandoned; when synchronization commands with the same priority arrive simultaneously, synchronization is performed in the order of execution; The corresponding guarantee methods adopted by various data synchronization types are: (1) When the control system is running normally, it includes two types: input synchronization and process synchronization: The input synchronization includes LDYZ synchronization, LAYZ synchronization, and synchronization of the control station status word. LDYZ synchronization and LAYZ synchronization are respectively used to synchronize the DT105[25000…26999] array and the DT106[25000…26999] array, and the control station status word synchronization is used to synchronize the DT501[14…18] array; The process synchronization only synchronizes the data that affects the program operation, including the synchronization of P90 dual-machine redundant synchronization data, that is, the DT318[1..450001] and DT319[1..48003] arrays; (2) When the standby machine is powered on, the standby machine synchronizes most of the data of the control station, including P90 dual-machine redundant synchronization data, global variables, hardware configuration data structure, human-machine interface communication data structure, and synchronizes the DT301[0] and DT301[1] arrays; (3) After the main control machine system structure is modified, the standby machine synchronizes the hardware configuration data structure, that is, the DT302 array; (4) After the main control machine IAPlogic logic is modified offline or online, the standby machine synchronizes the P90 array and the DT301[0] and DT301[1] arrays.
4. The master-slave data synchronization device for a redundant system according to claim 3, characterized in that: The data synchronization process performed by the synchronization module includes a data synchronization sending stage, a data synchronization stage, and a data synchronization receiving stage. The data synchronization sending stage specifically includes the following steps: S11. Identify whether the device is the main control machine. If the device is the main control machine, proceed to the next step; if the device is not the main control machine, end the data synchronization process; S12. When the device is the main control machine, check whether there is a data initialization synchronization command. If there is, set the initialization synchronization flag bit to 1; If not, the initialization flag remains unchanged and is still zero; S13. Determine whether the main controller has been modified in terms of system structure. If so, set the system synchronization flag to 1; if not, the system synchronization flag remains unchanged and is still zero; S14. Determine whether the IAPlogic logic of the main controller is for transmission. If so, count the redundant exchange volume and set the logic trigger synchronization flag value to 1; if not, proceed to the next step; S15. Determine whether the normal input synchronization has reached the cycle. If so, proceed to step S16 to determine whether the normal input synchronization has ended; if not, proceed to step S17 to determine whether the normal process synchronization has reached the cycle; S16. When the normal input synchronization reaches the cycle, check whether the normal input synchronization has ended. If so, set the normal input synchronization flag to 1; if not, the normal input synchronization flag remains unchanged and is still zero; S17. When the normal input synchronization has not reached the cycle, determine whether the normal process synchronization has reached the cycle. If it has reached, proceed to the next step; if it has not reached, end the data synchronization process; S18. When the normal process synchronization reaches the cycle, it is necessary to identify whether the main controller has completed compression. If it has been completed, set the normal process synchronization flag to 1 and perform data compression; if the main controller compression has not ended, end the data synchronization process; S19. After the data compression is completed, determine whether the backup machine is running. If the backup machine is running, perform data synchronization. After the synchronization is completed, clear the synchronization flag and end the data synchronization process; if the backup machine is not running, clear the synchronization flag and end the data synchronization process; The specific data synchronization stage is as follows: Execute according to the synchronization flag. As long as the synchronization flag is 1, perform the corresponding type of data synchronization, and the normal synchronization is executed once every 1 second; The specific data synchronization reception stage includes the following steps: S21. Identify whether the device is the main controller. If the device is not the main controller, proceed to the next step; if the device is the main controller, end the data synchronization process; S22. When the device is not the main controller, check whether it is initialization synchronization or logical synchronization. If so, count the redundant exchange volume and receive the synchronization data; if not, directly receive the synchronization data; S23. After receiving the synchronization data, it is necessary to determine whether it is normal process synchronization. If it is normal process synchronization, proceed to the next step; if not, end the data synchronization process; S24. When it is normal process synchronization, it is necessary to check whether the data is consistent. If the data is consistent, perform data decompression. After decompression, end the data synchronization process; if it is inconsistent, directly end the data synchronization process.
5. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in claim 1 or 2.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method described in claim 1 or 2.
Citation Information
Patent Citations
Device for the intimate mixing of carbonic acid (or oxygen or other gases) with water to produce a bath liquid saturated with carbonic acid (or oxygen or other gases).
DE370038A
Logic algorithm unperturbed updating method of redundancy control system
CN107300851A
Information synchronization method and dual-machine hot standby device
CN109274763A