CN104142844A - Method and device for clearing processes of mobile terminal - Google Patents

Method and device for clearing processes of mobile terminal Download PDF

Info

Publication number
CN104142844A
CN104142844A CN201410403545.7A CN201410403545A CN104142844A CN 104142844 A CN104142844 A CN 104142844A CN 201410403545 A CN201410403545 A CN 201410403545A CN 104142844 A CN104142844 A CN 104142844A
Authority
CN
China
Prior art keywords
described application
residual
mobile terminal
application
processes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410403545.7A
Other languages
Chinese (zh)
Other versions
CN104142844B (en
Inventor
林志泳
张寅祥
黄国栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201410403545.7A priority Critical patent/CN104142844B/en
Publication of CN104142844A publication Critical patent/CN104142844A/en
Application granted granted Critical
Publication of CN104142844B publication Critical patent/CN104142844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a method and a device for clearing processes of a mobile terminal. The method comprises the following steps: S1, selecting an application needing for clearing the processes; S2, receiving a starting order for clearing the processes, and forcedly closing the application; S3, traversing a system/proc catalogue, finding out all processes of the application and all subprocesses of each process, and killing all processes and all subprocesses of each process; and finding out all residual processes of each process of the application, and killing all residual processes of each process of the application. By adopting the method and device for clearing the processes of the mobile terminal, the subprocesses and residual processes of the mobile terminal application can be thoroughly and clearly cleared, and the problems that the system gets stuck and is not smooth due to excessive started subprocesses and residual processes of the mobile terminal can be effectively solved.

Description

A kind of method and device of clearing up mobile terminal process
Technical field
The present invention relates to field of mobile terminals, be specifically related to a kind of method and device of clearing up mobile terminal process, relate in particular to a kind of method and the device that can effectively remove subprocess and residual process.
Background technology
Process is the basis of operating system configuration, and it can be the execution of a secondary program, can be also the activity that a program and data thereof occur when order is carried out on processor.Process is the elementary cell of operating system Dynamic Execution, and in traditional operating system, process is basic allocation units, is also basic performance element.A process may subordinate have a plurality of subprocesss, and subprocess refers to the process being created by another process (correspondence is referred to as parent process).Subprocess has been inherited most of attribute of corresponding parent process, but can only have at most a parent process.
Process for existing Android system is divided into active schedule and non-active schedule conventionally, and active schedule can be divided into foreground process and background process again.In mobile terminal use procedure, process in foreground only has one all the time, active schedule in backstage and non-active schedule can be on the increase along with the use of mobile terminal, these processes of being on the increase can occupy approach exhaustion by system resource, thereby finally affect the process of system.For head it off, existing mobile terminal device is all equipped with process handling method for user, and its button that normally user correspondingly has a clean up process function by clicking is realized a key and cleared up.This kind of processing mode, can be clean by all background process and non-active schedule complete liquidation, but but cannot clean out the subprocess of these background process or non-active schedule completely, more cannot dispose some abnormal conditions and the residual process that produces.
In addition, Android operating system is as the mobile phone operation platform of current smart mobile phone field user group maximum, many third party's application software on market, have also therefore been there are, it has greatly enriched the function of smart mobile phone, but these third party's application software on market are very different, and some third party's application software start various subprocesss voluntarily through the backstage of being everlasting.For this third party software, on backstage, start voluntarily the behavior of various subprocesss; often can cause system card to pause; the problems such as system operation is smooth not, start various subprocesss voluntarily and cannot effectively dispose these third party softwares in the method for existing cleaning background process completely on backstage.
Summary of the invention
In order to overcome deficiency of the prior art, the invention provides a kind of method and device of clearing up mobile terminal process, can clear up up hill and dale subprocess and the residual process of application, effectively solve that mobile terminal pauses because the subprocess that starts and residual process too much cause system card, smooth not problem, also effectively improved the security of mobile terminal system simultaneously.
The present invention is achieved by the following technical solutions: a kind of method of clearing up mobile terminal process, and described method comprises:
S1, selection need the application of clean up process;
The startup command that S2, reception are cleared up process, and apply described in hard closing;
S3, go through all over system/proc catalogue, find out all subprocesss of all processes and each process thereof of described application, and kill all subprocesss of all processes and each process thereof of described application.
Further, described step S3 also comprises, goes through all over system/proc catalogue, finds out all residual process of each process of described application, and kills all residual process of each process of described application.
Preferably, described step S3 is when searching the subprocess of a certain process of described application, if the UID of a certain subprocess is consistent with the UID of described application, and the PID of the PID of its parent process and the process of described application is consistent, the subprocess that meets above-mentioned condition is all killed; If described step S3 is when searching the residual process of each process of described application, if the UID of a certain residual process is consistent with the UID of described application, and the PID of its parent process is 1, the residual process that meets above-mentioned condition all killed.
Substantially above-mentioned inventive concept, the present invention also provides a kind of device of clearing up mobile terminal process, and it comprises:
Process cleaning selected cell, for selecting to need the application of clean up process;
Start processing unit, for receiving the startup command that process is cleared up, and apply described in hard closing;
Process cleaning unit, for going through all over system/proc catalogue, finds out all subprocesss of all processes and each process thereof of described application, and kills all subprocesss of all processes and each process thereof of described application.
Further, described process cleaning unit, also for going through all over system/proc catalogue, finds out all residual process of each process of described application, and kills all residual process of each process of described application.
Preferably, described process cleaning unit is when searching the subprocess of a certain process of described application, if the UID of a certain subprocess is consistent with the UID of described application, and the PID of the PID of its parent process and the process of described application is consistent, the subprocess that meets above condition is all killed; When searching the residual process of each process of described application, if the UID of a certain residual process is consistent with the UID of described application, and the PID of its parent process is 1, the residual process that meets above-mentioned condition all killed.
Method and the device of cleaning mobile terminal process provided by the invention, can clear up thoroughly, neatly subprocess and the residual process of mobile terminal application, effectively solve that mobile terminal pauses because the subprocess starting, residual process too much cause system card, the problem such as smooth not, can effectively improve user to experience; Meanwhile, it also can effectively dispose the various subprocesss that some third party softwares start voluntarily on system backstage and the residual process that some produce because of system exception, thus the security that has effectively improved mobile terminal system.
Accompanying drawing explanation
Accompanying drawing 1 is a kind of process flow diagram of clearing up the method for mobile terminal process in the embodiment of the present invention 1;
Accompanying drawing 2 is a kind of module frame chart of clearing up the device of mobile terminal process in the embodiment of the present invention 2.
Embodiment
For the ease of those skilled in the art's understanding, below in conjunction with accompanying drawing, the invention will be further described.
embodiment 1
As shown in Figure 1, a kind of method of clearing up mobile terminal process, described method comprises:
S1, selection need the application of clean up process;
The startup command that S2, reception are cleared up process, and apply described in hard closing;
S3, go through all over system/proc catalogue, find out all subprocesss of all processes and each process thereof of described application, and all residual process of each process of described application, and kill all subprocesss of all processes and each process thereof of described application and all residual process of each process of described application.In the present invention, " described application " is all to refer to carry out the application of clean up process.
In embodiments of the present invention, described mobile terminal take adopt Android(Android) smart mobile phone of system describes as specific embodiment.In Android system, / proc catalogue is to have comprised that (it comprises process to all details of current system, therefore the information such as file system, hardware) a catalogue, will find out the process of an application and subprocess thereof, residual process, just must system /proc catalogue goes to search.And how to find out subprocess and the residual process of the process of a certain application, be the key factor that the present invention will thoroughly clear up.In the present embodiment, by PID, the UID characteristic of process, search.
PID (Process Identifier), is the identify label of each process, and application program one operational system will be distributed to unique PID of process automatically.Process is ended rear PID by system recoveries, may be continued to distribute to the program of new operation, but generally the PID having killed can not redistributed to new process in Android system.UID, is generally understood as User Identifier, and UID is exactly user's ID in Linux, shows it is which user has moved this program, is mainly used in the management of authority.But different in Android, because Android is single user system, at this moment UID has just been endowed new mission---data sharing, in order to realize data sharing, Android applies and has nearly all distributed different UID for each, unlike traditional Linux, each user is identical just distributes identical UID for it.Therefore in Android, PID and UID are for the identity of recognition application.
In the present embodiment, in step S3, be to find out by the following method and kill the subprocess of process of the application that needs cleaning or kill and residual process, if the UID of a certain subprocess is consistent with the UID of the application that needs cleaning or kill, and the PID of its parent process is consistent with the PID of the process of the application that needs cleaning or kill, and this all kills the subprocess that meets above-mentioned condition; If the UID of a certain residual process is consistent with the UID of the application that needs cleaning or kill, and the PID of its parent process is 1(because the own trustship of parent process of residual process is to Init process), the residual process that meets above-mentioned condition is all killed.In the present embodiment, kill the process of application and all subprocesss of each process thereof that need cleaning or kill, all residual processes, by calling system framework cleaning utility function, realize, as killed process, subprocess and the residual process of application in the present embodiment by ForceStopPackage function.
As the improvement to a upper technical scheme, during the residual process of the application of killing at needs of killing, when it has a plurality of Zygote(incubators) start the situation of process, kill in the process of residual process of application calling ForceStopPackage function, if call T interval time of ForceStopPackage function, be less than preset value (as preset value can be 1 second, preset value specifically can arrange as required) time, and when first process that this application that need to kill starts by Zygote is nonsystematic level process (the UID of this process is greater than 10000), only need be for this nonsystematic level process, find out all residual process of this nonsystematic level process and killed, and search residual process without other processes that start by Zygote for this application again.
embodiment 2
In above-described embodiment 1, provide on the basis of inventive concept of method of cleaning mobile terminal process, a kind of device of clearing up mobile terminal process is also provided in the embodiment of the present invention, as shown in Figure 2, the device of described cleaning mobile terminal process comprises:
Process cleaning selected cell, for selecting to need the application of clean up process;
Start processing unit, for receiving the startup command that process is cleared up, and apply described in hard closing;
Process cleaning unit, for going through all over system/proc catalogue, finds out all subprocesss of all processes and each process thereof of described application, and kills all subprocesss of all processes and each process thereof of described application.
Further, described process cleaning unit, also for going through all over system/proc catalogue, finds out all residual process of each process of described application, and kills all residual process of each process of described application.
Preferably, described process cleaning unit kills all subprocesss of all processes and each process thereof of described application by calling system framework cleaning utility function, and all residual process of described application.Described process cleaning unit is when searching the subprocess of a certain process of described application, if the UID of a certain subprocess is consistent with the UID of described application, and the PID of its parent process is consistent with the PID of the process of described application, the subprocess that meets above condition is all killed; When searching the residual process of each process of described application, if the UID of a certain residual process is consistent with the UID of described application, and the PID of its parent process is 1, the residual process that meets above-mentioned condition all killed.
The device of this cleaning mobile terminal process is the same with the method for the cleaning mobile terminal process in embodiment 1, is to be also applied to adopt in the mobile terminal of Android system, and its application process flow process is identical with embodiment 1, does not repeat them here.
The method of the cleaning mobile terminal process providing by above embodiment 1, embodiment 2 or the process that device is cleared up smart mobile phone, can clear up thoroughly, neatly subprocess and the residual process of smart mobile phone application, effectively solve because the subprocess of its startup, residual process too much cause system card the problem such as pause, smooth not, can effectively improve user to experience; Meanwhile, also can effectively dispose the various subprocesss that some third party softwares start voluntarily on intelligent system backstage and the residual process that some produce because of system exception, thus the security that has effectively improved intelligent mobile phone system.
The content of mentioning in above-described embodiment is preferably embodiment of the present invention, is not limitation of the invention, and without departing from the inventive concept of the premise, any apparent replacement is all within protection scope of the present invention.

Claims (10)

1. clear up a method for mobile terminal process, described method comprises:
S1, selection need the application of clean up process;
The startup command that S2, reception are cleared up process, and apply described in hard closing;
S3, go through all over system/proc catalogue, find out all subprocesss of all processes and each process thereof of described application, and kill all subprocesss of all processes and each process thereof of described application.
2. clear up according to claim 1 the method for mobile terminal process, it is characterized in that:
Described step S3 also comprises, goes through all over system/proc catalogue, finds out all residual process of each process of described application, and kills all residual process of each process of described application.
3. according to the method for clearing up mobile terminal process described in claim 1 or 2, it is characterized in that: described step S3 is when searching the subprocess of a certain process of described application, if the UID of a certain subprocess is consistent with the UID of described application, and the PID of its parent process is consistent with the PID of the process of described application, the subprocess that meets above-mentioned condition is all killed.
4. clear up according to claim 2 the method for mobile terminal process, it is characterized in that: if described step S3 is when searching the residual process of each process of described application, if the UID of a certain residual process is consistent with the UID of described application, and the PID of its parent process is 1, the residual process that meets above-mentioned condition is all killed.
5. according to the method for clearing up mobile terminal process described in claim 2 or 4, it is characterized in that: in described step S3, by calling system framework cleaning utility function, kill all subprocesss of all processes and each process thereof of described application, and all residual process of described application.
6. clear up according to claim 5 the method for mobile terminal process, it is characterized in that: when described application has a plurality of Zygote, start the situation of process, at calling system framework cleaning utility function, kill in the process of residual process of described application, if calling system framework cleaning utility function interval time, T was less than preset value time, and when first process that described application starts by Zygote is nonsystematic level process, only need, for this nonsystematic level process, find out all residual process of this nonsystematic level process and be killed.
7. a device of clearing up mobile terminal process, is characterized in that, comprising:
Process cleaning selected cell, for selecting to need the application of clean up process;
Start processing unit, for receiving the startup command that process is cleared up, and apply described in hard closing;
Process cleaning unit, for going through all over system/proc catalogue, finds out all subprocesss of all processes and each process thereof of described application, and kills all subprocesss of all processes and each process thereof of described application.
8. clear up according to claim 7 the device of mobile terminal process, it is characterized in that: described process cleaning unit is also for going through all over system/proc catalogue, find out all residual process of each process of described application, and kill all residual process of each process of described application.
9. clear up according to claim 8 the device of mobile terminal process, it is characterized in that: described process cleaning unit is when searching the subprocess of a certain process of described application, if the UID of a certain subprocess is consistent with the UID of described application, and the PID of its parent process is consistent with the PID of the process of described application, the subprocess that meets above condition is all killed; When searching the residual process of each process of described application, if the UID of a certain residual process is consistent with the UID of described application, and the PID of its parent process is 1, the residual process that meets above-mentioned condition all killed.
10. according to the device of clearing up mobile terminal process described in any one in claim 7-9, it is characterized in that: described process cleaning unit kills all subprocesss of all processes and each process thereof of described application by calling system framework cleaning utility function, and all residual process of described application.
CN201410403545.7A 2014-08-18 2014-08-18 A kind of method and device for clearing up mobile terminal process Active CN104142844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410403545.7A CN104142844B (en) 2014-08-18 2014-08-18 A kind of method and device for clearing up mobile terminal process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410403545.7A CN104142844B (en) 2014-08-18 2014-08-18 A kind of method and device for clearing up mobile terminal process

Publications (2)

Publication Number Publication Date
CN104142844A true CN104142844A (en) 2014-11-12
CN104142844B CN104142844B (en) 2017-09-26

Family

ID=51852026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410403545.7A Active CN104142844B (en) 2014-08-18 2014-08-18 A kind of method and device for clearing up mobile terminal process

Country Status (1)

Country Link
CN (1) CN104142844B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117258A (en) * 2015-09-07 2015-12-02 青岛海信移动通信技术股份有限公司 Application program uninstalling method and apparatus
CN105718307A (en) * 2014-12-01 2016-06-29 北京神州泰岳软件股份有限公司 Process management method and process management device
CN106557361A (en) * 2016-11-14 2017-04-05 天脉聚源(北京)传媒科技有限公司 A kind of application program exits method and device
CN106681753A (en) * 2016-11-01 2017-05-17 腾讯科技(深圳)有限公司 Software residual process processing method and device
WO2017177698A1 (en) * 2016-04-14 2017-10-19 中兴通讯股份有限公司 Method and apparatus for clearing up process, and storage medium
CN107729088A (en) * 2017-10-31 2018-02-23 深圳依偎控股有限公司 A kind of application management method and system
CN107807832A (en) * 2017-11-14 2018-03-16 广东欧珀移动通信有限公司 Background application method for cleaning, device, storage medium and electronic equipment
CN109032770A (en) * 2018-05-30 2018-12-18 珠海市君天电子科技有限公司 A kind of progress recognizing method, apparatus and electronic equipment
WO2019061060A1 (en) * 2017-09-27 2019-04-04 深圳传音通讯有限公司 Process scanning and killing method and device
CN109800567A (en) * 2019-01-17 2019-05-24 网宿科技股份有限公司 Monitor method and device, the terminal device of foreground application starting
WO2019128574A1 (en) * 2017-12-29 2019-07-04 Oppo广东移动通信有限公司 Information processing method and device, computer device and computer readable storage medium
CN110018855A (en) * 2019-03-27 2019-07-16 深圳创维-Rgb电子有限公司 One kind is based on Android system booting optimization method, storage medium and intelligent terminal
CN110471777A (en) * 2019-06-27 2019-11-19 中国科学院计算机网络信息中心 Multiple users share uses the method and system of Spark cluster in a kind of Python-Web environment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996257A (en) * 2006-12-26 2007-07-11 华为技术有限公司 Method and system for monitoring process
CN103164229A (en) * 2013-04-08 2013-06-19 北京奇虎科技有限公司 Method and device for clearing progresses of mobile terminal
CN103345397A (en) * 2013-07-11 2013-10-09 北京奇虎科技有限公司 Method and device for cleaning processes of mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996257A (en) * 2006-12-26 2007-07-11 华为技术有限公司 Method and system for monitoring process
CN103164229A (en) * 2013-04-08 2013-06-19 北京奇虎科技有限公司 Method and device for clearing progresses of mobile terminal
CN103345397A (en) * 2013-07-11 2013-10-09 北京奇虎科技有限公司 Method and device for cleaning processes of mobile terminal

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105718307A (en) * 2014-12-01 2016-06-29 北京神州泰岳软件股份有限公司 Process management method and process management device
CN105718307B (en) * 2014-12-01 2019-10-25 北京神州泰岳软件股份有限公司 Process management method and management of process device
CN105117258A (en) * 2015-09-07 2015-12-02 青岛海信移动通信技术股份有限公司 Application program uninstalling method and apparatus
WO2017177698A1 (en) * 2016-04-14 2017-10-19 中兴通讯股份有限公司 Method and apparatus for clearing up process, and storage medium
CN106681753A (en) * 2016-11-01 2017-05-17 腾讯科技(深圳)有限公司 Software residual process processing method and device
CN106557361A (en) * 2016-11-14 2017-04-05 天脉聚源(北京)传媒科技有限公司 A kind of application program exits method and device
WO2019061060A1 (en) * 2017-09-27 2019-04-04 深圳传音通讯有限公司 Process scanning and killing method and device
CN107729088A (en) * 2017-10-31 2018-02-23 深圳依偎控股有限公司 A kind of application management method and system
CN107807832A (en) * 2017-11-14 2018-03-16 广东欧珀移动通信有限公司 Background application method for cleaning, device, storage medium and electronic equipment
WO2019128574A1 (en) * 2017-12-29 2019-07-04 Oppo广东移动通信有限公司 Information processing method and device, computer device and computer readable storage medium
CN109032770A (en) * 2018-05-30 2018-12-18 珠海市君天电子科技有限公司 A kind of progress recognizing method, apparatus and electronic equipment
CN109800567A (en) * 2019-01-17 2019-05-24 网宿科技股份有限公司 Monitor method and device, the terminal device of foreground application starting
CN109800567B (en) * 2019-01-17 2021-09-17 网宿科技股份有限公司 Method and device for monitoring foreground application starting and terminal equipment
CN110018855A (en) * 2019-03-27 2019-07-16 深圳创维-Rgb电子有限公司 One kind is based on Android system booting optimization method, storage medium and intelligent terminal
CN110471777A (en) * 2019-06-27 2019-11-19 中国科学院计算机网络信息中心 Multiple users share uses the method and system of Spark cluster in a kind of Python-Web environment
CN110471777B (en) * 2019-06-27 2022-04-15 中国科学院计算机网络信息中心 Method and system for realizing multi-user sharing and using Spark cluster in Python-Web environment

Also Published As

Publication number Publication date
CN104142844B (en) 2017-09-26

Similar Documents

Publication Publication Date Title
CN104142844A (en) Method and device for clearing processes of mobile terminal
JP6286555B2 (en) Method, terminal and system for pushing information
EP2985695B1 (en) Method and device for setting application program state
CN106294351A (en) Log event treating method and apparatus
CN109968352B (en) Robot control method, robot and device with storage function
CN105786519B (en) Android device program management method and android device
CN105677477A (en) Method and device for optimizing application program resources and electronic equipment
CN104850460A (en) Service program thread management method
CN104021141B (en) Method, device and system for data processing and cloud service
CN107171926B (en) Switching method and device of multi-platform message push service
CN104239131A (en) Method and device for shutting application program
WO2015188761A1 (en) Traffic acquiring method and apparatus based on operating system
CN106557404B (en) Application control method and mobile terminal
CN106126216B (en) One kind acceleration starting-up method based on android system and its system
CN102799609A (en) Data acquisition method based on data monitoring
CN104778041A (en) Management method and management system for multi-program shared speech equipment
CN108958980A (en) Prevent method, electronic device and the computer readable storage medium of Activity life cycle exception
CN104834553A (en) Service concurrent processing method for user terminal and user terminal
CN108874440A (en) A kind of method, storage medium and the system of the customized more homepages of user
CN106557415B (en) The processing method and processing device that program is operating abnormally
CN110457125A (en) Freezing method, terminal device and the storage medium of terminal applies
CN104216780A (en) Control method and control device for application program association operation
CN105740009B (en) Version upgrading method and terminal device
CN102387029A (en) System and method for automatically saving equipment configuration information
CN105872775A (en) Silent uninstalling method and device for smart cloud TV application

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.