CN107943578A - A kind of memory release method, terminal device and computer-readable medium - Google Patents
A kind of memory release method, terminal device and computer-readable medium Download PDFInfo
- Publication number
- CN107943578A CN107943578A CN201711074581.3A CN201711074581A CN107943578A CN 107943578 A CN107943578 A CN 107943578A CN 201711074581 A CN201711074581 A CN 201711074581A CN 107943578 A CN107943578 A CN 107943578A
- Authority
- CN
- China
- Prior art keywords
- party application
- target
- terminal device
- force
- application
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5022—Mechanisms to release resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention discloses a kind of memory release method, terminal device and computer-readable medium, wherein method includes:Determine the target third-party application of terminal device running background;Identify that the target third-party application is corresponding and stop control by force;The target third-party application is stopped by the control that stops by force by force.In the embodiment of the present invention, which stops target third-party application by force by the corresponding control that stops by force of target third-party application, can effectively close the background program or process of target third-party application operation, further discharge the memory of terminal device.
Description
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of memory release method, terminal device and computer-readable
Medium.
Background technology
As the use of the terminal devices such as the continuous development of the communication technology, mobile phone is more and more frequent, the life band to people
Many convenience are carried out.But terminal device is frequently encountered in use, and the speed of service is slack-off, program operation is slack asks
Topic, it is also possible to can generate heat, is hot, or even crashing.This is mainly due in use, the application of backstage operation at the same time
Substantial amounts of memory is occupied, influences the normal use of user.
Especially for the terminal device for running on Android (Android) system, since Android system is in cleaning application memory
When the often application of resident section running background process, the process of the application of these running backgrounds still can take largely
Memory headroom, causes the low free memory of terminal device.
The content of the invention
The embodiment of the present invention provides a kind of memory release method, can stop by force by the way that target third-party application is corresponding
Control stops target third-party application by force, can effectively close the background program or process of target third-party application operation,
Further discharge the memory of terminal device.
In a first aspect, an embodiment of the present invention provides a kind of memory release method, this method includes:
Determine the target third-party application of terminal device running background;
Identify that the target third-party application is corresponding and stop control by force;
The target third-party application is stopped by the control that stops by force by force.
Second aspect, an embodiment of the present invention provides a kind of terminal device, which includes:
First determination unit, for determining the target third-party application of terminal device running background.
Recognition unit, stops control by force for identifying that the target third-party application is corresponding.
Stop element by force, for stopping the target third-party application by force by the control that stops by force.
The third aspect, an embodiment of the present invention provides a kind of terminal device, including processor, input equipment, output equipment
And memory, the processor, input equipment, output equipment and memory are connected with each other, wherein, the memory is used to store
Terminal device is supported to perform the computer program of the above method, the computer program includes programmed instruction, the processor quilt
It is configured to call described program instruction, the method for performing above-mentioned first aspect.
Fourth aspect, an embodiment of the present invention provides a kind of computer-readable recording medium, the computer-readable storage medium
Computer program is stored with, the computer program includes programmed instruction, and described program instruction makes institute when being executed by a processor
State the method that processor performs above-mentioned first aspect.
The embodiment of the present invention can be stopped by force by identifying the stopping control by force of target third-party application by described
Only control stops the target third-party application operation by force, can effectively close the application of terminal device current background operation
Process, cannot clear up software cleaning by memory compared with some background applications under normal circumstances and delay, it is necessary to be manually operated removing
For deposit data, more fast, the memory of terminal device can be fully discharged.
Brief description of the drawings
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description
Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area
For logical technical staff, without creative efforts, other attached drawings can also be obtained according to these attached drawings.
Fig. 1 is a kind of schematic flow diagram of memory release method provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow diagram for memory release method that another embodiment of the present invention provides;
Fig. 3 is a kind of schematic flow diagram for memory release method that another embodiment of the present invention provides;
Fig. 4 is comprising the interface schematic diagram for stopping control by force in a kind of terminal device provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic block diagram of terminal device provided in an embodiment of the present invention;
Fig. 6 is a kind of terminal device schematic block diagram that another embodiment of the present invention provides.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.Herein
" embodiment " is referred to it is meant that a particular feature, structure, or characteristic described may be embodied in the present invention at least in conjunction with the embodiments
In one embodiment.The phrase, which occurs, in each position in the description might not each mean identical embodiment, nor
With the independent or alternative embodiment of other embodiments mutual exclusion.Those skilled in the art explicitly and implicitly understand,
Embodiment described herein can be combined with other embodiments.
Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without making creative work
The every other embodiment obtained, belongs to the scope of protection of the invention.
Term " first ", " second " in description and claims of this specification and above-mentioned attached drawing etc. are to be used to distinguish
Different objects, rather than for describing particular order.In addition, term " comprising " and " having " and their any deformations, it is intended that
It is to cover non-exclusive include.Such as process, method, system, product or the equipment for containing series of steps or unit do not have
The step of having listed or unit are defined in, but alternatively further includes the step of not listing or unit, or is alternatively also wrapped
Include for other intrinsic steps of these processes, method, product or equipment or unit.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combinations and all possible combinations of one or more of the associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt
Be construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase " if it is determined that " or
" if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true
It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, the terminal device described in the embodiment of the present invention is including but not limited to such as with the sensitive table of touch
Mobile phone, laptop computer or the tablet PC in face (for example, touch-screen display and/or touch pad) etc it is other
Portable set.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but is had
The desktop computer of touch sensitive surface (for example, touch-screen display and/or touch pad).
In discussion below, the terminal device including display and touch sensitive surface is described.However, it should manage
Solution, one or more of the other physical User that terminal device can include such as physical keyboard, mouse and/or control-rod connect
Jaws equipment.
Terminal device supports various application programs, such as one or more of following:Drawing application program, demonstration application
Program, word-processing application, website establishment application program, disk imprinting application program, spreadsheet applications, game are answered
With program, telephony application, videoconference application, email application, instant messaging applications, forging
Refining supports application program, photo management application program, digital camera application program, digital camera application program, web-browsing should
With program, digital music player application and/or video frequency player application program.
The various application programs that can be performed on the terminal device can use at least one of such as touch sensitive surface
Public physical user-interface device.It can be adjusted among applications and/or in corresponding application programs and/or change touch is quick
Feel the corresponding information shown in the one or more functions and terminal device on surface.In this way, the public physics frame of terminal device
Structure (for example, touch sensitive surface) can be supported to apply journey with the various of user interface directly perceived and transparent for a user
Sequence.
Fig. 1 is referred to, Fig. 1 is a kind of schematic flow diagram of memory release method provided in an embodiment of the present invention, such as Fig. 1 institutes
Show, which may include following steps:
101st, terminal device determines the target third-party application of the terminal device running background.
In the embodiment of the present invention, third-party application, also referred to as (English is Application to third party application
Program, referred to as:APP), third-party application software.Third-party application be non-terminal equipment producer exploitation be used for terminal extension
The application program of functions of the equipments.
Application in terminal device can be divided into the application of running background and the application of front stage operation.Front stage operation is answered
With, alternatively referred to as foreground application, be application program that system is currently running, being shown to user.The application of running background,
Alternatively referred to as background application, is the application program for running, being not displayed to user in system background.Under normal circumstances, user
It can see the foreground application in system, can not see background application, user can answer to foreground application input data, modification foreground
Data in, user can not to background application input data, can not also change data in background application.
Terminal device can be using all third-party applications of its running background as target third-party application, can also be according to
Preset rules are using the part third-party application of its running background as target third-party application.Specifically, terminal device can incite somebody to action
The terminal device backstage continuous running time is more than the third-party application of the first preset duration as target third-party application, example
Such as, the first preset duration of terminal device is one hour, then the terminal device can be determined in the continuous fortune in terminal device backstage
The third-party application of row duration more than one hour is target third-party application.
Alternatively, terminal device can determine that power consumption is default more than first in the second preset duration in the terminal device
The third-party application of the running background of power consumption threshold value is target third-party application, for example, the default power consumption threshold of the first of terminal device
It is worth for 5 the percent of the terminal device maximum electricity, the second preset duration of the terminal device is 20 minutes, then when the end
Power consumption of the third-party application of end equipment in 20 minutes of running background is more than the percentage of the terminal device maximum electricity
Five, which can determine that the third-party application is target third-party application.
Alternatively, when the usable memory of terminal device is less than the first default memory threshold, which can be true
It is scheduled on the terminal device running background and CPU occupation rates should for target third party more than the third-party application of default occupation rate threshold value
With, for example, the default memory threshold of the first of terminal device is 5 the percent of the total memory of the terminal device, the second default memory threshold
It is worth for 3 the percent of the total memory of the terminal device, then when the usable memory of the terminal device is less than the total memory of the terminal device
5 percent, which can determine to be more than the terminal device in the terminal device running background and committed memory space
3 percent third-party application of total memory is target third-party application.It should be noted that terminal device can be used
Memory refers to:The memory being not used by of terminal device current residual.
Alternatively, when the central processor CPU temperature of terminal device is more than the first preset temperature threshold value, the terminal device
The third-party application that can determine to be more than the first default occupation rate threshold value in the terminal device running background and CPU occupation rates is mesh
Third-party application is marked, for example, the first preset temperature threshold value of terminal device is 55 degrees Celsius, the first default occupation rate threshold value is hundred
/ five, then when the central processor CPU temperature of the terminal device is more than 55 degrees Celsius, which can determine at the end
The third-party application of end equipment running background and CPU occupation rates more than 5 percent is target third-party application.
In an alternative embodiment, determining the target third-party application of terminal device running background can also include:
When the usable memory of terminal device is less than the 3rd default memory threshold, which can determine at the end
The end equipment running background and third-party application that power consumption is more than the second default power consumption threshold value in the 3rd preset duration is target
Third-party application, for example, the default memory threshold of the 3rd of terminal device is 5 the percent of the total memory of the terminal device, the 3rd is pre-
If when a length of 30 minutes, the second default power consumption threshold value is the 10 of the terminal device maximum electricity, then works as terminal device
Usable memory be less than the total memory of the terminal device 5 percent when, the third-party application of the terminal device is in running background
30 minutes in power consumption be more than the terminal device maximum electricity 10, which can determine the 3rd
Fang Yingyong is target third-party application.
Alternatively, terminal device can determine the terminal device backstage continuous running time be more than the 4th preset duration and
The third-party application that power consumption is more than the 3rd default power consumption threshold value in the 4th preset duration is target third-party application, example
Such as, the 4th preset duration of terminal device is 20 minutes, and the 3rd default power consumption is the percentage of the terminal device maximum electricity
Ten, if being more than the third-party application of 20 minutes, the consumption in 20 minutes in the terminal device backstage continuous running time
Electricity is more than the 10 of the terminal device maximum electricity, then the terminal device can determine the third-party application for target the
Tripartite applies.
Alternatively, when the central processor CPU temperature of terminal device is more than the second preset temperature threshold value, the terminal device
It can determine to be more than the 5th preset duration in the terminal device backstage continuous running time and CPU occupation rates are preset more than second and accounted for
The third-party application for having rate threshold value is target third-party application, for example, the 5th preset duration of terminal device is 20 minutes, the
Two default occupation rate threshold values are 4 percent, and the second preset temperature threshold value is 50 degrees Celsius, when the central processing unit of terminal device
When cpu temperature is more than 50 degrees Celsius, which can determine to be more than 20 in the terminal device backstage continuous running time
The third-party application of minute and CPU occupation rates more than 4 percent is target third-party application.
Alternatively, when the usable memory of terminal device is less than the 4th default memory threshold, which can be true
The terminal device running background duration is scheduled on more than the 6th preset duration and in the 7th preset duration power consumption be more than it is the 3rd pre-
If the third-party application of power consumption threshold value is target third-party application, for example, the default memory threshold of the 4th of terminal device is the end
4 the percent of the total memory of end equipment, the 6th preset duration are 25 minutes, and the 7th preset duration is 20 minutes, the 3rd default power consumption
Threshold value is 8 the percent of the terminal device maximum electricity, then when the usable memory of terminal device is always interior less than the terminal device
Deposit 3 percent when, the third-party application of the terminal device is more than 25 minutes in running background duration, and in 20 minutes
Power consumption is more than 8 the percent of the terminal device maximum electricity, which can determine the third-party application for target the
Tripartite applies.
102nd, the terminal device identifies that above-mentioned target third-party application is corresponding and stops control by force.
Wherein, stop that control can be understood as showing in the application management page of third-party application by force it is virtual by
Key, has some third-party applications when operation, can be autonomously generated the background program of running background, exit above-mentioned third party
Using when can not exit completely, i.e., when exiting the third-party application can terminal device backstage remain the third-party application
Above-mentioned background program or process, these background programs or process also may proceed to run on terminal device backstage, not noticeable, and
And the memory headroom of occupied terminal equipment.In general, user can by the application management page in the third-party application, with
Manual mode thoroughly exits the third-party application using above-mentioned stopping control by force, to stop all of the third-party application
The operation of background program or process.For example, may refer to Fig. 4, Fig. 4 is comprising the boundary for stopping control by force in a kind of terminal device
Face schematic diagram, the control of stopping by force being marked in figure are to stop control by force using A is corresponding in terminal device, are had strong
Row stops that control button can be stopped by force by clicking on this using the function of A, user, stops applying A by force, and can stop should
Run with all processes of A, the memory that release takes using A operations.
In the embodiment of the present invention, which can identify that above-mentioned target third-party application is corresponding and stop control by force
Part.
Specifically, which identifies that above-mentioned target third-party application corresponds to by the miscellaneous function of the terminal device
Stopping control by force.The terminal device for having miscellaneous function (Accessibility Service) can aid in work(by calling
Ancillary events call back function (onAccessibilityEvent) in energy monitors all controls at each interface, can be by auxiliary
Help the control of stopping by force of identification of function target third-party application, filtering other controls, (unloading control as shown in Figure 4, remove
Data control), further, the method simulation of simulation clicking operation is performed in the control interfaces of stopping by force of target third-party application
User clicks on the operation for stopping control button by force, then the target third-party application can be forced to exit and remove all account for
Use memory.
103rd, the terminal device stops above-mentioned target third-party application by force by the above-mentioned control that stops by force.
In the embodiment of the present invention, stop the application that application refers to stop by force being in operating status in terminal device by force,
All running processes of the third-party application can be made all out of service.In general, user is needed by the 3rd
The application management page of Fang Yingyong, is thoroughly moved back using the control of stopping by force in above application administration page in a manual fashion
Go out the third-party application, all background programs or the operation of process of the third-party application could be stopped.
When use stops control by force stops third-party application by force, the third-party application can be closed and set in the terminal
All programs or process of standby running background, so that the operation of the third-party application is completely closed, and out of this terminal device
Deposit the middle effect removed operation data, reach releasing memory.The control of stopping by force as marked in Fig. 4 figures is terminal device
A is corresponding stops control by force for middle application, has the function of to stop applying A by force.
The terminal device can stop above-mentioned target third-party application by force by the above-mentioned control that stops by force, specifically,
, can be by preset algorithm or instruction calls by force after terminal device identifies the control of stopping by force of target third-party application
Stop control, to stop above-mentioned target third-party application by force.
And for example, terminal device travels through the list of application of the terminal device, which may be displayed on the terminal device
Display interface, can be shown on the display interface key remove button, by a key remove button can enter third party
The application interface of application, the terminal device for having miscellaneous function (Accessibility Service) can aid in work(by calling
Ancillary events call back function (onAccessibilityEvent) in energy monitors all controls at each interface, can be by auxiliary
Help the control of stopping by force of identification of function target third-party application, filtering other controls, (unloading control as shown in Figure 4, remove
Data control), perform simulation clicking operation method analog subscriber in the control interfaces of stopping by force of target third-party application and click on
This stops the operation of control button by force, then the target third-party application can be forced to exit and remove all committed memories.
Analog subscriber click on by force click on control button specific code realize can be:Accessibility Node
Info.perform Action(Accessibility Node Info.ACTION_CLICK).Wherein, above step can be followed
Ring performs, i.e., re-executes above-mentioned steps to other target third-party applications, reaches and removes accounting for for all target third-party applications
With the effect of memory.
Alternatively, the above-mentioned target third-party application determined in step 101 can also be multiple target third-party applications.Example
Such as, if above-mentioned target third-party application has five, which identifies above-mentioned five target third-party applications respectively, can be with
The stopping control by force of each target third-party application is called, to stop above-mentioned five target third-party applications by force.It can reach
To the effect for the committed memory for disposably removing multiple target third-party applications automatically.
In the memory release method shown in Fig. 1, terminal device determines the target third party of the terminal device running background
After, which stops above-mentioned target third-party application by force, can effectively close the operation of terminal device current background
Application process, it is not necessary to manually the third-party application the application management page use it is strong in above application administration page
Row stops control, all background programs or the operation of process with regard to that can stop the third-party application, and then fully discharges terminal and set
Standby memory.
Refer to Fig. 2, Fig. 2 is a kind of schematic flow diagram for memory release method that second embodiment of the invention provides, Fig. 2
Further optimization obtains on the basis of Fig. 1.As shown in Fig. 2, the memory release method may include following steps:
201st, terminal device determines the target third-party application of the terminal device running background.
202nd, it is default preferential to determine whether the corresponding priority of above-mentioned target third-party application is less than first for the terminal device
Level.
Specifically, above-mentioned target third-party application has priority, which can be terminal device according to user couple
What the operation preference of above-mentioned target third-party application determined, can be the priority of the higher target third-party application of frequency of use
It is higher.
Specifically, after step 201, before step 203 is performed, which can obtain above-mentioned terminal device
The corresponding precedence information of target third-party application, when the corresponding priority of above-mentioned target third-party application is default less than first excellent
During first level, then perform step 203.If the corresponding priority of above-mentioned target third-party application is greater than or equal to the first pre-set priority
When, terminate this flow.
For example, the first pre-set priority of terminal device is 6, the application of first object third-party application in nearest three days
The number that interface is shown on foreground is 10 times, which determines that the priority of the target third-party application is 20, nearest
The number that the application interface of the second target third-party application is shown on foreground in three days is 1 time, which determines the target
The priority of third-party application is 2, and the priority of first object third-party application is more than 6, the second target third-party application it is excellent
First level is less than 6, which can perform the step of stopping above-mentioned second target third-party application by force.
In an alternative embodiment, after performing step 201, above-mentioned target third-party application is not white list in application, can
To perform step 203.
Specifically, terminal device can obtain it is default apply white list, this using third party is preserved in white list should
Information, for indicating that the third-party application is white list application, white list application can be user according to third-party application
Importance carry out manual setting.
The terminal device identifies whether above-mentioned target third-party application is included in and applies in white list, if it is not, above-mentioned mesh
It is not white list application to mark third-party application, performs step 203;If so, terminate this flow.
In an alternative embodiment, after performing step 201, when above-mentioned target third-party application from being switched to foreground from the background
When frequency is less than the first predeterminated frequency, step 203 can be performed.
For example, the first predeterminated frequency of terminal device is 3 times/tri- days, the first mesh of the terminal device in nearest three days
Mark third-party application from being switched to foreground from the background 10 times, in nearest three days the second target third-party application of the terminal device from
Backstage is switched to foreground 1 time, and first object third-party application is more than 3 times/tri- days from the frequency for being switched to foreground from the background, the second mesh
Mark third-party application from be switched to from the background foreground frequency be less than 3 times/tri- days, the terminal device can perform stop by force it is above-mentioned
The step of second target third-party application.
203rd, the terminal device identifies that above-mentioned target third-party application is corresponding and stops control by force.
204th, the terminal device stops above-mentioned target third-party application by force by the above-mentioned control that stops by force.
Wherein, step 201, step 203 and step 204 may refer to step 101, step 103 and the step shown in above-mentioned Fig. 1
Rapid 104 specific descriptions, details are not described herein again.
In the memory release method shown in Fig. 2, terminal device determines the target third party of the terminal device running background
After, terminal device can determine whether the corresponding priority of above-mentioned target third-party application is less than the first pre-set priority,
If being less than, which identifies the stopping control by force of the target third-party application, stops control by force by this come by force
Stop above-mentioned target third-party application, can effectively close the process of the application of terminal device current background operation, and then fully
The memory of terminal device is discharged, while also avoids stopping the high third-party application of some priority, lifts user experience.
Refer to Fig. 3, Fig. 3 is a kind of schematic flow diagram for memory release method that third embodiment of the invention provides, Fig. 3
Further optimization obtains on the basis of Fig. 2.As shown in figure 3, the memory release method may include following steps:
301st, terminal device determines the target third-party application of the terminal device running background.
302nd, the terminal device determines whether above-mentioned target third-party application is white list application and above-mentioned target third party
Whether it is less than the second pre-set priority using corresponding priority.
Specifically, terminal device can obtain it is default apply white list, this using third party is preserved in white list should
Information, for indicating that the third-party application is white list application, white list application can be user according to third-party application
Importance carry out manual setting, which identifies whether above-mentioned target third-party application is included in and applies white list
Interior, if it is not, above-mentioned target third-party application is not white list application, which can obtain above-mentioned target third party should
With corresponding precedence information, if so, terminating this flow.It is corresponding preferential that the terminal device obtains above-mentioned target third-party application
After level information, when the corresponding priority of above-mentioned target third-party application is less than the second pre-set priority, then step 303 is performed.
If the corresponding priority of above-mentioned target third-party application is greater than or equal to the second pre-set priority, terminate this flow.
In the step, determine whether above-mentioned target third-party application is that white list is applied with determining that above-mentioned target third party should
Whether be less than two steps of the second pre-set priority with corresponding priority order can carry out in no particular order, and may refer to
The specific descriptions of step 202 shown in Fig. 2, details are not described herein again.
In an alternative embodiment, terminal device can determine that above-mentioned target third-party application from the frequency for being switched to foreground from the background
Whether it is less than the second predeterminated frequency, and determines whether above-mentioned target third-party application is white list application.
When above-mentioned target third-party application is less than the second predeterminated frequency and above-mentioned target from the frequency for being switched to foreground from the background
Third-party application is not white list in application, the step that the terminal device stops above-mentioned target third-party application by force can be performed
Suddenly, if above-mentioned target third-party application is greater than or equal to the second predeterminated frequency, or above-mentioned mesh from the frequency for being switched to foreground from the background
Mark third-party application is white list in application, terminating this flow.
In the step, terminal device determines whether above-mentioned target third-party application is less than from the frequency for being switched to foreground from the background
Second predeterminated frequency, and determine above-mentioned target third-party application whether be white list application two steps can be secondary in no particular order
Sequence carries out, and may refer to the specific descriptions of the step 202 shown in Fig. 2, and details are not described herein again.
The 303rd, if above-mentioned target third-party application is not white list application and above-mentioned target third-party application is corresponding preferential
Level is less than the second pre-set priority, which identifies that above-mentioned target third-party application is corresponding and stop control by force.
304th, terminal device stops above-mentioned target third-party application by force by the above-mentioned control that stops by force.
The 305th, if above-mentioned target third-party application is not that white list application or above-mentioned target third-party application are corresponding preferential
Level is less than the second pre-set priority, which terminates this flow.
After step 302 is performed, if above-mentioned target third-party application is not white list application or above-mentioned target third party
It is less than the second pre-set priority using corresponding priority, which can not perform step 303, which terminates
This flow.
Wherein, step 301, step 303 and step 304 can be respectively referring to the step 201 shown in above-mentioned Fig. 2, steps 203
With the specific descriptions of step 204, details are not described herein again.
In the memory release method shown in Fig. 3, terminal device determines the target third party of the terminal device running background
After, terminal device can determine whether above-mentioned target third-party application is white list application and above-mentioned target third-party application
Whether corresponding priority is less than the second pre-set priority, if above-mentioned target third-party application is not white list application and above-mentioned mesh
The corresponding priority of mark third-party application is less than the second pre-set priority, which is stopped by force by the above-mentioned control that stops by force
Only above-mentioned target third-party application, can effectively close the process of the application of terminal device current background operation, and then fully release
The memory of terminal device is put, while also avoids stopping at the third-party application in white list and the high third-party application of priority,
Lift user experience.
Another embodiment of the present invention also provides a kind of terminal device, which, which includes, is used to perform any one of foregoing institute
The unit for the method stated.
Specifically, it is a kind of schematic block diagram of terminal device provided in an embodiment of the present invention referring to Fig. 5.The present embodiment
Terminal device includes:First determination unit, recognition unit and stop element by force.
First determination unit 510, for determining the target third-party application of terminal device running background.
Specifically, the first determination unit 510 can determine pre- more than first in the terminal device backstage continuous running time
If the third-party application of duration is target third-party application, for example, the first preset duration of terminal device is one hour, then first
Determination unit 510 can determine that in the third-party application of the terminal device backstage continuous running time more than one hour be target
Third-party application.
Alternatively, the first determination unit 510 can determine that power consumption is more than in the second preset duration in the terminal device
The third-party application of the running background of first default power consumption threshold value is target third-party application.
Alternatively, when the usable memory of terminal device is less than the first default memory threshold, the first determination unit 510 is also
It can determine to be more than the third-party application of default occupation rate threshold value in the terminal device running background and CPU occupation rates for target the
Tripartite applies.
Alternatively, when the central processor CPU temperature of terminal device is more than the first preset temperature threshold value, first determines list
Member 510 can determine to be more than the first third party for presetting occupation rate threshold value in the terminal device running background and CPU occupation rates and answer
With for target third-party application.
Alternatively, when the usable memory of terminal device is less than the 3rd default memory threshold, the first determination unit 510 can
To determine in the terminal device running background and the 3rd of power consumption more than the second default power consumption threshold value in the 3rd preset duration
Fang Yingyong is target third-party application.
Alternatively, the first determination unit 510 can determine pre- more than the 4th in the terminal device backstage continuous running time
If the duration and third-party application that power consumption is more than the 3rd default power consumption threshold value in the 4th preset duration is target the 3rd
Fang Yingyong.
Alternatively, when the central processor CPU temperature of terminal device is more than the second preset temperature threshold value, first determines list
Member 510 can determine to be more than the 5th preset duration in the terminal device backstage continuous running time and CPU occupation rates are more than second
The third-party application of default occupation rate threshold value is target third-party application.
Alternatively, when the usable memory of terminal device is less than the 4th default memory threshold, the first determination unit 510 can
To determine to be more than the 6th preset duration in the terminal device running background duration and power consumption is more than the in the 7th preset duration
The third-party application of three default power consumption threshold values is target third-party application.
Wherein, the method that the first determination unit 510 determines the target third-party application of terminal device running background, Ke Yican
See the specific descriptions of the step 101 shown in above-mentioned Fig. 1, details are not described herein again.
Recognition unit 520, stops control by force for identifying that above-mentioned target third-party application is corresponding.
Wherein, stop that control can be understood as showing in the application management page of third-party application by force it is virtual by
Key, has some third-party applications when operation, can be autonomously generated the background program of running background, exit above-mentioned third party
Using when can not exit completely, i.e., when exiting the third-party application can terminal device backstage remain the third-party application
Above-mentioned background program or process, these background programs or process also may proceed to run on terminal device backstage, not noticeable, and
And the memory headroom of occupied terminal equipment.In general, user can by the application management page in the third-party application, with
Manual mode thoroughly exits the third-party application using the control of stopping by force in above application administration page, to stop being somebody's turn to do
All background programs of third-party application or the operation of process.For example, may refer to Fig. 4, Fig. 4 is included in a kind of terminal device
Stop the interface schematic diagram of control by force, the control of stopping by force being marked in figure is corresponding strong using A in terminal device
Row stops control, has the function of to stop applying A by force, user can stop control button by force by clicking on this, by force stop
A is only applied, can stop running using all processes of A, the memory that release takes using A operations.
In the embodiment of the present invention, recognition unit 520 can identify that above-mentioned target third-party application is corresponding to be stopped by force
Control.
Specifically, recognition unit 520 can identify that above-mentioned target third party should by the miscellaneous function of the terminal device
Stop control by force with corresponding.There are the terminal device of miscellaneous function (Accessibility Service), recognition unit 520
Can be by calling the ancillary events call back function (onAccessibilityEvent) in miscellaneous function to monitor each interface
All controls, recognition unit 520 can be identified the control of stopping by force of target third-party application by miscellaneous function, filter other
Control (as shown in Figure 4 unloading control, clear data control).
Stop element 530 by force, for stopping above-mentioned target third-party application by force by the above-mentioned control that stops by force.
Specifically, recognition unit 520 identifies that above-mentioned target third-party application is corresponding and stops control by force, stops by force
Unit 530 can stop above-mentioned target third-party application by force by the above-mentioned control that stops by force.
For example, recognition unit 520 identifies the stopping control by force of the target third-party application, stop element 530 by force
Control can be stopped by force by preset algorithm or instruction calls, to stop above-mentioned target third-party application by force.
Alternatively, the definite above-mentioned target third-party application of the first determination unit 510 can be that multiple target third parties should
With, if for example, the definite above-mentioned target third-party application of the first determination unit 510 has five, further, recognition unit 520
Above-mentioned five target third-party applications are identified respectively, and stop element 530 can be every by preset algorithm or instruction calls by force
The stopping control by force of a target third-party application, to stop above-mentioned five target third-party applications by force.
In an alternative embodiment, the terminal device of the present embodiment can also include:
Second determination unit 540, for determining it is pre- whether the corresponding priority of above-mentioned target third-party application is less than first
Setting priority.
Specifically, after the first determination unit 510 determines the target third-party application of terminal device running background, second
Determination unit 540 can obtain the corresponding precedence information of above-mentioned target third-party application, when above-mentioned target third-party application pair
When the priority answered is less than the first pre-set priority, recognition unit 520 can identify that above-mentioned target third-party application is corresponding
Stop control by force, by force stop element 530 can by it is above-mentioned by force stop control stopping by force above-mentioned target third party should
With.If the corresponding priority of above-mentioned target third-party application is greater than or equal to the first pre-set priority, terminate this flow.
In an alternative embodiment, the second determination unit 540 is additionally operable to determine whether above-mentioned target third-party application is white name
Single application.
Specifically, the second determination unit 540 can identify whether above-mentioned target third-party application is included in and apply white list
Interior, if it is not, above-mentioned target third-party application is not white list application, recognition unit 520 can identify above-mentioned target the 3rd
Fang Yingyong is corresponding to stop control by force, and stop element 530 can be stopped above-mentioned by force by the above-mentioned control of stopping by force by force
Target third-party application;If so, terminate this flow.
In an alternative embodiment, the second determination unit 540 is additionally operable to determine that above-mentioned target third-party application switches from backstage
Whether the frequency to foreground is less than the first predeterminated frequency.
It is a kind of terminal device schematic block diagram that another embodiment of the present invention provides referring to Fig. 6.As shown in fig. 6, this implementation
Terminal device in example can include:One or more processors 601;One or more input equipments 602, it is one or more defeated
Go out equipment 603 and memory 604.Above-mentioned processor 601, input equipment 602, output equipment 603 and memory 604 pass through bus
606 connections.Memory 602 is used to store computer program, and the computer program includes programmed instruction, and processor 601 is used for
Perform the programmed instruction that memory 602 stores.Wherein, processor 601 is arranged to caller instruction execution.Above-mentioned input
Device 602, output device 603 and processor 601 are used to call the program code stored in memory 604, perform following operation:
Processor 601, for determining the target third-party application of terminal device running background.
Processor 601, is additionally operable to identify that above-mentioned target third-party application is corresponding and stops control by force.
Processor 601, is additionally operable to stop above-mentioned target third-party application by force by the above-mentioned control that by force stops.
In an alternative embodiment, processor 601 is after the target third-party application of terminal device running background is determined, also
It is determined for whether the corresponding priority of above-mentioned target third-party application is less than the first pre-set priority.
Alternatively, processor 601 can be also used for after the target third-party application of terminal device running background is determined
Determine whether above-mentioned target third-party application is white list application.
Alternatively, processor 601 can be also used for after the target third-party application of terminal device running background is determined
Determine whether above-mentioned target third-party application is less than the first predeterminated frequency from the frequency for being switched to foreground from the background.
It should be appreciated that in embodiments of the present invention, alleged processor 601 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at
It can also be any conventional processor etc. to manage device.
Input equipment 602 can include Trackpad, fingerprint adopt sensor (finger print information that is used to gathering user and fingerprint
Directional information), microphone etc., output equipment 603 can include display (LCD etc.), loudspeaker etc..
The memory 604 can include read-only storage and random access memory, and to processor 601 provide instruction and
Data.The a part of of memory 604 can also include nonvolatile RAM.For example, memory 604 can also be deposited
Store up the information of device type.
In the specific implementation, processor 601, input equipment 602, the output equipment 603 described in the embodiment of the present invention can
Perform described in the first embodiment, second embodiment and 3rd embodiment of memory release method provided in an embodiment of the present invention
Implementation, also can perform the implementation of described terminal device of the embodiment of the present invention, details are not described herein.
A kind of computer-readable recording medium is provided in another embodiment of the invention, the computer-readable recording medium
Computer program is stored with, which includes programmed instruction, and described program instruction is executed by processor.
The computer-readable recording medium can be the storage inside list of the terminal device described in foregoing any embodiment
Member, such as the hard disk or memory of terminal device.The computer-readable recording medium can also be the outside of the terminal device
The plug-in type hard disk being equipped with storage device, such as the terminal device, intelligent memory card (Smart Media Card, SMC),
Secure digital (Secure Digital, SD) blocks, flash card (Flash Card) etc..Further, it is described computer-readable to deposit
Storage media can also both include the internal storage unit of the terminal device or including External memory equipment.It is described computer-readable
Storage medium is used to store the computer program and other programs and data needed for the terminal device.The computer
Readable storage medium storing program for executing can be also used for temporarily storing the data that has exported or will export.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.Upper
State in embodiment, the description to each embodiment all emphasizes particularly on different fields, the part being not described in some embodiment, Ke Yican
See the associated description of other embodiment.
Those of ordinary skill in the art may realize that each exemplary list described with reference to the embodiments described herein
Member and algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are performed with hardware or software mode actually, application-specific and design constraint depending on technical solution.Specially
Industry technical staff can realize described function to each specific application using distinct methods, but this realization is not
It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, the end of foregoing description
The specific work process of end equipment and unit, may be referred to the corresponding process in preceding method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed terminal device and method, Ke Yitong
Other modes are crossed to realize.For example, device embodiment described above is only schematical, for example, the unit is drawn
Point, it is only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can
To combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is in addition, shown or discussed
Mutual coupling, direct-coupling or communication connection can be by the INDIRECT COUPLING of some interfaces, device or unit or
Communication connection or electricity, the connection of mechanical or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs
Purpose.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
It is that unit is individually physically present or two or more units integrate in a unit.It is above-mentioned integrated
Unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part to contribute in other words to the prior art, or all or part of the technical solution can be in the form of software product
Embody, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment the method for the present invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-Only Memory,
ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various can be with storage program
The medium of code.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, various equivalent modifications can be readily occurred in or replaced
Change, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection domain subject to.
Claims (10)
- A kind of 1. memory release method, it is characterised in that including:Determine the target third-party application of terminal device running background;Identify that the target third-party application is corresponding and stop control by force;The target third-party application is stopped by the control that stops by force by force.
- 2. according to the method described in claim 1, it is characterized in that, described identify that the target third-party application is corresponding strong Row, which stops control, to be included:Identify that the target third-party application is corresponding by the miscellaneous function of the terminal device and stop control by force.
- 3. the according to the method described in claim 2, it is characterized in that, target third party of the definite terminal device running background Using including:The third-party application for determining to be more than the first preset duration in terminal device backstage continuous running time is target the 3rd Fang Yingyong;Alternatively,Determine that power consumption is more than the running background of the first default power consumption threshold value in the second preset duration in the terminal device Third-party application is target third-party application;Alternatively,When the usable memory of the terminal device is less than the first default memory threshold, determine to transport on terminal device backstage The third-party application that row and committed memory space are more than the second default memory threshold is target third-party application;Alternatively,When the central processor CPU temperature of the terminal device is more than the first preset temperature threshold value, determine to set in the terminal The third-party application that standby running background and the CPU occupation rates are more than the first default occupation rate threshold value is target third-party application.
- 4. the according to the method described in claim 2, it is characterized in that, target third party of the definite terminal device running background Using including:When the usable memory of the terminal device is less than the 3rd default memory threshold, determine to transport on terminal device backstage Third-party application capable and that power consumption is more than the second default power consumption threshold value in the 3rd preset duration is target third-party application;Or Person,Determine to be more than the 4th preset duration and in the 4th preset duration in terminal device backstage continuous running time The third-party application that power consumption is more than the 3rd default power consumption threshold value is target third-party application;Alternatively,When the central processor CPU temperature of the terminal device is more than the second preset temperature threshold value, determine to set in the terminal Standby backstage continuous running time is more than the 5th preset duration and the CPU occupation rates are more than the 3rd of the second default occupation rate threshold value the Fang Yingyong is target third-party application.
- 5. according to claim 1-4 any one of them methods, it is characterised in that the mesh of the definite terminal device running background Mark third-party application after, it is described identify the target third-party application it is corresponding by force stop control before, the method Further include:When the corresponding priority of the target third-party application is less than the first pre-set priority, the mesh is identified described in execution Mark third-party application it is corresponding by force stop control the step of;Alternatively,When the target third-party application is less than the first predeterminated frequency from the frequency for being switched to foreground from the background, the identification is performed Go out the target third-party application it is corresponding by force stop control the step of;Alternatively,When the target third-party application is not white list in application, identifying that the target third-party application corresponds to described in execution The control of stopping by force the step of.
- 6. according to claim 1-4 any one of them methods, it is characterised in that the mesh of the definite terminal device running background Mark third-party application after, it is described identify the target third-party application it is corresponding by force stop control before, the method Further include:When the target third-party application is not white list application and the corresponding priority of the target third-party application is less than the Identified during two pre-set priorities, described in execution the target third-party application it is corresponding by force stop control the step of.
- 7. according to the method described in claim 1-6 any one, it is characterised in that the definite terminal device running background After target third-party application, it is described identify the target third-party application it is corresponding by force stop control before, the side Method further includes:When the target third-party application is less than the second predeterminated frequency and the target the 3rd from the frequency for being switched to foreground from the background Fang Yingyong is not that white list identifies the corresponding step for stopping control by force of the target third-party application described in application, performing Suddenly.
- 8. a kind of terminal device, it is characterised in that including for performing the method as described in claim 1-7 any claims Unit.
- A kind of 9. terminal device, it is characterised in that including processor, input equipment, output equipment and memory, the processing Device, input equipment, output equipment and memory are connected with each other, wherein, the memory is used to store computer program, the meter Calculation machine program includes programmed instruction, and the processor is arranged to call described program instruction, performs claim 1-7 such as and appoint Method described in one.
- A kind of 10. computer-readable recording medium, it is characterised in that the computer-readable storage medium is stored with computer program, The computer program includes programmed instruction, and described program instruction makes the processor perform such as right when being executed by a processor It is required that 1-7 any one of them methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711074581.3A CN107943578A (en) | 2017-11-03 | 2017-11-03 | A kind of memory release method, terminal device and computer-readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711074581.3A CN107943578A (en) | 2017-11-03 | 2017-11-03 | A kind of memory release method, terminal device and computer-readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107943578A true CN107943578A (en) | 2018-04-20 |
Family
ID=61933358
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711074581.3A Withdrawn CN107943578A (en) | 2017-11-03 | 2017-11-03 | A kind of memory release method, terminal device and computer-readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107943578A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111198812A (en) * | 2018-11-20 | 2020-05-26 | 深圳市优必选科技有限公司 | Application fault detection method, application fault detection device and terminal equipment |
WO2022032668A1 (en) * | 2020-08-14 | 2022-02-17 | 深圳传音控股股份有限公司 | Application management method and apparatus, and storage medium |
CN114968456A (en) * | 2022-05-07 | 2022-08-30 | 麒麟合盛网络技术股份有限公司 | Method and device for controlling terminal |
-
2017
- 2017-11-03 CN CN201711074581.3A patent/CN107943578A/en not_active Withdrawn
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111198812A (en) * | 2018-11-20 | 2020-05-26 | 深圳市优必选科技有限公司 | Application fault detection method, application fault detection device and terminal equipment |
CN111198812B (en) * | 2018-11-20 | 2024-02-09 | 深圳市优必选科技有限公司 | Application fault detection method, application fault detection device and terminal equipment |
WO2022032668A1 (en) * | 2020-08-14 | 2022-02-17 | 深圳传音控股股份有限公司 | Application management method and apparatus, and storage medium |
CN114968456A (en) * | 2022-05-07 | 2022-08-30 | 麒麟合盛网络技术股份有限公司 | Method and device for controlling terminal |
CN114968456B (en) * | 2022-05-07 | 2024-03-08 | 麒麟合盛网络技术股份有限公司 | Method and device for controlling terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105159530B (en) | A kind of the display object switching method and device of application | |
CN107528922A (en) | A kind of information push method, terminal and computer-readable recording medium | |
CN107844189A (en) | A kind of method, system, terminal and computer-readable recording medium for reducing blank screen power consumption | |
CN105335099A (en) | Memory cleaning method and terminal | |
CN107943578A (en) | A kind of memory release method, terminal device and computer-readable medium | |
CN106648326B (en) | The method and mobile terminal of screen time is put out in adjustment | |
CN107608724A (en) | A kind of method, terminal and computer-readable recording medium for managing application program | |
CN106951550A (en) | Data processing method, device and mobile terminal | |
CN107491300A (en) | The reminding method and its terminal of a kind of intelligent function | |
CN108712559A (en) | A kind of disturbance-free method, system and terminal device | |
CN107066326A (en) | The method and terminal of a kind of scheduler task | |
CN108089970A (en) | Predict method, terminal and the storage medium of remaining capacity up time | |
CN107920162A (en) | Control method, mobile terminal and the computer-readable recording medium of alarm clock | |
CN107765969A (en) | A kind of method, terminal and computer-readable recording medium for opening application program | |
CN107302493A (en) | A kind of message treatment method, message processing apparatus and intelligent terminal | |
CN107861855A (en) | A kind of method, terminal, system and computer-readable recording medium for reducing abnormal power consumption | |
CN106503543A (en) | A kind of method and apparatus of management application program | |
CN107783633A (en) | A kind of method, terminal and computer-readable recording medium for managing application program | |
CN107368255A (en) | Unlocking method, mobile terminal and computer-readable recording medium | |
CN109885356A (en) | ADB debugs port open method, apparatus, Android device and readable storage medium storing program for executing | |
CN109358927A (en) | The method, apparatus and terminal device that application program is shown | |
CN108363915A (en) | unlocking method, mobile terminal and computer readable storage medium | |
CN107894907A (en) | A kind of operating mode control method of terminal, terminal and computer-readable medium | |
CN105739771A (en) | Display interface management method and device as well as terminal | |
CN106775894A (en) | The operation method and terminal of a kind of application program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20180420 |