An abnormality recovery method, apparatus, device, and storage medium

By identifying and overwriting abnormal partitions when a Linux system fails, system startup and partition mounting issues are resolved, enabling fault repair and normal system operation.

CN114064358BActive Publication Date: 2025-12-19HOLLEY METERING LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111339786.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-12
Publication Date
2025-12-19
Estimated Expiration
2041-11-12

AI Technical Summary

Technical Problem

Faults caused by improper self-testing of storage devices during Linux system startup can prevent the system from booting or partitions from being mounted, affecting the normal operation of instruments and meters. There is a lack of effective troubleshooting methods.

Method used

When the entire system fails, identify the abnormal partitions and overwrite them using backup information. Overwrite the system partition, data partition, and program partition in order of severity of the overwrite consequences. Start the application through a warm boot and after the overwrite is completed until the fault is resolved.

Benefits of technology

To minimize the loss of partition information, enable anomaly repair, and ensure the normal operation of the entire system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064358B_ABST
    Figure CN114064358B_ABST
Patent Text Reader

Abstract

The application discloses an abnormality recovery method, device, equipment and storage medium, the method comprises the following steps: when the whole machine system appears a fault, it is judged whether the abnormal partition can be determined; if the abnormal partition can be determined, the corresponding backup information is used to cover the abnormal partition, and the application program is started after the covering is completed; if the abnormal partition cannot be determined, the corresponding backup information is used to cover the system partition, the data partition and the program partition in turn; and in the process of covering the system partition, the data partition and the program partition in turn, the application program is started after covering any partition is completed, if the fault of the whole machine system is eliminated, covering the next partition is stopped, otherwise, the whole machine system is re-heated and started, and covering the next partition is continued. The application can minimize the loss of effective information in each partition, effectively realize abnormality repair, and further ensure the normal work of the equipment to which the whole machine system belongs.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of system exception processing, in particular to an exception recovery method, device, equipment and storage medium. BACKGROUND

[0002] Linux whole machine system is applied in intelligent instruments and meters due to open source and mature technology. However, the Linux whole machine system needs to perform self-checking on core hardware, especially on storage devices to be mounted, when starting. If there is non-standard operation on the storage device, the Linux whole machine system may fail when powered on again, specifically, the Linux whole machine system cannot start, or even if the Linux whole machine system can start, the partition to be mounted cannot be mounted, causing the application program to fail to start, and further affecting the normal work of the instrument and meter. How to realize corresponding exception repair when the Linux whole machine system fails, and further ensure the normal work of the instrument and meter to which the Linux whole machine system belongs, is a problem to be solved by the present technical personnel. SUMMARY

[0003] The present application aims to provide an exception recovery method, device, equipment and storage medium, which can minimize the loss of effective information in each partition, effectively realize exception repair, and further ensure the normal work of the equipment to which the whole machine system belongs.

[0004] In order to achieve the above-mentioned purpose, the present application provides the following technical scheme:

[0005] An exception recovery method, comprising:

[0006] When the whole machine system fails, determining whether the partition of the exception can be determined, the partition comprising a system partition, a program partition and a data partition for storing a file system, an application program and historical data respectively;

[0007] If the partition of the exception can be determined, the corresponding backup information is used to cover the partition of the exception, and the application program is started after the covering is completed;

[0008] If the partition of the exception cannot be determined, the corresponding backup information is used to cover the system partition, the data partition and the program partition in sequence; and during the covering of the system partition, the data partition and the program partition in sequence, the application program is started after the covering of any partition is completed, if the failure of the whole machine system is eliminated, the covering of the next partition is stopped, otherwise, the whole machine system is restarted and the covering of the next partition is continued.

[0009] Preferably, determining whether the partition of the exception can be determined comprises:

[0010] reading identification units respectively representing whether the system partition, the program partition and the data partition are abnormal from a first memory, if the identification value in any identification unit is a value representing abnormality, determining that the partition corresponding to the any identification unit is an abnormal partition, if the identification value in each identification unit is a value representing abnormality, determining that it is unable to determine the abnormal partition; wherein the value of the identification value in each identification unit is set based on whether the corresponding partition is abnormal, the memory to which the system partition, the program partition and the data partition belong is a second memory, and the first memory is a device independent of the second memory.

[0011] Preferably, after the corresponding backup information is used to overwrite any partition, further comprising:

[0012] setting the identification value in the identification unit corresponding to the any partition for which the overwriting is completed to a value representing normality; and after determining that the identification value in each identification unit is a value representing normality, setting the identification value in each identification unit to a value representing abnormality, and entering an application program.

[0013] After the identification value in each identification unit is set to a value representing abnormality, further comprising:

[0014] starting the application program, if the application program can be normally started and the fixed file of the data partition can be normally read, setting the identification value in each identification unit to a value representing normality; if the application program can be normally started and the fixed file of the data partition cannot be normally read, setting the identification value in the identification unit corresponding to the system partition and the program partition to a value representing normality, and setting the identification value in the identification unit corresponding to the data partition to a value representing abnormality; if the application program cannot be normally started, keeping the value of the identification value in each identification unit; and when the identification value in any identification unit is a value representing abnormality, re-starting the whole machine system.

[0015] Preferably, further comprising:

[0016] separately setting part of storage units in the second memory as a backup partition, storing a backup file system, a backup fixed file and an emergency upgrade program into the backup partition, so as to realize overwriting of the corresponding partition based on each data stored in the backup partition; wherein the backup file system is a file system to be stored in the system partition, the backup fixed file is a fixed file to be stored in the data partition, and the emergency upgrade program is a program for remotely or locally online upgrading the application program after the program partition is abnormal.

[0017] Preferably, further comprising:

[0018] The key parameters required for starting and running the whole system are stored in the first memory.

[0019] Preferably, the method further comprises:

[0020] The AC power supply for the equipment to which the whole system belongs is monitored in real time, and if the AC power supply stops, the pre-set backup power supply is enabled to continue to supply power to the equipment to which the whole system belongs.

[0021] Preferably, the first memory and the second memory are both non-volatile memories.

[0022] An abnormality recovery device comprises:

[0023] A judging module is configured to determine whether the abnormal partition can be determined when the whole system fails, wherein the abnormal partition comprises a system partition, a program partition and a data partition for storing a file system, an application program and historical data respectively.

[0024] A first executing module is configured to cover the abnormal partition with the corresponding backup information if the abnormal partition can be determined, and start the application program after the covering is completed.

[0025] A second executing module is configured to cover the system partition, the data partition and the program partition in sequence with the corresponding backup information if the abnormal partition cannot be determined, and start the application program after covering any partition, stop covering the next partition if the failure of the whole system is eliminated, or re-start the whole system and continue covering the next partition.

[0026] An abnormality recovery device comprises:

[0027] A memory is configured to store a computer program.

[0028] A processor is configured to implement the steps of the abnormality recovery method according to any one of the above when executing the computer program.

[0029] A computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the abnormality recovery method according to any one of the above.

[0030] The application provides an abnormal recovery method, device, equipment and storage medium, the method comprises the following steps: when the whole machine system fails, determining whether the abnormal partition can be determined, the partition comprises a system partition, a program partition and a data partition which are used for storing a file system, an application program and historical data respectively; if the abnormal partition can be determined, the corresponding backup information is used to cover the abnormal partition, and the application program is started after the covering is completed; if the abnormal partition cannot be determined, the corresponding backup information is used to cover the system partition, the data partition and the program partition in sequence; and during the covering of the system partition, the data partition and the program partition in sequence, the application program is started after the covering of any partition is completed, if the failure of the whole machine system is eliminated, the covering of the next partition is stopped, otherwise, the whole machine system is restarted and the covering of the next partition is continued. In the application, when the whole machine system fails, if the abnormal partition can be determined, the abnormal partition is covered, otherwise, the system partition, the data partition and the program partition are covered in sequence according to the severity of the covering consequences; thus, when the whole machine system fails, the partition covering is realized in the least extent, the covering of the partition with light covering consequences is realized preferentially, the loss of effective information in each partition is minimized, the abnormal repair is effectively realized, and the normal work of the equipment to which the whole machine system belongs is ensured. BRIEF DESCRIPTION OF DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments or the prior art description. Obviously, the drawings in the following description are only a part of the present application, and for those skilled in the art, other drawings can be obtained without creative labor based on the provided drawings.

[0032] Figure 1 A flow chart of an abnormal recovery method provided by the embodiment of the present application;

[0033] Figure 2 A structure schematic diagram of an abnormal recovery device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0034] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.

[0035] Please refer to Figure 1It shows a flow chart of an abnormal recovery method provided by the embodiment of the application, and can specifically include the following steps.

[0036] S11: When the whole machine system fails, it is determined whether the abnormal partition can be determined, and the partition includes a system partition, a program partition and a data partition for storing a file system, an application program and historical data respectively.

[0037] The whole machine system can be an (embedded) Linux whole machine system, the device to which the whole machine system belongs can be an instrument and meter of the (embedded) Linux whole machine system, and the failure of the whole machine system can be that the Linux whole machine system cannot be started or the partition to be mounted cannot be mounted after being started, so that the application program cannot be started, which affects the normal work of the instrument and meter. Of course, other settings according to actual needs are also within the protection scope of the application.

[0038] It should be noted that the device using the whole machine system in the embodiment of the application stores the kernel, the file system, the application program and the historical data in the memory (the second memory). Specifically, the second memory can be partitioned into multiple partitions according to different functions, for example, the first area is configured as a kernel partition to store uboot and kener; the second area is configured as a system partition to store the file system; the third area is configured as a program partition to store the application program; the fourth area is configured as a data partition to store the historical data; and the fifth area is configured as a backup partition to store the backup file system, the backup fixed file and the emergency upgrade program. The kernel partition and the backup partition are usually not changed online, and are therefore configured as read-only, and no abnormality usually occurs during running. The file system (such as the ubi file system) is a log-type file system, and therefore the system partition needs to be configured as readable and writable. The application program usually needs to be upgraded online, and therefore the program partition and the data partition need to be configured as readable and writable. For the readable and writable partition, if improper operation occurs during running or power failure occurs suddenly when a file is being written, the writing of the file is interrupted, and when restarted again, the self-check fails, so that the whole machine system cannot mount the corresponding partition. The second memory can be a non-volatile memory, that is, the above-mentioned partitions can be set by using the non-volatile memory in the embodiment of the application, so that the loss of stored data information due to power failure and the like can be avoided.

[0039] S12: If the abnormal partition can be determined, the corresponding backup information is used to overwrite the abnormal partition, and after the overwriting is completed, the application program is started.

[0040] S13: If the abnormal partition cannot be determined, the system partition, the data partition and the program partition are sequentially overwritten by using the corresponding backup information; and in the process of sequentially overwriting the system partition, the data partition and the program partition, after any partition is overwritten, the application program is started, if the whole machine system is troubleshooted, the next partition is stopped from being overwritten, otherwise, the whole machine system is re-heated started and the next partition is continued to be overwritten.

[0041] It should be noted that according to the consequence of overwriting, the program partition, the data partition and the system partition are in descending order; the earlier the position in the above-mentioned order is, the more serious the consequence of being overwritten is, therefore, in the present application, the partition with the later position in the above-mentioned order is preferentially overwritten when necessary. Specifically, when the whole machine system is faulty, it can be firstly judged whether the abnormal partition can be determined, the partition to be judged here is the partition configured to be readable and writable, i.e. the system partition, the program partition and the data partition. If the abnormal partition can be determined (at this time, the determined abnormal partition must not simultaneously include the system partition, the program partition and the data partition), the partition is directly overwritten to recover the data of the partition, and the application program is started to run the whole machine system to realize the normal use of the whole machine system, and the self-correction ends. If the abnormal partition cannot be determined, i.e. all partitions may be abnormal, the overwriting is sequentially realized according to the order of the system partition, the data partition and the program partition, i.e. the system partition is firstly overwritten, after the system partition is overwritten, the application program is started to run the whole machine system, if the application program can be normally started and used, the whole machine system can work normally, which indicates that the whole machine system is troubleshooted, and the self-correction ends, if the application program cannot be normally started and / or used, the whole machine system cannot work normally, which indicates that the whole machine system is not troubleshooted, after the whole machine system is re-heated started, the data partition is overwritten, after the data partition is overwritten, the application program is started to run the whole machine system, if the whole machine system is troubleshooted, the self-correction ends, if the whole machine system is not troubleshooted, after the whole machine system is re-heated started, the program partition is overwritten, and after the program partition is overwritten, the application program is started to run the whole machine system.

[0042] The implementation principle of covering the arbitrary partition is consistent with the implementation principle of the corresponding technical solution in the prior art, and the data in the partition is recovered by using backup information obtained by previously backing up the data in the arbitrary partition and covering the data stored in the arbitrary partition. When the whole system is a Linux whole system, the process of covering the arbitrary partition can include: first, executing the initialization command nand erase addr1 len1 of Linux uboot, addr1 is the first address to be initialized, and len1 is the length of the initialization; then, executing the read command nand read ramaddr addr2 len2 of Linux uboot, addr2 is the first address of the corresponding backup information, len2 is the length of the backup information, and ramaddr is the first address of reading the backup information into the memory; finally, executing nand write.trimffs ramaddr addr1 len2, copying the data with a length of len2 temporarily stored in the memory ramaddr to the addr1 unit, and ending the recovery. The initialization is to realize the corresponding erasure.

[0043] In the present application, when the whole system fails, if the abnormal partition can be determined, the abnormal partition is covered, otherwise, the system partition, the data partition and the program partition are covered in turn according to the severity of the covering consequences; thus, when the whole system fails, the covering of the partition is realized to the least extent, the covering of the partition with light consequences is realized preferentially, the loss of the effective information in each partition is minimized, the abnormal repair is effectively realized, and the normal work of the equipment to which the whole system belongs is ensured.

[0044] The abnormal recovery method provided by the embodiment of the present application can include:

[0045] reading the identification units respectively indicating whether the system partition, the program partition and the data partition are abnormal from the first memory, if the identification value in any identification unit is the value indicating the abnormality, determining that the partition corresponding to the any identification unit is the abnormal partition, and if the identification value in each identification unit is the value indicating the abnormality, determining that the abnormal partition cannot be determined; wherein the value of the identification value in each identification unit is set based on whether the corresponding partition is abnormal, the memory to which the system partition, the program partition and the data partition belong is the second memory, and the first memory is a device independent of the second memory.

[0046] The embodiment of the present application can automatically hot start when the whole system fails, so that uboot is started first when the whole system starts, and the judgment of abnormal partition and the subsequent steps of covering are executed in the uboot. Specifically, the embodiment of the present application can set a first memory independent of the second memory, the first memory can be a ferroelectric memory (FRAM), an EEPROM or other nonvolatile memory, three units in the first memory can be opened as three identification units, and are defined as system, data and program respectively, representing the system partition, the data partition and the program partition respectively, and the values of the identification values in the corresponding identification units are set based on whether the system partition, the program partition and the data partition are abnormal; and 0xaa is defined as normal and 0x55 is defined as abnormal. Correspondingly, when judging whether the abnormal partition can be determined, the system, the data and the program are read from the first memory to the memory temp, if the identification value in any identification unit of the system, the data and the program is the value indicating abnormal, it is determined that the partition corresponding to the any identification unit is an abnormal partition, if the identification values in the identification units of the system, the data and the program are all values indicating abnormal, it is determined that the system partition, the data partition and the program partition can all be abnormal partitions, that is, the abnormal partition cannot be accurately located, and if the identification values in the identification units of the system, the data and the program are all values indicating normal, it is determined that the system partition, the data partition and the program partition are all normal partitions, so that the positioning of the abnormal partition can be effectively and simply realized through this way.

[0047] The embodiment of the present application provides an abnormal recovery method, after the corresponding backup information is used to cover any partition, the method can further include:

[0048] The identification value in the identification unit corresponding to the covered any partition is set as the value indicating normal, and after it is judged that the identification values in the identification units are all values indicating normal, the identification values in the identification units are all set as values indicating abnormal, and the application program is entered;

[0049] After the identification values in the identification units are all set as values indicating abnormal, the method can further include:

[0050] If the application program can be normally started and the fixed file of the data partition can be normally read, the identification values in the identification units are all set to the values indicating normality; if the application program can be normally started but the fixed file of the data partition cannot be normally read, the identification values in the identification units corresponding to the system partition and the program partition are set to the values indicating normality, and the identification value in the identification unit corresponding to the data partition is set to the value indicating abnormality; if the application program cannot be normally started, the values of the identification values in the identification units are kept; and when the identification value in any identification unit is the value indicating abnormality, the whole system is re-started.

[0051] After the whole system is started, the uboot is started first and then the application program is started; after the uboot program (i.e. the whole system starting program) completes the covering of any partition, the identification value in the identification unit corresponding to the any partition is updated to the value indicating normality; and if the identification values in the identification units are all the values indicating normality, the uboot program updates the identification values in the identification units to the values indicating abnormality, and then enters the application program; when entering the application program, the application program is first started; if the application program can be normally started, it indicates that the system partition and the program partition are normal, and the identification values in the identification units corresponding to the system partition and the program partition are updated to the values indicating normality; at this time, the fixed file (Fixed_File) in the data partition is read; if it can be normally read, it indicates that the data partition is also normal, and the identification value in the identification unit corresponding to the data partition is updated to the value indicating normality, and the device to which the whole system belongs can work normally; if it cannot be normally read, it indicates that the data partition is abnormal, and the identification value in the identification unit corresponding to the data partition is the value indicating abnormality; the daemon process of the application program stops the running of the whole system, executes the Linux reset command reboot to re-start the whole system, and re-starts the running of the whole system; if the application program cannot be normally started (or the application program cannot be run), the identification values in the identification units are kept as the values indicating abnormality (the values set in the uboot), at this time, the hardware watchdog resets the whole system (specifically, the MCU is reset and the whole system is re-started).

[0052] The abnormality recovery method provided by the embodiment of the application can further include the following steps.

[0053] The part storage units in the second memory are separately set as a backup partition, and the backup file system, the backup fixed file and the emergency upgrade program are stored in the backup partition, so that the corresponding partition is covered based on the data stored in the backup partition; the backup file system is a file system that should be stored in the system partition, the backup fixed file is a fixed file that should be stored in the data partition, and the emergency upgrade program is a program that can remotely or locally upgrade the application program online after the program partition is abnormal.

[0054] It should be noted that the embodiment of the present application can separately open the backup partition on the second memory, and the backup partition is configured as read-only, and the backup partition is only open to uboot, not to the kernel, so that only uboot can be used when starting the whole machine system. The backup partition is used to save the backup file system, the emergency upgrade program and the backup fixed file; for the data information stored in the backup partition, the backup file system is the binary code of the file system when the factory is shipped, the backup fixed file is a file that must exist in the data partition, and the emergency upgrade program is not the actual application program when the factory is shipped, but an independent program, which has the function of online downloading and upgrading, can actively download the latest application program and parameters through FTP, and can also upgrade the application program remotely or locally; and then after covering the program partition, the emergency upgrade program is used to request to download and upgrade the application program. Therefore, through the setting of the backup partition, the corresponding data information can be provided for the whole machine system when starting, and the normal start of the whole machine system is ensured.

[0055] The abnormal recovery method provided by the embodiment of the present application can further include:

[0056] The key parameters required for starting and running the whole machine system are stored in the first memory.

[0057] It should be noted that the embodiment of the present application can also save the factory key parameters (such as MAC address, table calibration parameters and other personalized parameters) required for starting and running the whole machine system in the first memory, because the first memory will not be initialized, so even if an exception occurs, these key parameters will not be lost, and the key parameters can be ensured not to be lost.

[0058] The abnormal recovery method provided by the embodiment of the present application can further include:

[0059] The alternating current for supplying power to the device to which the whole machine system belongs is monitored in real time, and if the alternating current stops supplying power, the pre-set standby power supply is used to continue supplying power to the device to which the whole machine system belongs.

[0060] The embodiment of the application can also set up a chargeable backup power source on hardware, such as a chargeable battery or a large-capacity super capacitor. Correspondingly, alternating current is monitored in real time, and the backup power source is used to maintain the whole system to work for a period of time after the alternating current power is monitored to be off; specifically, after the alternating current is monitored to be off, a Linux reset command reboot is executed, the whole system receives the reboot command to shut down all operations and then performs a reset to use the backup power source to realize power supply, thereby reducing the risk of system crash to a certain extent.

[0061] In addition, the first memory and the second memory can both be nonvolatile memories, and of course, other settings according to actual needs are also within the protection scope of the application. In a specific mode, the data partition, the system partition and the program partition can be sorted according to the frequency of the whole machine, that is, the probability of abnormality, in descending order, and then abnormality detection is realized for each partition based on this.

[0062] The embodiment of the application also provides an abnormality recovery device, as shown in the figure, which can include: Figure 2

[0063] The judging module 11 is used to judge whether the abnormal partition can be determined when the whole system fails, and the partition includes a system partition, a program partition and a data partition for storing a file system, an application program and historical data respectively;

[0064] The first executing module 12 is used to cover the abnormal partition by using the corresponding backup information if the abnormal partition can be determined, and start the application program after the covering is completed;

[0065] The second executing module 13 is used to cover the system partition, the data partition and the program partition in sequence by using the corresponding backup information if the abnormal partition cannot be determined; and start the application program after covering any partition is completed in the process of covering the system partition, the data partition and the program partition in sequence, if the failure of the whole system is eliminated, stop covering the next partition, otherwise, reheat start the whole system and continue to cover the next partition.

[0066] The embodiment of the application also provides an abnormality recovery device, which can include:

[0067] The memory is used to store a computer program;

[0068] The processor is used to execute the computer program to realize the steps of any one of the abnormality recovery methods.

[0069] ​The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor, and can implement the steps of any one of the above abnormal recovery methods.

[0070] It should be noted that the related parts of the abnormal recovery device, the equipment and the storage medium provided by the embodiment of the present application are described in detail in the corresponding part of the abnormal recovery method provided by the embodiment of the present application, and will not be described here. In addition, the parts of the above technical solutions provided by the embodiment of the present application which are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail, so as not to be too verbose.

[0071] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An abnormality recovery method characterized by comprising: The application comprises: When the whole system fails, it is determined whether the abnormal partition can be determined, the partition comprising a system partition, a program partition and a data partition for storing file system, application program and historical data respectively; If the abnormal partition can be determined, the corresponding backup information is used to cover the abnormal partition, and the application program is started after the covering is completed; If the abnormal partition cannot be determined, the corresponding backup information is used to cover the system partition, the data partition and the program partition in sequence; and after covering any partition, the application program is started, if the whole system is eliminated, the covering of the next partition is stopped, otherwise, the whole system is restarted and the covering of the next partition is continued; The identification value in the corresponding identification unit of the covered partition is set to a normal value; and after it is determined that the identification values in all identification units are normal values, the identification values in all identification units are set to abnormal values, and the application program is entered; The application program is started, if the application program can be normally started and the fixed file of the data partition can be normally read, the identification values in all identification units are set to normal values; if the application program can be normally started but the fixed file of the data partition cannot be normally read, the identification values in the corresponding identification units of the system partition and the program partition are set to normal values, and the identification value in the corresponding identification unit of the data partition is set to an abnormal value; if the application program cannot be normally started, the identification values in all identification units are retained; and when the identification value in any identification unit is an abnormal value, the whole system is restarted; The determination of whether the abnormal partition can be determined comprises: The identification units indicating whether the system partition, the program partition and the data partition are abnormal are read from the first memory, if the identification value in any identification unit is an abnormal value, it is determined that the partition corresponding to the identification unit is an abnormal partition, if the identification values in all identification units are abnormal values, it is determined that the abnormal partition cannot be determined; the values of the identification values in all identification units are set based on whether the corresponding partition is abnormal, the memory to which the system partition, the program partition and the data partition belong is a second memory, and the first memory is a device independent of the second memory.

2. The method of claim 1, wherein, The application further comprises: In the second memory, part of the storage units are separately set as backup partitions, the backup file system, the backup fixed file and the emergency upgrade program are stored in the backup partitions, so that the covering of the corresponding partition is realized based on the data stored in the backup partitions; the backup file system is the file system to be stored in the system partition, the backup fixed file is the fixed file to be stored in the data partition, and the emergency upgrade program is the program for remotely or locally upgrading the application program when the program partition is abnormal.

3. The method of claim 2, wherein, The application further comprises: The key parameters required for starting and running the whole machine system are stored in the first memory.

4. The method of claim 3, wherein, Further comprising: Real-time monitoring of AC power supply for the equipment to which the whole machine system belongs, and if the AC power supply stops, a pre-set backup power supply is enabled to continue to supply power to the equipment to which the whole machine system belongs.

5. The method of claim 4, wherein, The first memory and the second memory are both non-volatile memories.

6. An abnormality recovery apparatus characterized by comprising: Comprising: A judging module, configured to: when the whole machine system fails, judge whether an abnormal partition can be determined, the partition comprising a system partition, a program partition and a data partition for storing a file system, an application program and historical data respectively; wherein judging whether an abnormal partition can be determined comprises: reading identification units respectively indicating whether the system partition, the program partition and the data partition are abnormal from the first memory, if the identification value in any identification unit is a value indicating abnormality, determining that the partition corresponding to the any identification unit is an abnormal partition, and if the identification values in all identification units are values indicating abnormality, determining that an abnormal partition cannot be determined; wherein the values of the identification values in the identification units are set based on whether the corresponding partition is abnormal, the memory to which the system partition, the program partition and the data partition belong is the second memory, and the first memory is a device independent of the second memory; A first executing module, configured to: if an abnormal partition can be determined, covering the abnormal partition with corresponding backup information, and starting the application program after the covering is completed; A second executing module, configured to: if an abnormal partition cannot be determined, covering the system partition, the data partition and the program partition in sequence with corresponding backup information; and in the process of covering the system partition, the data partition and the program partition in sequence, starting the application program after covering any partition is completed, if the failure of the whole machine system is eliminated, stopping covering the next partition, otherwise, re-starting the whole machine system and continuing to cover the next partition; setting the identification value in the identification unit corresponding to the any partition covered to a value indicating normality; and after judging that the identification values in all identification units are values indicating normality, setting the identification values in all identification units to values indicating abnormality, and entering the application program; starting the application program, if the application program can be started normally and the fixed file of the data partition can be read normally, setting the identification values in all identification units to values indicating normality, if the application program can be started normally but the fixed file of the data partition cannot be read normally, setting the identification values in the identification units corresponding to the system partition and the program partition to values indicating normality and setting the identification value in the identification unit corresponding to the data partition to a value indicating abnormality, if the application program cannot be started normally, keeping the values of the identification values in all identification units; and when the identification value in any identification unit is a value indicating abnormality, re-starting the whole machine system.

7. An abnormality recovery apparatus characterized by comprising: Comprising: A memory, configured to store a computer program; A processor for implementing the steps of the abnormal recovery method as claimed in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that, A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the abnormal recovery method as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • System recovery method and device, and terminal

    CN108874582A

  • Embedded system fault self-recovery method, terminal equipment and storage medium

    CN110083493A