A kind of method and terminal waking up terminal systemTechnical field
The invention belongs to saving power for terminal field more particularly to a kind of methods and terminal for waking up terminal system.
Background technique
Current intelligent terminal due to having the function of big display screen, communication network standby (2G/3G), Wifi and bluetooth etc.,So the electric quantity consumption of its battery is also quickly, go out shield it is standby after, terminal system, which is awakened as frequently as those utilized in conventional solutions, also accelerates end cell electricityAmount consumption.
Take the mobile phone as an example, under normal circumstances, after mobile phone goes out screen, system for power saving, will make over time beSystem enters dormant state after the mobile phone for being equipped with android system goes out screen, not to be had by taking android system as an example when detectingAfter application program needs to occupy CPU, under android system can save various Application Status currently running in systemCome, subsequently into suspend mode;When system is waken up, the state before restoring each application program suspend mode is reloaded.Every timeWhen system is waken up, require to reload and restore the state before suspend mode.After mobile phone suspend mode, frequent wake-up system be will lead toMobile phone power consumption amount is big, shortens the cruise duration of mobile phone.
There are two types of the modes that General System wakes up, the first is hardware awake mode, i.e., by by power key, plug USBCPU is waken up Deng interrupt requests (IRQ) is initiated to CPU by power management chip;Second is periodically to be called out by waking up timerAwake mode, general terminal system are both provided with wake-up timer, in system suspend mode, if device reaches in advance when waking up timerIf the time can wake up system, some needs carried out with network server the application such as QQ of data exchange, wechat, weather clock,Sina weibo, Sohu's news etc. can be realized periodically and network server by the wake-up timer for calling terminal system to provideIt is communicated, is timely serviced with providing.Since current many application programs are in order to provide relatively good service, can frequently openDynamic system timer, and in actual use, when terminal is in suspend mode, major applications program is not all neededFrequently wake up to provide timely message, such as weather clock, Sohu's news.It is answered in this way, terminal is various when being in suspend modeSystem is frequently waken up with program can greatly shorten the cell phone standby time.
General terminal such as mobile phone can do power consumption test when leaving the factory, the various application programs preset for mobile phone, mobile phoneManufacturer can do dormancy awakening test when mobile phone is in suspend mode, make when discovery has preset application program to be frequent wake-upWhen larger at system power dissipation, cell phone manufacturer can contact the developer of the corresponding application program, it is desirable that it is modified the application program and setsThe timer duration set reduces the number that the application program wakes up system in the hibernation mode, so that it is guaranteed that former when mobile phone dispatches from the factoryBeginning system power dissipation meets certain index request.
However, this method can only limit the number and duration that the preset various application programs of cell phone system wake up system, soAnd terminal user can also voluntarily download the various application programs of installation, and the application program that user downloads installation is also likely to be presentThe problem of frequently waking up system, obviously rises in this way, then may cause terminal standby power consumption, to accelerate disappearing for terminal powerConsumption.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of method and terminal for waking up terminal system, to solve terminal systemIt is awakened as frequently as those utilized in conventional solutions in the hibernation mode and the problem of accelerating terminal electric quantity consumption.
In a first aspect, the embodiment provides a kind of methods for waking up terminal system, this method comprises:
After the display screen of terminal is closed where detecting terminal system, preset blacklist is loaded onto the terminalIn internal storage, which is had recorded when the terminal system is in suspend mode, forbids waking up answering for the terminal systemUse program;
After the terminal system enters suspend mode, it is determined whether there is application program to need to wake up terminal system;
If it is determined that there is application program to need to wake up the terminal system, whether the determining application program for needing to wake up terminal systemIn the blacklist;
If the needs wake up the application program of terminal system in the blacklist, forbid waking up the terminal system.
In the first implementation of first aspect, the display screen of terminal closes it where detecting terminal systemAfterwards, also preset white list is also loaded onto the internal storage of the terminal, which has recorded at the terminal systemWhen suspend mode, allow to wake up systematic difference program, if judging system wake-up time corresponding application program not at thisIn blacklist, then continue to judge system wake-up time corresponding application program whether in the white list, if allowing thisApplication program wakes up the terminal system, if not existing, generates one and wakes up record, records the application program and stops in terminal system entranceThe number of terminal system is waken up in a preset time after sleep mode, is preset if the wake-up records recorded number greater than oneValue, then the application program is added in the blacklist, if the wake-up records recorded number and is not more than the preset value, allowsThe application program wakes up the terminal system.
In the method for waking up terminal system provided by the first of first aspect and first aspect implementation, the endEnd internal storage also stores a block list, the application program of terminal system is if desired waken up in the blacklist, also into oneStep is included the steps that the application records to the block list, after terminal system is waken up, this method further include: is hinderingPlug list triggers the application program in block list one by one when not being sky.
Preferably, in the method for above-mentioned wake-up terminal system, after the display screen of terminal where terminal system is opened,First judge whether the block list is sky, if it is empty, then deletes blacklist, white list and the block list in internal storage,If not empty, then one by one trigger block list in application program, then delete internal storage in blacklist, white list andBlock list.
Second aspect, the embodiment provides a kind of wake-up terminal of terminal system, which includes:
Loading module, after the display screen for the terminal where detecting terminal system is closed, by preset blacklistIt is loaded onto the internal storage of the terminal;Judgment module, after the terminal system enters suspend mode, it is determined whether have applicationProgram needs to wake up the terminal system, when determining has application program to need to wake up the terminal system, determines the system wake-upWhether time corresponding application program is in the blacklist;
Forbid wake-up module, for forbidding calling out when the system wake-up time corresponding application program is in the blacklistIt wakes up the terminal system.
In the first implementation of second aspect, the display screen of loading module terminal where detecting terminal systemAfter closing, also preset white list is also loaded onto the internal storage of the terminal, which has recorded in the terminalWhen system is in suspend mode, allow to wake up systematic difference program, which further includes that a wake-up module and one are frequentWake up processing module, the judgment module judge system wake-up time corresponding application program not in the blacklist, then afterIt is continuous to judge system wake-up time corresponding application program whether in the white list, if the wake-up module wakes up the endEnd system, if not existing, this frequently wakes up processing module and generates a wake-up record, records the application program and stops in terminal system entranceThe number of terminal system is waken up in a preset time after sleep mode, is preset if the wake-up records recorded number greater than oneValue, this frequently wakes up processing module and the application program is added in the blacklist, if the recorded number of wake-up record is littleIn the preset value, then the wake-up module wakes up the terminal system.
In the terminal for waking up terminal system provided by the first implementation of second aspect, the terminal inner memoryA block list is also stored, if judgment module judges system wake-up time corresponding application program in the blacklist, this is forbiddenWake-up module is further by the application records a to block list, and after terminal system is waken up, which is sentencingThe application program in block list is triggered when disconnected block list is not sky one by one.
It preferably, further include a bright screen recovery module, in the display of terminal in the terminal of the wake-up terminal systemAfter screen is opened, which judges whether the block list is sky, if it is empty, then deletes black in internal storageList, white list and block list then trigger the application program in block list one by one, then delete internal deposit if not emptyBlacklist, white list and block list in reservoir.
For the embodiment of the present invention by setting blacklist, the blacklist is added before terminal system enters suspend mode shouldIn the internal storage of terminal, then when terminal system is in suspend mode, if there is application program to need to wake up the terminal system,Then first confirm the application program whether in the blacklist, if, forbid the application program to wake up the terminal system, thusReduce the number that terminal system is waken up in the dormant state, disappears to reduce the electricity of terminal system in the dormant stateConsumption, achievees the purpose that power saving.
Detailed description of the invention
Fig. 1 is the flow chart of the method for the wake-up terminal system that the embodiment of the present invention one provides.
After the screen opening for the terminal that Fig. 2 provides for the embodiment of the present invention one, restore the process of the method for terminal systemFigure.
Fig. 3 is the functional block diagram of the terminal provided by Embodiment 2 of the present invention for waking up terminal system.
Specific implementation
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, rightThe present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, andIt is not used in the restriction present invention.
Specific implementation of the invention is described in detail below in conjunction with specific embodiment:
Embodiment one:
As shown in Figure 1, being a kind of flow chart of the method for wake-up terminal system that the embodiment of the present invention one provides.This methodInclude:
Step S101, whether the display screen of terminal closes where detecting the terminal system;
Preset blacklist, white list are loaded onto the internal storage of the terminal if display screen is closed by step S102In, which is the pre-set application program for forbidding waking up the terminal system, which is pre-If what is be arranged is recorded in the terminal system and is in suspend mode, allow to wake up systematic difference program;
Step S103 makes the terminal system enter suspend mode;
Step S104, it is determined whether there is application program to need to wake up the terminal system;
Determine whether that application program needs to wake up the terminal system method particularly includes: wakeup time record is generated, it shouldWakeup time records the system wake-up time for recording each application program, which is to be in terminal systemWhen suspend mode, the time which wakes up system records the wakeup time after terminal system enters suspend modeIt is loaded onto the internal storage of the terminal, after terminal system enters suspend mode, if reaching between the timing of system timer instituteThe system wake-up time recorded in wakeup time record, that is, it can determine that application program needs to wake up terminal system.
Step S105 is further determined that when determining has application program to need to wake up the terminal system and is needed to wake up the endWhether the application program of end system is in the blacklist;
Step S106, if the system wake-up time corresponding application program forbids waking up the terminal in the blacklistSystem, and the application program is added in a block list;
Step S107, if the system wake-up time corresponding application program not in the blacklist, continues to judge that this isThe corresponding application program of wakeup time unite whether in the white list, if thening follow the steps S108, if not existing, executing stepRapid S110;
Step S108 wakes up system;
After wake-up system, the application program in block list is triggered when block list is not sky one by one by step S109.
Step S110 generates one and wakes up record, and it is one pre- after terminal system enters suspend mode to record the application programIf waking up the number of terminal system in the time;
Step S111 judges that the wake-up records whether recorded number is greater than a preset value, if so, thening follow the stepsS112, if it is not, then return step S108;
The application program is added in blacklist step S112.
In this way, passing through setting blacklist, it is possible to reduce the number that system is waken up in the dormant state, to reduce endThe consumption of electricity is held, in addition, setting white list, it is ensured that the available timely information kimonos of the certain applications that user specifiesBlock list is arranged in business, it is ensured that the event that terminal is not responded because forbidding wake-up system in the hibernation mode, in systemApplication program can be notified to handle after being waken up, in addition, setting wakes up record, it is ensured that system closes it in terminal display screenAfterwards, terminal system can notify application program to execute event before entering suspend mode, and enter suspend mode in terminal systemForbid wake-up system later.
As shown in Fig. 2, after for the screen opening of terminal, the flow chart for the method that terminal system is restored.Step S201,After terminal display screen is opened, first determine whether block list is sky, if it is being not sky, thens follow the steps S202, ifFor sky, S203 is thened follow the steps;
Step S202 triggers the application program in block list one by one, then executes step 203;
Step S203 deletes blacklist, white list and block list in internal storage.
In this way, by the application program in triggering block list, can be notified corresponding after the display screen of terminal is openedApplication program execute corresponding event, to allow the information and service for obtaining that the application program provides in time for user.
In another embodiment of the present invention, after terminal display screen unlatching, first with the black name in internal storageSingle more newly-installed blacklist, then executes step S201 again.
Embodiment two:
As shown in figure 3, for a kind of functional block diagram for the terminal 3 for waking up terminal system provided by Embodiment 2 of the present invention.The terminal loads module 301, judgment module 302 forbid wake-up module 303, wake-up module 304, frequently wake up processing module 305And bright screen recovery module 306.
Whether the display screen of terminal closes where the loading module 301 is used to detect the terminal system, if display screen is closed,Then preset blacklist and white list are loaded onto the internal storage of the terminal, and the terminal system is made to enter suspend mode mouldFormula, the blacklist have recorded when the terminal system is in suspend mode, forbid the application program for waking up the terminal system, this is whiteList has recorded when the terminal system is in suspend mode, allows to wake up systematic difference program;.
Judgment module 302 is after the terminal system enters suspend mode, it is determined whether has application program to need to wake up the endEnd system determines that the system wake-up time is corresponding using journey when determining has application program to need to wake up the terminal systemSequence whether in the blacklist, if the system wake-up time corresponding application program notifies this to forbid calling out in the blacklistModule 303 of waking up forbids waking up the terminal system, and the application program is added in a block list.
If the needs wake up the application program of terminal system not in the blacklist, which continues to judgeWhether the system wake-up time corresponding application program is in the white list, if waking up terminal system in, wake-up module 304,And trigger the application program in block list one by one when block list is not sky.If not existing, processing module 305 is frequently waken upIt generates one and wakes up record, record the application program and wake up terminal system in the preset time after terminal system enters suspend modeThe number of system judges that the wake-up records whether recorded number is greater than a preset value, if so, black name is added in the application programDan Zhong, if it is not, then executing wake-up module 304.
The bright screen recovery module 306 first determines whether block list is sky after terminal display screen unlatching, if it isIt is not sky, then triggers the application program in block list one by one, if it is sky, deletes blacklist in internal storage, whiteList and block list.
In other embodiments, which first uses storage inside before judging block list for skyBlacklist in device updates preset blacklist.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the inventionMade any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.