WO2017080225A1 - 数据分区的修复方法、装置及终端 - Google Patents

数据分区的修复方法、装置及终端 Download PDF

Info

Publication number
WO2017080225A1
WO2017080225A1 PCT/CN2016/087634 CN2016087634W WO2017080225A1 WO 2017080225 A1 WO2017080225 A1 WO 2017080225A1 CN 2016087634 W CN2016087634 W CN 2016087634W WO 2017080225 A1 WO2017080225 A1 WO 2017080225A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
data partition
data
partition
formatting
Prior art date
Application number
PCT/CN2016/087634
Other languages
English (en)
French (fr)
Inventor
韩国栓
Original Assignee
乐视控股(北京)有限公司
乐视移动智能信息技术(北京)有限公司
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 乐视控股(北京)有限公司, 乐视移动智能信息技术(北京)有限公司 filed Critical 乐视控股(北京)有限公司
Publication of WO2017080225A1 publication Critical patent/WO2017080225A1/zh

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

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a terminal for repairing a data partition.
  • the operating system reads and writes and erases the data partition more frequently during the running process, which leads to the data in the data.
  • the data partition is easily damaged.
  • the method for repairing a damaged data partition is a recovery operation, that is, when there is a damaged data partition, the terminal automatically enters Recovery mode when booting, and performs a forced recovery operation on the damaged data partition.
  • the present application provides a method, a device, and a terminal for repairing a data partition, which can avoid data loss in a data partition of a terminal when repairing a data partition of the terminal, and improve reliability of data partition repair of the terminal. Sex.
  • the present application provides a method for repairing a data partition, and backing up data stored in a data partition of the terminal to other partitions of the terminal; the method further includes:
  • the application also provides a data partition repair device, including:
  • a backup module configured to back up data stored in a data partition of the terminal in another partition of the terminal
  • a formatting module configured to perform a formatting operation on the data partition of the terminal if an abnormality occurs in the data partition of the terminal is detected during startup of the terminal;
  • control module configured to copy the data stored by other partitions of the terminal to a data partition of the terminal that is formatted.
  • the application also provides a terminal on which the repair device for the data partition as described above is provided.
  • the embodiment of the present application provides a terminal, including a memory, and one or more processors, where the terminal further includes:
  • One or more units the one or more units being stored in the memory and configured to be executed by the one or more processors, wherein data stored in a data partition of the terminal is backed up at the terminal Other partitions, the one or more units including instructions for performing the following steps:
  • the data stored in other partitions of the terminal is copied to the data partition of the terminal that has been formatted.
  • the embodiment of the present application provides a computer program product for use in combination with a terminal, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, wherein the data stored in the data partition of the terminal is backed up at The other partitions of the terminal, the computer program mechanism includes instructions to perform the following steps:
  • the data stored in other partitions of the terminal is copied to the data partition of the terminal that has been formatted.
  • the method, device and terminal for repairing the data partition of the present application perform a format operation on the data partition of the terminal by detecting an abnormality of the data partition of the terminal during the startup process of the terminal.
  • the data stored in the other partitions of the terminal is copied to the data partition of the formatted terminal, and the functions of the terminal and the data are repaired in two aspects.
  • FIG. 1 is a flowchart of an embodiment of a method for repairing a data partition of the present application
  • FIG. 2 is a flow chart of another embodiment of repairing a data partition of the present application.
  • FIG. 3 is a schematic structural diagram of an embodiment of a data partition repairing apparatus according to the present application.
  • FIG. 4 is a schematic structural diagram of another embodiment of a data partition repairing apparatus of the present application.
  • FIG. 5 is a schematic structural diagram of a terminal according to the present application.
  • FIG. 1 is a flowchart of a method for repairing a data partition of the present application. As shown in FIG. 1 , the method for repairing a data partition in this embodiment may include the following steps:
  • a user when a user reads or writes or erases a data partition in a terminal, he or she encounters an unexpected situation such as a sudden power failure, and the data partition in the terminal may be damaged or the like.
  • a format operation may be performed on the data partition of the terminal to restore the data partition of the terminal to the factory state, so that the data partition of the terminal can complete the read/write function and the like again.
  • the other partitions of the terminal are configured to automatically copy the original data in the terminal to the data partition of the formatted terminal to perform data recovery on the data partition of the terminal.
  • the data in the data partition of the terminal can be selectively backed up according to actual conditions. Since the memory of other partitions in the terminal is limited, it is possible to select only data that the user thinks is important, and back it up, such as contacts in the address book.
  • the method for repairing the data partition of the embodiment if an abnormality occurs in the data partition of the terminal during the startup process of the terminal, a format operation is performed on the data partition of the terminal, and data stored in other partitions of the terminal is copied to the The data partition of the terminal of the format operation realizes the repair of the function and data of the data partition of the terminal.
  • the data partition of the terminal is repaired, the data in the data partition of the terminal is avoided, and the reliability of the data partition repair of the terminal is improved.
  • FIG. 2 is a flowchart of another embodiment of the repair of the data partition of the present application.
  • the method for repairing the data partition of the present embodiment further describes the technical solution of the present application in more detail on the basis of the embodiment shown in FIG. 1 .
  • the method for repairing a data partition in this embodiment may specifically include the following steps:
  • step 201 Detect whether the data partition of the terminal is abnormal. If an abnormality occurs in the data partition of the terminal, go to step 202. If no abnormality occurs in the data partition of the terminal, go to step 203.
  • the specified data of the data partition of the terminal is a specified value; if the specified data of the data partition of the terminal is detected as a specified value, it is determined that the data partition of the terminal is abnormal; if the data partition of the terminal is detected The specified data is not the specified value, and it is determined that the data partition of the terminal is not abnormal.
  • the data partition is actually a memory, and the data of the terminal can exist in the corresponding storage address.
  • the terminal can detect whether the value corresponding to the specified data is a specified value. For example, it can be detected whether the value of the data in the first 4K of the data partition is 0. If the data in the first 4K is 0, it indicates that the data partition of the terminal is damaged. If the data in the first 4K is not 0, it indicates the data partition of the terminal. Not damaged.
  • the specified data in the other address of the data partition can also be detected, and the specified value can be set according to the actual situation, which is not specifically limited in this embodiment.
  • the prompt information can be displayed on the display screen of the terminal and selected by the user.
  • the prompt signal can also be output by means of an indicator light, a prompt sound or a vibration, so that the user can obtain the information in time and make a selection.
  • the terminal does not need to be restored.
  • the terminal can be started according to the normal process.
  • the data partition of the terminal is first mounted, so that the terminal can perform corresponding operations on the data partition of the terminal.
  • the terminal can perform corresponding operations on the data partition of the terminal.
  • the user sees the prompt message sent by the terminal, it is known that the data partition of the terminal is abnormal, and a recovery operation is required. At this time, the user selects to perform a format operation, and the terminal enters the format mode and partitions the data of the terminal. Perform a format operation.
  • performing a formatting operation on the data partition of the terminal may include the following steps:
  • an indication of the corresponding formatting operation is generated. After the user selects to perform the formatting operation according to the prompt information, the instruction of the formatting operation is written into the storage partition.
  • the Cache partition is actually a cache space, and the cache data and instructions used by the program and the system can be stored in the Cache partition.
  • the Central Processing Unit (CPU) of the terminal preferentially invokes the call here when the command is executed and executed. Data so that formatting operations can be performed on the data partition of the terminal.
  • an identifier of the corresponding Recovery mode is generated, and the identifier of the Recovery mode is written to the misc partition, and the control terminal enters the Recovery mode.
  • the misc partition has a Bootloader Control Block (BCB), which is mainly used for storing the Recovery boot information, so that the terminal can enter the recovery mode. And after the terminal enters the recovery mode, obtain an indication of the formatting operation stored in the Cache partition, complete formatting of the data partition of the terminal, and restore the function of the data partition of the terminal.
  • BCB Bootloader Control Block
  • the other partitions of the designated terminal periodically back up the data in the data partition of the terminal to ensure that the data in the data partition of the terminal is the latest data.
  • the specified period can be one day, two days, or three days, etc., and the specific setting can be completed by the user himself.
  • the user can also selectively back up the data in the data partition of the terminal, such as the important data such as the address book, according to the actual situation of other partitions, and can also back up all the data of the data partition of the terminal.
  • the data backed up by the other partitions to the data partition can be automatically restored to the data partition of the terminal.
  • the other partition may be a persistent partition of the terminal.
  • the method for repairing the data partition of the embodiment if an abnormality occurs in the data partition of the terminal during the startup process of the terminal, a format operation is performed on the data partition of the terminal, and data stored in other partitions of the terminal is copied to the The data partition of the terminal of the format operation realizes the repair of the function and data of the data partition of the terminal.
  • the data partition of the terminal is repaired, the data in the data partition of the terminal is avoided, and the reliability of the data partition repair of the terminal is improved.
  • FIG. 3 is a schematic structural diagram of an embodiment of a data partition repair apparatus according to the present application.
  • the data partition repair apparatus of this embodiment includes a backup module 10, a formatting module 11, and a control module 12.
  • the backup module 10 is configured to back up data stored in the data partition of the terminal in other partitions of the terminal.
  • the formatting module 11 is configured to perform a formatting operation on the data partition of the terminal if the data partition of the terminal is abnormal during the startup process of the terminal, and after the formatting module 11 finishes formatting the data partition of the terminal, the control module 12 is used to copy data stored in other partitions of the terminal to the data partition of the formatted terminal.
  • the device for repairing the data partition of the embodiment is the same as the implementation mechanism of the embodiment shown in FIG. 1 by using the module to implement the data partitioning of the repairing terminal.
  • the device for repairing the data partition of the embodiment is the same as the implementation mechanism of the embodiment shown in FIG. 1 by using the module to implement the data partitioning of the repairing terminal.
  • the description of the embodiment shown in FIG. This will not be repeated here.
  • the repairing device for the data partition of this embodiment adopts the above module to start at the terminal In the process, if an abnormality occurs in the data partition of the terminal is detected, a format operation is performed on the data partition of the terminal, and data stored in other partitions of the terminal is copied to the data partition of the formatted terminal, and data of the terminal is implemented. Partitions perform both functional and data repairs. With the technical solution of the embodiment, when the data partition of the terminal is repaired, the data in the data partition of the terminal is avoided, and the reliability of the data partition repair of the terminal is improved.
  • the data partitioning repairing apparatus of the present embodiment further includes a detecting module 13 based on the embodiment shown in FIG.
  • the detecting module 13 is configured to detect whether an abnormality occurs in the data partition of the terminal. Specifically, during the startup process of the terminal, the detecting module 13 can detect whether the specified data of the data partition is a specified value; if it is detected that the specified data of the data partition of the terminal is a specified value, it is determined that the data partition of the terminal is abnormal; The specified data of the data partition of the terminal is not a specified value, and it is determined that the data partition of the terminal does not have an abnormality.
  • control module 12 is further configured to: if detecting an abnormality of the data partition of the terminal, output prompt information, where the prompt information is used to indicate that the The data partition of the terminal performs a format operation.
  • the formatting module 11 is specifically configured to perform a formatting operation on the data partition of the terminal if the user selects to perform a formatting operation according to the prompt information.
  • the formatting module 11 is specifically configured to: if an abnormality occurs in the data partition of the terminal is detected, write an indication to the storage partition to perform a formatting operation on the data partition; write the identifier of the Recovery mode to the misc partition to control the terminal to enter the Recovery The mode, and after entering the Recovery mode, performs a format operation on the data partition according to the instructions in the storage partition.
  • the device for repairing the data partition of the embodiment is the same as the implementation mechanism of the embodiment shown in FIG. 2 by using the above module to implement the data partitioning of the repairing terminal.
  • the device for repairing the data partition of the embodiment is the same as the implementation mechanism of the embodiment shown in FIG. 2 by using the above module to implement the data partitioning of the repairing terminal.
  • the data partition repairing apparatus of this embodiment adopts the above module, and if an abnormality occurs in the data partition of the terminal is detected during the startup process of the terminal, a format operation is performed on the data partition of the terminal, and other partitions of the terminal are stored.
  • the data is copied to the data partition of the formatted terminal, and the functions of the terminal and the data are repaired in two aspects.
  • the terminal is avoided.
  • the loss of data in the data partition improves the reliability of the data partition repair of the terminal.
  • the present application further provides a terminal, and the repair device of the data partition of the embodiment shown in FIG. 3 or FIG. 4 is disposed on the terminal, and the data partition of the embodiment described in FIG. 1 or FIG. 2 may be specifically used.
  • the repair method is used to implement the data partitioning of the terminal.
  • the terminal of this embodiment may specifically include an intelligent electronic product such as a mobile phone or a tablet computer.
  • a schematic structural diagram of a terminal is provided in the embodiment of the present application, including a memory 51, and one or more processors 52.
  • the terminal further includes:
  • One or more units the one or more units being stored in the memory and configured to be executed by the one or more processors, wherein data stored in a data partition of the terminal is backed up at the terminal Other partitions, the one or more units including instructions for performing the following steps:
  • the data stored in other partitions of the terminal is copied to the data partition of the terminal that has been formatted.
  • the method further includes: before detecting a data partition of the terminal, performing a formatting operation on the data partition of the terminal, the method further includes:
  • a formatting operation is performed on the data partition of the terminal.
  • the detecting the data partition of the terminal is abnormal, including:
  • the performing a format operation on the data partition of the terminal includes:
  • the embodiment of the present application further provides a computer program product for use in combination with a terminal, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, wherein the data partition stored in the data partition of the terminal is backed up
  • the computer program mechanism includes instructions to perform the following steps:
  • the data stored in other partitions of the terminal is copied to the data partition of the terminal that has been formatted.
  • the method further includes: before detecting a data partition of the terminal, performing a formatting operation on the data partition of the terminal, the method further includes:
  • a formatting operation is performed on the data partition of the terminal.
  • the detecting the data partition of the terminal is abnormal, including:
  • the performing a format operation on the data partition of the terminal includes:
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • the device embodiments described above are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located in one place. Or it can be distributed to at least two network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供一种数据分区的修复方法、装置及终端。本申请的数据分区的修复方法,通过将终端的数据分区存储的数据备份在所述终端的其他分区,从而,在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;进而,将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所述终端的数据分区。采用本申请的技术方案,能够在对终端的数据分区进行修复时,避免终端的数据分区中的数据的丢失,提高了终端的数据分区修复的可靠性。

Description

数据分区的修复方法、装置及终端
本专利申请要求申请日为2015年11月13日、申请号为2015107817978的中国专利申请的优先权,并将上述专利申请以引用的方式全文引入本文中。
技术领域
本申请涉及通信技术领域,尤其涉及一种数据分区的修复方法、装置及终端。
背景技术
随着带有操作系统的终端中的数据分区存放的用户数据越来越多,操作系统在运行的过程中对数据分区的读写以及擦除操作也越来越频繁,这就导致在对数据分区进行读写或者擦除操作时,如遇突然断电等突发情况,就容易出现数据分区被损坏等异常情况。
通常情况下,针对损坏的数据分区进行修复的方法是恢复(Recovery)操作,即当存在损坏的数据分区时,终端在开机时会自动进入Recovery模式,对损坏的数据分区进行强制Recovery操作。
但是,现有技术中,通过Recovery操作对损坏的数据分区进行修复时,会擦除数据分区内的数据,导致终端中的数据丢失,降低了数据分区修复的可靠性。
发明内容
有鉴于此,本申请提供一种数据分区的修复方法、装置及终端,能够在对终端的数据分区进行修复时,避免终端的数据分区中的数据的丢失,提高了终端的数据分区修复的可靠性。
本申请提供一种数据分区的修复方法,将终端的数据分区存储的数据备份在所述终端的其他分区;所述方法还包括:
在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;
将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所 述终端的数据分区。
本申请还提供一种数据分区的修复装置,包括:
备份模块,用于将终端的数据分区存储的数据备份在所述终端的其他分区;
格式化模块,用于在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;
控制模块,用于将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所述终端的数据分区。
本申请还提供一种终端,所述终端上设置有如上所述的数据分区的修复装置。
本申请实施例提供一种终端,包括存储器,以及一个或者多个处理器,其中,终端还包括:
一个或多个单元,所述一个或多个单元被存储在所述存储器中并被配置成由所述一个或多个处理器执行,其中,将终端的数据分区存储的数据备份在所述终端的其他分区,所述一个或多个单元包括用于执行以下步骤的指令:
在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;
将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所述终端的数据分区。
本申请实施例提供一种与终端结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,其中,将终端的数据分区存储的数据备份在所述终端的其他分区,所述计算机程序机制包括执行以下步骤的指令:
在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;
将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所述终端的数据分区。
本申请的数据分区的修复方法、装置及终端,通过在终端的启动过程中,若检测到终端的数据分区出现异常,对终端的数据分区执行格式化操 作,并将终端的其他分区存储的数据拷贝至经过格式化操作的终端的数据分区,实现了对终端的数据分区进行功能和数据的两方面修复。采用本申请的技术方案,能够在对终端的数据分区进行修复时,避免终端的数据分区中的数据的丢失,提高了终端的数据分区修复的可靠性。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请数据分区的修复方法一实施例的流程图;
图2为本申请数据分区的修复另一实施例的流程图;
图3为本申请数据分区的修复装置一实施例的结构示意图;
图4为本申请数据分区的修复装置另一实施例的结构示意图;
图5为本申请终端的结构示意图。
附图标记;
10—备份模块
11—格式化模块
12—控制模块
13—检测模块
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例一
图1为本申请数据分区的修复方法一实施例的流程图,如图1所示,本实施例的数据分区的修复方法,可以包括如下步骤:
100、在终端的启动过程中,若检测到终端的数据分区出现异常,对终端的数据分区执行格式化操作。
例如,用户在对终端中的数据分区进行读写或者擦除时,遇到突然断电等突发情况,终端中的数据分区可能会出现损坏等异常情况。
具体地,数据分区损坏时,数据分区的读写功能受到限制,从而影响终端的使用。因此每次启动终端时,若检测到终端的数据分区出现异常,可以通过Recovery操作对终端的数据分区进行功能恢复。
例如,可以对终端的数据分区执行格式化操作,使终端的数据分区恢复到出厂状态,从而使终端的数据分区能够再次完成读写功能等。
101、将终端的其他分区存储的数据拷贝至经过格式化操作的终端的数据分区。
终端的数据分区被格式化以后,虽然恢复了读写功能,但用户以前存储在终端的数据分区的数据会被擦除,因此为了防止此现象发生,可以将终端的数据分区存储的数据备份在所述终端的其他分区,以便在对终端进行恢复操作时,将终端中原有的数据能够自动拷贝到经过格式化操作的终端的数据分区中,以实现对终端的数据分区进行数据恢复。
例如,可以根据实际情况,选择性备份终端的数据分区中的数据。由于终端中其它分区的内存有限,因此可以只选择用户认为比较重要的数据,并对其进行备份,如通讯录中的联系人等数据。
需要说明的是,若是终端中其它分区内存足够的情况下,可以实现对终端的数据分区内所有数据进行备份,并在终端的数据分区经格式化操作以后,能够恢复全部的数据。
本实施例的数据分区的修复方法,通过在终端的启动过程中,若检测到终端的数据分区出现异常,对终端的数据分区执行格式化操作,并将终端的其他分区存储的数据拷贝至经过格式化操作的终端的数据分区,实现了对终端的数据分区进行功能和数据的两方面修复。采用本实施例的技术方案,能够在对终端的数据分区进行修复时,避免终端的数据分区中的数据的丢失,提高了终端的数据分区修复的可靠性。
实施例二
图2为本申请数据分区的修复另一实施例的流程图,本实施例的数据分区的修复方法在图1所示实施例的基础上进一步更加详细地对本申请的技术方案进行描述。
如图2所示,本实施例的数据分区的修复方法,具体可以包括如下步骤:
200、启动终端。
201、检测终端的数据分区是否出现异常;若检测到终端的数据分区出现异常,执行步骤202;若检测到终端的数据分区未出现异常,执行步骤203。
在终端的启动过程中,检测终端的数据分区的指定数据是否为指定数值;若检测到终端的数据分区的指定数据为指定数值,确定终端的数据分区出现异常;若检测到终端的数据分区的指定数据不为指定数值,确定终端的数据分区未出现异常。
具体地,数据分区实际上为一个存储器,可以将终端的数据存在对应的存储地址里,当终端启动时,可以检测指定数据对应的数值是否为指定数值。例如,可以检测数据分区前4K内的数据的数值是否为0,若前4K内的数据为0,则表示终端的数据分区损坏,若前4K内的数据不为0,则表示终端的数据分区未损坏。需要说明的是,还可以检测数据分区的其它地址内的指定数据,指定数值可以根据实际情况设定,本实施例对此不进行特别限定。
202、输出提示信息。
当检测到终端的数据分区损坏,而用户并不了解具体情况时,为了避免在没有任何提示信息的情况下,终端自动进行Recovery操作,并对终端的数据分区执行格式化操作,可以先输出一个提示信息,该提示信息用于指示需要对终端的数据分区执行格式化。
例如,可以将提示信息显示在终端的显示屏中,并由用户进行选择。
需要说明的是,在输出提示信息的同时,还可以通过指示灯、提示音或者震动等方式输出提示信号,使用户及时得到信息,并进行选择。
203、挂载终端的数据分区,以进入终端的正常启动模式。
若检测到终端的数据分区未出现异常,则无需对终端进行恢复操作,按照正常的流程启动终端即可。
具体的,先挂载终端的数据分区,以便终端能够对终端的数据分区进行相应的操作。详细的启动过程请参考现有技术相关方案,在此不再赘述。
204、若用户根据提示信息选择执行格式化操作,对终端的数据分区执行格式化操作。
例如,如用户看到终端发出的提示信息后,得知终端的数据分区出现异常,需要进行Recovery操作,此时,用户选择执行格式化操作,则终端进入格式化模式,并对终端的数据分区执行格式化操作。
举例说明,若用户根据提示信息选择执行格式化操作,对终端的数据分区执行格式化操作可以包括如下步骤:
a、若用户根据提示信息选择执行格式化操作,向存储(Cache)分区写入对数据分区执行格式化操作的指示。
例如,若检测到终端的数据分区出现异常时,会生成相应的格式化操作的指示,用户根据提示信息选择执行格式化操作后,会将该格式化操作的指示写入到存储分区里。
具体地,Cache分区实际是一个缓存空间,程序和系统用到的缓存数据和指令可以存放在Cache分区,终端的中央处理器(Central Processing Unit,CPU)在调用和执行命令时会优先调用这里的数据,从而能够对终端的数据分区执行格式化操作。
b、向misc分区写入Recovery模式的标识,以控制终端进入Recovery模式,以及在进入Recovery模式后根据存储分区中的指示对数据分区执行格式化操作。
例如,若检测到终端的数据分区出现异常时,同时会生成相应Recovery模式的标识,并将该Recovery模式的标识写入到misc分区,控制终端进入Recovery模式。
具体地,misc分区中有程序控制块(Bootloader Control Block,BCB),主要是用于存放Recovery引导信息,使终端能够进入恢复模式。并当终端进入恢复模式之后,获取Cache分区内存储的格式化操作的指示,完成对终端的数据分区的格式化,恢复终端的数据分区的功能。
205、将终端的其他分区存储的数据拷贝至经过格式化操作的终端的数据分区。
例如,终端在开机状态下,指定的终端的其它分区会定期的将终端的数据分区中的数据进行备份,以保证终端的数据分区内的数据为最新数据。指定周期可以为一天、两天或者三天等,具体的可以由用户自己完成设定。同时,用户也可以根据其他分区的实际情况,可以选择性备份终端的数据分区的中数据,如通讯录等重要数据,也可以将终端的数据分区的全部数据进行备份。当终端的数据分区被格式化以后,能够将其他分区对数据分区备份的数据自动进行恢复至终端的数据分区内。例如,所述其他分区可以是终端的persist分区。
本实施例的数据分区的修复方法,通过在终端的启动过程中,若检测到终端的数据分区出现异常,对终端的数据分区执行格式化操作,并将终端的其他分区存储的数据拷贝至经过格式化操作的终端的数据分区,实现了对终端的数据分区进行功能和数据的两方面修复。采用本实施例的技术方案,能够在对终端的数据分区进行修复时,避免终端的数据分区中的数据的丢失,提高了终端的数据分区修复的可靠性。
实施例三
图3为本申请数据分区的修复装置一实施例的结构示意图,如图3所示,本实施例的数据分区的修复装置包括备份模块10、格式化模块11和控制模块12。
在一个具体的实现过程中,各模块之间能够传递信息数据等。备份模块10用于将终端的数据分区存储的数据备份在终端的其他分区。格式化模块11用于在终端的启动过程中,若检测到终端的数据分区出现异常,对终端的数据分区执行格式化操作,在格式化模块11对终端的数据分区完成格式化之后,控制模块12用于将终端的其他分区存储的数据拷贝至经过格式化操作的终端的数据分区。
本实施例的数据分区的修复装置,通过采用上述模块实现修复终端的数据分区的实现机制与上述图1所示实施例的实现机制相同,详细可以参考上述图1所示实施例的记载,在此不再赘述。
本实施例的数据分区的修复装置,通过采用上述模块,在终端的启动 过程中,若检测到终端的数据分区出现异常,对终端的数据分区执行格式化操作,并将终端的其他分区存储的数据拷贝至经过格式化操作的终端的数据分区,实现了对终端的数据分区进行功能和数据的两方面修复。采用本实施例的技术方案,能够在对终端的数据分区进行修复时,避免终端的数据分区中的数据的丢失,提高了终端的数据分区修复的可靠性。
实施例四
图4为本申请数据分区的修复装置另一实施例的结构示意图,如图4所示,本实施例的数据分区的修复装置在图3所示实施例的基础上进一步还包括检测模块13。检测模块13用于检测终端的数据分区是否出现异常。具体地,在终端的启动过程中,检测模块13能够检测数据分区的指定数据是否为指定数值;若检测到终端的数据分区的指定数据为指定数值,确定终端的数据分区出现异常;若检测到终端的数据分区的指定数据不为指定数值,确定终端的数据分区未出现异常。
进一步地,在一个具体的实现过程中,上述实施例的数据分区的修复装置中,控制模块12还用于若检测到终端的数据分区出现异常,输出提示信息,该提示信息用于指示需要对终端的数据分区执行格式化操作。格式化模块11具体用于若用户根据提示信息选择执行格式化操作,对终端的数据分区执行格式化操作。具体地,格式化模块11具体用于若检测到终端的数据分区出现异常,向存储分区写入对数据分区执行格式化操作的指示;向misc分区写入Recovery模式的标识,以控制终端进入Recovery模式,以及在进入Recovery模式后根据存储分区中的指示对数据分区执行格式化操作。
本实施例的数据分区的修复装置,通过采用上述模块实现修复终端的数据分区的实现机制与上述图2所示实施例的实现机制相同,详细可以参考上述图2所示实施例的记载,在此不再赘述。
本实施例的数据分区的修复装置,通过采用上述模块,在终端的启动过程中,若检测到终端的数据分区出现异常,对终端的数据分区执行格式化操作,并将终端的其他分区存储的数据拷贝至经过格式化操作的终端的数据分区,实现了对终端的数据分区进行功能和数据的两方面修复。采用本实施例的技术方案,能够在对终端的数据分区进行修复时,避免终端的 数据分区中的数据的丢失,提高了终端的数据分区修复的可靠性。
本申请还提供一种终端,并在该终端上设置有如上图3或者图4所示实施例的数据分区的修复装置,并具体可以采用上述图1或图2所述实施例的数据分区的修复方法实现对终端的数据分区修复,详细可以参考上述相关实施例的相关记载,在此不再赘述。
本实施例的终端具体可以包括手机或者平板电脑等智能电子产品。
实施例五
如图5所示,为本申请实施例提供一种终端的结构图示意图,包括存储器51,以及一个或者多个处理器52,其中,终端还包括:
一个或多个单元,所述一个或多个单元被存储在所述存储器中并被配置成由所述一个或多个处理器执行,其中,将终端的数据分区存储的数据备份在所述终端的其他分区,所述一个或多个单元包括用于执行以下步骤的指令:
在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;
将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所述终端的数据分区。
其中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作之前,所述方法还包括:
检测所述终端的数据分区是否出现异常。
其中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作,包括:
若检测到所述终端的数据分区出现异常,输出提示信息,所述提示信息用于指示需要对所述终端的数据分区执行格式化操作;
若用户根据所述提示信息选择执行格式化操作,对所述终端的数据分区执行格式化操作。
其中,检测所述终端的数据分区是否出现异常,包括:
在所述终端的启动过程中,检测所述数据分区的指定数据是否为指定数值;
若检测到所述终端的数据分区的所述指定数据为所述指定数值,确定 所述终端的数据分区出现异常;
若检测到所述终端的数据分区的所述指定数据不为所述指定数值,确定所述终端的数据分区未出现异常。
其中,对所述终端的数据分区执行格式化操作,包括:
向存储分区写入对所述数据分区执行格式化操作的指示;
向misc分区写入恢复模式的标识,以控制所述终端进入恢复模式,以及在进入所述恢复模式后,根据所述存储分区中的所述指示对所述数据分区执行格式化操作。
实施例六
本申请实施例还提供一种与终端结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,其中,将终端的数据分区存储的数据备份在所述终端的其他分区,所述计算机程序机制包括执行以下步骤的指令:
在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;
将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所述终端的数据分区。
其中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作之前,所述方法还包括:
检测所述终端的数据分区是否出现异常。
其中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作,包括:
若检测到所述终端的数据分区出现异常,输出提示信息,所述提示信息用于指示需要对所述终端的数据分区执行格式化操作;
若用户根据所述提示信息选择执行格式化操作,对所述终端的数据分区执行格式化操作。
其中,检测所述终端的数据分区是否出现异常,包括:
在所述终端的启动过程中,检测所述数据分区的指定数据是否为指定数值;
若检测到所述终端的数据分区的所述指定数据为所述指定数值,确定所述终端的数据分区出现异常;
若检测到所述终端的数据分区的所述指定数据不为所述指定数值,确定所述终端的数据分区未出现异常。
其中,对所述终端的数据分区执行格式化操作,包括:
向存储分区写入对所述数据分区执行格式化操作的指示;
向misc分区写入恢复模式的标识,以控制所述终端进入恢复模式,以及在进入所述恢复模式后,根据所述存储分区中的所述指示对所述数据分区执行格式化操作。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到至少两个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (11)

  1. 一种数据分区的修复方法,其特征在于,将终端的数据分区存储的数据备份在所述终端的其他分区;所述方法还包括:
    在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;
    将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所述终端的数据分区。
  2. 根据权利要求1所述的方法,其特征在于,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作之前,所述方法还包括:
    检测所述终端的数据分区是否出现异常。
  3. 根据权利要求2所述的方法,其特征在于,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作,包括:
    若检测到所述终端的数据分区出现异常,输出提示信息,所述提示信息用于指示需要对所述终端的数据分区执行格式化操作;
    若用户根据所述提示信息选择执行格式化操作,对所述终端的数据分区执行格式化操作。
  4. 根据权利要求2所述的方法,其特征在于,检测所述终端的数据分区是否出现异常,包括:
    在所述终端的启动过程中,检测所述数据分区的指定数据是否为指定数值;
    若检测到所述终端的数据分区的所述指定数据为所述指定数值,确定所述终端的数据分区出现异常;
    若检测到所述终端的数据分区的所述指定数据不为所述指定数值,确定所述终端的数据分区未出现异常。
  5. 根据权利要求1-4任一所述的方法,其特征在于,对所述终端的数据分区执行格式化操作,包括:
    向存储分区写入对所述数据分区执行格式化操作的指示;
    向misc分区写入恢复模式的标识,以控制所述终端进入恢复模式,以及在进入所述恢复模式后,根据所述存储分区中的所述指示对所述数据 分区执行格式化操作。
  6. 一种数据分区的修复装置,其特征在于,包括:
    备份模块,用于将终端的数据分区存储的数据备份在所述终端的其他分区;
    格式化模块,用于在所述终端的启动过程中,若检测到所述终端的数据分区出现异常,对所述终端的数据分区执行格式化操作;
    控制模块,用于将所述终端的其他分区存储的所述数据拷贝至经过格式化操作的所述终端的数据分区。
  7. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    检测模块,用于检测所述终端的数据分区是否出现异常。
  8. 根据权利要求7所述的装置,其特征在于,
    所述控制模块,还用于若检测到所述终端的数据分区出现异常,输出提示信息,所述提示信息用于指示需要对所述终端的数据分区执行格式化操作;
    所述格式化模块,具体用于:若用户根据所述提示信息选择执行格式化操作,对所述终端的数据分区执行格式化操作。
  9. 根据权利要求7所述的装置,其特征在于,所述检测模块,具体用于:
    在所述终端的启动过程中,检测所述数据分区的指定数据是否为指定数值;若检测到所述终端的数据分区的所述指定数据为所述指定数值,确定所述终端的数据分区出现异常;若检测到所述终端的数据分区的所述指定数据不为所述指定数值,确定所述终端的数据分区未出现异常。
  10. 根据权利要求6-9任一所述的装置,其特征在于,所述格式化模块,具体用于:
    向存储分区写入对所述数据分区执行格式化操作的指示;
    向misc分区写入恢复模式的标识,以控制所述终端进入恢复模式,以及在进入所述恢复模式后根据所述存储分区中的所述指示对所述数据分区执行格式化操作。
  11. 一种终端,其特征在于,所述终端上设置有如上权利要求6-10任一所述数据分区的修复装置。
PCT/CN2016/087634 2015-11-13 2016-06-29 数据分区的修复方法、装置及终端 WO2017080225A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510781797.8A CN105868047A (zh) 2015-11-13 2015-11-13 数据分区的修复方法、装置及终端
CN201510781797.8 2015-11-13

Publications (1)

Publication Number Publication Date
WO2017080225A1 true WO2017080225A1 (zh) 2017-05-18

Family

ID=56624301

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/087634 WO2017080225A1 (zh) 2015-11-13 2016-06-29 数据分区的修复方法、装置及终端

Country Status (2)

Country Link
CN (1) CN105868047A (zh)
WO (1) WO2017080225A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565896A (zh) * 2019-09-10 2021-03-26 深圳Tcl数字技术有限公司 一种系统修复方法、终端及存储介质
CN112867994A (zh) * 2018-12-06 2021-05-28 深圳市欢太科技有限公司 数据恢复方法、装置以及电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868047A (zh) * 2015-11-13 2016-08-17 乐视移动智能信息技术(北京)有限公司 数据分区的修复方法、装置及终端
CN106547649A (zh) * 2016-10-31 2017-03-29 黄建文 一种文件恢复系统和方法
CN112269691A (zh) * 2020-11-18 2021-01-26 杭州迪普科技股份有限公司 一种设备配置恢复的方法、装置、设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187889A (zh) * 2006-11-21 2008-05-28 三星电子株式会社 具有文件恢复功能的电子设备及其方法
CN104461787A (zh) * 2014-12-22 2015-03-25 上海斐讯数据通信技术有限公司 一种手机分区表内容的转储系统
CN104484241A (zh) * 2014-12-10 2015-04-01 广东欧珀移动通信有限公司 一种对终端系统文件进行备份与恢复的方法及装置
CN104536841A (zh) * 2014-11-26 2015-04-22 四川长虹电器股份有限公司 一种Android系统Data分区自修复方法及系统
CN105868047A (zh) * 2015-11-13 2016-08-17 乐视移动智能信息技术(北京)有限公司 数据分区的修复方法、装置及终端

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050177777A1 (en) * 2004-01-23 2005-08-11 Seaburg Gunnar P. Cluster-based disk backup and restoration
CN101576966A (zh) * 2009-06-02 2009-11-11 中兴通讯股份有限公司 一种读写存储卡的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187889A (zh) * 2006-11-21 2008-05-28 三星电子株式会社 具有文件恢复功能的电子设备及其方法
CN104536841A (zh) * 2014-11-26 2015-04-22 四川长虹电器股份有限公司 一种Android系统Data分区自修复方法及系统
CN104484241A (zh) * 2014-12-10 2015-04-01 广东欧珀移动通信有限公司 一种对终端系统文件进行备份与恢复的方法及装置
CN104461787A (zh) * 2014-12-22 2015-03-25 上海斐讯数据通信技术有限公司 一种手机分区表内容的转储系统
CN105868047A (zh) * 2015-11-13 2016-08-17 乐视移动智能信息技术(北京)有限公司 数据分区的修复方法、装置及终端

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112867994A (zh) * 2018-12-06 2021-05-28 深圳市欢太科技有限公司 数据恢复方法、装置以及电子设备
CN112565896A (zh) * 2019-09-10 2021-03-26 深圳Tcl数字技术有限公司 一种系统修复方法、终端及存储介质
CN112565896B (zh) * 2019-09-10 2023-09-19 深圳Tcl数字技术有限公司 一种系统修复方法、终端及存储介质

Also Published As

Publication number Publication date
CN105868047A (zh) 2016-08-17

Similar Documents

Publication Publication Date Title
WO2017080225A1 (zh) 数据分区的修复方法、装置及终端
US8458524B2 (en) Firmware recovery system and method
JP5909264B2 (ja) セキュア・リカバリ装置及び方法
US9015458B2 (en) Computer system and method for updating basic input/output system by switching between local mode and bypass mode through baseboard management controller
JP5575338B2 (ja) 情報処理装置、情報処理方法、およびコンピュータプログラム
US20130007430A1 (en) Server and firmware updating method
JP2011090481A (ja) 情報処理装置及びシステム設定方法
CN102880527B (zh) 一种基板管理控制器的数据恢复方法
TW201520895A (zh) Bios自動恢復系統及方法
TW201305772A (zh) 連續處理網路資料的系統及方法
CN101315656A (zh) 信息处理设备
CN108364670B (zh) 读写压力测试方法、装置、设备及存储介质
JP5104479B2 (ja) 情報処理装置
JP6583942B1 (ja) Bmc、判定方法及びbmcファームウェア
CN108845772B (zh) 一种硬盘故障处理方法、系统、设备及计算机存储介质
KR102274668B1 (ko) 차량용 avn 시스템의 소프트웨어 업데이트 제어 장치 및 방법
TW202223655A (zh) 可自我監視及恢復作業系統運作的電腦系統及方法
CN108509252B (zh) 虚拟机启动装置、方法及主机
WO2016062060A1 (zh) 通过t卡更新/备份操作系统的方法及装置、存储介质
JP6911591B2 (ja) 情報処理装置、制御装置および情報処理装置の制御方法
JP2010198314A (ja) 情報管理装置
CN106599046B (zh) 分布式文件系统的写入方法及装置
CN110795155A (zh) 系统启动方法及装置、电子设备、存储介质
CN113094109B (zh) 电子设备及控制方法
JP2018156230A (ja) 情報処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16863404

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16863404

Country of ref document: EP

Kind code of ref document: A1