CN109408282B - Application program backup recovery method and device and computer readable storage medium - Google Patents

Application program backup recovery method and device and computer readable storage medium Download PDF

Info

Publication number
CN109408282B
CN109408282B CN201811024560.5A CN201811024560A CN109408282B CN 109408282 B CN109408282 B CN 109408282B CN 201811024560 A CN201811024560 A CN 201811024560A CN 109408282 B CN109408282 B CN 109408282B
Authority
CN
China
Prior art keywords
backup
application program
application
area
file
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.)
Active
Application number
CN201811024560.5A
Other languages
Chinese (zh)
Other versions
CN109408282A (en
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.)
Shenzhen Neoway Technology Co Ltd
Original Assignee
Shenzhen Neoway Technology 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 Shenzhen Neoway Technology Co Ltd filed Critical Shenzhen Neoway Technology Co Ltd
Priority to CN201811024560.5A priority Critical patent/CN109408282B/en
Publication of CN109408282A publication Critical patent/CN109408282A/en
Application granted granted Critical
Publication of CN109408282B publication Critical patent/CN109408282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • 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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Abstract

The invention relates to a method for backing up and recovering an application program running on electronic equipment. The electronic equipment comprises a memory, wherein system files of the electronic equipment and application programs installed on the electronic equipment are backed up in the memory. The application program backup recovery method comprises the following steps: judging whether the electronic equipment recovers the system file or not in the starting process of the electronic equipment; when the electronic equipment recovers the system file in the starting process, continuously judging whether the application program is damaged; when the application program is damaged, reading a backup file of the application program from the memory; and restoring the application program by using the read backup file. Therefore, when the system of the electronic equipment is recovered when started and the application program is damaged, the backup recovery is carried out on the application program, unnecessary recovery on the undamaged application program can be avoided, and data loss in the recovery process of the application program can also be avoided.

Description

Application program backup recovery method and device and computer readable storage medium
Technical Field
The invention relates to the field of computer communication, in particular to an application program backup and recovery method, application program backup and recovery equipment and a computer readable storage medium.
Background
Flash memory (NAND FLASH) is one type of memory device that has Non-Volatile (Non-Volatile) characteristics, i.e., is capable of holding data for long periods of time without a supply of current. This feature makes flash memory a memory for internal systems or external data of various embedded devices. For example, in a linux system, a flash memory is divided into different independent partitions for storing a system image file or a backup file of the system image file, and when the system is started, the contents of the system image file in the partitions are loaded to complete a starting process of the system. The flash memory as the external data storage comprises a storage area of other data besides a storage area of the system image file.
In the prior art, when backing up an application program, the application program needs to be first put into a file directory customized by a system, when making a mirror image of a system file, the application program in the file directory is synthesized into the system mirror image file, and finally the application program backs up the application program together with the backup of the system mirror image file and stores the application program in a backup storage area of the system mirror image file in a unified manner.
However, if the system fails during the operation of the system, the backed-up system file is read from the backup storage area of the system image file and the system is restored, and the application program backed up together with the system file can be restored while the system is restored, even if the application program is not damaged when the system fails. This may cause damage or loss of application data of the application program that has been backed up but not damaged.
Disclosure of Invention
In view of the above, it is necessary to provide an application backup and recovery method that can intelligently determine whether a backed-up application needs to be backed-up and recovered when a system is recovered, so as to solve the above problems.
In order to achieve the above object, the application backup recovery method provided by the present invention is executed on an electronic device, where the electronic device includes a memory, and a system file of the electronic device and an application installed on the electronic device are backed up in the memory. The application program backup recovery method comprises the following steps:
in the starting process of the electronic equipment, judging whether the electronic equipment recovers a system file or not;
when the electronic equipment is subjected to system recovery in the starting process, further judging whether an application program on the electronic equipment is damaged;
when the application program is damaged, reading a backup file of the application program from the memory; and
and restoring the application program by using the read backup file.
In an embodiment, the method for restoring backup of an application further includes the steps of: backing up the application program into the memory; wherein the backing up of the application program into the memory specifically comprises: displaying an interface for a user to select an application program to be backed up; determining the application program to be backed up selected by the user through the operation of the user on the interface; making an application program selected by a user and needing backup into a mirror image file of the application program; and backing up the image file to an application backup area of the memory by using a backup program.
In one embodiment, when the application program is backed up in an application backup area of a memory, the application backup area is defined with a header information area and an application program area, the header information area stores a check value of header information, and the check value is used for verifying data information of the application backup area; and a backup application program file is stored in the application program area.
In an embodiment, the header information further stores basic information of each backup application, where the basic information of each backup application includes a file size of the application, a file path of the application, and a check value of a file content of the application.
In an embodiment, the determining whether the application program on the electronic device is damaged specifically includes: acquiring a check value in the file content of the application program and a check value in the header information of the application backup area; judging whether the check value of the file content of the application program is consistent with the check value of the header information; and when the two check values are not consistent, judging that the application program is damaged.
In one embodiment, when the application program selected by the user is backed up to the application backup area, the method further comprises the following steps: reading a check value of the file content of the application program and a check value in the header information of the application backup area, and judging whether the two check values are consistent; when the two check values are consistent, judging that the file backup of the application program is correct; and when the two check values are not consistent, judging that the file backup of the application program is wrong, reading the file under the appointed directory of the application program from the electronic equipment again, and carrying out backup again until the two check values are consistent.
In one embodiment, the application backup area further includes a free area not storing any data, and the backing up the application program to the application backup area further includes: writing a backup mark of the selected application program into the free area before the backup of the application program is carried out; after the application program backup is completed, the backup mark is removed from the free area; and when power failure occurs in the application program backup process and the backup mark is read from the idle area, the application program is backed up again.
In one embodiment, the application backup area further includes a free area where no data is stored, and the restoring the application program using the read backup file includes: writing a backup mark of the selected application program into the free area before performing backup recovery on the application program; after the application program backup is completed, the backup mark is removed from the free area; and when power failure occurs in the backup recovery process of the application program and the backup mark is read from the idle area, performing backup recovery on the application program again.
In addition, in order to solve the above problem, the present invention further provides an application backup recovery apparatus. The application program backup and recovery device comprises a memory, a processor and an application program backup and recovery program which is stored on the memory and can run on the processor, wherein when the application program backup and recovery program is executed by the processor, the steps of the application program backup and recovery method are realized.
In addition, to solve the above problems, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores an application backup-restore program that when executed by at least one processor implements the steps of the application backup-restore method described above.
The application program backup recovery method provided by the invention can be used for performing backup recovery on the application program only when the system of the electronic equipment is recovered and the application program is detected to be damaged. Therefore, unnecessary recovery of the undamaged application program can be avoided, and data loss of the application program in the recovery process of the application program can be avoided.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an electronic device running an application backup recovery method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of program modules of the application backup and restore system of the electronic device shown in fig. 1.
Fig. 3 is a schematic diagram of a data structure of an application backup area according to an embodiment of the present invention.
FIG. 4 is a diagram illustrating a data structure of each backup application according to an embodiment of the invention.
FIG. 5 is a diagram illustrating an application backup selection interface according to an embodiment of the invention.
Fig. 6 is a flowchart illustrating steps of a method for restoring backup of an application according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
Fig. 1 is a schematic diagram illustrating a hardware structure of an electronic device operating an application backup and restore method according to an embodiment of the present invention. As shown in fig. 1, the application backup and restore method is executed on an electronic device 1. The electronic device 1 may be implemented in various forms. For example, the electronic device 1 described in the present invention may include electronic devices 1 such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and fixed terminals such as a Digital TV, a desktop computer, and the like.
The electronic device 1 includes components such as a memory 11, a display unit 12, an input unit 13, and a processor 14. It will be appreciated by those skilled in the art that the configuration of the electronic device 1 shown in fig. 1 does not constitute a limitation of the electronic device 1, and that the electronic device 1 may comprise more or less components than those shown, or some components may be combined, or a different arrangement of components.
The display unit 12 is used to display information input by a user or information provided to the user. The Display unit 12 may include a Display panel, which may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The input unit 13 may be used to receive numeric or character information input by a user through an input device such as a keyboard, and to generate key signal inputs related to user settings and function control of the electronic apparatus 1. Specifically, the input unit 13 may include a touch panel and other input devices. The touch panel, also called a touch screen, may collect touch operations of a user (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. The touch panel may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 14, and can receive and execute commands sent by the processor 14. In addition, the touch panel may be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 13 may include other input devices in addition to the touch panel. In particular, the other input devices may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like, which are not limited herein.
Further, the touch panel may overlay the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel transmits the touch operation to the processor 14 to determine the type of the touch event, and then the processor 14 provides a corresponding visual output on the display panel according to the type of the touch event. Although the touch panel and the display panel are two independent components to implement the input and output functions of the electronic device 1 in the present embodiment, in some embodiments, the touch panel and the display panel may be integrated to implement the input and output functions of the electronic device 1, and the present invention is not limited thereto.
The memory 11 may be used to store software programs as well as various data. The memory 11 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 11 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 14 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 11 and calling data stored in the memory 11, thereby performing overall monitoring of the mobile terminal. Processor 14 may include one or more processing units; preferably, the processor 14 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 14.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in processor 14. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in memory 11 and executed by processor 14.
Referring to fig. 2, a schematic diagram of program modules of the application backup system in the electronic device 1 is shown. The application backup system 20 includes, but is not limited to, a determination module 21, a recovery module 22, a backup module 23, and an interface module 24. It should be noted that the modules described herein are a set of program instructions stored in the memory 11 for implementing specific functions.
The memory 11 stores a system file of the electronic device 1 and an application file installed in the electronic device 1. In this embodiment, the memory 11 is a flash memory. Different storage partitions are defined in the memory 11, and the system files and the application files are stored in the different storage partitions of the memory 11, that is, the storage paths of the system files and the application files are different. In this embodiment, different backup partitions are defined in the memory 11, such as a system backup area for storing system backup files and an application backup area for storing application backup files. The different storage partitions and the different backup partitions are different areas of the memory 11 that are logically independent of each other.
Referring to fig. 3, a storage example of an application backup area in an embodiment of the present invention is shown. The application backup area of the memory 11 is defined with a header information area, an application program area, and a free area. The free area is an area which is not stored with any data information temporarily in the application backup area. When the storage block storing the data in the application backup area is damaged, the data stored in the storage block can be stored in the free area, so that the data loss is avoided. In the embodiment, considering the problem of bad blocks in the flash memory and the size of the backup file, the size of the free area in the application backup area should not exceed 15% of the application backup area. And a backup application program file is stored in the application program area.
The header information area stores basic information of each backup application, a storage address of the backup application, and a check value of the header information. The check value is used for verifying the data information of the application backup area; the storage address of the backup application program is a logical address stored in the application backup area when the application program is backed up in the application backup area; the basic information of each backup application program comprises the number and/or name of the backed-up application program, the file size, the file path and other information. Referring to fig. 4, a storage example of each backed-up application in an embodiment of the present invention is shown. The application backup area stores basic information of each backed-up application program, including a backup number (i.e., Int Key) of the application program, a file Size (i.e., Int Back _ Size) of the application program, a file Path (i.e., Char App _ Path) of the application program, and a check value (i.e., unidimed IntCrc _ Byte) of file content. In this embodiment, the check value of the file content is the same as the check value of the header information. The program file path is a file path in the electronic device 1 when the application program runs on the electronic device 1. The check value is used for judging whether the file content of the application program is changed. In this embodiment, the backup module 23 backs up the system files and the application files of the electronic device 1 in the system backup area and the application backup area, respectively.
The backup module 23 specifically includes the following steps in backing up the application program file to the application backup area: firstly, selecting an application program to be backed up; then, the selected application program to be backed up is made into a mirror image file of the application program by using a mirror image program; and finally, backing up the image file of the application program to an application backup area of the memory by using a backup program.
In this embodiment, the selection of the application to be backed up is implemented by the interface module 24. In particular, the interface module 24 provides an interface that enables a user to select an application to be backed up. The interface includes a window or option for the user to select the application to be backed up. Referring to fig. 5, in an embodiment, the interface module 24 may read all the applications installed on the electronic device 1 from the application storage area of the memory 11, provide an option for each read application on the interface, and display the interface and the option and the name of the application to the user. The user can select the application program corresponding to the option to be backed up by clicking the option on the interface, that is, when the user clicks the option, the user indicates that the user selects to back up the application program, and the backup request of the reference program is triggered. As shown in fig. 5, the user has selected application 1, application 2, and application 4 as applications to be backed up. It will be appreciated that when the number of applications exceeds the real-world area of the interface, the applications may be displayed in a split-screen manner or a slider may be provided for the user to view other applications, and not to follow up. The window can receive input operation of a user and select an application program to be backed up according to information input by the user, for example, the application program to be backed up is selected according to an application program name input by the user. The application program to be backed up is any non-system program installed on the electronic device 1.
In the present embodiment, the backup program is a system-owned application program that is run on the electronic device 1 and is used to backup system files. Therefore, after the backup program makes the application program selected by the user and needing backup into the image file, the image file is merged into the version file of the system file. When the system file needs to be updated, namely version upgrade, the backup program will backup the image file of the application program to the application backup area. In this embodiment, the image file of the application is an img image file. In another embodiment, the backup program is an application program installed on the electronic device 1 and provided by a third party for program backup, such as a fastboot program.
The judging module 21 is configured to judge whether a system file of the electronic device 1 is recovered during a boot process of the electronic device 1. In this embodiment, the start-up of the electronic device 1 includes two modes; one of them is the normal starting mode of the system, and the other is the recovery starting mode of the system. When the electronic device 1 is powered on, if the electronic device 1 adopts the system recovery start mode, the determining module 21 determines that the system file of the electronic device 1 is recovered during the power on process.
When the system file of the electronic device 1 is restored, the determining module 21 further determines whether the application program is ready to be damaged. When the application program is damaged, the recovery module 22 acquires the backup file of the application program from the application backup area XX, and recovers the application program by using the acquired backup file.
In this embodiment, the determining module 21 determines whether the application program is ready for damage according to whether the two check values are consistent or not by acquiring the check value in the header information of the application program backup area and the check value in the file content of the application program. When the two check values are inconsistent, the determining module 21 determines that the application program has been damaged, and needs to perform backup recovery on the application program. When the two check values are consistent, the determining module 21 determines that the application program is not damaged in the system recovery process, so that the application program does not need to be backed up and recovered.
Therefore, the application program backup recovery method provided by the invention can perform backup recovery on the application program only when the system of the electronic equipment is recovered and the application program is detected to be damaged. Therefore, unnecessary recovery of the undamaged application program can be avoided, and data loss of the application program in the recovery process of the application program can be avoided.
In another embodiment of the present invention, after the application program selected by the backup module 23 is backed up in the application backup area, the determining module 21 may read the check value of the file content of the application program and the check value of the header information area of the application backup area, and determine whether the two check values are consistent. When the two check values are not consistent, the determining module 21 determines that the file backup of the application program is incorrect, i.e. needs to be backed up again, and sends information to the backup module 23. The backup module 23 reads the files in the directory specified by the application program from the electronic device 1 again and backs up the files until the two check values are consistent. When the two check values are consistent, the determining module 21 determines that the file backup of the application program is accurate. Therefore, the accuracy of the application program for backing up the file can be ensured.
In an embodiment of the present invention, the backing up the application program to the application backup area by the backup module 23 specifically includes the steps of: writing a backup mark of the selected application program into the free area before performing backup recovery on the application program; and after the application program backup is completed, clearing the backup mark from the free area. And when power failure occurs in the backup recovery process of the application program and the backup mark is read from the idle area, performing backup recovery on the application program again.
Therefore, the application program backup recovery method provided by the application can provide a power-off protection mechanism when the application program is backed up, namely, under the condition of power-off, whether the backup work of the application program is complete or not can be identified. If not, the backup can be carried out again to ensure the integrity of the application program.
In an embodiment of the present invention, the restoring, by the restoring module 22, the application program by using the read backup file includes: writing a backup mark of the selected application program into the free area before backup recovery is carried out on the application program; after the application program backup is completed, the backup mark is removed from the free area; and when power failure occurs in the backup recovery process of the application program and the backup mark is read from the idle area, performing backup recovery on the application program again.
Therefore, the application program backup and recovery method provided by the application program can provide a power-off protection mechanism when the application program is recovered, namely, whether the recovery work of the application program is complete or not can be identified under the condition of power-off. If not, the backup can be restored again to ensure the integrity of the backup restoration of the application program.
Referring to fig. 6, a flowchart illustrating steps of a method for restoring backup of an application according to an embodiment of the present invention is shown. In this embodiment, the execution order of the steps in the flowchart shown in fig. 6 may be changed and some steps may be omitted according to different requirements.
Step 601, in the process of starting up the electronic device, judging whether the electronic device recovers the system file. If yes, go to step 602; if not, the process ends.
In one embodiment, in this embodiment, the startup of the electronic device 1 includes two modes; one of them is the normal starting mode of the system, and the other is the recovery starting mode of the system. When the electronic device 1 is powered on, if the electronic device 1 adopts the system recovery start mode, the determining module 21 determines that the system file of the electronic device 1 is recovered during the power on process.
Step 602, determining whether an application on the electronic device is damaged. If yes, go to step 603; if not, the flow ends.
In one embodiment, step 601 can be omitted, that is, the starting step 602 of the application backup recovery method includes: when the electronic equipment recovers the system file in the starting process, whether the application program on the electronic equipment is damaged or not is judged.
In an embodiment, the application backup area is defined with a header information area and an application program area, the header information area stores a check value of header information, and the check value is used for verifying data information of the application backup area; and a backup application program file is stored in the application program area. The header information also stores basic information of each backup application program, and the basic information of each backup application program comprises the file size of the application program, the file path of the application program and the check value of the file content of the application program.
Step 602 specifically includes: the judging module 21 judges whether the application program is ready for damage by acquiring the check value in the header information of the application program backup area and the check value in the file content of the application program, and according to whether the two check values are consistent. When the two check values are inconsistent, the determining module 21 determines that the application program has been damaged, and needs to perform backup recovery on the application program. When the two check values are consistent, the determining module 21 determines that the application program is not damaged in the system recovery process, so that the application program does not need to be backed up and recovered.
Step 603, reading the backup file of the application program from the memory.
In this embodiment, the backup module 23 reads a backup file of the application program from the application backup area of the memory 11.
And step 604, restoring the application program by using the read backup file.
Specifically, the backup module 23 uses the backup program to restore the application program with the read backup file. In the present embodiment, the backup program is a system-owned application program that is run on the electronic device 1 and is used to backup system files. Therefore, after the backup program makes the application program selected by the user and needing backup into an image file, the image file is merged into the version file of the system file. When the system file needs to be updated, i.e. version upgrade, the backup program will backup the image file of the application program to the application backup area. In this embodiment, the image file of the application is an img image file. In another embodiment, the backup program is an application program installed on the electronic device 1 and provided by a third party for program backup, such as a fastboot program.
Therefore, the application program backup recovery method provided by the invention can perform backup recovery on the application program only when the system of the electronic equipment is recovered and the application program is detected to be damaged. Therefore, unnecessary recovery of the undamaged application program can be avoided, and data loss of the application program in the recovery process of the application program can be avoided.
In an embodiment of the present invention, the restoring, by the restoring module 22, the restoring the application program by using the read backup file specifically includes: writing a backup mark of the selected application program into the free area before performing backup recovery on the application program; after the application program backup is completed, the backup mark is removed from the free area; and when power failure occurs in the backup recovery process of the application program and the backup mark is read from the idle area, performing backup recovery on the application program again.
Therefore, the application program backup and recovery method provided by the application program can provide a power-off protection mechanism when the application program is recovered, namely, whether the recovery work of the application program is complete or not can be identified under the condition of power-off. If not, the backup can be restored again to ensure the integrity of the backup restoration of the application program.
In another embodiment, the application backup recovery method further includes, before step 601, the steps of: and backing up the application program files into the application backup area. Specifically, the step of backing up the application program file to the application backup area includes the following steps: firstly, selecting an application program to be backed up; then, the selected application program to be backed up is made into a mirror image file of the application program by using a mirror image program; and finally, backing up the image file of the application program to an application backup area of the memory by using a backup program.
In this embodiment, the selection of the application to be backed up is implemented by the interface module 24. In particular, the interface module 24 provides an interface that enables a user to select an application to be backed up. The interface includes a window or option for the user to select the application to be backed up. In one embodiment, the interface module 24 may read all the applications installed on the electronic device 1 from the application storage area of the memory 11, provide an option for each read application on the interface, and display the interface and the options and the names of the applications to the user. The user can select the application program corresponding to the option to be backed up by clicking the option on the interface, that is, when the user clicks the option, the user indicates that the user selects to back up the application program, and the backup request of the reference program is triggered. The window can receive input operation of a user and select an application program to be backed up according to information input by the user, for example, the application program to be backed up is selected according to an application program name input by the user. The application program to be backed up is any non-system program installed on the electronic device 1.
In an embodiment of the present invention, the backing up the application program file to the application backup area by the backup module 23 further includes: when an application program is backed up to the application backup area, the backup module reads the check value of the file content of the application program and the check value in the head information of the application backup area and judges whether the two check values are consistent. When the two check values are consistent, the backup module 23 determines that the file backup of the application program is correct; when the two check values are not consistent, the backup module 23 determines that the file backup of the application program is incorrect, and reads the file in the directory specified by the application program from the electronic device again and performs the backup until the two check values are consistent.
In another embodiment of the present invention, the backing up the application program to the application backup area further includes: writing a backup mark of the selected application program into the free area before the backup of the application program is carried out; and after the application program backup is finished, removing the backup mark from the idle area, and if the power failure occurs in the application program backup process and the backup mark is read from the idle area, carrying out backup on the application program again.
Therefore, the application program backup recovery method provided by the application can provide a power-off protection mechanism when the application program is backed up, namely, under the condition of power-off, whether the backup work of the application program is complete or not can be identified. If not, the backup can be carried out again to ensure the integrity of the application program.
It will be understood by those skilled in the art that all or part of the steps of the method according to the above embodiments may be implemented by hardware associated with at least one program instruction, where the at least one program may be stored in a computer readable storage medium, and when executed, the at least one program may implement the steps of the application backup restoration method according to any one of the embodiments of the present invention.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be substantially or partially embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the application backup and recovery method according to the embodiments of the present invention.
The foregoing is illustrative of embodiments of the present invention, and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the embodiments of the present invention and are intended to be within the scope of the present invention.

Claims (8)

1. An application program backup recovery method is operated on an electronic device, the electronic device comprises a memory, system files of the electronic device and application programs installed on the electronic device are backed up in the memory, and the application programs are backed up in an application backup area of the memory in a mirror image file mode, the application backup area is defined with a head information area and an application program area, a check value of head information is stored in the head information area, and the check value is used for verifying data information of the application backup area; the application program area is stored with backup application program files, and the application program backup recovery method comprises the following steps:
in the starting process of the electronic equipment, judging whether the electronic equipment recovers a system file or not;
when the electronic equipment is subjected to system recovery in the starting process, further acquiring a check value in file content of an application program on the electronic equipment and a check value in header information of the application backup area;
judging whether the check value of the file content of the application program is consistent with the check value of the header information;
when the two check values are not consistent, judging that the application program is damaged;
when the application program is damaged, reading a backup file of the application program from the memory; and
and restoring the application program by using the read backup file.
2. The application backup recovery method of claim 1, further comprising the steps of: backing up the application program into the memory; wherein the backing up of the application program into the memory specifically comprises:
displaying an interface for a user to select an application program to be backed up;
determining the application program to be backed up selected by the user through the operation of the user on the interface;
making an application program selected by a user and needing backup into a mirror image file of the application program;
and backing up the image file to an application backup area of the memory by using a backup program.
3. The method for application backup recovery according to claim 2, wherein the header information further stores therein basic information of each backup application, the basic information of each backup application including a file size of the application, a file path of the application, and a check value of a file content of the application.
4. The method for application backup recovery according to claim 3, wherein when the application selected by the user is backed up to the application backup area, further comprising the steps of:
reading a check value of the content of the application program file and a check value in the head information of the application backup area, and judging whether the two check values are consistent;
when the two check values are consistent, judging that the file backup of the application program is correct;
and when the two check values are not consistent, judging that the file backup of the application program is wrong, reading the file under the appointed directory of the application program from the electronic equipment again, and carrying out backup again until the two check values are consistent.
5. The method for application backup recovery according to any of claims 1 to 4, wherein the application backup area further includes a free area where no data is stored, and the application backup to the application backup area further includes:
writing a backup mark of the selected application program into the free area before the backup of the application program is carried out;
after the application program backup is completed, the backup mark is removed from the free area;
and when power failure occurs in the application program backup process and the backup mark is read from the idle area, the application program is backed up again.
6. The method for restoring backup of application programs according to any one of claims 1 to 4, wherein the application backup area further includes a free area where no data is stored, and the restoring the application program using the read backup file includes:
writing a backup mark of the selected application program into the free area before performing backup recovery on the application program;
after the application program backup is completed, the backup mark is removed from the free area;
and when power failure occurs in the backup recovery process of the application program and the backup mark is read from the idle area, performing backup recovery on the application program again.
7. An application backup-restoration device comprising a memory, a processor, and an application backup-restoration program stored on the memory and executable on the processor, wherein the application backup-restoration program when executed by the processor implements the steps of the application backup-restoration method of any of claims 1 to 6.
8. A computer readable storage medium storing an application backup-restore program which, when executed by at least one processor, implements the steps of the application backup-restore method of any of claims 1 to 6.
CN201811024560.5A 2018-08-31 2018-08-31 Application program backup recovery method and device and computer readable storage medium Active CN109408282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811024560.5A CN109408282B (en) 2018-08-31 2018-08-31 Application program backup recovery method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811024560.5A CN109408282B (en) 2018-08-31 2018-08-31 Application program backup recovery method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109408282A CN109408282A (en) 2019-03-01
CN109408282B true CN109408282B (en) 2022-05-27

Family

ID=65463857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811024560.5A Active CN109408282B (en) 2018-08-31 2018-08-31 Application program backup recovery method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109408282B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061514A (en) * 2019-10-30 2020-04-24 翱捷智能科技(上海)有限公司 Flash device, integrated circuit and Flash device starting method
CN111158952B (en) * 2019-12-12 2024-03-29 浙江华云信息科技有限公司 Method for automatically backing up configuration files by using external storage device
CN111324488B (en) * 2020-02-12 2023-12-08 浙江大华技术股份有限公司 Program backup processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514065A (en) * 2012-06-29 2014-01-15 国基电子(上海)有限公司 Electronic device with automatic detection and recovery function and method
CN104133740A (en) * 2014-07-28 2014-11-05 浪潮软件集团有限公司 Method for recovering abnormal power failure data

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140164830A1 (en) * 2011-10-14 2014-06-12 Alastair M. Slater Using a virtual boot device to access a system recovery image
CN103092720B (en) * 2011-10-31 2016-06-08 深圳市众鸿科技股份有限公司 For kernel processing device and the restoration methods of vehicle-mounted terminal
CN104765631B (en) * 2015-04-13 2018-01-16 广东欧珀移动通信有限公司 A kind of application recovery method and device of mobile terminal
CN105045617B (en) * 2015-07-03 2019-11-12 Tcl集团股份有限公司 A kind of application recovery method and system of android system
CN105302593B (en) * 2015-07-17 2018-12-18 天津市英贝特航天科技有限公司 The remote update system and method for PowerPC motherboard
CN105224423A (en) * 2015-10-26 2016-01-06 Tcl海外电子(惠州)有限公司 Terminal data backup method and device
CN108376083A (en) * 2018-01-17 2018-08-07 深圳市宏电技术股份有限公司 A kind of APP rollback methods and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514065A (en) * 2012-06-29 2014-01-15 国基电子(上海)有限公司 Electronic device with automatic detection and recovery function and method
CN104133740A (en) * 2014-07-28 2014-11-05 浪潮软件集团有限公司 Method for recovering abnormal power failure data

Also Published As

Publication number Publication date
CN109408282A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
EP3514683B1 (en) Memory collection method and terminal
CN103150231B (en) The method of computer booting and computer system
CN109408282B (en) Application program backup recovery method and device and computer readable storage medium
US20120311279A1 (en) Data recovery and backup system and process
US20140109071A1 (en) Method for updating operating system and handheld electronic apparatus
CN105094903A (en) Method and device for upgrading firmware
US7900091B2 (en) Method for recovering basic input output system and computer device thereof
US7337359B2 (en) System and method for recovering a device state
CN108241550B (en) Backup and restoration method for operating system
CN110083404B (en) Data processing method and system of human-computer interface equipment and human-computer interface equipment
EP1879109A1 (en) Information processing device, program, and storage medium
CN110825419B (en) Firmware refreshing method and device, electronic equipment and storage medium
CN112579361B (en) Backup data reconstruction method, device, equipment and storage medium
TW202131170A (en) Firmware corruption recovery
EP3291092B1 (en) Data recovery method, device and terminal
CN114398065B (en) Micro front-end system updating method and device, electronic equipment and storage medium
CN105446785A (en) Method and system for unloading application program
US11249661B2 (en) Information processing apparatus, control method, and program
CN111382009B (en) Automatic system maintenance method and computer equipment with automatic maintenance function
CN113849494A (en) Data updating method and device
KR20080017642A (en) Computer system and recovery method thereof
CN101464818B (en) Instant backup method for files, and its instant recovery method and system
KR20080041383A (en) Apparatus and method of file management in portable device
JP2015146102A (en) Sensor controller, sensor device equipped with sensor controller, electronic device mounting sensor device, and application software restoration method
CN112099819A (en) Data processing method, data processing device and vehicle-mounted terminal

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
GR01 Patent grant
GR01 Patent grant