CN107656747A - A kind of data updating method and mobile terminal - Google Patents

A kind of data updating method and mobile terminal Download PDF

Info

Publication number
CN107656747A
CN107656747A CN201710802259.1A CN201710802259A CN107656747A CN 107656747 A CN107656747 A CN 107656747A CN 201710802259 A CN201710802259 A CN 201710802259A CN 107656747 A CN107656747 A CN 107656747A
Authority
CN
China
Prior art keywords
data
upgrade command
upgrade
reverse
aku
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.)
Granted
Application number
CN201710802259.1A
Other languages
Chinese (zh)
Other versions
CN107656747B (en
Inventor
缪强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710802259.1A priority Critical patent/CN107656747B/en
Publication of CN107656747A publication Critical patent/CN107656747A/en
Application granted granted Critical
Publication of CN107656747B publication Critical patent/CN107656747B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities

Abstract

The embodiment of the invention discloses a kind of data updating method and mobile terminal.Methods described includes:At least one upgrade command, and at least one reverse upgrade command are obtained from N number of upgrade command;At least one upgrade command is performed for the first data AKU, obtains the second data AKU, and the second data AKU is verified;If verification failure, determining the M upgrade command performed in N number of upgrade command, and M reverse upgrade commands are extracted from the reverse upgrade command of acquisition;The the second data AKU obtained for performing M upgrade command, M reverse upgrade commands are performed successively, the second data AKU that M upgrade command of execution is obtained, revert to the first data AKU before performing M upgrade command.According to embodiments of the present invention, the problem of firmware data is imperfect, mobile terminal can not continue normal operation is avoided.

Description

A kind of data updating method and mobile terminal
Technical field
The present embodiments relate to the communications field, more particularly to a kind of data updating method and mobile terminal.
Background technology
At present, mobile terminal uses OTA (Over-the-Air Technology, over the air) upgrade function pair Mobile terminal firmware carries out data upgrading.When carrying out data upgrading using OTA, typically upgrade server pushes away to mobile terminal AKU is sent, there is upgrade command collection and intermediate data in AKU.After sequentially performing each upgrade command of upgrade command concentration, then One by one using the upgrading original data of data firmware updating;Meanwhile after using intermediate data having upgraded some legacy data, can pin Data after upgrading are verified, next upgrade command is performed if verifying successfully.
If however, in OTA escalation process, hardware fault occurs for mobile terminal, then verification can be caused to fail, so as to whole OTA escalation process can be forced to interrupt.If OTA escalation process is forced to interrupt, because escalation process does not complete, firmware data Imperfect, mobile terminal can not then continue normal operation.Moreover, for a user, mobile terminal can not normal use, can drop The usage experience of low user.
Therefore, the data updating method of prior art there is cause mobile terminal can not normal operation the problem of.Moreover, If data upgrading after mobile terminal can not normal operation, also there is influence Consumer's Experience the problem of.
The content of the invention
The invention provides a kind of data updating method and mobile terminal, causes to move to solve available data upgrade method Terminal can not normal operation the problem of.
In a first aspect, the embodiments of the invention provide a kind of data updating method, it is described mobile whole applied to mobile terminal End includes the first data AKU and N number of upgrade command for upgrading the first data AKU, wherein, N >=1, institute The method of stating includes:
At least one upgrade command, and at least one reverse upgrade command are obtained from N number of upgrade command;
At least one upgrade command is performed for the first data AKU, obtains the second data AKU, and The second data AKU is verified;
If verification failure, determines the M upgrade command performed in N number of upgrade command, and from the reverse of acquisition M reverse upgrade commands are extracted in upgrade command;Wherein, N >=M >=1;
The the second data AKU obtained for performing the M upgrade command, the M are performed successively and is reversely risen Level instruction, the second data AKU for the M upgrade command will be performed obtaining, revert to the execution M upgrade command The first preceding data AKU.
Second aspect, the embodiment of the present invention additionally provide a kind of mobile terminal, and the mobile terminal includes the first data liter Level bag and N number of upgrade command for upgrading the first data AKU, wherein, N >=1, the mobile terminal includes:
Instruction acquisition module, for obtaining at least one upgrade command from N number of upgrade command, and it is at least one Reverse upgrade command;
Instruction performs and correction verification module, for performing at least one upgrade command to the first data AKU, The second data AKU is obtained, and the second data AKU is verified;
Reverse upgrade command extraction module, if failing for verifying, determines the M performed in N number of upgrade command Individual upgrade command, and M reverse upgrade commands are extracted from the reverse upgrade command of acquisition;Wherein, N >=M >=1;
Reverse upgrade command execution module, for the second data liter obtained for performing the M upgrade command Level bag, performs the M reverse upgrade commands successively, the second data AKU that will be performed the M upgrade command and obtain, Revert to the first data AKU before performing the M upgrade command.
The third aspect, on the other hand, the embodiment of the present invention additionally provide a kind of mobile terminal, including processor, memory, The data ROMPaq that can be run on the memory and on the processor is stored in, the data ROMPaq is described The step of above-mentioned data updating method is realized during computing device.
Fourth aspect, the embodiment of the present invention additionally provide a kind of computer-readable recording medium, described computer-readable to deposit Data ROMPaq is stored with storage media, the data ROMPaq realizes above-mentioned data upgrading side when being executed by processor The step of method.
So, according to embodiments of the present invention, by obtaining reverse upgrade command before upgrade command is performed, in mobile terminal Hardware anomalies, occur after performing multiple upgrade commands in the case of verifying failure, perform multiple reverse upgrade commands successively, so as to The data recovery of mobile terminal can be avoided the problem of firmware data is imperfect, mobile terminal can not continue normal operation.
Moreover, in mobile terminal hardware anomalies, performing after multiple upgrade commands in the case of appearance verification failure, movement is eventually End still can improve Consumer's Experience with normal operation.
Brief description of the drawings
Fig. 1 is a kind of step flow chart of data updating method of the embodiment of the present invention one;
Fig. 2 is a kind of step flow chart of data updating method of the embodiment of the present invention two;
Fig. 3 is a kind of updating mobile terminal schematic flow sheet of the embodiment of the present invention;
Fig. 4 is a kind of structured flowchart of mobile terminal of the embodiment of the present invention three;
Fig. 5 is a kind of structured flowchart of mobile terminal of the embodiment of the present invention four;
Fig. 6 is a kind of structured flowchart of mobile terminal of the embodiment of the present invention five.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
Embodiment one
Fig. 1 is a kind of step flow chart of data updating method of the embodiment of the present invention one, and this method is applied to mobile whole End, the mobile terminal include the first data AKU and N number of upgrade command for upgrading the first data AKU, Wherein, N >=1, this method specifically may include steps of:
Step S10, at least one upgrade command, and at least one reversely upgrading are obtained from N number of upgrade command Instruction.
Firstly the need of explanation, above-mentioned mobile terminal can include the terminals such as mobile terminal, tablet personal computer.Above-mentioned First data AKU can be firmware data to be upgraded in mobile terminal.Wherein, the first data AKU can include more Individual first upgrading data.One AKU can be pushed to mobile terminal by upgrade server by OTA technologies.The AKU can With including upgrade command collection.Wherein, upgrade command is concentrated, and includes N number of upgrade command for upgrading the first data AKU.
Mobile terminal can extract upgrade command collection from AKU, then refer to from upgrading after AKU is received Concentration is made to extract N number of upgrade command.
Also include in AKU for writing to the first data AKU to obtain the mediant of the second data AKU According to.
In the specific implementation, upgrade command can be obtained successively from N number of upgrade command.
For example, according to instruction sequence number 1,2,3...N forward sequence, a upgrade command is extracted successively.
After upgrade command is got successively, it can correspondingly obtain reversely upgrading corresponding with the upgrade command and refer to Order.
For example, currently getting i-th of upgrade command, i-th of upgrade command is using the intermediate data specified, by first Some first upgrading data in data AKU are updated to the second upgrading data, obtain the second data AKU, obtain second Data AKU.Therefore, i-th of reverse upgrade command corresponding to i-th of upgrade command, then it is to delete the second upgrading data, And the first original upgrading data are write, so as to which the second data AKU is reverted into the first data AKU.
In another example currently getting i+1 upgrade command, i+1 upgrade command is by the first data AKU Some first upgrading data is deleted, and obtains the second data AKU.Therefore, i+1 corresponding to i+1 upgrade command is reverse Upgrade command, then it is that the first upgrading data that will be deleted are write to original position, so as to which the second data AKU be recovered For the first data AKU.
It is an irreversible escalation process due to performing upgrade command, by the first data AKU liter in practical application Level be the second data AKU after, can not restore as the first data AKU.Therefore, can before upgrade command is performed, The first upgrading data pointed by the upgrade command that will be performed are backed up, so as to which in verification failure, execution, reversely upgrading refers to When making, reverse upgrade command can call the first of backup to upgrade data and carry out data recovery.
Step S11, at least one upgrade command is performed for the first data AKU, obtains the second data liter Level bag, and the second data AKU is verified.
In the specific implementation, the upgrade command extracted can point to some first ascending series in the first data AKU According to, the upgrade command is performed, then can use some intermediate data, the first upgrading data are updated to the second upgrading data, from And obtain the second data AKU.The second obtained data AKU can be directed to be verified.
The mode of verification can have a variety of.For example, performing i-th of upgrade command for some first upgrading data obtains the After two upgrading data, SHA codes (Secure HashAlgorithm, the secure Hash calculation of the second upgrading data can be calculated Method), the SHA codes that will be calculated, matched with default standard SHA codes in i-th of upgrade command, if matching, judges Verify successfully, if mismatching, judge verification failure.Whether thus, it is possible to it is complete and correct to verify write-in data.Wherein, should The SHA codes of standard, SHA codes can be precalculated for the second upgrading data by upgrade server and obtained.
In practical application, those skilled in the art can use other a variety of verification modes, with verification write-in data be No complete and correct, for reference, the embodiment of the present invention is not restricted above example to this.
It if verifying successfully, can continue from N number of upgrade command, obtain next upgrade command successively, and it is next Individual reverse upgrade command, and next upgrade command is continued executing with, until N number of upgrade command is finished, or, until occurring Untill the situation for verifying failure.
If verification failure, performs step S12.
Step S12, if verification failure, determines the M upgrade command performed in N number of upgrade command, and from obtaining M reverse upgrade commands are extracted in the reverse upgrade command taken;Wherein, N >=M >=1.
Firstly the need of explanation, verified for the second data AKU, it may appear that verify successfully or verification is lost Situation about losing.And DDR (Double Data Rate SDRAM, Double Data Rate internal memory), the EMMC ((Embedded of mobile terminal Multi Media Card, embedded multi-media card), CPU (Central Processing Unit, central processing unit) etc. it is hard When the internal operation of part is unstable, verification can be caused to fail.More specifically, mobile terminal hardware internal operation is unstable to cause school The reason for testing unsuccessfully has aspect.
On the one hand, it is the hardware such as DDR, EMMC, CPU of mobile terminal during upgrade command, write-in data is performed Internal operation it is unstable, cause write data failure, therefore, after some upgrade command is performed, resulting second upgrade Data are incorrect or imperfect, and the check value of gained is calculated for the incorrect or incomplete second upgrading data, and advance The criteria check value of gained is calculated for correct or complete second upgrading data and is mismatched, therefore can verify failure.It is another Aspect, it is in checking procedure is carried out, the internal operation of the hardware such as DDR, EMMC, CPU of mobile terminal is unstable, even if correctly Check value is calculated with the complete second upgrading data, resulting check value may malfunction, and error check value and advance pin The criteria check value of gained is calculated to correct and complete second upgrading data and mismatched, therefore failure can be verified.
In embodiments of the present invention, if after M upgrade command, the second resulting data AKU verification failure can So that upgrading flow to be interrupted, and the current M upgrade command performed is determined, and, M reverse upgrade commands.Due to this In inventive embodiments, when obtaining upgrade command successively, then reverse upgrade command can be accordingly obtained, therefore, when having obtained simultaneously M upgrade command is performed, currently then correspondingly gets M reverse upgrade commands.
Step S13, the second data AKU obtained for performing the M upgrade command, performs the M successively Individual reverse upgrade command, the second data AKU for the M upgrade command will be performed obtaining, revert to perform it is described M The first data AKU before upgrade command.
In the specific implementation, after due to performing one or more upgrade commands, one or more first upgrades data can be by more It is new to upgrade data for second, i.e. it may include the second upgrading data of one or more in the second data AKU.It is directed to It is in second data AKU, performed multiple second upgradings data obtained by M upgrade command, can according to execution The forward sequence of institute's foundation opposite reverse sequence during M upgrade command, M reverse upgrade commands are performed successively, so as to by the Two data AKUs revert to the first data AKU.After reversely upgrade command is finished at M, upgrading stream can be exited Journey.The recovered original state to before upgrading of mobile terminal, and it is based on complete firmware data normal operation.
According to embodiments of the present invention, by obtaining reverse upgrade command before upgrade command is performed, in mobile terminal hardware In the case of there is verification failure after abnormal, the multiple upgrade commands of execution, multiple reverse upgrade commands are performed successively, so as to By the data recovery of mobile terminal, the problem of firmware data is imperfect, mobile terminal can not continue normal operation is avoided.
Moreover, in mobile terminal hardware anomalies, performing after multiple upgrade commands in the case of appearance verification failure, movement is eventually End still can improve Consumer's Experience with normal operation.
Embodiment two
Fig. 2 is a kind of step flow chart of data updating method of the embodiment of the present invention two, and this method is applied to mobile whole End, the mobile terminal include the first data AKU and N number of upgrade command for upgrading the first data AKU, Wherein, N >=1, this method specifically may include steps of:
Step S20, at least one upgrade command, and at least one reversely upgrading are obtained from N number of upgrade command Instruction.
In practical application, after the OTA AKUs that upgrade server is pushed by OTA technologies are received, mobile terminal can To obtain the data volume of the OTA AKUs.Then obtain in mobile terminal /amount of storage of data partition spaces, judgement/data Whether the amount of storage of partition space meets the data volume of AKU enough.If satisfied, then AKU is stored to/data subregions sky Between, if not satisfied, AKU can then be stored into the memory headroom of mobile terminal.
Alternatively, the first data AKU includes the multiple first upgrading data, described from N number of upgrade command After the step of middle acquisition at least one upgrade command, methods described also includes:
Determine the first upgrading data that at least one upgrade command is pointed to;
Obtain the first store path of the first upgrading data that at least one upgrade command is pointed to;
The first upgrading data that at least one upgrade command is pointed to back up to the second store path.
Parsed in the specific implementation, the upgrade command got can be directed to, determine the upgrade command is pointed to first Ascending series are according to this and current first store path in the terminal of the first upgrading data.
For example, include field " apply_patch (/system/app/CalendarImporter/ in upgrade command CalendarImporter.apk) ", the first upgrading data that will upgrade can be got according to the field " CalendarImporter.apk " and its first store path "/system/app/CalendarImporter/ ".
, can be by the first ascending series after the first upgrading data of upgrade command sensing and its first store path is got Another memory space of mobile terminal is backed up to according to from the first store path, is deposited in the path of institute's back up memory space as second Store up path.In practical application, the data volume for the first upgrading data that will be backed up can be calculated, is being distributed according to the data volume The memory space of corresponding size.
Alternatively, methods described can also include:
Obtain the disposal ability information of the mobile terminal;
According to the multiple processing threads of the disposal ability information configuration of the mobile terminal;
For the multiple processing thread distribution thread task;The thread task includes referring at least one upgrading Order point to first upgrading data back up to the second store path, and, for the first data AKU perform described in extremely A few upgrade command, obtains the second data AKU;
The thread task distributed according to the multiple processing thread, establish the incidence relation of the multiple processing thread;
For the incidence relation of the multiple processing thread, the multiple priority level for handling thread is determined;
According to the priority level of the multiple processing thread, start the multiple processing thread successively.
In practical application, increase reading and the operation of Backup Data in original upgrading flow, upgrading may be increased The spent time.Therefore, in embodiments of the present invention, the disposal ability information of mobile terminal can be determined first, according to this The multiple processing threads of disposal ability information configuration, and for the plurality of processing thread distribution thread task, with by multiple processing lines Journey individually performs upgrade command or performs backup operation.For example, obtaining the CPU core number of mobile terminal, matched somebody with somebody according to CPU core number Several threads are put, handle operation and the backup operation for performing upgrade command respectively by several threads.So as to reduce reading Take, the time spent by Backup Data.
In practical application, multiple thread tasks for handling threads and being distributed, it may be operated for same data.Cause This, can set the incidence relation between processing thread, and the priority level of each processing thread is determined according to the incidence relation, and Start the higher processing thread of priority level, by its preferential thread task for performing distribution, restart the relatively low place of priority level Thread is managed, performs the thread task of its distribution.
Alternatively, the step of acquisition at least one reverse upgrade command, including:
Step a, extract the positive operation order of at least one upgrade command;
Step b, for the positive operation order, generate reverse operating order;
Step c, using the reverse operating order, first store path and second store path, generate institute State at least one reverse upgrade command.
Firstly the need of explanation, upgrade command includes positive operation order.In practical application, there can be different behaviour Make the positive operation order of type.Generally, the action type of positive operation order, can include:Write operation order, delete Operational order, moving operation order and renaming operational order.The positive operation order of performed upgrade command is because of action type Difference, then it can accordingly perform different updating operations.
For example, performed upgrade command includes write operation order, it indicates that is referred to using the intermediate data renewal specified First upgrading data of the first fixed store path, obtain the second upgrading data.
In another example performed upgrade command includes deletion action order, it indicates that is deleted in the first specified store path Except the first upgrading data.
In another example performed upgrade command includes moving operation order, it indicates that by the first upgrading data from current First store path is moved to other specified store paths.
In another example performed upgrade command includes renaming operational order, it indicates that by the of specified store path The data name that one upgrading data RNTO is specified.
The positive operation order of different operating type is directed to, corresponding reverse operating order can be generated.Wherein, for The positive operation orders such as write operation order, deletion action order, moving operation order and renaming, it can generate respectively reversely Write operation order, anti-deletion action order, the reverse movement reverse operating order such as operational order and reverse naming operation order.
For example, reversely write operation order, it indicates that delete the second upgrading data from the first store path, and from second The first upgrading data that store path extraction is backed up in advance, and the first upgrading data are write into the first store path.
In another example anti-deletion action order, it indicates that the first upgrading data backed up in advance from the extraction of the second store path, And the first upgrading data are write to the first store path.
In another example reverse movement operational order, it indicates that the first upgrading data are deleted in the specified store path of others, from The first upgrading data that the extraction of second store path is backed up in advance, and the first upgrading data are write to the first store path.
In another example reverse naming operation order, it indicates that data are upgraded to first in the first store path, by it again It is named as original data name.
After reverse operating order is generated for positive operation order, reverse operating order, the first ascending series can be used According to the first current store path, the second store path of the first upgrading data backup, reverse upgrade command is generated.Practical application In, in the reverse upgrade command such as comprising reverse naming operation order, due to not being related to upgrading data by the first of backup Recover, therefore in the reverse upgrade command, the second store path of the first upgrading data backup can not be related to, and only wrap Reverse operating order and the first store path are included, it is reverse so as to be carried out for the first upgrading data on the first store path Name.
Step S21, at least one upgrade command is performed for the first data AKU, obtains the second data liter Level bag, and the second data AKU is verified.
Alternatively, the N upgrade commands are respectively directed to multiple default intermediate data, described to be directed to the first data liter Level bag performs at least one upgrade command, the step of obtaining the second data AKU, including:
Step d, obtain the intermediate data that at least one upgrade command is pointed to;
Step e, using in intermediate data renewal the first upgrading data, the second upgrading data are obtained, and use The second upgrading data form the second data AKU.
In the specific implementation, when performing upgrade command, the intermediate data of upgrade command sensing can be obtained, is then used Intermediate data renewal the first upgrading data, obtain the second upgrading data, so as to obtain including the second of the second upgrading data Data AKU.
For example, include field " apply_patch (/system/app/CalendarImporter/ in upgrade command ) " and " package_extract_file (" patch/system/app/ CalendarImporter.apk CalendarImporter/CalendarImporter.apk.p ") ", indicated according to the field, perform write operation order, will Intermediate data " patch/system/app/CalendarImporter/CalendarImporter.apk.p " in AKU Write to the first upgrading data "/system/app/CalendarImporter/ in the first data AKU In CalendarImporter.apk ", the second upgrading data are updated to, so as to obtain the second data AKU.
Alternatively, at least one upgrade command includes default first check value, described to the second data liter The step of level bag is verified, including:
Step f, calculate the second check value of the second upgrading data of the second data AKU;
Step g, judges whether second check value matches with first check value, if so, step h is then performed, if It is no, then perform step i;
Step h, judgement verify successfully;
Step i, judge verification failure.
In the specific implementation, after upgrade command is performed, can obtain for default first check value of the upgrade command, and Second check value of the second upgrading data obtained by after the calculating execution upgrade command, by the first check value and the second check value It is compared, if matching, judgement verifies successfully, shows that the upgrade command runs succeeded, and the resulting second upgrading data are just It is really and complete.If mismatching, verification failure is judged, show that the upgrade command performs failure, the resulting second upgrading data It is incorrect or imperfect.
For example, include field " apply_patch ("/system/app/CalendarImporter/ in upgrade command CalendarImporter.apk","-",32693,c7cd0965c006af60c9c3caaa36d16879170280ae, package_extract_file("patch/system/app/CalendarImporter/ CalendarImporter.apk.p ")) ", wherein, " c7cd0965c006af60c9c3caaa36d16879170280ae " is The standard SHA codes for precalculating to obtain for the second upgrading data;By the intermediate data " patch/system/ in AKU The first upgrading data of app/CalendarImporter/CalendarImporter.apk.p " renewals "/system/app/ CalendarImporter/CalendarImporter.apk ", after obtaining the second upgrading data, calculate the second upgrading data SHA codes, by obtained SHA codes compared with standard SHA codes, if matching, judgement verify successfully, if mismatch, judge school Test failure.
Step S22, if verifying successfully, at least one upgrade command is obtained from N number of upgrade command described in return, with And at least one reversely upgrade command, perform at least one upgrade command for the first data AKU and obtain second Data AKU and the step of verified to the second data AKU, until N number of upgrade command be finished or Judge the second data AKU verification failure.
In the specific implementation, performing upgrade command, the resulting second upgrading data school for some first upgrading data It when testing successfully, can continue from N number of upgrade command, obtain next upgrade command successively, and it is next anti-corresponding to acquisition To upgrade command, the upgrade command got is continued executing with, and for the second upgrading data resulting after execution upgrade command Verified, until N number of upgrade command is finished, or, there is the situation of verification failure.
In practical application, the upgrade command for not generating the second upgrading data is directed to, is performed in the part upgrade command Afterwards, it can need not be verified, but continue executing with next upgrade command, until having the second upgrading data, then pin Caused second upgrading data are verified.
Step S23, if verification failure, determines the M upgrade command performed in N number of upgrade command, and from obtaining M reverse upgrade commands are extracted in the reverse upgrade command taken;Wherein, N >=M >=1.
Alternatively, the mobile terminal also includes reverse upgrade command collection, is obtained described from N number of upgrade command After at least one upgrade command, and the step of at least one reverse upgrade command, methods described also includes:
At least one reversely upgrade command of acquisition is added to the reversely upgrade command collection;
When having performed the M upgrade command, the reversely upgrade command collection includes M reverse upgrade commands, institute The step of M reverse upgrade commands are extracted from the reverse upgrade command of acquisition is stated, including:
Step j, extract the M reverse upgrade commands that upgrade command is concentrated described reversely.
In the specific implementation, when getting reverse upgrade command corresponding with one or more upgrade commands, can be by it Added to reverse upgrade command collection.So as to, when obtaining and performing M upgrade command, M reverse upgrade commands will be got, And there are M reverse upgrade commands to be concentrated added to reverse upgrade command., then can be from reverse upgrade command collection when verifying failure In, extract M reverse upgrade commands.
Step S24, the second data AKU obtained for performing the M upgrade command, performs the M successively Individual reverse upgrade command, the second data AKU for the M upgrade command will be performed obtaining, revert to perform it is described M The first data AKU before upgrade command.
In the specific implementation, can according to the opposite reverse sequence of the forward sequence with performing M upgrade command when institute foundation, M reverse upgrade commands are performed successively.
For example, when performing M upgrade command, performed successively according to instruction sequence number 1,2,3...M forward sequence, When performing M reverse upgrade commands, then it can be held successively according to the reverse sequence of reverse instruction sequence number M, M-1, M-2...3,2,1 M reverse upgrade commands of row., then can be whole by the have backed up first upgrading data after M reverse upgrade commands are performed Write-in is to original store path, so as to by the second data AKU resulting after M upgrade command of execution, revert to and hold The first data AKU before row M upgrade commands.
After reversely upgrade command is finished at M, upgrading flow can be exited.Furthermore, it is possible to first liter by backup DBMS, deleted from the second store path.Reverse upgrade command can also be concentrated M reversely delete by upgrade command.
According to embodiments of the present invention, by obtaining at least one upgrade command, and acquisition pair successively from N number of upgrade command The reverse upgrade command answered, avoid it is disposable obtain it is whole, the reverse upgrading for recovering data is not used to during failure verifying Instruction, so as to avoid wasting the process resource of mobile terminal.
Deeply understand the embodiment of the present invention for the ease of those skilled in the art, enter below with reference to Fig. 3 specific example Row explanation.
Fig. 3 is a kind of updating mobile terminal schematic flow sheet of the embodiment of the present invention.It can be seen that receiving OTA After AKU, start OTA upgrading flows.
First, when mobile terminal /data partition spaces store OTA AKUs enough, OTA AKUs are stored in/ Data partition spaces.
Then, from N number of upgrade command in OTA AKUs, m-th upgrade command is extracted, and refer to according to m-th upgrading Order, the first upgrading data pointed by m-th upgrade command, will upgrading are extracted from the first data AKU.Wherein, N For positive integer, N represents the total number of the current OTA upgrade command during upgrading to be performed;M=1,2,3...N.Can be backed up One upgrading data, and correspond to m-th upgrade command, generate the reverse upgrade command of m-th.
, can be with m-th upgrade command after the upgrading data of backup first and the generation reverse upgrade command of m-th.Holding After row m-th upgrade command, verified for the second upgrading data of generation.
If verifying successfully, determine whether N number of upgrade command is finished, if so, then upgrading flow terminates, if It is no, then continue from N number of upgrade command, extract the M+1 upgrade command, and back up pointed by the M+1 upgrade command, general The the first upgrading data to be upgraded, and according to the M+1 upgrade command, M+1 reverse upgrade commands of generation, until N number of liter Level instruction is finished.
If verification failure, starts to perform reverse upgrade command.Specifically, refer to according to reverse upgrade command M, reverse upgrading M-1, the reverse sequence of the reverse upgrade commands 1 of reverse upgrade command M-2... are made, M reverse upgrade commands are performed successively, until M Individual reversely upgrade command is finished.
Embodiment three
Fig. 4 is a kind of structured flowchart of mobile terminal of the embodiment of the present invention three, and the mobile terminal 300 includes the first number According to AKU and N number of upgrade command for upgrading the first data AKU, wherein, N >=, the mobile terminal 300 Following module can specifically be included:
Instruction acquisition module 301, for obtaining at least one upgrade command from N number of upgrade command, and at least One reverse upgrade command;
Instruction performs and correction verification module 302, refers to for performing at least one upgrading to the first data AKU Order, obtains the second data AKU, and the second data AKU is verified;
Reverse upgrade command extraction module 303, if for verifying failing, determines to have performed in N number of upgrade command M upgrade command, and M reverse upgrade commands are extracted from the reverse upgrade command of acquisition;Wherein, N >=M >=1;
Reverse upgrade command execution module 304, for second data obtained for performing the M upgrade command AKU, the M reverse upgrade commands are performed successively, the second data upgrading that will be performed the M upgrade command and obtain Bag, revert to the first data AKU before performing the M upgrade command.
According to embodiments of the present invention, by obtaining reverse upgrade command before upgrade command is performed, in mobile terminal hardware In the case of there is verification failure after abnormal, the multiple upgrade commands of execution, multiple reverse upgrade commands are performed successively, so as to By the data recovery of mobile terminal, the problem of firmware data is imperfect, mobile terminal can not continue normal operation is avoided.
Moreover, in mobile terminal hardware anomalies, performing after multiple upgrade commands in the case of appearance verification failure, movement is eventually End still can improve Consumer's Experience with normal operation.
Example IV
Fig. 5 is a kind of structured flowchart of mobile terminal of the embodiment of the present invention four, and the mobile terminal 400 includes the first number According to AKU and N number of upgrade command for upgrading the first data AKU, wherein, N >=, the mobile terminal 400 Following module can specifically be included:
Instruction acquisition module 401, for obtaining at least one upgrade command from N number of upgrade command, and at least One reverse upgrade command.
Instruction performs and correction verification module 402, refers to for performing at least one upgrading to the first data AKU Order, obtains the second data AKU, and the second data AKU is verified.
Module 403 is returned, if for verifying successfully, at least one liter is obtained from N number of upgrade command described in return Level instruction, and it is at least one reversely upgrade command, for the first data AKU perform it is described it is at least one upgrading refer to So that to the second data AKU and the step of verified to the second data AKU, until N number of upgrade command It is finished or judges that the second data AKU verification fails.
Reverse upgrade command extraction module 404, if for verifying failing, determines to have performed in N number of upgrade command M upgrade command, and M reverse upgrade commands are extracted from the reverse upgrade command of acquisition;Wherein, N >=M >=1.
Reverse upgrade command execution module 405, for second data obtained for performing the M upgrade command AKU, the M reverse upgrade commands are performed successively, the second data upgrading that will be performed the M upgrade command and obtain Bag, revert to the first data AKU before performing the M upgrade command.
Alternatively, the mobile terminal 400 also includes reverse upgrade command collection, and the mobile terminal 400 can also include:
Reverse instruction add module, at least one reversely upgrade command of acquisition reversely to be risen added to described Level instruction set;
When having performed the M upgrade command, the reversely upgrade command collection includes M reverse upgrade commands, institute Reverse upgrade command extraction module is stated, including:
Reverse upgrade command extracting sub-module, for extracting the M reverse upgrade commands that upgrade command is concentrated described reversely.
Alternatively, the first data AKU includes the multiple first upgrading data, and the mobile terminal 400 can be wrapped also Include:
Data determining module, the first upgrading data pointed to for determining at least one upgrade command;
Store path acquisition module, the first of the first upgrading data pointed to for obtaining at least one upgrade command Store path;
Backup module, the first upgrading data at least one upgrade command to be pointed to back up to the second storage road Footpath.
Alternatively, the instruction acquisition module 401, can be specifically included:
Positive operation order extracting sub-module, for extracting the positive operation order of at least one upgrade command;
Reverse operating order generates submodule, for for the positive operation order, generating reverse operating order;
Reverse upgrade command generation submodule, for using the reverse operating order, first store path and institute The second store path is stated, generates at least one reverse upgrade command.
Alternatively, N number of upgrade command is respectively directed to multiple default intermediate data, and the instruction performs and calibration mode Block 402, it can specifically include:
Intermediate data acquisition submodule, the intermediate data pointed to for obtaining at least one upgrade command;
Intermediate data handles submodule, for using intermediate data renewal the first upgrading data, obtaining second Upgrade data, and the second data AKU is formed using the described second upgrading data.
Alternatively, at least one upgrade command includes default first check value, and the instruction performs and calibration mode Block 402, it can specifically include:
Check value calculating sub module, for calculating the second verification of the second upgrading data in the second data AKU Value;
Check value judging submodule, for judging whether second check value matches with first check value;
Judging submodule is verified, for judging to verify successfully or judging verification failure.
Alternatively, the mobile terminal 400 can also include:
Data obtaining module, for obtaining the disposal ability information of the mobile terminal;
Thread configuration module, for the multiple processing threads of disposal ability information configuration according to the mobile terminal;
Task allocating module, for for the multiple processing thread distribution thread task;The thread task includes will The first upgrading data that at least one upgrade command is pointed to back up to the second store path, and, for the described first number At least one upgrade command is performed according to AKU, obtains the second data AKU;
Incidence relation establishes module, for the thread task distributed according to the multiple processing thread, establishes described more The incidence relation of individual processing thread;
Priority level determining module, for the incidence relation for the multiple processing thread, determine the multiple processing The priority level of thread;
Thread starting module, for the priority level according to the multiple processing thread, start the multiple processing successively Thread.
According to embodiments of the present invention, by obtaining at least one upgrade command, and acquisition pair successively from N number of upgrade command The reverse upgrade command answered, avoid the disposable process resource for obtaining whole reverse upgrade commands, saving mobile terminal.
Embodiment five
Fig. 6 is a kind of structured flowchart of mobile terminal of the embodiment of the present invention five.Mobile terminal 500 shown in Fig. 6 includes: At least one processor 501, memory 502, at least one network interface 504 and other users interface 503.Mobile terminal 500 In each component be coupled by bus system 505.It is understood that bus system 505 is used to realize between these components Connection communication.Bus system 505 is in addition to including data/address bus, in addition to power bus, controlling bus and status signal are total Line.But for the sake of clear explanation, various buses are all designated as bus system 505 in figure 6.
Wherein, user interface 503 can include display, keyboard or pointing device (for example, mouse, trace ball (trackball), touch-sensitive plate or touch-screen etc..
It is appreciated that the memory 502 in the embodiment of the present invention can be volatile memory or nonvolatile memory, Or it may include both volatibility and nonvolatile memory.Wherein, nonvolatile memory can be read-only storage (Read- OnlyMemory, ROM), programmable read only memory (ProgrammableROM, PROM), Erasable Programmable Read Only Memory EPROM (ErasablePROM, EPROM), Electrically Erasable Read Only Memory (ElectricallyEPROM, EEPROM) dodge Deposit.Volatile memory can be random access memory (RandomAccessMemory, RAM), and it is used as outside slow at a high speed Deposit.By exemplary but be not restricted explanation, the RAM of many forms can use, such as static RAM (StaticRAM, SRAM), dynamic random access memory (DynamicRAM, DRAM), Synchronous Dynamic Random Access Memory (SynchronousDRAM, SDRAM), double data speed synchronous dynamic RAM (DoubleDataRate SDRAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), synchronized links Dynamic random access memory (SynchlinkDRAM, SLDRAM) and direct rambus random access memory (DirectRambusRAM, DRRAM).The memory 502 of the system and method for description of the embodiment of the present invention is intended to include but unlimited In these memories with any other suitable type.
In some embodiments, memory 502 stores following element, can perform module or data structure, or Their subset of person, or their superset:Operating system 5021 and application program 5022.
Wherein, operating system 5021, comprising various system programs, such as ccf layer, core library layer, driving layer etc., it is used for Realize various basic businesses and the hardware based task of processing.Application program 5022, include various application programs, such as media Player (MediaPlayer), browser (Browser) etc., for realizing various applied business.Realize embodiment of the present invention side The program of method may be embodied in application program 5022.
In embodiments of the present invention, the mobile terminal 500 includes the first data AKU and for upgrading described the N number of upgrade command of one data AKU, wherein, N >=1, mobile terminal 500 also includes:It is stored on the memory 501 simultaneously The data ROMPaq that can be run on the processor 501, when the data ROMPaq is performed by the processor 501, Realize following steps:
At least one upgrade command, and at least one reverse upgrade command are obtained from N number of upgrade command;
At least one upgrade command is performed for the first data AKU, obtains the second data AKU, and The second data AKU is verified;
If verification failure, determines the M upgrade command performed in N number of upgrade command, and from the reverse of acquisition M reverse upgrade commands are extracted in upgrade command;Wherein, N >=M >=1;
The the second data AKU obtained for performing the M upgrade command, the M are performed successively and is reversely risen Level instruction, the second data AKU for the M upgrade command will be performed obtaining, revert to the execution M upgrade command The first preceding data AKU.
The method that the embodiments of the present invention disclose can apply in processor 501, or be realized by processor 501. Processor 501 is probably a kind of IC chip, has the disposal ability of signal.In implementation process, the above method it is each Step can be completed by the integrated logic circuit of the hardware in processor 501 or the instruction of software form.Above-mentioned processing Device 501 can be general processor, digital signal processor (DigitalSignalProcessor, DSP), application specific integrated circuit (ApplicationSpecificIntegratedCircuit, ASIC), ready-made programmable gate array (FieldProgrammableGateArray, FPGA) either other PLDs, discrete gate or transistor logic Device, discrete hardware components.It can realize or perform disclosed each method, step and the box in the embodiment of the present invention Figure.General processor can be microprocessor or the processor can also be any conventional processor etc..With reference to the present invention The step of method disclosed in embodiment, can be embodied directly in hardware decoding processor and perform completion, or use decoding processor In hardware and software module combination perform completion.Software module can be located at random access memory, and flash memory, read-only storage can In the ripe storage medium in this area such as program read-only memory or electrically erasable programmable memory, register.The storage Medium is located at memory 502, and processor 501 reads the information in memory 502, and the step of the above method is completed with reference to its hardware Suddenly.
It is understood that the embodiment of the present invention description these embodiments can use hardware, software, firmware, middleware, Microcode or its combination are realized.Realized for hardware, processing unit can be realized in one or more application specific integrated circuits (ApplicationSpecificIntegratedCircuits, ASIC), digital signal processor (DigitalSignalProcessing, DSP), digital signal processing appts (DSPDevice, DSPD), programmable logic device (ProgrammableLogicDevice, PLD), field programmable gate array (Field-ProgrammableGateArray, FPGA), general processor, controller, microcontroller, microprocessor, other electronic units for performing the application function or During it is combined.
Realize, can be realized by performing the module (such as process, function etc.) of function of the embodiment of the present invention for software The technology of the embodiment of the present invention.Software code is storable in memory and passes through computing device.Memory can handled Realized in device or outside processor.
Alternatively, when the data ROMPaq is performed by the processor 501, following steps can also be realized:
If verifying successfully, at least one upgrade command, and at least one are obtained from N number of upgrade command described in return Individual reversely upgrade command, perform at least one upgrade command for the first data AKU and obtain the upgrading of the second data Wrap and the step of verified to the second data AKU, until N number of upgrade command is finished or described in judging The verification failure of second data AKU.
Alternatively, the mobile terminal also includes reverse upgrade command collection, and the data ROMPaq is by the processor During 501 execution, following steps can also be realized:
At least one reversely upgrade command of acquisition is added to the reversely upgrade command collection;
When having performed the M upgrade command, the reversely upgrade command collection includes M reverse upgrade commands, institute The step of M reverse upgrade commands are extracted from the reverse upgrade command of acquisition is stated, including:
Extract the M reverse upgrade commands that upgrade command is concentrated described reversely.
Alternatively, the first data AKU includes the multiple first upgrading data, and the data ROMPaq is described When processor 501 performs, following steps can also be realized:
Determine the first upgrading data that at least one upgrade command is pointed to;
Obtain the first store path of the first upgrading data that at least one upgrade command is pointed to;
The first upgrading data that at least one upgrade command is pointed to back up to the second store path.
Alternatively, when the data ROMPaq is performed by the processor 501, following steps can also be realized:
Extract the positive operation order of at least one upgrade command;
For the positive operation order, reverse operating order is generated;
Using the reverse operating order, first store path and second store path, described in generation at least One reverse upgrade command.
Alternatively, the N upgrade commands are respectively directed to multiple default intermediate data, and the data ROMPaq is described When processor 501 performs, following steps can also be realized:
Obtain the intermediate data that at least one upgrade command is pointed to;
Using intermediate data renewal the first upgrading data, the second upgrading data are obtained, and use described second Upgrading data form the second data AKU.
Alternatively, at least one upgrade command includes default first check value, and the data ROMPaq is by institute When stating the execution of processor 501, following steps can also be realized:
Calculate the second check value of the second upgrading data in the second data AKU;
Judge whether second check value matches with first check value;
If so, then judge to verify successfully;
If it is not, then judge verification failure.
Alternatively, when the data ROMPaq is performed by the processor 501, following steps can also be realized:
Obtain the disposal ability information of the mobile terminal;
According to the multiple processing threads of the disposal ability information configuration of the mobile terminal;
For the multiple processing thread distribution thread task;The thread task includes referring at least one upgrading Order point to first upgrading data back up to the second store path, and, for the first data AKU perform described in extremely A few upgrade command, obtains the second data AKU;
The thread task distributed according to the multiple processing thread, establish the incidence relation of the multiple processing thread;
For the incidence relation of the multiple processing thread, the multiple priority level for handling thread is determined;
According to the priority level of the multiple processing thread, start the multiple processing thread successively.
It should be noted that mobile terminal 500 provided in an embodiment of the present invention can realize above-described embodiment one and implement Each process steps of data updating method in example two, its operation principle and mode are corresponding to be applicable, and is repeated no more here.
In embodiments of the present invention, by obtaining reverse upgrade command before upgrade command is performed, in mobile terminal hardware In the case of there is verification failure after abnormal, the multiple upgrade commands of execution, multiple reverse upgrade commands are performed successively, so as to By the data recovery of mobile terminal, the problem of firmware data is imperfect, mobile terminal can not continue normal operation is avoided.And And in mobile terminal hardware anomalies, perform after multiple upgrade commands and verification failure occur in the case of, mobile terminal still can be with Normal operation, improve Consumer's Experience.
Those of ordinary skill in the art it is to be appreciated that with reference to disclosed in the embodiment of the present invention embodiment description it is each The unit and algorithm steps of example, it can be realized with the combination of electronic hardware or computer software and electronic hardware.These Function is performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme.Specialty Technical staff can realize described function using distinct methods to each specific application, but this realization should not Think beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In embodiment provided herein, it should be understood that disclosed apparatus and method, others can be passed through Mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, is only A kind of division of logic function, can there is an other dividing mode when actually realizing, for example, multiple units or component can combine or Person is desirably integrated into another system, or some features can be ignored, or does not perform.Another, shown or discussed is mutual Between coupling or direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, device or unit Connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.
If the function is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can be with It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words The part to be contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, including some instructions are causing a computer equipment (can be People's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the present invention. And foregoing storage medium includes:USB flash disk, mobile hard disk, ROM, RAM, magnetic disc or CD etc. are various can be with store program codes Medium.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.

Claims (18)

1. a kind of data updating method, applied to mobile terminal, it is characterised in that the mobile terminal upgrades including the first data Bag and N number of upgrade command for upgrading the first data AKU, wherein, N >=1, methods described includes:
At least one upgrade command, and at least one reverse upgrade command are obtained from N number of upgrade command;
At least one upgrade command is performed for the first data AKU, obtains the second data AKU, and to institute The second data AKU is stated to be verified;
If verification failure, determines the M upgrade command performed in N number of upgrade command, and from the reverse upgrading of acquisition M reverse upgrade commands are extracted in instruction;Wherein, N >=M >=1;
The the second data AKU obtained for performing the M upgrade command, the M reverse upgradings are performed successively and are referred to Order, the second data AKU for the M upgrade command will be performed obtaining, before reverting to the execution M upgrade command First data AKU.
2. according to the method for claim 1, it is characterised in that the second data AKU verified described After step, methods described also includes:
If verifying successfully, at least one upgrade command is obtained described in return from N number of upgrade command, and it is at least one anti- Performed to upgrade command, for the first data AKU at least one upgrade command obtain the second data AKU, And the step of being verified to the second data AKU, until N number of upgrade command is finished or judged described the The verification failure of two data AKUs.
3. according to the method for claim 1, it is characterised in that the mobile terminal also includes reverse upgrade command collection, It is described to obtain at least one upgrade command from N number of upgrade command, and the step of at least one reverse upgrade command it Afterwards, methods described also includes:
At least one reversely upgrade command of acquisition is added to the reversely upgrade command collection;
When having performed the M upgrade command, the reversely upgrade command collection includes M reverse upgrade commands, it is described from The step of M reverse upgrade commands are extracted in the reverse upgrade command obtained, including:
Extract the M reverse upgrade commands that upgrade command is concentrated described reversely.
4. according to the method for claim 1, it is characterised in that the first data AKU includes multiple first ascending series According to after described the step of obtaining at least one upgrade command from N number of upgrade command, methods described also includes:
Determine the first upgrading data that at least one upgrade command is pointed to;
Obtain the first store path of the first upgrading data that at least one upgrade command is pointed to;
The first upgrading data that at least one upgrade command is pointed to back up to the second store path.
5. according to the method for claim 4, it is characterised in that described the step of obtaining at least one reverse upgrade command, Including:
Extract the positive operation order of at least one upgrade command;
For the positive operation order, reverse operating order is generated;
It is described at least one using the reverse operating order, first store path and second store path, generation Reverse upgrade command.
6. according to the method for claim 4, it is characterised in that the N upgrade commands are respectively directed to multiple default centres Data, it is described to perform at least one upgrade command for the first data AKU, obtain the second data AKU Step, including:
Obtain the intermediate data that at least one upgrade command is pointed to;
Using intermediate data renewal the first upgrading data, the second upgrading data are obtained, and using the described second upgrading Data form the second data AKU.
7. according to the method for claim 6, it is characterised in that at least one upgrade command includes default first school Test value, described the step of being verified to the second data AKU, including:
Calculate the second check value of the second upgrading data in the second data AKU;
Judge whether second check value matches with first check value;
If so, then judge to verify successfully;
If it is not, then judge verification failure.
8. according to the method for claim 4, it is characterised in that methods described also includes:
Obtain the disposal ability information of the mobile terminal;
According to the multiple processing threads of the disposal ability information configuration of the mobile terminal;
For the multiple processing thread distribution thread task;The thread task includes referring at least one upgrade command To first upgrading data back up to the second store path, and, for the first data AKU perform described at least one Individual upgrade command, obtain the second data AKU;
The thread task distributed according to the multiple processing thread, establish the incidence relation of the multiple processing thread;
For the incidence relation of the multiple processing thread, the multiple priority level for handling thread is determined;
According to the priority level of the multiple processing thread, start the multiple processing thread successively.
9. a kind of mobile terminal, it is characterised in that the mobile terminal is described including the first data AKU and for upgrading N number of upgrade command of first data AKU, wherein, N >=1, the mobile terminal includes:
Instruction acquisition module, for obtaining at least one upgrade command from N number of upgrade command, and it is at least one reverse Upgrade command;
Instruction performs and correction verification module, for performing at least one upgrade command to the first data AKU, obtains Second data AKU, and the second data AKU is verified;
Reverse upgrade command extraction module, if failing for verifying, the M for determining to have performed in N number of upgrade command rises Level instruction, and M reverse upgrade commands are extracted from the reverse upgrade command of acquisition;Wherein, N >=M >=1;
Reverse upgrade command execution module, for the second data AKU obtained for performing the M upgrade command, The M reverse upgrade commands are performed successively, the second data AKU for the M upgrade command will be performed obtaining, recovery To perform the first data AKU before the M upgrade command.
10. mobile terminal according to claim 9, it is characterised in that the mobile terminal also includes:
Module is returned, if for verifying successfully, at least one upgrade command is obtained from N number of upgrade command described in return, And at least one reversely upgrade command, perform for the first data AKU at least one upgrade command and obtain the Two data AKUs and the step of verified to the second data AKU, until N number of upgrade command is finished Or judge the second data AKU verification failure.
11. mobile terminal according to claim 9, it is characterised in that the mobile terminal also includes reverse upgrade command Collection, the mobile terminal also include:
Reverse instruction add module, at least one reversely upgrade command of acquisition to be referred to added to the reversely upgrading Order collection;
When having performed the M upgrade command, the reversely upgrade command collection includes M reverse upgrade commands, described anti- To upgrade command extraction module, including:
Reverse upgrade command extracting sub-module, for extracting the M reverse upgrade commands that upgrade command is concentrated described reversely.
12. mobile terminal according to claim 9, it is characterised in that the first data AKU includes multiple first Upgrade data, the mobile terminal also includes:
Data determining module, the first upgrading data pointed to for determining at least one upgrade command;
Store path acquisition module, the first storage of the first upgrading data pointed to for obtaining at least one upgrade command Path;
Backup module, the first upgrading data at least one upgrade command to be pointed to back up to the second store path.
13. mobile terminal according to claim 12, it is characterised in that the instruction acquisition module, including:
Positive operation order extracting sub-module, for extracting the positive operation order of at least one upgrade command;
Reverse operating order generates submodule, for for the positive operation order, generating reverse operating order;
Reverse upgrade command generation submodule, for using the reverse operating order, first store path and described the Two store paths, generate at least one reverse upgrade command.
14. mobile terminal according to claim 12, it is characterised in that N number of upgrade command is respectively directed to multiple pre- If intermediate data, it is described instruction perform and correction verification module, including:
Intermediate data acquisition submodule, the intermediate data pointed to for obtaining at least one upgrade command;
Intermediate data handles submodule, for using intermediate data renewal the first upgrading data, obtaining the second upgrading Data, and form the second data AKU using the described second upgrading data.
15. mobile terminal according to claim 14, it is characterised in that at least one upgrade command includes default First check value, the instruction performs and correction verification module, including:
Check value calculating sub module, for calculating the second check value of the second upgrading data in the second data AKU;
Check value judging submodule, for judging whether second check value matches with first check value;
Judging submodule is verified, for judging to verify successfully or judging verification failure.
16. mobile terminal according to claim 12, it is characterised in that the mobile terminal also includes:
Data obtaining module, for obtaining the disposal ability information of the mobile terminal;
Thread configuration module, for the multiple processing threads of disposal ability information configuration according to the mobile terminal;
Task allocating module, for for the multiple processing thread distribution thread task;The thread task is included by described in The first upgrading data that at least one upgrade command is pointed to back up to the second store path, and, for the first data liter Level bag performs at least one upgrade command, obtains the second data AKU;
Incidence relation establishes module, for the thread task distributed according to the multiple processing thread, establishes the multiple place Manage the incidence relation of thread;
Priority level determining module, for the incidence relation for the multiple processing thread, determine the multiple processing thread Priority level;
Thread starting module, for the priority level according to the multiple processing thread, start the multiple processing thread successively.
17. a kind of mobile terminal, it is characterised in that including processor and memory, be stored on the memory and can be in institute The data ROMPaq run on processor is stated, when the data ROMPaq is by the computing device, realizes that right such as will The step of seeking the data updating method any one of 1-8.
18. a kind of computer-readable recording medium, it is characterised in that data liter is stored with the computer-readable recording medium Level program, when the data ROMPaq is executed by processor, realize the data upgrading as any one of claim 1-8 The step of method.
CN201710802259.1A 2017-09-07 2017-09-07 Data upgrading method and mobile terminal Active CN107656747B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710802259.1A CN107656747B (en) 2017-09-07 2017-09-07 Data upgrading method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710802259.1A CN107656747B (en) 2017-09-07 2017-09-07 Data upgrading method and mobile terminal

Publications (2)

Publication Number Publication Date
CN107656747A true CN107656747A (en) 2018-02-02
CN107656747B CN107656747B (en) 2021-01-08

Family

ID=61128057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710802259.1A Active CN107656747B (en) 2017-09-07 2017-09-07 Data upgrading method and mobile terminal

Country Status (1)

Country Link
CN (1) CN107656747B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609328A (en) * 2012-01-29 2012-07-25 华为终端有限公司 System difference upgrade method and device and mobile terminal
CN104951348A (en) * 2015-07-16 2015-09-30 广东欧珀移动通信有限公司 Interruptible recovery upgrading method and device
CN105138347A (en) * 2015-07-17 2015-12-09 广东欧珀移动通信有限公司 Difference upgrade patch generating method, software upgrading method and corresponding apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609328A (en) * 2012-01-29 2012-07-25 华为终端有限公司 System difference upgrade method and device and mobile terminal
CN104951348A (en) * 2015-07-16 2015-09-30 广东欧珀移动通信有限公司 Interruptible recovery upgrading method and device
CN105138347A (en) * 2015-07-17 2015-12-09 广东欧珀移动通信有限公司 Difference upgrade patch generating method, software upgrading method and corresponding apparatus

Also Published As

Publication number Publication date
CN107656747B (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN104025047B (en) Information processor, information processing method and computer program
US8261124B2 (en) System and method for optimized error correction in flash memory arrays
US8799555B2 (en) Boot data storage schemes for electronic devices
CN102163155A (en) Upgrade controlling device and method for upgrading memory device
CN111078662B (en) Block chain data storage method and device
CN1971536A (en) Correcting system and method of basic in-out system
CN103930878A (en) Method, apparatus and system for memory validation
CN106776122A (en) A kind of method of main-apparatus protection in start-up course based on Flash
CN105260215A (en) Method of updating vehicle-mounted automobile data recorder terminal by USB flash disk
CN104541249A (en) Endurance aware error-correcting code (ECC) protection for non-volatile memories
US20140082264A1 (en) Nand flash storage chip checking method and device
CN104216800A (en) Automatic system fault recovering method and device based on data redundancy
CN104133740A (en) Method for recovering abnormal power failure data
CN108108193A (en) A kind of easy-to-use firmware upgrade method of safety and system
CN110399247A (en) A kind of data reconstruction method, device, equipment and computer readable storage medium
US20080072119A1 (en) Allowable bit errors per sector in memory devices
CN102184117A (en) Method and device for starting system on different Nandflash
US8661382B2 (en) Modeling for soft error specification
CN114546510B (en) Verification method and device for suspend function, electronic equipment and storage medium
WO2005088448A1 (en) Method and apparatus for reliable in-place update
CN109445691A (en) A kind of method and device improving FTL algorithm development and verification efficiency
US20130080751A1 (en) Method and device for updating bios program for computer system
CN107402843A (en) Restoration methods, device and the equipment of database corruption
CN111241064B (en) Database configuration file processing method, device and storage medium
CN106920576A (en) A kind of method and system of inspection Nand Flash mass

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant