CN105183902B - File cleaning method and device and terminal - Google Patents

File cleaning method and device and terminal Download PDF

Info

Publication number
CN105183902B
CN105183902B CN201510640564.6A CN201510640564A CN105183902B CN 105183902 B CN105183902 B CN 105183902B CN 201510640564 A CN201510640564 A CN 201510640564A CN 105183902 B CN105183902 B CN 105183902B
Authority
CN
China
Prior art keywords
file
cleaning
attribute
depth
terminal
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
CN201510640564.6A
Other languages
Chinese (zh)
Other versions
CN105183902A (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 Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201510640564.6A priority Critical patent/CN105183902B/en
Publication of CN105183902A publication Critical patent/CN105183902A/en
Application granted granted Critical
Publication of CN105183902B publication Critical patent/CN105183902B/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

Abstract

The embodiment of the invention discloses a file cleaning method, a file cleaning device and a terminal, wherein the method comprises the following steps: acquiring a file with a deep cleaning attribute in a terminal; judging whether the use frequency of the file with the deep cleaning attribute in a preset time period meets a preset rule or not; and if so, cleaning the file with the deep cleaning attribute according to a suggested cleaning mode. By applying the embodiment of the invention, the files meeting the preset rules in the files with the deep cleaning attribute are cleaned according to the suggested cleaning mode. The occupation of storage space is reduced, the running speed of the terminal is improved, and the working efficiency and the experience effect of a user are improved.

Description

A kind of file clean-up method, apparatus and terminal
Technical field
The present invention relates to field of terminal technology, in particular to a kind of file clean-up method, apparatus and terminal.
Background technique
During user continues on terminal (such as mobile phone, tablet computer etc.), terminal can generate various Garbage files.With the continuous growth of these garbage files, garbage files increasingly occupy memory space, while can also drag slow end The speed of service at end influences working efficiency and the experience of user.
In the prior art, garbage files are cleared up, mainly installation rubbish clears up software, clears up software using rubbish Garbage files are cleared up.Garbage files are cleared up using rubbish cleaning software, there are mainly two types of modes:
A kind of mode are as follows: it is recommended that manner of cleaning up, it is proposed that automatic cleaning is also named in cleaning, is referred to clear in the suggestion for receiving user After reason instruction, directly the file for meeting the rubbish cleaning customized garbage files rule of software in terminal is removed, usual situation Under, it is generated in the residual installation package file, application program operational process after being unloaded to the cache file in terminal, application program The files such as discarded record remove.
Another way are as follows: depth manner of cleaning up, depth cleaning are also manual cleanup, are referred in the depth for receiving user After cleaning instruction, by the file with depth cleaning attribute (such as file size is greater than a certain value) in terminal, with the shape of list Formula is shown to user, is chosen whether to be purged processing by user.
But under normal conditions, user not will be deleted the file scanned under depth manner of cleaning up, but under depth manner of cleaning up The file scanned there may be the file for needing to clear up.The presence for the file for needing to clear up, will result in memory space It occupies, drags the speed of service of slow terminal, influence the working efficiency and experience effect of user.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of file clean-up method, apparatus and terminal, to reduce memory space Occupancy, improve the speed of service of terminal, improve the working efficiency and experience effect of user.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of file clean-up methods, are applied to terminal, method packet It includes:
Obtain the file with depth cleaning attribute in the terminal;
It is pre- whether the frequency of use of the judgement file with depth cleaning attribute within a preset period of time meets first If regular;
If meeting, the file with depth cleaning attribute is subjected to cleaning operation according to suggestion manner of cleaning up.
Optionally, the file obtained with depth cleaning attribute in the terminal, comprising:
Obtain the All Files in the terminal;
For each file in acquired All Files, judge whether the size of this document is not less than preset first threshold Value, if so, this document is labeled as the file with depth cleaning attribute.
Optionally, the file obtained with depth cleaning attribute in the terminal, comprising:
Obtain the store path of file in the terminal;
Judge whether the store path is customized path, if so, being tool by the file mark under the store path There is the file of depth cleaning attribute.
Optionally, the file obtained with depth cleaning attribute in the terminal, comprising:
Obtain the store path where the file in the terminal with particular file types;
Judge whether the file store path meets the second preset rules, if so, by having under the store path The file mark of particular file types is that the file of attribute is cleared up with depth.
Optionally, whether the frequency of use of file within a preset period of time with depth cleaning attribute described in the judgement Meet the first preset rules, comprising:
Obtain the last time access time of the file with depth cleaning attribute;
Judge whether the last time access time to the duration of current time is not less than preset second threshold, if It is to indicate that the frequency of use of this document within a preset period of time meets the first preset rules.
Optionally, whether the frequency of use of file within a preset period of time with depth cleaning attribute described in the judgement Meet the first preset rules, comprising:
Obtain the number of the file with depth cleaning attribute of access in preset time period;
Judge whether obtained number is less than preset third threshold value, if so, indicating this document within a preset period of time Frequency of use meet the first preset rules.
Optionally, whether the frequency of use of file within a preset period of time with depth cleaning attribute described in the judgement Meet the first preset rules, comprising:
The file with depth cleaning attribute is obtained respectively in the first preset time period and the second preset time period Times N1And N2, wherein first preset time period is earlier than second preset time period;
Judge N1With N2Ratio whether be greater than preset 4th threshold value, if so, indicate this document within a preset period of time Frequency of use meet the first preset rules.
It is optionally, described that the file with depth cleaning attribute is subjected to cleaning operation according to suggestion manner of cleaning up, Include:
Instruction is cleared up in the suggestion for receiving user;And
It is cleared up and is instructed according to the suggestion of user, delete the file with depth cleaning attribute.
It is optionally, described that the file with depth cleaning attribute is subjected to cleaning operation according to suggestion manner of cleaning up, Include:
By the file unloading with depth cleaning attribute in default storage region;And
It after unloading completion, is cleared up and is instructed according to the suggestion of user, deleting has described in raw storage area The file of depth cleaning attribute.
Optionally, the method also includes:
Judge in predetermined period with the presence or absence of the recovery instruction for default storage region file;
If it exists, then restore described to restore to instruct the file in the targeted default storage region;
If it does not exist, then the file that storage time in the default storage region is more than predetermined period is deleted.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of file clean-up devices, are applied to terminal, device packet It includes: file acquisition module, first judgment module and cleaning modul, wherein
The file acquisition module, for obtaining the file with depth cleaning attribute in the terminal;
The first judgment module, the file with depth cleaning attribute obtained for judging the file acquisition module Whether frequency of use within a preset period of time meets the first preset rules;
The cleaning modul, for that described will have deep in the case where the first judgment module judging result, which is, is The file of degree cleaning attribute carries out cleaning operation according to suggestion manner of cleaning up.
Optionally, the file acquisition module, is specifically used for:
Obtain the All Files in the terminal;
For each file in acquired All Files, judge whether the size of this document is not less than preset first threshold Value, if so, this document is labeled as the file with depth cleaning attribute.
Optionally, the file acquisition module, is specifically used for:
Obtain the store path of file in the terminal;
Judge whether the store path is customized path, if so, being tool by the file mark under the store path There is the file of depth cleaning attribute.
Optionally, the file acquisition module, is specifically used for:
Obtain the store path where the file in the terminal with particular file types;
Judge whether the file store path meets the second preset rules, if so, by having under the store path The file mark of particular file types is that the file of attribute is cleared up with depth.
Optionally, the first judgment module, is specifically used for:
Obtain the last time access time of the file with depth cleaning attribute;
Judge whether the last time access time to the duration of current time is not less than preset second threshold, if It is to indicate that the frequency of use of this document within a preset period of time meets the first preset rules.
Optionally, the first judgment module, is specifically used for:
Obtain the number of the file with depth cleaning attribute of access in preset time period;
Judge whether obtained number is less than preset third threshold value, if so, indicating this document within a preset period of time Frequency of use meet the first preset rules.
Optionally, the first judgment module, is specifically used for:
The file with depth cleaning attribute is obtained respectively in the first preset time period and the second preset time period Times N1And N2, wherein first preset time period is earlier than second preset time period;
Judge N1With N2Ratio whether be greater than preset 4th threshold value, if so, indicate this document within a preset period of time Frequency of use meet the first preset rules.
Optionally, the cleaning modul, is specifically used for:
In the case where the first judgment module judging result, which is, is, the suggestion cleaning instruction of user is received;
It is cleared up and is instructed according to the suggestion of user, delete the file with depth cleaning attribute.
Optionally, the cleaning modul, comprising: unloading submodule and cleaning submodule, wherein
The unloading submodule, for having by described in the case where the first judgment module judging result, which is, is Depth clears up the file unloading of attribute in default storage region;
The cleaning submodule, for being completed in the file unloading with depth cleaning attribute in default storage region Later, it is cleared up and is instructed according to the suggestion of user, delete the file with depth cleaning attribute described in raw storage area.
Optionally, described device further include: the second judgment module, recovery module and removing module, wherein
Second judgment module, for judging in predetermined period with the presence or absence of for the extensive of default storage region file Multiple instruction;
The recovery module, for restoring the recovery in the case where the second judgment module judging result, which is, is Instruct the file in the targeted default storage region;
The removing module, it is described default for deleting in the case where the second judgment module judging result is no Storage time is more than the file of predetermined period in storage region.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of terminal, the terminal includes: shell, processor, deposits Reservoir, circuit board and power circuit, wherein circuit board is placed in the space interior that shell surrounds, processor and memory setting On circuit boards;Power circuit, for each circuit or the device power supply for terminal;Memory is for storing executable program generation Code;Processor runs journey corresponding with executable program code by reading the executable program code stored in memory Sequence, for executing following steps:
Obtain the file with depth cleaning attribute in the terminal;
It is pre- whether the frequency of use of the judgement file with depth cleaning attribute within a preset period of time meets first If regular;
If meeting, the file with depth cleaning attribute is subjected to cleaning operation according to suggestion manner of cleaning up.
As seen from the above technical solutions, the embodiment of the invention provides a kind of file clean-up method, apparatus and terminal, sides Method includes: the file obtained with depth cleaning attribute in the terminal;The judgement file with depth cleaning attribute exists Whether the frequency of use in preset time period meets the first preset rules;If meeting, by the text with depth cleaning attribute Part carries out cleaning operation according to suggestion manner of cleaning up.Using technical solution provided by the embodiment of the present invention, there will be depth clear It manages in the file of attribute, meet the files of preset rules according to suggesting that manner of cleaning up is cleared up.Reduce accounting for for memory space With improving the speed of service of terminal, improve the working efficiency and experience effect of user.
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 only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the first flow diagram of file clean-up method provided in an embodiment of the present invention;
Fig. 2 is second of flow diagram of file clean-up method provided in an embodiment of the present invention;
Fig. 3 is the third flow diagram of file clean-up method provided in an embodiment of the present invention;
Fig. 4 is the first structural schematic diagram of file clean-up device provided in an embodiment of the present invention;
Fig. 5 is second of structural schematic diagram of file clean-up device provided in an embodiment of the present invention;
Fig. 6 is the third structural schematic diagram of file clean-up device provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific embodiment
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 description, 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, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In order to solve prior art problem, the embodiment of the invention provides a kind of file clean-up method, apparatus and terminals.Under Kept man of a noblewoman is first provided for the embodiments of the invention a kind of file clean-up method and is introduced.
It should be noted that the embodiment of the present invention is preferably applied to be mounted with that (iOS is by apple public affairs to iOS operating system Take charge of the handheld equipment operating system of exploitation) or Android operation system (android system is a kind of freedom based on Linux and opens Put the operating system of source code) or Windows Phone operating system (Windows Phone be Microsoft publication it is a Mobile phone operating system) terminal, be of course also apply to other terminals, this is not limited by the present invention.
It should be noted that suggesting that automatic cleaning is also named in cleaning, refer to after the suggestion cleaning instruction for receiving user, directly It connects and removes the file for meeting the rubbish cleaning customized garbage files rule of software in terminal;Depth cleaning is also named clear by hand Reason refers to that after the depth cleaning instruction for receiving user, having depth cleaning attribute in terminal, (such as file size is greater than A certain value) file, in the form of a list to user show, chosen whether to be purged processing by user.
Fig. 1 is the first flow diagram of file clean-up method provided in an embodiment of the present invention;May include:
S101: the file with depth cleaning attribute in the terminal is obtained;
In practical applications, the file with depth cleaning attribute in the terminal is obtained, in the available terminal All Files;For each file in acquired All Files, judge whether the size of this document is not less than preset One threshold value, if so, this document is labeled as the file with depth cleaning attribute.
Illustratively, by taking file A as an example, it is assumed that preset first threshold is 50MB, and acquired file A size is 103MB, acquired file B size are 40MB, then judge that file A is greater than 50MB, and file A is labeled as to have depth cleaning The file of attribute.
In practical applications, the file with depth cleaning attribute in the terminal is obtained, in the available terminal The store path of file;Judge whether the store path is customized path, if so, by the files-designated under the store path It is denoted as the file with depth cleaning attribute.
Customized path is usually nonsystematic file path, also the associated path of nonusable routine, but user oneself creates The corresponding path of the file for storage file built.Therefore may determine that whether the store path of acquired file is to be Unite the associated path of file path and application program, acquired file store path neither system file path, nor In the case where the associated path of application program, then it is assumed that the store path of acquired file is customized path.
Illustratively, by taking file A as an example, it is assumed that user oneself creates file x, is stored with file A in file x, sentences The disconnected corresponding path file x out is customized path, and the file A in file x is labeled as with depth cleaning attribute File.
In practical applications, the file with depth cleaning attribute in the terminal is obtained, in the available terminal With the store path where the file of particular file types;Judge whether the file store path meets the second default rule Then, if so, being to clear up the text of attribute with depth by the file mark under the store path with particular file types Part.
Illustratively, it is assumed that certain types of file is the video file for extending entitled " .avi ", and the second preset rules are File store path is the download file in browser y installation directory.
By taking file A and file B as an example.
Assuming that the video file of the extension entitled " .avi " obtained is file A, store path is browser y installation directory In download file in.
Judge file A file store path be browser y installation directory in download file in, then will be clear The file A look in the download file in device y installation directory, labeled as the file with depth cleaning attribute.
Assuming that the video file of the extension entitled " .avi " obtained is file B, store path is Andriod data In video file folder.
The file store path for judging file B is not in download file in browser y installation directory, then not By Andriod data video file folder in file B, labeled as with depth cleaning attribute file.
S102: whether the frequency of use of the judgement file with depth cleaning attribute within a preset period of time meets the One preset rules, if so, executing S103;
In practical applications, the frequency of use of the judgement file with depth cleaning attribute within a preset period of time is It is no to meet the first preset rules, the last time access time of the file with depth cleaning attribute can be obtained;Judgement Whether the duration of the last time access time to current time is not less than preset second threshold, if so, indicating this article The frequency of use of part within a preset period of time meets the first preset rules.
Illustratively, by taking the file A with depth cleaning attribute as an example.Assuming that the last time access file A obtained Time to current time when a length of 15 hours 7 days 35 points, preset second threshold be 7 days.Judge that last time accesses text The duration of the time of part A to current time is greater than 7 days, then it represents that the frequency of use of file A within a preset period of time meets first Preset rules.
In practical applications, the frequency of use of the judgement file with depth cleaning attribute within a preset period of time is It is no to meet the first preset rules, the number of the file with depth cleaning attribute of access in preset time period can be obtained; Judge whether obtained number is less than preset third threshold value, if so, indicating the use frequency of this document within a preset period of time Rate meets the first preset rules.
Illustratively, by taking the file A with depth cleaning attribute as an example.Assuming that preset time period is one week, acquisition is away from working as Within one week of preceding time, file A is total 2 times accessed, and preset third threshold value is 7 times, i.e., average to need to access one daily It is secondary.Judge within one week away from current time, the accessed number of file A is less than 7 times, then it represents that file A is when default Between frequency of use in section meet the first preset rules.
In practical applications, the frequency of use of the judgement file with depth cleaning attribute within a preset period of time is It is no to meet the first preset rules, the file with depth cleaning attribute can be obtained respectively in the first preset time period and the Times N in two preset time periods1And N2, wherein first preset time period is earlier than second preset time period;Judgement N1With N2Ratio whether be greater than preset 4th threshold value, if so, indicate this document within a preset period of time frequency of use symbol Close the first preset rules.
Illustratively, by taking the file A with depth cleaning attribute as an example.Assuming that default first time period is last month, in advance If second time period is this month.Preset 4th threshold value is 10.
Assuming that obtaining, last month file A is 15 times accessed, and this month file A is 1 time accessed, what last month file A was accessed The ratio for the number that number and this month file A are accessed is 15, and being greater than preset 4th threshold value is 10, indicates file A default Frequency of use in period meets the first preset rules.
S103: the file with depth cleaning attribute is subjected to cleaning operation according to suggestion manner of cleaning up.
In practical applications, the file with depth cleaning attribute is subjected to cleaning behaviour according to suggestion manner of cleaning up Make, can receive the suggestion cleaning instruction of user;It is cleared up and is instructed according to the suggestion of user, deletion is described, and there is depth to clear up attribute File.
Illustratively, by taking the file A with depth cleaning attribute as an example.Assuming that the use of file A within a preset period of time Frequency meets the first preset rules.Judge the frequency of use of file A within a preset period of time meet the first preset rules it Afterwards, the suggestion cleaning instruction for receiving user deletes file A after the suggestion cleaning instruction for receiving user.
It should be noted that above-mentioned be illustrated by taking file A and file B as an example, a specific example only of the invention, and It does not constitute a limitation of the invention.In practical applications, the file with depth cleaning attribute, can be in various map softwares The old skin, various of the old dictionary and/or old skin of the offline map, various input methods that often do not use, various chat softwares The audio-video document etc. for the audio-visual application software downloading being unloaded.
Using embodiment illustrated in fig. 1 of the present invention, by the file with depth cleaning attribute, meet the files of preset rules It is cleared up according to suggestion manner of cleaning up.The occupancy for reducing memory space improves the speed of service of terminal, improves user Working efficiency and experience effect.
Fig. 2 is second of flow diagram of file clean-up method provided in an embodiment of the present invention;It is real shown in Fig. 2 of the present invention On the basis of applying example embodiment shown in Fig. 1, S103 may include S103A and S103B, wherein
S103A: by the file unloading with depth cleaning attribute in default storage region;
S103B: it after unloading completion, is cleared up and is instructed according to the suggestion of user, delete institute in raw storage area State the file with depth cleaning attribute.
Illustratively, it is assumed that the file with depth cleaning attribute that cleaning operation is carried out according to suggestion manner of cleaning up is A, Its raw storage area in the terminal are as follows: Andriod data in Photo folder, preset storage region are as follows: backup File.Then by A Bei Fenzhi backup file, file A in Andriod data Photo folder is deleted.
It should be noted that it is above-mentioned by file A, Andriod data Photo folder and for backup file It is illustrated, a specific example only of the invention, and does not constitute a limitation of the invention.
Using embodiment illustrated in fig. 2 of the present invention, by the file with depth cleaning attribute, meet the files of preset rules It is cleared up according to suggestion manner of cleaning up.The occupancy for reducing memory space improves the speed of service of terminal, improves user Working efficiency and experience effect.And before clearing up file, file is subjected to unloading, under the operation that user accidentally deletes, File can be repaired.
Fig. 3 is the third flow diagram of file clean-up method provided in an embodiment of the present invention;It is real shown in Fig. 3 of the present invention On the basis of applying example embodiment shown in Fig. 2, increase:
S104: judge with the presence or absence of the recovery instruction for default storage region file in predetermined period, if so, holding Row S105, if not, executing S106;
S105: restore described and restore to instruct the file in the targeted default storage region;
S106: the file that storage time in the default storage region is more than predetermined period is deleted.
Illustratively, it is assumed that predetermined period is 1 week, preset storage region be it is above-mentioned backup file, backup it is literary It include file A and file B in part folder.
Judge the recovery instruction for file A and/or file B whether is received within 1 week;
If receiving the recovery instruction for file A, file A is restored to its raw storage area;
If receiving the recovery instruction for file B, file B is restored to its raw storage area;
If receiving the recovery instruction for file A and file B, file A is restored to its raw storage area, and By file B to its raw storage area;
If do not received within 1 week for file A and/or file B recovery instruction, by backup file In deleted comprising file A and file B.
It should be noted that above-mentioned be illustrated by taking file A and file B as an example, a specific example only of the invention, and It does not constitute a limitation of the invention.In practical applications, clearing up with depth for cleaning operation is carried out according to suggestion manner of cleaning up The file of attribute can be the offline map often not used in various map softwares, the old dictionary of various input methods and/or old Skin, the old skin of various chat softwares, various audio-video documents of audio-visual application software downloading being unloaded etc..
It should be noted that it is above-mentioned by file A, file B and be illustrated for backup file, it is only of the invention A specific example, and do not constitute a limitation of the invention.
Using embodiment illustrated in fig. 3 of the present invention, by the file with depth cleaning attribute, meet the files of preset rules It is cleared up according to suggestion manner of cleaning up.The occupancy for reducing memory space improves the speed of service of terminal, improves user Working efficiency and experience effect.And before clearing up file, file is subjected to unloading, under the operation that user accidentally deletes, File can be repaired, avoid the occurrence of file is accidentally deleted.
Corresponding with above-mentioned embodiment of the method, the embodiment of the present invention also provides a kind of file clean-up device.
Fig. 4 is the first structural schematic diagram of file clean-up device provided in an embodiment of the present invention, may include: that file obtains Modulus block 401, first judgment module 402 and cleaning modul 403, wherein
File acquisition module 401, for obtaining the file with depth cleaning attribute in the terminal;
In practical applications, the file acquisition module 401 of illustrated embodiment of the present invention, specifically can be used for:
Obtain the All Files in the terminal;
For each file in acquired All Files, judge whether the size of this document is not less than preset first threshold Value, if so, this document is labeled as the file with depth cleaning attribute.
In practical applications, the file acquisition module 401 of illustrated embodiment of the present invention, specifically can be used for:
Obtain the store path of file in the terminal;
Judge whether the store path is customized path, if so, being tool by the file mark under the store path There is the file of depth cleaning attribute.
In practical applications, the file acquisition module 401 of illustrated embodiment of the present invention, specifically can be used for:
Obtain the store path where the file in the terminal with particular file types;
Judge whether the file store path meets the second preset rules, if so, by having under the store path The file mark of particular file types is that the file of attribute is cleared up with depth.
First judgment module 402, the file with depth cleaning attribute for judging that file acquisition module 401 obtains exist Whether the frequency of use in preset time period meets the first preset rules;
In practical applications, the first judgment module 402 of illustrated embodiment of the present invention, specifically can be used for:
Obtain the last time access time of the file with depth cleaning attribute;
Judge whether the last time access time to the duration of current time is not less than preset second threshold, if It is to indicate that the frequency of use of this document within a preset period of time meets the first preset rules.
In practical applications, the first judgment module 402 of illustrated embodiment of the present invention, specifically can be used for:
Obtain the number of the file with depth cleaning attribute of access in preset time period;
Judge whether obtained number is less than preset third threshold value, if so, indicating this document within a preset period of time Frequency of use meet the first preset rules.
In practical applications, the first judgment module 402 of illustrated embodiment of the present invention, specifically can be used for:
The file with depth cleaning attribute is obtained respectively in the first preset time period and the second preset time period Times N1And N2, wherein first preset time period is earlier than second preset time period;
Judge N1With N2Ratio whether be greater than preset 4th threshold value, if so, indicate this document within a preset period of time Frequency of use meet the first preset rules.
Cleaning modul 403, for that described will have depth in the case where 402 judging result of first judgment module, which is, is The file for clearing up attribute carries out cleaning operation according to suggestion manner of cleaning up.
In practical applications, the cleaning modul 403 of illustrated embodiment of the present invention, specifically can be used for:
In the case where 402 judging result of first judgment module, which is, is, the suggestion cleaning instruction of user is received;
It is cleared up and is instructed according to the suggestion of user, delete the file with depth cleaning attribute.
Using embodiment illustrated in fig. 4 of the present invention, by the file with depth cleaning attribute, meet the files of preset rules It is cleared up according to suggestion manner of cleaning up.The occupancy for reducing memory space improves the speed of service of terminal, improves user Working efficiency and experience effect.
Fig. 5 is second of structural schematic diagram of file clean-up device provided in an embodiment of the present invention;It is real shown in Fig. 5 of the present invention Apply example on the basis of the embodiment shown in fig. 4, cleaning modul 403 may include: unloading submodule and cleaning submodule, wherein
The unloading submodule, for having by described in the case where the first judgment module judging result, which is, is Depth clears up the file unloading of attribute in default storage region;
The cleaning submodule, for being completed in the file unloading with depth cleaning attribute in default storage region Later, it is cleared up and is instructed according to the suggestion of user, delete the file with depth cleaning attribute described in raw storage area.
Using embodiment illustrated in fig. 5 of the present invention, by the file with depth cleaning attribute, meet the files of preset rules It is cleared up according to suggestion manner of cleaning up.The occupancy for reducing memory space improves the speed of service of terminal, improves user Working efficiency and experience effect.And before clearing up file, file is subjected to unloading, under the operation that user accidentally deletes, File can be repaired.
Fig. 6 is the third structural schematic diagram of file clean-up device provided in an embodiment of the present invention;It is real shown in Fig. 6 of the present invention On the basis of applying example embodiment shown in Fig. 5, increase: the second judgment module 404, recovery module 405 and removing module 406, In,
Second judgment module 404, for judging in predetermined period with the presence or absence of for the extensive of default storage region file Multiple instruction;
Recovery module 405, for restoring described and referring in the case where 404 judging result of the second judgment module, which is, is Enable the file in the targeted default storage region;
Removing module 406 is deposited in the case where 404 judging result of the second judgment module is no, deleting described preset Storage time is more than the file of predetermined period in storage area domain.
Using embodiment illustrated in fig. 6 of the present invention, by the file with depth cleaning attribute, meet the files of preset rules It is cleared up according to suggestion manner of cleaning up.The occupancy for reducing memory space improves the speed of service of terminal, improves user Working efficiency and experience effect.And before clearing up file, file is subjected to unloading, under the operation that user accidentally deletes, File can be repaired, avoid the occurrence of file is accidentally deleted.
Corresponding with above-mentioned embodiment of the method and Installation practice, the embodiment of the invention also provides a kind of terminals.
Fig. 7 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention, which includes: shell 701, processor 702, memory 703, circuit board 704 and power circuit 705, wherein circuit board 704 is placed in the space that shell 701 surrounds Portion, processor 702 and memory 703 are arranged on circuit board 704;Power circuit 705, for each circuit or device for terminal Part power supply;Memory 703 is for storing executable program code;Processor 702 is held by what is stored in reading memory 703 Line program code runs program corresponding with executable program code, for executing following steps:
Obtain the file with depth cleaning attribute in the terminal;
It is pre- whether the frequency of use of the judgement file with depth cleaning attribute within a preset period of time meets first If regular;
If meeting, the file with depth cleaning attribute is subjected to cleaning operation according to suggestion manner of cleaning up.
The terminal exists in a variety of forms, including but not limited to:
(1) mobile communication equipment: the characteristics of this kind of equipment is that have mobile communication function, and to provide speech, data Communication is main target.This Terminal Type includes: smart phone (such as iPhone), multimedia handset, functional mobile phone and low Hold mobile phone etc..
(2) super mobile personal computer equipment: this kind of equipment belongs to the scope of personal computer, there is calculating and processing function Can, generally also have mobile Internet access characteristic.This Terminal Type includes: PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device: this kind of equipment can show and play multimedia content.Such equipment include: audio, Video player (such as iPod), handheld device, e-book and intelligent toy and portable car-mounted navigation equipment.
(4) server: providing the equipment of the service of calculating, and the composition of server includes that processor, hard disk, memory, system are total Line etc., server is similar with general computer architecture, but due to needing to provide highly reliable service, in processing energy Power, stability, reliability, safety, scalability, manageability etc. are more demanding.
(5) other electronic apparatus with data interaction function.
Using embodiment illustrated in fig. 7 of the present invention, by the file with depth cleaning attribute, meet the files of preset rules It is cleared up according to suggestion manner of cleaning up.The occupancy for reducing memory space improves the speed of service of terminal, improves user Working efficiency and experience effect.
It should be noted that, in this document, 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 including 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.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For terminal embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to method The part of embodiment illustrates.
Those of ordinary skill in the art will appreciate that all or part of the steps in realization above method embodiment is can It is completed with instructing relevant hardware by program, the program can store in computer-readable storage medium, The storage medium designated herein obtained, such as: ROM/RAM, magnetic disk, CD.
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 (15)

1. a kind of file clean-up method is applied to terminal, which is characterized in that the described method includes:
Obtain the file with depth cleaning attribute in the terminal;
Time of the file with depth cleaning attribute in the first preset time period and the second preset time period is obtained respectively Number N1And N2, wherein first preset time period is earlier than second preset time period;
Judge N1With N2Ratio whether be greater than preset 4th threshold value;If so, by the file with depth cleaning attribute Cleaning operation is carried out according to suggestion manner of cleaning up.
2. the method according to claim 1, wherein described obtain in the terminal with depth cleaning attribute File, comprising:
Obtain the All Files in the terminal;
For each file in acquired All Files, judge whether the size of this document is not less than preset first threshold, If so, this document is labeled as the file with depth cleaning attribute.
3. the method according to claim 1, wherein described obtain in the terminal with depth cleaning attribute File, comprising:
Obtain the store path of file in the terminal;
Judge whether the store path is customized path, if so, being with depth by the file mark under the store path The file of degree cleaning attribute.
4. the method according to claim 1, wherein described obtain in the terminal with depth cleaning attribute File, comprising:
Obtain the store path where the file in the terminal with particular file types;
Judge whether the file store path meets the second preset rules, if so, specific by having under the store path The file mark of file type is that the file of attribute is cleared up with depth.
5. the method according to claim 1, wherein it is described by it is described with depth cleaning attribute file according to It is recommended that manner of cleaning up carries out cleaning operation, comprising:
Instruction is cleared up in the suggestion for receiving user;And
It is cleared up and is instructed according to the suggestion of user, delete the file with depth cleaning attribute.
6. the method according to claim 1, wherein it is described by it is described with depth cleaning attribute file according to It is recommended that manner of cleaning up carries out cleaning operation, comprising:
By the file unloading with depth cleaning attribute in default storage region;And
It after unloading completion, is cleared up and is instructed according to the suggestion of user, deleting has depth described in raw storage area Clear up the file of attribute.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
Judge in predetermined period with the presence or absence of the recovery instruction for default storage region file;
If it exists, then restore described to restore to instruct the file in the targeted default storage region;
If it does not exist, then the file that storage time in the default storage region is more than predetermined period is deleted.
8. a kind of file clean-up device, it is applied to terminal, which is characterized in that described device includes: file acquisition module, first sentences Disconnected module and cleaning modul, wherein
The file acquisition module, for obtaining the file with depth cleaning attribute in the terminal;
The first judgment module, for obtain respectively the file with depth cleaning attribute in the first preset time period and Times N in second preset time period1And N2, wherein first preset time period is earlier than second preset time period;
Judge N1With N2Ratio whether be greater than preset 4th threshold value;
The cleaning modul, for that described will have depth clear in the case where the first judgment module judging result, which is, is The file for managing attribute carries out cleaning operation according to suggestion manner of cleaning up.
9. device according to claim 8, which is characterized in that the file acquisition module is specifically used for:
Obtain the All Files in the terminal;
For each file in acquired All Files, judge whether the size of this document is not less than preset first threshold, If so, this document is labeled as the file with depth cleaning attribute.
10. device according to claim 8, which is characterized in that the file acquisition module is specifically used for:
Obtain the store path of file in the terminal;
Judge whether the store path is customized path, if so, being with depth by the file mark under the store path The file of degree cleaning attribute.
11. device according to claim 8, which is characterized in that the file acquisition module is specifically used for:
Obtain the store path where the file in the terminal with particular file types;
Judge whether the file store path meets the second preset rules, if so, specific by having under the store path The file mark of file type is that the file of attribute is cleared up with depth.
12. device according to claim 8, which is characterized in that the cleaning modul is specifically used for:
In the case where the first judgment module judging result, which is, is, the suggestion cleaning instruction of user is received;
It is cleared up and is instructed according to the suggestion of user, delete the file with depth cleaning attribute.
13. device according to claim 8, which is characterized in that the cleaning modul, comprising: unloading submodule and cleaning Submodule, wherein
The unloading submodule, for that described will have depth in the case where the first judgment module judging result, which is, is The file unloading of attribute is cleared up in default storage region;
The cleaning submodule, for completing it in default storage region in the file unloading with depth cleaning attribute Afterwards, it is cleared up and is instructed according to the suggestion of user, delete the file with depth cleaning attribute described in raw storage area.
14. device according to claim 13, which is characterized in that described device further include: the second judgment module restores mould Block and removing module, wherein
Second judgment module refers in predetermined period with the presence or absence of the recovery for default storage region file for judging It enables;
The recovery module, in the case where the second judgment module judging result, which is, is, restoring the recovery instruction File in the targeted default storage region;
The removing module, for deleting the default storage in the case where the second judgment module judging result is no Storage time is more than the file of predetermined period in region.
15. a kind of terminal, which is characterized in that the terminal includes: shell, processor, memory, circuit board and power circuit, Wherein, circuit board is placed in the space interior that shell surrounds, and processor and memory setting are on circuit boards;Power circuit is used In each circuit or the device power supply for terminal;Memory is for storing executable program code;Processor is by reading storage The executable program code stored in device runs program corresponding with executable program code, for executing following steps:
Obtain the file with depth cleaning attribute in the terminal;
Time of the file with depth cleaning attribute in the first preset time period and the second preset time period is obtained respectively Number N1And N2, wherein first preset time period is earlier than second preset time period;
Judge N1With N2Ratio whether be greater than preset 4th threshold value;If so, by the file with depth cleaning attribute Cleaning operation is carried out according to suggestion manner of cleaning up.
CN201510640564.6A 2015-09-30 2015-09-30 File cleaning method and device and terminal Active CN105183902B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510640564.6A CN105183902B (en) 2015-09-30 2015-09-30 File cleaning method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510640564.6A CN105183902B (en) 2015-09-30 2015-09-30 File cleaning method and device and terminal

Publications (2)

Publication Number Publication Date
CN105183902A CN105183902A (en) 2015-12-23
CN105183902B true CN105183902B (en) 2019-03-15

Family

ID=54905983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510640564.6A Active CN105183902B (en) 2015-09-30 2015-09-30 File cleaning method and device and terminal

Country Status (1)

Country Link
CN (1) CN105183902B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893471B (en) * 2016-03-28 2020-11-20 联想(北京)有限公司 Data processing method and electronic equipment
CN105912698A (en) * 2016-04-25 2016-08-31 乐视控股(北京)有限公司 Deletion method and system of data file in disk
CN105975400B (en) * 2016-04-27 2019-06-04 北京金山安全软件有限公司 Space management method and device and electronic equipment
CN106844619A (en) * 2017-01-17 2017-06-13 深圳市金立通信设备有限公司 A kind of file clean-up method and terminal
CN107423419A (en) * 2017-07-31 2017-12-01 信利光电股份有限公司 The batch introduction method and system of a kind of Parameter File
WO2019090725A1 (en) * 2017-11-10 2019-05-16 华为技术有限公司 Terminal removing personal file of user on basis of user habits
CN107832155B (en) * 2017-11-14 2020-01-14 Oppo广东移动通信有限公司 Method and device for replacing algorithm, storage medium and electronic equipment
CN108228357B (en) * 2018-01-22 2021-04-02 维沃移动通信有限公司 Memory cleaning method and mobile terminal
CN109213604B (en) * 2018-10-15 2021-08-20 北京奇艺世纪科技有限公司 Data source management method and device
CN110543451A (en) * 2019-07-30 2019-12-06 华为技术有限公司 Method and device for efficiently cleaning equipment files
CN111639764B (en) * 2020-05-19 2021-04-09 苏州诺达佳自动化技术有限公司 Industrial control operating system with AI reasoning and acceleration computing capability
CN115599752A (en) * 2022-11-24 2023-01-13 统信软件技术有限公司(Cn) Method and device for managing data cleaning and computing equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789456A (en) * 2011-05-17 2012-11-21 宏碁股份有限公司 Method for cleaning redundancy files of disc
CN102880713A (en) * 2012-09-29 2013-01-16 北京奇虎科技有限公司 File deleting method and file deleting device
CN102945159A (en) * 2012-10-24 2013-02-27 深圳市万凯达科技有限公司 Automatic application program cleaning method and system based on mobile terminal
CN104021160A (en) * 2014-05-26 2014-09-03 北京金山安全软件有限公司 Client data cleaning method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365882A (en) * 2012-03-30 2013-10-23 网秦无限(北京)科技有限公司 Method and system for cleaning junk files on mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789456A (en) * 2011-05-17 2012-11-21 宏碁股份有限公司 Method for cleaning redundancy files of disc
CN102880713A (en) * 2012-09-29 2013-01-16 北京奇虎科技有限公司 File deleting method and file deleting device
CN102945159A (en) * 2012-10-24 2013-02-27 深圳市万凯达科技有限公司 Automatic application program cleaning method and system based on mobile terminal
CN104021160A (en) * 2014-05-26 2014-09-03 北京金山安全软件有限公司 Client data cleaning method and device

Also Published As

Publication number Publication date
CN105183902A (en) 2015-12-23

Similar Documents

Publication Publication Date Title
CN105183902B (en) File cleaning method and device and terminal
CN103761306A (en) Smart terminal file cleaning method and device
EP1770512A3 (en) Method and system for updating software
CN103984468A (en) Method and device for information processing
CN104731830A (en) Recommendation method, recommendation device and server
CN103645825A (en) Message processing method and device
CN103092687B (en) A kind of application program management apparatus and method
CN102929980B (en) Folder cleaning method and device
CN104331376B (en) The method for cleaning and device of the installation kit stored in mobile terminal
CN104750620B (en) A kind of internal memory migration method and device
CN105279236A (en) File cleaning method and device and electronic equipment
CN103942126B (en) Electronic equipment and its data back up method
CN106776908B (en) Data cleaning method and device and terminal
CN105681395A (en) Resource sharing control method, device, server and terminal
CN102984357A (en) Contact person information managing method and managing device
CN105956132A (en) Junk data clearing method and system
CN105893471B (en) Data processing method and electronic equipment
CN105574163A (en) File processing method and device and electronic equipment
CN104615333B (en) The group technology and play system of a kind of playback equipment
CN105373447B (en) Data backup method and device and electronic equipment
CN106815283A (en) Data processing method, device and electronic equipment
TWI506641B (en) Method and device for cleaning terminal redundant information
CN109325000A (en) A kind of method and apparatus of document creation
CN103645983B (en) A kind of generation method and device of journal file
CN103092768A (en) Method and device of data processing in application system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant