Summary of the invention
For overcoming problem present in correlation technique, the present invention provides a kind of program exception restoration methods and device.
First aspect according to embodiments of the present invention, it is provided that a kind of program exception restoration methods, including:
When receiving the start-up command that default control terminal sends, whether detection program runs the run program file in subregion
Occur abnormal;
When the run program file during program runs subregion occurs abnormal, obtain the stand-by program of backup in program backup subregion
File;
Described stand-by program file stores described program run in subregion;
Run described program and run the stand-by program file in subregion.
Alternatively, described described stand-by program file is stored described program run in subregion, including:
Detect the most all skies in multiple field locations for storage running program file in described operation program sectioning;
When all skies in multiple field locations of described operation program sectioning, directly described stand-by program file is write institute
Program of stating runs multiple field locations corresponding in subregion.
Alternatively, described stand-by program file comprises multiple stand-by program fragment;
Described described stand-by program file stored described program run in subregion, also include:
When being divided into null field position in the middle part of multiple field locations of described operation program sectioning, determine described stand-by program subregion
The interior field location corresponding with null field position is aiming field position;
Obtain all stand-by program fragments in stand-by program subregion, before described aiming field position;
Described stand-by program fragment is written to the field location of described operation program sectioning hollow.
Alternatively, whether the run program file that described detection program is run in subregion there is exception, including:
Obtain the identification value being used in the default flag that run program file described in labelling is the most complete;
Judge that described identification value is the most identical with the default regime values complete for run program file described in labelling;
When described default identification value is identical with described default regime values, determine that described program runs the operation journey in subregion
Preface part occurs abnormal.
Alternatively, whether the run program file that described detection program is run in subregion there is exception, including:
Obtain the multiple field locations for storage running program file in described operation program sectioning;
Whether detection exists the field location of sky in multiple field locations of storage running program file;
When there is the field location of sky in multiple field locations of storage running program file, determine that described program is run
Run program file in subregion occurs abnormal.
Second aspect according to embodiments of the present invention, it is provided that a kind of program exception recovery device, including:
Detection module, for when receiving the start-up command that default control terminal sends, detection program runs the fortune in subregion
Whether line program file there is exception;
Acquisition module, when the run program file in running subregion when program occurs abnormal, obtains in program backup subregion
The stand-by program file of backup;
Memory module, runs in subregion for described stand-by program file stores described program;
Run module, run the stand-by program file in subregion for running described program.
Alternatively, described memory module, including:
First detection sub-module, for detecting in described operation program sectioning the multiple field bit for storage running program file
Put the most all skies;
First write submodule, for during when all skies in multiple field locations of described operation program sectioning, directly by institute
State stand-by program file and write multiple field locations corresponding in described program operation subregion.
Alternatively, described stand-by program file comprises multiple stand-by program fragment;
Described memory module, also includes:
First determines submodule, is used for when being divided into null field position in the middle part of multiple field locations of described operation program sectioning,
Determine that the interior field location corresponding with null field position of described stand-by program subregion is aiming field position;
First obtains submodule, for obtaining all backups in stand-by program subregion, before described aiming field position
Usability of program fragments;
Second write submodule, for being written to the field location of described operation program sectioning hollow by described stand-by program fragment.
Alternatively, described detection module, including:
Second obtains submodule, for obtaining the mark being used in the default flag that run program file described in labelling is the most complete
Know numerical value;
Judge submodule, for judging described identification value and the default normal number complete for run program file described in labelling
It is worth the most identical;
Second determines submodule, for when described default identification value is identical with described default regime values, determines described journey
Run program file in sort run subregion occurs abnormal.
Alternatively, described detection module, including:
3rd obtains submodule, for obtaining in described operation program sectioning the multiple field bit for storage running program file
Put;
Whether the second detection sub-module, exist the word of sky in multiple field locations of storage running program file for detection
Fragment position;
3rd determines submodule, for when the field location that there is sky in the multiple field locations being used for storage running program file
Time, determine that described program is run the run program file in subregion and occurred abnormal.
The technical scheme that embodiments of the invention provide can include following beneficial effect:
The present invention is by when receiving the start-up command that default control terminal sends, and first detection program runs the fortune in subregion
Whether line program file there is exception, when the run program file during program runs subregion occurs abnormal, then obtains program
The stand-by program file of backup in backup subregion, more described stand-by program file is stored in described program operation subregion,
After can run described program and run the stand-by program file in subregion.
The method that the present invention provides, it is possible to the operation program run in program sectioning that power-off causes occurs in escalation process
After file corruption, automatically by the stand-by program file copy in stand-by program subregion to running in program sectioning, by stand-by program
File is as new run program file, it is ensured that there is normal run program file in operation program sectioning can run, and keeps away
The display screen end exempting to cause owing to running run program file in program sectioning to damage cannot be according to the machine that the opens order received, notice
The main control chip of television carries out the situation of the machine that opens.
It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe, can not limit
The present invention processed.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to accompanying drawing
Time, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.In following exemplary embodiment
Described embodiment does not represent all embodiments consistent with the present invention.On the contrary, they are only and the most appended power
The example of the apparatus and method that some aspects that described in detail in profit claim, the present invention are consistent.
Owing to current television display screen end is when carrying out program upgrading, program may be caused to upgrade unsuccessfully due to unexpected power-off,
It is first to wipe out original program due to the escalation process of program again, then writes ROMPaq file, if power-off so suddenly,
So, original program file is then likely to be due to be wiped free of part and imperfect, and newly written program file is not owing to having write
Finish the most imperfect, cause either that original program file or newly written ROMPaq file routine cannot be properly functioning,
When user is by remote controller input start-up command, display screen end, after receiving start-up command, will be unable to normally notify television
Main control chip, and then cause TV cannot normal boot-strap, to this end, as it is shown in figure 1, in one embodiment of the invention,
A kind of program exception restoration methods is provided, comprises the following steps.
In step S101, when receiving the start-up command that default control terminal sends, detection program runs the fortune in subregion
Whether line program file there is exception.
In the disclosed embodiments, owing in actual applications, user typically can control intelligent television by remote controller and carry out
Start, shutdown etc. operate, so default control terminal can refer to control the remote controller etc. of electrical equipment, start-up command can
To refer to the start-up command for controlling electrical equipment start that user is sent by remote controller, the mode sending start-up command is permissible
It is sent to electrical equipment by the mode such as infrared.
Program is run subregion and be can refer to the disk partition of the run program file run during storage running program, abnormal permissible
Refer to as operation program is imperfect, usability of program fragments mistake etc. can result in the situation that program cannot be properly functioning.
In this step, can detect for storage running program file the most complete, during mark run program file write be
The flag that no write completes is known no for default value etc., and carrying out determining program, to run the run program file in subregion the most abnormal.
When the run program file during program runs subregion occurs abnormal, in step s 102, obtain in program backup subregion
The stand-by program file of backup.
In the disclosed embodiments, whole stand-by program file can once be obtained, it is also possible to obtain program backup several times and divide
Stand-by program file in district, concrete number of times can determine according to practical situation.
In step s 103, described stand-by program file stores described program run in subregion.
In the disclosed embodiments, when storage, each usability of program fragments word in program backup subregion in stand-by program file
Fragment position should be corresponding with the field location in program operation subregion, and such as, corresponding relation can be as shown in table 1 below:
Usability of program fragments |
Field location in program backup subregion |
Program runs field location in subregion |
1 |
1-10 |
1-10 |
2 |
11-20 |
11-20 |
3 |
21-30 |
21-30 |
4 |
31-40 |
31-40 |
…… |
…… |
…… |
N |
M |
M |
As shown in Table 1, the field location in program runs subregion is that in 11-20, in the usability of program fragments of storage, field location is
The usability of program fragments 2 of storage in 11-20, it should also be understood that in actual applications, field location is permissible for those skilled in the art
Size according to actual usability of program fragments adjusts, and is not limited in the embodiment of the present invention.
In step S104, run described program and run the stand-by program file in subregion.
In this step, this stand-by program file can be performed after stand-by program file is stored in program operation subregion.
Certainly, this stand-by program file is not the ROMPaq file after upgrading, if so need nonetheless remain for running program
When run program file in subregion is upgraded, escalation process should be restarted, after escalation process success and completing,
Can be by ROMPaq file copy to stand-by program subregion, it is also possible to do not copy in stand-by program subregion, the most permissible
It is set according to actual needs.
The present invention is by when receiving the start-up command that default control terminal sends, and first detection program runs the fortune in subregion
Whether line program file there is exception, when the run program file during program runs subregion occurs abnormal, then obtains program
The stand-by program file of backup in backup subregion, more described stand-by program file is stored in described program operation subregion,
After can run described program and run the stand-by program file in subregion.
The method that the embodiment of the present invention provides, it is possible to the fortune run in program sectioning that power-off causes occurs in escalation process
After line program file corruption, automatically by the stand-by program file copy in stand-by program subregion to running in program sectioning, by standby
Part program file is as new run program file, it is ensured that there is normal run program file in operation program sectioning can transport
OK, it is to avoid due to the display screen end that runs run program file in program sectioning to damage to cause cannot according to the machine that the opens order received,
The main control chip of notice television carries out the situation of the machine that opens.
In actual applications, owing to escalation process is first to wipe original program file, then at the ROMPaq literary composition that write is new
Part, when in erasing, situation about disposably original program file all being wiped, in another embodiment of the present invention, institute
State step S103, comprise the following steps.
In step s 201, whether detect in described operation program sectioning for multiple field locations of storage running program file
All skies.
In embodiments of the present invention, when the run program file run in program sectioning is completely erased, for storage running
Multiple field locations of program file should be blank state, it is possible to whether detect in multiple field location is empty shape
State, concrete, can detect in each field location is null value, be NULL.
When all skies in multiple field locations of described operation program sectioning, in step S202, directly by described backup
Program file writes described program and runs multiple field locations corresponding in subregion.
The present invention is whole by detecting the multiple field locations being used for storage running program file in described operation program sectioning
For sky, when the multiple field locations in described operation program sectioning all empty time, can be directly by described stand-by program file
Write described program and run multiple field locations corresponding in subregion.
The method that the embodiment of the present invention provides, it is possible in program escalation process, runs the operation program literary composition in program sectioning
When part is completely erased, directly stand-by program file can be written to the multiple field locations being wiped free of, ablation process speed
Hurry up, time-consuming.
In actual applications, the situation of limit erasing original program limit write ROMPaq may be there is, so, if suddenly
Power-off, then may cause original program file and ROMPaq file the most imperfect, and then cannot be properly functioning, to this end,
In another embodiment of the present invention, described stand-by program file can comprise multiple stand-by program fragment.
Described step S103, further comprising the steps of.
When being divided into null field position in the middle part of multiple field locations of described operation program sectioning, in step S301, determine institute
Stating the interior field location corresponding with null field position of stand-by program subregion is aiming field position.
In this step, null field position that operation program empty can be first looked for, that do not write ROMPaq file,
Then according to this null field position, stand-by program subregion finds the field location of correspondence, the field location this found
It is defined as aiming field position.
In step s 302, all stand-by program sheets in stand-by program subregion, before described aiming field position are obtained
Section.
In embodiments of the present invention, in running subregion in program, all fields before the null field position being wiped free of can
Can be written into ROMPaq file, back up journey accordingly so the field location of write ROMPaq file should be re-write
Sequence fragment.
In step S303, described stand-by program fragment is written to the field location of described operation program sectioning hollow.
The present invention, by when being divided into null field position in the middle part of multiple field locations of described operation program sectioning, determines described standby
In part program sectioning, the field location corresponding with null field position is aiming field position, acquisition in stand-by program subregion,
All stand-by program fragments before described aiming field position, can be written to described operation journey by described stand-by program fragment
The field location of sequence subregion hollow.
The method that the embodiment of the present invention provides, it is possible in program escalation process, runs the operation program literary composition in program sectioning
When part is partly wiped, directly stand-by program file can be written to the multiple field locations being wiped free of, ablation process speed
Hurry up, time-consuming.
In another embodiment of the present invention, described step S101, comprise the following steps.
In step S401, obtain the identification value being used in the default flag that run program file described in labelling is the most complete.
In embodiments of the present invention, one can be arranged in flag depositor for identifying when writing run program file
The flag that run program file is the most complete, can write identification value " 0 " or " 1 " in flag, " 0 " is permissible
Representing run program file and write unsuccessfully, " 1 " can represent complete being written into of run program file.
In this step, the flag depositor for storing identification value can be first looked for, from this flag depositor
Obtain identification value.
In step S402, it is judged that described identification value and the default regime values complete for run program file described in labelling
The most identical.
In this step, owing to " 1 " can represent complete being written into of run program file, so may determine that here and obtaining
Whether the identification value taken is " 1 ".
When described default identification value is identical with described default regime values, in step S403, determine that described program is run
Run program file in subregion occurs abnormal.
The present invention, by obtaining the identification value being used in the default flag that run program file described in labelling is the most complete, sentences
Disconnected described identification value is the most identical with the default regime values complete for run program file described in labelling, presets when described
When identification value is identical with described default regime values, it may be determined that described program is run the run program file in subregion and occurred
Abnormal.
The method that the embodiment of the present invention provides, it is possible to automatically judging in the flag that labelling run program file is complete
When identification value is identical with predetermined normal level, determining that run program file is abnormal, method is fairly simple, convenient, efficiently.
In the another embodiment of the disclosure, described step S101, comprise the following steps.
In step S501, obtain the multiple field locations for storage running program file in described operation program sectioning.
In step S502, whether detection exists the field location of sky in multiple field locations of storage running program file.
In embodiments of the present invention, whether can be the modes such as null value by reading the data in each field location, it is judged that word
Whether fragment position is empty.
When there is the field location of sky in multiple field locations of storage running program file, in step S503, really
Fixed described program is run the run program file in subregion and is occurred abnormal.
The present invention is used for multiple field locations of storage running program file by obtaining in described operation program sectioning, detection is used
The field location of sky whether is there is, when for storage running program file in multiple field locations of storage running program file
Multiple field locations in when there is the field location of sky, it may be determined that the run program file that described program is run in subregion goes out
Now abnormal.
The method that the embodiment of the present invention provides, it is possible to by the way of whether all field locations of automatic decision are control, really
Determining run program file the most abnormal, method is fairly simple, convenient, efficiently.
As in figure 2 it is shown, in another embodiment of the present invention, it is provided that a kind of program exception recovery device, including: detection mould
Block 201, acquisition module 202, memory module 203 and operation module 204.
Detection module 201, for when receiving the start-up command that default control terminal sends, detection program is run in subregion
Whether run program file there is exception.
Acquisition module 202, when the run program file in running subregion when program occurs abnormal, obtains program backup subregion
The stand-by program file of middle backup.
Memory module 203, runs in subregion for described stand-by program file stores described program.
Run module 204, run the stand-by program file in subregion for running described program.
In another embodiment of the present invention, described memory module, including:
First detection sub-module, for detecting in described operation program sectioning the multiple field bit for storage running program file
Put the most all skies;
First write submodule, for during when all skies in multiple field locations of described operation program sectioning, directly by institute
State stand-by program file and write multiple field locations corresponding in described program operation subregion.
In another embodiment of the present invention, described stand-by program file comprises multiple stand-by program fragment;
Described memory module, also includes:
First determines submodule, is used for when being divided into null field position in the middle part of multiple field locations of described operation program sectioning,
Determine that the interior field location corresponding with null field position of described stand-by program subregion is aiming field position;
First obtains submodule, for obtaining all backups in stand-by program subregion, before described aiming field position
Usability of program fragments;
Second write submodule, for being written to the field location of described operation program sectioning hollow by described stand-by program fragment.
In another embodiment of the present invention, described detection module, including:
Second obtains submodule, for obtaining the mark being used in the default flag that run program file described in labelling is the most complete
Know numerical value;
Judge submodule, for judging described identification value and the default normal number complete for run program file described in labelling
It is worth the most identical;
Second determines submodule, for when described default identification value is identical with described default regime values, determines described journey
Run program file in sort run subregion occurs abnormal.
In another embodiment of the present invention, described detection module, including:
3rd obtains submodule, for obtaining in described operation program sectioning the multiple field bit for storage running program file
Put;
Whether the second detection sub-module, exist the word of sky in multiple field locations of storage running program file for detection
Fragment position;
3rd determines submodule, for when the field location that there is sky in the multiple field locations being used for storage running program file
Time, determine that described program is run the run program file in subregion and occurred abnormal.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to other reality of the present invention
Execute scheme.The application is intended to any modification, purposes or the adaptations of the present invention, these modification, purposes or
Adaptations is followed the general principle of the present invention and includes the undocumented common knowledge or used in the art of the present invention
Use technological means.Description and embodiments is considered only as exemplary, and true scope and spirit of the invention are by appended right
Requirement is pointed out.
It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and can
To carry out various modifications and changes without departing from the scope.The scope of the present invention is only limited by appended claim.