CN103902266A - Method and device for cleaning application running in background - Google Patents
Method and device for cleaning application running in background Download PDFInfo
- Publication number
- CN103902266A CN103902266A CN201210576281.6A CN201210576281A CN103902266A CN 103902266 A CN103902266 A CN 103902266A CN 201210576281 A CN201210576281 A CN 201210576281A CN 103902266 A CN103902266 A CN 103902266A
- Authority
- CN
- China
- Prior art keywords
- application
- timer
- active window
- thread
- described 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 238000004140 cleaning Methods 0.000 title abstract description 9
- 230000006378 damage Effects 0.000 claims description 41
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a method for cleaning an application running in the background. The method includes the steps of setting up an application timer thread for managing the running state of the application, generating an application timer management node corresponding to the application through the timer thread when the application runs, judging whether the application satisfies a preset destroying condition or not when the application runs in the background, and if yes, destroying the application. The invention further discloses a corresponding device. According to the scheme, when the certain application which runs in the background and satisfies the preset destroying condition, the applicator is destroyed, and therefore the application operation speed of a mobile terminal is increased, the overall performance of the device is improved, and use experience of a user is improved to a great extent.
Description
Technical field
The present invention relates to mobile communication technology field, specially refer to a kind of method and apparatus of clearing up running background application.
Background technology
Along with the development of mobile Internet, the mobile terminal such as smart mobile phone and panel computer that carries Android system is widely used, wherein, the popularization of the mobile terminal of low and middle-end configuration is the highest, masses are also than being easier to consumption, but the mobile terminal of low and middle-end configuration, outstanding shortcoming is that internal memory is low and power consumption is large.In Android system, after opening in operating application, in the time that being not foreground application, it can be transferred to background application, but this application process still exists, and committed memory and resource all the time, and along with user uses the time of mobile terminal more and more longer, the application of opening is also more and more, operate after a period of time user like this, the application operating speed of mobile terminal can reduce, and causes its overall performance to decline; May cause in addition touch effect and the sensitivity of touch-screen, thereby have a strong impact on the experience of user to mobile terminal.
Summary of the invention
Fundamental purpose of the present invention, for a kind of method and apparatus of clearing up running background application is provided, is intended to improve the application operating speed of mobile terminal, promotes its overall performance, and improves user's experience.
The invention provides a kind of method of clearing up running background application, comprising:
Create the application timer thread of the running status for managing application;
In the time of application operation, generate the application timer management node corresponding with this application by described application timer thread;
While being applied as running background, judge that whether described application reaches preset destruction condition, if so, destroys described application when described.
Preferably, described in the time of application operation, generate the application timer management node corresponding with this application by described application timer thread and comprise:
In the time of application operation, by the running status mark of the application timer of this application of described application timer thread creation, described application, the active window title of described application, and the identified group of the active window of application;
According to the running status mark of described application timer, described application, the active window title of described application, and the identified group of the active window of described application generates the application timer management node corresponding with this application.
Preferably, whether the running status of described application mark is the application of front stage operation for identifying this application; The identified group of the active window of described application comprises the active window mark of application and the active window current state identifier of application, wherein, the active window of the active window mark of described application for applying described in unique identification, the active window current state identifier of described application is used to indicate the current running status of described active window.
Preferably, described in the time being applied as running background, judge whether described application reaches preset destruction condition and comprise:
When described while being applied as running background, whether reach preset application timer threshold value the working time that judges described application; Described application timer threshold value is the time maximum value of the described application of operation and process, internal memory and the resource relevant to this application;
If whether reach preset application timer threshold value the working time of application, judge whether the remaining space of Installed System Memory reaches preset extreme value.
Preferably, carry out described judge whether application reaches preset destruction condition after, also comprise:
Judge that whether display screen is in screen lock state.
Preferably, after generating the application timer management node corresponding with this application by application timer thread described in carrying out, also comprise:
The described application timer management node generating is joined in the thread queue of described application timer thread.
Preferably, described destruction application comprises:
The state of described application is switched to destroy state by halted state or halted state, destroy described application and process, internal memory and the resource relevant to this application;
From the thread queue of described application timer thread, delete the application timer management node corresponding with described application.
The present invention also provides a kind of device of clearing up running background application, comprising:
Thread creation module, for creating the application timer thread of the running status for managing application;
Node generation module, in the time that application moves, generates the application timer management node corresponding with this application by described application timer thread;
The first judge module, for when described in while being applied as running background, judge whether described application reaches preset destruction condition;
Destroy module, when reach preset destruction condition when described application, destroy described application.
Preferably, described node generation module comprises:
Creating unit, in the time that application moves, by the running status mark of the application timer of this application of described application timer thread creation, described application, the active window title of described application, and the identified group of the active window of application;
Node generation unit, for according to the active window title of the running status mark of described application timer, described application, described application, and the identified group of the active window of described application generates the application timer management node corresponding with this application.
Preferably, whether the running status of described application mark is the application of front stage operation for identifying this application; The identified group of the active window of described application comprises the active window mark of application and the active window current state identifier of application, wherein, the active window of the active window mark of described application for applying described in unique identification, the active window current state identifier of described application is used to indicate the current running status of described active window.
Preferably, described judge module comprises:
The first judging unit, for when described in while being applied as running background, whether reach preset application timer threshold value the working time that judges described application; Described application timer threshold value is the time maximum value of the described application of operation and process, internal memory and the resource relevant to this application;
The second judging unit, if for whether reaching preset application timer threshold value the working time of application, judge whether the remaining space of Installed System Memory reaches preset extreme value.
Preferably, the device of cleaning running background application also comprises:
The second judge module, for judging that whether display screen is in screen lock state.
Preferably, the device of cleaning running background application also comprises:
Thread adds module, for the described application timer management node generating being joined to the thread queue of described application timer thread.
Preferably, described destruction module comprises:
Destroy unit, for the state of described application is switched to destroy state by halted state or halted state, destroy described application and process, internal memory and the resource relevant to this application;
Delete cells, deletes the application timer management node corresponding with described application for the thread queue from described application timer thread.
The present invention, by the time of the os starting of mobile terminal, creates the application timer thread of the running status for managing application, in the time of application operation, generates the application timer management node corresponding with this application by the application timer thread creating; When switch application or when exiting current application and making this application transfer running background to, judge that whether application reaches preset destruction condition, if so, destroys this application.In the time transferring certain application of running background to and reach preset destruction condition, this application is destroyed, thereby improved the application operating speed of mobile terminal, promote its overall performance, and improved to a great extent user's experience.
Brief description of the drawings
Fig. 1 is the schematic flow sheet that the present invention clears up method one embodiment of running background application;
Fig. 2 is that the present invention clears up the schematic flow sheet that generates application timer management node in the method for running background application;
Fig. 3 is that the present invention clears up in the method for running background application and judge the schematic flow sheet of applying the destruction condition that whether reaches preset;
Fig. 4 is the schematic flow sheet that the present invention clears up another embodiment of method of running background application;
Fig. 5 is the schematic flow sheet that the present invention clears up the another embodiment of method of running background application;
Fig. 6 is that the present invention clears up the schematic flow sheet of destroying application in the method for running background application;
Fig. 7 is the structural representation that the present invention clears up device one embodiment of running background application;
Fig. 8 is the structural representation that the present invention clears up node generation module in the device of running background application;
Fig. 9 is the structural representation that the present invention clears up the first judge module in the device of running background application;
Figure 10 is the structural representation that the present invention clears up another embodiment of device of running background application;
Figure 11 is the structural representation that the present invention clears up the another embodiment of device of running background application;
Figure 12 is that the present invention clears up the structural representation of destroying module in the device of running background application.
Realization, functional characteristics and the advantage of the object of the invention, in connection with embodiment, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The invention provides a kind of method of clearing up running background application, reach preset application timer threshold value when transferring certain application of running background to, and the display screen of current mobile terminal is in the time of screen lock state, this application and relative all processes, internal memory and resource are destroyed, realize and dynamically clear up operating application.
With reference to Fig. 1, Fig. 1 is the schematic flow sheet that the present invention clears up method one embodiment of running background application.
The method of the kind cleaning running background application that the present embodiment provides, comprising:
Step S10, creates the application timer thread that is used for the running status of managing application;
In the present embodiment, by improving the kernel code of Android system in mobile terminal, start a timer thread, improve the AMS(Activity Manager Service in Android system), in the process of the os starting of mobile terminal, be responsible for creating an application timer thread by AMS.Be responsible for receiving timer management application interface according to the issued message of arranging of user and data by AMS simultaneously, send the message of destruction in the process of the application of running background.
The flow process that creates application timer thread is: in the time of the os starting of mobile terminal, the system service module SystemServer of one of kernel process by Android system calls that to start rank be the function of init1 and init2, initialization Dalvik virtual machine, and in init2, call new and start method, for creating and starting service thread ServerThread; When starting AMS after ServerThread operation, then create application timer thread AppTimerThread by new Thread mode.Application timer thread carries out wireless circulating, waits for the message that AMS sends and processes accordingly according to message.
Step S20, in the time of application operation, generates the application timer management node corresponding with this application by application timer thread;
Create after application timer thread, in the time of a certain application operation, AMS notice application timer thread has new application operation, then by application timer thread, generate an application timer management node corresponding with the application of current operation, this application timer management node generating manages the active window of corresponding application for timing.In the present embodiment, when user's switch application makes this application in the time that backstage is moved, can dynamically also adjust in real time the attribute of this application timer management node; Maybe in the time that this application is destroyed, by this application timer management knot removal.
Step S30, in the time being applied as running background, judges that whether application reaches preset destruction condition, if so, performs step S31;
Step S31, destroys application.
As user's switch application, the application of current operation just can be in halted state or halted state, but it still can go to backstage and continue operation, in the time being applied as running background, judge whether this application reaches preset destruction condition, in the present embodiment, preset destruction condition is the predefined indicated condition of destroying current application that is used to indicate, while only having current application to reach this destruction condition, just carry out the step of destroying this application.
The embodiment of the present invention, by when the os starting of mobile terminal, create the application timer thread of the running status for managing application, in the time of application operation, generate the application timer management node corresponding with this application by the application timer thread creating; When switch application or when exiting current application and making this application transfer running background to, judge that whether application reaches preset destruction condition, if so, destroys this application.In the time transferring certain application of running background to and reach preset destruction condition, this application is destroyed, thereby improved the application operating speed of mobile terminal, promote its overall performance, and improved to a great extent user's experience.
With reference to Fig. 2, Fig. 2 is that the present invention clears up the schematic flow sheet that generates application timer management node in the method for running background application.
In the above-described embodiments, step S20 comprises:
Step S21, in the time of application operation, by the application timer of this application of application timer thread creation, the running status mark of application, the active window title of application, and the identified group of the active window of application;
When having created after application timer thread, in the time of application operation, pass through the application timer of created this application of application timer thread creation, the running status mark of this application, the active window title of this application, and the identified group of the active window of this application.Wherein, whether the running status mark of application is the application of front stage operation for identifying this application, can adjust in real time this running status and identify in the time that application goes to running background by foreground; The identified group of the active window of application comprises the active window mark of application and the active window current state identifier of application, wherein, the active window mark of application is for the active window of this application of unique identification, the active window current state identifier of application is used to indicate the current running status of described active window, in the present embodiment, when application current while being front stage operation, its active window current state identifier is TRUE, and in the time that application transfers running background to, its active window current state identifier is adjusted into FALSE.
Step S22, according to the running status mark of application timer, application, the active window title of application, and the identified group of the active window of application generates the application timer management node corresponding with this application.
Application timer thread creation the application timer corresponding with the application of current operation, the running status mark of application, the active window title of application, and after the identified group of the active window of application, AMS is according to the running status mark of created application timer, application, the active window title of application, and the identified group of the active window of application generates the application timer management node corresponding with this application.
In the time of application operation, create the application timer of this application, the running status mark of application, the active window title of application, and the identified group of the active window of application, and according to the running status mark of application timer, application, the active window title of application, and the identified group of the active window of application generates the application timer management node corresponding with this application, by application timer management node, the active window of application is managed, thereby for improving the application operating speed of mobile terminal, and the overall performance of lifting mobile terminal provides the foundation.
With reference to Fig. 3, Fig. 3 is that the present invention clears up in the method for running background application and judge the schematic flow sheet of applying the destruction condition that whether reaches preset.
Clear up in method one embodiment of running background application in the present invention, step S30 comprises:
Step S301, in the time being applied as running background, judges whether reach preset application timer threshold value the working time of applying;
In the time being applied as running background, first judge whether reach preset application timer threshold value the working time of applying.In the present embodiment, preset application timer threshold value be user according to actual needs, in the time maximum value of the set operation of timer management application interface application and process, internal memory and the resource relevant to this application.Simultaneously, dynamically set for the convenience of the user answering maximum time of application destruction, one visual administration interface can be set in mobile terminal, for user, application timer threshold value is set, user can be by selecting fixing threshold value in drop-down list corresponding to each application, alternative value has 1 hour, 5 hours, 24 hours, 48 hours, one week, or more other values; And if do not selected, be defaulted as sky, the method can not play any impact to this application.
Step S302, if whether reach preset application timer threshold value the working time of application, judges whether the remaining space of Installed System Memory reaches preset extreme value.
In the time judging the application timer threshold value that reaches preset the working time of application, further judge now whether the remaining space of the Installed System Memory of mobile terminal reaches preset extreme value, in the present embodiment, this preset extreme value can arrange according to actual needs, in the time ensureing that user uses mobile terminal, can, because the process of destroying application takies Installed System Memory, not cause the not smooth phenomenon of use.And in the time judging the remaining space of Installed System Memory and whether reach preset extreme value, just destroy the process of application.
In the time judging the application timer threshold value that reaches preset the working time of application, further judge now whether the remaining space of the Installed System Memory of mobile terminal reaches preset extreme value, in order to ensure not affect user's use in the time destroying application, whether the remaining space that reaches preset application timer threshold value and Installed System Memory working time that the present embodiment is application by the condition setting of destroying application reaches preset extreme value meets simultaneously, like this, just, can further improve the application operating speed of mobile terminal.
With reference to Fig. 4, Fig. 4 is the schematic flow sheet that the present invention clears up another embodiment of method of running background application.
Clear up method one embodiment of running background application based on the present invention, after execution step S30, the method also comprises:
Step S32, judges that whether display screen is in screen lock state.
In the present embodiment, in the time judging the destruction condition that reaches preset the working time of application, further judge that the display screen of mobile terminal now, whether in screen lock state, in this way, destroys this application.In order to ensure not to be subject to the impact on backstage in user uses the process of mobile terminal, simultaneously in order to ensure the process of the unnecessary application of after application operation a period of time unified cleaning, reach preset destruction condition the working time that the present embodiment is application by the condition setting of destroying application simultaneously satisfied in screen lock state with the display screen of mobile terminal.
After reaching preset destruction condition the working time of judging application, further judge that whether the display screen of mobile terminal is now in screen lock state, in the time that two conditions meet simultaneously, just destroy application, thereby the application operating speed that has further improved mobile terminal, has further promoted its overall performance.
With reference to Fig. 5, Fig. 4 is the schematic flow sheet that the present invention clears up the another embodiment of method of running background application.
Clear up method one embodiment of running background application based on the present invention, after execution step S20, the method also comprises:
Step S40, joins the application timer management node of generation in the thread queue of application timer thread.
In the active window title that identifies, applies according to the running status of application timer, application, and after the identified group of active window of application generated the application timer management node corresponding with this application, application timer thread joins generated application timer management node in the thread queue of application timer thread, so that make this application in the time that backstage is moved when user's switch application, can be dynamically and adjust in real time the attribute of this application timer management node; Maybe in the time that this application is destroyed, by this application timer management knot removal.
Generating after the application timer management node corresponding with the application of current operation, the application timer management node of generation is joined in the thread queue of application timer thread, be convenient to dynamically also adjust in real time the attribute of this application timer management node, be further the application operating speed that improves mobile terminal, and the overall performance of lifting mobile terminal provide premise.
With reference to Fig. 6, Fig. 6 is that the present invention clears up the schematic flow sheet of destroying application in the method for running background application.
Clear up in method one embodiment of running background application in the present invention, step S31 comprises:
Step S311, switches to destroy state by the state of application by halted state or halted state, destroys application and process, internal memory and the resource relevant to this application;
Step S312 deletes the application timer management node corresponding with application from the thread queue of application timer thread.
In the time that user exits application, the state of this application is for suspending Paused state, and in the time that user's switch application is applied to other, the state of this application is for stopping Stop state, and now this application transfers backstage to and continues operation; And reach preset application timer threshold value working time when judging this application, and the display screen of further judging mobile terminal is current in the time of screen lock state, first the state of this application is switched to destroy state by halted state or halted state, then by application timer thread notice AMS, AMS destroys application and process, internal memory and the resource relevant to this application.When having destroyed after application and process, internal memory and the resource relevant to this application, from the thread queue of application timer thread, delete and apply corresponding application timer management node.
When user exits application or switch application is applied to other, this application transfers backstage to and continues when operation, and the state of this application is switched to destroy state by halted state or halted state, and destroys application and process, internal memory and the resource relevant to this application; Then from the thread queue of application timer thread, delete the application timer management node corresponding with application, thereby further ensure to improve the application operating speed of mobile terminal, promote its overall performance, and further ensured to improve to a great extent user's experience.
The present invention also provides a kind of device of clearing up running background application.
With reference to Fig. 7, Fig. 7 is the structural representation that the present invention clears up device one embodiment of running background application.
The device of the cleaning running background application that the present embodiment provides, comprising:
The first judge module 30, in the time being applied as running background, judges whether application reaches preset destruction condition;
Destroy module 40, in the time applying the destruction condition that reaches preset, destroy application.
In the present embodiment, by improving the kernel code of Android system in mobile terminal, start a timer thread, improve the AMS(Activity Manager Service in Android system), in the process of the os starting of mobile terminal, be responsible for creating an application timer thread by thread creation module 10 by AMS.Be responsible for receiving timer management application interface according to the issued message of arranging of user and data by AMS simultaneously, send the message of destruction in the process of the application of running background.
The flow process that creates application timer thread is: in the time of the os starting of mobile terminal, the system service module SystemServer of one of kernel process by Android system calls that to start rank be the function of init1 and init2, initialization Dalvik virtual machine, and in init2, call new and start method, for creating and starting service thread ServerThread; When starting AMS after ServerThread operation, then create application timer thread AppTimerThread by new Thread mode.Application timer thread carries out wireless circulating, waits for the message that AMS sends and processes accordingly according to message.
Create after application timer thread, in the time of a certain application operation, AMS notice application timer thread has new application operation, and posterior nodal point generation module 20 generates an application timer management node corresponding with the application of current operation by application timer thread, this application timer management node generating manages the active window of corresponding application for timing.In the present embodiment, when user's switch application makes this application in the time that backstage is moved, can dynamically also adjust in real time the attribute of this application timer management node; Maybe in the time that this application is destroyed, by this application timer management knot removal.
As user's switch application, the application of current operation just can be in halted state or halted state, but it still can go to backstage and continue operation, in the time being applied as running background, judge by the first judge module 30 whether this application reaches preset destruction condition, in the present embodiment, preset destruction condition is the predefined indicated condition of destroying current application that is used to indicate, while only having current application to reach this destruction condition, destroy module 40 and just carry out the step of destroying this application.
The embodiment of the present invention, by when the os starting of mobile terminal, create the application timer thread of the running status for managing application, in the time of application operation, generate the application timer management node corresponding with this application by the application timer thread creating; When switch application or when exiting current application and making this application transfer running background to, judge that whether application reaches preset destruction condition, if so, destroys this application.In the time transferring certain application of running background to and reach preset destruction condition, this application is destroyed, thereby improved the application operating speed of mobile terminal, promote its overall performance, and improved to a great extent user's experience.
With reference to Fig. 8, Fig. 8 is the structural representation that the present invention clears up node generation module in the device of running background application.
In the above-described embodiments, node generation module 20 comprises:
Creating unit 21, in the time that application moves, by the application timer of this application of application timer thread creation, the running status mark of application, the active window title of application, and the identified group of the active window of application;
When having created after application timer thread, in the time of application operation, the application timer thread creating creates the application timer of this application, the running status mark of this application, the active window title of this application by creating unit 21, and the identified group of the active window of this application.Wherein, whether the running status mark of application is the application of front stage operation for identifying this application, can adjust in real time this running status and identify in the time that application goes to running background by foreground; The identified group of the active window of application comprises the active window mark of application and the active window current state identifier of application, wherein, the active window mark of application is for the active window of this application of unique identification, the active window current state identifier of application is used to indicate the current running status of described active window, in the present embodiment, when application current while being front stage operation, its active window current state identifier is TRUE, and in the time that application transfers running background to, its active window current state identifier is adjusted into FALSE.
Application timer thread creation the application timer corresponding with the application of current operation, the running status mark of application, the active window title of application, and after the identified group of the active window of application, the active window title that AMS is identified, applies according to the running status of created application timer, application by node generation unit 22, and the identified group of the active window of application generates the application timer management node corresponding with this application.
In the time of application operation, create the application timer of this application, the running status mark of application, the active window title of application, and the identified group of the active window of application, and according to the running status mark of application timer, application, the active window title of application, and the identified group of the active window of application generates the application timer management node corresponding with this application, by application timer management node, the active window of application is managed, thereby for improving the application operating speed of mobile terminal, and the overall performance of lifting mobile terminal provides the foundation.
With reference to Fig. 9, Fig. 9 is the structural representation that the present invention clears up the first judge module in the device of running background application.
Device one embodiment that clears up running background application based on the present invention, the first judge module 30 comprises:
The first judging unit 31, in the time being applied as running background, judges whether reach preset application timer threshold value the working time of applying; Application timer threshold value is the time maximum value of operation application and process, internal memory and the resource relevant to this application;
The second judging unit 32, if for whether reaching preset application timer threshold value the working time of application, judge whether the remaining space of Installed System Memory reaches preset extreme value.
In the time being applied as running background, first the first judging unit 31 judges whether reach preset application timer threshold value the working time of application.In the present embodiment, preset application timer threshold value be user according to actual needs, in the time maximum value of the set operation of timer management application interface application and process, internal memory and the resource relevant to this application.Simultaneously, dynamically set for the convenience of the user answering maximum time of application destruction, one visual administration interface can be set in mobile terminal, for user, application timer threshold value is set, user can be by selecting fixing threshold value in drop-down list corresponding to each application, alternative value has 1 hour, 5 hours, 24 hours, 48 hours, one week, or more other values; And if do not selected, be defaulted as sky, the method can not play any impact to this application.
In the time judging the application timer threshold value that reaches preset the working time of application, the second judging unit 32 further judges now whether the remaining space of the Installed System Memory of mobile terminal reaches preset extreme value, in the present embodiment, this preset extreme value can arrange according to actual needs, in the time ensureing that user uses mobile terminal, can, because the process of destroying application takies Installed System Memory, not cause the not smooth phenomenon of use.And in the time judging the remaining space of Installed System Memory and whether reach preset extreme value, just destroy the process of application.
In the time judging the application timer threshold value that reaches preset the working time of application, further judge now whether the remaining space of the Installed System Memory of mobile terminal reaches preset extreme value, in order to ensure not affect user's use in the time destroying application, whether the remaining space that reaches preset application timer threshold value and Installed System Memory working time that the present embodiment is application by the condition setting of destroying application reaches preset extreme value meets simultaneously, like this, just, can further improve the application operating speed of mobile terminal.
With reference to Figure 10, Figure 10 is the structural representation that the present invention clears up another embodiment of device of running background application.
Device one embodiment that clears up running background application based on the present invention, this device also comprises:
The second judge module 50, for judging that whether display screen is in screen lock state.
In the present embodiment, in the time judging the destruction condition that reaches preset the working time of application, the second judge module 50 further judges that the display screen of mobile terminal now, whether in screen lock state, in this way, destroys this application.In order to ensure not to be subject to the impact on backstage in user uses the process of mobile terminal, simultaneously in order to ensure the process of the unnecessary application of after application operation a period of time unified cleaning, reach preset destruction condition the working time that the present embodiment is application by the condition setting of destroying application simultaneously satisfied in screen lock state with the display screen of mobile terminal.
After reaching preset destruction condition the working time of judging application, further judge that whether the display screen of mobile terminal is now in screen lock state, in the time that two conditions meet simultaneously, just destroy application, thereby the application operating speed that has further improved mobile terminal, has further promoted its overall performance.
With reference to Figure 11, Figure 11 is the structural representation that the present invention clears up the another embodiment of device of running background application.
Device one embodiment that clears up running background application based on the present invention, this device also comprises:
Thread adds module 60, for the application timer management node of generation being joined to the thread queue of application timer thread.
In the active window title that identifies, applies according to the running status of application timer, application, and after the identified group of active window of application generated the application timer management node corresponding with this application, application timer thread adds module 60 generated application timer management node to be joined in the thread queue of application timer thread by thread, so that make this application in the time that backstage is moved when user's switch application, can be dynamically and adjust in real time the attribute of this application timer management node; Maybe in the time that this application is destroyed, by this application timer management knot removal.
Generating after the application timer management node corresponding with the application of current operation, the application timer management node of generation is joined in the thread queue of application timer thread, be convenient to dynamically also adjust in real time the attribute of this application timer management node, be further the application operating speed that improves mobile terminal, and the overall performance of lifting mobile terminal provide premise.
With reference to Figure 12, Figure 12 is that the present invention clears up the structural representation of destroying module in the device of running background application.
Clear up in device one embodiment of running background application in the present invention, destroy module 40 and comprise:
Destroy unit 41, for the state of application is switched to destroy state by halted state or halted state, destroy application and process, internal memory and the resource relevant to this application;
In the time that user exits application, the state of this application is for suspending Paused state, and in the time that user's switch application is applied to other, the state of this application is for stopping Stop state, and now this application transfers backstage to and continues operation; And reach preset application timer threshold value working time when judging this application, and the display screen of further judging mobile terminal is current in the time of screen lock state, first the state of this application is switched to destroy state by halted state or halted state, then by application timer thread notice AMS, AMS destroys application and process, internal memory and the resource relevant to this application by destroying unit 41.When having destroyed after application and process, internal memory and the resource relevant to this application, delete from the thread queue of application timer thread by delete cells 42 and apply corresponding application timer management node.
When user exits application or switch application is applied to other, this application transfers backstage to and continues when operation, and the state of this application is switched to destroy state by halted state or halted state, and destroys application and process, internal memory and the resource relevant to this application; Then from the thread queue of application timer thread, delete the application timer management node corresponding with application, thereby further ensure to improve the application operating speed of mobile terminal, promote its overall performance, and further ensured to improve to a great extent user's experience.
The foregoing is only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.
Claims (14)
1. a method of clearing up running background application, is characterized in that, comprising:
Create the application timer thread of the running status for managing application;
In the time of application operation, generate the application timer management node corresponding with this application by described application timer thread;
While being applied as running background, judge that whether described application reaches preset destruction condition, if so, destroys described application when described.
2. method according to claim 1, is characterized in that, described in the time of application operation, generates the application timer management node corresponding with this application comprise by described application timer thread:
In the time of application operation, by the running status mark of the application timer of this application of described application timer thread creation, described application, the active window title of described application, and the identified group of the active window of application;
According to the running status mark of described application timer, described application, the active window title of described application, and the identified group of the active window of described application generates the application timer management node corresponding with this application.
3. method according to claim 2, is characterized in that, whether the running status mark of described application is the application of front stage operation for identifying this application; The identified group of the active window of described application comprises the active window mark of application and the active window current state identifier of application, wherein, the active window of the active window mark of described application for applying described in unique identification, the active window current state identifier of described application is used to indicate the current running status of described active window.
4. method according to claim 3, is characterized in that, described in the time being applied as running background, judges whether described application reaches preset destruction condition and comprise:
When described while being applied as running background, whether reach preset application timer threshold value the working time that judges described application; Described application timer threshold value is the time maximum value of the described application of operation and process, internal memory and the resource relevant to this application;
If whether reach preset application timer threshold value the working time of application, judge whether the remaining space of Installed System Memory reaches preset extreme value.
5. method according to claim 1, is characterized in that, carry out described judge whether application reaches preset destruction condition after, also comprise:
Judge that whether display screen is in screen lock state.
6. according to the method described in any one in claim 1 to 5, it is characterized in that, after generating the application timer management node corresponding with this application by application timer thread described in carrying out, also comprise:
The described application timer management node generating is joined in the thread queue of described application timer thread.
7. method according to claim 6, is characterized in that, described destruction application comprises:
The state of described application is switched to destroy state by halted state or halted state, destroy described application and process, internal memory and the resource relevant to this application;
From the thread queue of described application timer thread, delete the application timer management node corresponding with described application.
8. a device of clearing up running background application, is characterized in that, comprising:
Thread creation module, for creating the application timer thread of the running status for managing application;
Node generation module, in the time that application moves, generates the application timer management node corresponding with this application by described application timer thread;
The first judge module, for when described in while being applied as running background, judge whether described application reaches preset destruction condition;
Destroy module, when reach preset destruction condition when described application, destroy described application.
9. device according to claim 8, is characterized in that, described node generation module comprises:
Creating unit, in the time that application moves, by the running status mark of the application timer of this application of described application timer thread creation, described application, the active window title of described application, and the identified group of the active window of application;
Node generation unit, for according to the active window title of the running status mark of described application timer, described application, described application, and the identified group of the active window of described application generates the application timer management node corresponding with this application.
10. device according to claim 9, is characterized in that, whether the running status mark of described application is the application of front stage operation for identifying this application; The identified group of the active window of described application comprises the active window mark of application and the active window current state identifier of application, wherein, the active window of the active window mark of described application for applying described in unique identification, the active window current state identifier of described application is used to indicate the current running status of described active window.
11. devices according to claim 10, is characterized in that, described judge module comprises:
The first judging unit, for when described in while being applied as running background, whether reach preset application timer threshold value the working time that judges described application; Described application timer threshold value is the time maximum value of the described application of operation and process, internal memory and the resource relevant to this application;
The second judging unit, if for whether reaching preset application timer threshold value the working time of application, judge whether the remaining space of Installed System Memory reaches preset extreme value.
12. devices according to claim 8, is characterized in that, also comprise:
The second judge module, for judging that whether display screen is in screen lock state.
Device in 13. according to Claim 8 to 12 described in any one, is characterized in that, also comprises:
Thread adds module, for the described application timer management node generating being joined to the thread queue of described application timer thread.
14. devices according to claim 13, is characterized in that, described destruction module comprises:
Destroy unit, for the state of described application is switched to destroy state by halted state or halted state, destroy described application and process, internal memory and the resource relevant to this application;
Delete cells, deletes the application timer management node corresponding with described application for the thread queue from described application timer thread.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210576281.6A CN103902266A (en) | 2012-12-26 | 2012-12-26 | Method and device for cleaning application running in background |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210576281.6A CN103902266A (en) | 2012-12-26 | 2012-12-26 | Method and device for cleaning application running in background |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN103902266A true CN103902266A (en) | 2014-07-02 |
Family
ID=50993610
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210576281.6A Pending CN103902266A (en) | 2012-12-26 | 2012-12-26 | Method and device for cleaning application running in background |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103902266A (en) |
Cited By (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104199732A (en) * | 2014-08-28 | 2014-12-10 | 上海新炬网络技术有限公司 | Intelligent processing method for PGA memory overflow |
| CN104899153A (en) * | 2015-06-04 | 2015-09-09 | 上海卓易科技股份有限公司 | Background application cleaning method and system |
| CN105159772A (en) * | 2015-09-27 | 2015-12-16 | 陆俊 | Control method for memory of mobile terminal and mobile terminal |
| CN105407236A (en) * | 2015-12-28 | 2016-03-16 | 惠州Tcl移动通信有限公司 | Application closing method and system based on mobile terminal |
| CN105956495A (en) * | 2016-04-15 | 2016-09-21 | 奇酷软件(深圳)有限公司 | Social application program operation control method and system, and mobile terminal |
| CN106201683A (en) * | 2016-06-30 | 2016-12-07 | 宇龙计算机通信科技(深圳)有限公司 | A kind of manage the method for application, device and terminal |
| CN106648855A (en) * | 2016-11-21 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and device for controlling application program of terminal |
| CN106775759A (en) * | 2017-01-03 | 2017-05-31 | 惠州Tcl移动通信有限公司 | Detection method and system that a kind of application based on mobile terminal is closed |
| WO2017206403A1 (en) * | 2016-05-31 | 2017-12-07 | 宇龙计算机通信科技(深圳)有限公司 | Memory optimization method, optimization apparatus and terminal |
| WO2018000675A1 (en) * | 2016-06-30 | 2018-01-04 | 宇龙计算机通信科技(深圳)有限公司 | Background application management apparatus and terminal, and background application management method |
| WO2018014447A1 (en) * | 2016-07-18 | 2018-01-25 | 中兴通讯股份有限公司 | Application management method and device, and mobile terminal |
| CN107807832A (en) * | 2017-11-14 | 2018-03-16 | 广东欧珀移动通信有限公司 | Background application cleaning method, device, storage medium and electronic equipment |
| CN107861818A (en) * | 2017-11-30 | 2018-03-30 | 努比亚技术有限公司 | Internal memory method for cleaning, mobile terminal and storage medium based on TP and LCD |
| CN107957906A (en) * | 2017-12-20 | 2018-04-24 | 珠海全志科技股份有限公司 | Application management method, computer installation, the computer-readable recording medium of terminal device |
| CN108154030A (en) * | 2017-11-22 | 2018-06-12 | 努比亚技术有限公司 | Application widget management-control method, terminal and computer readable storage medium |
| WO2019085754A1 (en) * | 2017-10-31 | 2019-05-09 | Oppo广东移动通信有限公司 | Application cleaning method and apparatus, and storage medium and electronic device |
| CN110018911A (en) * | 2018-01-09 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Management of process and inter-process communication methods, calculate equipment and storage medium at device |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090113444A1 (en) * | 2007-10-31 | 2009-04-30 | Google Inc. | Application Management |
| CN101859261A (en) * | 2010-06-09 | 2010-10-13 | 中兴通讯股份有限公司 | Control method and control equipment for releasing memory |
| CN102196097A (en) * | 2011-05-19 | 2011-09-21 | 中兴通讯股份有限公司 | Method and device for automatically closing idle programs of mobile communication terminal background |
| CN102521041A (en) * | 2011-12-14 | 2012-06-27 | 华为终端有限公司 | Method for processing application program and wireless handheld device |
-
2012
- 2012-12-26 CN CN201210576281.6A patent/CN103902266A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090113444A1 (en) * | 2007-10-31 | 2009-04-30 | Google Inc. | Application Management |
| CN101859261A (en) * | 2010-06-09 | 2010-10-13 | 中兴通讯股份有限公司 | Control method and control equipment for releasing memory |
| CN102196097A (en) * | 2011-05-19 | 2011-09-21 | 中兴通讯股份有限公司 | Method and device for automatically closing idle programs of mobile communication terminal background |
| CN102521041A (en) * | 2011-12-14 | 2012-06-27 | 华为终端有限公司 | Method for processing application program and wireless handheld device |
Cited By (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104199732A (en) * | 2014-08-28 | 2014-12-10 | 上海新炬网络技术有限公司 | Intelligent processing method for PGA memory overflow |
| CN104899153A (en) * | 2015-06-04 | 2015-09-09 | 上海卓易科技股份有限公司 | Background application cleaning method and system |
| CN105159772A (en) * | 2015-09-27 | 2015-12-16 | 陆俊 | Control method for memory of mobile terminal and mobile terminal |
| CN105407236A (en) * | 2015-12-28 | 2016-03-16 | 惠州Tcl移动通信有限公司 | Application closing method and system based on mobile terminal |
| CN105407236B (en) * | 2015-12-28 | 2019-10-29 | Tcl移动通信科技(宁波)有限公司 | It is a kind of that method for closing and system are applied based on mobile terminal |
| CN105956495A (en) * | 2016-04-15 | 2016-09-21 | 奇酷软件(深圳)有限公司 | Social application program operation control method and system, and mobile terminal |
| CN105956495B (en) * | 2016-04-15 | 2019-08-02 | 奇酷软件(深圳)有限公司 | Progress control method, operation control system and the mobile terminal of social application program |
| WO2017206403A1 (en) * | 2016-05-31 | 2017-12-07 | 宇龙计算机通信科技(深圳)有限公司 | Memory optimization method, optimization apparatus and terminal |
| CN106201683A (en) * | 2016-06-30 | 2016-12-07 | 宇龙计算机通信科技(深圳)有限公司 | A kind of manage the method for application, device and terminal |
| WO2018000675A1 (en) * | 2016-06-30 | 2018-01-04 | 宇龙计算机通信科技(深圳)有限公司 | Background application management apparatus and terminal, and background application management method |
| WO2018014447A1 (en) * | 2016-07-18 | 2018-01-25 | 中兴通讯股份有限公司 | Application management method and device, and mobile terminal |
| CN106648855A (en) * | 2016-11-21 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and device for controlling application program of terminal |
| CN106775759A (en) * | 2017-01-03 | 2017-05-31 | 惠州Tcl移动通信有限公司 | Detection method and system that a kind of application based on mobile terminal is closed |
| WO2019085754A1 (en) * | 2017-10-31 | 2019-05-09 | Oppo广东移动通信有限公司 | Application cleaning method and apparatus, and storage medium and electronic device |
| CN107807832A (en) * | 2017-11-14 | 2018-03-16 | 广东欧珀移动通信有限公司 | Background application cleaning method, device, storage medium and electronic equipment |
| CN108154030A (en) * | 2017-11-22 | 2018-06-12 | 努比亚技术有限公司 | Application widget management-control method, terminal and computer readable storage medium |
| CN107861818A (en) * | 2017-11-30 | 2018-03-30 | 努比亚技术有限公司 | Internal memory method for cleaning, mobile terminal and storage medium based on TP and LCD |
| CN107861818B (en) * | 2017-11-30 | 2022-01-14 | 努比亚技术有限公司 | Memory cleaning method based on TP and LCD, mobile terminal and storage medium |
| CN107957906A (en) * | 2017-12-20 | 2018-04-24 | 珠海全志科技股份有限公司 | Application management method, computer installation, the computer-readable recording medium of terminal device |
| CN110018911A (en) * | 2018-01-09 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Management of process and inter-process communication methods, calculate equipment and storage medium at device |
| CN110018911B (en) * | 2018-01-09 | 2024-01-23 | 斑马智行网络(香港)有限公司 | Process management and inter-process communication method and device, computing equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103902266A (en) | Method and device for cleaning application running in background | |
| AU2019204877B2 (en) | Method for interaction between terminal and network device, and terminal | |
| CN107864271B (en) | A kind of information loading method and device | |
| CN103942113B (en) | The detection method of system reboot reason, device and terminal unit | |
| CN103310009B (en) | Method, device and terminal for updating webpage data | |
| CN102158853B (en) | Method and device for managing download of mobile communication equipment terminal browser | |
| CN106227582A (en) | Elastic telescopic method and system | |
| CN107220076A (en) | A memory recovery method and device | |
| WO2021088503A1 (en) | Discontinuous reception parameter configuration method, paging monitoring method, device, and terminal | |
| CN108900370A (en) | It is long to connect multiple overtime judgment method, device and computer readable storage medium | |
| CN113220360B (en) | Application starting control method and control equipment | |
| CN107357656A (en) | A kind of memory allocation method, mobile terminal and computer-readable recording medium | |
| CN103428241A (en) | Method and system for deploying services | |
| CN105677477A (en) | Method and device for optimizing application program resources and electronic equipment | |
| US11096177B2 (en) | Operation mode switching method and user equipment | |
| CN104460934A (en) | Scheduling method and device for multi central processing units (CPU) | |
| KR20170093224A (en) | Mobile terminal and resource management method thereof | |
| CN116671157A (en) | System and method for saving energy in a network | |
| CN109661020B (en) | Adjusting method and adjusting device for power saving mode of Internet of things and computer-readable storage medium | |
| CN101986679A (en) | Mobile terminal, electricity-saving method and electricity-saving device | |
| CN108513344A (en) | Method and device for reconnecting wearable device in case of network disconnection, wearable device and medium | |
| CN102238108A (en) | Off-line message transmission method | |
| CN103076867A (en) | Cloud terminal processing method and system with function of identifying action of power key | |
| WO2019128574A1 (en) | Information processing method and device, computer device and computer readable storage medium | |
| WO2024120230A1 (en) | Network device management method and apparatus and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140702 |
|
| WD01 | Invention patent application deemed withdrawn after publication |