CN106095412A - The method for closing of a kind of application program and device - Google Patents

The method for closing of a kind of application program and device Download PDF

Info

Publication number
CN106095412A
CN106095412A CN201610379851.0A CN201610379851A CN106095412A CN 106095412 A CN106095412 A CN 106095412A CN 201610379851 A CN201610379851 A CN 201610379851A CN 106095412 A CN106095412 A CN 106095412A
Authority
CN
China
Prior art keywords
function
application program
rank
wake
object function
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
CN201610379851.0A
Other languages
Chinese (zh)
Other versions
CN106095412B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610379851.0A priority Critical patent/CN106095412B/en
Publication of CN106095412A publication Critical patent/CN106095412A/en
Priority to PCT/CN2017/086468 priority patent/WO2017206871A1/en
Application granted granted Critical
Publication of CN106095412B publication Critical patent/CN106095412B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Stored Programmes (AREA)

Abstract

Embodiments provide method for closing and the device of a kind of application program, this method for closing is to the function setup function rank in application program, receive the out code of this application program, and obtain this application program according to this out code and wake up feature up by wake up that lock wakes up system up up in preset time period, wake up feature up according to this and obtain corresponding first object function rank, close corresponding function in this application program according to this first object function rank;The program can wake up the feature that wakes up up of system up and closes corresponding function in application program by waking up lock up based on application program in preset time period, the electric quantity consumption of terminal can be reduced, and owing to the program does not directly close application program, but corresponding function in closedown application program, when needs restart this application program, have only to the pent function of re invocation, while can consuming reducing terminal power, promote the speed that application program restarts.

Description

The method for closing of a kind of application program and device
Technical field
The present invention relates to field of terminal technology, be specifically related to method for closing and the device of a kind of application program.
Background technology
Along with the development of intelligent terminal, intelligent terminal compatible function can get more and more, not only enriches the life of user, Also bring advantage to the user.Day by day incorporate people's life along with mobile terminal device, application function is gradually improved, and brings to user Great convenience and improve Consumer's Experience.
In order to realize various function to meet the various demands of user, usual intelligent terminal can install various application Program (can referred to as be applied), such as, and social networking application, Video Applications, game application etc..Different application programs is running Time, the operation demand for each assembly of intelligent terminal is different, and the power consumption for intelligent terminal is the most different.Such as, social Application (such as, wechat) operationally, wakes up lock up by CPU (central processing unit, Central Processing Unit) and protects The CPU holding intelligent terminal is in running status;Video Applications (such as, excellent cruel) operationally, wakes up lock up by CPU and screen is called out Awake lock keeps the CPU of intelligent terminal and screen all in running status.Therefore, the application program of the upper installation of intelligent terminal is in fortune During row, substantial amounts of electricity can be consumed, reduce the flying power of intelligent terminal.
Generally, application program operationally, can run a principal function and the multiple subfunctions called by principal function.Mesh Before, in order to reduce the consumption of intelligent terminal's electricity, and then the flying power of lifting intelligent terminal, intelligent terminal is closing application journey All of function in application program (including principal function, subfunction etc.) can be closed during sequence.
But, although the shutdown strategy of current application program can reduce terminal power consumption, but owing to the program is Closing all of function in application program, if after closing application program, intelligent terminal needs to restart this application journey Sequence, then now, intelligent terminal needs all functions of this application program of re invocation, and application program can be caused to restart Speed is slow.
Summary of the invention
The embodiment of the present invention provides method for closing and the device of a kind of application program, can reduce what terminal power consumed Meanwhile, the speed that application program restarts is promoted.
The embodiment of the present invention provides the method for closing of a kind of application program, including:
To the function setup function rank in application program;
Receive the out code of described application program, and obtain described application program when default according to described out code Between wake up feature up by wake up that lock wakes up system up up in section;
Corresponding first object function rank is obtained according to the described feature that wakes up up;
Corresponding function in described application program is closed according to described first object function rank.
Further, the described step to the function setup function rank in application program specifically includes:
Obtain the call relation between function in application program;
According to described call relation to the function setup function rank in described application program.
Further, described in wake up feature up and include wake-up times, wake up feature described in described basis up and obtain corresponding first The step of object function rank specifically includes:
Determine that the wake-up times residing for described wake-up times is interval;
Corresponding first object function rank is obtained according to described wake-up times interval.
Further, described first object function rank is less than the highest function rank, described according to described first object letter Several levels is not closed the step of corresponding function in described application program and is specifically included:
Judge whether described first object function rank is minimum function rank;
The most then close the function that first object function rank described in described application program is corresponding;
If it is not, then close the function that first object function rank described in described application program is corresponding, and function rank Function less than described first object function rank.
Further, the described step closing function accordingly in described application program according to described first object function rank After Zhou, described method for closing also includes:
Obtain the information about power that terminal is current;
Obtaining corresponding second object function rank according to described information about power, described second object function is superior to institute State first object function rank;
Corresponding function in described application program is closed according to described second object function rank.
Further, the described step to the function setup function rank in application program specifically includes:
Obtain the set calling function calling sensor in application program;
To described set calls function setup function rank;
Described close the step of corresponding function in described application program according to described first object function rank and specifically wrap Include:
Close in described set according to described first object function rank and call function accordingly.
Accordingly, the embodiment of the present invention also provides for the shutoff device of a kind of application program, including:
Module is set, for the function setup function rank in application program;
First acquisition module, for receiving the out code of described application program, and obtains institute according to described out code State application program and wake up feature up by wake up that lock wakes up system up up in preset time period;
Second acquisition module, obtains corresponding first object function rank for waking up feature described in basis up;
First processing module, for closing corresponding letter in described application program according to described first object function rank Number.
Further, the described module that arranges specifically includes:
First obtains submodule, for obtaining in application program the call relation between function;
Submodule is set, is used for according to described call relation the function setup function rank in described application program.
Further, wake up feature described in up and include that wake-up times, described second acquisition module specifically include:
Determine submodule, interval for determining the wake-up times residing for described wake-up times;
Second obtains submodule, for obtaining corresponding first object function rank according to described wake-up times interval.
Further, described first object function rank is less than the highest function rank, and described first processing module is specifically wrapped Include:
Judge submodule, be used for judging whether described first object function rank is minimum function rank;
Process submodule, for when described judgement submodule is judged as YES, close described in described application program first The function that object function rank is corresponding;When described judgement submodule is judged as NO, close described in described application program first The function that object function rank is corresponding, and function rank is less than the function of described first object function rank.
Further, described shutoff device also includes that the second processing module, described second processing module are used for:
Obtain the information about power that terminal is current;
Obtaining corresponding second object function rank according to described information about power, described second object function is superior to institute State first object function rank;
Corresponding function in described application program is closed according to described second object function rank.
The embodiment of the present invention uses the function setup function rank in application program, and the closedown receiving this application program refers to Order, and obtain this application program according to this out code and wake up feature up by wake up that lock wakes up system up up in preset time period, Wake up feature up according to this and obtain corresponding first object function rank, and close this application journey according to this first object function rank Corresponding function in sequence;The program first corresponds to by the function setup function rank in program, then according to application program in advance If the feature that wakes up up waking up system in the time period by waking up lock up up obtains object function rank, and close in application program with this mesh The corresponding function of scalar functions rank, owing to the program does not directly close application program, but closes in application program corresponding Function, therefore, when needs restart this application program, it is only necessary to the pent function of re invocation, relative to For prior art, while can consuming reducing terminal power, promote the speed that application program restarts.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in embodiment being described below required for make Accompanying drawing be briefly described, it should be apparent that, below describe in accompanying drawing be only some embodiments of the present invention, for From the point of view of those skilled in the art, on the premise of not paying creative work, it is also possible to obtain the attached of other according to these accompanying drawings Figure.
Fig. 1 is the schematic flow sheet of the method for closing of the application program that the embodiment of the present invention one provides;
Fig. 2 is the schematic flow sheet of the method for closing of the application program that the embodiment of the present invention two provides;
Fig. 3 is the schematic flow sheet of the method for closing of the application program that the embodiment of the present invention three provides;
Fig. 4 a is the structural representation of the shutoff device of the first application program that the embodiment of the present invention four provides;
Fig. 4 b is the structural representation of the shutoff device of the second application program that the embodiment of the present invention four provides;
Fig. 4 c is the structural representation of the shutoff device of the third application program that the embodiment of the present invention four provides;
Fig. 4 d is the structural representation of the shutoff device of the 4th kind of application program that the embodiment of the present invention four provides;
Fig. 4 e is the structural representation of the shutoff device of the 5th kind of application program that the embodiment of the present invention four provides.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on Embodiment in the present invention, the every other enforcement that those skilled in the art are obtained under not making creative work premise Example, broadly falls into the scope of protection of the invention.
The embodiment of the present invention provides method for closing and the device of a kind of application program, will be described in detail respectively below.
Embodiment one
The present embodiment will be described from the angle of the shutoff device of application program, and this device specifically can be integrated in terminal In, this terminal can be the equipment such as smart mobile phone, panel computer.
A kind of method for closing of application program, including: to the function setup function rank in application program, receive this application The out code of program, and obtain this application program according to this out code and wake up system up by waking up lock up in preset time period Wake up feature up, wake up feature up according to this and obtain corresponding first object function rank, and according to this first object function rank Close corresponding function in this application program.
As it is shown in figure 1, the method for closing of this application program, idiographic flow may include that
S101, to the function setup function rank in application program.
Specifically, it is possible at upper any one application program run of operating system (such as, Android system, Android), Being required for a principal function (or referred to as monoexponential function), principal function is the entrance of application program, for the various letters to other Number (subfunction) calls, invoked subfunction perform various function, simultaneously because principal function needs to provide application The operation result of program, therefore principal function is also the outlet of application program.Generally principal function is relatively more succinct, and application program needs reality The detail of existing function is packaged into inside subfunction and calls, additionally, subfunction can also call other for principal function Subfunction.
Function setup function rank in application program can there be is multiple implementation method, can root in the embodiment of the present invention Arranging function rank according to the call relation between function, such as, the rank of principal function is set to 1 grade, the letter of 1 grade of function call The rank of number is set to 2 grades, and the rank of the function of 2 grades of function calls is set to 3 grades, and the rank of the function of 3 grades of function calls sets It is set to 4 grades, by that analogy.The numerical value of function rank shows that the most greatly this function is in the position of more lower floor in call relation, i.e. The rank of this function is the lowest.
When arranging function rank according to the call relation between function, to the function setup function rank in application program Specifically may comprise steps of:
Obtain the call relation between function in application program;
According to this call relation to the function setup function rank in this application program.
Specifically, the implementation obtaining in application program the call relation between function can have multiple, for example, it is possible to The call relation between function is obtained according to the call instruction in function code.Such as, the code of function A includes function The call instruction of B, the code of function B includes the call instruction to function C, the code of function C to include function D calling Order, then the call relation that can get between function is: function A calls function B, function B and calls function C, function C and call Function D.
When, after the call relation got between function, the function rank of function being arranged according to this call relation, Such as, the rank arranging function A is 1 grade, and the rank of function B is 2 grades, and the rank of function C is 3 grades, and the rank of function D is 4 grades.
S102, receives the out code of this application program, and obtains this application program when default according to this out code Between wake up feature up by wake up that lock wakes up system up up in section.
Specifically, the mode of the out code receiving application program can have multiple, uses for example, it is possible to received by screen The out code that the touch operation at family sends, it is also possible to receive user by remotely operating the out code sent, it is also possible to be Receive the out code that the intervalometer of terminal inner triggers.
After receiving out code, obtain application program and wake up spy up by wake up that lock wakes up system up up in preset time period Levy.This preset time period can be the time value being stored in advance in terminal built-in memory area, it is also possible to be user setup And it is stored in a time value of terminal built-in memory area, such as, 1 minute.This wakes up up in feature can be preset time period Wake-up times or the feature such as wakeup frequency, such as, this application program woke up terminal system up 5 times by waking up lock up in 1 minute.
S103, wakes up feature up according to this and obtains corresponding first object function rank.
Specifically, can prestore in the built-in memory area of terminal and wake up up between feature and object function rank Mapping relations, these mapping relations can also be by user setup the built-in memory area being stored in terminal.Wake up up when getting After feature, call the mapping relations being stored in terminal built-in memory area, obtain object function rank according to these mapping relations. Such as, in mapping relations, 5 corresponding object function ranks of wake-up times are 3 grades, then be characterized as waking up up time when getting to wake up up When number is 5 times, can get corresponding object function rank according to these mapping relations is 3 grades.
In actual application, it is understood that there may be multiple features that wake up up all correspond to same object function rank, such as, wake up up secondary Several 5 object function ranks corresponding with 6 times are all 3 grades, therefore, in a preferred embodiment of the invention, when waking up spy up Levy when including wake-up times, wake up feature up according to this and obtain corresponding first object function rank and can specifically include following step Rapid:
Determine that the wake-up times residing for this wake-up times is interval;
Corresponding first object function rank is obtained according to this wake-up times interval.
Specifically, can prestore in the built-in memory area of terminal wake-up times interval with object function rank it Between mapping relations, such as, wake-up times interval [5,10) corresponding object function rank is 3 grades, wake-up times interval [10, 15) corresponding object function rank is 2 grades.
When get application program in preset time period by waking up lock up and waking up the wake-up times of system up after, determine that this is called out The wake-up times residing for number of times of waking up is interval.Such as, wake-up times is got when being 5, it may be determined that calling out residing for this wake-up times Wake up time intervals be [5,10), then calling the mapping relations prestored and can getting corresponding object function rank is 3 Level.
S104, closes corresponding function in this application program according to this first object function rank.
Specifically, when getting object function rank, close corresponding function in application program, such as, get mesh When scalar functions rank is 3 grades, close all of 3 grades of functions in application program.
In order to ensure application program when next time starts can start quickly speed, need to keep principal function in application program Continuous service, i.e. principal function can not be closed, and therefore, this first object function rank should be less than the highest function rank ( High function rank is the rank of principal function).
In concrete application, after certain function is closed, by the subfunction of this function call will be unable to play a role (because Its function return value cannot be input in application program by invoked subfunction), therefore, if existing by the son of this function call Function, can be further turned off by the subfunction of this function call.Therefore, this application is closed according to this first object function rank In program, corresponding function can specifically include following steps:
Judge whether this first object function rank is minimum function rank;
The most then close the function that in this application program, this first object function rank is corresponding;
If it is not, then close the function that in this application program, this first object function rank is corresponding, and function rank is less than The function of this first object function rank.
Specifically, it is judged that whether this first object function rank is that minimum function level method for distinguishing can have multiple, such as, Inquire about in all functions that this application program runs in systems, if exist by function call corresponding to this object function rank Subfunction.Such as, this object function rank is 3 grades, then judge whether by 4 grades of functions of 3 grades of function calls.
When judging that this first object function rank is minimum function rank, close this first object function rank corresponding Function, such as, closes all of 3 grades of functions;When judging that this first object function rank is not minimum function rank, close letter Several levels not little Yu Huodengyu the function of this object function rank, such as, close all of 3 grades of functions, 4 grades of functions and 5 grades of letters Number (if there are invoked 5 grades of functions).
In actual application, after according to corresponding function in first object function rank closedown application program, may deposit In situations below, i.e. terminal current electric quantity is few, and user wishes to be further turned off remaining in application program be not turned off function, Therefore, the method for closing of this application program can further include steps of
Obtain the information about power that terminal is current;
According to this information about power obtain corresponding second object function rank, this second object function be superior to this first Object function rank;
Corresponding function in this application program is closed according to this second object function rank.
Specifically, the implementation obtaining the current information about power of terminal has multiple, for example, it is possible to carried by terminal Power management routines obtains information about power, and this information about power can be the percentage ratio that dump energy accounts for battery total capacity, such as, and electricity Amount information is 30% expression terminal current residual 30% electricity.
Reflecting between information about power and the second object function rank can be prestored in the built-in memory area of terminal Penetrating relation, the object function rank that such as 30% electricity is corresponding is 3 grades, and the object function rank that 20% electricity is corresponding is 2 grades etc., After getting the information about power of terminal, call the mapping relations stored in terminal to obtain corresponding second object function rank; The mapping between information about power interval and the second object function rank can also be prestored in the built-in memory area of terminal Relation, such as, information about power [30%, 40%) corresponding object function rank is 3 grades, [20%, 30%) corresponding target letter Several levels is not 2 grades etc., then, after getting the information about power of terminal, first determine that the information about power residing for this information about power is interval, with Afterwards according to this information about power is interval and mapping relations obtain the second object function rank.
According to described above, function corresponding to first object function rank is the most all closed, and remaining is not turned off letter The function rank of number should be above first object function rank, and therefore, this second object function rank should be above this first mesh Scalar functions rank.
Close corresponding function in this application program according to this second object function rank, specifically, get the second mesh After scalar functions rank, such as, getting the second object function rank according to information about power 20% is 2 grades, then close application program In all of 2 grades of functions, or close all of 2 grades of functions and the function rank function (3 grades less than 2 grades in application program Function, 4 grades of functions etc.).
From the foregoing, it will be observed that the method for closing of the application program of embodiment of the present invention offer, use the function in application program Function rank is set, receives the out code of this application program, and obtain this application program when default according to this out code Between wake up feature up by wake up that lock wakes up system up up in section, wake up feature up according to this and obtain corresponding first object function rank, And close corresponding function in this application program according to this first object function rank;The program first corresponds to the letter in program Number arranges function ranks, then wakes up the feature that wakes up up of system in preset time period up by waking up lock up according to application program and obtains Object function rank, and close in application program with this corresponding function of object function rank, due to the program not directly Close application program, but close corresponding function in application program, therefore, when needs restart this application program, only Need the pent function of re invocation, in terms of existing technologies, while can consuming reducing terminal power, Promote the speed that application program restarts.
Embodiment two
According to the method for closing of the application program described by embodiment one, below citing is described in further detail.
In the present embodiment, the shutoff device with application program is specifically integrated in smart mobile phone, with in smart mobile phone It is described in detail as a example by the method for closing of application program.
As in figure 2 it is shown, the method for closing of this application program, idiographic flow can be such that
S201, obtains the call relation between function in application program.
Specifically, the implementation obtaining in application program the call relation between function can have multiple, for example, it is possible to The call relation between function is obtained according to the call instruction in function code.Such as, the code of function A includes function The call instruction of B, the code of function B includes the call instruction to function C, the code of function C to include function D calling Order, then the call relation that can get between function is: function A calls function B, function B and calls function C, function C and call Function D.
S202, according to this call relation to the function setup function rank in this application program.
Specifically, when, after the call relation got between function, the letter of function being arranged according to this call relation Several levels is other, and such as, the rank arranging function A is 1 grade, and the rank of function B is 2 grades, and the rank of function C is 3 grades, the level of function D It is not 4 grades.The numerical value of function rank shows that the most greatly this function is in the level of the position of more lower floor, i.e. this function in call relation The lowest.
S203, receives the out code of this application program, and obtains this application program when default according to this out code Between wake up the wake-up times of system in section up by waking up lock up.
Specifically, smart mobile phone can receive the out code that the touch operation of user sends, such as, user by screen The X button (virtual push button) of this application program on point touching screen, smart mobile phone to this application program send out code with The touch operation of response user.Preset time period can be the time value prestored in smart mobile phone, such as, when presetting Between section be 1 minute, in 1 minute, by counting function, application program is waken up up the number of times of system is counted by being waken up lock up Number, this application program often passes through to wake up lock (such as, CPU wakes up lock up, screen wakes up lock etc. up) up and wakes up intelligent mobile phone system up once, meter The count value of number function increases by 1.When smart mobile phone receives the out code of this application program, this meter in obtaining 1 minute The count value of number function, wakes up the wake-up times of system in preset time period up as this application program by waking up lock up.
S204, determines that the wake-up times residing for this wake-up times is interval.
Specifically, in advance wake-up times can be divided multiple intervals, such as, wake-up times can be divided into [5,10), [10,15), [15,20) etc. multiple intervals, when get application program in preset time period by wake up up lock wake up system up After wake-up times, determine that the wake-up times residing for this wake-up times is interval.Such as, wake-up times is got when being 5, it may be determined that Wake-up times interval residing for this wake-up times be [5,10).
S205, obtains corresponding first object function rank according to this wake-up times interval.
Specifically, can prestore in the built-in memory area of terminal wake-up times interval with object function rank it Between mapping relations, such as, wake-up times interval [5,10) corresponding object function rank is 3 grades, wake-up times interval [10, 15) corresponding object function rank is 2 grades;After determining the wake-up times interval residing for wake-up times, such as, determine wakes up up Time intervals be [5,10), then can call the mapping relations prestored and get corresponding object function rank is 3 grades.
S206, it is judged that whether this first object function rank is minimum function rank.
Specifically, it is judged that whether this first object function rank is that minimum function level method for distinguishing can have multiple, such as, Inquire about in all functions that this application program runs in systems, if exist by function call corresponding to this object function rank Subfunction.Such as, this object function rank is 3 grades, then judge whether by 4 grades of functions of 3 grades of function calls;If not depositing , then it is judged as that this first object function rank is minimum function rank, performing step S207 subsequently, if existing, being then judged as This first object function rank is not minimum function rank, performs step S208 subsequently.
S207, closes the function that in this application program, this first object function rank is corresponding.
Specifically, when judging that this first object function rank is minimum function rank, this first object function level is closed Not corresponding function, such as, first object function rank is 3 grades, then close all of 3 grades of functions.
S208, closes the function that in this application program, this first object function rank is corresponding, and function rank is less than being somebody's turn to do The function of first object function rank.
Specifically, when judging that this first object function rank is not minimum function rank, close function rank less than or Equal to the function of this object function rank, such as, first object function rank is 3 grades, then close all of 3 grades of functions, 4 grades of letters Number and 5 grades of functions (if there are invoked 5 grades of functions).
S209, obtains the information about power that terminal is current.
Specifically, the implementation obtaining the current information about power of terminal has multiple, for example, it is possible to carried by terminal Power management routines obtains information about power, and this information about power can be the percentage ratio that dump energy accounts for battery total capacity, such as, and electricity Amount information is 30% expression terminal current residual 30% electricity.
S210, obtains corresponding second object function rank according to this information about power, and this second object function is superior to This first object function rank.
Specifically, information about power interval and the second object function level can be prestored in the built-in memory area of terminal Mapping relations between Bie, such as, information about power [30%, 40%) corresponding object function rank is 3 grades, information about power [20%, 30%) corresponding object function rank is 2 grades etc., then, after getting the information about power of terminal, first determine that this electricity is believed Information about power residing for breath is interval, and mapping relations that are interval according to this information about power and that prestore obtain the second target letter subsequently Several levels is other.
S211, closes corresponding function in this application program according to this second object function rank.
Specifically, after getting the second object function rank, such as, the second target letter is got according to information about power 20% Several levels is not 2 grades, then close all of 2 grades of functions in application program, or close in application program all of 2 grades of functions and The function rank function (3 grades of functions, 4 grades of functions etc.) less than 2 grades.
From the foregoing, it will be observed that the method for closing of the application program of embodiment of the present invention offer, use and obtain function in application program Between call relation, then according to this call relation to the function setup function rank in this application program, receive this application The out code of program, and obtain this application program according to this out code and wake up system up by waking up lock up in preset time period Wake-up times, determine that wake-up times residing for this wake-up times is interval, and obtain corresponding the according to this wake-up times interval One object function rank, it is judged that whether this first object function rank is minimum function rank, if then closing this application program In function corresponding to this first object function rank, if it is corresponding otherwise to close this first object function rank in this application program Function, and function rank is less than the function of this first object function rank, obtains the information about power that terminal is current subsequently, according to This information about power obtains corresponding second object function rank, and closes in this application program according to this second object function rank Corresponding function;The wake-up times that the program wakes up system up according to application program in preset time period by waking up lock up is closed Corresponding function, and close corresponding function according to the information about power of terminal further, owing to the program is the most directly closed Close application program, but only close corresponding function in application program, therefore, when needs restart this application program, only Need the pent function of re invocation, in terms of existing technologies, while can consuming reducing terminal power, Promote the speed that application program restarts.
Embodiment three
Current intelligent terminal is both provided with a lot of sensors, such as, GPS (Global Positioning System, global positioning system) sensor, gravity sensor, fingerprint sensor, imageing sensor, audio sensor etc., application Program calls a function to call these sensors by the sensor in application program, and each sensor can be by multiple application journeys Sequence is called, and each application program can also call multiple sensor.
When closing application program, the function that calls of commonly used Calling sensor is not off, and calls function Still remain on after closing application program and can increase the power consumption of terminal, and then increase the electric quantity consumption of terminal, reduce The flying power of terminal.
The present embodiment will be described from the angle of the shutoff device of application program, and this device specifically can be integrated in terminal In, this terminal can be the equipment such as smart mobile phone, panel computer.
As it is shown on figure 3, the method for closing of this application program, idiographic flow can be such that
S301, obtains the set calling function calling sensor in application program.
Specifically, application program exists multiple function that calls for calling multiple sensor, such as, call function E and use In calling fingerprint sensor, call function F for calling imageing sensor, call function G for calling audio sensor, then may be used Include calling function E, call function F, call function G getting this set.
S302, to calling function setup function rank in this set.
Specifically, when function rank is set, can be important according to the plurality of function calling the sensor that function is called Property be configured, such as, fingerprint sensor be enter this application program time authentication mode, then the importance of fingerprint sensor The highest, can arrange fingerprint sensor and call the rank of function E is 2 grades, and imageing sensor is the base for realizing this application program This function, then the importance of imageing sensor takes second place, and can arrange imageing sensor and call the rank of function F is 3 grades, and audio frequency senses Device is the additional function for realizing this application program, then the importance of audio sensor is minimum, can be called by audio sensor The rank of function G is set to 4 grades.
In a preferred embodiment of the invention, can be to set call function setup flag, such as, will collection All flags calling function in conjunction are set to 1, and flag can also include color, such as, by all tune in set It is set to green by the flag of function.
S303, receives the out code of this application program, and obtains this application program when default according to this out code Between wake up feature up by wake up that lock wakes up system up up in section.
Specifically, the mode of the out code receiving application program can have multiple, uses for example, it is possible to received by screen The out code that the touch operation at family sends, it is also possible to receive user by remotely operating the out code sent, it is also possible to be Receive the out code that the intervalometer of terminal inner triggers.
After receiving out code, obtain application program and wake up spy up by wake up that lock wakes up system up up in preset time period Levy.This preset time period can be the time value being stored in advance in terminal built-in memory area, it is also possible to be user setup And it is stored in a time value of terminal built-in memory area, such as, 1 minute.This wakes up up in feature can be preset time period Wake-up times or the feature such as wakeup frequency, such as, this application program woke up terminal system up 5 times by waking up lock up in 1 minute.
S304, wakes up feature up according to this and obtains corresponding first object function rank.
Specifically, can prestore in the built-in memory area of terminal and wake up up between feature and object function rank Mapping relations, these mapping relations can also be by user setup the built-in memory area being stored in terminal.Wake up up when getting After feature, call the mapping relations being stored in terminal built-in memory area, obtain object function rank according to these mapping relations. Such as, in mapping relations, 5 corresponding object function ranks of wake-up times are 3 grades, then be characterized as waking up up time when getting to wake up up When number is 5 times, can get corresponding object function rank according to these mapping relations is 3 grades.
S305, closes according to this first object function rank and calls function in this set accordingly.
Specifically, when getting object function rank, close in set and call function accordingly, such as, get mesh When scalar functions rank is 3 grades, in closedown set, all of 3 grades are called function, it is also possible in closedown set, all of 3 grades are called letter Number calls function with 4 grades.
In a preferred embodiment of the invention, after calling function accordingly in closing set, it is also possible to change quilt All flags calling function pent in set such as, are changed to 2 by 1, mark by the flag calling function closed Know position and can also include color, such as, pent all flags calling function in set are changed to redness by green.
From the foregoing, it will be observed that the method for closing of the application program of embodiment of the present invention offer, use to obtain in application program and call The set calling function of sensor, to calling function setup function rank in this set, receives the closedown of this application program Instruction, and obtain this application program according to this out code and wake up spy up by wake up that lock wakes up system up up in preset time period Levy, wake up feature up according to this and obtain corresponding first object function rank, and close this collection according to this first object function rank Conjunction is called function accordingly;The program first to set in call function setup function rank, then according to application program The feature that wakes up up waking up system in preset time period by waking up lock up up obtains corresponding first object function rank, and closes closed set In conjunction, object function rank is corresponding calls function with this, owing to the program does not directly close application program, but closes Application program calls function accordingly, therefore, when needs restart this application program, it is only necessary to re invocation is closed Call function, in terms of existing technologies, can reduce terminal power consume while, promote application program weight The new speed started.
Embodiment four
In order to preferably implement above method, the embodiment of the present invention also provides for the shutoff device of a kind of application program, should With the shutoff device of program can integrated in the terminal, this terminal can be specifically the equipment such as smart mobile phone, panel computer.
As shown in fig. 4 a, the shutoff device of this application program may include that arrange module the 401, first acquisition module 402, Second acquisition module the 403, first processing module 404, is described in detail below:
This arranges module 401, for the function setup function rank in application program;
This first acquisition module 402, for receiving the out code of this application program, and should according to this out code acquisition Application program wakes up feature up by wake up that lock wakes up system up up in preset time period;
This second acquisition module 403, obtains corresponding first object function rank for waking up feature up according to this;
This first processing module 404, for closing corresponding letter in this application program according to this first object function rank Number.
Preferably, as shown in Figure 4 b, this arranges module 401 and may include that the first acquisition submodule 4011, arranges submodule 4012, specific as follows:
This first obtains submodule 4011, for obtaining in application program the call relation between function;
This arranges submodule 4012, is used for according to this call relation the function setup function rank in this application program.
Preferably, this wakes up feature up and includes wake-up times, and as illustrated in fig. 4 c, this second acquisition module 403 may include that really Stator modules 4031, second obtains submodule 4032, specific as follows:
This determines submodule 4031, interval for determining the wake-up times residing for this wake-up times;
This second acquisition submodule 4032, for obtaining corresponding first object function level according to this wake-up times interval Not.
Preferably, first object function rank is less than the highest function rank, as shown in figure 4d, this first processing module 404 May include that and judge submodule 4041, process submodule 4042, specific as follows:
This judgement submodule 4041, is used for judging whether this first object function rank is minimum function rank;
This process submodule 4042, for when this judgement submodule 4041 is judged as YES, closing should in this application program The function that first object function rank is corresponding;When this judgement submodule 4041 is judged as NO, close in this application program this The function that one object function rank is corresponding, and function rank is less than the function of this first object function rank.
Preferably, as shown in fig 4e, the shutoff device of this application program can also include: the second processing module 405;This is years old Two processing modules 405 are used for:
Obtain the information about power that terminal is current;
According to this information about power obtain corresponding second object function rank, this second object function be superior to this first Object function rank;
Corresponding function in this application program is closed according to this second object function rank.
From the foregoing, it will be observed that the shutoff device of the application program of embodiment of the present invention offer, by arranging module 401 to application journey Function setup function rank in sequence, the first acquisition module 402 receives the out code of this application program, and refers to according to this closedown Order obtains this application program and wakes up feature up by wake up that lock wakes up system up up in preset time period, the second acquisition module 403 Waking up feature up according to this and obtain corresponding first object function rank, the first processing module 404 is according to this first object function rank Close corresponding function in this application program;Owing to the program does not directly close application program, but close application program In corresponding function, therefore, when needs restart this application program, it is only necessary to the pent function of re invocation, In terms of existing technologies, while can consuming reducing terminal power, the speed that application program restarts is promoted.
When being embodied as, above modules can realize as independent entity, it is also possible to carries out combination in any, makees Realize for same or several entities, the embodiment of the method being embodied as can be found in above of above modules, at this not Repeat again.
It should be noted that one of ordinary skill in the art will appreciate that whole in the various methods of above-described embodiment or Part steps can be by program and completes to instruct relevant hardware, and this program can be stored in computer-readable storage medium In matter, storage medium may include that read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
Method for closing and the device of a kind of application program provided the embodiment of the present invention above are described in detail, Principle and the embodiment of the present invention are set forth by specific case used herein, and the explanation of above example is simply used In helping to understand method and the core concept thereof of the present invention;Simultaneously for those skilled in the art, according to the think of of the present invention Thinking, the most all will change, in sum, it is right that this specification content should not be construed as The restriction of the present invention.

Claims (11)

1. the method for closing of an application program, it is characterised in that including:
To the function setup function rank in application program;
Receive the out code of described application program, and obtain described application program in preset time period according to described out code In wake up feature up by wake up that lock wakes up system up up;
Corresponding first object function rank is obtained according to the described feature that wakes up up;
Corresponding function in described application program is closed according to described first object function rank.
Method for closing the most according to claim 1, it is characterised in that described to the function setup function level in application program Other step specifically includes:
Obtain the call relation between function in application program;
According to described call relation to the function setup function rank in described application program.
Method for closing the most according to claim 1, it is characterised in that described in wake up feature up and include wake-up times, described Specifically include according to the described step waking up the feature corresponding first object function rank of acquisition up:
Determine that the wake-up times residing for described wake-up times is interval;
Corresponding first object function rank is obtained according to described wake-up times interval.
Method for closing the most according to claim 1, it is characterised in that described first object function rank is less than the highest function Rank, described close the step of corresponding function in described application program according to described first object function rank and specifically includes:
Judge whether described first object function rank is minimum function rank;
The most then close the function that first object function rank described in described application program is corresponding;
If it is not, then close the function that first object function rank described in described application program is corresponding, and function rank is less than The function of described first object function rank.
Method for closing the most according to claim 4, it is characterised in that described according to the closedown of described first object function rank In described application program after the step of corresponding function, described method for closing also includes:
Obtain the information about power that terminal is current;
Obtaining corresponding second object function rank according to described information about power, described second object function is superior to described the One object function rank;
Corresponding function in described application program is closed according to described second object function rank.
Method for closing the most according to claim 1, it is characterised in that described to the function setup function level in application program Other step specifically includes:
Obtain the set calling function calling sensor in application program;
To described set calls function setup function rank;
Described close the step of corresponding function in described application program according to described first object function rank and specifically include:
Close in described set according to described first object function rank and call function accordingly.
7. the shutoff device of an application program, it is characterised in that including:
Module is set, for the function setup function rank in application program;
First acquisition module, for receiving the out code of described application program, and obtains described answering according to described out code In preset time period, feature is waken up up by wake up that lock wakes up system up up by program;
Second acquisition module, obtains corresponding first object function rank for waking up feature described in basis up;
First processing module, for closing corresponding function in described application program according to described first object function rank.
Shutoff device the most according to claim 7, it is characterised in that the described module that arranges specifically includes:
First obtains submodule, for obtaining in application program the call relation between function;
Submodule is set, is used for according to described call relation the function setup function rank in described application program.
Shutoff device the most according to claim 7, it is characterised in that described in wake up feature up and include wake-up times, described Two acquisition modules specifically include:
Determine submodule, interval for determining the wake-up times residing for described wake-up times;
Second obtains submodule, for obtaining corresponding first object function rank according to described wake-up times interval.
Shutoff device the most according to claim 7, it is characterised in that described first object function rank is less than Gao Han Several levels is other, and described first processing module specifically includes:
Judge submodule, be used for judging whether described first object function rank is minimum function rank;
Process submodule, for when described judgement submodule is judged as YES, close first object described in described application program The function that function rank is corresponding;When described judgement submodule is judged as NO, close first object described in described application program The function that function rank is corresponding, and function rank is less than the function of described first object function rank.
11. shutoff devices according to claim 10, it is characterised in that described shutoff device also includes the second process mould Block, described second processing module is used for:
Obtain the information about power that terminal is current;
Obtaining corresponding second object function rank according to described information about power, described second object function is superior to described the One object function rank;
Corresponding function in described application program is closed according to described second object function rank.
CN201610379851.0A 2016-05-31 2016-05-31 A kind of method for closing and device of application program Active CN106095412B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610379851.0A CN106095412B (en) 2016-05-31 2016-05-31 A kind of method for closing and device of application program
PCT/CN2017/086468 WO2017206871A1 (en) 2016-05-31 2017-05-29 Application program shutdown method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610379851.0A CN106095412B (en) 2016-05-31 2016-05-31 A kind of method for closing and device of application program

Publications (2)

Publication Number Publication Date
CN106095412A true CN106095412A (en) 2016-11-09
CN106095412B CN106095412B (en) 2019-07-16

Family

ID=57230637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610379851.0A Active CN106095412B (en) 2016-05-31 2016-05-31 A kind of method for closing and device of application program

Country Status (2)

Country Link
CN (1) CN106095412B (en)
WO (1) WO2017206871A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017206871A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Application program shutdown method and apparatus, storage medium, and electronic device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110099404B (en) * 2018-01-30 2022-07-15 ***通信有限公司研究院 Duration testing method and device
WO2020133437A1 (en) * 2018-12-29 2020-07-02 深圳市欢太科技有限公司 Application program managing method and device, storage medium and electronic device
CN111723016B (en) * 2020-06-24 2024-06-04 湖南国科微电子股份有限公司 File closing method, device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176842A (en) * 2013-03-15 2013-06-26 广东欧珀移动通信有限公司 Background process management method and mobile terminal thereof
CN104298336A (en) * 2013-07-19 2015-01-21 贝壳网际(北京)安全技术有限公司 Mobile terminal and control method and device of application program of mobile terminal
CN105100429A (en) * 2015-06-08 2015-11-25 北京金山安全软件有限公司 Method and device for determining use time of residual electric quantity of mobile terminal
CN105260117A (en) * 2015-09-30 2016-01-20 小米科技有限责任公司 Application control method and apparatus
CN105425934A (en) * 2014-07-16 2016-03-23 联发科技股份有限公司 Power-saving method and associated electronic device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040100457A1 (en) * 2002-11-21 2004-05-27 Mandle Thomas C. Method and system for switching power and loading and closing applications in a portable computing device using a removable pointing device
CN104199669B (en) * 2014-09-12 2017-12-15 北京奇虎科技有限公司 The method and device being managed to the process of application program
CN104866069A (en) * 2015-06-12 2015-08-26 广东小天才科技有限公司 Method and device for automatically clearing background application programs
CN106095054B (en) * 2016-05-31 2019-02-12 Oppo广东移动通信有限公司 A kind of method for closing and device of application program
CN106095412B (en) * 2016-05-31 2019-07-16 Oppo广东移动通信有限公司 A kind of method for closing and device of application program
CN106020907B (en) * 2016-05-31 2019-12-03 Oppo广东移动通信有限公司 A kind of method for closing and device of application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176842A (en) * 2013-03-15 2013-06-26 广东欧珀移动通信有限公司 Background process management method and mobile terminal thereof
CN104298336A (en) * 2013-07-19 2015-01-21 贝壳网际(北京)安全技术有限公司 Mobile terminal and control method and device of application program of mobile terminal
CN105425934A (en) * 2014-07-16 2016-03-23 联发科技股份有限公司 Power-saving method and associated electronic device
CN105100429A (en) * 2015-06-08 2015-11-25 北京金山安全软件有限公司 Method and device for determining use time of residual electric quantity of mobile terminal
CN105260117A (en) * 2015-09-30 2016-01-20 小米科技有限责任公司 Application control method and apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017206871A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Application program shutdown method and apparatus, storage medium, and electronic device

Also Published As

Publication number Publication date
CN106095412B (en) 2019-07-16
WO2017206871A1 (en) 2017-12-07

Similar Documents

Publication Publication Date Title
CN104221445B (en) A kind of method and terminal waking up terminal system
CN106020907A (en) Application shut-down method and device
CN104298336B (en) Mobile terminal and control method and device of application program of mobile terminal
CN105554316B (en) A kind of realization method and system of reserved intelligent terminal battery capacity
US7873852B2 (en) Logical battery partitions configured by user interface
CN106095412A (en) The method for closing of a kind of application program and device
CN105828424B (en) Intelligent terminal and energy consumption quantitative control method thereof
CN104574538B (en) Board units and its management system, bluetooth start method and recharge method
CN106055077A (en) Wake-up lock-based processing method and device
CN104166542A (en) Method and device for detecting electricity consumption of application
CN104184884B (en) A kind of control device and method, mobile terminal of mobile terminal power consumption
CN107357673A (en) A kind of method, terminal and computer-readable recording medium for detecting abnormal power consumption
CN104160360A (en) Power management for electronic devices
CN106547335A (en) Energy consumption reduces method and mobile terminal
CN105700663A (en) Background program cleaning method and system for mobile terminal
CN104580710A (en) Automatic power saving method based on learning operation habit of user
CN106168902A (en) Awakening control method, device and equipment
CN106095288A (en) A kind of based on the treating method and apparatus waking up lock up
CN106455016A (en) Method for controlling mobile terminal, and mobile terminal
CN105955073A (en) Automatic starting method, system and mobile intelligent devices for satellite positioning device
Yanwei et al. Research on the context model of intelligent interaction system in the internet of things
CN104598778A (en) Permission dispatching method and device
CN101291487A (en) MP3 playing method with low energy consumption on mobile phone
CN106293709A (en) The management method of application program, managing device and terminal
CN106095055A (en) The method for closing of a kind of application program and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant