CN115373901A - Terminal data recovery method, device, equipment and storage medium - Google Patents

Terminal data recovery method, device, equipment and storage medium Download PDF

Info

Publication number
CN115373901A
CN115373901A CN202211037244.8A CN202211037244A CN115373901A CN 115373901 A CN115373901 A CN 115373901A CN 202211037244 A CN202211037244 A CN 202211037244A CN 115373901 A CN115373901 A CN 115373901A
Authority
CN
China
Prior art keywords
partition
working
standby
terminal
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211037244.8A
Other languages
Chinese (zh)
Inventor
阳欢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wingtech Electronic Technology Co Ltd
Original Assignee
Shanghai Wingtech Electronic 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 Shanghai Wingtech Electronic Technology Co Ltd filed Critical Shanghai Wingtech Electronic Technology Co Ltd
Priority to CN202211037244.8A priority Critical patent/CN115373901A/en
Publication of CN115373901A publication Critical patent/CN115373901A/en
Pending legal-status Critical Current

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/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
    • 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/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for recovering terminal data, wherein the method comprises the following steps: responding to a triggered starting operation, and detecting whether a working partition in the terminal is abnormal in reading and writing or not, wherein the working partition comprises a storage space for storing application data; if the read-write abnormality of the working partition is detected, acquiring a standby partition and mounting the standby partition to the working partition; the standby partition is a partition which is backed up in the terminal in advance and has the same size with the storage space of the working partition; and when the mounting operation is finished and the read-write normality of the standby partition is detected, starting a loading process and restoring the application data in the working partition to the standby partition. According to the scheme, when the abnormal reading and writing of the working partition are detected, the standby partition can be automatically mounted to the working partition, so that the working partition is replaced by the standby partition effectively in time, the application data is restored to the standby partition, the terminal can continue to be normally used, and the defect that the terminal needs to be repaired by a factory due to partition damage is overcome.

Description

Terminal data recovery method, device, equipment and storage medium
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a method, an apparatus, a device, and a storage medium for recovering terminal data.
Background
With the rapid development of terminal technology, terminal devices such as mobile phones and the like have been widely used by more and more users, wherein the terminal device using the high-pass module generally needs to store parameters such as calibration, comprehensive testing and basic configuration by using a non-volatile Random Access Memory (NV for short).
Currently, in the using process of relevant terminal equipment, modem parameters are always stored in a modestm 1 partition when leaving a factory, and continuously perform read-write interaction with the modestm 1 partition in the terminal operation process. However, when the modemst1 partition is damaged and cannot read and write data, important parameters are lost, so that terminal devices such as a mobile phone and the like cannot be normally used.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a device and a storage medium for recovering data of a terminal, which can ensure that the terminal continues to be normally used when a working partition in the terminal is damaged, and avoid the defect that the terminal must be returned to a factory for maintenance due to the damage of the partition.
In a first aspect, an embodiment of the present application provides a terminal data recovery method, including:
responding to a triggered starting operation, and detecting whether a working partition in the terminal is abnormal in reading and writing or not, wherein the working partition comprises a storage space for storing application data;
if the read-write abnormality of the working partition is detected, acquiring a standby partition and mounting the standby partition to the working partition; the standby partition is a partition which is backed up in the terminal in advance and has the same size with the storage space of the working partition;
and when the mounting operation is completed and the read-write of the standby partition is detected to be normal, starting a loading process and restoring the application data in the working partition to the standby partition.
In one embodiment, acquiring the spare partition and mounting the spare partition to the working partition includes:
based on the working partition, searching a standby partition corresponding to the working partition;
acquiring mounting parameters of the standby partitions; the mounting parameters comprise standby partition identifiers and standby partition attribute information;
and mounting the standby partition to the working partition based on the standby partition identification and the standby partition attribute information.
In one embodiment, mounting the standby partition to the working partition comprises:
acquiring read-write access path information corresponding to the work partition;
and changing the read-write access path corresponding to the working partition to the standby partition based on the read-write access path information.
In one embodiment, prior to responding to the triggered boot operation, the method further comprises:
when the work partition of the terminal is in a non-data storage state, executing system installation operation and system software downloading operation;
acquiring NV parameters in a storage partition and copying and storing the NV parameters into a working partition;
writing system parameters in the working partition;
and copying and storing the NV parameters and the system parameters in the working partition into the standby partition.
In one embodiment, detecting whether a work partition in a terminal is read and written abnormally comprises:
acquiring partition parameters corresponding to the work partitions;
and detecting the partition parameters according to a preset partition read-write detection rule so as to determine whether the read-write of the working partition in the terminal is abnormal.
In one embodiment, after detecting whether the read-write abnormality of the work partition in the terminal exists, the method further includes:
and if the read-write of the work partition is detected to be normal, executing a starting process.
In one embodiment, the NV parameters include at least one of: SIM card information, wireless parameters, partition list information, operator information and user parameters; the system parameters include at least one of: calibration parameters, single-board current parameters and IMEI identification.
In a second aspect, an embodiment of the present application provides a terminal data recovery apparatus, where the apparatus includes:
the detection module is used for responding to the triggered starting operation and detecting whether a work partition in the terminal is abnormal in reading and writing or not, wherein the work partition comprises a storage space used for storing application data;
the mounting module is used for acquiring a standby partition and mounting the standby partition to a working partition if the read-write abnormality of the working partition is detected; the standby partition is a partition which is backed up in the terminal in advance and has the same size as the storage space of the working partition;
and the recovery module is used for executing the loading process and recovering the application data in the working partition to the standby partition when the mounting operation is finished and the read-write of the standby partition is detected to be normal.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements, when executing the computer program, the steps of the terminal data recovery method provided in any embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the terminal data recovery method provided in any embodiment of the present application.
According to the method, the device, the equipment and the storage medium for recovering the terminal data, whether a working partition in the terminal is abnormal in reading and writing or not is detected through responding to a triggered starting operation, the working partition comprises a storage space used for storing application data, if the working partition is detected to be abnormal in reading and writing, a standby partition is obtained and mounted to the working partition, the standby partition is a partition which is backed up in the terminal in advance and has the same size with the storage space of the working partition, and after the mounting operation is completed, a loading process cake is started to recover the application data in the working partition to the standby partition. Compared with the prior art, the technical scheme can automatically detect whether the work partition is abnormal in reading and writing, when the work partition is detected to be abnormal in reading and writing, the standby partition is used for mounting to the work partition, the work partition can be effectively replaced by the standby partition, application data in the work partition is recovered to the standby partition, the terminal can be ensured to be continuously and normally used, and therefore the defect that the terminal needs to be returned to a factory for maintenance due to partition damage is overcome. Meanwhile, in the whole data recovery process, the terminal can be completed by means of storage resources in the terminal without any external storage equipment, so that the safety and the stability of data recovery are ensured.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a schematic structural diagram of terminal data recovery provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a terminal data recovery method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for writing parameters into a terminal and performing backup according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for writing parameters into a terminal and performing backup according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a terminal data recovery method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal data recovery apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal data recovery apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings. For convenience of understanding, some technical terms related to the embodiments of the present application are explained below:
non-volatile random access memory: NV is a name for (Nonvolatile Random Access Memory, NVRAM). Once data is written into NV, the data cannot be lost even if power is lost, and the original setting can still be kept when the data is restarted next time. Typically, NV is a proprietary file system that stores basic configuration and radio frequency parameters for the handset. When the mobile phone is powered off, the data stored in the NV cannot be lost. All high-pass platforms use NV to store important parameters of the handset.
Modem Modem: these are called Modulator and Demodulator for short. Which is a method of modulating a digital signal to be transmitted onto or separating a digital signal from a carrier wave, capable of translating the digital signal from a computer into analog signals transmittable along a common telephone line, which in turn can be received by another modem at the other end of the line and translated into a language understandable by the computer.
It can be understood that with the rapid development of mobile communication, mobile phones and other terminal devices have become necessities for people to carry with, and go deep into the aspect of daily life. Currently, a terminal device using a high-pass platform generally has two partitions: a working partition for NV and a storage partition initialized with NV parameters. The current NV work partition can comprise a modestm 1 partition and a modestm 2 partition, and the modestm 1 partition and the modestm 2 partition are equivalent in the work process. When the terminal equipment is used, the modem parameters are stored in the modestm 1 partition when leaving the factory, and the mobile phone continuously performs read-write interaction with the modestm 1 partition in the running process. However, when the modemst1 partition is damaged and cannot read and write data, important parameters are lost, so that the mobile phone cannot be normally used.
Based on the defects, the application provides a terminal data recovery method, a device, equipment and a storage medium, compared with the prior art, the technical scheme can automatically detect whether the work partition is abnormal in reading and writing, when the abnormal reading and writing of the work partition is detected, the standby partition is used for mounting to the work partition, the work partition can be timely and effectively replaced by the standby partition, so that the application data in the work partition can be recovered to the standby partition, the terminal can be ensured to be continuously and normally used, and the defect that the terminal must be returned to a factory for maintenance due to the damage of the partition is overcome. In the whole data recovery process, the terminal can be completed by means of the storage resources in the terminal without any external storage equipment, and the safety and the stability of data recovery are ensured.
The terminal data recovery method provided by the embodiment of the application can be applied to the terminal. Alternatively, the terminal may be a mobile phone, a tablet Computer, a desktop, a laptop, a notebook, an Ultra-mobile Personal Computer (UMPC), a handheld Computer, a netbook, a Personal Digital Assistant (PDA), a wearable electronic device, a virtual reality device, and the like. The specific form of the terminal is not limited in any way in the embodiments of the present application.
The terminal may be installed with an operating system, and the operating system may include an Android (Android) operating system, a Windows (Windows) operating system, an apple (ios) operating system, and the like. The type of the operating system is not limited in the embodiments of the present application.
To further explain the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the accompanying drawings and the detailed description, and the following describes in detail a terminal data recovery method, an apparatus, a device, and a storage medium provided by the embodiments of the present application with reference to fig. 1 to 8. Although the embodiments of the present application provide the following embodiments or steps of the method operation instructions shown in the drawings, more or less steps of the operation instructions may be included in the method based on the conventional or non-inventive labor. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application. The method can be executed in sequence or in parallel according to the method shown in the embodiment or the figure when the method is executed in an actual processing procedure or a device.
Fig. 1 is a schematic flowchart of a method for recovering data of a terminal according to an embodiment of the present application, where the method is applied to a terminal, and as shown in fig. 1, the method includes:
s101, responding to a triggered starting operation, and detecting whether a working partition in the terminal is abnormal in reading and writing, wherein the working partition comprises a storage space for storing application data.
Before the terminal leaves the factory, a blank partition may be applied in advance in the terminal, and the blank partition may be used as a spare partition. The size of the storage space of the standby partition is the same as that of the storage space of the working partition. The function of the standby partition is to replace the working partition for data read-write operation when the working partition is damaged.
Optionally, the number of the work partitions may be one or multiple, when the number of the work partitions is multiple, the functions of each work partition are different, and the sizes of the corresponding storage spaces may be the same or different. The corresponding standby partition can be set for each working partition in advance according to the space size of the actual storage resource.
The work partition may be disposed in an Embedded multimedia controller (EMMC) of the terminal, where the EMMC is a storage device, and refers to a package composed of a flash memory and a flash memory controller integrated on the same silicon chip, and at least includes an MMC (multimedia Card) interface, a flash memory device, and a main controller.
It is understood that the above-mentioned power-on operation may be an initial operation performed when the terminal needs to be used. As an implementation manner, the power-on operation may be triggered by a user in a power-on use stage of the terminal after the terminal leaves a factory, for example, the power-on operation may be triggered by clicking a button or by touching the button; as another implementation manner, the boot operation may be triggered by the terminal at a stage of an Engineering Verification Test (EVT), a Design Verification Test (DVT), a small-batch Process Verification Test (PVT), and the like before production and delivery.
In the process of detecting whether the work partition in the terminal is read and written abnormally, partition parameters corresponding to the work partition can be obtained, and then the partition parameters are detected according to a preset partition read and write detection rule so as to determine whether the work partition in the terminal is read and written abnormally. The partition parameters may include a partition type, a partition identifier, a partition storage space size, a partition function, and a storage data type, and may be presented in different fields. The partition read-write detection rule may be set in advance according to a mapping relationship between the partition parameter and whether the read-write is abnormal.
Optionally, the read-write operation may be performed on the working partition according to the partition parameter, and the read-write execution data is counted, where the read-write execution data includes the number of times of read-write execution, speed data of each read-write and a result of each read-write execution, so as to determine whether the working partition in the terminal is abnormal in read-write according to the read-write execution data, and when the read-write execution data meets a normal read-write condition, the working partition is determined to be normal in read-write; and when the read-write execution data does not accord with the read-write normal condition, determining the working partition as read-write abnormal.
S102, if the read-write abnormity of the working partition is detected, a standby partition is obtained and mounted to the working partition; the standby partition is a partition that is backed up in advance in the terminal with the same size as the storage space of the working partition.
S103, when the mounting operation is completed and the read-write of the standby partition is detected to be normal, starting a loading process and restoring the application data in the working partition to the standby partition.
Specifically, after whether a working partition in a terminal is read and written abnormally is detected, when the reading and writing abnormality of the working partition is detected, a standby partition corresponding to the working partition is searched based on the working partition, mounting parameters of the standby partition are obtained, the mounting parameters include a standby partition identifier and standby partition attribute information, and then the standby partition is mounted to the working partition based on the standby partition identifier and the standby partition attribute information. The standby partition identification is used for uniquely representing the identity information of the standby partition; the spare partition attribute information may include information such as a spare partition type, a storage space size, a spare partition function, and a storage data type.
It should be noted that, when there are a plurality of working partitions, each working partition has a unique partition identifier, and a backup partition may be backed up for each working partition and stored in a partition list, and each backup partition also has a unique backup partition identifier. Since there may be a plurality of spare partitions, the spare partition corresponding to the working partition identifier may be searched and obtained from the spare partition list according to the working partition identifier.
As an implementation manner, in the process of mounting the standby partition to the working partition, a mounting parameter of the standby partition may be obtained, where the mounting parameter is a parameter required by the standby partition when the standby partition is used to perform a mounting operation. And then, obtaining read-write access path information corresponding to the work partition, wherein the read-write access path information refers to an access path corresponding to the terminal when performing read-write interaction with the work partition in the using process and can include a path access identifier, data read-write access time and the like. And changing the read-write access path corresponding to the working partition to the standby partition based on the read-write access path information and in combination with the standby partition identifier and the standby partition attribute information corresponding to the working partition.
When the mounting operation is finished, the working partition is replaced by the standby partition, whether the standby partition is normal in reading and writing can be further detected, and when the standby partition is detected to be normal in reading and writing, the terminal can realize reading and writing interaction through the standby partition in the using process; when the read-write abnormality of the standby partition is detected, the available standby partition is continuously searched and detected until the read-write of the standby partition is normal, then a loading process is started, the data applied in the working partition is restored to the standby partition, and a starting process is executed.
Further, please refer to fig. 2, after checking whether the read/write of the work partition in the terminal is normal, when it is detected that the read/write of the work partition is normal, a boot process is executed.
Illustratively, when the terminal is equipped with an Android system, the Android system is taken as an example to briefly describe a boot process of the terminal, where the Android boot process may be divided into two stages, a first stage is the boot of linux, and a second stage is the boot of Android (which may be referred to as an upper-layer boot process). After the terminal is powered on, the first stage is as follows: and controlling to run a bootstrap image file, starting execution of a bootstrap chip from a preset code of a solidified ROM, and then loading the bootstrap image file into a DRAM for running, wherein the bootstrap image file is mainly used for executing hardware initialization of equipment, and after the initialization of the hardware equipment is completed, a bootloader can guide a kernel image file to be loaded into the DRAM for running continuously, wherein the kernel image file is mainly used for initializing a linux system environment of terminal equipment and is used for starting equipment of an Android virtual machine.
After the system environment is initialized, the second stage is entered, and initialization processes, such as an init process and an Android virtual machine program, may be started, where the init process is responsible for creating several most critical core daemon processes in the system, including but not limited to zygate and service manager. Where zygate is the first Dalvik virtual machine started by Android, and is responsible for starting Java processes. service manager is the basis for Binder communication. The zygate process is a parent process of all java processes, creates a java virtual machine and registers a JNI method for the java virtual machine, for example, a zygate virtual machine promoter process system _ server, creates a server Socket, starts a SystemServer process, starts a Binder thread pool and a SystemServiceManager, and further starts various system services. Meanwhile, the AMS started by the SystemServer process starts Launcher, and after the Launcher is started, shortcut icons of installed applications are displayed on an interface, for example, shortcut icons of a reading application, a wallet application and the like are presented on a terminal interface.
According to the terminal data recovery method provided by the embodiment of the application, whether a working partition in a terminal is abnormal in reading and writing is detected through responding to a triggered starting operation, the working partition comprises a storage space used for storing application data, if the abnormal reading and writing of the working partition is detected, a standby partition is obtained and mounted to the working partition, the standby partition is a partition which is backed up in the terminal in advance and has the same size with the storage space of the working partition, and when the mounting operation is executed and the normal reading and writing of the standby partition are detected, a loading process cake is started to recover the application data in the working partition to the standby partition. Compared with the prior art, the technical scheme can automatically detect whether the work partition is abnormal in reading and writing, when the work partition is detected to be abnormal in reading and writing, the standby partition is used for mounting to the work partition, the work partition can be effectively replaced by the standby partition, application data in the work partition is recovered to the standby partition, the terminal can be ensured to be continuously and normally used, and therefore the defect that the terminal needs to be returned to a factory for maintenance due to partition damage is overcome. Meanwhile, in the whole data recovery process, the terminal can be completed by means of the storage resources in the terminal without any external storage equipment, so that the safety and the stability of data recovery are ensured.
In another embodiment of the present application, before responding to the triggered boot operation, a specific implementation manner of data writing and backup operation for the terminal is further provided. Referring to fig. 3, the method includes:
s201, when the work partition of the terminal is in a non-data storage state, executing system installation operation and system software downloading operation.
S202, acquiring NV parameters in the storage partition and copying and storing the NV parameters to the working partition.
And S203, writing system parameters in the work partition.
Specifically, before leaving the factory, the terminal needs to perform data writing and related partition backup operations on the terminal, and may check in advance whether each work partition in all work partitions in the terminal stores data, and execute a system installation operation and a system software downloading operation when the terminal is in an empty state, where all work partitions do not have data storage.
Optionally, the system may include an Android system, an ios system, a hong meng system, or the like, for example. The system software may include font software, system monitoring software, system optimization software, system administrators, and the like.
In the process of executing the system installation operation and the system software downloading operation, the system installation package and the system software installation package can be obtained and controlled to run, so that the system installation operation and the system software downloading operation are executed.
It should be noted that, in the modem part of the handset, it is often necessary to customize some NV parameters in different versions, including: RF NV parameters, and operator customized NV parameters, etc. The high-pass platform NV system mainly relates to two partitions, namely a working partition of NV and a storage partition of NV parameter initialization values. The corresponding image file can be made based on the NV parameters, and the image file is downloaded and stored in the storage partition FSG partition.
Wherein the NV parameter comprises at least one of: SIM card information, radio parameters, partition list information, operator information, and user parameters. The SIM card information indicates whether the terminal supports double cards or single cards, fixed dialing, short messages and the like; the wireless parameters comprise wireless network information supported by the terminal; the operator information includes operator data supported by the terminal; the partition list information comprises identification, storage space, partition types and other attribute information corresponding to each partition in the terminal; the user parameter is user information corresponding to a user using the terminal.
After the system installation operation and the system software downloading operation are executed, the NV parameters in the storage partition can be acquired, and the NV parameters are copied and stored in the working partition. And then various factory settings and system parameters are written in the work partition. It should be noted that the system parameters include at least one of the following: calibration parameters, single board current parameters and IMEI. For example, sequentially: the method comprises the following operations of single board writing, standard comprehensive test parameter writing, single board current parameter writing, single board function writing, whole machine current writing, coupling test parameter writing, whole machine function writing, IMEI writing and the like. Wherein, the production line can calibrate each terminal, and the calibration parameter of each terminal is different.
The IMEI refers to a mobile phone serial number and a mobile communication terminal for identifying each independent mobile phone in a mobile phone network, wherein the serial number is 15-17 digits, and the first 8 digits (TAC) are model approval numbers (6 digits in the early stage) and are codes for distinguishing brands and models of the mobile phones. The next 2 bits (FAC) are the last assembly number (present only in earlier models) representing the final assembly code. The last 6 bits (SNR) are the string number, representing the production sequence number.
It can be understood that the terminal does not operate the FSG partition of the storage partition in the normal use process, and therefore, the storage FSG partition parameter is always the initial state of the terminal device when it leaves the factory. When the terminal accesses the internet and registers the 5G network, the parameters of the working partition can be read according to the requirement, and meanwhile, the running state can be written into the working partition of the terminal, so that data interaction is carried out with the working partition continuously in the running process.
And S204, copying and storing the NV parameters and the system parameters in the working partition into the standby partition.
Specifically, after the system parameters are written into the working partition, the NV parameters and the system parameters in the working partition can be copied into the standby partition, so that the factory requirement is met, and the factory can be delivered.
It should be noted that the size of the storage space of the spare partition is the same as the size of the storage space of the working partition. The standby partition is used for replacing the working partition in time when the working partition is damaged, so that the read-write interaction of data is continuously completed, and the normal work of the terminal is ensured.
For example, please refer to fig. 4, taking a terminal as a mobile phone as an example, the inside of the mobile phone may include a work partition mode 1 partition and a storage partition FSG partition, where the FSG partition is used to store an NV parameter initialization value, and a blank partition may be applied in the mobile phone in advance as a spare partition mode backup partition, where a size of a storage space of the spare partition mode backup partition is the same as a size of a storage space of the work partition mode 1 partition. When the modestm 1 partition of the mobile phone is empty, software downloading and soft system installation are carried out, NV parameter initialization values in the FSG partition are copied and stored into the modestm 1 partition, then in a production link, system parameters are written into the modestm 1 partition, the system parameters can include 1MEI, calibration parameters and the like, data in the modestm 1 partition are copied to a standby partition, modem backup partition and then the mobile phone leaves a factory.
Referring to fig. 5, when a user triggers a power-on operation of the mobile phone, the mobile phone is enabled to respond to the triggered power-on operation, whether the modestm 1 partition in the mobile phone is read and written abnormally is detected, and if the modestm 1 partition is detected to be read and written normally, a power-on process is executed; if abnormal read-write of the modem 1 partition is detected, a standby partition modem backup partition corresponding to the modem 1 partition is obtained, a mounting parameter of the modem backup partition is obtained, the mounting parameter can comprise a modem backup partition identifier and modem backup partition attribute information, and then the modem backup partition is mounted to the modem 1 partition based on the modem backup partition identifier and the modem backup partition attribute information. And detecting whether the modem backup partition can be read and written normally or not, starting a loading process and restoring the application data in the modem 1 partition to the modem backup partition when the modem backup partition is read and written normally, thereby executing a starting process.
The terminal data recovery method provided by the embodiment of the application can use the standby partition to mount to the working partition when the read-write abnormality of the working partition is detected, so that the application data in the working partition is recovered to the standby partition, the terminal can be ensured to be continuously and normally used, the defect that the partition is damaged and needs to be repaired back to a factory is avoided, in the whole data recovery process, the terminal can be completed by means of storage resources in the terminal without any external storage equipment, and the safety and the stability of data recovery are ensured.
It should be understood that although the various steps in the flow charts of fig. 1-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least some of the steps in fig. 1-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
On the other hand, fig. 6 is a schematic structural diagram of a terminal data recovery apparatus according to an embodiment of the present application. The apparatus may be an apparatus in a terminal, as shown in fig. 6, the apparatus 600 includes:
the detection module 610 is configured to detect whether a work partition in the terminal is abnormal in reading and writing in response to a triggered boot operation, where the work partition includes a storage space for storing application data;
the mounting module 620 is configured to, if it is detected that the working partition is abnormal in reading and writing, obtain a standby partition and mount the standby partition to the working partition; the standby partition is a partition which is backed up in the terminal in advance and has the same size with the storage space of the working partition;
and a recovering module 630, configured to execute the loading process and recover the application data in the working partition to the standby partition when the mount operation is completed and it is detected that the read-write of the standby partition is normal.
Optionally, as shown in fig. 7, the mounting module 620 includes:
a searching unit 621, configured to search, based on the working partition, a standby partition corresponding to the working partition;
an obtaining unit 622, configured to obtain mount parameters of the standby partition; the mounting parameters comprise standby partition identification and standby partition attribute information;
and a mounting unit 623 configured to mount the standby partition to the working partition based on the standby partition identifier and the standby partition attribute information.
Optionally, the mounting unit 623 is specifically configured to:
acquiring read-write access path information corresponding to the work partition;
and changing the read-write access path corresponding to the working partition to the standby partition based on the read-write access path information.
Optionally, the apparatus is further configured to:
when the work partition of the terminal is in a non-data storage state, executing system installation operation and system software downloading operation;
acquiring NV parameters in a storage partition and copying and storing the NV parameters into a working partition;
writing system parameters in the working partition;
and copying and storing the NV parameters and the system parameters in the working partition into the standby partition.
Optionally, the detecting module 610 is specifically configured to:
acquiring partition parameters corresponding to the work partitions;
and detecting the partition parameters according to a preset partition read-write detection rule so as to determine whether the read-write of the working partition in the terminal is abnormal.
Optionally, the apparatus is further configured to:
and if the read-write of the work partition is detected to be normal, executing a starting process.
Optionally, the NV parameters include at least one of: SIM card information, wireless parameters, partition list information, operator information and user parameters; the system parameters include at least one of: calibration parameters, single-board current parameters and IMEI identification.
For specific limitations of the terminal-based data recovery apparatus, reference may be made to the above limitations on the terminal data recovery method, which is not described in detail herein. The modules in the terminal data recovery device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
On the other hand, the terminal device provided in the embodiments of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the terminal data recovery method as described above is implemented.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a computer system of a terminal device according to an embodiment of the present application.
As shown in fig. 8, the computer system 300 includes a Central Processing Unit (CPU) 301 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage section 303 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the system 300 are also stored. The CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The following components are connected to the I/O interface 305: an input portion 306 including a keyboard, a mouse, and the like; an output section 307 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN card, a modem, or the like. The communication section 309 performs communication processing via a network such as the internet. A drive 310 is also connected to the I/O interface 305 as needed. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 310 as necessary, so that the computer program read out therefrom is mounted into the storage section 308 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 303, and/or installed from the removable medium 311. The above-described functions defined in the system of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 301.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor, comprising: the device comprises a detection module, a mounting module and a recovery module. The names of the units or modules do not form a limitation on the units or modules themselves in some cases, for example, the detection module may also be described as "detecting whether a work partition in the terminal, which includes a storage space for storing application data, is read and written abnormally in response to a triggered boot operation".
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may be separate and not incorporated into the electronic device. The computer-readable storage medium stores one or more programs that, when executed by one or more processors, perform the method for restoring terminal data described in the present application:
responding to a triggered starting operation, and detecting whether a working partition in a terminal is abnormal in reading and writing or not, wherein the working partition comprises a storage space for storing application data;
if the read-write abnormality of the working partition is detected, acquiring a standby partition and mounting the standby partition to the working partition; the standby partition is a partition which is backed up in the terminal in advance and has the same size as the storage space of the working partition;
and when the mounting operation is completed and the read-write of the standby partition is detected to be normal, starting a loading process and restoring the application data in the working partition to the standby partition.
To sum up, according to the method, the apparatus, the device, and the storage medium for recovering terminal data provided in the embodiments of the present application, it is detected whether a working partition in a terminal is abnormal in reading and writing by responding to a triggered boot operation, where the working partition includes a storage space for storing application data, and if it is detected that the working partition is abnormal in reading and writing, a standby partition is obtained and mounted to the working partition, where the standby partition is a partition that is backed up in advance in the terminal and has the same size as the storage space of the working partition, and after the mounting operation is completed, a loading process cake is started to recover the application data in the working partition to the standby partition. Compared with the prior art, the technical scheme can automatically detect whether the work partition is abnormal in reading and writing, when the work partition is detected to be abnormal in reading and writing, the standby partition is used for mounting to the work partition, the work partition can be effectively replaced by the standby partition, application data in the work partition is recovered to the standby partition, the terminal can be ensured to be continuously and normally used, and therefore the defect that the terminal needs to be returned to a factory for maintenance due to partition damage is overcome. Meanwhile, in the whole data recovery process, the terminal can be completed by means of the storage resources in the terminal without any external storage equipment, so that the safety and the stability of data recovery are ensured.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A method for recovering terminal data is characterized in that the method comprises the following steps:
responding to a triggered starting operation, and detecting whether a working partition in a terminal is abnormal in reading and writing or not, wherein the working partition comprises a storage space for storing application data;
if the read-write abnormality of the working partition is detected, acquiring a standby partition and mounting the standby partition to the working partition; the standby partition is a partition which is backed up in the terminal in advance and has the same size as the storage space of the working partition;
and when the mounting operation is completed and the read-write of the standby partition is detected to be normal, starting a loading process and restoring the application data in the working partition to the standby partition.
2. The method of claim 1, wherein obtaining a spare partition and mounting the spare partition to the working partition comprises:
based on the working partition, searching a standby partition corresponding to the working partition;
acquiring mounting parameters of the standby partition; the mounting parameters comprise standby partition identification and standby partition attribute information;
and mounting the standby partition to the working partition based on the standby partition identification and the standby partition attribute information.
3. The method of claim 2, wherein mounting the spare partition to the working partition comprises:
acquiring read-write access path information corresponding to the work partition;
and changing the read-write access path corresponding to the working partition to the standby partition based on the read-write access path information.
4. The method of claim 1, wherein prior to responding to a triggered boot operation, the method further comprises:
when the work partition of the terminal is in a non-data storage state, executing system installation operation and system software downloading operation;
acquiring NV parameters in a storage partition and copying and storing the NV parameters into the working partition;
writing system parameters in the working partition;
and copying and storing the NV parameters and the system parameters in the working partition into the standby partition.
5. The method according to claim 1, wherein detecting whether the work partition in the terminal is abnormal in reading and writing comprises:
acquiring partition parameters corresponding to the work partitions;
and detecting the partition parameters according to a preset partition read-write detection rule to determine whether the read-write of the working partition in the terminal is abnormal.
6. The method according to claim 1, wherein after detecting whether the working partition in the terminal is read-write abnormal, the method further comprises:
and if the read-write of the work partition is detected to be normal, executing a starting process.
7. The method of claim 4, wherein the NV parameters comprise at least one of: SIM card information, wireless parameters, partition list information, operator information and user parameters; the system parameters include at least one of: calibration parameters, single board current parameters and IMEI.
8. A terminal data recovery apparatus, characterized in that the apparatus comprises:
the detection module is used for responding to the triggered starting operation and detecting whether a work partition in the terminal is abnormal in reading and writing or not, wherein the work partition comprises a storage space used for storing application data;
the mounting module is used for acquiring a standby partition and mounting the standby partition to the working partition if the read-write abnormity of the working partition is detected; the standby partition is a partition which is backed up in the terminal in advance and has the same size as the storage space of the working partition;
and the recovery module is used for executing a loading process and recovering the application data in the working partition to the standby partition when the mounting operation is finished and the read-write normality of the standby partition is detected.
9. A terminal device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is adapted to carry out the method of any one of claims 1-7.
CN202211037244.8A 2022-08-26 2022-08-26 Terminal data recovery method, device, equipment and storage medium Pending CN115373901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211037244.8A CN115373901A (en) 2022-08-26 2022-08-26 Terminal data recovery method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211037244.8A CN115373901A (en) 2022-08-26 2022-08-26 Terminal data recovery method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115373901A true CN115373901A (en) 2022-11-22

Family

ID=84070026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211037244.8A Pending CN115373901A (en) 2022-08-26 2022-08-26 Terminal data recovery method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115373901A (en)

Similar Documents

Publication Publication Date Title
CN103150231B (en) The method of computer booting and computer system
US20110283274A1 (en) Firmware image update and management
WO2017166447A1 (en) Method and device for loading kernel module
US20130227356A1 (en) Apparatus and method for handling rebooting of mobile terminal
US20200310779A1 (en) Validating a firmware compliance policy prior to use in a production system
CN106708517A (en) Software automatic upgrading test system and method
CN115794257B (en) System starting method, device, electronic equipment and storage medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
US9852028B2 (en) Managing a computing system crash
TW202131170A (en) Firmware corruption recovery
CN116775061A (en) Deployment method, device, equipment and storage medium of micro-service application
CN116700768B (en) Application processing method and related device
CN113396391B (en) Application program starting method and device, electronic equipment and storage medium
CN111158987A (en) Health check method and device of micro-service architecture
CN115373901A (en) Terminal data recovery method, device, equipment and storage medium
CN113778485A (en) System operation method and device of electronic chip, electronic chip and storage medium
US11354109B1 (en) Firmware updates using updated firmware files in a dedicated firmware volume
CN114510375A (en) Flash chip data area dynamic sharing system and method
CN109491831A (en) System partitioning self-rescue method, device, system and computer readable storage medium
CN114138367A (en) Service implementation method, device, equipment and storage medium on self-service equipment
CN114579388A (en) Vehicle-mounted system state monitoring method and system, storage medium and electronic equipment
CN112947948B (en) Deployment method and device of application service
US10691444B1 (en) Launching updated firmware files stored in a dedicated firmware volume
CN117453255A (en) Method, device, equipment and storage medium for upgrading embedded equipment
CN116088965A (en) Application management method, device, equipment and storage medium

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