CN110457136A - A kind of Android system clears up the method, apparatus and terminal device of file automatically - Google Patents
A kind of Android system clears up the method, apparatus and terminal device of file automatically Download PDFInfo
- Publication number
- CN110457136A CN110457136A CN201910734860.0A CN201910734860A CN110457136A CN 110457136 A CN110457136 A CN 110457136A CN 201910734860 A CN201910734860 A CN 201910734860A CN 110457136 A CN110457136 A CN 110457136A
- Authority
- CN
- China
- Prior art keywords
- android system
- cleaning
- terminal device
- priority
- space
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5022—Mechanisms to release resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The present invention provides method, apparatus and terminal device that a kind of Android system clears up file automatically, and wherein method includes: to monitor the operating status of preassigned several critical processes;In the operating status exception for listening to any critical processes, terminal device is restarted;In the reboot process, when the linux kernel for monitoring terminal device restarts completion, judge whether current residual memory headroom can meet space needed for the Android system that is loaded in operation terminal device, if being unsatisfactory for, according to preset cleaning rule, memory headroom is cleared up, when space needed for can meeting operation Android system in the free memory space that obtains of cleaning, starts Android system.This programme can be restarted automatically, and carry out memory cleaning operation automatically in the reboot process when the critical processes of Android system are operating abnormally, to guarantee the normal operation of Android system, improve user experience.
Description
Technical field
The present invention relates to software technology field, in particular to a kind of Android system clear up automatically file method, apparatus and
Terminal device.
Background technique
The operation of Android system needs certain memory space, in internal memory card remaining space deficiency, Android system
Included cleaning tool or third party's cleaning tool can prompt user to clear up memory, the manual select file of user manually on interface
It is cleared up, is operated normally to clean out more remaining spaces for Android system.However, if user is receiving in cleaning
The prompt deposited, for a long time do not carry out memory cleaning operation, may result in Android system and be unable to operate normally, if Android system without
Method operates normally, then user cannot then carry out memory cleaning operation again, forms endless loop, and in this case, system may
It can not restart, to influence user experience.
Summary of the invention
The embodiment of the invention provides method, apparatus and terminal device that a kind of Android system clears up file automatically, with solution
Certainly the problems of the prior art.
In a first aspect, the embodiment of the invention provides a kind of methods that Android system clears up file automatically, comprising:
01, monitor the operating status of preassigned several critical processes;
02, in the operating status exception for listening to any critical processes, restart terminal device;
03, in the reboot process, when the linux kernel for monitoring the terminal device restarts completion, judge current surplus
Space needed for whether remaining memory headroom can meet the Android system for running and being loaded in the terminal device, if not satisfied, holding
Row step 04, if satisfied, executing step 05;
04, according to preset cleaning rule, memory headroom is cleared up, in the free memory space that cleaning obtains
When space needed for can meeting the operation Android system, step 05 is executed;
05, start the Android system, and step 01 is executed after the Android system start completion.
Preferably, the cleaning rule includes several cleaning algorithms, further comprises: clearing up algorithm to each in advance
Set a priority;
Step 04 includes: the sequence according to priority from high to low, one by one operation cleaning algorithm, until having run when previous
After a cleaning algorithm, until space needed for current residual space can meet the operation Android system.
It is preferably, described that a priority is set to each cleaning algorithm in advance, comprising:
The corresponding cleaning algorithm of garbage files cleared up in memory headroom is set as highest priority;And/or
It will be set as lowest priority to the corresponding cleaning algorithm of the terminal device factory reset;And/or
A system will be unloaded and be set as a middle priority using corresponding cleaning algorithm, wherein the centre is excellent
First grade includes one or more.
Preferably, the starting information applied according to system sets the middle priority of the corresponding cleaning algorithm of system application
Size, the starting information includes at least one of the number of starts, starting duration and the last starting time.
Second aspect, the embodiment of the invention also provides the devices that a kind of Android system clears up file automatically, comprising:
Monitor module, for monitoring the operating status of preassigned several critical processes, listen to it is any it is crucial into
When the operating status exception of journey, functional module is restarted in triggering;
It is described to restart functional module, when being triggered by the monitoring module, restart terminal device;
Monitoring modular, in the reboot process, monitoring the linux kernel rebooting status of the terminal device, working as monitoring
When restarting completion to the linux kernel, triggering judgment module executes corresponding operating;
The judgment module, for judging whether current residual memory headroom can meet needed for the operation Android system
Space, if not satisfied, triggering space cleaning modul executes corresponding operating, if satisfied, triggering system starting module executes corresponding behaviour
Make;
The space cleaning modul, for clearing up memory headroom, clearing up according to preset cleaning rule
When space needed for the free memory space obtained can meet the Android system for running and being loaded in the terminal device, triggering system
Starting module of uniting executes corresponding operating;
The system starting module is triggered for starting the Android system, and after the Android system start completion
It monitors module and executes corresponding operating.
Preferably, the cleaning rule includes several cleaning algorithms;
Further comprise: priority level initializing module, for setting a priority to each cleaning algorithm in advance;
The space cleaning modul, is specifically used for: according to the sequence of priority from high to low, algorithm is cleared up in operation one by one,
Until having run after previous cleaning algorithm, space needed for current residual space can meet the operation Android system is
Only.
Preferably, the priority level initializing module, is specifically used for:
The corresponding cleaning algorithm of garbage files cleared up in memory headroom is set as highest priority;And/or
Cleaning algorithm corresponding to terminal device factory reset is set as lowest priority;And/or
A system will be unloaded and be set as a middle priority using corresponding cleaning algorithm, wherein the centre is excellent
First grade includes one or more.
Preferably, the priority level initializing module is set as one using corresponding cleaning algorithm that will unload a system
When a middle priority, according to the starting information that system is applied, the middle priority of the corresponding cleaning algorithm of system application is set
Size, the starting information includes at least one of the number of starts, starting duration and the last starting time.
The third aspect the embodiment of the invention also provides a kind of terminal device, including memory, processor and is stored in
On memory and the computer program that can run on a processor, the processor are realized above-mentioned when executing the computer program
Android system clears up the step of method of file automatically.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program, the computer program realize the step of above-mentioned Android system clears up the method for file automatically when being executed by processor.
The embodiment of the invention provides method, apparatus and terminal device that a kind of Android system clears up file automatically, pass through
The operating status for monitoring preassigned several critical processes, in the operating status exception for listening to any critical processes, weight
Terminal device is opened, and judges whether current residual memory headroom can meet in the operation terminal device in the reboot process and is filled
Space needed for the Android system of load, according to preset cleaning rule, is cleared up memory headroom when being unsatisfactory for,
Thus space needed for meeting operation Android system.This programme, can the critical processes of Android system be operating abnormally when, automatically into
Row is restarted, and carries out memory cleaning operation automatically in the reboot process, to guarantee the normal operation of Android system, improves user
Experience.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 is the method flow diagram that Android system provided by one embodiment of the present invention clears up file automatically;
Fig. 2 is that a kind of program module for the device that Android system provided by one embodiment of the present invention clears up file automatically is shown
It is intended to;
Fig. 3 is the hardware architecture diagram of terminal device provided by one embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Referring to FIG. 1, the embodiment of the invention provides a kind of method that Android system clears up file automatically, this method can be with
Including the following contents:
Step 01, the operating status of preassigned several critical processes is monitored.
The operation of Android system needs multiple processes to support jointly, if had in the multiple processes for supporting Android system to run
One process is operating abnormally, some function of Android system is then unable to normal use or Android system is unable to operate normally, because
Several processes for being used to that Android system to be supported to run are appointed as critical processes by this.
For example, the critical processes can be the process for supporting terminal device display interface normally show, support terminal device
The process of display screen sliding function, the process for supporting terminal device camera function etc..
In the present embodiment, oracle listener is set, the operating status of several critical processes specified to this is monitored,
In, operating status includes normal and abnormal.System running space is insufficient, terminal device receives virus document etc. and will cause pass
The operation exception of key process.
Step 02, in the operating status exception for listening to any critical processes, restart terminal device.
In the operating status exception for listening to any critical processes, show that some function of the Android system can not be just
Often operation, in the case, if not restarting terminal device, may result in Android system and is unable to operate normally, therefore, monitoring
To any critical processes operating status exception when, restart terminal device.
Step 03, in the reboot process, when the linux kernel for monitoring the terminal device restarts completion, judgement is worked as
Space needed for whether preceding free memory space can meet the Android system for running and being loaded in the terminal device, if discontented
Foot executes step 04, if satisfied, executing step 05.
During restarting terminal device, start linux kernel first, then start Android system, enters in terminal device
Show Android system start completion when main interface.
In the present embodiment, if it is impossible to meet skies needed for operation Android system for terminal device current residual memory headroom
Between when, then Android system then can not normally start, therefore, it is necessary to when linux kernel restarts completion, Android system starts it
Before, the judgement in space needed for whether can meeting operation Android system to current residual memory headroom.
The Android system loaded in terminal device upon each update, needed for running space be it is known, only need
Current residual memory headroom in computing terminal equipment.
Step 04, according to preset cleaning rule, memory headroom is cleared up, in the free memory that cleaning obtains
When space needed for space can meet the operation Android system, step 05 is executed.
In current residual memory headroom deficiency, need to clear up memory headroom, it in the present embodiment, can be preparatory
Cleaning rule is set, memory headroom is cleared up according to the cleaning rule.
In an embodiment of the invention, which may include several cleaning algorithms, each cleaning algorithm
It is corresponding to clear up corresponding file.
Required space is run in order to guarantee that the memory headroom cleaned out can satisfy Android system, and guarantees that terminal is set
The use of each application in standby can set a priority to each cleaning algorithm in advance, according to cleaning algorithm cleaning
When memory headroom, cleaning algorithm can be executed one by one according to the sequence of priority.
Specifically, can be according to the sequence of priority from high to low, algorithm is cleared up in operation one by one, until having run when previous
After a cleaning algorithm, until space needed for current residual space can meet the operation Android system.
In the present embodiment, terminal device can generate garbage files in use, these garbage files transport system
Therefore the no any effect of row, and meeting committed memory space can will clear up the corresponding cleaning of garbage files in memory headroom
Algorithm is set as highest priority.
In the present embodiment, it is factory reset that terminal device, which has a function, performs factory reset function
Terminal device, the file of the application of user installation, storage can be deleted, bare machine state when factory is restored to, unless there are must
It wants, otherwise will not be to terminal device factory reset, therefore, it can will be corresponding to the terminal device factory reset
Cleaning algorithm is set as lowest priority.
In the present embodiment, Android may be still insufficient for after cleaning up the garbage files in terminal device
It space needed for system operation, can be with to guarantee more memory headrooms therefore, it is necessary to unload one or more system applications
A system will be unloaded and be set as a middle priority using corresponding cleaning algorithm, wherein the middle priority includes
It is one or more.
Setting for middle priority, the starting information that can be applied in an embodiment of the invention according to system,
The size for setting the middle priority of the corresponding cleaning algorithm of system application, when the starting information includes the number of starts, starting
At least one of long and the last starting time.
A kind of mode can start the number of starts less, starting duration is short, the last starting time gap current time
Farther away system applies corresponding cleaning algorithm, sets higher priority, similarly, the number of starts is started more, starting duration
Long, the last starting closer system of time gap current time applies corresponding cleaning algorithm, sets lower priority.
A kind of mode can calculate the probability that system application will be activated in the recent period according to the starting information that system is applied,
The probability being activated in the recent period is smaller, and the priority of the corresponding cleaning algorithm of system application is higher, conversely, the probability being activated in the recent period
Bigger, the priority of the corresponding cleaning algorithm of system application is lower.
Specifically, the probability that system application will be activated in the recent period is calculated according to the starting information that system is applied, at least may be used
To use a kind of following calculation:
T=[T (n)-T (n-1)+T (n-1)-T (n-2)+...+T (2)-T (1)]/(n-1)
In T-T (n)>t, and when T-T (n)<kt, the probability that system application is activated in the recent period is larger, otherwise, the system
It is smaller using the probability being activated in the recent period.
Wherein, n is the number of starts, and T (n) is the time point of system application n-th starting, and T (n) opens for the last time
Dynamic time point, T are current point in time, and k is the constant greater than 1.
Step 05, start the Android system, and execute step 01 after the Android system start completion.
It is any listening to by monitoring the operating status of preassigned several critical processes in the embodiment of the present invention
When the operating status exception of critical processes, terminal device is restarted, and whether judge current residual memory headroom in the reboot process
Space needed for the Android system for running and being loaded in the terminal device can be met, when being unsatisfactory for, according to preset
Cleaning rule clears up memory headroom, thus space needed for meeting operation Android system.This programme, can be in Android system
When the critical processes of system are operating abnormally, restarted automatically, and carry out memory cleaning operation automatically in the reboot process, to protect
The normal operation of Android system is demonstrate,proved, user experience is improved.
Please continue to refer to Fig. 2, the device that a kind of Android system clears up file automatically, in the present embodiment, Android are shown
The device 10 that system clears up file automatically may include or be divided into one or more program modules, one or more program
Module is stored in storage medium, and as performed by one or more processors, to complete the present invention, and can realize above-mentioned peace
The method that tall and erect system clears up file automatically.The so-called program module of the present invention is the series of computation for referring to complete specific function
Machine program instruction section clears up the device 10 of file in storage medium more suitable for description Android system than program itself automatically
Implementation procedure.The function of each program module of the present embodiment will specifically be introduced by being described below:
It monitors module 101 and is listening to any key for monitoring the operating status of preassigned several critical processes
When running state of a process exception, functional module 102 is restarted in triggering;
It is described to restart functional module 102, when being triggered by the monitoring module 101, restart terminal device;
Monitoring modular 103, in the reboot process, monitoring the linux kernel rebooting status of the terminal device, working as prison
When measuring the linux kernel and restarting completion, triggering judgment module 104 executes corresponding operating;
The judgment module 104, for judging whether current residual memory headroom can meet the operation Android system institute
The space needed, if not satisfied, triggering space cleaning modul 105 executes corresponding operating, if satisfied, triggering system starting module 106
Execute corresponding operating;
The space cleaning modul 105, for clearing up memory headroom, according to preset cleaning rule
When space needed for the free memory space that cleaning obtains can meet the Android system for running and being loaded in the terminal device, touching
Hair system starting module 106 executes corresponding operating;
The system starting module 106 is touched for starting the Android system, and after the Android system start completion
Hair monitors module 101 and executes corresponding operating.
In an embodiment of the invention, the cleaning rule includes several cleaning algorithms;
It may further include: priority level initializing module, for setting a priority to each cleaning algorithm in advance;
The space cleaning modul, is specifically used for: according to the sequence of priority from high to low, algorithm is cleared up in operation one by one,
Until having run after previous cleaning algorithm, space needed for current residual space can meet the operation Android system is
Only.
In an embodiment of the invention, the priority level initializing module, is specifically used for:
The corresponding cleaning algorithm of garbage files cleared up in memory headroom is set as highest priority;And/or
Cleaning algorithm corresponding to terminal device factory reset is set as lowest priority;And/or
A system will be unloaded and be set as a middle priority using corresponding cleaning algorithm, wherein the centre is excellent
First grade includes one or more.
In an embodiment of the invention, the priority level initializing module will unload a system using corresponding clear
When adjustment method is set as a middle priority, according to the starting information that system is applied, sets the corresponding cleaning of system application and calculate
The size of the middle priority of method, the starting information include starting in the time number of starts, starting duration and the last time
It is at least one.
A kind of mode can start the number of starts less, starting duration is short, the last starting time gap current time
Farther away system applies corresponding cleaning algorithm, sets higher priority, similarly, the number of starts is started more, starting duration
Long, the last starting closer system of time gap current time applies corresponding cleaning algorithm, sets lower priority.
A kind of mode can calculate the probability that system application will be activated in the recent period according to the starting information that system is applied,
The probability being activated in the recent period is smaller, and the priority of the corresponding cleaning algorithm of system application is higher, conversely, the probability being activated in the recent period
Bigger, the priority of the corresponding cleaning algorithm of system application is lower.
Specifically, the probability that system application will be activated in the recent period is calculated according to the starting information that system is applied, at least may be used
To use a kind of following calculation:
T=[T (n)-T (n-1)+T (n-1)-T (n-2)+...+T (2)-T (1)]/(n-1)
In T-T (n)>t, and when T-T (n)<kt, the probability that system application is activated in the recent period is larger, otherwise, the system
It is smaller using the probability being activated in the recent period.
Wherein, n is the number of starts, and T (n) is the time point of system application n-th starting, and T (n) opens for the last time
Dynamic time point, T are current point in time, and k is the constant greater than 1.
The present embodiment also provides a kind of terminal device, can such as execute smart phone, tablet computer, the notebook electricity of program
Brain, desktop computer, rack-mount server, blade server, tower server or Cabinet-type server (including independent clothes
Server cluster composed by business device or multiple servers) etc..The terminal device 20 of the present embodiment includes at least but unlimited
In: memory 21, the processor 22 of connection can be in communication with each other by system bus, as shown in Figure 3.It should be pointed out that Fig. 3 is only
The terminal device 20 with component 21-22 is shown, it should be understood that be not required for implementing all components shown, it can
With the implementation of substitution is more or less component.
In the present embodiment, memory 21 (i.e. readable storage medium storing program for executing) includes flash memory, hard disk, multimedia card, card-type memory
(for example, SD or DX memory etc.), random access storage device (RAM), static random-access memory (SRAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, magnetic
Disk, CD etc..In some embodiments, memory 21 can be the internal storage unit of terminal device 20, such as the terminal is set
Standby 20 hard disk or memory.In further embodiments, memory 21 is also possible to the External memory equipment of terminal device 20, example
The plug-in type hard disk being equipped on such as terminal device 20, intelligent memory card (Smart Media Card, SMC), secure digital
(Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, memory 21 can also both include terminal device
20 internal storage unit also includes its External memory equipment.In the present embodiment, memory 21 is installed on end commonly used in storage
The operating system and types of applications software of end equipment 20, such as the Android system of embodiment one clear up the device 10 of file automatically
Program code etc..In addition, memory 21 can be also used for temporarily storing the Various types of data that has exported or will export.
Processor 22 can be in some embodiments central processing unit (Central Processing Unit, CPU),
Controller, microcontroller, microprocessor or other data processing chips.The processor 22 is commonly used in controlling terminal equipment 20
Overall operation.In the present embodiment, program code or processing data of the processor 22 for being stored in run memory 21, example
The device 10 that Android system clears up file automatically is run, such as to realize that Android system in above-described embodiment clears up the side of file automatically
Method.
The present embodiment also provides a kind of computer readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory
(for example, SD or DX memory etc.), random access storage device (RAM), static random-access memory (SRAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, magnetic
Disk, CD, server, App are stored thereon with computer program, phase are realized when program is executed by processor using store etc.
Answer function.The computer readable storage medium of the present embodiment is located for storing the device 10 that Android system clears up file automatically
Reason device realizes the method that the Android system in above-described embodiment clears up file automatically when executing.
To sum up, each embodiment of the present invention at least may be implemented it is following the utility model has the advantages that
1, it in embodiments of the present invention, by monitoring the operating status of preassigned several critical processes, is listening to
When the operating status exception of any critical processes, terminal device is restarted, and judge current residual memory headroom in the reboot process
Space needed for whether can meeting the Android system for running and being loaded in the terminal device, when being unsatisfactory for, according to setting in advance
Fixed cleaning rule, clears up memory headroom, thus space needed for meeting operation Android system.This programme can pacify
When the critical processes of tall and erect system are operating abnormally, restarted automatically, and carries out memory cleaning operation automatically in the reboot process, from
And guarantee the normal operation of Android system, improve user experience.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned apparatus, due to implementing with the method for the present invention
Example is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, and details are not described herein again.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity
Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation
Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non-
It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements,
It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment
Some elements.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including
There is also other identical factors in the process, method, article or equipment of the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light
In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention
Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention,
Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.
Claims (10)
1. a kind of method that Android system clears up file automatically characterized by comprising
01, monitor the operating status of preassigned several critical processes;
02, in the operating status exception for listening to any critical processes, restart terminal device;
03, in the reboot process, when the linux kernel for monitoring the terminal device restarts completion, judge in current residual
Space needed for depositing space and whether can meeting the Android system for running and being loaded in the terminal device, if not satisfied, executing step
Rapid 04, if satisfied, executing step 05;
04, according to preset cleaning rule, memory headroom is cleared up, can be expired in the free memory space that cleaning obtains
When space needed for foot runs the Android system, step 05 is executed;
05, start the Android system, and step 01 is executed after the Android system start completion.
2. the method that Android system clears up file automatically according to claim 1, which is characterized in that
The cleaning rule includes several cleaning algorithms, further comprises: excellent to each cleaning algorithm setting one in advance
First grade;
Step 04 includes: the sequence according to priority from high to low, one by one operation cleaning algorithm, until having run when previous clear
After adjustment method, until space needed for current residual space can meet the operation Android system.
3. the method that Android system clears up file automatically according to claim 2, which is characterized in that described in advance to each
It clears up algorithm and sets a priority, comprising:
The corresponding cleaning algorithm of garbage files cleared up in memory headroom is set as highest priority;And/or
It will be set as lowest priority to the corresponding cleaning algorithm of the terminal device factory reset;And/or
A system will be unloaded and be set as a middle priority using corresponding cleaning algorithm, wherein the middle priority
Including one or more.
4. the method that Android system clears up file automatically according to claim 3, which is characterized in that according to opening for system application
Dynamic information, sets the size of the middle priority of the corresponding cleaning algorithm of system application, the starting information include the number of starts,
At least one of starting duration and the last starting time.
5. the device that a kind of Android system clears up file automatically characterized by comprising
It monitors module and is listening to any critical processes for monitoring the operating status of preassigned several critical processes
When operating status exception, functional module is restarted in triggering;
It is described to restart functional module, when being triggered by the monitoring module, restart terminal device;
Monitoring modular, in the reboot process, the linux kernel rebooting status of the terminal device being monitored, when monitoring
When stating linux kernel and restarting completion, triggering judgment module executes corresponding operating;
The judgment module, for judging sky needed for whether current residual memory headroom can meet the operation Android system
Between, if not satisfied, triggering space cleaning modul executes corresponding operating, if satisfied, triggering system starting module executes corresponding operating;
The space cleaning modul, for clearing up memory headroom, being obtained in cleaning according to preset cleaning rule
Free memory space can meet the Android system for running and being loaded in the terminal device needed for space when, triggering system opens
Dynamic model block executes corresponding operating;
The system starting module for starting the Android system, and is triggered after the Android system start completion and is monitored
Module executes corresponding operating.
6. Android system clears up the device of file automatically according to claim 5, which is characterized in that
The cleaning rule includes several cleaning algorithms;
Further comprise: priority level initializing module, for setting a priority to each cleaning algorithm in advance;
The space cleaning modul, is specifically used for: according to the sequence of priority from high to low, algorithm is cleared up in operation one by one, until
It has run after previous cleaning algorithm, until space needed for current residual space can meet the operation Android system.
7. Android system clears up the device of file automatically according to claim 6, which is characterized in that the priority level initializing mould
Block is specifically used for:
The corresponding cleaning algorithm of garbage files cleared up in memory headroom is set as highest priority;And/or
Cleaning algorithm corresponding to terminal device factory reset is set as lowest priority;And/or
A system will be unloaded and be set as a middle priority using corresponding cleaning algorithm, wherein the middle priority
Including one or more.
8. Android system clears up the device of file automatically according to claim 7, which is characterized in that the priority level initializing mould
Block, will unload a system using corresponding cleaning algorithm be set as a middle priority when, according to system apply open
Dynamic information, sets the size of the middle priority of the corresponding cleaning algorithm of system application, the starting information include the number of starts,
At least one of starting duration and the last starting time.
9. a kind of terminal device, which is characterized in that on a memory and can be in processor including memory, processor and storage
The computer program of upper operation, the processor are realized described in any one of claims 1 to 4 when executing the computer program
Android system clears up the step of method of file automatically.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of Android system described in any one of claims 1 to 4 clears up the method for file automatically is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910734860.0A CN110457136A (en) | 2019-08-09 | 2019-08-09 | A kind of Android system clears up the method, apparatus and terminal device of file automatically |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910734860.0A CN110457136A (en) | 2019-08-09 | 2019-08-09 | A kind of Android system clears up the method, apparatus and terminal device of file automatically |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110457136A true CN110457136A (en) | 2019-11-15 |
Family
ID=68485742
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910734860.0A Pending CN110457136A (en) | 2019-08-09 | 2019-08-09 | A kind of Android system clears up the method, apparatus and terminal device of file automatically |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110457136A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293924A (en) * | 2015-05-20 | 2017-01-04 | Tcl集团股份有限公司 | The EMS memory management process of Android system and device |
CN106598563A (en) * | 2016-10-19 | 2017-04-26 | 广东欧珀移动通信有限公司 | Method and device for restarting intelligent terminal, and intelligent terminal |
CN107168787A (en) * | 2017-07-03 | 2017-09-15 | 赵桂银 | A kind of running of mobile terminal performance improvement method and apparatus |
CN108984366A (en) * | 2018-06-29 | 2018-12-11 | 百度在线网络技术(北京)有限公司 | Monitor processing method, device and the equipment of terminal |
CN109101363A (en) * | 2017-06-21 | 2018-12-28 | 中兴通讯股份有限公司 | Abnormal restoring method, device, smart machine and storage medium based on android system |
-
2019
- 2019-08-09 CN CN201910734860.0A patent/CN110457136A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293924A (en) * | 2015-05-20 | 2017-01-04 | Tcl集团股份有限公司 | The EMS memory management process of Android system and device |
CN106598563A (en) * | 2016-10-19 | 2017-04-26 | 广东欧珀移动通信有限公司 | Method and device for restarting intelligent terminal, and intelligent terminal |
CN109101363A (en) * | 2017-06-21 | 2018-12-28 | 中兴通讯股份有限公司 | Abnormal restoring method, device, smart machine and storage medium based on android system |
CN107168787A (en) * | 2017-07-03 | 2017-09-15 | 赵桂银 | A kind of running of mobile terminal performance improvement method and apparatus |
CN108984366A (en) * | 2018-06-29 | 2018-12-11 | 百度在线网络技术(北京)有限公司 | Monitor processing method, device and the equipment of terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9164748B2 (en) | Information backup method and apparatus | |
US10871985B2 (en) | Displaying media files between changes in states of an application client | |
CN105190555B (en) | Centralized task schedule | |
CN107491346B (en) | Application task processing method, device and system | |
CN109857548B (en) | Storage space optimization method, storage space optimization device, computer equipment and storage medium | |
CN104166577B (en) | A kind of method and apparatus of mobile terminal system upgrading | |
CN104423981A (en) | BMC (Baseboard Management Controller) firmware automatic update system and method | |
CN105511985A (en) | Data backup method and terminal | |
CN102999387B (en) | Process running gear and method | |
CN111158852A (en) | Training resource dynamic allocation method, system, terminal and storage medium | |
CN111209110A (en) | Task scheduling management method, system and storage medium for realizing load balance | |
CN106569917B (en) | Data backup method and mobile terminal | |
CN112463239A (en) | BIOS and BMC interaction option default value modification method, system, terminal and storage medium | |
TW201621623A (en) | System, method and terminal for cleaning memory | |
CN111538585B (en) | Js-based server process scheduling method, system and device | |
CN110083491A (en) | A kind of BIOS initialization method, apparatus, equipment and storage medium | |
CN113778650A (en) | Task scheduling method and device, electronic equipment and storage medium | |
CN108897646A (en) | A kind of switching method and baseboard management controller of BIOS chip | |
CN110457136A (en) | A kind of Android system clears up the method, apparatus and terminal device of file automatically | |
US20200241911A1 (en) | Automatically freeing up virtual machine resources based on virtual machine tagging | |
CN110555009B (en) | Processing method and device for Network File System (NFS) service | |
CN112148420B (en) | Abnormal task processing method based on container technology, server and cloud platform | |
CN113515291A (en) | Equipment online upgrading method and device | |
CN107729022B (en) | Method and device for unloading application program and mobile terminal | |
CN114327986B (en) | FRB2WDT timeout time determining method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191115 |
|
RJ01 | Rejection of invention patent application after publication |