CN103309771B - The method that the fast quick-recovery of application program start is realized based on android system - Google Patents
The method that the fast quick-recovery of application program start is realized based on android system Download PDFInfo
- Publication number
- CN103309771B CN103309771B CN201310234781.6A CN201310234781A CN103309771B CN 103309771 B CN103309771 B CN 103309771B CN 201310234781 A CN201310234781 A CN 201310234781A CN 103309771 B CN103309771 B CN 103309771B
- Authority
- CN
- China
- Prior art keywords
- task
- backup
- android system
- application program
- shutdown
- 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.)
- Active
Links
Landscapes
- Retry When Errors Occur (AREA)
- Stored Programmes (AREA)
Abstract
The present invention provides a kind of method that the fast quick-recovery of application program start is realized based on android system, during shutdown, all tasks being currently running are captured from system activity stack and parse the module information of each task, bag name and class name information are extracted, bag name and class name information are packaged into secondary sequence model by serializing interface;Each secondary sequence model is write in secondary sequence model list;The listing sequenceization is write by internal storage device by the object output stream of persistent layer, backup file is generated, realizes the internal storage device of no write de-lay terminal.When starting up of terminal, system can quickly move through unserializing and decapsulation parses the corresponding bag name of each task and class name information is reassembled into the corresponding module information of each task, create new TU task unit, and the action message of application program is write toward system activity stack, so as to recover the application program of backup, the specific interface of application program residing when user is the last to shut down is returned to.
Description
Technical field
The invention belongs to moving communicating field, is related to one kind and realizes that application program start is quick extensive based on android system
Multiple system and method.
Background technology
At present, various systematic difference programs start recovery processs be essentially all will be first in shutdown by the whole of program
Information back-up is into non-volatile memory device, then in start, by reading and saving in non-volatile memory device
Application Backup information realizes the recovery of program.However, usually it there is a problem in that when using this technology:When
The information content that the application program that is currently running is relatively more, application structure is more complicated, application program is contained is bigger
In the case of, it is difficult to which the shutdown backup for being rapidly performed by application program recovers with start.Improve this insufficient problem to be:Such as
What quickly positions application program to back up, how quickly to extract effective information needed for application program to back up
And establish its corresponding packaging model and how quickly model information effectively to be stored.In view of this, it is of the invention
People is directed to the defects of prior art and furthers investigate, and has this case generation.
The content of the invention
The technical problem to be solved in the present invention, is that provide one kind realizes that application program start is fast based on android system
The method of quick-recovery, by the directly positioning crawl of application program task, the direct extraction of effective information, secondary model it is brief
Encapsulation, the no write de-lay of persistent layer serializing, solve application program in android system and quickly shut down backup and quick turn-on
The problem of recovery.
What the present invention was realized in:
The method that the fast quick-recovery of application program start is realized based on android system, the method are suitable for a switching on and shutting down
Radio receiver, a background backup recover service unit, a shutdown back-up job thread, a start are resumed work thread and one
Persistent layer;The switching on and shutting down radio receiver and background backup recover service unit and are registered to the android system;
The described method includes shutdown backup-step and start recovering step, the shutdown backup-step is as follows:
Step 10, the switching on and shutting down radio receiver monitor the start broadcast or shutdown broadcast of android system, Yong Huguan
During machine, triggering android system sends shutdown broadcast;
Step 11, the switching on and shutting down radio receiver receive the shutdown broadcast, and it is single to start background backup recovery service
Member;
Step 12, the background backup recover service unit and start shutdown back-up job thread;
Step 13, the shutdown back-up job thread are directly obtained Android by Binder inter-process communication mechanisms
The active manager of system, is then directly captured from the active stack of android system by the active manager and transported
Capable all tasks, are then saved into local temporary variable task list;
Step 14, the module information for parsing from the local temporary variable task list each task successively;
Step 15, the bag name and class name information for directly extracting from the module information of each task each task, pass through
The bag name and class name information that each task extracts are packaged into secondary sequence model by serializing interface;
Step 16, write each task corresponding secondary sequence model in secondary sequence model list successively;
Step 17, flowed by the object output of persistent layer and deposit secondary sequence model list serializing write-in inside
Equipment is stored up, generates backup file;
The start recovering step is as follows:
Step 20, the switching on and shutting down radio receiver monitor the start broadcast or shutdown broadcast of android system, Yong Hukai
During machine, triggering android system sends start broadcast;
Step 21, the switching on and shutting down radio receiver receive the start broadcast, start the background backup and recover clothes
Business unit;
Step 22, the background backup recover service unit and start the thread of resuming work of starting shooting;
Step 23, pass through the backup file in the object inlet flow unserializing reading internal storage device of persistent layer, life
Into the secondary sequence model list;
Step 24, be successively read out each task corresponding two in the form of backward from the secondary sequence model list
Secondary serializing model;
Step 25, carry out model decapsulation to the corresponding secondary sequence model of each task, parses each task pair
The bag name and class name information answered;
Step 26, that the corresponding bag name of each task parsed and class name information are reassembled into each task is corresponding
Module information;
Step 27, using the module information after re-assemblying create Intent object informations, and sets Intent objects
Flag bit;
Step 28, the Intent object informations for starting the establishment, create new TU task unit, and android system will be logical
Binder inter-process communication mechanisms are crossed, corresponding application program action message is write into system activity stack, so as to recover to back up
Application program.
Further, the flag bit of the Intent objects in the step 27 is FLAG_ACTIVITY_NEW_TASK.
Further, the backup file generated in the step 17 is equipped with BACKUP TIME label, often performs once the pass
Machine backup-step, the backup file of generation are all individually retained separately, in the step 23 according to BACKUP TIME label optionally
Read corresponding backup file.
The utility model has the advantage of:
Under the terminal based on android system, using the characteristic of android system, during terminal closedown, directly from
The application program task to back up being currently running is captured in the active stack of android system, it is straight from each TU task unit
The related bag name and class name information extracted needed for start recovery process is connect, corresponding secondary sequence packaging model is established, leads to
Persistent layer trigger sequence is crossed, realizes the internal storage device of no write de-lay terminal.When starting up of terminal, system can be rapidly
The corresponding bag name of each task is parsed by unserializing and decapsulation and class name information is reassembled into each task and corresponds to
Module information, so as to create new TU task unit, and toward the action message of system activity stack write-in application program, so as to recover
The application program of backup, returns to the specific interface of application program residing during the last shutdown of user, avoids and allows user
Recall last time used application program and the worry brought.Meanwhile the present invention passes through the backup equipped with BACKUP TIME label
The file record execution history of application program, supports customer analysis to check.
Brief description of the drawings
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the method for the present invention structure diagram.
Embodiment
Referring to Fig. 1, realizing the method for the fast quick-recovery of application program start based on android system, the method is applicable in
Resume work in a switching on and shutting down radio receiver, background backup recovery service unit, a shutdown back-up job thread, a start
Thread and a persistent layer;The switching on and shutting down radio receiver and background backup recover service unit to the Android systems
System registration;
The switching on and shutting down radio receiver is responsible for receiving the start broadcast and shutdown broadcast of android system, then starts
The background backup recovers service unit;
The background backup recovers service unit and is responsible for, according to the broadcast type received, starting corresponding worker thread,
Safeguard the life cycle of whole android system;
The shutdown back-up job thread is connected with the persistent layer, and by directly accessing system activity stack, extraction respectively should
Persistent layer is write direct after being carried out the encapsulation of secondary sequence model with the relevant information of program, serialized to be backed up;
The start thread of resuming work is connected with the persistent layer, the secondary sequence model is decapsulated, inverted sequence
After rowization, action message is write to the system activity stack, recovers application program;
The persistent layer is responsible for the encapsulation to application related information read-write;
The described method includes shutdown backup-step and start recovering step, the shutdown backup-step is as follows:
Step 10, the switching on and shutting down radio receiver monitor the start broadcast or shutdown broadcast of android system, Yong Huguan
During machine, triggering android system sends shutdown broadcast;
Step 11, the switching on and shutting down radio receiver receive the shutdown broadcast, and it is single to start background backup recovery service
Member;
Step 12, the background backup recover service unit and start shutdown back-up job thread;
Step 13, the shutdown back-up job thread are directly obtained Android by Binder inter-process communication mechanisms
The active manager of system, is then directly captured from the active stack of android system by the active manager and transported
Capable all tasks, are then saved into local temporary variable task list;It should be noted that a task is corresponding to one just
In the application program of operation;
Step 14, the module information for parsing from the local temporary variable task list each task successively;
The module information of android system includes information on services, broadcast message, intent information and action message;Due to acquisition
The module information of each task can not write direct internal storage device, thus the present invention by step 15 to step 17 come real
It is existing;
Step 15, the bag name and class name information for directly extracting from the module information of each task each task, pass through
The bag name and class name information that each task extracts are packaged into secondary sequence model by serializing interface;Table 1 is referred to, its
Secondary sequence model is illustrated, its leftmost class name can customize, and middle attribute is secondary sequence model bag
The content contained, rightmost illustrate it is the explanation to attribute:
Step 16, write each task corresponding secondary sequence model in secondary sequence model list successively;
Step 17, flowed by the object output of persistent layer and deposit secondary sequence model list serializing write-in inside
Equipment is stored up, generates backup file;
The start recovering step is as follows:
Step 20, the switching on and shutting down radio receiver monitor the start broadcast or shutdown broadcast of android system, Yong Hukai
During machine, triggering android system sends start broadcast;
Step 21, the switching on and shutting down radio receiver receive the start broadcast, start the background backup and recover clothes
Business unit;
Step 22, the background backup recover service unit and start the thread of resuming work of starting shooting;
Step 23, pass through the backup file in the object inlet flow unserializing reading internal storage device of persistent layer, life
Into the secondary sequence model list;
Step 24, be successively read out each task corresponding two in the form of backward from the secondary sequence model list
Secondary serializing model;
Step 25, carry out model decapsulation to the corresponding secondary sequence model of each task, parses each task pair
The bag name and class name information answered;
Step 26, that the corresponding bag name of each task parsed and class name information are reassembled into each task is corresponding
Module information;
Step 27, using the module information after re-assemblying create Intent object informations, and sets Intent objects
Flag bit;The flag bit is FLAG_ACTIVITY_NEW_TASK, and flag bit notice system has new task unit to create;
Step 28, the Intent object informations for starting the establishment, create new TU task unit, and android system will be logical
Binder inter-process communication mechanisms are crossed, corresponding application program action message is write into system activity stack, so as to recover to back up
Application program.
More preferably, the backup file generated in the step 17 sets BACKUP TIME label, often performs once the shutdown
Backup-step, the backup file of generation are all individually retained separately, and the backup file before not covering, can so record this
The execution history of the application program of android system, is read by the object inlet flow unserializing of persistent layer in the step 23
The backup file in internal storage device is taken, generates the secondary sequence model list;When equipped with BACKUP TIME label, because
This, user checks each backup file by analysis, and required backup file is then optionally read according to BACKUP TIME label,
Generate secondary sequence model list.
Under the terminal based on android system, using the characteristic of android system, during terminal closedown, directly from
The application program task to back up being currently running is captured in the active stack of android system, it is straight from each TU task unit
The related bag name and class name information extracted needed for start recovery process is connect, corresponding secondary sequence packaging model is established, leads to
Persistent layer trigger sequence is crossed, realizes the internal storage device of no write de-lay terminal.When starting up of terminal, system can be rapidly
The corresponding bag name of each task is parsed by unserializing and decapsulation and class name information is reassembled into each task and corresponds to
Module information, so as to create new TU task unit, and toward the action message of system activity stack write-in application program, so as to recover
The application program of backup, returns to the specific interface of application program residing during the last shutdown of user, avoids and allows user
Recall last time used application program and the worry brought.Meanwhile the present invention passes through the backup equipped with BACKUP TIME label
The file record execution history of application program, supports customer analysis to check.
Although the foregoing describing the embodiment of the present invention, those familiar with the art should manage
Solution, we are merely exemplary described specific embodiment, rather than for the restriction to the scope of the present invention, are familiar with this
The equivalent modification and change that the technical staff in field is made in the spirit according to the present invention, should all cover the present invention's
In scope of the claimed protection.
Claims (3)
1. the method for the fast quick-recovery of application program start is realized based on android system, it is characterised in that:The method is suitable for
One switching on and shutting down radio receiver, a background backup recover service unit, a shutdown back-up job thread, a start are resumed work line
Journey and a persistent layer;The switching on and shutting down radio receiver and background backup recover service unit to the android system
Registration;
The described method includes shutdown backup-step and start recovering step, the shutdown backup-step is as follows:
Step 10, the switching on and shutting down radio receiver monitor the start broadcast or shutdown broadcast of android system, user's shutdown
When, triggering android system sends shutdown broadcast;
Step 11, the switching on and shutting down radio receiver receive the shutdown broadcast, start background backup and recover service unit;
Step 12, the background backup recover service unit and start shutdown back-up job thread;
Step 13, the shutdown back-up job thread are directly obtained android system by Binder inter-process communication mechanisms
Active manager, then capture what is be currently running directly from the active stack of android system by the active manager
All tasks, are then saved into local temporary variable task list;
Step 14, the module information for parsing from the local temporary variable task list each task successively;
Step 15, the bag name and class name information for directly extracting from the module information of each task each task, pass through sequence
Change interface and the bag name and class name information that each task extracts are packaged into secondary sequence model;
Step 16, write each task corresponding secondary sequence model in secondary sequence model list successively;
Step 17, serialize write-in storage inside by the secondary sequence model list by the object of persistent layer output stream and set
It is standby, generate backup file;
The start recovering step is as follows:
Step 20, the switching on and shutting down radio receiver monitor the start broadcast or shutdown broadcast of android system, user's start
When, triggering android system sends start broadcast;
Step 21, the switching on and shutting down radio receiver receive the start broadcast, start the background backup and recover service list
Member;
Step 22, the background backup recover service unit and start the thread of resuming work of starting shooting;
Step 23, pass through the backup file in the object inlet flow unserializing reading internal storage device of persistent layer, generation institute
State secondary sequence model list;
Step 24, be successively read out corresponding two order of each task in the form of backward from the secondary sequence model list
Rowization model;
Step 25, carry out model decapsulation to the corresponding secondary sequence model of each task, and it is corresponding to parse each task
Bag name and class name information;
Step 26, by the corresponding bag name of each task parsed and class name information be reassembled into the corresponding component of each task
Information;
Step 27, using the module information after re-assemblying create Intent object informations, and sets the mark of Intent objects
Position;
Step 28, the Intent object informations for starting the establishment, create new TU task unit, android system will pass through
Binder inter-process communication mechanisms, corresponding application program action message is write into system activity stack, so as to recover backup
Application program.
2. the method according to claim 1 that the fast quick-recovery of application program start is realized based on android system, its feature
It is:The flag bit of Intent objects in the step 27 is FLAG_ACTIVITY_NEW_TASK.
3. the method according to claim 1 that the fast quick-recovery of application program start is realized based on android system, its feature
It is:The backup file generated in the step 17 is equipped with BACKUP TIME label, often performs once the shutdown backup-step,
The backup file generated in step 17 is all individually retained separately, i.e., after the backup file that generates do not cover before backup file,
The execution history of the application program of the android system can be so recorded, is selected in the step 23 according to BACKUP TIME label
Read to selecting property corresponding backup file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310234781.6A CN103309771B (en) | 2013-06-14 | 2013-06-14 | The method that the fast quick-recovery of application program start is realized based on android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310234781.6A CN103309771B (en) | 2013-06-14 | 2013-06-14 | The method that the fast quick-recovery of application program start is realized based on android system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103309771A CN103309771A (en) | 2013-09-18 |
CN103309771B true CN103309771B (en) | 2018-04-20 |
Family
ID=49135023
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310234781.6A Active CN103309771B (en) | 2013-06-14 | 2013-06-14 | The method that the fast quick-recovery of application program start is realized based on android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103309771B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170235473A1 (en) * | 2014-08-11 | 2017-08-17 | Huawei Technologies, Co., Ltd. | Method and Apparatus for Loading Application Program View, and Electronic Terminal |
CN105592229B (en) * | 2016-02-17 | 2019-09-10 | 青岛海信电器股份有限公司 | The open and close machine processing method and processing device of terminal |
CN106681737A (en) * | 2017-01-05 | 2017-05-17 | 武汉斗鱼网络科技有限公司 | Application state saving method and device based on Android system |
CN107943616A (en) * | 2017-11-10 | 2018-04-20 | 惠州市德赛西威汽车电子股份有限公司 | A kind of method that vehicle-mounted Android starts source is recovered |
CN108958980B (en) * | 2018-07-23 | 2021-07-09 | Oppo(重庆)智能科技有限公司 | Method for preventing Activity life cycle from being abnormal, electronic device and computer readable storage medium |
EP3857358A4 (en) * | 2018-09-26 | 2022-05-11 | INTEL Corporation | Power off and power on method and apparatus for an in-vehicle system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101013390A (en) * | 2007-01-24 | 2007-08-08 | 北京蓝科泰达科技有限公司 | Fast restoration method of computer system and apparatus |
CN101916201A (en) * | 2010-08-06 | 2010-12-15 | 中兴通讯股份有限公司 | Android-based mobile terminal cold-boot method and device |
US7941814B1 (en) * | 2004-02-26 | 2011-05-10 | Symantec Operating Corporation | Device driver processing for automated system restores |
CN102207881A (en) * | 2011-07-07 | 2011-10-05 | 电子科技大学 | Quick operation system start-up method based on Android |
-
2013
- 2013-06-14 CN CN201310234781.6A patent/CN103309771B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7941814B1 (en) * | 2004-02-26 | 2011-05-10 | Symantec Operating Corporation | Device driver processing for automated system restores |
CN101013390A (en) * | 2007-01-24 | 2007-08-08 | 北京蓝科泰达科技有限公司 | Fast restoration method of computer system and apparatus |
CN101916201A (en) * | 2010-08-06 | 2010-12-15 | 中兴通讯股份有限公司 | Android-based mobile terminal cold-boot method and device |
CN102207881A (en) * | 2011-07-07 | 2011-10-05 | 电子科技大学 | Quick operation system start-up method based on Android |
Also Published As
Publication number | Publication date |
---|---|
CN103309771A (en) | 2013-09-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103309771B (en) | The method that the fast quick-recovery of application program start is realized based on android system | |
CN104899111B (en) | A kind of method and system for handling home gateway system Kernel Panic | |
CN103324549A (en) | Method for realizing sleep standby and communication terminal | |
CN105095358A (en) | Method and system for acquiring database operation logs | |
CN102437921B (en) | Memory method and network device of configuration information | |
CN102609327A (en) | Method and device for improving reliability of multi-core processor | |
CN102880530B (en) | Terminal and terminal backup and restoration methods | |
CN104243683A (en) | Data processing method, terminal, user identification card and data processing system | |
CN102572110A (en) | Smart phone power-down protection system and method | |
CN104915252A (en) | Process port management device and method | |
CN102455932A (en) | Serial execution method, device and system for task instances | |
WO2016145798A1 (en) | Upgrading method and upgrading apparatus for application program of embedded system | |
CN102063350A (en) | Method, device and terminal for backing up and recovering | |
CN106484755A (en) | The method of asynchronous quick loading video thumbnails | |
CN103176866A (en) | File permission back-up method applied in new technology file system (NTFS) | |
CN104102498A (en) | Mobile terminal and booting method thereof | |
CN106919474A (en) | A kind of data cached guard method and device | |
CN108647112A (en) | The method, apparatus and distributing real time system system of data backup | |
CN102142066A (en) | Computing equipment and backup recovery method thereof | |
CN103297620A (en) | Power-down protection system and method for smart phone | |
CN106843022A (en) | A kind of method for improving embedded control system output reliability | |
CN101739115A (en) | Simplified type host computer and method for wakening same | |
CN103780433A (en) | Self-healing type virtual resource configuration management data architecture | |
CN102654531A (en) | Remedying method and remedying device of lacked electric energy qualitative data | |
CN106681737A (en) | Application state saving method and device based on Android system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |