CN108228389A - A kind of method and terminal for carrying out data backup - Google Patents

A kind of method and terminal for carrying out data backup Download PDF

Info

Publication number
CN108228389A
CN108228389A CN201810025829.5A CN201810025829A CN108228389A CN 108228389 A CN108228389 A CN 108228389A CN 201810025829 A CN201810025829 A CN 201810025829A CN 108228389 A CN108228389 A CN 108228389A
Authority
CN
China
Prior art keywords
terminal
memory
storage card
abnormal
pluggable storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810025829.5A
Other languages
Chinese (zh)
Inventor
姚巧丽
张伟
王永清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201810025829.5A priority Critical patent/CN108228389A/en
Publication of CN108228389A publication Critical patent/CN108228389A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1417Boot up procedures
    • 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/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention relates to application and development field, more particularly to a kind of method and terminal for carrying out data backup, to solve the problem of that the prior art is difficult that cause developer that cannot solve terminal system in time abnormal for the data that get when abnormal crash occurs in terminal in memory.Terminal of the embodiment of the present invention is restarted, and judges whether terminal is abnormal crash before the restart;If so, terminal obtains the data preserved before the restart in memory when the residual capacity for determining pluggable storage card is more than the capacity of memory;Terminal is by the data backup got to pluggable storage card.Since the embodiment of the present invention will be in the data backup that preserved before the restart in memory to pluggable storage card;Developer can search associated internal memory data when terminal abnormal crashes when needing to know the reason of terminal abnormal crashes from pluggable storage card, so as to know the reason of terminal abnormal crashes by carrying out analysis to the partial data.

Description

A kind of method and terminal for carrying out data backup
Technical field
The present invention relates to system application and development field, more particularly to a kind of method and terminal for carrying out data backup.
Background technology
With the continuous improvement of terminal capabilities, the function of terminal is also more next to be enriched.The complexity of terminal system is not yet It is disconnected to rise, so as to also increase the probability that terminal system crashes extremely.
The reason of terminal system is caused to crash extremely has very much, before system exception crash, is recorded in the memory of terminal Internal storage data can reflect in Memory Allocation of the terminal when crashing extremely, call stack information and memory and preserve terminal System log when crashing extremely.The data preserved in memory when developer can be by crashing to terminal abnormal are divided The reason of terminal abnormal crashes is known in analysis, so as to be improved to the system of terminal, to solve the problems, such as that terminal system is abnormal. But since the phenomenon that terminal system crashes extremely always flashes across, the related data before terminal abnormal crashes is stored in In memory, after the completion of being again started up in terminal, the data in memory can be covered again, therefore be difficult often to get end There are the data in memory during abnormal crash in end, and causes developer that cannot solve the problems, such as that terminal system is abnormal in time.
Invention content
The present invention provides a kind of method and terminal for carrying out data backup, is difficult to get terminal to solve the prior art There are the data in memory during abnormal crash, cause developer that cannot solve the problems, such as that terminal system is abnormal in time.
Based on the above problem, include in a first aspect, the embodiment of the present invention provides a kind of method for carrying out data backup:
Terminal is restarted, and judges whether the terminal is abnormal crash before the restart;
If so, the terminal is when the residual capacity for determining pluggable storage card is not less than the capacity of memory, described in acquisition Restart previously stored data in the terminal in memory;
The terminal is by the data backup got to the pluggable storage card.
Second aspect, the embodiment of the present invention provide a kind of terminal and include:
At least one processing unit and at least one storage unit, wherein, the storage unit has program stored therein code, When said program code is performed by the processing unit so that the processing unit performs following process:
Terminal is restarted, and judges whether the terminal is abnormal crash before the restart;
If so, the residual capacity for determining pluggable storage card be not less than memory capacity when, obtain in the memory The terminal restarts previously stored data;
By the data backup got to the pluggable storage card.
The third aspect, the embodiment of the present invention also provide a kind of terminal and include:
Judgment module when restarting for terminal, judges whether the terminal is abnormal crash before the restart;
Acquisition module, if crashing for being abnormal, in the residual capacity for determining pluggable storage card not less than memory During capacity, obtain in the memory and restart previously stored data in the terminal;
Processing module, for by the data backup got to the pluggable storage card.
Since the embodiment of the present invention is when terminal is restarted, need to judge whether be abnormal crash before the restart, true Determine terminal to be abnormal after crash before the restart, terminal also needs to judge whether the residual capacity of pluggable storage card is less than The capacity of memory only when the residual capacity of pluggable storage card is not less than the capacity of memory, is obtained in memory in terminal weight Previously stored data are opened, and the data got are backuped in pluggable storage card, so as to ensure that the data in memory are standby In part to pluggable storage card;Due to be stored in memory terminal extremely crash when related data, by memory in terminal weight After opening previously stored data backup to pluggable storage card, the data in pluggable storage card can be with persistence, exploit person Member can search correlation when terminal abnormal crashes when needing to know the reason of terminal abnormal crashes from pluggable storage card Internal storage data so as to know the reason of terminal abnormal crashes by carrying out analysis to the partial data, changes terminal system Into with solve the problems, such as terminal abnormal crash.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, the accompanying drawings in the following description is only some embodiments of the present invention, for this For the those of ordinary skill in field, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is the method flow diagram that the embodiment of the present invention carries out data backup;
Fig. 2A -2C are the display interface schematic diagram of terminal of the embodiment of the present invention;
Fig. 3 is the method flow diagram that the embodiment of the present invention sets modulating mode;
Fig. 4 is the holistic approach flow chart of the first progress data backup of the embodiment of the present invention;
Fig. 5 is the holistic approach flow chart of second of progress data backup of the embodiment of the present invention;
Fig. 6 is the structure diagram of the first terminal of the embodiment of the present invention;
Fig. 7 is the structure diagram of second of terminal of the embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is made below in conjunction with attached drawing into It is described in detail to one step, it is clear that the described embodiments are only some of the embodiments of the present invention rather than whole implementation Example.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without making creative work All other embodiment, shall fall within the protection scope of the present invention.
As shown in Figure 1, a kind of method for carrying out data backup of the embodiment of the present invention includes:
Step 101, terminal are restarted, and judge whether the terminal is abnormal crash before the restart;
Step 102, if so, the terminal the residual capacity for determining pluggable storage card be not less than memory capacity when, It obtains in the memory and restarts previously stored data in the terminal;
Step 103, by the data backup got to the pluggable storage card.
The embodiment of the present invention can be applied to after terminal abnormal crashes, and data backup is carried out in terminal restarting process.
The terminal of the embodiment of the present invention can be smart mobile phone, computer, tablet computer, smart television etc..
When due to terminal of the embodiment of the present invention restarting, need to judge whether be abnormal crash before the restart, determine Terminal is abnormal after crash before the restart, and whether terminal also needs to judge the residual capacity of pluggable storage card less than interior The capacity deposited only when the residual capacity of pluggable storage card is not less than the capacity of memory, is obtained and is restarted in memory in terminal Previously stored data, and the data got are backuped in pluggable storage card, so as to ensure the data backup in memory Into pluggable storage card;Due to being stored with terminal related data when crashing extremely in memory, will restart in memory in terminal After previously stored data backup to pluggable storage card, the data in pluggable storage card can be with persistence, developer When needing to know the reason of terminal abnormal crashes, phase when can search terminal abnormal crash from pluggable storage card is inside the Pass Deposit data so as to know the reason of terminal abnormal crashes by carrying out analysis to the partial data, is improved terminal system To solve the problems, such as that terminal abnormal crashes.
Wherein, the pluggable storage card of the embodiment of the present invention can be the various storage cards being connect with terminal, including but not It is limited to the extension storage card (for example, SD card) of terminal support;
Memory in the embodiment of the present invention is the solid-state memory of terminal, can be specifically ROM (the Read Only of terminal Memory image, read-only memory mirror image), for storing program and various data, and with memory function, count after a power failure According to will not lose;
Running memory is saved as in the embodiment of the present invention, can be specifically RAM (the random access of terminal Memory, random access memory);For running all programs of terminal, CPU (Central Processing are temporarily stored Unit, central processing unit) operational data, data are easy to be lost after a power failure.
In implementation, when terminal is restarted, judge whether terminal is abnormal crash before the restart;
It should be noted that the reboot operation of terminal of the embodiment of the present invention is after the instruction of restarting for receiving user's triggering It carries out;Alternatively, terminal is after crash is abnormal, automatic trigger reboot operation.
Optionally, terminal of the embodiment of the present invention judges whether terminal is abnormal extremely before the restart according to following manner Machine:
The terminal detects whether there is the mark that crashes in the first specific region of memory;If so, the terminal is true It is fixed to be abnormal crash before the restart;
If it is not, it is normal before the restart to determine that terminal is not abnormal crash or determining terminal before the restart Shutdown.
Wherein, in the first specific region of terminal memory crash mark be after terminal determines to be abnormal crash, It is added in the first specific region of memory;
Specifically, the terminal of the embodiment of the present invention, after determining to be abnormal crash, the terminal is in the first spy of memory Determine region addition crash mark.
It should be noted that terminal determines that either method of the prior art may be used in the method for being abnormal crash, In this not go into detail.
First specific region of memory is the region divided in advance, is served only for storing after terminal is abnormal crash dead Machine identifies.
For example, the first specific region of terminal memory is provided with crash flag bit, if terminal determines to be abnormal crash When, the crash flag bit of the first specific region of memory is set as " 1 " by terminal;Correspondingly, terminal is after restart, detection is deposited First specific region of reservoir identifies " 1 " with the presence or absence of crashing, if in the presence of, it is determined that terminal occurs abnormal before this is restarted The situation of crash, if being not present, it is determined that the terminal is normal shutdown before this is restarted.
It should be noted that with the presence or absence of the mark that crashes in the first specific region of the above-mentioned terminal by detecting memory Method, judges whether terminal is abnormal the mode of crash before the restart, only terminal of the embodiment of the present invention is judged in weight Open whether be abnormal before crash mode for example, mode to be protected of the embodiment of the present invention is not limited to above-mentioned act Example, it is any to judge whether terminal is abnormal crash mode and is suitable for the present invention before the restart.
If terminal is after manufacture, during ordinary user's use, if being intended to every time when restarting terminal after crashing extremely By the data backup in memory to pluggable storage card, and what is generated when analysing terminal crashes extremely is not needed to for ordinary user Internal storage data, therefore the waste to pluggable storage card space can be caused.
Based on the above problem, the embodiment of the present invention provides a kind of optional realization method, and modulation mould is currently in terminal During formula, after terminal is abnormal crash, by the data backup in terminal memory to pluggable storage card.
It is set it should be noted that the debugging mode of terminal of the embodiment of the present invention is triggered by user.
Specifically, comprising " modulating mode " option in the setting menu of terminal, if modulating mode option is chosen in user's triggering, Terminal adds mode pattern identification after the triggering command of user is received, in the second specific region of memory.
Wherein, the second specific region of memory is the region divided in advance, is served only for storage mode pattern identification.
Optionally, terminal is added in the second specific region of memory and is debugged after the triggering command of user is received Before pattern identification, terminal judges whether the residual capacity of pluggable storage card is more than the capacity of memory, if more than then storing The second specific region addition debugging mode mark of device, if being not more than, prompts user to replace pluggable storage card.
Before opening debugging mode due to terminal of the embodiment of the present invention, the condition met is needed for the surplus of pluggable storage card Covolume amount is more than the capacity of memory, if the residual capacity of pluggable storage card is not more than the capacity of memory, user is prompted to replace Pluggable storage card is so as to avoid due to pluggable storage card residual capacity deficiency, it is impossible to by the data full backup in memory Problem.
For example, terminal display interface as shown in Figure 2 A, comprising " pattern " option in the setting menu of terminal, wherein optional Pattern in include " debugging mode " option.If user selects " debugging mode " option, as shown in Figure 2 B, " adjusted not choose The display interface of die trial formula ";As shown in Figure 2 C, to choose the display interface of " debugging mode ".
After user being prompted to replace pluggable storage card in the embodiment of the present invention, user can will be pluggable in present terminal Storage card takes out, and is changed to the pluggable storage card that new residual capacity is more than memory size;Or user will be in present terminal Pluggable storage card take out after, delete the partial data in the pluggable storage card so that the pluggable storage card after deletion In residual capacity be more than memory.
Wherein, the residual capacity of pluggable storage card is subtracted in pluggable storage card for the total capacity of pluggable storage card Store the capacity that data occupy;The capacity of memory is the total capacity of the memory.
In implementation, the terminal of the embodiment of the present invention obtains the residual capacity of pluggable storage card by file system functions; Such as:efs_statvfs();
The terminal of the embodiment of the present invention obtains the capacity of memory by reading the MR8 registers of memory;Such as:The appearance of memory It measures as 4GB;
It is big to compare the two after the capacity of pluggable storage card residual capacity and memory is got for the embodiment of the present invention It is small;If pluggable storage card residual capacity is not less than the capacity of memory, terminal is added in the second specific region of memory and is adjusted Pattern identification is tried, if pluggable storage card residual capacity is less than the capacity of memory, user is prompted to replace pluggable storage card;
In force, if the residual capacity of pluggable storage card is less than the capacity of memory, terminal uses the side of interface display Formula prompting user replaces pluggable storage card;Alternatively, terminal can also use vibration mode or the prompting of indicator light flashing mode to use Replace pluggable storage card in family.
It should be noted that if terminal receives the cancellation debugging mode instruction of user's triggering, then terminal wipes memory The second specific region in debugging mode mark.
As shown in figure 3, the method for terminal of embodiment of the present invention setting modulating mode includes:
Step 301, terminal receive user instructions;
If step 302, user instruction type are selection debugging mode, terminal obtain pluggable storage card residual capacity and The capacity of memory;
If step 303, user instruction type are wiped to cancel debugging mode, terminal in the second specific region of memory Debugging mode identifies;
Step 304, terminal judge whether the residual capacity of pluggable storage card is less than the capacity of memory;If it is not, perform step Rapid 305, if so, performing step 306;
Step 305, terminal are in the second specific region of memory addition debugging mode mark;
Step 306, terminal notifying user replace pluggable storage card, and return to step 302;
Specifically, the embodiment of the present invention provides a kind of optional realization method, when terminal is restarted, judging terminal in weight It opens and whether is abnormal before crash before, first judge terminal currently whether in debugging mode;Determining that terminal is currently at After debugging mode, judge whether terminal is abnormal crash before the restart.
Alternatively, the embodiment of the present invention also provides a kind of optional realization method, terminal is after determining abnormal crash occur, first Terminal is judged currently whether in debugging mode, if so, terminal adds the mark that crashes in the first specific region of memory, if not It is that terminal does not add the mark that crashes in the first specific region of memory.That is, terminal is when restarting, if passing through detection Exist into the first specific region of memory and crash mark to judge whether terminal is abnormal crash before the restart, then say Bright terminal is currently centainly in debugging mode.
It illustrates separately below.
Realization method one:
Terminal is when restarting, and before judging whether terminal is abnormal crash before the restart, first judges that terminal is current Whether debugging mode is in.
In realization method one, terminal is after determining to be abnormal crash, and in the first specific region of memory, addition is dead Machine identifies;
When terminal is restarted, first determine whether terminal currently whether in debugging mode;Specifically, terminal judges memory It is identified in second specific region with the presence or absence of debugging mode.
It to be identified if there is no debugging modes, determine that terminal is not currently in debugging mode, then terminal is using in the prior art Start-up mode normal boot-strap;It should be noted that terminal in normal boot-strap, does not need to that the data progress in memory is standby Part.
If there are debugging mode mark, determine that terminal is currently at debugging mode, judge that the first of the memory of terminal is special Determine in region with the presence or absence of the mark that crashes;
If there is no the mark that crashes, which uses start-up mode normal boot-strap of the prior art;It should be noted that Terminal does not need to back up the data in memory in normal boot-strap;
If there is the mark that crashes, which judges whether the residual capacity of pluggable storage card is less than the capacity of memory;If It is not less than, terminal obtains the data preserved before the restart in the memory, by the data backup got to pluggable storage Card;If being less than, terminal notifies user in a manner of shaking or LED flickers, so that user replaces pluggable storage card.
After the data in memory are backed up, terminal removes crash mark of the addition in the first specific region of memory Know.
Wherein, the embodiment of the present invention specifically carries out data backup using following manner:
Terminal exists in the first specific region for determining memory when crashing mark, first initialization files system and can Storage card is plugged, then the pluggable storage card of carry;The residual capacity of pluggable storage card is obtained by file system functions;With And the MR8 registers of memory are read, so as to obtain the capacity of memory;
When the residual capacity for determining pluggable storage card is not less than the capacity of memory, before terminal is restarted in acquisition memory The data of preservation, by the data backup got to pluggable storage card.
It should be noted that terminal is in restarting process, in memory is got terminal restart previously stored data it Before, new data will not be increased in memory, that is to say, that terminal is held before restarting previously stored data in memory is got Capable operation will not generate internal storage data, will not be capped so as to ensure in memory that terminal restarts previously stored total data, Ensure the integrality of data got.
It should be noted that terminal needs to judge pluggable deposit again after prompting user replaces pluggable storage card Whether the residual capacity of card storage is more than the capacity of memory.
Specifically, after terminal notifying user replaces pluggable storage card, user needs to deposit pluggable in present terminal Card storage is taken out, and new pluggable storage card is selected to be inserted into terminal, and the residual capacity of new pluggable storage card is not less than interior The capacity deposited;Alternatively, after user takes out the pluggable storage card in present terminal, the part number in pluggable storage card is deleted According to the residual capacity for deleting pluggable storage card after partial data is not less than the capacity of memory, and user is by the pluggable storage card Again insertable into terminal;Terminal can initialize pluggable storage card, initialize when having detected that pluggable storage card is inserted into The residual capacity of pluggable storage card is obtained in journey, is not less than the capacity of memory in the residual capacity for determining pluggable storage card When, it obtains in memory and restarts previously stored data in terminal, the data got are backuped in pluggable storage card.
As shown in figure 4, the embodiment of the present invention is included using the method that realization method one carries out data backup:
Step 401, terminal determine to be abnormal crash;
Step 402, terminal add the mark that crashes in the first specific region of memory;
Whether step 403, terminal judge current in debugging mode when restarting;If it is not, step 404 is performed, if so, holding Row step 405;
Wherein, terminal is identified by detecting debugging mode in the second specific region of memory, and whether judgement is currently in Debugging mode;If being detected in the second specific region of memory, debugging mode identifies, it is determined that terminal is currently at debugging mould Formula, if not detected in the second specific region of memory, debugging mode identifies, it is determined that terminal is not currently in debugging mould Formula;
Step 404, terminal normal boot-strap;
Step 405, terminal judge to identify with the presence or absence of crashing in the first specific region of memory;If so, perform step 406, if it is not, performing step 404;
Step 406, terminal initialization file system and pluggable storage card;
The pluggable storage of step 407, terminal carry snaps into file system;
Step 408, terminal obtain the residual capacity of pluggable storage card by file system functions and obtain memory Capacity;
Step 409, terminal judge whether the residual capacity of pluggable storage card is less than the capacity of memory;If it is not, perform step Rapid 410, if so, performing step 412;
Step 410, terminal are obtained in the memory restarts previously stored data in terminal;
Step 411, terminal are by the data backup got to the pluggable storage card;
Step 412, terminal notify user to replace the pluggable storage card in a manner of shaking or LED flickers;
Pluggable storage card is inserted into after step 413, terminal have detected replacement, is initialized the pluggable storage card and is obtained The residual capacity of pluggable storage card, return to step 409;
Step 414, terminal remove the crash mark in the first specific region of memory.
Realization method two:
In realization method two, terminal first judges terminal currently whether in debugging mode after there is abnormal crash, if It is that terminal adds the mark that crashes in the first specific region of memory, if it is not, terminal is not in the first specific region of memory Addition, which is crashed, to be identified.
When terminal is restarted, with the presence or absence of the mark that crashes in the first specific region by detecting memory, to judge end Whether end is abnormal crash before the restart;Since in realization method two, terminal is first sentenced after determining abnormal crash occur It is disconnected current whether in debugging mode, it is only determining after debugging mode, is adding and crash in the first specific region of memory Mark;That is, terminal, when restarting, if being detected in the first specific region of memory, crash identifies, it is determined that terminal It is current centainly in debugging mode, therefore do not need in restarting process to judge whether terminal is in debugging mode.
If there is no the mark that crashes, which uses start-up mode normal boot-strap of the prior art;It should be noted that Terminal does not need to back up the data in memory in normal boot-strap;
If there is the mark that crashes, which judges whether the residual capacity of pluggable storage card is less than the capacity of memory;If It is not less than, terminal is obtained in the memory restarts previously stored data in terminal, by the data backup got to pluggable Storage card;If being less than, terminal notifies user to replace pluggable storage card in a manner of shaking or LED flickers.
After the data in memory are backed up, terminal removes crash mark of the addition in the first specific region of memory Know.
Wherein, the embodiment of the present invention specifically carries out data backup using following manner:
Terminal exists in the first specific region for determining memory when crashing mark, first initialization files system and can Storage card is plugged, then the pluggable storage card of carry;The residual capacity of pluggable storage card is obtained by file system functions;With And the MR8 registers of memory are read, so as to obtain the capacity of memory;
When the residual capacity for determining pluggable storage card is not less than the capacity of memory, before terminal is restarted in acquisition memory The data of preservation, by the data backup got to pluggable storage card.
It should be noted that terminal is in restarting process, in memory is got terminal restart previously stored data it Before, new data will not be increased in memory, that is to say, that terminal is held before restarting previously stored data in memory is got Capable operation will not generate internal storage data, will not be capped so as to ensure in memory that terminal restarts previously stored total data, Ensure the integrality of data got.
It should be noted that terminal needs to judge pluggable deposit again after prompting user replaces pluggable storage card Whether the residual capacity of card storage is more than the capacity of memory.
Specifically, after terminal notifying user replaces pluggable storage card, user needs to deposit pluggable in present terminal Card storage is taken out, and new pluggable storage card is selected to be inserted into terminal, and the residual capacity of new pluggable storage card is not less than interior The capacity deposited;Alternatively, after user takes out the pluggable storage card in present terminal, the part number in pluggable storage card is deleted According to the residual capacity for deleting pluggable storage card after partial data is not less than the capacity of memory, and user is by the pluggable storage card Again insertable into terminal;Terminal can initialize pluggable storage card, initialize when having detected that pluggable storage card is inserted into The residual capacity of pluggable storage card is obtained in journey, is not less than the capacity of memory in the residual capacity for determining pluggable storage card When, it obtains in memory and restarts previously stored data in terminal, the data got are backuped in pluggable storage card.
As shown in figure 5, the embodiment of the present invention is included using the method that realization method two carries out data backup:
Step 501, terminal determine to be abnormal crash;
Step 502, terminal determine to be currently at debugging mode;
Wherein, terminal is identified by detecting debugging mode in the second specific region of memory, and whether judgement is currently in Debugging mode;If being detected in the second specific region of memory, debugging mode identifies, it is determined that terminal is currently at debugging mould Formula, if not detected in the second specific region of memory, debugging mode identifies, it is determined that terminal is not currently in debugging mould Formula;
Step 503, terminal add the mark that crashes in the first specific region of memory;
Step 504, terminal judge to identify with the presence or absence of crashing in the first specific region of memory when restarting;If it is not, Step 505 is performed, if so, performing step 506;
Step 505, terminal normal boot-strap;
Step 506, terminal initialization file system and pluggable storage card;
The pluggable storage of step 507, terminal carry snaps into file system;
Step 508, terminal obtain the residual capacity of pluggable storage card by file system functions and obtain memory Capacity;
Step 509, terminal judge whether the residual capacity of pluggable storage card is less than the capacity of memory;If it is not, perform step Rapid 510, if so, performing step 512;
Step 510, terminal are obtained in the memory restarts previously stored data in terminal;
Step 511, terminal are by the data backup got to the pluggable storage card;
Step 512, terminal notify user to replace the pluggable storage card in a manner of shaking or LED flickers;
Pluggable storage card is inserted into after step 513, terminal have detected replacement, is initialized the pluggable storage card and is obtained The residual capacity of pluggable storage card, return to step 509;
Step 514, terminal remove the crash mark in the first specific region of memory.
Based on same inventive concept, a kind of terminal is additionally provided in the embodiment of the present invention, since the terminal is of the invention real The terminal of the progress data backup in example is applied, and the principle that the terminal solves the problems, such as is similar to this method, therefore the terminal Implementation may refer to the implementation of method, and overlaps will not be repeated.
As shown in fig. 6, the first terminal of the embodiment of the present invention, including:
At least one processing unit 600 and at least one storage unit 601, wherein, the storage unit 601 is stored with Program code, when said program code is performed by the processing unit 600 so that the processing unit 600 performs following mistake Journey:
When terminal is restarted, judge whether the terminal is abnormal crash before the restart;
If so, the residual capacity for determining pluggable storage card be not less than memory capacity when, obtain in the memory The terminal restarts previously stored data;
By the data backup got to the pluggable storage card.
Optionally, the processing unit 600 is specifically used for:
Judge whether the terminal is abnormal crash before the restart according to following manner:
Detect whether there is the mark that crashes in the first specific region of memory;If so, determine that the terminal is being restarted It is abnormal crash before.
Optionally, the processing unit 600 is additionally operable to:
When the terminal is restarted, before judging whether the terminal is abnormal crash before the restart, institute is determined It states terminal and is currently at debugging mode.
Optionally, the processing unit 600 is specifically used for:
Judge to identify with the presence or absence of debugging mode in the second specific region of the memory;If so, determine the terminal It is currently at debugging mode.
Optionally, the processing unit 600 is additionally operable to:
Before the terminal is restarted, determine that the terminal is abnormal crash;Add in the first specific region of memory Crash is added to identify.
Optionally, the processing unit 600 is additionally operable to:
If it is determined that the residual capacity of the pluggable storage card is less than the capacity of the memory, flickered with vibrations or LED Mode notifies user to replace the pluggable storage card.
As shown in fig. 7, second of terminal of the embodiment of the present invention, including:
Judgment module 701 when restarting for terminal, judges whether the terminal is abnormal crash before the restart;
Acquisition module 702 if crashing for being abnormal, is more than memory in the residual capacity for determining pluggable storage card During capacity, obtain in the memory and restart previously stored data in the terminal;
Processing module 703, for by the data backup got to the pluggable storage card.
Optionally, the judgment module 701 is additionally operable to:
When terminal is restarted, before being identified in the first specific region for judging memory with the presence or absence of crash, determine described Terminal is currently at debugging mode.
Optionally, the judgment module 701 is specifically used for:
Judge whether the terminal is abnormal crash before the restart according to following manner:
Detect whether there is the mark that crashes in the first specific region of memory;If so, determine that the terminal is being restarted It is abnormal crash before.
Optionally, the judgment module 701 is additionally operable to:
When the terminal is restarted, before judging whether the terminal is abnormal crash before the restart, institute is determined It states terminal and is currently at debugging mode.
Optionally, the judgment module 701 is specifically used for:
Judge to identify with the presence or absence of debugging mode in the second specific region of the memory;If so, determine the terminal It is currently at debugging mode.
Optionally, the judgment module 701 is additionally operable to:
Before the terminal is restarted, determine that the terminal is abnormal crash;Add in the first specific region of memory Crash is added to identify.
Optionally, the processing module 703 is additionally operable to:
If it is determined that the residual capacity of the pluggable storage card is less than the capacity of the memory, flickered with vibrations or LED Mode notifies user to replace the pluggable storage card.
Above by reference to showing according to the method, apparatus (system) of the embodiment of the present application and/or the frame of computer program product Figure and/or flow chart describe the application.It should be understood that it can realize that block diagram and/or flow illustrate by computer program instructions One block of figure and the combination of block diagram and/or the block of flowchart illustration.These computer program instructions can be supplied to logical With computer, the processor of special purpose computer and/or other programmable data processing units so that via computer processor And/or the instruction that performs of other programmable data processing units create be used to implement it is specified in block diagram and/or flow chart block The method of function/action.
Correspondingly, the application can also be implemented with hardware and/or software (including firmware, resident software, microcode etc.).More Further, the application can take computer to can be used or the shape of computer program product on computer readable storage medium Formula there is the computer realized in the medium can be used or computer readable program code, to be made by instruction execution system It is used with or with reference to instruction execution system.In the present context, computer can be used or computer-readable medium can be with It is arbitrary medium, can includes, stores, communicates, transmits or transmit program, is made by instruction execution system, device or equipment It is used with or with reference to instruction execution system, device or equipment.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

  1. A kind of 1. method for carrying out data backup, which is characterized in that this method includes:
    Terminal is restarted, and judges whether the terminal is abnormal crash before the restart;
    If so, the terminal obtains the memory when the residual capacity for determining pluggable storage card is not less than the capacity of memory In in the terminal restart previously stored data;
    The terminal is by the data backup got to the pluggable storage card.
  2. 2. the method as described in claim 1, which is characterized in that the terminal judges that the terminal is being restarted according to following manner It whether is abnormal crash before:
    The terminal detects whether there is the mark that crashes in the first specific region of memory;
    If so, the terminal determines to be abnormal crash before the restart.
  3. 3. the method as described in claim 1, which is characterized in that when the terminal is restarted, judging that the terminal restarting it It is preceding whether to be abnormal before crash, it further includes:
    The terminal determines to be currently at debugging mode.
  4. 4. method as claimed in claim 3, which is characterized in that the terminal determines to be currently at debugging mode, including:
    The terminal judges to identify with the presence or absence of debugging mode in the second specific region of the memory;
    If so, the terminal determines to be currently at debugging mode.
  5. 5. Claims 1 to 4 it is any as described in method, which is characterized in that before the terminal is restarted, further include:
    The terminal determines to be abnormal crash;
    The terminal adds the mark that crashes in the first specific region of memory.
  6. 6. the method as described in claim 1, which is characterized in that this method further includes:
    If it is determined that the residual capacity of the pluggable storage card be less than the memory capacity, the terminal with shake or LED dodge Bright mode notifies user to replace the pluggable storage card.
  7. 7. a kind of terminal, which is characterized in that including:
    At least one processing unit and at least one storage unit, wherein, the storage unit has program stored therein code, works as institute When stating program code and being performed by the processing unit so that the processing unit performs following process:
    When terminal is restarted, judge whether the terminal is abnormal crash before the restart;
    If so, when the residual capacity for determining pluggable storage card is not less than the capacity of memory, obtain in the memory described Terminal restarts previously stored data;
    By the data backup got to the pluggable storage card.
  8. 8. terminal as claimed in claim 7, which is characterized in that the processing unit is specifically used for:
    Judge whether the terminal is abnormal crash before the restart according to following manner:
    Detect whether there is the mark that crashes in the first specific region of memory;If so, determine the terminal before the restart It is abnormal crash.
  9. 9. terminal as claimed in claim 7, which is characterized in that the processing unit is additionally operable to:
    When the terminal is restarted, before judging whether the terminal is abnormal crash before the restart, the end is determined End is currently at debugging mode.
  10. 10. terminal as claimed in claim 9, which is characterized in that the processing unit is specifically used for:
    Judge to identify with the presence or absence of debugging mode in the second specific region of the memory;If so, determine that the terminal is current In debugging mode.
CN201810025829.5A 2018-01-11 2018-01-11 A kind of method and terminal for carrying out data backup Pending CN108228389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810025829.5A CN108228389A (en) 2018-01-11 2018-01-11 A kind of method and terminal for carrying out data backup

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810025829.5A CN108228389A (en) 2018-01-11 2018-01-11 A kind of method and terminal for carrying out data backup

Publications (1)

Publication Number Publication Date
CN108228389A true CN108228389A (en) 2018-06-29

Family

ID=62640957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810025829.5A Pending CN108228389A (en) 2018-01-11 2018-01-11 A kind of method and terminal for carrying out data backup

Country Status (1)

Country Link
CN (1) CN108228389A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631673A (en) * 2012-08-22 2014-03-12 鸿富锦精密工业(深圳)有限公司 Electronic equipment and user operation information backup method
CN107463459A (en) * 2017-08-14 2017-12-12 青岛海信电器股份有限公司 Store method, device, system and the terminal device of system exception internal storage data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631673A (en) * 2012-08-22 2014-03-12 鸿富锦精密工业(深圳)有限公司 Electronic equipment and user operation information backup method
CN107463459A (en) * 2017-08-14 2017-12-12 青岛海信电器股份有限公司 Store method, device, system and the terminal device of system exception internal storage data

Similar Documents

Publication Publication Date Title
CN107447442B (en) Alarm method based on image recognition technology and intelligent device
KR101332815B1 (en) Apparatus and method for handling the rebooting of mobile terminal
CN109522147A (en) A kind of method, apparatus, storage medium and the terminal of record booting exception information
CN103927240A (en) Information dumping method and device answering to software breakdown
CN103336736B (en) System log acquisition method and device
JP4677214B2 (en) Program, method and mechanism for collecting panic dump
CN109426606A (en) Kernel failure diagnosis information processing method, device, storage medium and electronic equipment
CN104809013B (en) A kind of embedded system start method and device
CN112732310A (en) Firmware upgrading method, system, equipment and medium based on embedded boot partition
CN115687035A (en) Memory leak detection method and electronic equipment
CN104216771A (en) Restarting method and device for software program
CN113467981A (en) Exception handling method and device
CN113209630B (en) Frame grabbing defense method and device for game application, storage medium and computer equipment
CN113536320A (en) Error information processing method, device and storage medium
CN105808440A (en) Application low memory test method, apparatus and system
CN108228389A (en) A kind of method and terminal for carrying out data backup
US20070234114A1 (en) Method, apparatus, and computer program product for implementing enhanced performance of a computer system with partially degraded hardware
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
CN105912431A (en) Reboot testing method of server, server, control device and system
KR20160059181A (en) Apparatus and method for controlling updating software of AVN system in vehicle
CN104750579B (en) The method and apparatus for making memory mirror
CN112100017B (en) Memory resource monitoring method and device
CN102053862A (en) Method and device for inspecting material files in instant messenger
CN116089135A (en) Function control method, device, equipment and storage medium
CN107133031B (en) Information display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180629

RJ01 Rejection of invention patent application after publication