CN117112315A - Data synchronization method and system of redundant equipment, storage medium and electronic equipment - Google Patents

Data synchronization method and system of redundant equipment, storage medium and electronic equipment Download PDF

Info

Publication number
CN117112315A
CN117112315A CN202310838705.XA CN202310838705A CN117112315A CN 117112315 A CN117112315 A CN 117112315A CN 202310838705 A CN202310838705 A CN 202310838705A CN 117112315 A CN117112315 A CN 117112315A
Authority
CN
China
Prior art keywords
data
data source
equipment
target
synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310838705.XA
Other languages
Chinese (zh)
Inventor
徐卫峰
石祥建
卢海松
孙浩
王哲蓓
咸光全
蔡丹
徐深
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
NR Electric Co Ltd
NR Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NR Electric Co Ltd, NR Engineering Co Ltd filed Critical NR Electric Co Ltd
Priority to CN202310838705.XA priority Critical patent/CN117112315A/en
Publication of CN117112315A publication Critical patent/CN117112315A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1658Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit
    • G06F11/1662Data re-synchronization of a redundant component, or initial sync of replacement, additional or spare unit the resynchronized component or unit being a persistent storage device

Abstract

The application discloses a data synchronization method and system of redundant equipment, a storage medium and electronic equipment. The data synchronization method comprises the following steps: the target equipment sends a data synchronization request to the data source equipment; starting a target device according to first operation data from the data source device; according to the second operation data from the data source equipment, controlling the target equipment to synchronously operate with the data source equipment; the first operation data are generated by the data source equipment according to the data synchronization request, and the second operation data are obtained by periodically updating the first operation data by the data source equipment. The application can enable the target equipment to synchronously operate with the data source equipment through the first operation data of the data source equipment and the second operation data which are updated periodically. And the step-out equipment can be re-synchronized in time through the periodically updated second operation data of the data source equipment.

Description

Data synchronization method and system of redundant equipment, storage medium and electronic equipment
Technical Field
The present application relates to the field of device communication technologies, and in particular, to a data synchronization method and system for a redundant device, a storage medium, and an electronic device.
Background
In order to ensure the safety and reliability of the equipment system, the equipment system is generally controlled correspondingly through a multiple redundancy system. In a redundant system, the redundant system related processing work is realized through logic voting. In order to ensure the rationality of the logic voting, all devices which participate in the logic voting are required to be in the same running state.
The same operating state of the device can be achieved by power-on synchronization and operation synchronization. Such as the need to keep operational synchronization with other normally operating redundant devices for post-powered redundant devices, or the need to keep operational synchronization between each other during normal operation.
However, the inventor of the present application found that the redundant device powered on later is later than other operated devices in the beginning due to the operation state, and the operation data of the operated device needs to be obtained in the process of device synchronization, and then the operation is continued independently. Since the device requires a certain processing time for running data, the process may exceed the execution period of the user program, and thus there may be a problem that the running state of the running device is still faster than the running state of the later power-on device.
And in the normal operation process of a plurality of redundant devices, the problem that the devices change in operation state to become out-of-step devices and lose the same operation state may also exist.
Based on this, the inventors consider that the data synchronization method of the redundant apparatus is currently still to be improved.
Disclosure of Invention
The application discloses a data synchronization method, a system, a storage medium and electronic equipment of redundant equipment, which are used for solving the data synchronization problem when the redundant equipment is powered on and the resynchronization problem of out-of-step equipment.
An aspect of the present application provides a data synchronization method of a redundant device, including: the target equipment sends a data synchronization request to the data source equipment; starting a target device according to first operation data from the data source device; according to the second operation data from the data source equipment, controlling the target equipment to synchronously operate with the data source equipment; the first operation data are generated by the data source equipment according to the data synchronization request, and the second operation data are obtained by periodically updating the first operation data by the data source equipment.
According to some embodiments of the application, after the control target device and the data source device operate synchronously according to the second operation data from the data source device, the data synchronization method further includes: judging whether the key data of the target device is smaller than the key data in the second operation data of the data source device; if so, updating the key data of the target device according to the key data in the second operation data.
According to some embodiments of the application, starting the target device based on the first operational data from the data source device comprises: the target equipment restores the first operation data to obtain first key data; the target device execution period information of the target device is updated based on the first execution period information of the data source device in the first critical data to start the target device.
According to some embodiments of the application, controlling the target device to operate in synchronization with the data source device according to the second operation data from the data source device comprises: the target device restores the second operation data to obtain second key data; and updating the target device execution period information of the target device based on the second execution period information of the data source device in the second key data so that the target device and the data source device synchronously run.
Another aspect of the present application discloses a data synchronization system including a data request unit, a device start unit 20, and a device synchronization unit 30.
The data request unit sends a data synchronization request to the data source equipment; the device starting unit starts the target device according to the first operation data from the data source device; the device synchronization unit controls the synchronous operation of the target device and the data source device according to the second operation data from the data source device; the first operation data are generated by the data source equipment according to the data synchronization request, and the second operation data are obtained by periodically updating the first operation data by the data source equipment.
According to some embodiments of the application, the device synchronization unit further determines whether the critical data of the target device is smaller than critical data in the second operation data of the data source device; if so, updating the key data of the target device according to the key data in the second operation data.
According to some embodiments of the application, the device start-up unit restores the first operation data to obtain first key data; the device starting unit updates target device execution period information of the target device based on the first execution period information of the data source device in the first key data to start the target device.
According to some embodiments of the application, the device synchronization unit restores the second operation data to obtain second key data; the device synchronization unit updates the target device execution period information of the target device based on the second execution period information of the data source device in the second key data so that the target device and the data source device operate synchronously.
According to yet another aspect of the application, a non-volatile computer readable storage is provided. The storage medium has stored thereon a computer program which can implement the data synchronization method as described above.
According to yet another aspect of the present application, an electronic device is provided. The electronic device comprises one or more processors and storage means for storing one or more programs that, when executed by the one or more processors, enable the one or more processors to implement the data synchronization method as described above.
The application can enable the target equipment to synchronously operate with the data source equipment through the first operation data of the data source equipment and the second operation data which are updated periodically. And the step-out equipment can be re-synchronized in time through the periodically updated second operation data of the data source equipment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a flow chart of a data synchronization method of an exemplary embodiment of the present application;
FIG. 2 shows a schematic diagram of a redundancy system of an example embodiment of the application;
FIG. 3 illustrates yet another flow chart of a data synchronization method of an exemplary embodiment of the present application;
FIG. 4 illustrates yet another flow chart of a data synchronization method of an exemplary embodiment of the present application;
FIG. 5 shows a further flowchart of a data synchronization method of an exemplary embodiment of the present application
FIG. 6 shows a schematic diagram of a data synchronization structure of an example embodiment of the application;
fig. 7 shows a schematic diagram of the structure of a data synchronization system according to an exemplary embodiment of the present application.
Reference numerals illustrate:
a data synchronization system 1; a data request unit 10; a device start-up unit 20; a device synchronization unit 30.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the disclosed aspects may be practiced without one or more of the specific details, or with other methods, components, materials, apparatus, etc. In these instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail.
Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
The following description of the embodiments of the present application will be made more complete and clear by reference to the accompanying drawings of embodiments of the present application, wherein it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
According to one aspect of the application, the application provides a data synchronization method of a redundant device, which can enable a target device to synchronously operate with a data source device through first operation data of the data source device and periodically updated second operation data. And the step-out equipment can be re-synchronized in time through the periodically updated second operation data of the data source equipment.
The present application will be described in detail below with reference to the attached drawings.
Fig. 1 shows a flowchart of a data synchronization method according to an exemplary embodiment of the present application, which includes steps S100 to S300 as shown in fig. 1. The data synchronization method may be performed by the target device, for example.
According to an example embodiment, in step S100, the target device sends a data synchronization request to the data source device.
The redundant system comprises a plurality of redundant devices which can synchronously operate, and the number of the redundant devices is not less than 2. The data source device is a device which is already in a normal operation state in the redundant system and has complete system operation state data. The target device is a device which is intended to be added to the redundant system and performs normal redundant operation. The data source device and the target device may execute the same user program in the same order and interval.
Fig. 2 shows a schematic diagram of a redundancy system of an example embodiment of the application. As shown in fig. 2, the redundant system includes a plurality of redundant devices, which are devices that periodically execute a user program to control the output of a result according to an I/O input. And the redundant devices are in data interaction through communication connection, so that the same running state can be realized.
As shown in fig. 2, the user program execution task is a program preset by a user executed in the redundant device, and the program may be periodically executed by the redundant device at regular execution intervals (e.g., an execution period T1, an execution period T2 …). Illustratively, the user program it executes is the same for different redundant devices.
The execution time is the starting execution time of the user program execution task for each execution period. The execution time also needs to be consistent for different redundant devices. The redundant devices can realize the same running state by executing the same user program execution tasks at the same execution time. For example, the execution period corresponding to the execution time of the user program in the redundant apparatus may be characterized by an execution period number.
For example, when the target device is first powered up to be incorporated into the redundant system, the target device transmits a data synchronization request to the data source device in a state of normal operation in the redundant system. The data source device may be determined by automatic detection by the target device or by user specific designation, as the application is not limited in this regard.
Illustratively, the user programs of the target device and the data source device must be identical. And after the consistency check of the user program is completed, the target equipment initiates a section data request communication message to the data source equipment and transfers the section data request communication message to a receiving waiting state.
In step S200, the target device starts the target device according to the first operation data from the data source device. The first operation data is generated by the data source equipment according to the data synchronization request.
For example, after receiving a data synchronization request from a target device, the data source device checks the validity of the received request communication message, and if the received request communication message is invalid, ignores the request communication message and does not respond to the request communication message. If the first operation data is valid, the data source equipment enters a data request processing flow to generate the first operation data.
Alternatively, the first operation data may be operation section data of the apparatus, and the operation section data may include general data and key data.
The running section data may be all data information representing the running state of the data source device, for example, data information including I/O input and output of the current user program execution period, data information used for storing the execution result during the user program execution, and execution period information (such as an execution period number) of the data source device.
The key data is a subset of the running section data and is used for representing states which cannot be directly obtained according to external input operation in the equipment state, such as results obtained by calculation depending on the preamble period state, and in addition, the key data also comprises execution period information and I/O input information. The general data is operation state data other than key data.
The data source device respectively organizes I/O input and output and data for storing an execution result in the execution process of the user program during the idle time for completing the current user task. These data are used to characterize the operational state of the current data source device and have a fixed organization order.
The target equipment receives the operation section data from the data source equipment, and starts to operate by taking the operation state corresponding to the operation section data as a starting point, so that the starting of the target equipment is realized. Therefore, the operation state of the data source equipment can be acquired for the first time, and the operation difference between the target equipment and the data source equipment is reduced.
Fig. 3 shows a further flowchart of a data synchronization method according to an exemplary embodiment of the application.
Optionally, the first operational data includes first critical data. As shown in fig. 3, in step S200, the target device may start the target device according to the first operation data from the data source device, including steps S210 to S220.
In step S210, the target device restores the first operation data to obtain first key data.
In step S220, the target device updates the target device execution period information of the target device based on the first execution period information of the data source device in the first key data to start the target device.
For example, the first key data of the data source device may be data of an intermediate state of the user program when the redundant device finishes executing the user program in the current running period, data information input and output by I/O of the current user program execution period, execution period information (such as an execution period number) of the data source device, and the like.
Because the execution period information of the target device which is just powered on is obviously behind the execution period information of the data source device, the target device restores the operation section data after receiving the operation section data of the data source device, and the first key data of the data source device is obtained. And if the target equipment performs one-by-one reduction according to the organization sequence of the operation section data of the data source equipment.
The target device alters the execution cycle information (e.g., target device execution cycle number) of the target device according to the first execution cycle information (e.g., execution cycle number) of the data source device. Thus, the target device can be enabled to operate primarily in synchronization with the data source device.
Optionally, the target device starts timing after transferring to a receiving waiting state after sending the data synchronization request, and if the running section data from the data source device is not received or the running section data is determined to be invalid after the first threshold time, the target device resends the data synchronization request, and if the running section data is valid, the restoring process of the running section data is performed.
In step S300, the target device controls the target device to operate in synchronization with the data source device according to the second operation data from the data source device. The second operation data is obtained by periodically updating the first operation data for the data source device.
For example, the data source device periodically updates first operation data (e.g., operation profile data) to obtain second operation data including an operation state of a current operation cycle of the data source device.
Since the target device needs a certain processing time when receiving and restoring the first operation data of the data source device when acquiring the first operation data of the data source device for the first time, the data source device may execute a certain period of user programs again during the processing time. This can cause a deviation in execution cycles for the target device and the data source device, resulting in an inability of the target device and the data source device to operate properly in synchronization. Therefore, after the data source device finishes sending the first operation data, the data source device periodically updates the first operation data within a preset time to obtain updated second operation data, and periodically sends the second operation data to the target device.
And the target equipment receives and processes the second operation data, so that the target equipment can continuously control the target equipment with the updated second operation data until the target equipment and the data source equipment can be in the same operation state completely consistent.
Fig. 4 shows a further flowchart of a data synchronization method according to an exemplary embodiment of the application.
Alternatively, as shown in fig. 4, in step S300, the target device controlling the target device to operate in synchronization with the data source device according to the second operation data from the data source device may specifically include steps S310 to S320.
In step S310, the target device restores the second operation data to obtain second key data.
In step S320, the target device updates the target device execution period information of the target device based on the second execution period information of the data source device in the second key data so that the target device operates in synchronization with the data source device.
For example, the data source device periodically updates the first operational data to obtain the second operational data. If the second operation data comprises second key data of the data source device, after the data source device completes the execution task of each execution cycle, the data source device updates and organizes the transmission of the second key data.
The second key data of the data source device may be data of an intermediate state of the user program when the user program is executed by the redundant device in the current execution period, data information input and output by the I/O of the current execution period of the user program, execution period information (such as an execution period number) of the data source device, and the like.
The target device changes the execution cycle information (such as the execution cycle number of the target device) of the target device according to the second execution cycle information (such as the execution cycle number of the data source device) after the periodical update of the data source device. Therefore, the target equipment and the data source equipment can completely realize synchronous operation.
Fig. 5 shows a further flowchart of a data synchronization method of an exemplary embodiment of the application, which data synchronization method comprises steps S100-S500, as shown in fig. 5. Illustratively, steps S100-S300 are described in detail above and are not repeated here.
In step S400, the target device determines whether the key data of the target device is smaller than the key data in the second operation data of the data source device.
In step S500, the target device updates the key data of the target device according to the key data in the second operation data.
For example, as can be seen from fig. 2, a plurality of redundant devices in the redundant system are communicatively connected to each other, and the target device may receive second operation data of the other redundant devices. And after the target equipment receives the second operation data and passes the validity check of the data, judging the key data in the second operation data.
The key data of the target device includes execution cycle information of a user program of the target device, and the key data in the second operation data of the data source device includes execution cycle information of the data source device. And the target equipment compares the execution period information of the target equipment with the execution period information of the data source equipment, and if the execution period information of the data source equipment is larger than the execution period information of the target equipment, the execution period information of the target equipment is updated according to the execution period information of the data source equipment so as to ensure the running state of synchronous running of the target equipment and the data source equipment.
The data source device may also determine whether the current device and the other devices are synchronous devices through the above synchronization method, which is not limited by the present application.
It will be appreciated that at some point in operation in the redundant system, there may be a problem in that the device changes its operating state to become a out-of-step device, losing its equivalent operating state. The execution cycle information of the out-of-step device is slower than that of the redundant devices in other normal operation states. Therefore, with the above-described exemplary embodiments, it is possible to determine whether the current device is an out-of-sync device by determining the execution cycle information of the current device and other devices. Under the condition that the current equipment is out-of-step equipment, the current equipment and other normal operation equipment can be timely controlled to be re-synchronized.
Fig. 6 shows a schematic diagram of a data synchronization structure of an exemplary embodiment of the present application. As shown in fig. 6, the execution cycle information (e.g., the execution cycle number) is a step sequence reflecting the execution cycle of the current user program, and may be used to characterize the execution time of the current user program with respect to the data to be synchronized. Illustratively, to ensure uniqueness of the execution cycle information over the life cycle of the device, an unsigned 64-bit integer may be employed to represent the execution cycle information.
The data location information may be used to characterize the relative location of the data to be synchronized within the user program. The location information is related to the data organization hierarchy of the user program. In the case of no hierarchy, the location information may be an offset or a variable number with respect to the head address of the data area; in the case of packet level management, then the information may be a group number, a group relative offset, or a group number. Illustratively, no matter what form is adopted, the position of the variable can be quickly and accurately positioned through the data position information, and the variable is convenient to read and update.
The data state may be used to represent data attribute information. Attributes of data include the quality of the data and the type of data. Wherein the quality of the data reflects the quality of the data, i.e. whether the data is normal or in some kind of anomaly. The type of data is used to indicate what way the data is accessed, such as Boolean bitwise, plastic-wise by 2 bytes, floating point-wise by 4 bytes, etc. The data value may be a representation of a quantization of the data. The value range of the data matches the type of the data. The reading and writing of the data values is performed after checking according to the data type.
The data synchronization processing among different devices can be realized according to the execution period information by the synchronous data structure redundant device.
According to another aspect of the present application, a data synchronization system of a redundant device is provided, which can enable a target device to operate synchronously with a data source device through first operation data of the data source device and periodically updated second operation data. And the step-out equipment can be re-synchronized in time through the periodically updated second operation data of the data source equipment.
Fig. 7 shows a schematic diagram of the structure of a data synchronization system according to an exemplary embodiment of the present application, and as shown in fig. 7, the data synchronization system 1 includes a data request unit 10, a device start unit 20, and a device synchronization unit 30.
According to an exemplary embodiment, the data request unit 10 sends a data synchronization request to the data source device.
The redundant system comprises a plurality of redundant devices which can synchronously operate, and the number of the redundant devices is not less than 2. The data source device is a device which is already in a normal operation state in the redundant system and has complete system operation state data. The target device is a device which is intended to be added to the redundant system and performs normal redundant operation. The data source device and the target device may execute the same user program in the same order and interval.
For example, when the target device is initially powered on to be incorporated into the redundant system, the data requesting unit 10 transmits a data synchronization request like a data source device in a state of normal operation in the redundant system. The data source device may be determined by automatic detection by the data requesting unit 10 or by user specific designation, as the application is not limited in this regard.
Illustratively, the user programs of the target device and the data source device must be identical. And after the consistency check of the user program is completed, the target equipment initiates a section data request communication message to the data source equipment and transfers the section data request communication message to a receiving waiting state.
The device activation unit 20 activates the target device according to the first operation data from the data source device. The first operation data is generated by the data source equipment according to the data synchronization request.
For example, after receiving a data synchronization request from a target device, the data source device checks the validity of the received request communication message, and if the received request communication message is invalid, ignores the request communication message and does not respond to the request communication message. If the first operation data is valid, the data source equipment enters a request processing flow to generate the first operation data.
Alternatively, the first operation data may be operation section data of the apparatus, and the operation section data may include general data and key data.
The running section data may be all data information representing the running state of the data source device, for example, data information including I/O input and output of the current user program execution period, data information used for storing the execution result during the user program execution, and execution period information (such as an execution period number) of the data source device.
The key data is a subset of the running section data and is used for representing states which cannot be directly obtained according to external input operation in the equipment state, such as results obtained by calculation depending on the preamble period state, and in addition, the key data also comprises execution period information and I/O input information. The general data is operation state data other than key data.
The data source device respectively organizes I/O input and output and data for storing an execution result in the execution process of the user program during the idle time for completing the current user task. These data are used to characterize the operational state of the current data source device and have a fixed organization order.
The device start unit 20 receives the operation section data from the data source device, and starts operation with the operation state corresponding to the operation section data as a start point, thereby realizing the start of the target device. Therefore, the operation state of the data source equipment can be acquired for the first time, and the operation difference between the target equipment and the data source equipment is reduced.
Alternatively, the device start unit 20 restores the first operation data to obtain the first key data, and the device start unit 20 updates the target device execution period information of the target device based on the first execution period information of the data source device in the first key data to start the target device.
For example, the first key data of the data source device may be data of an intermediate state of the user program when the redundant device finishes executing the user program in the current running period, data information input and output by I/O of the current user program execution period, execution period information (such as an execution period number) of the data source device, and the like.
Since the execution period information of the target device just powered on is significantly later than the execution period information of the data source device, the device start unit 20 restores the operation section data after receiving the operation section data of the data source device, and obtains the first key data of the data source device. Such as the device activation unit 20, performs the successive restoration in the organization order of the operation section data of the data source device.
The device start unit 20 changes the execution cycle information of the target device (e.g., the target device execution cycle number) according to the first execution cycle information of the data source device (e.g., the execution cycle number of the data source device). Thus, the target device can be enabled to operate primarily in synchronization with the data source device.
Alternatively, the device start unit 20 starts timing after switching to the reception wait state after sending the data synchronization request, and if the running section data from the data source device is not received or if it is determined that the running section data is invalid after the first threshold time, the device start unit 20 resends the data synchronization request, and if the running section data is valid, the restoration process of the running section data is performed.
The device synchronization unit 30 controls the target device to operate in synchronization with the data source device according to the second operation data from the data source device. The second operation data is obtained by periodically updating the first operation data for the data source device.
For example, the data source device periodically updates first operation data (e.g., operation profile data) to obtain second operation data including an operation state of a current operation cycle of the data source device.
Since the device start-up unit 20 needs a certain processing time when receiving and restoring the first operation data of the data source device when the first operation data is acquired for the first time, the data source device may execute a certain period of user programs again during this period. This can cause a deviation in execution cycles for the target device and the data source device, resulting in an inability of the target device and the data source device to operate properly in synchronization. Therefore, after the data source device finishes transmitting the first operation data, the data source device periodically updates the first operation data within a preset time to obtain updated second operation data, and periodically transmits the second operation data to the device synchronization unit 30.
The device synchronization unit 30 receives and processes the second operation data, so that the target device can continue to control the target device with the updated second operation data until the target device and the data source device can be in the identical and equivalent operation state.
Optionally, the device synchronization unit 30 restores the second operation data to obtain second key data, and the device synchronization unit 30 updates the target device execution period information of the target device based on the second execution period information of the data source device in the second key data, so that the target device and the data source device operate synchronously.
For example, the data source device periodically updates the first operational data to obtain the second operational data. If the second operation data comprises second key data of the data source device, after the data source device completes the execution task of each execution cycle, the data source device updates and organizes the transmission of the second key data.
The second key data of the data source device may be data of an intermediate state of the user program when the user program is executed by the redundant device in the current execution period, data information input and output by the I/O of the current execution period of the user program, execution period information (such as an execution period number) of the data source device, and the like.
The device synchronization unit 30 changes the execution cycle information of the target device (e.g., the target device execution cycle number) according to the periodically updated second execution cycle information of the data source device (e.g., the execution cycle number of the data source device). Therefore, the target equipment and the data source equipment can completely realize synchronous operation.
Optionally, the device synchronization unit 30 further determines whether the critical data of the target device is smaller than the critical data in the second operation data of the data source device; if so, updating the key data of the target device according to the key data in the second operation data.
For example, as can be seen from fig. 2, a plurality of redundant devices in the redundant system are communicatively connected to each other, and the target device may receive second operation data of the other redundant devices. The device synchronization unit 30 receives the second operation data and determines the key data in the second operation data after the validity of the data is checked.
The key data of the target device includes execution cycle information of a user program of the target device, and the key data in the second operation data of the data source device includes execution cycle information of the data source device. The device synchronization unit 30 compares the target device execution period information with the data source device execution period information, and if the data source device execution period information is greater than the target device execution period information, updates the target device execution period information according to the data source device execution period information to ensure an operation state in which the target device and the data source device operate synchronously.
The data source device may also determine whether the current device and the other devices are synchronous devices through the above synchronization method, which is not limited by the present application.
It will be appreciated that at some point in operation in the redundant system, there may be a problem in that the device changes its operating state to become a out-of-step device, losing its equivalent operating state. The execution cycle information of the out-of-step device is slower than that of the redundant devices in other normal operation states. Thus, with the above-described exemplary embodiments, the device synchronization unit 30 can determine whether the current device is an out-of-synchronization device by determining the execution cycle information of the current device and other devices. Under the condition that the current equipment is out-of-step equipment, the current equipment and other normal operation equipment can be timely controlled to be re-synchronized.
Through the above example embodiments, the present application may enable the target device to operate synchronously with the data source device through the first operation data of the data source device and the periodically updated second operation data. And the step-out equipment can be re-synchronized in time through the periodically updated second operation data of the data source equipment.
According to yet another aspect of the application, a non-volatile computer readable storage is provided. The storage medium has stored thereon a computer program which can implement the data synchronization method as described above.
According to yet another aspect of the present application, an electronic device is provided. The electronic device comprises one or more processors and storage means for storing one or more programs that, when executed by the one or more processors, enable the one or more processors to implement the data synchronization method as described above.
Finally, it should be noted that the foregoing description is only a preferred embodiment of the present application, and is not intended to limit the application, but rather the detailed description of the present application is given with reference to the foregoing embodiment, and those skilled in the art can modify the technical solution of each embodiment or make equivalent substitutions for some technical features thereof. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for data synchronization of a redundant device, comprising:
the target equipment sends a data synchronization request to the data source equipment;
starting the target equipment according to first operation data from the data source equipment;
according to second operation data from the data source equipment, controlling the target equipment to synchronously operate with the data source equipment;
the first operation data are generated by the data source equipment according to the data synchronization request, and the second operation data are obtained by periodically updating the first operation data by the data source equipment.
2. The data synchronization method according to claim 1, wherein after said controlling the target device to operate in synchronization with the data source device based on the second operation data from the data source device, the data synchronization method further comprises:
judging whether the key data of the target device is smaller than the key data in the second operation data of the data source device;
if yes, the key data of the target device are updated according to the key data in the second operation data.
3. The data synchronization method of claim 1, wherein the enabling the target device based on the first operational data from the data source device comprises:
the target device restores the first operation data to obtain first key data;
and updating target equipment execution period information of the target equipment based on the first execution period information of the data source equipment in the first key data so as to start the target equipment.
4. The data synchronization method of claim 1, wherein controlling the target device to operate in synchronization with the data source device according to the second operation data from the data source device comprises:
the target device restores the second operation data to obtain second key data;
and updating target equipment execution period information of the target equipment based on second execution period information of the data source equipment in the second key data so as to enable the target equipment to run synchronously with the data source equipment.
5. A data synchronization system for a redundant device, comprising:
a data request unit for transmitting a data synchronization request to the data source device;
the device starting unit starts the target device according to the first operation data from the data source device;
the device synchronization unit is used for controlling the target device and the data source device to synchronously operate according to second operation data from the data source device;
the first operation data are generated by the data source equipment according to the data synchronization request, and the second operation data are obtained by periodically updating the first operation data by the data source equipment.
6. The data synchronization system of claim 5, wherein the device synchronization unit further determines whether critical data of the target device is less than critical data in the second operational data of the data source device; if yes, the key data of the target device are updated according to the key data in the second operation data.
7. The data synchronization system of claim 5, wherein the device initiation unit restores the first operational data to obtain first critical data;
the device start unit updates target device execution period information of the target device based on first execution period information of a data source device in the first key data to start the target device.
8. The data synchronization system of claim 5, wherein the device synchronization unit restores the second operational data to obtain second critical data;
the device synchronization unit updates target device execution period information of the target device based on second execution period information of a data source device in the second key data, so that the target device and the data source device run synchronously.
9. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program implements the data synchronization method according to any of claims 1-4.
10. An electronic device, comprising:
one or more processors;
a storage means for storing one or more programs;
when executed by the one or more processors, causes the one or more processors to implement the data synchronization method of any one of claims 1-4.
CN202310838705.XA 2023-07-10 2023-07-10 Data synchronization method and system of redundant equipment, storage medium and electronic equipment Pending CN117112315A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310838705.XA CN117112315A (en) 2023-07-10 2023-07-10 Data synchronization method and system of redundant equipment, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310838705.XA CN117112315A (en) 2023-07-10 2023-07-10 Data synchronization method and system of redundant equipment, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117112315A true CN117112315A (en) 2023-11-24

Family

ID=88802852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310838705.XA Pending CN117112315A (en) 2023-07-10 2023-07-10 Data synchronization method and system of redundant equipment, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117112315A (en)

Similar Documents

Publication Publication Date Title
EP1326184B1 (en) Conflict resolution for collaborative work system
US7865763B2 (en) Data replication method
CN100524219C (en) Configuration synchronization for redundant processors executing different versions of software
WO2009046284A1 (en) Firmware image update and management
KR970066900A (en) Distributed Memory Multiprocessor Systems and Failure Recovery Methods
US7178056B2 (en) Rolling software upgrades for fault tolerant systems
KR20000015819A (en) Process for the synchronisation of programs on different computers of an interconnected system
US7428660B2 (en) Starting control method, duplex platform system, and information processor
GB2248953A (en) Dual-processor programmable controller and method of controlling the same
EP0409604A2 (en) Processing method by which continuous operation of communication control program is obtained
CN117112315A (en) Data synchronization method and system of redundant equipment, storage medium and electronic equipment
JP5868563B1 (en) Control device and unit for distributed control system
CN110830591B (en) Information synchronization method, system, electronic equipment and storage medium
US6760863B1 (en) CPU unit and run alternative control method of programmable controller
CN111142805A (en) Data center hybrid cloud storage method and device, computer equipment and storage medium
Ferreira et al. Enforcing consistency of communication requirements updates in FTT-CAN
JPH03219333A (en) Stand-by duplex system device
US20030158972A1 (en) Device and method for the synchronization of a system of networked computers
JP2850637B2 (en) Time synchronization device for supervisory control system
JPH0462081B2 (en)
JP2000040003A (en) Firmware updation system
US10255211B2 (en) Electronic control unit
JP2000148563A (en) System having plurality of server computers
JP2004048171A (en) Network management system, and setting information management method and program for the same
JP2002032258A (en) Job operation system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination