CN103631934B - Garbage files detection method and device - Google Patents

Garbage files detection method and device Download PDF

Info

Publication number
CN103631934B
CN103631934B CN201310655757.XA CN201310655757A CN103631934B CN 103631934 B CN103631934 B CN 103631934B CN 201310655757 A CN201310655757 A CN 201310655757A CN 103631934 B CN103631934 B CN 103631934B
Authority
CN
China
Prior art keywords
garbage files
memory space
parameter
time
file
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.)
Active
Application number
CN201310655757.XA
Other languages
Chinese (zh)
Other versions
CN103631934A (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.)
Beijing Cheetah Mobile Technology Co Ltd
Original Assignee
Beijing Cheetah Mobile Technology Co 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 Beijing Cheetah Mobile Technology Co Ltd filed Critical Beijing Cheetah Mobile Technology Co Ltd
Priority to CN201310655757.XA priority Critical patent/CN103631934B/en
Publication of CN103631934A publication Critical patent/CN103631934A/en
Application granted granted Critical
Publication of CN103631934B publication Critical patent/CN103631934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of garbage files detection method and device.The garbage files detection method, including:Detect scheduled parameter;Judge whether the parameter meets trigger condition;When judging that the parameter meets trigger condition, the garbage files in memory space corresponding with the trigger condition are determined;Displaying is for prompting user to delete the garbage files to discharge the prompt message of the memory space.It can be seen that, by using this programme, the detection process of garbage files can be during application operation/system operation, and it is not limited to using after unloading, it can effectively improve the flexibility of garbage files detection, it solves the problems, such as the memory space inadequate occurred during application operation/system operation, improves the usage experience of user.

Description

Garbage files detection method and device
Technical field
The present invention relates to garbage files process field, more particularly to a kind of garbage files detection method and device.
Background technology
With the development that science and technology is at full speed, various electronic equipments are constantly abundant and facilitate popular life.Due to profit There are the advantages such as convenient and efficient, saving resource with electronic equipment processing information so that electronic equipment becomes people’s lives or work An indispensable part in work.
Wherein, application operation/system operation in electronic equipment buffer culture or would generally generate file, and file meeting It is automatically saved in corresponding memory space.But the capacity of the memory space of electronic equipment has centainly restricted, because This needs to determine the certain files preserved to discharge memory space to ensure the follow-up normal operation of system or application It is deleted for garbage files.
In the prior art, this is usually determined as garbage files using corresponding cache file after application unloads, and The prompt message for deleting the garbage files is shown to user, to after receiving the instruction for deleting garbage files, delete the rubbish Rubbish file realizes the purpose of release memory space with this.Such as:By taking the smart mobile phone of current Android system as an example, application After installation, generated caching all default storages detect this and unloaded answer under a catalogue of mobile phone, and after application unloads With corresponding directory scenario, then triggering plays frame and informs user's " whether clearing up the application catalogue just unloaded ", and then according to user Instruction execute corresponding operation.
Although the above method deletes the detected catalogue for having unloaded application as garbage files, play The effect in releasing memory space;But due to garbage files detection process application unload after occur so that application operation/ In system operation, due to continuous buffer culture or generate file cause insufficient space when, memory space can not be discharged, this nothing The normal operation for influencing whether electronic equipment is doubted, the usage experience of user is reduced.
Invention content
Based on the above issues, the embodiment of the invention discloses a kind of garbage files detection method and device, to solve to apply The problem of memory space inadequate occurred during operation/system operation.Technical solution is as follows:
In a first aspect, an embodiment of the present invention provides a kind of garbage files detection methods, including:
Detect scheduled parameter;
Judge whether the parameter meets trigger condition;
When judging that the parameter meets trigger condition, the rubbish in memory space corresponding with the trigger condition is determined Rubbish file;
Displaying is for prompting user to delete the garbage files to discharge the prompt message of the memory space.
Preferably, the garbage files detection method further includes:
Receive the deletion instruction for deleting the garbage files that user sends out;
Delete the garbage files.
Preferably, the scheduled parameter of detection, including:
The active volume of application corresponding memory space of the detection in state data memory;
Judge whether the parameter meets trigger condition correspondingly, described, including:
Judge whether the active volume is less than predetermined volumes threshold value, if it is, meeting trigger condition.
Preferably, the garbage files in determination memory space corresponding with the trigger condition, including:
Using file of the storage time in the first predetermined amount of time in the memory space as garbage files;
Alternatively,
Storage time in the memory space is met into preset time, described by storing in the second predetermined amount of time Using corresponding file as garbage files.
Preferably, the active volume of the application corresponding memory space of the detection in state data memory, including:
Detection in file cache state application it is corresponding for store cached file memory space can Use capacity;
Alternatively,
Detection in file generated state application it is corresponding for store generated file memory space can Use capacity.
Preferably, when judging that the active volume is less than predetermined volumes threshold value, the method further includes:
The quantity using respective file can be accommodated by calculating the active volume;
Correspondingly, the displaying is believed for prompting user to delete the garbage files with the prompt for discharging the memory space Breath, including:
Displaying is for prompting active volume described in user that can accommodate described in the quantity using respective file and deletion Garbage files are to discharge the prompt message of the memory space.
Preferably, the scheduled parameter of detection, including:
Detect present system time;
Judge whether the parameter meets trigger condition correspondingly, described, including:
Judge whether the present system time was the first predetermined time, if it is, meeting trigger condition.
Preferably, the scheduled parameter of detection, including:
Detection receives system time when unlock event notice;
Judge whether the parameter meets trigger condition correspondingly, described, including:
The system time is judged whether in third predetermined amount of time, if it is, meeting trigger condition.
Preferably, the garbage files in determination memory space corresponding with the trigger condition, including:
File of the storage time in the 4th predetermined amount of time in the memory space of the file of predetermined format will be stored with to make For garbage files.
Preferably, the garbage files in determination memory space corresponding with the trigger condition, including:
By application cache text of the storage time in the memory space for storing application cache file in the 5th predetermined amount of time Part is as garbage files;
And/or
By system cache text of the storage time in the memory space of storage system cache file in the 6th predetermined amount of time Part is as garbage files.
Second aspect, the embodiment of the present invention additionally provide a kind of garbage files detection device, including:
Parameter detection module, for detecting scheduled parameter;
Parameter judgment module for judging whether the parameter meets trigger condition, and works as and judges that the parameter meets When trigger condition, garbage files determining module is triggered;
Garbage files determining module, for determining the garbage files in memory space corresponding with the trigger condition;
Prompt message display module, it is empty to discharge the storage for prompting user to delete the garbage files for showing Between prompt message.
Preferably, the garbage files detection device further includes:
Command reception module is deleted, the deletion instruction for deleting the garbage files sent out for receiving user;
Command process module is deleted, for deleting the garbage files.
Preferably, the parameter detection module, including:
First parameter detecting unit, for detecting the available of the corresponding memory space of application in state data memory Capacity;
Correspondingly, the parameter judgment module, including:
First parameter judging unit, for judging whether the active volume is less than predetermined volumes threshold value, if so, triggering Garbage files determining module.
Preferably, the garbage files determining module, including:
First garbage files determination unit is used for storage time in the memory space in the first predetermined amount of time File is as garbage files;
Alternatively,
Second garbage files determination unit, for being in the second predetermined amount of time by storage time in the memory space What is stored meets preset time, the corresponding file of the application as garbage files.
Preferably, the garbage files detection device further includes:
Quantity of documents determination unit judges the active volume less than predetermined for working as the first parameter judging unit When capacity threshold, the quantity using respective file can be accommodated by calculating the active volume;
Correspondingly, the prompt message display module, including:
Prompt message display unit is corresponded to for showing for prompting active volume described in user that can accommodate the application The quantity and the deletion garbage files of file are to discharge the prompt message of the memory space.
Preferably, the parameter detection module, including:
Second parameter detecting unit, for detecting present system time;
Correspondingly, the parameter judgment module, including:
Second parameter judging unit, for judging whether the present system time was the first predetermined time, if so, touching Send out garbage files determining module.
Preferably, the parameter detection module, including:
Third parameter detecting unit receives system time when unlock event notice for detecting;
Correspondingly, the parameter judgment module, including:
Third parameter judging unit, for judging the system time whether in third predetermined amount of time, if so, touching Send out garbage files determining module.
Preferably, the garbage files determining module, including:
Third garbage files determination unit, storage time exists in the memory space of the file for that will be stored with predetermined format File in 4th predetermined amount of time is as garbage files.
Preferably, the garbage files determining module, including:
4th garbage files determination unit, for storage time will to be stored in the memory space of application cache file the 5th Application cache file in predetermined amount of time is as garbage files;
And/or
5th garbage files determination unit is used for storage time in the memory space of storage system cache file the 6th System cache file in predetermined amount of time is as garbage files.
In the embodiment of the present invention, scheduled parameter is detected;When judging that the parameter meets trigger condition, determines and touched with this Garbage files in the corresponding memory space of clockwork spring part;Displaying is for prompting user to delete the garbage files to discharge storage sky Between prompt message.As it can be seen that by using this programme, the detection process of garbage files can be in application operation/system operation In the process, it is not limited to using after unloading, can effectively improve the flexibility of garbage files detection, solve using fortune The problem of memory space inadequate occurred during row/system operation, improves the usage experience of user.
Description of the drawings
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 technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
A kind of the first flow chart for garbage files detection method that Fig. 1 is provided by the embodiment of the present invention;
A kind of second of flow chart of garbage files detection method that Fig. 2 is provided by the embodiment of the present invention;
A kind of the third flow chart for garbage files detection method that Fig. 3 is provided by the embodiment of the present invention;
A kind of 4th kind of flow chart of garbage files detection method that Fig. 4 is provided by the embodiment of the present invention;
A kind of structural schematic diagram for garbage files detection device that Fig. 5 is provided by the embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts Embodiment shall fall within the protection scope of the present invention.
The memory space inadequate occurred during in order to solve the problems, such as application operation/system operation, and then improve The usage experience of user, an embodiment of the present invention provides a kind of garbage files detection method and device.
A kind of garbage files detection method is provided for the embodiments of the invention first below to be introduced.
It should be noted that a kind of garbage files detection method that the embodiment of the present invention is provided is suitable for electronic equipment In.Wherein, in practical applications, which can be:Smart mobile phone, tablet computer, laptop etc., this is all to close Reason.
As shown in Figure 1, an embodiment of the present invention provides a kind of garbage files detection method, may include:
S101 detects scheduled parameter;
In garbage files detection process, electronic equipment can in real time or timing detect scheduled parameter, and according to being examined The scheduled parameter measured carries out subsequent processing.Wherein, detection process can be happened at application operation process or system operation In the process, this is all reasonable.
It should be noted that the scheduled parameter can be set according to practical application scene.Wherein, for applying For garbage files detection in operational process, which may include:Application institute in state data memory is right The active volume for the memory space answered;And for the garbage files detection in system operation, the scheduled parameter May include:Present system time, alternatively, system time when receiving unlock event notice.It is scheduled cited by above-mentioned Parameter is merely exemplary, should not constitute the restriction to inventive embodiments.
It will be appreciated by persons skilled in the art that in practical applications, it can be only during application operation to rubbish Rubbish file detects, and can not also limit application operation and be detected to garbage files in system operation, certainly, in order to improve Detection result both can execute corresponding garbage files detection in application operation process, while be executed in system operation Corresponding garbage files detection.
S102, judges whether the parameter meets trigger condition, if so, executing step S103;Otherwise, it does not deal with;
After detecting scheduled parameter, it can be determined that whether the parameter meets trigger condition, and according to different judgements As a result different operations is executed.Wherein, when judging that the parameter meets trigger condition, show the rubbish for meeting determining memory space The condition of rubbish file can execute follow-up step S103;And when judging that the parameter is unsatisfactory for trigger condition, it can not make Processing.
It is understood that different parameters can correspond to different trigger conditions;Also, in distinct electronic apparatuses, together One scheduled parameter can correspond to different trigger conditions, and under different application scenarios, that is detected in same electronic equipment is pre- Fixed parameter can correspond to different trigger conditions, this is all reasonable.
S103 determines the garbage files in memory space corresponding with the trigger condition;
When judging that the parameter meets trigger condition, show the condition for meeting the garbage files of determining memory space, because This, can determine the garbage files in memory space corresponding with the trigger condition according to scheduled garbage files criterion. Wherein, which can be set by user according to actual conditions, alternatively, can be the rubbish text of acquiescence Part criterion.
It will be appreciated by persons skilled in the art that the memory space to be detected corresponding to different trigger conditions is not Together, wherein the memory space may include:The memory of electronic equipment, it is, of course, also possible to include the external storage system of electronic equipment System, such as:SD card, hard disk etc., this is all reasonable.
It should be noted that when according to scheduled garbage files criterion, determining deposit corresponding with the trigger condition It stores up in space there is no when garbage files, garbage files criterion can be changed automatically or do not dealt with, this is all reasonable 's.
S104 is shown for prompting user to delete the garbage files to discharge the prompt message of the memory space.
After the garbage files in determining memory space corresponding with the trigger condition, it can show for prompting user The garbage files are deleted to discharge the prompt message of the memory space, so as to complete the detection process of garbage files.It can manage It solves, should include garbage files delete button and cancel button in the prompt message shown, so that user can lead to It crosses and the garbage files delete button is chosen to delete determined garbage files, and user can be by choosing the cancel button To refuse to delete the garbage files.
In the embodiment of the present invention, scheduled parameter is detected;When judging that the parameter meets trigger condition, determines and touched with this Garbage files in the corresponding memory space of clockwork spring part;Displaying is for prompting user to delete the garbage files to discharge storage sky Between prompt message.As it can be seen that by using this programme, the detection process of garbage files can be in application operation/system operation In the process, it is not limited to using after unloading, can effectively improve the flexibility of garbage files detection, solve using fortune The problem of memory space inadequate occurred during row/system operation, improves the usage experience of user.
Further, electronic equipment is shown for prompting user to delete the garbage files to discharge carrying for the memory space After showing information, user can determine the need for deleting determined garbage files according to actual demand, and work as and receive use After the deletion instruction for deleting the garbage files that family is sent out, the garbage files can be deleted, it is empty to reach release storage Between purpose.
Below for detecting garbage files during application operation, it is provided for the embodiments of the invention a kind of rubbish text Part detection method is introduced.
It should be noted that a kind of garbage files detection method that the embodiment of the present invention is provided is suitable for electronic equipment In.Wherein, in practical applications, which can be:Smart mobile phone, tablet computer, laptop etc., this is all to close Reason.
As shown in Fig. 2, a kind of garbage files detection method, may include:
S201, the active volume of application corresponding memory space of the detection in state data memory;
During application operation, with cache file or file can be generated, at this point it is possible to think to store using in data State.Wherein, the file cached or the file generated can be automatically stored in corresponding memory space, and in order to avoid place In the corresponding memory space of the application of state data memory, there is a situation where memory space inadequates, can in real time or periodically detect The active volume of the corresponding memory space of application in state data memory, so according to detected active volume into The subsequent operation of row.
It is understood that the specific manifestation form of the state data memory corresponding to different application can be different, such as: For take pictures application or video recording application, show to be in state data memory when generating photo or video;And for video For player or music player, show to be in state data memory when buffered video file or audio file;And for For game, show to store shape in data when there is corresponding process or caching corresponding document in operational process in memory State.
It is understood that the specific manifestation form based on state data memory is different, detection is in state data memory The corresponding memory space of application active volume, may include:
Detection in file cache state application it is corresponding for store cached file memory space can Use capacity;
Alternatively,
Detection in file generated state application it is corresponding for store generated file memory space can Use capacity.
S202, judges whether the active volume is less than predetermined volumes threshold value, if so, executing step S203;Otherwise, do not make Processing;
After the active volume of application corresponding memory space of the detection in state data memory, it can be determined that this can Whether it is less than predetermined volumes threshold value with capacity, and executes different operations according to different judging results.Wherein, when judging this When active volume is less than predetermined volumes threshold value, shows the condition for meeting the garbage files of determining memory space, step can be executed S203;And when judging that the active volume is not less than predetermined volumes threshold value, it can not deal with.
Wherein, predetermined volumes threshold value can be set according to actual conditions, and this will not be repeated here.
S203, using file of the storage time in the first predetermined amount of time in the memory space as garbage files;
It, can be by storage time in the memory space first after judging that the active volume is less than predetermined volumes threshold value File in predetermined amount of time is as garbage files.Wherein, in practical applications, first predetermined amount of time can be set as away from The certain time period more long from current time, using the more long file of storage time as garbage files.
Further, it is in the second predetermined amount of time by storage time in the memory space in order to improve user experience Stored meet preset time, this using corresponding file as garbage files.Such as:It, can be by three months when taking pictures Preceding photo is as garbage files;, can be using the video before one week as garbage files during video cache, this is all reasonable 's.
It should be noted that for game, it, can when judging that the active volume of memory is less than predetermined volumes threshold value To delete other processes other than the game in the presence of memory as garbage files, that is, close.
S204 is shown for prompting user to delete the garbage files to discharge the prompt message of the memory space.
After determining garbage files, it can show for prompting user to delete the garbage files to discharge the memory space Prompt message, so as to complete the detection process of garbage files.It is understood that should be wrapped in the prompt message shown Garbage files delete button and cancel button are included, so that user can be by choosing the garbage files delete button to delete The garbage files determined, and user can refuse to delete the garbage files by choosing the cancel button.
As it can be seen that by using this programme, the detection process of garbage files can be during application operation, and not limits to After application unloads, the flexibility of garbage files detection is can effectively improve, solves depositing of being occurred during application operation The problem of storing up insufficient space, improves the usage experience of user.
Further, electronic equipment is shown for prompting user to delete the garbage files to discharge carrying for the memory space After showing information, user can determine the need for deleting determined garbage files according to actual demand, and work as and receive use After the deletion instruction for deleting the garbage files that family is sent out, the garbage files can be deleted, it is empty to reach release storage Between purpose.
Further, in order to improve the usage experience of user, when judge the active volume be less than predetermined volumes threshold value When, the method can also include:
The quantity for applying respective file can be accommodated by calculating the active volume;
It, can be with correspondingly, displaying is for prompting user to delete the garbage files to discharge the prompt message of the memory space Including:
It shows for prompting user's active volume that can accommodate the quantity for applying respective file and deleting rubbish text Part is to discharge the prompt message of the memory space.
Such as:During taking pictures, when detected active volume is less than predetermined volumes threshold value, one can be calculated The storage space volume needed for photo is opened, then determines the quantity for the photo that active volume can accommodate, and then is shown for carrying Show that user's active volume can accommodate the quantity of photo and delete the garbage files to discharge the prompt message of the memory space, Such as:Prompt message can be " you can also take 10 photos, it is proposed that the photo before clearing up 3 months ".
For another example:For listening to music online, when detected active volume is less than predetermined volumes threshold value, Ke Yiji The storage space volume needed for a song is calculated, the quantity for the song that active volume can accommodate, Jin Erzhan are then calculated Show for prompting user's active volume that can accommodate the quantity of song and deleting the garbage files to discharge the memory space Prompt message, such as:Prompt message can be " you can also cache 10 songs, it is proposed that the song before clearing up 3 months ".
Below by taking system operation detects garbage files as an example, it is provided for the embodiments of the invention a kind of garbage files Detection method is introduced.
It should be noted that a kind of garbage files detection method that the embodiment of the present invention is provided is suitable for electronic equipment In.Wherein, in practical applications, which can be:Smart mobile phone, tablet computer, laptop etc., this is all to close Reason.
As shown in figure 3, a kind of garbage files detection method, may include:
S301 detects present system time;
Since in application operation/system operation, with cache file or file can be generated, and the file cached or life At file can be automatically stored in corresponding memory space.Wherein, since user possibly can not clear up memory space in time File therefore can be in system operation, and timing detects the garbage files in memory space, to be carried out to memory space Release.Therefore, which can detect present system time, and carry out subsequent behaviour according to detected system time Make.
S302 judges whether the present system time was the first predetermined time, if so, executing step S303;Otherwise, no It deals with;
After detecting the present system time, it can be determined that whether the present system time was the first predetermined time, and Different operations is executed according to different judging results.Wherein, when it was the first predetermined time to judge the present system time, Show therefore the time point for reaching garbage files detection can execute subsequent step S303;And when judging the current system Between be the first predetermined time when, can not deal with.
Wherein, which can be set according to actual conditions, and therefore not to repeat here.
S303 will be stored with text of the storage time in the 4th predetermined amount of time in the memory space of the file of predetermined format Part is as garbage files;
When it was the first predetermined time to judge the present system time, show the time point for reaching garbage files detection, File of the storage time in the 4th predetermined amount of time is as rubbish in the memory space for the file that can will be stored with predetermined format Rubbish file.Such as:Using the video file stored before in memory space one week as garbage files, certainly, it is not limited to regard Frequency file, can also be using the more long application installation package of the time in memory space as garbage files, and this is also rational.
Certainly, when it is the first preset time to judge present system time, application cache file will can also be stored Application cache file of the storage time in the 5th predetermined amount of time is as garbage files in memory space;And/or it is by storage System cache file of the storage time in the 6th predetermined amount of time is as garbage files in the memory space of system cache file.
It should be noted that when according to scheduled garbage files criterion, determining deposit corresponding with the trigger condition It stores up in space there is no when garbage files, garbage files criterion can be changed automatically or do not dealt with, this is all reasonable 's.
Wherein, the 4th predetermined amount of time, the 5th predetermined amount of time, the 6th predetermined amount of time can according to actual conditions into Row setting, therefore not to repeat here.
S304 is shown for prompting user to delete the garbage files to discharge the prompt message of the memory space.
After determining garbage files, it can show for prompting user to delete the garbage files to discharge the memory space Prompt message, so as to complete the detection process of garbage files.It is understood that should be wrapped in the prompt message shown Garbage files delete button and cancel button are included, so that user can be by choosing the garbage files delete button to delete The garbage files determined, and user can refuse to delete the garbage files by choosing the cancel button.
As it can be seen that by using this programme, the detection process of garbage files can be in system operation, and not limits to After application unloads, the flexibility of garbage files detection is can effectively improve, solves depositing of being occurred during application operation The problem of storing up insufficient space, improves the usage experience of user.
Further, electronic equipment is shown for prompting user to delete the garbage files to discharge carrying for the memory space After showing information, user can determine the need for deleting determined garbage files according to actual demand, and work as and receive use After the deletion instruction for deleting the garbage files that family is sent out, the garbage files can be deleted, it is empty to reach release storage Between purpose.
Garbage files are detected as another concrete application example using system operation below, the embodiment of the present invention is carried A kind of garbage files detection method supplied is introduced.
It should be noted that a kind of garbage files detection method that the embodiment of the present invention is provided is suitable for electronic equipment In.Wherein, in practical applications, which can be:Smart mobile phone, tablet computer, laptop etc., this is all to close Reason.
As shown in figure 4, a kind of garbage files detection method, may include:
S401, detection receive system time when unlock event notice;
Since in application operation/system operation, with cache file or file can be generated, and the file cached or life At file can be automatically stored in corresponding memory space.Wherein, since user possibly can not clear up memory space in time File therefore can be in system operation, and timing detects the garbage files in memory space, to be carried out to memory space Release.Therefore, which can be when receiving unlocked time notice, the detecting system time, and according to detected System time carries out subsequent operation.
S402 judges the system time whether in third predetermined amount of time, if so, executing step S403;Otherwise, no It deals with;
After detecting the system time, it can be determined that the system time whether in third predetermined amount of time, and according to Different judging results executes different operations.Wherein, when judging the system time in third predetermined amount of time, show to reach Therefore the time point detected to garbage files can execute subsequent step S403;And works as and judge the system time not in third When in predetermined amount of time, it can not deal with.
Wherein, which can be set according to actual conditions, and therefore not to repeat here.
S403 will be stored with text of the storage time in the 4th predetermined amount of time in the memory space of the file of predetermined format Part is as garbage files;
When judging that the system time is in third predetermined amount of time, show the time point for reaching garbage files detection, File of the storage time in the 4th predetermined amount of time is as rubbish in the memory space for the file that can will be stored with predetermined format Rubbish file.Such as:Using the video file stored before in memory space one week as garbage files, certainly, it is not limited to regard Frequency file, can also be using the more long application installation package of the time in memory space as garbage files, and this is also rational.
Certainly, when judging that the system time is in third predetermined amount of time, application cache file will can also be stored Memory space in application cache file of the storage time in the 5th predetermined amount of time as garbage files;And/or it will store System cache file of the storage time in the 6th predetermined amount of time is as garbage files in the memory space of system cache file.
It should be noted that when according to scheduled garbage files criterion, determining deposit corresponding with the trigger condition It stores up in space there is no when garbage files, garbage files criterion can be changed automatically or do not dealt with, this is all reasonable 's.
Wherein, the third predetermined amount of time, the 4th predetermined amount of time, the 5th predetermined amount of time, the 6th predetermined amount of time can To be set according to actual conditions, therefore not to repeat here.
S404 is shown for prompting user to delete the garbage files to discharge the prompt message of the memory space.
After determining garbage files, it can show for prompting user to delete the garbage files to discharge the memory space Prompt message, so as to complete the detection process of garbage files.It is understood that should be wrapped in the prompt message shown Garbage files delete button and cancel button are included, so that user can be by choosing the garbage files delete button to delete The garbage files determined, and user can refuse to delete the garbage files by choosing the cancel button.
As it can be seen that by using this programme, the detection process of garbage files can be in system operation, and not limits to After application unloads, the flexibility of garbage files detection is can effectively improve, solves depositing of being occurred during application operation The problem of storing up insufficient space, improves the usage experience of user.
Further, electronic equipment is shown for prompting user to delete the garbage files to discharge carrying for the memory space After showing information, user can determine the need for deleting determined garbage files according to actual demand, and work as and receive use After the deletion instruction for deleting the garbage files that family is sent out, the garbage files can be deleted, it is empty to reach release storage Between purpose.
It should be noted that above-mentioned " the first predetermined amount of time ", " the second predetermined amount of time ", " third predetermined amount of time ", " the 4th predetermined amount of time ", " the 5th predetermined amount of time " and " the first preset time " does not have only from the differentiation in name There is any limiting meaning.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of garbage files detection device, such as Fig. 5 institutes Show, may include:
Parameter detection module 510, for detecting scheduled parameter;
Parameter judgment module 520 for judging whether the parameter meets trigger condition, and works as and judges that the parameter is full When sufficient trigger condition, garbage files determining module is triggered;
Garbage files determining module 530, for determining the garbage files in memory space corresponding with the trigger condition;
Prompt message display module 540, for showing for prompting user to delete the garbage files to discharge described deposit Store up the prompt message in space.
In the embodiment of the present invention, scheduled parameter is detected;When judging that the parameter meets trigger condition, determines and touched with this Garbage files in the corresponding memory space of clockwork spring part;Displaying is for prompting user to delete the garbage files to discharge storage sky Between prompt message.As it can be seen that by using this programme, the detection process of garbage files can be in application operation/system operation In the process, it is not limited to using after unloading, can effectively improve the flexibility of garbage files detection, solve using fortune The problem of memory space inadequate occurred during row/system operation, improves the usage experience of user.
Further, the garbage files detection device can also include:
Command reception module is deleted, the deletion instruction for deleting the garbage files sent out for receiving user;
Command process module is deleted, for deleting the garbage files.
Wherein, in the first realization method that the embodiment of the present invention is provided, the parameter detection module 510 can be with Including:
First parameter detecting unit, for detecting the available of the corresponding memory space of application in state data memory Capacity;
Correspondingly, the parameter judgment module 520, may include:
First parameter judging unit, for judging whether the active volume is less than predetermined volumes threshold value, if so, triggering Garbage files determining module.
Wherein, the garbage files determining module 530 may include:
First garbage files determination unit is used for storage time in the memory space in the first predetermined amount of time File is as garbage files;
Alternatively,
Second garbage files determination unit, for being in the second predetermined amount of time by storage time in the memory space What is stored meets preset time, the corresponding file of the application as garbage files.
Based on the first realization method, a kind of garbage files detection device that the embodiment of the present invention is provided can also wrap It includes:
Quantity of documents determination unit judges the active volume less than predetermined for working as the first parameter judging unit When capacity threshold, the quantity using respective file can be accommodated by calculating the active volume;
Correspondingly, the prompt message display module 540, may include:
Prompt message display unit is corresponded to for showing for prompting active volume described in user that can accommodate the application The quantity and the deletion garbage files of file are to discharge the prompt message of the memory space.
Wherein, in second of realization method that the embodiment of the present invention is provided, the parameter detection module 510 can be with Including:
Second parameter detecting unit, for detecting present system time;
Correspondingly, the parameter judgment module 520, may include:
Second parameter judging unit, for judging whether the present system time was the first predetermined time, if so, touching Send out garbage files determining module.
Wherein, in the third realization method that the embodiment of the present invention is provided, the parameter detection module 510 can be with Including:
Third parameter detecting unit receives system time when unlock event notice for detecting;
Correspondingly, the parameter judgment module 520, may include:
Third parameter judging unit, for judging the system time whether in third predetermined amount of time, if so, touching Send out garbage files determining module.
Based on second of realization method or the third realization method, the garbage files determining module 530 may include:
Third garbage files determination unit, storage time exists in the memory space of the file for that will be stored with predetermined format File in 4th predetermined amount of time is as garbage files.
Based on second of realization method or the third realization method, the garbage files determining module 530 may include:
4th garbage files determination unit, for storage time will to be stored in the memory space of application cache file the 5th Application cache file in predetermined amount of time is as garbage files;
And/or
5th garbage files determination unit is used for storage time in the memory space of storage system cache file the 6th System cache file in predetermined amount of time is as garbage files.
For system embodiments, since it is substantially similar to the method embodiment, so fairly simple, the correlation of description Place illustrates referring to the part of embodiment of the method.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
One of ordinary skill in the art will appreciate that all or part of step in realization above method embodiment is can It is completed with instructing relevant hardware by program, the program can be stored in computer read/write memory medium, The storage medium designated herein obtained, such as:ROM/RAM, magnetic disc, CD etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (13)

1. a kind of garbage files detection method, which is characterized in that including:
Scheduled parameter is detected, the scheduled parameter includes the corresponding memory space of the application in state data memory Active volume, present system time, at least one of system time when receiving unlock event notice;
Judge whether the parameter meets trigger condition;
When judging that the parameter meets trigger condition, the rubbish text in memory space corresponding with the trigger condition is determined Part;
When the scheduled parameter includes the active volume of the corresponding memory space of application in state data memory, institute It states when judging that the parameter meets trigger condition, determines the rubbish text in memory space corresponding with the trigger condition Part, including:When judging that the parameter meets trigger condition, by storage time in the corresponding memory space of the trigger condition File in the first predetermined amount of time is as garbage files;Alternatively, storage time in the memory space is made a reservation for for second In period stored meet preset time, the corresponding file of the application as garbage files;
It is described when judging that the parameter meets trigger condition when the scheduled parameter includes present system time, really Garbage files in fixed memory space corresponding with the trigger condition, including:When judging that the parameter meets trigger condition When, file of the storage time in the 4th predetermined amount of time will be stored in the memory space of the file of predetermined format as rubbish File;
It is described to judge the parameter when the scheduled parameter includes receiving system time when unlock event notifies When meeting trigger condition, the garbage files in memory space corresponding with the trigger condition are determined, including:It is described when judging When parameter meets trigger condition, by storage time in the memory space for storing application cache file in the 5th predetermined amount of time Application cache file is as garbage files;And/or it is storage time in the memory space of storage system cache file is pre- the 6th The system cache file fixed time in section is as garbage files;
Displaying is for prompting user to delete the garbage files to discharge the prompt message of the memory space.
2. according to the method described in claim 1, it is characterized in that, further including:
Receive the deletion instruction for deleting the garbage files that user sends out;
Delete the garbage files.
3. method according to claim 1 or 2, which is characterized in that the scheduled parameter of detection, including:
The active volume of application corresponding memory space of the detection in state data memory;
Judge whether the parameter meets trigger condition correspondingly, described, including:
Judge whether the active volume is less than predetermined volumes threshold value, if it is, meeting trigger condition.
4. according to the method described in claim 3, it is characterized in that, corresponding to the application of the detection in state data memory Memory space active volume, including:
The available appearance of the corresponding memory space for storing cached file of application of the detection in file cache state Amount;
Alternatively,
The available appearance of the corresponding memory space for storing generated file of application of the detection in file generated state Amount.
5. according to the method described in claim 3, it is characterized in that, when judging the active volume less than predetermined volumes threshold value When, the method further includes:
The quantity using respective file can be accommodated by calculating the active volume;
Correspondingly, the displaying is for prompting user to delete the garbage files to discharge the prompt message of the memory space, Including:
Displaying is for prompting active volume described in user that can accommodate the quantity using respective file and deleting the rubbish File is to discharge the prompt message of the memory space.
6. method according to claim 1 or 2, which is characterized in that the scheduled parameter of detection, including:
Detect present system time;
Judge whether the parameter meets trigger condition correspondingly, described, including:
Judge whether the present system time was the first predetermined time, if it is, meeting trigger condition.
7. method according to claim 1 or 2, which is characterized in that the scheduled parameter of detection, including:
Detection receives system time when unlock event notice;
Judge whether the parameter meets trigger condition correspondingly, described, including:
The system time is judged whether in third predetermined amount of time, if it is, meeting trigger condition.
8. a kind of garbage files detection device, which is characterized in that including:
Parameter detection module, for detecting scheduled parameter, the scheduled parameter includes the application in state data memory In the active volume of corresponding memory space, present system time, system time when receiving unlock event notice extremely Few one kind;
Parameter judgment module is triggered for judging whether the parameter meets trigger condition, and when judging that the parameter meets When condition, garbage files determining module is triggered;
Garbage files determining module, for determining the garbage files in memory space corresponding with the trigger condition;
When the scheduled parameter includes the active volume of the corresponding memory space of application in state data memory, institute Garbage files determining module is stated, including:First garbage files determination unit, for by storage time in the memory space the File in one predetermined amount of time is as garbage files;Alternatively, the second garbage files determination unit, is used for the memory space Middle storage time meets preset time, the corresponding file of the application as rubbish by storing in the second predetermined amount of time File;
When the scheduled parameter includes present system time, the garbage files determining module, including:Third garbage files Determination unit, text of the storage time in the 4th predetermined amount of time in the memory space of the file for predetermined format will to be stored with Part is as garbage files;
When the scheduled parameter includes receiving system time when unlock event notifies, the garbage files determine mould Block, including:4th garbage files determination unit, for storage time will to be stored in the memory space of application cache file the 5th Application cache file in predetermined amount of time is as garbage files;And/or the 5th garbage files determination unit, for that will store System cache file of the storage time in the 6th predetermined amount of time is as garbage files in the memory space of system cache file;
Prompt message display module, for showing for prompting user to delete the garbage files to discharge the memory space Prompt message.
9. device according to claim 8, which is characterized in that further include:
Command reception module is deleted, the deletion instruction for deleting the garbage files sent out for receiving user;
Command process module is deleted, for deleting the garbage files.
10. device according to claim 8 or claim 9, which is characterized in that the parameter detection module, including:
First parameter detecting unit, the available appearance for detecting the corresponding memory space of application in state data memory Amount;
Correspondingly, the parameter judgment module, including:
First parameter judging unit, for judging whether the active volume is less than predetermined volumes threshold value, if so, triggering rubbish File determining module.
11. device according to claim 10, which is characterized in that further include:
Quantity of documents determination unit judges that the active volume is less than predetermined volumes for working as the first parameter judging unit When threshold value, the quantity using respective file can be accommodated by calculating the active volume;
Correspondingly, the prompt message display module, including:
Prompt message display unit, it is described using respective file for prompting active volume described in user that can accommodate for showing Quantity and delete the garbage files to discharge the prompt message of the memory space.
12. device according to claim 8 or claim 9, which is characterized in that the parameter detection module, including:
Second parameter detecting unit, for detecting present system time;
Correspondingly, the parameter judgment module, including:
Second parameter judging unit, for judging whether the present system time was the first predetermined time, if so, triggering rubbish Rubbish file determining module.
13. device according to claim 8 or claim 9, which is characterized in that the parameter detection module, including:
Third parameter detecting unit receives system time when unlock event notice for detecting;
Correspondingly, the parameter judgment module, including:
Third parameter judging unit, for judging the system time whether in third predetermined amount of time, if so, triggering rubbish Rubbish file determining module.
CN201310655757.XA 2013-12-06 2013-12-06 Garbage files detection method and device Active CN103631934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310655757.XA CN103631934B (en) 2013-12-06 2013-12-06 Garbage files detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310655757.XA CN103631934B (en) 2013-12-06 2013-12-06 Garbage files detection method and device

Publications (2)

Publication Number Publication Date
CN103631934A CN103631934A (en) 2014-03-12
CN103631934B true CN103631934B (en) 2018-09-14

Family

ID=50212975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310655757.XA Active CN103631934B (en) 2013-12-06 2013-12-06 Garbage files detection method and device

Country Status (1)

Country Link
CN (1) CN103631934B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224574B (en) * 2014-06-30 2019-02-19 北京金山安全软件有限公司 Method and device for automatically identifying junk files
CN104268204A (en) * 2014-09-23 2015-01-07 珠海市君天电子科技有限公司 Garbage clearing method and device
CN104657182B (en) * 2015-03-05 2018-08-07 北京畅游天下网络技术有限公司 System rubbish method for cleaning and device for mobile device
CN104850487A (en) * 2015-04-27 2015-08-19 小米科技有限责任公司 Information display method and device
CN104965731B (en) * 2015-06-02 2018-05-01 广东欧珀移动通信有限公司 A kind of data processing method and electric terminal
CN104951253B (en) * 2015-06-18 2017-05-03 广东欧珀移动通信有限公司 Method for processing memory capacity and mobile terminal
CN105205131B (en) * 2015-09-15 2019-03-26 北京金山安全软件有限公司 Method and device for determining size of junk file and electronic equipment
CN106708912B (en) * 2015-11-18 2021-06-25 中兴通讯股份有限公司 Junk file identification and management method, identification device, management device and terminal
WO2017128091A1 (en) * 2016-01-26 2017-08-03 王志强 Technical information collection method for when mobile phone file is cleaned and cleaning system
WO2017128093A1 (en) * 2016-01-26 2017-08-03 王志强 Method for cleaning mobile phone file and cleaning system
WO2017128092A1 (en) * 2016-01-26 2017-08-03 王志强 Method for sending technical information related to cleaning of mobile phone file, and cleaning system
CN105955665A (en) * 2016-04-29 2016-09-21 板牙信息科技(上海)有限公司 Method and equipment for prolonging service life of storage medium
CN107423300B (en) * 2016-05-24 2021-12-28 中兴通讯股份有限公司 Terminal file processing method and device and mobile terminal
CN106294554A (en) * 2016-07-26 2017-01-04 宇龙计算机通信科技(深圳)有限公司 File clean-up method and system
CN106326032B (en) * 2016-08-01 2019-04-16 北京小米移动软件有限公司 Handle the method and device of data
CN106339444A (en) * 2016-08-23 2017-01-18 深圳市金立通信设备有限公司 Method for instantly deleting file and terminal
CN106126127A (en) * 2016-08-29 2016-11-16 天脉聚源(北京)传媒科技有限公司 A kind of method and device of uploading pictures
CN106570084A (en) * 2016-10-19 2017-04-19 捷开通讯(深圳)有限公司 Mobile terminal with storage function and management method of storage space of terminal
CN106708426B (en) * 2016-11-11 2019-10-01 努比亚技术有限公司 Garbage files identification device and method
CN109656875B (en) * 2018-12-05 2023-05-16 广东小天才科技有限公司 Classification management method and device for storage space, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101400169A (en) * 2008-10-21 2009-04-01 深圳华为通信技术有限公司 Mobile terminal, method for mobile resource management
CN102333079A (en) * 2011-02-25 2012-01-25 北京兴宇中科科技开发股份有限公司 Method for clearing disk space
CN102663059A (en) * 2012-03-30 2012-09-12 奇智软件(北京)有限公司 Method and system for automatically cleaning redundant items in computer terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1185577A (en) * 1997-09-10 1999-03-30 Toshiba Corp Information processor, file managing method and recording medium
CN100426298B9 (en) * 2006-08-28 2016-10-26 华为技术有限公司 A kind of cleaning garbage files method and system
CN102654872A (en) * 2011-03-03 2012-09-05 腾讯科技(深圳)有限公司 Method and device for cleaning junk files generated by application programs

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101400169A (en) * 2008-10-21 2009-04-01 深圳华为通信技术有限公司 Mobile terminal, method for mobile resource management
CN102333079A (en) * 2011-02-25 2012-01-25 北京兴宇中科科技开发股份有限公司 Method for clearing disk space
CN102663059A (en) * 2012-03-30 2012-09-12 奇智软件(北京)有限公司 Method and system for automatically cleaning redundant items in computer terminal

Also Published As

Publication number Publication date
CN103631934A (en) 2014-03-12

Similar Documents

Publication Publication Date Title
CN103631934B (en) Garbage files detection method and device
US7437557B2 (en) Garbage collection system and method for a mobile communication terminal
US9058204B2 (en) Control method and control device for releasing memory
US9529492B2 (en) Reproduction of file series
KR100690804B1 (en) Method for executing garbage collection of mobile terminal
CN105204959B (en) Restore the method and device of deleted document in ext file system
CN104077183A (en) Reminding and operating method and device for reading of new software message
US20120246592A1 (en) Method for customizing user interface and electronic device thereof
CN104731530B (en) A kind of file management method and mobile terminal applied to mobile terminal
CN110175081B (en) Optimization system and method for Android audio playing
KR20140143073A (en) Electronic device and method for providing information of battery in the electronic device
CN106484593A (en) Log processing method, device and electronic equipment
CN106126438B (en) Data sharing method and mobile terminal between dual user system
CN106534562A (en) File deletion method and apparatus
CN104853081A (en) Breakpoint filming method, device and mobile terminal
CN102929980A (en) Folder cleaning method and device
CN110209341B (en) Data writing method and device and storage equipment
CN103870955B (en) The processing method and processing device of data in webpage
CN103533138A (en) Method and mobile terminal for deleting phone number
CN101320389B (en) File management method and apparatus
CN105912420A (en) Data backup method and device
CN107148612A (en) A kind of method and apparatus of extending user subregion
CN108874591B (en) Document processing method and related product
US20080172432A1 (en) Methods Of Managing Data Objects
CN108958651A (en) Dirty data block method for deleting, device, equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 A-0071 2, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Beijing cheetah Mobile Technology Co., Ltd.

Address before: 100041 1100A 3, 3 West Road, Badachu high tech park, Shijingshan District, Beijing.

Applicant before: SHELL INTERNET (BEIJING) SECURITY TECHNOLOGY CO., LTD.

GR01 Patent grant
GR01 Patent grant