WO2018137540A1 - Method and device for backing up data - Google Patents

Method and device for backing up data Download PDF

Info

Publication number
WO2018137540A1
WO2018137540A1 PCT/CN2018/073150 CN2018073150W WO2018137540A1 WO 2018137540 A1 WO2018137540 A1 WO 2018137540A1 CN 2018073150 W CN2018073150 W CN 2018073150W WO 2018137540 A1 WO2018137540 A1 WO 2018137540A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
data
backup
time period
preset time
Prior art date
Application number
PCT/CN2018/073150
Other languages
French (fr)
Chinese (zh)
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 WO2018137540A1 publication Critical patent/WO2018137540A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • 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
    • 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
    • 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/1456Hardware arrangements for backup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • the present disclosure relates to, but is not limited to, the field of communications, and in particular, to a data backup method and apparatus.
  • the present disclosure provides a data backup method and device, which can acquire internal data of a mobile phone when the mobile phone cannot be turned on.
  • the embodiment of the present disclosure provides a data backup method, including: determining whether the first terminal cannot be started; and when the first terminal fails to start, after the first terminal establishes a connection with the second terminal, according to the operation of the second terminal.
  • the type of the system transmits the data backup information of the first terminal to the second terminal through the USB flash drive communication protocol.
  • determining whether the first terminal is unbootable includes: when the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, controlling The first terminal is restarted. If the first terminal still fails to start, the first terminal is again restarted, and the number of times the first terminal performs the restart operation is recorded until the number of times the first terminal performs the restart operation reaches a preset number of times. Then it is determined that the first terminal cannot be started.
  • the method further includes: after determining that the first terminal cannot be started, sending, by the first terminal, data backup prompt information, waiting for receiving the confirmation backup instruction within the second preset time period;
  • the type of the operating system of the terminal sends the backup data information of the first terminal to the second terminal by using the USB flash drive protocol, including: receiving a preset confirmation backup instruction and the first terminal and the When the second terminal establishes a connection, the data of the first terminal is backed up; when the preset confirmation backup instruction is not received within the second preset time period, or the first terminal does not establish a connection with the second terminal, The data of the first terminal is not backed up.
  • the confirming the backup instruction includes: triggering a button to be pressed when any button on the first terminal is detected to be pressed within the second preset time period
  • the instructions are identified as confirmation backup instructions.
  • the backup data information of the first terminal is sent to the second terminal by using a USB flash drive protocol according to the type of the operating system of the second terminal, including: when the operating system of the second terminal supports the fourth generation When the file system EXT4 is extended, the data of the first terminal user data area is sent to the second terminal through the USB flash drive communication protocol; when the operating system of the second terminal does not support EXT4, the disk partition table GPT of the first terminal storage area is used. Send to the second terminal through the USB flash drive communication protocol.
  • the embodiment of the present disclosure further provides a data backup device, including: a determining module, configured to: determine whether the first terminal cannot be started; and the sending module is configured to: when the first terminal fails to start, at the first terminal After the second terminal establishes the connection, the data backup information of the first terminal is sent to the second terminal by using the USB flash drive protocol according to the type of the operating system of the second terminal.
  • a data backup device including: a determining module, configured to: determine whether the first terminal cannot be started; and the sending module is configured to: when the first terminal fails to start, at the first terminal After the second terminal establishes the connection, the data backup information of the first terminal is sent to the second terminal by using the USB flash drive protocol according to the type of the operating system of the second terminal.
  • the determining module is configured to: when the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, controlling the first terminal Restarting, if the first terminal still fails to start, then controlling the first terminal to restart again, and recording the number of times the first terminal performs the restart operation until the number of times the first terminal performs the restart operation reaches a preset number of times, then determining A terminal cannot be started.
  • the apparatus further includes: a prompting module, configured to: after determining that the first terminal cannot be started, send a data backup prompt message by the first terminal, and wait for receiving confirmation within the second preset time period. a backup command; the sending module is configured to: when the preset confirmation backup command is received in the second preset time period, and the first terminal establishes a connection with the second terminal, backing up data of the first terminal; The data of the first terminal is not backed up when the preset confirmation backup instruction is not received in the second preset time period or the first terminal does not establish a connection with the second terminal.
  • a prompting module configured to: after determining that the first terminal cannot be started, send a data backup prompt message by the first terminal, and wait for receiving confirmation within the second preset time period. a backup command
  • the sending module is configured to: when the preset confirmation backup command is received in the second preset time period, and the first terminal establishes a connection with the second terminal, backing up data of the first terminal; The data of the first terminal is not backed
  • the apparatus further includes: an identification module configured to: when it is detected that any button on the first terminal is pressed within the second preset time period, The command triggered by the pressed button is recognized as a confirmation backup command.
  • the sending module includes: a first sending unit, configured to: when the operating system of the second terminal supports the fourth generation extended file system EXT4, the first terminal user data area The data is sent to the second terminal through the USB flash drive communication protocol.
  • the second sending unit is configured to: when the operating system of the second terminal does not support EXT4, send the disk partition table GPT of the first terminal storage area to the USB disk through the USB flash drive protocol. The second terminal.
  • Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that, when executed, implement the data backup method described above.
  • the method provided by the embodiment of the present disclosure sends the backup information of the terminal to the backup terminal through the USB flash drive communication protocol, so that the data of the terminal can be backed up more conveniently when the terminal cannot be powered on.
  • FIG. 1 is a flowchart of a data backup method provided in a first embodiment of the present disclosure
  • FIG. 2 is a flowchart of a data backup method provided in a third embodiment of the present disclosure.
  • FIG. 3 is a structural block diagram of a data backup apparatus provided in a fourth embodiment of the present disclosure.
  • FIG. 1 is a flowchart of the method, as shown in the figure. As shown in 1, the method includes the following processing:
  • Step 101 Determine whether the first terminal cannot be started.
  • determining whether the first terminal is unbootable may include: when the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, controlling the first terminal to restart If the first terminal still fails to start, control the first terminal to restart again, and record the number of times the first terminal performs the restart operation, until the number of times the first terminal performs the restart operation reaches a preset number of times, determining the first terminal. Unable to start.
  • Step 102 When the first terminal fails to start, after the first terminal establishes a connection with the second terminal, the data backup information of the first terminal is sent to the second terminal by using a USB flash drive protocol according to the type of the operating system of the second terminal.
  • the method provided in this embodiment may further include:
  • the sending the backup data information of the first terminal to the second terminal by using the USB flash drive protocol according to the type of the operating system of the second terminal may include:
  • the data of the first terminal is backed up; when the preset preset backup instruction is not received within the second preset time period Or when the first terminal does not establish a connection with the second terminal, the data of the first terminal is not backed up.
  • the confirming the backup instruction comprises: when detecting that any button on the first terminal is pressed within the second preset time period, identifying the command triggered by the pressed button as confirming the backup instruction.
  • the USB flash drive communication protocol involved in the embodiment may be a protocol used for communication between the USB flash drive and the terminal, and may be, for example, one of SCSI (Small Computer System Interface).
  • SCSI Small Computer System Interface
  • the method provided in this embodiment may further include: determining, according to the current state of the first terminal, whether to back up data on the first terminal, the process may be as follows:
  • the method provided in this embodiment may further include: before the first terminal establishes a connection with the second terminal, monitoring a restart operation of the first terminal in the second preset time period; when the first terminal is in the first When the number of times the restart operation is performed in the preset time period exceeds the preset number of times and the first terminal is still in the shutdown state, the first terminal sends a prompt message for data backup.
  • the confirmation backup instruction is received, wherein the prompt message of the data backup may be displayed through the display screen of the first terminal, or may be prompted by vibration or the like, and the prompt message may include prompting the user to the current terminal.
  • the data needs to be backed up, and the user is prompted to connect the first terminal with the second terminal.
  • the confirmation backup command may be a confirmation command input by the terminal after the user obtains the prompt message of the data backup; in the first terminal and the first terminal After the second terminal establishes the connection, the data backup information of the first terminal may be sent to the second terminal by using the USB flash drive protocol according to the confirmation backup command.
  • the data backup information of the first terminal is sent to the second terminal by using the USB flash drive protocol according to the type of the operating system of the second terminal, which may include the following two situations:
  • the data of the first terminal user data area is sent to the second terminal through the USB flash drive communication protocol;
  • the GPT GUIID Partition Table
  • the first terminal After the first terminal establishes a connection with the second terminal, the first terminal can determine the type of the operating system used by the second terminal according to the interaction instruction, that is, whether the second terminal can determine whether the second terminal is Support EXT4.
  • the solution provided in this embodiment can ensure that the user data can be obtained when the terminal cannot be powered on.
  • a terminal for backing up data includes two modules: an abnormality detecting module and a backup and recovery module, both of which belong to a startup code level, similar to a PC (Personal Computer) bios ( Basic Input Output System, basic input and output system).
  • the abnormality detecting module may be configured to: detect whether the terminal is indeed unable to start, and only if the computer cannot be turned on continuously for several times, it is considered that the mobile phone cannot be started, and the user data needs to be backed up.
  • the backup recovery module can be set to: copy user data to the PC through the USB flash drive mode.
  • Step 1 The mobile phone is turned on (for example, when the mobile phone power button is pressed, the triggered mobile phone is turned on), the abnormality detecting module starts the hardware watchdog timer, optionally, in this embodiment, the watchdog timing
  • the timeout of the device can be set to 5 minutes;
  • Step 2 If the system starts normally during the timeout period, the abnormality detecting module turns off the watchdog timer and clears the number of restarts of the previously recorded mobile phone;
  • Step 3 If the watchdog timer expires, the mobile phone does not start normally, the abnormality detection module restarts the mobile phone, and records the number of times the mobile phone is restarted;
  • Step 4 Repeat the above process. If multiple restarts (more than one threshold, for example, six times, that is, the first preset number of times) cannot be turned on, it is determined that the mobile phone needs to back up data, and the abnormality detecting module restarts the mobile phone to enter the backup and recovery. Module
  • Step 5 The backup and recovery module prompts the user to enter the backup recovery mode by using a mobile phone motor vibration or an LCD (Liquid Crystal Display) display.
  • the mobile phone may be displayed on the LCD.
  • LCD Liquid Crystal Display
  • Step 6 The user confirms the backup by pressing the volume up key + down key, or after no operation timeout, for example, the user does not perform operation within 3 minutes, then enters the backup recovery mode;
  • Step 7 After the mobile phone is connected to the PC through a USB (Universal Serial Bus), the backup and recovery module enumerates the mobile phone into a USB flash drive;
  • USB Universal Serial Bus
  • Step 8 The user copies the USB flash drive data to the PC through the tool on the PC, thereby implementing backup data.
  • FIG. 2 is a flowchart of the method.
  • the method is substantially the same as the method provided by the second embodiment. The difference is that the method provided in this embodiment is performed on the mobile phone through the USB. After connecting with the PC, according to the type of operating system of the PC, the mobile phone is enumerated into a USB flash drive on the PC.
  • the user data area is directly enumerated on the Linux system through the USB flash drive communication protocol.
  • a drive letter the drive letter can be directly opened by double-clicking, thereby copying the data in the mobile phone, thereby realizing the backup of the mobile phone data.
  • the head of the mobile phone storage area stores a GPT partition table, which is used to describe the information of all the partitions on the mobile phone, and the windows system can recognize the partition table. So you can first report the partition table to the PC through the USB flash drive protocol, and then enumerate the entire partition into a drive letter on the Windows Windows system. At this time, if the user cannot double-click the drive letter, you can use the file on Windows.
  • System tools such as winhex, to open this drive letter, the file system tool can parse the information of each partition in multiple partitions, so that the data of the user data area can be copied out, thereby realizing the backup of the mobile phone data.
  • FIG. 3 is a structural block diagram of the device. As shown in FIG. 3, the device 30 includes:
  • the determining module 31 is configured to: determine whether the first terminal cannot be started;
  • the sending module 32 is configured to: when the first terminal fails to start, after the first terminal establishes a connection with the second terminal, send the data of the first terminal to the second terminal by using a USB flash drive protocol according to the type of the operating system of the second terminal Back up information.
  • the determining module 31 may be configured to: when the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, control the first terminal to restart, if If the first terminal still fails to start, the first terminal is restarted again, and the number of times the first terminal performs the restart operation is recorded. Until the number of times the first terminal performs the restart operation reaches a preset number of times, it is determined that the first terminal cannot be started. .
  • the device 30 may further include: a prompting module, configured to: after determining that the first terminal cannot be started, send the data backup prompt information by the first terminal, and wait for receiving the confirmation backup instruction within the second preset time period;
  • a prompting module configured to: after determining that the first terminal cannot be started, send the data backup prompt information by the first terminal, and wait for receiving the confirmation backup instruction within the second preset time period;
  • the sending module may be configured to: when the preset confirmation backup instruction is received in the second preset time period, and the first terminal establishes a connection with the second terminal, backing up data of the first terminal; The data of the first terminal is not backed up when the preset confirmation backup instruction is not received within the preset time period or the first terminal does not establish a connection with the second terminal.
  • the device may further include:
  • the identification module is configured to: when detecting that any button on the first terminal is pressed within the second preset time period, the instruction triggered by the pressed button is recognized as a confirmation backup instruction.
  • the sending module 31 may include:
  • the first sending unit is configured to: when the operating system of the second terminal supports the fourth generation extended file system EXT4, send data of the first terminal user data area to the second terminal by using a USB flash drive protocol;
  • the second sending unit is configured to: when the operating system of the second terminal does not support EXT4, send the disk partition table GPT of the first terminal storage area to the second terminal by using a USB flash drive communication protocol.
  • Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that, when executed, implement the data backup method described above.
  • the terminal when the terminal needs to back up data, the terminal is connected to another terminal, and the terminal that needs to back up data is enumerated as a USB flash drive device on the other terminal, and data can be backed up by the other terminal.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media include, but are not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), and Electrically Erasable Programmable Read-only Memory (EEPROM). Flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
  • the method provided by the embodiment of the present disclosure sends the backup information of the terminal to the backup terminal through the USB flash drive communication protocol, so that the data of the terminal can be backed up more conveniently when the terminal cannot be powered on.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Retry When Errors Occur (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

A method for backing up data. The method comprises: determining whether a first terminal cannot start; and when the first terminal cannot start, after the first terminal establishes a connection with a second terminal, sending data backup information of the first terminal to the second terminal according to the type of an operating system of the second terminal via a U-disk communication protocol.

Description

一种数据备份方法及装置Data backup method and device 技术领域Technical field
本公开涉及但不限于通讯领域,尤其是一种数据备份方法及装置。The present disclosure relates to, but is not limited to, the field of communications, and in particular, to a data backup method and apparatus.
背景技术Background technique
随着信息技术的发展,智能手机的功能越来越强大,各种应用层出不穷。With the development of information technology, the functions of smart phones are becoming more and more powerful, and various applications are emerging one after another.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
手机在长时间使用后,系统的稳定性越来越差,甚至会出现手机无法开机的情况,导致存储在手机内部的各种资料(如照片、视频、游戏记录等)无法取出,给用户带来了极大的不便。After the mobile phone is used for a long time, the stability of the system is getting worse and worse, and even the mobile phone cannot be turned on. As a result, various materials (such as photos, videos, game records, etc.) stored in the mobile phone cannot be taken out, and the user can take it. It is a great inconvenience.
本公开提供一种数据备份方法及装置,能够在手机无法开机的情况下,获取手机内部数据。The present disclosure provides a data backup method and device, which can acquire internal data of a mobile phone when the mobile phone cannot be turned on.
本公开实施例提供了一种数据备份方法,包括:判断第一终端是否无法启动;当所述第一终端无法启动时,在第一终端与第二终端建立连接后,根据第二终端的操作系统的类型通过优盘通信协议向第二终端发送第一终端的数据备份信息。The embodiment of the present disclosure provides a data backup method, including: determining whether the first terminal cannot be started; and when the first terminal fails to start, after the first terminal establishes a connection with the second terminal, according to the operation of the second terminal The type of the system transmits the data backup information of the first terminal to the second terminal through the USB flash drive communication protocol.
在一种示例性实施方式中,判断第一终端是否无法启动,包括:当所述第一终端在接收到开机信号或重新启动信号后的第一预设时间段内仍处于关机状态时,控制第一终端重新启动,如果第一终端仍无法启动,则再次控制第一终端重新启动,并记录第一终端执行重新启动操作的次数,直到第一终端执行重新启动操作的次数达到预设次数,则确定第一终端无法启动。In an exemplary embodiment, determining whether the first terminal is unbootable includes: when the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, controlling The first terminal is restarted. If the first terminal still fails to start, the first terminal is again restarted, and the number of times the first terminal performs the restart operation is recorded until the number of times the first terminal performs the restart operation reaches a preset number of times. Then it is determined that the first terminal cannot be started.
在一种示例性实施方式中,上述方法还包括:在确定第一终端无法启动后,通过第一终端发出数据备份提示信息,在第二预设时间段内等待接收确认备份指令;根据第二终端的操作系统的类型通过优盘通信协议向第二终端 发送第一终端的备份数据信息,包括:当所述第二预设时间段内接收到预设确认备份指令且所述第一终端与所述第二终端建立连接时,备份第一终端的数据;当所述第二预设时间段内未接收到预设确认备份指令或所述第一终端与所述第二终端未建立连接时,不备份第一终端的数据。In an exemplary embodiment, the method further includes: after determining that the first terminal cannot be started, sending, by the first terminal, data backup prompt information, waiting for receiving the confirmation backup instruction within the second preset time period; The type of the operating system of the terminal sends the backup data information of the first terminal to the second terminal by using the USB flash drive protocol, including: receiving a preset confirmation backup instruction and the first terminal and the When the second terminal establishes a connection, the data of the first terminal is backed up; when the preset confirmation backup instruction is not received within the second preset time period, or the first terminal does not establish a connection with the second terminal, The data of the first terminal is not backed up.
在一种示例性实施方式中,上述确认备份指令,包括:当在所述第二预设时间段内检测到所述第一终端上的任意按键被按下时,将被按下的按键触发的指令识别为确认备份指令。In an exemplary embodiment, the confirming the backup instruction includes: triggering a button to be pressed when any button on the first terminal is detected to be pressed within the second preset time period The instructions are identified as confirmation backup instructions.
在一种示例性实施方式中,根据第二终端的操作系统的类型通过优盘通信协议向第二终端发送第一终端的备份数据信息,包括:当所述第二终端的操作系统支持第四代扩展文件系统EXT4时,将第一终端用户数据区的数据通过优盘通信协议发送至第二终端;当所述第二终端的操作系统不支持EXT4时,将第一终端存储区的磁盘分区表GPT通过优盘通信协议发送至第二终端。In an exemplary embodiment, the backup data information of the first terminal is sent to the second terminal by using a USB flash drive protocol according to the type of the operating system of the second terminal, including: when the operating system of the second terminal supports the fourth generation When the file system EXT4 is extended, the data of the first terminal user data area is sent to the second terminal through the USB flash drive communication protocol; when the operating system of the second terminal does not support EXT4, the disk partition table GPT of the first terminal storage area is used. Send to the second terminal through the USB flash drive communication protocol.
本公开实施例还提供了一种数据备份装置,包括:判断模块,设置为:判断第一终端是否无法启动;发送模块,设置为:当所述第一终端无法启动时,在第一终端与第二终端建立连接后,根据第二终端的操作系统的类型通过优盘通信协议向第二终端发送第一终端的数据备份信息。The embodiment of the present disclosure further provides a data backup device, including: a determining module, configured to: determine whether the first terminal cannot be started; and the sending module is configured to: when the first terminal fails to start, at the first terminal After the second terminal establishes the connection, the data backup information of the first terminal is sent to the second terminal by using the USB flash drive protocol according to the type of the operating system of the second terminal.
在一种示例性实施方式中,上述判断模块是设置为:当所述第一终端在接收到开机信号或重新启动信号后的第一预设时间段内仍处于关机状态时,控制第一终端重新启动,如果第一终端仍无法启动,则再次控制第一终端重新启动,并记录第一终端执行重新启动操作的次数,直到第一终端执行重新启动操作的次数达到预设次数,则确定第一终端无法启动。In an exemplary embodiment, the determining module is configured to: when the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, controlling the first terminal Restarting, if the first terminal still fails to start, then controlling the first terminal to restart again, and recording the number of times the first terminal performs the restart operation until the number of times the first terminal performs the restart operation reaches a preset number of times, then determining A terminal cannot be started.
在一种示例性实施方式中,上述装置还包括:提示模块,设置为:在确定第一终端无法启动后,通过第一终端发出数据备份提示信息,在第二预设时间段内等待接收确认备份指令;发送模块是设置为:当所述第二预设时间段内接收到预设确认备份指令且所述第一终端与所述第二终端建立连接时,备份第一终端的数据;当所述第二预设时间段内未接收到预设确认备份指令或所述第一终端与所述第二终端未建立连接时,不备份第一终端的数据。In an exemplary embodiment, the apparatus further includes: a prompting module, configured to: after determining that the first terminal cannot be started, send a data backup prompt message by the first terminal, and wait for receiving confirmation within the second preset time period. a backup command; the sending module is configured to: when the preset confirmation backup command is received in the second preset time period, and the first terminal establishes a connection with the second terminal, backing up data of the first terminal; The data of the first terminal is not backed up when the preset confirmation backup instruction is not received in the second preset time period or the first terminal does not establish a connection with the second terminal.
在一种示例性实施方式中,所述装置还包括:识别模块,设置为:当在 所述第二预设时间段内检测到所述第一终端上的任意按键被按下时,将被按下的按键触发的指令识别为确认备份指令。In an exemplary embodiment, the apparatus further includes: an identification module configured to: when it is detected that any button on the first terminal is pressed within the second preset time period, The command triggered by the pressed button is recognized as a confirmation backup command.
在一种示例性实施方式中,上述发送模块,包括:第一发送单元,设置为:当所述第二终端的操作系统支持第四代扩展文件系统EXT4时,将第一终端用户数据区的数据通过优盘通信协议发送至第二终端;第二发送单元,设置为:当所述第二终端的操作系统不支持EXT4时,将第一终端存储区的磁盘分区表GPT通过优盘通信协议发送至第二终端。In an exemplary embodiment, the sending module includes: a first sending unit, configured to: when the operating system of the second terminal supports the fourth generation extended file system EXT4, the first terminal user data area The data is sent to the second terminal through the USB flash drive communication protocol. The second sending unit is configured to: when the operating system of the second terminal does not support EXT4, send the disk partition table GPT of the first terminal storage area to the USB disk through the USB flash drive protocol. The second terminal.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述数据备份方法。Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that, when executed, implement the data backup method described above.
本公开有益效果如下:The beneficial effects of the disclosure are as follows:
本公开实施例提供的方法,将终端的备份信息通过优盘通信协议发送至备份终端,使得在终端无法开机的情况下,能够较为便捷地对终端的数据进行备份。The method provided by the embodiment of the present disclosure sends the backup information of the terminal to the backup terminal through the USB flash drive communication protocol, so that the data of the terminal can be backed up more conveniently when the terminal cannot be powered on.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1是本公开第一实施例中提供的数据备份方法的流程图;1 is a flowchart of a data backup method provided in a first embodiment of the present disclosure;
图2是本公开第三实施例中提供的数据备份方法的流程图;2 is a flowchart of a data backup method provided in a third embodiment of the present disclosure;
图3是本公开第四实施例中提供的数据备份装置的结构框图。FIG. 3 is a structural block diagram of a data backup apparatus provided in a fourth embodiment of the present disclosure.
本公开的较佳实施方式Preferred embodiment of the present disclosure
下面结合附图对本公开的实施方式进行描述。Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
第一实施例First embodiment
本实施例提供了一种数据备份方法,该方法可以由本实施例所涉及的第一终端执行,或由设置于该第一终端上的装置来执行,图1是该方法的流程图,如图1所示,该方法包括如下处理:The embodiment provides a data backup method, which may be performed by the first terminal involved in the embodiment, or by a device disposed on the first terminal. FIG. 1 is a flowchart of the method, as shown in the figure. As shown in 1, the method includes the following processing:
步骤101:判断第一终端是否无法启动;Step 101: Determine whether the first terminal cannot be started.
在本实施例中,判断第一终端是否无法启动可以包括:当第一终端在接 收到开机信号或重新启动信号后的第一预设时间段内仍处于关机状态时,控制第一终端重新启动,如果第一终端仍无法启动,则再次控制第一终端重新启动,并记录第一终端执行重新启动操作的次数,直到第一终端执行重新启动操作的次数达到预设次数,则确定第一终端无法启动。In this embodiment, determining whether the first terminal is unbootable may include: when the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, controlling the first terminal to restart If the first terminal still fails to start, control the first terminal to restart again, and record the number of times the first terminal performs the restart operation, until the number of times the first terminal performs the restart operation reaches a preset number of times, determining the first terminal. Unable to start.
步骤102:当第一终端无法启动时,在第一终端与第二终端建立连接后,根据第二终端的操作系统的类型通过优盘通信协议向第二终端发送第一终端的数据备份信息。Step 102: When the first terminal fails to start, after the first terminal establishes a connection with the second terminal, the data backup information of the first terminal is sent to the second terminal by using a USB flash drive protocol according to the type of the operating system of the second terminal.
可选地,本实施例提供的方法还可以包括:Optionally, the method provided in this embodiment may further include:
在确定第一终端无法启动后,通过第一终端发出数据备份提示信息,在第二预设时间段内等待接收确认备份指令;After determining that the first terminal cannot be started, sending, by the first terminal, data backup prompt information, waiting for receiving the confirmation backup instruction within the second preset time period;
相应地,根据第二终端的操作系统的类型通过优盘通信协议向第二终端发送第一终端的备份数据信息可以包括:Correspondingly, the sending the backup data information of the first terminal to the second terminal by using the USB flash drive protocol according to the type of the operating system of the second terminal may include:
当第二预设时间段内接收到预设确认备份指令且第一终端与第二终端建立连接时,备份第一终端的数据;当第二预设时间段内未接收到预设确认备份指令或第一终端与第二终端未建立连接时,不备份第一终端的数据。When the preset confirmation backup instruction is received in the second preset time period and the first terminal establishes a connection with the second terminal, the data of the first terminal is backed up; when the preset preset backup instruction is not received within the second preset time period Or when the first terminal does not establish a connection with the second terminal, the data of the first terminal is not backed up.
可选地,确认备份指令,包括:当在第二预设时间段内检测到第一终端上的任意按键被按下时,将被按下的按键触发的指令识别为确认备份指令。Optionally, the confirming the backup instruction comprises: when detecting that any button on the first terminal is pressed within the second preset time period, identifying the command triggered by the pressed button as confirming the backup instruction.
其中,本实施例中所涉及到的优盘通信协议可以为优盘与终端相连后进行通信所使用的协议,例如可以是SCSI(Small Computer System Interface,小型计算机系统接口)中的一种。The USB flash drive communication protocol involved in the embodiment may be a protocol used for communication between the USB flash drive and the terminal, and may be, for example, one of SCSI (Small Computer System Interface).
在上述步骤101以及步骤102的基础上,本实施例提供的方法还可以包括根据第一终端当前所处的状态来确定是否备份第一终端上的数据的过程,该过程可以如下:On the basis of the foregoing steps 101 and 102, the method provided in this embodiment may further include: determining, according to the current state of the first terminal, whether to back up data on the first terminal, the process may be as follows:
当第一终端在接收到开机信号或重新启动信号后的第一预设时间段内仍处于关机状态时,控制第一终端重新启动,监测第一终端的重新启动操作并记录第一终端执行重新启动操作的次数。在此基础上,本实施例提供的方法还可以包括:在第一终端与第二终端建立连接之前,监测第一终端在第二预设时间段内的重新启动操作;当第一终端在第二预设时间段内执行重新启动操作的次数超过预设次数且第一终端仍然处于关机状态时,通过第一终端发 出数据备份的提示消息。在发出数据备份的提示消息后,接收确认备份指令,其中,数据备份的提示消息可以通过第一终端的显示屏来显示,或通过振动等方式来提示,该提示消息可以包括,提示用户当前终端的数据需要备份,以及提示用户将第一终端与第二终端进行连接,相应地,确认备份指令可以是用户在获知数据备份的提示消息后,通过终端输入的确认指令;在第一终端与第二终端建立连接后,可以根据确认备份指令通过优盘通信协议向第二终端发送第一终端的数据备份信息。When the first terminal is still in the shutdown state within the first preset time period after receiving the power-on signal or the restart signal, controlling the first terminal to restart, monitoring the restart operation of the first terminal, and recording the first terminal to perform the restart The number of times the operation was initiated. On this basis, the method provided in this embodiment may further include: before the first terminal establishes a connection with the second terminal, monitoring a restart operation of the first terminal in the second preset time period; when the first terminal is in the first When the number of times the restart operation is performed in the preset time period exceeds the preset number of times and the first terminal is still in the shutdown state, the first terminal sends a prompt message for data backup. After the prompt message of the data backup is sent, the confirmation backup instruction is received, wherein the prompt message of the data backup may be displayed through the display screen of the first terminal, or may be prompted by vibration or the like, and the prompt message may include prompting the user to the current terminal. The data needs to be backed up, and the user is prompted to connect the first terminal with the second terminal. Accordingly, the confirmation backup command may be a confirmation command input by the terminal after the user obtains the prompt message of the data backup; in the first terminal and the first terminal After the second terminal establishes the connection, the data backup information of the first terminal may be sent to the second terminal by using the USB flash drive protocol according to the confirmation backup command.
可选地,根据第二终端的操作系统的类型通过优盘通信协议向第二终端发送第一终端的数据备份信息,可以包括以下两种情况:Optionally, the data backup information of the first terminal is sent to the second terminal by using the USB flash drive protocol according to the type of the operating system of the second terminal, which may include the following two situations:
当第二终端的操作系统支持第四代扩展文件系统EXT4时,将第一终端用户数据区的数据通过优盘通信协议发送至第二终端;When the operating system of the second terminal supports the fourth generation extended file system EXT4, the data of the first terminal user data area is sent to the second terminal through the USB flash drive communication protocol;
当第二终端的操作系统不支持EXT4时,将第一终端存储区的GPT(GUID Partition Table,磁碟分割表)通过优盘通信协议发送至第二终端。When the operating system of the second terminal does not support EXT4, the GPT (GUID Partition Table) of the first terminal storage area is sent to the second terminal through the USB flash drive communication protocol.
在第一终端与第二终端建立连接后,二者进行通信交互的过程中,第一终端即可以根据交互的指令来判断第二终端所使用的操作系统的种类,即可以判断第二终端是否支持EXT4。After the first terminal establishes a connection with the second terminal, the first terminal can determine the type of the operating system used by the second terminal according to the interaction instruction, that is, whether the second terminal can determine whether the second terminal is Support EXT4.
本实施例提供的方案,可以较大程度保证在终端无法开机时,用户资料可以被获取出来。The solution provided in this embodiment can ensure that the user data can be obtained when the terminal cannot be powered on.
第二实施例Second embodiment
本实施例首先对待备份数据的终端进行简要说明,该终端包含两个模块:异常检测模块和备份恢复模块,该两个模块都属于启动代码级,类似PC(个人计算机,Personal Computer)的bios(Basic Input Output System,基本输入输出系统)。其中,异常检测模块可以设置为:检测终端是否确实无法启动,只有连续多次无法开机,才认为手机无法启动,需要备份用户数据。备份恢复模块可以设置为:将用户数据通过优盘模式拷贝到PC上。In this embodiment, a terminal for backing up data is first described. The terminal includes two modules: an abnormality detecting module and a backup and recovery module, both of which belong to a startup code level, similar to a PC (Personal Computer) bios ( Basic Input Output System, basic input and output system). The abnormality detecting module may be configured to: detect whether the terminal is indeed unable to start, and only if the computer cannot be turned on continuously for several times, it is considered that the mobile phone cannot be started, and the user data needs to be backed up. The backup recovery module can be set to: copy user data to the PC through the USB flash drive mode.
以下以本实施例所涉及的终端是手机为例,对本实施例提供的方法进行说明:The following describes the method provided in this embodiment by using the mobile terminal as an example in the embodiment:
步骤一、手机开机(例如可以是在手机电源键被按下时,触发的手机开 启操作),异常检测模块启动硬件看门狗定时器,可选地,在本实施例中,看门狗定时器的超时时间可以设置为5分钟;Step 1: The mobile phone is turned on (for example, when the mobile phone power button is pressed, the triggered mobile phone is turned on), the abnormality detecting module starts the hardware watchdog timer, optionally, in this embodiment, the watchdog timing The timeout of the device can be set to 5 minutes;
步骤二、如果在超时时间内系统正常启动,异常检测模块关闭看门狗定时器并清除之前记录的手机的重启次数;Step 2: If the system starts normally during the timeout period, the abnormality detecting module turns off the watchdog timer and clears the number of restarts of the previously recorded mobile phone;
步骤三、如果看门狗定时器超时,说明手机没有正常启动,异常检测模块重启手机,并记录手机重启次数;Step 3: If the watchdog timer expires, the mobile phone does not start normally, the abnormality detection module restarts the mobile phone, and records the number of times the mobile phone is restarted;
步骤四、重复以上流程,如果连续多次重启(超过一个门限值,例如6次,即上述第一预设次数)都无法开机,则确定手机需要备份数据,异常检测模块重启手机进入备份恢复模块;Step 4: Repeat the above process. If multiple restarts (more than one threshold, for example, six times, that is, the first preset number of times) cannot be turned on, it is determined that the mobile phone needs to back up data, and the abnormality detecting module restarts the mobile phone to enter the backup and recovery. Module
步骤五、备份恢复模块通过手机马达震动或者LCD(Liquid Crystal Display,液晶显示器)显示等方式,提示用户进入备份恢复模式,例如,可以在LCD上显示“手机异常,请进入备份恢复模式,按上键+下键确认”,提示用户进入备份恢复模式,并等待用户确认;Step 5: The backup and recovery module prompts the user to enter the backup recovery mode by using a mobile phone motor vibration or an LCD (Liquid Crystal Display) display. For example, the mobile phone may be displayed on the LCD. Please enter the backup recovery mode and press Press the key + down key to confirm, prompt the user to enter the backup recovery mode, and wait for the user to confirm;
步骤六、用户通过按音量上键+下键确认备份,或者无操作超时后,例如用户3分钟内未进行操作,则进入备份恢复模式;Step 6: The user confirms the backup by pressing the volume up key + down key, or after no operation timeout, for example, the user does not perform operation within 3 minutes, then enters the backup recovery mode;
步骤七、手机通过USB(Universal Serial Bus,通用串行总线)连接PC后,备份恢复模块将手机枚举成一个优盘;Step 7. After the mobile phone is connected to the PC through a USB (Universal Serial Bus), the backup and recovery module enumerates the mobile phone into a USB flash drive;
步骤八、用户通过PC上的工具,将优盘数据拷贝到PC上,从而实现备份数据。Step 8: The user copies the USB flash drive data to the PC through the tool on the PC, thereby implementing backup data.
第三实施例Third embodiment
本实施例提供了一种数据备份方法,图2是该方法的流程图,该方法与上述第二实施例所提供的方法大致相同,不同的是,本实施例所提供的方法在手机通过USB与PC连接连接后,根据PC的操作系统的类型,将手机在PC上枚举成一个优盘。This embodiment provides a data backup method, and FIG. 2 is a flowchart of the method. The method is substantially the same as the method provided by the second embodiment. The difference is that the method provided in this embodiment is performed on the mobile phone through the USB. After connecting with the PC, according to the type of operating system of the PC, the mobile phone is enumerated into a USB flash drive on the PC.
可选地,在PC是linux操作系统的情况下,由于linux操作系统支持ext4文件系统,而手机用户数据区就是ext4文件系统,所以直接将用户数据区通过优盘通信协议在linux系统上枚举成一个盘符,该盘符可以直接被双击打开,从而拷贝手机中的数据,进而实现对手机数据的备份。Optionally, in the case that the PC is a Linux operating system, since the Linux operating system supports the ext4 file system, and the mobile user data area is the ext4 file system, the user data area is directly enumerated on the Linux system through the USB flash drive communication protocol. A drive letter, the drive letter can be directly opened by double-clicking, thereby copying the data in the mobile phone, thereby realizing the backup of the mobile phone data.
在PC是windows操作系统的情况下,因为windows操作系统默认不支持ext4文件系统,所以无法采用上述方法。而手机存储区的头部存放有一张GPT分区表,用来描述手机上所有分区的信息,windows系统可以识别该分区表。所以可以首先将分区表通过优盘协议上报给PC,然后将整个分区在PC的windows系统上枚举成一个盘符,此时,如果用户双击该盘符无法直接打开,则可以使用windows上的文件系统工具,比如winhex,来打开此盘符,文件系统工具可以解析出多个分区中每个分区的信息,从而可以将用户数据区的数据拷贝出来,进而实现对手机数据的备份。In the case where the PC is a Windows operating system, since the Windows operating system does not support the ext4 file system by default, the above method cannot be used. The head of the mobile phone storage area stores a GPT partition table, which is used to describe the information of all the partitions on the mobile phone, and the windows system can recognize the partition table. So you can first report the partition table to the PC through the USB flash drive protocol, and then enumerate the entire partition into a drive letter on the Windows Windows system. At this time, if the user cannot double-click the drive letter, you can use the file on Windows. System tools, such as winhex, to open this drive letter, the file system tool can parse the information of each partition in multiple partitions, so that the data of the user data area can be copied out, thereby realizing the backup of the mobile phone data.
第四实施例Fourth embodiment
本实施例提供了一种数据备份装置,该装置可以设置于本实施例中所涉及到的第一终端,图3是该装置的结构框图,如图3所示,该装置30包括:The present embodiment provides a data backup device, which can be disposed in the first terminal involved in the embodiment, and FIG. 3 is a structural block diagram of the device. As shown in FIG. 3, the device 30 includes:
判断模块31,设置为:判断第一终端是否无法启动;The determining module 31 is configured to: determine whether the first terminal cannot be started;
发送模块32,设置为:当第一终端无法启动时,在第一终端与第二终端建立连接后,根据第二终端的操作系统的类型通过优盘通信协议向第二终端发送第一终端的数据备份信息。The sending module 32 is configured to: when the first terminal fails to start, after the first terminal establishes a connection with the second terminal, send the data of the first terminal to the second terminal by using a USB flash drive protocol according to the type of the operating system of the second terminal Back up information.
可选地,上述判断模块31可以是设置为::当第一终端在接收到开机信号或重新启动信号后的第一预设时间段内仍处于关机状态时,控制第一终端重新启动,如果第一终端仍无法启动,则再次控制第一终端重新启动,并记录第一终端执行重新启动操作的次数,直到第一终端执行重新启动操作的次数达到预设次数,则确定第一终端无法启动。Optionally, the determining module 31 may be configured to: when the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, control the first terminal to restart, if If the first terminal still fails to start, the first terminal is restarted again, and the number of times the first terminal performs the restart operation is recorded. Until the number of times the first terminal performs the restart operation reaches a preset number of times, it is determined that the first terminal cannot be started. .
可选地,上述装置30还可以包括:提示模块,设置为:在确定第一终端无法启动后,通过第一终端发出数据备份提示信息,在第二预设时间段内等待接收确认备份指令;Optionally, the device 30 may further include: a prompting module, configured to: after determining that the first terminal cannot be started, send the data backup prompt information by the first terminal, and wait for receiving the confirmation backup instruction within the second preset time period;
基于此,上述发送模块可以是设置为::当第二预设时间段内接收到预设确认备份指令且第一终端与第二终端建立连接时,备份第一终端的数据;当所述第二预设时间段内未接收到预设确认备份指令或所述第一终端与所述第二终端未建立连接时,不备份第一终端的数据。Based on this, the sending module may be configured to: when the preset confirmation backup instruction is received in the second preset time period, and the first terminal establishes a connection with the second terminal, backing up data of the first terminal; The data of the first terminal is not backed up when the preset confirmation backup instruction is not received within the preset time period or the first terminal does not establish a connection with the second terminal.
可选地,所述装置还可以包括:Optionally, the device may further include:
识别模块,设置为:当在第二预设时间段内检测到第一终端上的任意按键被按下时,将被按下的按键触发的指令识别为确认备份指令。The identification module is configured to: when detecting that any button on the first terminal is pressed within the second preset time period, the instruction triggered by the pressed button is recognized as a confirmation backup instruction.
可选地,上述发送模块31可以包括:Optionally, the sending module 31 may include:
第一发送单元,设置为:当第二终端的操作系统支持第四代扩展文件系统EXT4时,将第一终端用户数据区的数据通过优盘通信协议发送至第二终端;The first sending unit is configured to: when the operating system of the second terminal supports the fourth generation extended file system EXT4, send data of the first terminal user data area to the second terminal by using a USB flash drive protocol;
第二发送单元,设置为:当第二终端的操作系统不支持EXT4时,将第一终端存储区的磁盘分区表GPT通过优盘通信协议发送至第二终端。The second sending unit is configured to: when the operating system of the second terminal does not support EXT4, send the disk partition table GPT of the first terminal storage area to the second terminal by using a USB flash drive communication protocol.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述数据备份方法。Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that, when executed, implement the data backup method described above.
通过本公开提供的方案,终端需要备份数据时将终端与另一终端进行连接,需备份数据的终端在另一终端上被枚举为一个优盘设备,可以通过该另一终端进行数据的备份。Through the solution provided by the present disclosure, when the terminal needs to back up data, the terminal is connected to another terminal, and the terminal that needs to back up data is enumerated as a USB flash drive device on the other terminal, and data can be backed up by the other terminal.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(RAM,Random Access Memory)、只读存储器(ROM,Read-Only Memory)、电可擦除只读存储器(EEPROM,Electrically Erasable Programmable Read-only Memory)、闪存或其他存储器技术、光盘只读存储器(CD-ROM,Compact Disc Read-Only Memory)、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存 储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and functional blocks/units of the methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components work together. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media. Computer storage media include, but are not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), and Electrically Erasable Programmable Read-only Memory (EEPROM). Flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or Any other medium used to store the desired information and that can be accessed by the computer. Moreover, it is well known to those skilled in the art that communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
本领域的普通技术人员可以理解,可以对本公开的技术方案进行修改或者等同替换,而不脱离本公开技术方案的精神和范围,均应涵盖在本公开的权利要求范围当中。A person skilled in the art can understand that the technical solutions of the present disclosure may be modified or equivalent, without departing from the spirit and scope of the present disclosure, and should be included in the scope of the claims of the present disclosure.
工业实用性Industrial applicability
本公开实施例提供的方法,将终端的备份信息通过优盘通信协议发送至备份终端,使得在终端无法开机的情况下,能够较为便捷地对终端的数据进行备份。The method provided by the embodiment of the present disclosure sends the backup information of the terminal to the backup terminal through the USB flash drive communication protocol, so that the data of the terminal can be backed up more conveniently when the terminal cannot be powered on.

Claims (10)

  1. 一种数据备份方法,包括:A data backup method, including:
    判断第一终端是否无法启动;Determine whether the first terminal cannot be started;
    当所述第一终端无法启动时,在所述第一终端与第二终端建立连接后,根据所述第二终端的操作系统的类型通过优盘通信协议向所述第二终端发送所述第一终端的数据备份信息。After the first terminal fails to start, after the first terminal establishes a connection with the second terminal, the first terminal is sent to the second terminal by using a USB flash drive protocol according to the type of the operating system of the second terminal. Data backup information of the terminal.
  2. 根据权利要求1所述的方法,其中,所述判断第一终端是否无法启动,包括:The method of claim 1, wherein the determining whether the first terminal is unbootable comprises:
    当所述第一终端在接收到开机信号或重新启动信号后的第一预设时间段内仍处于关机状态时,控制所述第一终端重新启动,如果所述第一终端仍无法启动,则再次控制所述第一终端重新启动,并记录所述第一终端执行重新启动操作的次数,直到所述第一终端执行重新启动操作的次数达到预设次数,则确定所述第一终端无法启动。When the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, controlling the first terminal to restart, if the first terminal still fails to start, Controlling the first terminal to restart again, and recording the number of times the first terminal performs a restart operation, until the number of times the first terminal performs the restart operation reaches a preset number of times, determining that the first terminal cannot be started. .
  3. 根据权利要2所述的方法,其中,The method of claim 2, wherein
    所述方法还包括:The method further includes:
    在确定所述第一终端无法启动后,通过所述第一终端发出数据备份提示信息,在第二预设时间段内等待接收确认备份指令;After determining that the first terminal cannot be started, sending, by the first terminal, data backup prompt information, waiting for receiving a confirmation backup instruction within a second preset time period;
    所述根据所述第二终端的操作系统的类型通过优盘通信协议向所述第二终端发送所述第一终端的备份数据信息,包括:The sending the backup data information of the first terminal to the second terminal by using a USB flash drive protocol according to the type of the operating system of the second terminal, including:
    当所述第二预设时间段内接收到预设确认备份指令且所述第一终端与所述第二终端建立连接时,备份所述第一终端的数据;When the preset confirmation backup instruction is received in the second preset time period, and the first terminal establishes a connection with the second terminal, backing up data of the first terminal;
    当所述第二预设时间段内未接收到预设确认备份指令或所述第一终端与所述第二终端未建立连接时,不备份所述第一终端的数据。When the preset confirmation backup instruction is not received in the second preset time period or the first terminal does not establish a connection with the second terminal, the data of the first terminal is not backed up.
  4. 根据权利要求3所述的方法,其中,所述确认备份指令,包括:The method of claim 3 wherein said confirming backup instructions comprises:
    当在所述第二预设时间段内检测到所述第一终端上的任意按键被按下时,将被按下的所述按键触发的指令识别为所述确认备份指令。When it is detected during the second preset time period that any button on the first terminal is pressed, the command triggered by the pressed button is recognized as the confirmation backup instruction.
  5. 根据权利要求1至4任意一项所述的方法,其中,所述根据所述第二 终端的操作系统的类型通过优盘通信协议向所述第二终端发送所述第一终端的备份数据信息,包括:The method according to any one of claims 1 to 4, wherein the backup data information of the first terminal is sent to the second terminal by using a USB flash drive protocol according to a type of an operating system of the second terminal, include:
    当所述第二终端的操作系统支持第四代扩展文件系统EXT4时,将所述第一终端用户数据区的数据通过优盘通信协议发送至所述第二终端;When the operating system of the second terminal supports the fourth generation extended file system EXT4, the data of the first terminal user data area is sent to the second terminal by using a USB flash drive protocol;
    当所述第二终端的操作系统不支持EXT4时,将所述第一终端存储区的磁盘分区表GPT通过优盘通信协议发送至所述第二终端。When the operating system of the second terminal does not support EXT4, the disk partition table GPT of the first terminal storage area is sent to the second terminal by using a USB flash drive protocol.
  6. 一种数据备份装置,包括:A data backup device comprising:
    判断模块,设置为:判断第一终端是否无法启动;The determining module is configured to: determine whether the first terminal cannot be started;
    发送模块,设置为:当所述第一终端无法启动时,在所述第一终端与第二终端建立连接后,根据所述第二终端的操作系统的类型通过优盘通信协议向所述第二终端发送所述第一终端的数据备份信息。a sending module, configured to: when the first terminal fails to start, after the first terminal establishes a connection with the second terminal, according to the type of the operating system of the second terminal, to the second through the USB flash drive communication protocol The terminal sends data backup information of the first terminal.
  7. 根据权利要求6所述的装置,其中,所述判断模块是设置为:The apparatus of claim 6 wherein said determining module is configured to:
    当所述第一终端在接收到开机信号或重新启动信号后的第一预设时间段内仍处于关机状态时,控制所述第一终端重新启动,如果所述第一终端仍无法启动,则再次控制所述第一终端重新启动,并记录所述第一终端执行重新启动操作的次数,直到所述第一终端执行重新启动操作的次数达到预设次数,则确定所述第一终端无法启动。When the first terminal is still in a shutdown state within a first preset time period after receiving the power-on signal or the restart signal, controlling the first terminal to restart, if the first terminal still fails to start, Controlling the first terminal to restart again, and recording the number of times the first terminal performs a restart operation, until the number of times the first terminal performs the restart operation reaches a preset number of times, determining that the first terminal cannot be started. .
  8. 根据权利要7所述的装置,其中,The device according to claim 7, wherein
    所述装置还包括:The device also includes:
    提示模块,设置为:在确定所述第一终端无法启动后,通过所述第一终端发出数据备份提示信息,在第二预设时间段内等待接收确认备份指令;The prompting module is configured to: after determining that the first terminal cannot be started, send the data backup prompt information by the first terminal, and wait for receiving the confirmation backup instruction within the second preset time period;
    所述发送模块是设置为:The sending module is set to:
    当所述第二预设时间段内接收到预设确认备份指令且所述第一终端与所述第二终端建立连接时,备份所述第一终端的数据;When the preset confirmation backup instruction is received in the second preset time period, and the first terminal establishes a connection with the second terminal, backing up data of the first terminal;
    当所述第二预设时间段内未接收到预设确认备份指令或所述第一终端与所述第二终端未建立连接时,不备份所述第一终端的数据。When the preset confirmation backup instruction is not received in the second preset time period or the first terminal does not establish a connection with the second terminal, the data of the first terminal is not backed up.
  9. 根据权利要求8所述的装置,所述装置还包括:The apparatus of claim 8 further comprising:
    识别模块,设置为:当在所述第二预设时间段内检测到所述第一终端上的任意按键被按下时,将被按下的所述按键触发的指令识别为所述确认备份指令。The identification module is configured to: when it is detected that any button on the first terminal is pressed within the second preset time period, the command triggered by the pressed button is recognized as the confirmation backup instruction.
  10. 根据权利要求6至9任意一项所述的装置,其中,所述发送模块,包括:The device according to any one of claims 6 to 9, wherein the sending module comprises:
    第一发送单元,设置为:当所述第二终端的操作系统支持第四代扩展文件系统EXT4时,将所述第一终端用户数据区的数据通过优盘通信协议发送至所述第二终端;The first sending unit is configured to: when the operating system of the second terminal supports the fourth generation extended file system EXT4, send data of the first terminal user data area to the second terminal by using a USB flash drive protocol;
    第二发送单元,设置为:当所述第二终端的操作系统不支持EXT4时,将所述第一终端存储区的磁盘分区表GPT通过优盘通信协议发送至所述第二终端。The second sending unit is configured to: when the operating system of the second terminal does not support EXT4, send the disk partition table GPT of the first terminal storage area to the second terminal by using a USB flash drive protocol.
PCT/CN2018/073150 2017-01-24 2018-01-18 Method and device for backing up data WO2018137540A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710059367.4A CN108347521A (en) 2017-01-24 2017-01-24 A kind of data back up method and device
CN201710059367.4 2017-01-24

Publications (1)

Publication Number Publication Date
WO2018137540A1 true WO2018137540A1 (en) 2018-08-02

Family

ID=62962232

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/073150 WO2018137540A1 (en) 2017-01-24 2018-01-18 Method and device for backing up data

Country Status (2)

Country Link
CN (1) CN108347521A (en)
WO (1) WO2018137540A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109828858A (en) * 2019-01-17 2019-05-31 广东小天才科技有限公司 Method and system for preventing system startup from being locked
CN109783149A (en) * 2019-01-17 2019-05-21 Oppo广东移动通信有限公司 Start-up control method, device, mobile terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007067699A2 (en) * 2005-12-08 2007-06-14 Nvidia Corporation Emergency data preservation services
CN103777906A (en) * 2014-02-14 2014-05-07 罗冬林 Equipment based on mobile phone directory and information sharing and working method of equipment
CN104765705A (en) * 2015-04-22 2015-07-08 广东欧珀移动通信有限公司 Method and device for reading data stored by turned-off mobile terminal and mobile terminal
CN105302673A (en) * 2015-11-20 2016-02-03 小米科技有限责任公司 Information backup method and device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872200A (en) * 2015-12-15 2016-08-17 乐视致新电子科技(天津)有限公司 Mobile phone and usb system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007067699A2 (en) * 2005-12-08 2007-06-14 Nvidia Corporation Emergency data preservation services
CN103777906A (en) * 2014-02-14 2014-05-07 罗冬林 Equipment based on mobile phone directory and information sharing and working method of equipment
CN104765705A (en) * 2015-04-22 2015-07-08 广东欧珀移动通信有限公司 Method and device for reading data stored by turned-off mobile terminal and mobile terminal
CN105302673A (en) * 2015-11-20 2016-02-03 小米科技有限责任公司 Information backup method and device and terminal

Also Published As

Publication number Publication date
CN108347521A (en) 2018-07-31

Similar Documents

Publication Publication Date Title
TWI439079B (en) System for remotely erasing data, method, server, and mobile device thereof, and computer program product
TWI389034B (en) Information processing apparatus and method, computer-readable program product, and computer-readable recording medium
WO2018076169A1 (en) Recovery method for power-on failure of terminal device, and terminal device
US20060288057A1 (en) Portable data backup appliance
WO2014089734A1 (en) Terminal and application program restoration method
CN107168818B (en) Terminal and machine-refreshing failure recovery method
US20150082056A1 (en) Computer device and method for converting working mode of universal serial bus connector of the computer device
US10219135B1 (en) Near field communication (NFC) enhanced computing systems
US20110246983A1 (en) Wireless Network Backup Device and Method
WO2013044785A1 (en) User data backup method and apparatus
US20100037092A1 (en) System and method for backup, reboot, and recovery
WO2018137540A1 (en) Method and device for backing up data
WO2015172283A1 (en) Method, device and mobile terminal for reducing power consumption
EP1978720A1 (en) A mobile computing system and the method for receiving data packagea
CN108874441B (en) Board card configuration method, device, server and storage medium
WO2017080225A1 (en) Data partition recovery method and apparatus and terminal
EP3040856B1 (en) Firmware refreshing method and device
US8855599B2 (en) Method and apparatus for auxiliary communications with mobile communications device
CN104077250A (en) Connection processing method and device for intelligent terminal and storage equipment
WO2013167010A2 (en) Mobile terminal and startup method therefor
WO2016101225A1 (en) Data backup method, apparatus and system
JP2007066060A (en) Electronic apparatus and computer executable program
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
JP2015122030A (en) Information processing device, monitoring program and monitoring method
WO2013097095A1 (en) Method for backing up startup information about storage device

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: 18745036

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: 18745036

Country of ref document: EP

Kind code of ref document: A1