System failure recovery method and apparatus for data backup

By backing up the buffer data of the data acquisition device using a backup device, and resetting, restarting, and restoring the data in case of failure, the problem of data loss when the data acquisition device is powered on and restarted is solved, ensuring the integrity of data acquisition.

CN116263721BActive Publication Date: 2026-05-15TANCY INSTR GRP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TANCY INSTR GRP
Filing Date
2021-12-15
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, data acquisition devices may experience data loss during power-on restarts, failing to meet the integrity requirements of data acquisition.

Method used

The backup device retrieves the cached data from the buffer of the monitored device and stores it as backup data. When the monitored device fails, a reset signal is sent to reset and restart it. After the device is reset, the backup data is sent to the buffer to fill the lost data.

Benefits of technology

This technology ensures the integrity of data acquisition is restored after the data acquisition device is reset and restarted, guaranteeing uninterrupted and complete data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116263721B_ABST
    Figure CN116263721B_ABST
Patent Text Reader

Abstract

The application provides a system fault recovery method and device for data backup, wherein the method comprises the following steps: a backup device acquires data cached in a cache of a monitored device and stores the data as backup data; the backup device monitors a fault of the monitored device and sends a reset signal to the monitored device when a fault occurs in the monitored device, so that the monitored device is reset and restarted; and the backup device sends the backup data to the cache of the monitored device after the monitored device is reset and restarted. The method of the application solves the problem that the system running data is lost when the monitored device is powered on and restarted in the prior art, and the data acquisition integrity requirement cannot be met in the field of continuous and uninterrupted data acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a system fault recovery method and device for data backup. Background Technology

[0002] In fields requiring continuous and uninterrupted data acquisition, such as natural gas flow monitoring, the integrity of the data is paramount, which in turn places higher demands on the reliability of the data acquisition equipment's software system. During operation, the software system of data acquisition equipment is inevitably affected by environmental factors such as electromagnetic interference and power outages, leading to system failures. These system failures will cause the data acquisition equipment to malfunction, resulting in data acquisition interruptions and incomplete data collection.

[0003] In response, the commonly used methods are as follows: Figure 1 The watchdog timer (WDT) shown is used to monitor data acquisition devices (such as...). Figure 1 The monitored equipment (as shown) is used for system fault monitoring and timely recovery. Figure 1 As shown, the monitored device is connected to the WDT (Wide Data Acquisition System). The monitored device includes a processor and a memory. The processor controls the system operation of the data acquisition device, and the memory stores the data acquired by the device. During normal processor operation, the monitored device outputs a "feed" signal to the WDT at regular intervals. The WDT then determines whether the monitored device has malfunctioned based on the "feed" signal. If a malfunction is detected, the WDT sends a reset signal to the monitored device. The monitored device then powers on and restarts based on the reset signal to reset the faulty system and allow it to resume normal operation.

[0004] However, existing technologies suffer from data loss when the monitored device is powered on and restarted, failing to meet the data collection integrity requirements. Summary of the Invention

[0005] This application provides a system fault recovery method and device for data backup, in order to solve the problem that in the prior art, system running data is lost when the monitored device is powered on and restarted, which fails to meet the requirements of data collection integrity.

[0006] Firstly, this application provides a system failure recovery method for data backup, comprising:

[0007] The backup device acquires the data cached in the buffer of the monitored device and stores the data as backup data.

[0008] The backup device performs fault monitoring on the monitored device and sends a reset signal to the monitored device when a fault occurs, so that the monitored device can be reset and restarted.

[0009] After the monitored device is reset and restarted, the backup device sends the backup data to the cache of the monitored device.

[0010] Secondly, this application provides a backup device, comprising: a processing unit, a storage unit, and a monitoring unit, wherein the processing unit is connected to both the storage unit and the monitoring unit; wherein...

[0011] The processing unit is used to obtain data cached in the cache of the monitored device and send the data to the storage unit;

[0012] The storage unit is used to store the data sent by the processing unit as backup data;

[0013] The monitoring unit is used to monitor the monitored device for faults and send a reset signal to the processing unit when the monitored device malfunctions.

[0014] The processing unit is further configured to send a reset signal to the monitored device after receiving a reset signal, so that the monitored device can be reset and restarted; and after the monitored device is reset and restarted, retrieve the backup data from the storage unit and send the backup data to the cache of the monitored device.

[0015] Thirdly, this application provides an apparatus comprising:

[0016] Processor and memory;

[0017] The memory stores executable instructions that the processor can execute;

[0018] The processor executes the executable instructions stored in the memory, causing the processor to perform the above-described method.

[0019] Fourthly, this application provides a storage medium storing computer execution instructions, which, when executed by a processor, are used to implement the above-described method.

[0020] Fifthly, this application provides a program product including a computer program that, when executed by a processor, implements the above-described method.

[0021] The system fault recovery method and device for data backup provided in this application store and back up the system operation data cached in the buffer of the monitored device using a backup device, thereby obtaining backup data. Simultaneously, the backup device monitors the monitored device for faults and sends a reset signal for the monitored device to reset and restart when a fault occurs, thus achieving fault recovery. By sending the cached backup data to the monitored device after reset and restart, the backup device fills in the data lost in the buffer due to power failure during reset and restart. This application solves the problem in existing technologies where system operation data is lost during the power-on restart of the monitored device, failing to meet the data acquisition integrity requirements. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0023] Figure 1 A schematic diagram of the system architecture for existing system fault recovery;

[0024] Figure 2 A schematic diagram of the system architecture for system fault recovery of data backup provided in the embodiments of this application;

[0025] Figure 3 A flowchart illustrating the system fault recovery method for data backup provided in this application embodiment;

[0026] Figure 4 Schematic diagram of the backup device structure provided in the embodiments of this application Figure 1 ;

[0027] Figure 5 Schematic diagram of the backup device structure provided in the embodiments of this application Figure 2 ;

[0028] Figure 6 Schematic diagram of the backup device structure provided in the embodiments of this application Figure 3 ;

[0029] Figure 7 This is a schematic diagram of the storage unit structure provided in an embodiment of this application;

[0030] Figure 8 This is a schematic diagram of the device structure provided in the embodiments of this application.

[0031] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] In the application of natural gas flow data acquisition, high requirements are placed on the integrity of the data, necessitating continuous and uninterrupted acquisition of natural gas flow data. This places extremely high demands on the operational reliability of the software system of the natural gas flow data acquisition equipment. To improve the system reliability of the data acquisition equipment, methods such as... Figure 1 The watchdog timer (WDT) shown monitors and recovers from system failures in the data acquisition equipment, enabling the equipment to resume normal operation and continue data acquisition. For example... Figure 1 As shown, the existing system architecture for fault recovery includes a monitored device 11 and a watchdog timer (WDT) 12. Exemplarily, the monitored device 11 is such as a natural gas flow data acquisition device. The WDT 12 determines whether the monitored device 11 has malfunctioned based on a "feed the watchdog" signal from the monitored device 11, and upon determining that the monitored device 11 has malfunctioned, sends a reset signal to the monitored device. The monitored device 11 resets and restarts according to the reset signal, allowing the system to continue operating normally.

[0034] Typically, monitored devices also have a buffer deployed to cache the data collected by the device (i.e., system operation data) in real time. During data acquisition, the device's processor caches the real-time data in the buffer, and then periodically sends the cached data to memory for permanent storage. However, the data cached in the buffer is cleared when the monitored device powers on and restarts due to power failure. Therefore, if a monitored device malfunctions and the cached data is not sent to memory, it will be lost after a reset and restart, resulting in incomplete data acquisition.

[0035] To address this issue, this application proposes a system fault recovery method for data backup. The method involves a backup device simultaneously monitoring the system faults of the monitored device and acquiring the cached data in the monitored device's buffer, storing this data as backup data. When a fault occurs in the monitored device, the backup device sends a reset signal to reset and restart it. After the monitored device restarts, the backup data is sent to the monitored device to fill in the system operation data lost during the power-on restart, ensuring the integrity of the data collected by the monitored device.

[0036] The following is combined with Figure 2 This application describes the system failure recovery method for data backup proposed in this application. Figure 2 A schematic diagram of the system architecture for system fault recovery of data backup provided in the embodiments of this application. For example... Figure 2 As shown, the system includes a monitored device 11 and a backup device 13. The monitored device 11 is connected to the backup device 13. For example, the monitored device 11 can be a data acquisition device for natural gas flow collection, or it can be other data acquisition devices that need to continuously collect data. This embodiment does not make specific limitations here.

[0037] Specifically, when the monitored device 11 is operating normally, it acquires system operation data (i.e., the data collected by the monitored device 11) through system operation. This system operation data is cached in real time in the cache of the monitored device 11. The backup device 13 acquires the data cached in the cache of the monitored device 11 in real time, and then caches this data as backup data in its own cache. Simultaneously, the backup device 13 monitors the monitored device 11 for faults and sends a reset signal to the monitored device 11 when a fault occurs. The monitored device 11 resets and restarts according to the reset signal to allow it to continue operating normally. Then, after the monitored device 11 resets and restarts, the backup device 13 sends the backup data stored in its own cache to the cache of the monitored device 11, so that the monitored device 11 can permanently store the data in its cache in its memory, while simultaneously filling in the system operation data lost in the cache during the reset and restart.

[0038] The system fault recovery method for data backup provided in this application provides a method for backing up system operation data cached in the cache of the monitored device to obtain backup data. Simultaneously, the monitored device is monitored for faults, and a reset signal is sent to the monitored device for reset and restart when a fault occurs, thereby achieving fault recovery. By sending the cached backup data to the monitored device after reset and restart, the data lost due to power failure in the cache of the monitored device during reset and restart is filled, solving the problem of system operation data loss during power-on and restart of the monitored device in existing technologies. This method meets the data acquisition integrity requirements of fields such as natural gas flow data acquisition that require continuous and uninterrupted data acquisition.

[0039] The following is combined with Figure 3 right Figure 2 The system failure recovery method for data backup provided in the illustrated embodiment will be described in detail. Figure 3 A schematic flowchart of a system fault recovery method for data backup provided in this application embodiment. Figure 3 The execution subject of the embodiment shown is Figure 2 Backup device 13 in the illustrated embodiment. (As shown) Figure 3 As shown, the method includes:

[0040] S301. The backup device obtains the data cached in the buffer of the monitored device and stores the data as backup data.

[0041] Specifically, the backup device 13 obtains the data cached in the cache of the monitored device 11, such as the system operation data generated in real time during the operation of the monitored device 11, and stores the data as backup data.

[0042] Optionally, after the backup device 13 is powered on, it periodically retrieves the data cached in the cache of the monitored device 11. Specifically, the time interval between two consecutive retrievals of cached data from the cache of the monitored device 11 by the backup device 13 is less than the time interval between two consecutive storages of the cached data into the memory of the monitored device 11. Optionally, the time interval between two consecutive retrievals of cached data from the cache of the monitored device 11 by the backup device 13 is the same as the time interval between two consecutive data caching operations performed by the cache of the monitored device 11.

[0043] Optionally, the backup device 13 acquires buffer signals periodically sent by the monitored device 11. After acquiring the buffer signals sent by the monitored device 11, the backup device 13 retrieves the data buffered in the buffer of the monitored device 11 based on the buffer signals. Specifically, the buffer of the monitored device 11 periodically sends buffer signals to the backup device 13. These buffer signals are sent by the buffer of the monitored device 11 to the backup device 13 every time a certain amount of data is buffered. Optionally, the buffer of the monitored device 11 sends a buffer signal to the backup device 13 when it is full of data. Optionally, the buffer of the monitored device 11 sends a buffer signal to the backup device 13 every time it has buffered 1 / 3 or 1 / 5 of its buffer capacity, or every time it has buffered a certain amount of data smaller than its buffer capacity.

[0044] Furthermore, the backup device 13 stores the acquired data in a capacity greater than or equal to the capacity of the cache of the monitored device 11, so as to ensure that the backup device 13 performs full backup storage of the data cached in the cache of the monitored device 11.

[0045] S302. The backup device performs fault monitoring on the monitored device and sends a reset signal to the monitored device when a fault occurs, so that the monitored device can be reset and restarted.

[0046] Specifically, the backup device 13 monitors the monitored device 11 for faults, determines that the monitored device 11 has failed, and sends a reset signal to the monitored device 11 when the monitored device 11 fails, so that the monitored device 11 can be reset and restarted.

[0047] For example, when the monitored device 11 is collecting data, it runs its program in a loop. The monitored device 11 sends a loop signal each time it completes a program loop. The backup device 13 receives this loop signal from the monitored device 11. Based on this loop signal—the signal sent by the monitored device 11 after each program loop—the backup device 13 determines that the monitored device 11 has malfunctioned and sends a reset signal to the monitored device 11.

[0048] The following is an example of how backup device 13 determines that the monitored device 11 has failed based on the cyclic signal:

[0049] Optionally, the backup device 13 has a timed counting function. After each cycle signal is acquired, the timed count value of the backup device 13 is reset to zero.

[0050] Meanwhile, the backup device 13 determines that the monitored device 11 has failed as follows: if the count value of the backup device 13 is equal to the first threshold, then the monitored device 11 is determined to have failed.

[0051] The first threshold is set by counting from zero on the backup device 13 until the count value reaches the first threshold, which takes longer than the interval between two cyclic signals.

[0052] If the backup device 13 does not have a count value equal to the first threshold, it means that the backup device 13 has cleared the count value in time according to the loop signal, which means that the monitored device 11 has issued the loop signal on time, indicating that the monitored device 11 is running normally. Conversely, if the backup device 13 has a count value equal to the first threshold, it means that the count value of the backup device 13 has not been cleared in time, which means that the monitored device 11 has not issued the loop signal on time, indicating that the monitored device 11 has malfunctioned.

[0053] Optionally, after receiving the first loop signal following the reset signal, the backup device 13 continuously accumulates counts at a preset counting interval to obtain a first count value; wherein, the preset counting interval is the same as the interval between two loop signals; specifically, the interval between two loop signals refers to the interval between any two adjacent loop signals emitted by the monitored device 11 under normal operating conditions. The reset signal is the reset signal sent by the backup device 13 to the monitored device 11 when the monitored device 11 malfunctions.

[0054] At the same time, after the backup device 13 obtains the first loop signal after receiving the reset signal, it accumulates and counts the number of loop signals to obtain a second count value.

[0055] Each time the backup device 13 sends a reset signal, it resets the first and second count values ​​of the backup device 13 to zero.

[0056] Next, the backup device 13 compares the first count value and the second count value. If the first count value is greater than the second count value, it indicates that the monitored device 11 has not issued a loop signal on time, which means that the program of the monitored device 11 is running abnormally, and it can be determined that the monitored device 11 has failed. Optionally, the backup device 13 can use a preset counting interval as the interval for comparing the first count value and the second count value, and periodically compare the first count value and the second count value to determine whether the monitored device 11 has failed; the backup device 13 can also use other fixed time, such as 1 second, as the interval for comparing the first count value and the second count value, and periodically compare the first count value and the second count value to determine whether the monitored device 11 has failed. This embodiment does not make specific limitations here.

[0057] S303. After the monitored device is reset and restarted, the backup device sends the backup data to the cache of the monitored device.

[0058] Specifically, after the monitored device is reset and restarted, the backup device 13 sends the backup data to the buffer of the monitored device 11.

[0059] For example, after the backup device 13 receives the reset signal and the monitored device 11 completes the first loop of a program execution cycle, the backup device 13 sends the backup data to the buffer of the monitored device 11. Since the backup device 13 only sends the backup data to the buffer of the monitored device 11 after the first loop of the reset signal, it can be determined that the monitored device 11 operates normally after a reset and restart, ensuring that the backup data can be stored in the memory of the monitored device 11 after being sent to its buffer.

[0060] Optionally, backup device 13 can send backup data directly to the buffer of monitored device 11; alternatively, backup device 13 can send backup data to the processor of monitored device 11, and then the processor will send the backup data to the buffer of monitored device 11. After the backup data is sent to the buffer of monitored device 11, it will be stored in the memory of monitored device 11 through the buffer.

[0061] Optionally, after the backup device 13 sends the backup data to the cache of the monitored device 11, the cache of the monitored device 11 sends an acknowledgment signal to the backup device 13 either through the processor of the monitored device 11 or directly. Upon receiving the acknowledgment signal, the backup device 13 clears the backup data in its memory. Optionally, the storage unit 132 of the backup device 13 iteratively stores the data cached in the cache of the monitored device 11, meaning that, while ensuring the storage unit is full, the most recently stored data replaces the earliest stored data.

[0062] The system fault recovery method for data backup provided in this application embodiment involves a backup device that performs a complete backup of all data cached in the cache of the monitored device by synchronously acquiring the data cached in the cache of the monitored device and caching the data in the cache. The backup device also implements fault monitoring and recovery of the monitored device through different methods. After the monitored device is reset and restarted and it is determined that the monitored device is operating normally, the backup device sends the backup data to the cache of the monitored device. The backup data is permanently stored in the memory of the monitored device through the cache, which solves the problem of loss of system operation data cached in the cache when the monitored device is reset and restarted in the prior art, and ensures the integrity of the data collection of the monitored device.

[0063] This application also provides a backup device. Figure 4 Schematic diagram of the backup device structure provided in the embodiments of this application Figure 1 , Figure 5 Schematic diagram of the backup device structure provided in the embodiments of this application Figure 2 , Figure 6 Schematic diagram of the backup device structure provided in the embodiments of this application Figure 3 , Figure 7 This is a schematic diagram of a storage unit structure provided in an embodiment of this application. Wherein, Figure 5 , Figure 6 and Figure 7 All are Figure 4 Further explanation is provided below. Figure 2 , Figure 4 , Figure 5 , Figure 6 and Figure 7 The backup device provided in the embodiments of this application will be described. For example... Figure 4 As shown, the backup device 13 includes a processing unit 131, a storage unit 132, and a monitoring unit 133. The processing unit 131 is connected to both the storage unit 132 and the monitoring unit 133.

[0064] The processing unit 131 is used to obtain the data cached in the buffer of the monitored device and send the data to the storage unit 132.

[0065] Storage unit 132 is used to store the data sent by processing unit 131 as backup data.

[0066] The monitoring unit 133 is used to monitor the monitored equipment for faults and send a reset signal to the processing unit 131 when the monitored equipment fails.

[0067] Optionally, such as Figure 5 As shown, the monitoring unit 133 includes a timing and counting module 1330, which is connected to the processing unit 131. The processing unit 131 is also used to acquire the loop signal sent by the monitored device after each program running loop is completed, and send the loop signal to the timing and counting module 1330 after receiving the loop signal.

[0068] The timing counting module 1330 is used for counting, obtaining a timing count value, and clearing the timing count value to zero after receiving a loop signal; it is also used to send a reset signal to the processing unit 131 and stop counting when the timing count value is equal to a first threshold; wherein, the first threshold is set according to the time from when the timing counting module 1330 starts counting after clearing to when the timing count value reaches the first threshold being greater than the interval time of two loop signals.

[0069] Optionally, such as Figure 6As shown, the monitoring unit 133 includes a first counting module 1331 and a second counting module 1332. The first counting module 1331 and the second counting module 1332 are respectively connected to the processing unit 131, and the first counting module 1331 is connected to the second counting module 1332. The processing unit 131 is also used to acquire the loop signal sent by the monitored device after each program running loop, and send the loop signal and the reset signal to the first counting module 1331 and the second counting module 1332.

[0070] The first counting module 1331 is used to continuously accumulate counts at a preset counting interval after receiving the first cycle signal following the reset signal, to obtain a first count value. The preset counting interval is the same as the interval between two cycle signals. It is also used to clear the first count value to zero after receiving the reset signal.

[0071] The second counting module 1332 is used to accumulate the number of loop signals after receiving the first loop signal following the reset signal to obtain a second count value; it is also used to clear the second count value after receiving the reset signal; it is also used to obtain a first count value from the first counting module 1331, compare the first count value and the second count value, and send a reset signal to the processing unit 131 when the first count value is greater than the second count value.

[0072] The processing unit 131 is also configured to send a reset signal to the monitored device after receiving a reset signal, so that the monitored device can be reset and restarted; and after the monitored device is reset and restarted, retrieve backup data from the storage unit 132 and send the backup data to the buffer of the monitored device.

[0073] Furthermore, such as Figure 6 As shown, the monitoring unit 133 also includes a third counting module 1333, which is connected to the processing unit 131;

[0074] The processing unit 131 is also used to acquire the third counting signal issued by the backup device 13 after each completion of the program running loop of a storage unit 132, and after receiving the third counting signal, send the third counting signal to the third counting module.

[0075] The third counting module 1333 is used to count, obtain a third count value, and clear the third count value after receiving the third count signal; it is also used to send a self-reset signal to the processing unit 131 when the third count value is equal to the second threshold; wherein, the device of the second threshold is similar to the setting principle of the first threshold. For example, the second threshold is set according to the time from when the third counting module 1333 starts counting after clearing to when the third count value reaches the second threshold being greater than the interval time between two third count signals.

[0076] After receiving the self-reset signal, the processing unit 131 resets and restarts the backup device 13.

[0077] Furthermore, the processing unit 131 is also used to acquire the program of the monitored device and send the program to the storage unit 132 for storage as a backup program; it is also used to acquire a request signal from the monitored device requesting the transmission of a program, and upon receiving the request signal, send the backup program to the monitored device. This is to prevent the monitored device from malfunctioning due to program corruption. Optionally, the processing unit 131 can acquire the program of the monitored device while the monitored device is powered on. The processing unit 131 can also acquire the program used by the monitored device from other devices or through manual input, such as an updated program used by the monitored device. Further, the processing unit 131 sends the acquired program to the storage unit 132 for permanent storage.

[0078] For example, the request signal sent by the monitored device is a signal sent by the monitored device to request the sending program after the local program verification fails.

[0079] Optionally, such as Figure 7 As shown, storage unit 132 includes a cache module 1321, or storage unit 132 includes a cache module 1321 and a storage module 1322. Cache module 1321 is connected to processing unit 131. When storage unit 132 includes storage module 1322, cache module 1321 is also connected to storage module 1322. The cache module is used to cache data acquired by processing unit 131, and storage module 1322 is used to permanently store the data cached by cache module 1321.

[0080] The technical principles and effects of the backup device provided in this application embodiment are similar to those of the backup device. Figure 3 The system fault recovery method for data backup provided in the illustrated embodiment has a similar principle and technical effect, and will not be described again here. Furthermore, the backup device provided in this application embodiment... Figure 3 Building upon the technical effects of the illustrated embodiments, the backup device itself also achieves fault monitoring and recovery, further ensuring the reliability of data backup and fault monitoring and recovery of the monitored device. Moreover, the backup device provided in this application also backs up and stores the programs of the monitored device, preventing the monitored device from malfunctioning due to program corruption and thus avoiding data acquisition interruptions.

[0081] This application also provides an apparatus. Figure 8 This is a schematic diagram of the device structure provided in an embodiment of this application. Figure 8As shown, the server includes a processor 81 and a memory 82. The memory 82 stores executable instructions for the processor 81, enabling the processor 81 to execute the technical solutions of the above-described method embodiments. The implementation principle and technical effects are similar, and will not be repeated here. It should be understood that the processor 81 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The memory 82 may include high-speed RAM, and may also include non-volatile memory (NVM), such as at least one disk storage device, or a USB flash drive, external hard drive, read-only memory, disk, or optical disc, etc.

[0082] This application also provides a storage medium storing computer-executable instructions. When these instructions are executed by a processor, they implement the aforementioned system fault recovery method for data backup. The storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible by a general-purpose or special-purpose computer.

[0083] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.

[0084] This application also provides a program product, such as a computer program, which, when executed by a processor, implements the system fault recovery method for data backup covered by this application.

[0085] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A system fault recovery method for data backup, characterized in that, include: The backup device acquires the data cached in the buffer of the monitored device and stores the data as backup data. The monitored device is a data acquisition device, and the buffer is used to cache the system operation data collected in real time by the data acquisition device. The backup device acquires the loop signal of the monitored device, which is the signal emitted by the monitored device after each program execution loop is completed; The backup device determines that the monitored device has failed based on the loop signal, and sends a reset signal to the monitored device to reset and restart the monitored device. The backup device determines that the monitored device has malfunctioned based on the cyclic signal, including: After acquiring each loop signal, the backup device resets its timed counter to zero. The backup device determines a fault in the monitored device as follows: if the counter value equals a first threshold, then the monitored device is determined to have failed; wherein the first threshold is set based on the time taken for the backup device to count from zero until the counter value reaches the first threshold being greater than the interval between two loop signals; or... After receiving the first loop signal following the reset signal, the backup device continuously accumulates counts at a preset counting interval to obtain a first count value; the preset counting interval is the same as the interval between two loop signals; after receiving the first loop signal following the reset signal, the backup device accumulates counts of the loop signals to obtain a second count value; wherein, each time the backup device sends the reset signal, it resets the first and second count values ​​to zero; the backup device compares the first and second count values, and if the first count value is greater than the second count value, it determines that the monitored device has malfunctioned; After the monitored device is reset and restarted, the backup device sends the backup data to the cache of the monitored device to fill the system operation data lost in the cache due to the reset and restart of the monitored device.

2. The method according to claim 1, characterized in that, The backup device acquires data cached in the buffer of the monitored device, including: The backup device periodically retrieves the data cached in the cache of the monitored device.

3. The method according to claim 1, characterized in that, The backup device acquires data cached in the buffer of the monitored device, including: The backup device acquires the cached signals periodically sent by the monitored device; Based on the cached signal, the backup device obtains the data cached in the cache of the monitored device.

4. The method according to any one of claims 1-3, characterized in that, After the monitored device is reset and restarted, the backup device sends the backup data to the buffer of the monitored device, including: After the backup device receives the reset signal, the monitored device completes the first loop signal of a program running cycle and sends the backup data to the buffer of the monitored device.

5. A backup device, characterized in that, It includes a processing unit, a storage unit, and a monitoring unit, wherein the processing unit is connected to both the storage unit and the monitoring unit; wherein, The processing unit is used to acquire data cached in the buffer of the monitored device and send the data to the storage unit, wherein the monitored device is a data acquisition device, and the buffer is used to cache the system operation data collected in real time by the data acquisition device; The storage unit is used to store the data sent by the processing unit as backup data; The monitoring unit is used to monitor the monitored device for faults and send a reset signal to the processing unit when the monitored device malfunctions. The monitoring unit includes a timer counting module, which is connected to the processing unit. The processing unit is also used to acquire the loop signal sent by the monitored device after each program running cycle, and after receiving the loop signal, send the loop signal to the timing counting module. The timing and counting module is used to count, obtain a timing count value, and reset the timing count value to zero upon receiving a loop signal; it is also used to send a reset signal to the processing unit and stop counting when the timing count value equals a first threshold; wherein, the first threshold is set such that the time from when the timing and counting module starts counting after being reset to when the timing count value reaches the first threshold is greater than the interval between two loop signals; the monitoring unit includes a first counting module and a second counting module, the first counting module and the second counting module are respectively connected to the processing unit, and the first counting module is connected to the second counting module; The processing unit is also used to acquire the loop signal sent by the monitored device after each program execution loop, and send the loop signal and the reset signal to the first counting module and the second counting module. The first counting module is configured to continuously accumulate counts at a preset counting interval after receiving the first cycle signal following the reset signal, to obtain a first count value, wherein the preset counting interval is the same as the interval between two cycle signals; it is also configured to clear the first count value to zero after receiving the reset signal. The second counting module is configured to accumulate and count the number of loop signals after receiving the first loop signal following the reset signal to obtain a second count value; it is also configured to clear the second count value to zero after receiving the reset signal; and it is also configured to obtain a first count value from the first counting module, compare the first count value with the second count value, and send a reset signal to the processing unit when the first count value is greater than the second count value. The processing unit is further configured to send a reset signal to the monitored device after receiving a reset signal, so that the monitored device can be reset and restarted; and after the monitored device is reset and restarted, retrieve the backup data from the storage unit and send the backup data to the cache of the monitored device to fill the system operation data lost in the cache due to the reset and restart of the monitored device.

6. The device according to claim 5, characterized in that, The monitoring unit further includes a third counting module, which is connected to the processing unit. The processing unit is further configured to acquire the third counting signal issued by the backup device each time it completes a program execution loop of the storage unit, and send the third counting signal to the third counting module after receiving the third counting signal; The third counting module is used to count, obtain a third count value, and clear the third count value to zero after receiving the third count signal; it is also used to send a self-reset signal to the processing unit when the third count value is equal to the second threshold. Upon receiving the self-reset signal, the processing unit resets and restarts the backup device.

7. The device according to claim 5, characterized in that, The processing unit is also configured to acquire the program of the monitored device and send the program to the storage unit for storage as a backup program; it is also configured to acquire a request signal from the monitored device requesting to send the program, and send the backup program to the monitored device after receiving the request signal.

8. A system fault recovery device for data backup, characterized in that, include: Processor and memory; The memory stores executable instructions that the processor can execute; The processor executes the executable instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-4.

9. A storage medium, characterized in that, The storage medium stores computer execution instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-4.

10. A program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-4.