CN106095054B - A kind of method for closing and device of application program - Google Patents
A kind of method for closing and device of application program Download PDFInfo
- Publication number
- CN106095054B CN106095054B CN201610383733.7A CN201610383733A CN106095054B CN 106095054 B CN106095054 B CN 106095054B CN 201610383733 A CN201610383733 A CN 201610383733A CN 106095054 B CN106095054 B CN 106095054B
- Authority
- CN
- China
- Prior art keywords
- function
- application program
- rank
- application
- function rank
- 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.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Telephone Function (AREA)
- Power Sources (AREA)
Abstract
The embodiment of the invention provides a kind of method for closing of application program and devices, the method for closing is to the function setup function rank in application program, receive the out code of the application program, and the application type of the application program is obtained according to the out code, corresponding first object function rank is obtained according to the application type, and corresponding function in the application program is closed according to the first object function rank;The program can close corresponding function based on the application type of application program, the electric quantity consumption of terminal can be reduced, and since there is no directly close application program for the program, but close corresponding function in application program, when needing to restart the application program, it only needs to re-call pent function, the speed of application program restarting can be promoted while reducing terminal power consumption.
Description
Technical field
The present invention relates to field of terminal technology, and in particular to a kind of method for closing and device of application program.
Background technique
With the development of intelligent terminal, the function that intelligent terminal can be compatible with is more and more, not only enriches the life of user,
Also bring advantage to the user.As mobile terminal device increasingly incorporates people's life, application function is gradually improved, brought to user
Great convenience and improve user experience.
In order to realize various functions to meet the various demands of user, usual intelligent terminal will be installed various applications
Program (can be applied referred to as).But the application program installed on intelligent terminal is at runtime, can consume a large amount of electricity,
Reduce the cruising ability of intelligent terminal.Also, the power consumption of different type application program is different, to intelligent terminal cruising ability
Influence it is also different.
Application program at runtime, can run a principal function and by principal function call multiple subfunctions, to realize
The function of application program.Currently, in order to reduce the consumption of intelligent terminal electricity, and then promote the cruising ability of intelligent terminal, intelligence
Energy terminal can close function all in application program (including principal function, subfunction etc.) when closing application program.
However, although the shutdown strategy of application program can reduce terminal power consumption at present, since the program is
Function all in application program is closed, if intelligent terminal needs to restart this using journey after closing application program
Sequence, then will lead to application program restarting at this point, intelligent terminal needs to re-call all functions of the application program
Speed is slow.
Summary of the invention
The embodiment of the present invention provides the method for closing and device of a kind of application program, can reduce terminal power consumption
Meanwhile promoting the speed of application program restarting.
The embodiment of the present invention provides a kind of method for closing of application program, comprising:
To the function setup function rank in application program;
The out code of the application program is received, and obtains the application class of the application program according to the out code
Type;
Corresponding first object function rank is obtained according to the application type;
Corresponding function in the application program is closed according to the first object function rank.
Further, the step of function setup function rank in application program specifically includes:
Obtain the call relation in application program between function;
According to the call relation to the function setup function rank in the application program.
Further, described the step of obtaining corresponding first object function rank according to the application type, specifically wraps
It includes:
Determine application type set belonging to the application type;
Corresponding first object function rank is obtained according to the application type set.
Further, the first object function rank is lower than highest function rank, described according to the first object letter
Several levels are not closed the step of corresponding function in the application program and are specifically included:
Judge whether the first object function rank is minimum function rank;
If so, closing the corresponding function of first object function rank described in the application program;
If it is not, then closing the corresponding function of first object function rank described in the application program and function rank
Lower than the function of the first object function rank.
Further, the step that corresponding function in the application program is closed according to the first object function rank
After rapid, the method for closing further include:
Obtain the current information about power of terminal;
Corresponding second objective function rank is obtained according to the information about power, second objective function is superior to institute
State first object function rank;
Corresponding function in the application program is closed according to the second objective function rank.
Further, the step of function setup function rank in application program specifically includes:
Obtain the set that the calling function of sensor is called in application program;
To the calling function setup function rank in the set;
Described the step of closing corresponding function in the application program according to the first object function rank, specifically wraps
It includes:
It is closed in the set according to the first object function rank and calls function accordingly.
Correspondingly, the embodiment of the present invention also provides a kind of closing device of application program, comprising:
Setup module, for the function setup function rank in application program;
First obtains module, obtains institute for receiving the out code of the application program, and according to the out code
State the application type of application program;
Second obtains module, for obtaining corresponding first object function rank according to the application type;
First processing module, for closing corresponding letter in the application program according to the first object function rank
Number.
Further, the setup module specifically includes:
First acquisition submodule, for obtaining the call relation in application program between function;
Be arranged submodule, for according to the call relation to the function setup function rank in the application program.
Further, the second acquisition module specifically includes:
Submodule is determined, for determining application type set belonging to the application type;
Second acquisition submodule, for obtaining corresponding first object function rank according to the application type set.
Further, the first object function rank is lower than highest function rank, and the first processing module is specifically wrapped
It includes:
Judging submodule, for judging whether the first object function rank is minimum function rank;
Submodule is handled, for closing first described in the application program when the judging submodule is judged as YES
The corresponding function of objective function rank;When the judging submodule is judged as NO, close first described in the application program
The corresponding function of objective function rank and function rank are lower than the function of the first object function rank.
Further, described device further includes Second processing module, and the Second processing module is used for:
Obtain the current information about power of terminal;
Corresponding second objective function rank is obtained according to the information about power, second objective function is superior to institute
State first object function rank;
Corresponding function in the application program is closed according to the second objective function rank.
The embodiment of the present invention is used to the function setup function rank in application program, and the closing for receiving the application program refers to
It enables, and obtains the application type of the application program according to the out code, corresponding first object is obtained according to the application type
Function rank, and corresponding function in the application program is closed according to the first object function rank;The program first corresponds to use
Then function setup function rank in program obtains objective function rank according to the application type of application program, and closes and answer
With function corresponding with the objective function rank in program, since there is no directly closing application programs for the program, but close
Corresponding function in application program, therefore, when needing to restart the application program, it is only necessary to re-call pent letter
Number can promote application program restarting while reducing terminal power consumption in terms of existing technologies
Speed.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is the flow diagram of the method for closing for the application program that the embodiment of the present invention one provides;
Fig. 2 is the flow diagram of the method for closing of application program provided by Embodiment 2 of the present invention;
Fig. 3 is the flow diagram of the method for closing for the application program that the embodiment of the present invention three provides;
Fig. 4 a is the structural schematic diagram of the closing device for the first application program that the embodiment of the present invention four provides;
Fig. 4 b is the structural schematic diagram of the closing device for second of application program that the embodiment of the present invention four provides;
Fig. 4 c is the structural schematic diagram of the closing device for the third application program that the embodiment of the present invention four provides;
Fig. 4 d is the structural schematic diagram of the closing device for the 4th kind of application program that the embodiment of the present invention four provides;
Fig. 4 e is the structural schematic diagram of the closing device for the 5th kind of application program that the embodiment of the present invention four provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those skilled in the art's every other implementation obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
The embodiment of the present invention provides the method for closing and device of a kind of application program, will be described in detail respectively below.
Embodiment one
The angle of closing device from application program is described the present embodiment, which specifically can integrate in terminal
In, which can be the equipment such as smart phone, tablet computer.
A kind of method for closing of application program, comprising: to the function setup function rank in application program, receive the application
The out code of program, and the application type of the application program is obtained according to the out code, phase is obtained according to the application type
The first object function rank answered closes corresponding function in the application program according to the first object function rank.
As shown in Figure 1, the method for closing of the application program, detailed process may include:
S101, to the function setup function rank in application program.
Specifically, any one application program that can be run on operating system (for example, Android system, Android),
A principal function (or being monoexponential function) is required, principal function is the entrance of application program, for other various letters
Number (subfunction) is called, and is performed various functions by called subfunction, simultaneously because principal function needs to provide application
The operation result of program, therefore principal function is also the outlet of application program.Usual principal function is more succinct, and application program needs reality
The detail of existing function is packaged into inside subfunction and calls for principal function, in addition, subfunction can also call others
Subfunction.
Can be there are many implementation method to the function setup function rank in application program, it can root in the embodiment of the present invention
Function rank is set according to the call relation between function, for example, the rank of principal function is set as 1 grade, the letter of 1 grade of function call
Several ranks is set as 2 grades, and the rank of the function of 2 grades of function calls is set as 3 grades, and the rank of the function of 3 grades of function calls is set
4 grades are set to, and so on.The numerical value of function rank shows more greatly position of the function in more lower layer in call relation, i.e.,
The rank of the function is lower.
When function rank being arranged according to the call relation between function, to the function setup function rank in application program
It can specifically include following steps:
Obtain the call relation in application program between function;
According to the call relation to the function setup function rank in the application program.
Specifically, when application program launching, letter can be obtained according to the operation timing of function each in application program
Call relation between number, for example, function A is run first, function B is then run, and then function C is run, last function D fortune
It goes, then the available call relation between function are as follows: function A calls function B, function B that function C, function C is called to call letter
Number D.
After getting the call relation between function, the function rank of function can be set according to the call relation,
For example, the rank of setting function A is 1 grade, 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 the application program, and the application class of the application program is obtained according to the out code
Type.
Specifically, receive the out code of application program mode can there are many, for example, can pass through screen receive use
The out code that the touch operation at family is sent also can receive the out code that user is sent by remote operation, can also be
Receive the out code of the timers trigger of terminal inner.
After receiving out code, the application type of application program is obtained.It, can be according to application program reality in concrete application
The function that border executes divides application type, for example, the application type of wechat application program is social application, KuGoo application program
Application type be music application, the application type of youku.com's application program is Video Applications, the application type of day cat application program
For online shopping application.
There are many modes for obtaining the application type of application program, for example, when application program is installed in the terminal, Ke Yiling
The application program registers application type in the registration table of terminal;When obtaining application type, pass through inquiry terminal note
The application type key assignments of application program registration obtains application type in volume table.
S103 obtains corresponding first object function rank according to the application type.
Specifically, it can be stored in advance between application type and objective function rank in the built-in storage region of terminal
Mapping relations, the mapping relations by user setting and can also be stored in the built-in storage region of terminal.When getting application
After type, the mapping relations being stored in terminal built-in storage region are called, obtain objective function rank according to the mapping relations.
For example, the corresponding objective function rank of Video Applications is 3 grades in mapping relations, then it is Video Applications when getting application type
When, it is 3 grades that corresponding objective function rank can be got according to the mapping relations.
In practical application, it is understood that there may be a variety of application types all correspond to the same objective function rank, for example, video is answered
It is all 3 grades with corresponding objective function rank is applied with online shopping, therefore, in a preferred embodiment of the present invention, according to
The application type obtain corresponding first object function rank can with specifically includes the following steps:
Determine application type set belonging to the application type;
Corresponding first object function rank is obtained according to the application type set.
Specifically, there are many modes for dividing application type set, for example, can be according to the application program in application type
Power consumption condition at runtime divides application type set, for example, power consumption is bigger at runtime Video Applications, online shopping
It is also bigger using power consumption at runtime, then Video Applications and online shopping application can be divided into high power consumption application type collection
It closes, in addition, application type set can also include middle power consumption application type set, low power consumption application type set etc..
The mapping relations between application type set and objective function rank can be stored in advance in the terminal, for example, high
The corresponding objective function rank of power consumption application type set is 3 grades.Then when determining that application type collection is combined into high power consumption application type
When set, calling the mapping relations stored in terminal that can get corresponding objective function rank is 3 grades.
S104 closes corresponding function in the application program according to the first object function rank.
Specifically, when getting objective function rank, corresponding function in application program is closed, for example, getting mesh
When scalar functions rank is 3 grades, 3 grades of functions all in application program are closed.
In order to guarantee application program next time starting when can start quickly speed, need to keep principal function in application program
Continuous service, i.e. principal function cannot be closed, and therefore, which should be lower than highest function rank (most
High function rank is the rank of principal function).
In concrete application, after some function is closed, will be unable to play a role by the subfunction of the function call (because
Its function return value can not be input in application program by called subfunction), therefore, if it exists by the son of the function call
Function can be further turned off by the subfunction of the function call.Therefore, which is closed according to the first object function rank
In program corresponding function can with specifically includes the following steps:
Judge whether the first object function rank is minimum function rank;
If so, closing the corresponding function of first object function rank in the application program;
It is lower than if it is not, then closing the corresponding function of first object function rank and function rank in the application program
The function of the first object function rank.
Specifically, judge the first object function rank whether be minimum function grade method for distinguishing can there are many, for example,
It inquires in all functions that the application program is run in systems, if exist by the corresponding function call of objective function rank
Subfunction.For example, the objective function rank is 3 grades, then judge whether there is by 4 grades of functions of 3 grades of function calls.
When judging the first object function rank is minimum function rank, it is corresponding to close the first object function rank
Function, for example, closing 3 grades of all functions;When judging the first object function rank is not minimum function rank, letter is closed
Several levels are not less than or equal to the function of the objective function rank, for example, closing all 3 grades of functions, 4 grades of functions and 5 grades of functions
(5 grades of called functions if it exists).
In practical application, after according to corresponding function in first object function rank closing application program, it may deposit
In following situations, i.e. terminal current electric quantity is few, user wish to be further turned off it is remaining in application program be not turned off function,
Therefore, the method for closing of the application program can further include steps of
Obtain the current information about power of terminal;
Obtain corresponding second objective function rank according to the information about power, second objective function be superior to this first
Objective function rank;
Corresponding function in the application program is closed according to the second objective function rank.
Specifically, there are many implementations for obtaining the current information about power of terminal, for example, can be carried by terminal
Power management routines obtain information about power, which can be the percentage that remaining capacity accounts for battery total capacity, for example, electric
Measuring information is 30% expression 30% electricity of terminal current residual.
Reflecting between information about power and the second objective function rank can be stored in advance in the built-in storage region of terminal
Relationship is penetrated, such as the corresponding objective function rank of 30% electricity is 3 grades, the corresponding objective function rank of 20% electricity is 2 grades etc.,
After getting the information about power of terminal, the mapping relations stored in terminal is called to obtain corresponding second objective function rank;
The mapping between information about power section and the second objective function rank can also be stored in advance in the built-in storage region of terminal
Relationship, for example, information about power [30%, 40%) corresponding objective function rank is 3 grades, [20%, 30%) corresponding target letter
Several levels are not 2 grades etc., then after the information about power for getting terminal, first determine information about power section locating for the information about power, with
The second objective function rank is obtained according to the information about power section and mapping relations afterwards.
According to description above, the corresponding function of first object function rank is all closed, remaining to be not turned off letter
Several function ranks should be above first object function rank, and therefore, which should be above first mesh
Scalar functions rank.
Corresponding function in the application program is closed according to the second objective function rank, specifically, gets the second mesh
After scalar functions rank, for example, getting the second objective function rank according to information about power 20% is 2 grades, then application program is closed
In all 2 grades of functions, or close (3 grades of function that 2 grades of functions and function rank all in application program are lower than 2 grades
Function, 4 grades of functions etc.).
From the foregoing, it will be observed that the method for closing of application program provided in an embodiment of the present invention, using to the function in application program
Function rank is set, receives the out code of the application program, and obtain the application class of the application program according to the out code
Type obtains corresponding first object function rank according to the application type, and closes this according to the first object function rank and answer
With function corresponding in program;The program first corresponds to use the function setup function rank in program, then according to application type
Objective function rank is obtained, and closes function corresponding with the objective function rank in application program, not due to the program
Application program is directly closed, but closes corresponding function in application program and is therefore needing to restart the application program
When, it is only necessary to pent function is re-called, in terms of existing technologies, terminal power consumption can reduced
Meanwhile promoting the speed of application program restarting.
Embodiment two
According to the method for closing of application program described in embodiment one, citing is described in further detail below.
In the present embodiment, it will specifically be integrated with the closing device of application program in the terminal, with mobile terminal
It is described in detail for closing application program method.
As shown in Fig. 2, the method for closing of the application program, detailed process can be such that
S201 obtains the call relation in application program between function.
Specifically, obtain the call relation in application program between function implementation can there are many, for example, when answer
When being started with program, the call relation between function, example can be obtained according to the operation timing of function each in application program
Such as, function A is run first, and function B is then run, and then function C is run, last function D operation, then it is available to function it
Between call relation are as follows: function A call function B, function B call function C, function C call function D.
S202, according to the call relation to the function setup function rank in the application program.
Specifically, after getting the call relation between function, the letter of function can be set according to the call relation
Several levels are other, for example, the rank of setting function A is 1 grade, the rank of function B is 2 grades, and the rank of function C is 3 grades, the grade of function D
It Wei not be 4 grades.The numerical value of function rank shows more greatly position of the function in more lower layer in call relation, the i.e. grade of the function
It is not lower.
S203 receives the out code of the application program, and the application class of the application program is obtained according to the out code
Type.
Specifically, mobile terminal can receive the out code that the touch operation of user is sent by screen, for example, user
The close button (virtual push button) of the application program on point touching screen, smart phone to the application program send out code with
Respond the touch operation of user.In practical application, application type, example can be divided according to the practical function of executing of application program
Such as, the application type of wechat application program is social application, and the application type of KuGoo application program is music application, youku.com's application
The application type of program is Video Applications, and the application type of day cat application program is online shopping application.
There are many modes for obtaining the application type of application program, for example, when application program is installed in the terminal, Ke Yiling
The application program registers application type in the registration table of terminal;When obtaining application type, pass through inquiry terminal note
The application type key assignments of application program registration obtains application type in volume table.
S204 determines application type set belonging to the application type.
Specifically, application type collection can be divided according to the power consumption condition of the application program in application type at runtime
It closes, for example, power consumption is bigger at runtime for Video Applications, power consumption is also bigger at runtime for online shopping application, then may be used
Video Applications and online shopping application are divided into high power consumption application type set, in addition, during application type set can also include
Power consumption application type set, low power consumption application type set etc..
S205 obtains corresponding first object function rank according to the application type set.
Specifically, the mapping relations between application type set and objective function rank can be stored in advance in the terminal,
For example, the corresponding objective function rank of high power consumption application type set is 3 grades.Then when determining that application type collection is combined into high power consumption and answers
When with type set, calling the mapping relations stored in terminal that can get corresponding objective function rank is 3 grades.
S206 judges whether the first object function rank is minimum function rank.
Specifically, judge the first object function rank whether be minimum function grade method for distinguishing can there are many, for example,
It inquires in all functions that the application program is run in systems, if exist by the corresponding function call of objective function rank
Subfunction.For example, the objective function rank is 3 grades, then judge whether there is by 4 grades of functions of 3 grades of function calls;If not depositing
Then it is being judged as that the first object function rank is minimum function rank, is then executing step S207, and if it exists, be then judged as
The first object function rank is not minimum function rank, then executes step S208.
S207 closes the corresponding function of first object function rank in the application program.
Specifically, when judging the first object function rank is minimum function rank, the first object function grade is closed
Not corresponding function then closes 3 grades of all functions for example, first object function rank is 3 grades.
S208 closes the corresponding function of first object function rank and function rank in the application program and is lower than this
The function of first object function rank.
Specifically, when judging the first object function rank is not minimum function rank, close function rank be less than or
All 3 grades of functions, 4 grades of functions are then closed for example, first object function rank is 3 grades equal to the function of the objective function rank
And 5 grades of functions (5 grades of called functions if it exists).
S209 obtains the current information about power of terminal.
Specifically, there are many implementations for obtaining the current information about power of terminal, for example, can be carried by terminal
Power management routines obtain information about power, which can be the percentage that remaining capacity accounts for battery total capacity, for example, electric
Measuring information is 30% expression 30% electricity of terminal current residual.
S210 obtains corresponding second objective function rank according to the information about power, which is superior to
The first object function rank.
Specifically, can be stored in advance in the built-in storage region of terminal information about power and the second objective function rank it
Between mapping relations, such as the corresponding objective function rank of 30% electricity is 3 grades, and the corresponding objective function rank of 20% electricity is
2 grades etc., after getting the information about power of terminal, the mapping relations stored in terminal is called to obtain corresponding second objective function
Rank.
S211 closes corresponding function in the application program according to the second objective function rank.
Specifically, after getting the second objective function rank, for example, getting the second target letter according to information about power 20%
Several levels are not 2 grades, then close 2 grades of functions all in application program, or close 2 grades of functions all in application program and
Function rank is lower than 2 grades of function (3 grades of functions, 4 grades of functions etc.).
From the foregoing, it will be observed that the method for closing of application program provided in an embodiment of the present invention, using function in acquisition application program
Between call relation, the application is then received to the function setup function rank in the application program according to the call relation
The out code of program, and the application type of the application program is obtained according to the out code, it determines belonging to the application type
Application type set obtains corresponding first object function rank according to the application type set, judges the first object function
Whether rank is minimum function rank, if then closing the corresponding function of first object function rank in the application program, if
Otherwise the corresponding function of first object function rank and function rank in the application program are closed and is lower than the first object letter
The other function of several levels, then obtains the current information about power of terminal, obtains corresponding second objective function according to the information about power
Rank, and corresponding function in the application program is closed according to the second objective function rank;The program is according to application program
Application type class closes corresponding function, and corresponding function is further closed according to the information about power of terminal, due to the party
There is no directly closing application programs for case, but only close corresponding function in application program, therefore, should needing to restart
When application program, it is only necessary to re-call pent function, in terms of existing technologies, terminal electricity can reduced
While amount consumption, the speed of application program restarting is promoted.
Embodiment three
Current intelligent terminal is both provided with many sensors, for example, GPS (Global Positioning
System, global positioning system) sensor, gravity sensor, fingerprint sensor, imaging sensor, audio sensor etc., application
Program calls a function to call these sensors by the sensor in application program, and each sensor can apply journey by multiple
Sequence is called, and each application program can also call multiple sensors.
In closing application program, the calling function of commonly used Calling sensor is not off, and calls function
The power consumption that will increase terminal is still remained operational after closing application program, and then increases the electric quantity consumption of terminal, is reduced
The cruising ability of terminal.
The angle of closing device from application program is described the present embodiment, which specifically can integrate in terminal
In, which can be the equipment such as smart phone, tablet computer.
The embodiment of the present invention provides a kind of method for closing of application program, can in closing application program closure sensor
Calling function, this method comprises: obtain application program in call sensor calling function set, to the tune in the set
With function setup function rank, the out code of the application program is received, and the application program is obtained according to the out code
Application type obtains corresponding first object function rank according to the application type, and is closed according to the first object function rank
It closes in the set and calls function accordingly.
As shown in figure 3, the method for closing of the application program, detailed process can be such that
S301 obtains the set that the calling function of sensor is called in application program.
Specifically, there are multiple calling functions in application program for calling multiple sensors, for example, function E is called to use
In calling fingerprint sensor, calls function F for calling imaging sensor, call function G for calling audio sensor, then may be used
It include calling function E, calling function F, calling function G to get the set.
S302, to the calling function setup function rank in the set.
It specifically, can be important according to the function for the sensor that multiple calling function is called when function rank is set
Property be configured, for example, authentication mode when fingerprint sensor is into the application program, then the importance of fingerprint sensor
Highest, it is 2 grades that settable fingerprint sensor, which calls the rank of function E, and imaging sensor is the base for realizing the application program
This function, then the importance of imaging sensor is taken second place, and it is 3 grades that settable imaging sensor, which calls the rank of function F, audio sensing
Device is the additional function for realizing the application program, then the importance of audio sensor is minimum, can call audio sensor
The rank of function G is set as 4 grades.
It in a preferred embodiment of the invention, can be to the calling function setup marker in set, for example, will collection
The marker of all calling functions in conjunction is set as 1, and marker can also include color, for example, by all tune in set
Green is set as with the marker of function.
S303 receives the out code of the application program, and the application class of the application program is obtained according to the out code
Type.
Specifically, receive the out code of application program mode can there are many, for example, can pass through screen receive use
The out code that the touch operation at family is sent also can receive the out code that user is sent by remote operation, can also be
Receive the out code of the timers trigger of terminal inner.
After receiving out code, the application type of application program is obtained.It, can be according to application program reality in concrete application
The function that border executes divides application type, for example, the application type of wechat application program is social application, KuGoo application program
Application type be music application, the application type of youku.com's application program is Video Applications, the application type of day cat application program
For online shopping application.
There are many modes for obtaining the application type of application program, for example, when application program is installed in the terminal, Ke Yiling
The application program registers application type in the registration table of terminal;When obtaining application type, pass through inquiry terminal note
The application type key assignments of application program registration obtains application type in volume table.
S304 obtains corresponding first object function rank according to the application type.
Specifically, it can be stored in advance between application type and objective function rank in the built-in storage region of terminal
Mapping relations, the mapping relations by user setting and can also be stored in the built-in storage region of terminal.When getting application
After type, the mapping relations being stored in terminal built-in storage region are called, obtain objective function rank according to the mapping relations.
For example, the corresponding objective function rank of Video Applications is 3 grades in mapping relations, then it is Video Applications when getting application type
When, it is 3 grades that corresponding objective function rank can be got according to the mapping relations.
S305 is closed in the set according to the first object function rank and is called function accordingly.
Specifically, it when getting objective function rank, closes in set and calls function accordingly, for example, getting mesh
When scalar functions rank is 3 grades, 3 grades of calling functions all in set are closed, 3 grades of calling letters all in set can also be closed
Several and 4 grades of calling functions.
In a preferred embodiment of the invention, after calling function accordingly in closing set, quilt can also be changed
The marker of the calling function of closing, for example, all markers for calling function pent in set are changed to 2 by 1, mark
Knowing position can also include color, for example, all markers for calling function pent in set are changed to red by green.
From the foregoing, it will be observed that closing application program method provided in an embodiment of the present invention, is passed using obtaining to call in application program
The set of the calling function of sensor, to the calling function setup function rank in the set, the closing for receiving the application program refers to
It enables, and obtains the application type of the application program according to the out code, corresponding first object is obtained according to the application type
Function rank, and closed in the set according to the first object function rank and call function accordingly;The program is first to set
In calling function setup function rank, corresponding objective function rank is then obtained according to the application type of application program, and
Close in set that objective function rank is corresponding calls function with this, since there is no directly closing application programs for the program, and
It is to close in application program to call function accordingly, therefore, when needing to restart the application program, it is only necessary to re-call
Pent calling function can promote application while reducing terminal power consumption in terms of existing technologies
The speed of program restarting.
Example IV
In order to better implement above method, the embodiment of the present invention also provides a kind of closing device of application program, this is answered
It can integrate in the terminal with the closing device of program, which specifically can be the equipment such as smart phone, tablet computer.
As shown in fig. 4 a, the closing device of the application program may include: setup module 401, first obtain module 402,
Second obtains module 403, first processing module 404, is described in detail below:
The setup module 401, for the function setup function rank in application program;
The first acquisition module 402, for receiving the out code of the application program, and being obtained according to the out code should
The application type of application program;
The second acquisition module 403, for obtaining corresponding first object function rank according to the application type;
The first processing module 404, for closing corresponding letter in the application program according to the first object function rank
Number.
Preferably, as shown in Figure 4 b, which may include: the first acquisition submodule 4011, setting submodule
4012, specific as follows:
First acquisition submodule 4011, for obtaining the call relation in application program between function;
The setting submodule 4012, for according to the call relation to the function setup function rank in the application program.
Preferably, as illustrated in fig. 4 c, which may include: that determining submodule 4031, second obtains son
Module 4032, specific as follows:
The determination submodule 4031, for determining application type set belonging to the application type;
Second acquisition submodule 4032, for obtaining corresponding first object function rank according to the application type set.
Preferably, first object function rank is lower than highest function rank, as shown in figure 4d, the first processing module 404
It may include: judging submodule 4041, handle submodule 4042, specific as follows:
The judging submodule 4041, for judging whether the first object function rank is minimum function rank;
The processing submodule 4042, should in the application program for closing when the judging submodule 4041 is judged as YES
The corresponding function of first object function rank;When the judging submodule 4041 is judged as NO, this in the application program is closed
The corresponding function of one objective function rank and function rank are lower than the function of the first object function rank.
Preferably, as shown in fig 4e, the closing device of the application program can also include: Second processing module 405;This
Two processing modules 405 are used for:
Obtain the current information about power of terminal;
Obtain corresponding second objective function rank according to the information about power, second objective function be superior to this first
Objective function rank;
Corresponding function in the application program is closed according to the second objective function rank.
From the foregoing, it will be observed that the closing device of application program provided in an embodiment of the present invention, applies journey by 401 pairs of setup module
Function setup function rank in sequence, first, which obtains module 402, receives the out code of the application program, and is referred to according to the closing
The application type for obtaining the application program is enabled, second, which obtains module 403, obtains corresponding first object letter according to the application type
Several levels are other, and first processing module 404 closes corresponding function in the application program according to the first object function rank;Due to this
There is no directly closing application programs for scheme, but close corresponding function in application program, therefore, should needing to restart
When application program, it is only necessary to re-call pent function, in terms of existing technologies, terminal electricity can reduced
While amount consumption, the speed of application program restarting is promoted.
When it is implemented, the above modules can be used as independent entity to realize, any combination can also be carried out, is made
It is realized for same or several entities, the specific implementation of the above modules can be found in the embodiment of the method for front, herein not
It repeats again.
It should be noted that those of ordinary skill in the art will appreciate that whole in the various methods of above-described embodiment or
Part steps are relevant hardware can be instructed to complete by program, which can store in computer-readable storage medium
In matter, storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM,
Random Access Memory), disk or CD etc..
The method for closing and device for being provided for the embodiments of the invention a kind of application program above are described in detail,
Used herein a specific example illustrates the principle and implementation of the invention, and the explanation of above embodiments is only used
In facilitating the understanding of the method and its core concept of the invention;Meanwhile for those skilled in the art, think of according to the present invention
Think, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as pair
Limitation of the invention.
Claims (10)
1. a kind of method for closing of application program characterized by comprising
The call relation between function is obtained according to the operation timing of function each in application program;
According to the call relation to the function setup function rank in the application program;
The out code of the application program is received, and obtains the application type of the application program according to the out code;
Corresponding first object function rank is obtained according to the application type;
Corresponding function in the application program is closed according to the first object function rank.
2. method for closing according to claim 1, which is characterized in that described to obtain corresponding the according to the application type
The step of one objective function rank, specifically includes:
Determine application type set belonging to the application type;
Corresponding first object function rank is obtained according to the application type set.
3. method for closing according to claim 1, which is characterized in that the first object function rank is lower than highest function
Rank, described the step of closing corresponding function in the application program according to the first object function rank, specifically include:
Judge whether the first object function rank is minimum function rank;
If so, closing the corresponding function of first object function rank described in the application program;
If it is not, then closing the corresponding function of first object function rank described in the application program and function rank is lower than
The function of the first object function rank.
4. method for closing according to claim 3, which is characterized in that described to be closed according to the first object function rank
In the application program the step of corresponding function after, the method for closing further include:
Obtain the current information about power of terminal;
Corresponding second objective function rank is obtained according to the information about power, and second objective function is superior to described the
One objective function rank;
Corresponding function in the application program is closed according to the second objective function rank.
5. a kind of closing device of application program characterized by comprising
Setup module, for obtaining the call relation between function according to the operation timing of function each in application program;
According to the call relation to the function setup function rank in the application program;
First obtains module, answers for receiving the out code of the application program, and according to out code acquisition
With the application type of program;
Second obtains module, for obtaining corresponding first object function rank according to the application type;
First processing module, for closing corresponding function in the application program according to the first object function rank.
6. closing device according to claim 5, which is characterized in that the second acquisition module specifically includes:
Submodule is determined, for determining application type set belonging to the application type;
Second acquisition submodule, for obtaining corresponding first object function rank according to the application type set.
7. closing device according to claim 5, which is characterized in that the first object function rank is lower than highest function
Rank, the first processing module specifically include:
Judging submodule, for judging whether the first object function rank is minimum function rank;
Submodule is handled, for closing first object described in the application program when the judging submodule is judged as YES
The corresponding function of function rank;When the judging submodule is judged as NO, first object described in the application program is closed
The corresponding function of function rank and function rank are lower than the function of the first object function rank.
8. closing device according to claim 7, which is characterized in that described device further includes Second processing module, described
Second processing module is used for:
Obtain the current information about power of terminal;
Corresponding second objective function rank is obtained according to the information about power, and second objective function is superior to described the
One objective function rank;
Corresponding function in the application program is closed according to the second objective function rank.
9. a kind of storage medium, which is characterized in that computer program is stored in the storage medium, when the computer program
When running on computers, so that the computer perform claim requires the closing side of 1 to 4 described in any item application programs
Method.
10. a kind of terminal, which is characterized in that the terminal requires 1 to 4 described in any item application programs for perform claim
Method for closing.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610383733.7A CN106095054B (en) | 2016-05-31 | 2016-05-31 | A kind of method for closing and device of application program |
PCT/CN2017/086484 WO2017206887A1 (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 |
---|---|---|---|
CN201610383733.7A CN106095054B (en) | 2016-05-31 | 2016-05-31 | A kind of method for closing and device of application program |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106095054A CN106095054A (en) | 2016-11-09 |
CN106095054B true CN106095054B (en) | 2019-02-12 |
Family
ID=57447816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610383733.7A Expired - Fee Related CN106095054B (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) | CN106095054B (en) |
WO (1) | WO2017206887A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103176842A (en) * | 2013-03-15 | 2013-06-26 | 广东欧珀移动通信有限公司 | Background process management method and mobile terminal thereof |
CN104092748A (en) * | 2014-06-30 | 2014-10-08 | 广州金山网络科技有限公司 | Method and device for APP operation control |
CN105260117A (en) * | 2015-09-30 | 2016-01-20 | 小米科技有限责任公司 | Application control method and apparatus |
CN105373210A (en) * | 2015-12-18 | 2016-03-02 | 北京金山安全软件有限公司 | Power saving method and device and electronic equipment |
CN105425934A (en) * | 2014-07-16 | 2016-03-23 | 联发科技股份有限公司 | Power-saving method and associated electronic device |
CN105516477A (en) * | 2015-12-01 | 2016-04-20 | 成都中科创达软件有限公司 | Power saving method based on application frequency |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201516635A (en) * | 2013-10-18 | 2015-05-01 | Qisda Corp | Charging method and mobile electronic device |
CN104239131B (en) * | 2014-09-09 | 2018-05-25 | 可牛网络技术(北京)有限公司 | A kind of method and device for closing application program |
CN104199669B (en) * | 2014-09-12 | 2017-12-15 | 北京奇虎科技有限公司 | The method and device being managed to the process of application program |
CN106095054B (en) * | 2016-05-31 | 2019-02-12 | Oppo广东移动通信有限公司 | A kind of method for closing and device of application program |
-
2016
- 2016-05-31 CN CN201610383733.7A patent/CN106095054B/en not_active Expired - Fee Related
-
2017
- 2017-05-29 WO PCT/CN2017/086484 patent/WO2017206887A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103176842A (en) * | 2013-03-15 | 2013-06-26 | 广东欧珀移动通信有限公司 | Background process management method and mobile terminal thereof |
CN104092748A (en) * | 2014-06-30 | 2014-10-08 | 广州金山网络科技有限公司 | Method and device for APP operation control |
CN105425934A (en) * | 2014-07-16 | 2016-03-23 | 联发科技股份有限公司 | Power-saving method and associated electronic device |
CN105260117A (en) * | 2015-09-30 | 2016-01-20 | 小米科技有限责任公司 | Application control method and apparatus |
CN105516477A (en) * | 2015-12-01 | 2016-04-20 | 成都中科创达软件有限公司 | Power saving method based on application frequency |
CN105373210A (en) * | 2015-12-18 | 2016-03-02 | 北京金山安全软件有限公司 | Power saving method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
WO2017206887A1 (en) | 2017-12-07 |
CN106095054A (en) | 2016-11-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106020907B (en) | A kind of method for closing and device of application program | |
CN107861814B (en) | Resource allocation method and equipment | |
Elmalaki et al. | Caredroid: Adaptation framework for android context-aware applications | |
CN103530186B (en) | Realize that camera applications support the method and system of multiposition storage | |
CN106095412B (en) | A kind of method for closing and device of application program | |
US20220012068A1 (en) | Data processing method, apparatus, device, and system | |
CN109271078A (en) | Content share method, terminal device and storage medium | |
CN106201740A (en) | Broadcast message management method, device and equipment | |
WO2016090702A1 (en) | Dual-card dual-standby call method, device and terminal | |
CN106201574A (en) | A kind of startup method and device of application interface | |
CN105828424A (en) | Intelligent terminal and energy consumption quantitative control method thereof | |
CN106055076B (en) | A kind of sensor method for closing and device | |
CN106296135A (en) | Event-prompting method, device and terminal | |
CN106095054B (en) | A kind of method for closing and device of application program | |
CN111061981A (en) | Page management method and device, storage medium and electronic equipment | |
CN108089970A (en) | Predict method, terminal and the storage medium of remaining capacity up time | |
CN107729781A (en) | The anti-lost method of mobile terminal, mobile terminal and computer-readable recording medium | |
CN110083433A (en) | Embedded software running method and device, terminal and computer readable storage medium | |
CN106650409B (en) | A kind of terminal control method and terminal | |
CN105988841A (en) | Update method of application program, and mobile terminal | |
CN106095055B (en) | A kind of method for closing and device of application program | |
CN108388458A (en) | Message treatment method and Related product | |
CN106095487B (en) | A kind of method for closing and device of application program | |
CN106055365B (en) | A kind of closing application program method and apparatus | |
CN107682526A (en) | A kind of application message methods of exhibiting and its equipment |
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 | ||
CB02 | Change of applicant information |
Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190212 |