CN103309771A - Method for realizing boot quick recovery of application program based on Android system - Google Patents

Method for realizing boot quick recovery of application program based on Android system Download PDF

Info

Publication number
CN103309771A
CN103309771A CN2013102347816A CN201310234781A CN103309771A CN 103309771 A CN103309771 A CN 103309771A CN 2013102347816 A CN2013102347816 A CN 2013102347816A CN 201310234781 A CN201310234781 A CN 201310234781A CN 103309771 A CN103309771 A CN 103309771A
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.)
Granted
Application number
CN2013102347816A
Other languages
Chinese (zh)
Other versions
CN103309771B (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.)
Xiamen Yaxon Networks Co Ltd
Original Assignee
Xiamen Yaxon Networks 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 Xiamen Yaxon Networks Co Ltd filed Critical Xiamen Yaxon Networks Co Ltd
Priority to CN201310234781.6A priority Critical patent/CN103309771B/en
Publication of CN103309771A publication Critical patent/CN103309771A/en
Application granted granted Critical
Publication of CN103309771B publication Critical patent/CN103309771B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The invention provides a method for realizing boot quick recovery of an application program based on an Android system. During shutdown, all running tasks are captured in a system activity stack and component information of each task is analyzed, and package name and class name information is extracted, and the package name and class name information is packaged into secondary serialization models through serialization interfaces; all the secondary serialization models are written into a secondary serialization model list; and list is serialized and written into an internal storage device through an object output stream of a persistent layer, so that a backup file is generated, and the list is rapidly written into the internal storage device of a terminal. When the terminal is booted, the system can analyze the package name and class name information corresponding to each task and reassemble the package name and class name information into component information corresponding to each task rapidly by the aid of deserialization and de-packaging, a new task unit is created, activity information of the application program is written into the system activity stack, and accordingly, a backup application program is recovered to a specific interface of the application program where a user is located in during the latest shutdown.

Description

Realize the start shooting method of fast quick-recovery of application program based on the Android system
Technical field
The present invention relates to a kind ofly realize application program start shooting system and the method thereof of fast quick-recovery based on the Android system.
Background technology
At present, the application program start rejuvenation of various systems all is to want elder generation when shutdown the full detail of program to be backuped in the non-volatile memory device basically, then when start, realize the recovery of program by the Application Backup information of reading and saving in non-volatile memory device.Yet, usually can have such problem when using this technology: in the larger situation of the quantity of information that the application program of moving is many, application structure more complicated, application program contain, the shutdown backup that is difficult to carry out fast application program recovers with start.Improving this not enough difficult problem is: how to locate fast application program to back up, how to extract fast the required effective information of application program to back up and set up its corresponding packaging model and how fast model information effectively to be stored.In view of this, the inventor furthers investigate for the defective of prior art, and has this case to produce.
Summary of the invention
The technical problem to be solved in the present invention, be to provide a kind of and realize the start shooting method of fast quick-recovery of application program based on the Android system, by the direct location crawl of application program task, the direct extraction of effective information, the concise and to the point encapsulation of secondary model, the no write de-lay of persistent layer serializing, solved shut down the fast difficult problem of backup and quick turn-on recovery of application program in the Android system.
The present invention is achieved in that
Realize the start shooting method of fast quick-recovery of application program based on the Android system, described method is applicable to a switching on and shutting down radio receiver, backup Resume service unit, a backstage, a shutdown back-up job thread, a start resume work thread and a persistent layer; Described switching on and shutting down radio receiver and backup Resume service unit, backstage are all to described Android system registry;
Described method comprises shutdown backup-step and start recovering step, and described shutdown backup-step is as follows:
Step 10, described switching on and shutting down radio receiver are monitored start broadcasting or the shutdown broadcasting of Android system, when the user shuts down, trigger the Android system and send shutdown broadcasting;
Step 11, described switching on and shutting down radio receiver receive described shutdown broadcasting, start backup Resume service unit, backstage;
Step 12, described backstage backup Resume service unit starting shutdown back-up job thread;
Step 13, described shutdown back-up job thread directly get access to the active manager of Android system by the Binder inter-process communication mechanisms, then by described active manager all tasks that directly crawl is moving from the active stack of Android system, then it is saved in the local temporary variable task list;
Step 14, from described local temporary variable task list, parse successively the module information of each task;
Step 15, the bag name that directly extracts each task from the module information of each task and class name information become secondary sequence model with the bag name that each task extracts with the class name Information encapsulation by the serializing interface;
Step 16, the secondary sequence model that each task is corresponding write in the tabulation of secondary sequence model successively;
Step 17, the object output stream by persistent layer write internal storage device with described secondary sequence model tabulation serializing, generate backup file;
Described start recovering step is as follows:
Step 20, described switching on and shutting down radio receiver are monitored start broadcasting or the shutdown broadcasting of Android system, when the user starts shooting, trigger the Android system and send start broadcasting;
Step 21, described switching on and shutting down radio receiver receive described start broadcasting, start described backstage backup Resume service unit;
Step 22, the described backstage described start of the backup Resume service unit starting thread of resuming work;
Step 23, the object inlet flow unserializing by persistent layer read the backup file in the internal storage device, generate described secondary sequence model tabulation;
Step 24, from the tabulation of described secondary sequence model, read out successively secondary sequence model corresponding to each task with the backward form;
Step 25, secondary sequence model corresponding to each task carried out model solution encapsulation, parse bag name corresponding to each task and class name information;
Step 26, corresponding bag name and the class name information of each task that will parse are reassembled into module information corresponding to each task;
Module information after step 27, utilization re-assembly creates the Intent object information, and the zone bit of Intent object is set;
The Intent object information of step 28, the described establishment of startup creates new TU task unit, and the Android system will write corresponding application program action message by the Binder inter-process communication mechanisms in the system activity stack, thereby will recover the application program of backup.
Further, the zone bit of the Intent object in the described step 27 is FLAG_ACTIVITY_NEW_TASK.
Further, the backup file that generates in the described step 17 is provided with the BACKUP TIME label, every execution is described shutdown backup-step once, and the backup file of generation is all separately preserved separately, optionally reads corresponding backup file according to the BACKUP TIME label in the described step 23.
The invention has the advantages that:
Under the terminal based on the Android system, utilize the characteristic of Android system, during terminal closedown, the application program task to back up that directly crawl is moving from the active stack of Android system, from each TU task unit, directly extract required associated packet name and the class name information of start rejuvenation, set up corresponding secondary sequence packaging model, trigger serializing by persistent layer, realize the internal storage device of no write de-lay terminal.When starting up of terminal, system can parse bag name corresponding to each task by unserializing and decapsulation rapidly and class name information is reassembled into module information corresponding to each task, thereby create new TU task unit, and past system activity stack writes the action message of application program, thereby recover the application program of backup, the specific interface of residing application program when returning to the last shutdown of user, avoided allowing the user recall last time used application program and the worry brought.Simultaneously, the present invention is historical by the execution that the backup file that is provided with the BACKUP TIME label has recorded application program, supports customer analysis to check.
Description of drawings
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the inventive method structural representation.
Embodiment
See also Fig. 1, realize the start shooting method of fast quick-recovery of application program based on the Android system, described method is applicable to a switching on and shutting down radio receiver, backup Resume service unit, a backstage, a shutdown back-up job thread, a start resume work thread and a persistent layer; Described switching on and shutting down radio receiver and backup Resume service unit, backstage are all to described Android system registry;
Described switching on and shutting down radio receiver is responsible for receiving start broadcasting and the shutdown broadcasting of Android system, then starts described backstage backup Resume service unit;
Backup Resume service unit, described backstage is responsible for starting corresponding worker thread according to the broadcast type that receives, and safeguards the life cycle of whole Android system;
Described shutdown back-up job thread is connected with described persistent layer, and by direct access system active stack, the relevant information of extracting each application program persistent layer that carries out writing direct after the encapsulation of secondary sequence model, the serializing backs up;
The described start thread of resuming work is connected with described persistent layer, after described secondary sequence model solution encapsulation, unserializing, writes action message to described system activity stack, recovers application program;
Described persistent layer is responsible for the encapsulation of application programs relevant information read-write;
Described method comprises shutdown backup-step and start recovering step, and described shutdown backup-step is as follows:
Step 10, described switching on and shutting down radio receiver are monitored start broadcasting or the shutdown broadcasting of Android system, when the user shuts down, trigger the Android system and send shutdown broadcasting;
Step 11, described switching on and shutting down radio receiver receive described shutdown broadcasting, start backup Resume service unit, backstage;
Step 12, described backstage backup Resume service unit starting shutdown back-up job thread;
Step 13, described shutdown back-up job thread directly get access to the active manager of Android system by the Binder inter-process communication mechanisms, then by described active manager all tasks that directly crawl is moving from the active stack of Android system, then it is saved in the local temporary variable task list; Need to prove the application program that a task correspondence one is being moved;
Step 14, from described local temporary variable task list, parse successively the module information of each task; The module information of Android system comprises information on services, broadcast message, intent information and action message; The internal storage device because the module information of each task that obtains can't be write direct, so the present invention realizes by step 15 to step 17;
Step 15, the bag name that directly extracts each task from the module information of each task and class name information become secondary sequence model with the bag name that each task extracts with the class name Information encapsulation by the serializing interface; See also table 1, it describes the secondary sequence model, and its leftmost class name can customize, and middle attribute is the content that the secondary sequence model comprises, and the rightmost explanation is the explanation to attribute:
Figure 2013102347816100002DEST_PATH_IMAGE001
Step 16, the secondary sequence model that each task is corresponding write in the tabulation of secondary sequence model successively;
Step 17, the object output stream by persistent layer write internal storage device with described secondary sequence model tabulation serializing, generate backup file;
Described start recovering step is as follows:
Step 20, described switching on and shutting down radio receiver are monitored start broadcasting or the shutdown broadcasting of Android system, when the user starts shooting, trigger the Android system and send start broadcasting;
Step 21, described switching on and shutting down radio receiver receive described start broadcasting, start described backstage backup Resume service unit;
Step 22, the described backstage described start of the backup Resume service unit starting thread of resuming work;
Step 23, the object inlet flow unserializing by persistent layer read the backup file in the internal storage device, generate described secondary sequence model tabulation;
Step 24, from the tabulation of described secondary sequence model, read out successively secondary sequence model corresponding to each task with the backward form;
Step 25, secondary sequence model corresponding to each task carried out model solution encapsulation, parse bag name corresponding to each task and class name information;
Step 26, corresponding bag name and the class name information of each task that will parse are reassembled into module information corresponding to each task;
Module information after step 27, utilization re-assembly creates the Intent object information, and the zone bit of Intent object is set; Described zone bit is FLAG_ACTIVITY_NEW_TASK, and this zone bit reporting system has the new task unit to create;
The Intent object information of step 28, the described establishment of startup creates new TU task unit, and the Android system will write corresponding application program action message by the Binder inter-process communication mechanisms in the system activity stack, thereby will recover the application program of backup.
More preferably, the backup file that generates in the described step 17 arranges the BACKUP TIME label, every execution is described shutdown backup-step once, the backup file that generates is all separately preserved separately, backup file before not covering, the execution of application program that can record like this this Android system is historical, and the object inlet flow unserializing by persistent layer in the described step 23 reads the backup file in the internal storage device, generates described secondary sequence model tabulation; When being provided with the BACKUP TIME label, therefore, the user checks each backup file by analysis, then optionally reads required backup file according to the BACKUP TIME label, generates the tabulation of secondary sequence model.
Under the terminal based on the Android system, utilize the characteristic of Android system, during terminal closedown, the application program task to back up that directly crawl is moving from the active stack of Android system, from each TU task unit, directly extract required associated packet name and the class name information of start rejuvenation, set up corresponding secondary sequence packaging model, trigger serializing by persistent layer, realize the internal storage device of no write de-lay terminal.When starting up of terminal, system can parse bag name corresponding to each task by unserializing and decapsulation rapidly and class name information is reassembled into module information corresponding to each task, thereby create new TU task unit, and past system activity stack writes the action message of application program, thereby recover the application program of backup, the specific interface of residing application program when returning to the last shutdown of user, avoided allowing the user recall last time used application program and the worry brought.Simultaneously, the present invention is historical by the execution that the backup file that is provided with the BACKUP TIME label has recorded application program, supports customer analysis to check.
Although more than described the specific embodiment of the present invention; but being familiar with those skilled in the art is to be understood that; our described specific embodiment is illustrative; rather than for the restriction to scope of the present invention; those of ordinary skill in the art are in modification and the variation of the equivalence of doing according to spirit of the present invention, all should be encompassed in the scope that claim of the present invention protects.

Claims (3)

1. realize the start shooting method of fast quick-recovery of application program based on the Android system, it is characterized in that: described method is applicable to a switching on and shutting down radio receiver, backup Resume service unit, a backstage, a shutdown back-up job thread, a start resume work thread and a persistent layer; Described switching on and shutting down radio receiver and backup Resume service unit, backstage are all to described Android system registry;
Described method comprises shutdown backup-step and start recovering step, and described shutdown backup-step is as follows:
Step 10, described switching on and shutting down radio receiver are monitored start broadcasting or the shutdown broadcasting of Android system, when the user shuts down, trigger the Android system and send shutdown broadcasting;
Step 11, described switching on and shutting down radio receiver receive described shutdown broadcasting, start backup Resume service unit, backstage;
Step 12, described backstage backup Resume service unit starting shutdown back-up job thread;
Step 13, described shutdown back-up job thread directly get access to the active manager of Android system by the Binder inter-process communication mechanisms, then by described active manager all tasks that directly crawl is moving from the active stack of Android system, then it is saved in the local temporary variable task list;
Step 14, from described local temporary variable task list, parse successively the module information of each task;
Step 15, the bag name that directly extracts each task from the module information of each task and class name information become secondary sequence model with the bag name that each task extracts with the class name Information encapsulation by the serializing interface;
Step 16, the secondary sequence model that each task is corresponding write in the tabulation of secondary sequence model successively;
Step 17, the object output stream by persistent layer write internal storage device with described secondary sequence model tabulation serializing, generate backup file;
Described start recovering step is as follows:
Step 20, described switching on and shutting down radio receiver are monitored start broadcasting or the shutdown broadcasting of Android system, when the user starts shooting, trigger the Android system and send start broadcasting;
Step 21, described switching on and shutting down radio receiver receive described start broadcasting, start described backstage backup Resume service unit;
Step 22, the described backstage described start of the backup Resume service unit starting thread of resuming work;
Step 23, the object inlet flow unserializing by persistent layer read the backup file in the internal storage device, generate described secondary sequence model tabulation;
Step 24, from the tabulation of described secondary sequence model, read out successively secondary sequence model corresponding to each task with the backward form;
Step 25, secondary sequence model corresponding to each task carried out model solution encapsulation, parse bag name corresponding to each task and class name information;
Step 26, corresponding bag name and the class name information of each task that will parse are reassembled into module information corresponding to each task;
Module information after step 27, utilization re-assembly creates the Intent object information, and the zone bit of Intent object is set;
The Intent object information of step 28, the described establishment of startup creates new TU task unit, and the Android system will write corresponding application program action message by the Binder inter-process communication mechanisms in the system activity stack, thereby will recover the application program of backup.
2. according to claim 1ly realize the start shooting method of fast quick-recovery of application program based on the Android system, it is characterized in that: the zone bit of the Intent object in the described step 27 is FLAG_ACTIVITY_NEW_TASK.
3. according to claim 1ly realize the start shooting method of fast quick-recovery of application program based on the Android system, it is characterized in that: the backup file that generates in the described step 17 is provided with the BACKUP TIME label, every execution is described shutdown backup-step once, the backup file that generates is all separately preserved separately, optionally reads corresponding backup file according to the BACKUP TIME label in the described step 23.
CN201310234781.6A 2013-06-14 2013-06-14 The method that the fast quick-recovery of application program start is realized based on android system Active CN103309771B (en)

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 true CN103309771A (en) 2013-09-18
CN103309771B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016023160A1 (en) * 2014-08-11 2016-02-18 华为技术有限公司 Method and device for loading view of application and electronic terminal
CN105592229A (en) * 2016-02-17 2016-05-18 青岛海信电器股份有限公司 Terminal switching-on/-off processing method and terminal switching-on/-off processing device
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
CN108958980A (en) * 2018-07-23 2018-12-07 Oppo(重庆)智能科技有限公司 Prevent method, electronic device and the computer readable storage medium of Activity life cycle exception
WO2020061805A1 (en) * 2018-09-26 2020-04-02 Intel Corporation Power Off and Power On Method and Apparatus For an In-Vehicle System

Citations (4)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016023160A1 (en) * 2014-08-11 2016-02-18 华为技术有限公司 Method and device for loading view of application and electronic terminal
CN105518638A (en) * 2014-08-11 2016-04-20 华为技术有限公司 Method and device for loading view of application and electronic terminal
CN105592229A (en) * 2016-02-17 2016-05-18 青岛海信电器股份有限公司 Terminal switching-on/-off processing method and terminal switching-on/-off processing device
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
CN108958980A (en) * 2018-07-23 2018-12-07 Oppo(重庆)智能科技有限公司 Prevent method, electronic device and the computer readable storage medium of Activity life cycle exception
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
WO2020061805A1 (en) * 2018-09-26 2020-04-02 Intel Corporation Power Off and Power On Method and Apparatus For an In-Vehicle System

Also Published As

Publication number Publication date
CN103309771B (en) 2018-04-20

Similar Documents

Publication Publication Date Title
CN103309771A (en) Method for realizing boot quick recovery of application program based on Android system
CN104268055B (en) The monitoring method and device of a kind of program exception
CN104102506B (en) A kind of Android Acceleration of starting methods based on ARM platforms
CN102207881B (en) Quick operation system start-up method based on Android
CN102650947B (en) Continuous increment over-the-air upgrade method of Android handheld equipment
CN103324549B (en) The implementation method of sleep standby and communication terminal
CN103049317B (en) Based on the high concurrent data no write de-lay system and method for queue under cloud environment
CN105677477A (en) Method and device for optimizing application program resources and electronic equipment
CN101794261B (en) Mapping table data recovery method and device
CN103019899A (en) Method and system for replaying intelligent terminal event as well as intelligent terminal
CN104346265A (en) Terminal equipment and acquisition method and device for log information thereof
CN103870303A (en) Method and device for reducing size of software installation package
CN104714863A (en) Method for completely storing Raid card logs on basis of Linux operation system after system crashes
CN103176864A (en) Backup method, backup device and mobile terminal based on Android system
CN102207897A (en) Incremental backup method
WO2018068639A1 (en) Data recovery method and apparatus, and storage medium
CN106033363B (en) Upgrading method and upgrading device for application program of embedded system
CN102455932A (en) Serial execution method, device and system for task instances
CN104102498A (en) Mobile terminal and booting method thereof
CN104778087A (en) Information processing method and information processing device
CN103514086A (en) Extraction method and device for software error report
CN103457996A (en) Method and system for storing internal data of protocol conformance testing system
CN103294573B (en) A kind of intelligent terminal and data back up method thereof
CN103150222B (en) The method and apparatus of embedded system abnormal restoring
CN101739115A (en) Simplified type host computer and method for wakening same

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