Summary of the invention
In view of this, technical problems to be solved in this application there is provided a kind of method for sorting and system of equipment cache file, when memory space inadequate, guide user to delete the previous cache file of a part, reach the object of cleaning storage space.
In order to solve the problems of the technologies described above, the application has following technical scheme:
A method for sorting for equipment cache file, comprising:
Specify when equipment and treat cache file, then treat whether the volume of cache file is greater than the current residual memory space of equipment described in judging; If described in treat that the volume of cache file is greater than described residual memory space, then by the difference space as a supplement of the volume and described residual memory space for the treatment of cache file;
According to the screening rule preset, screen the cache file of one or more buffer memory as file for clearance; The volume of described file for clearance is not less than described supplementary space; Described file for clearance is added list for clearance, and by described list display for clearance;
When equipment generates delete instruction for list for clearance, then delete the file for clearance in list for clearance according to described delete instruction;
Start that buffer memory is appointed treats cache file.
Described described file for clearance is added list for clearance, and described list display for clearance is also comprised:
When equipment generates extended instruction for list for clearance, then again according to the screening rule preset, screen the cache file of one or more buffer memory as file for clearance; Described file for clearance is added list for clearance.
The screening rule that described basis is preset, the cache file screening one or more buffer memory is specially as file for clearance:
According to the time sequencing completing buffer memory, screening completes the cache file of one or more buffer memorys of buffer memory at first as file for clearance.
The screening rule that described basis is preset, the cache file screening one or more buffer memory is specially as file for clearance:
According to completing the time sequencing browsed, screening finally completes the cache file of the one or more buffer memorys browsed as file for clearance.
The screening rule that described basis is preset, the cache file screening one or more buffer memory is specially as file for clearance:
Filter out browse the minimum one or more buffer memorys of frequency cache file as file for clearance.
The screening rule that described basis is preset, the cache file screening one or more buffer memory is specially as file for clearance:
Filter out the cache file of the maximum one or more buffer memorys of volume as file for clearance.
A clearing system for equipment cache file, comprising:
Space judge module, for when equipment is specified until cache file, treats described in judgement whether the volume of cache file is greater than the current residual memory space of equipment; If described in treat that the volume of cache file is greater than described residual memory space, then by the difference space as a supplement of the volume and described residual memory space for the treatment of cache file;
Screening management module, for according to the screening rule preset, screens the cache file of one or more buffer memory as file for clearance; The volume of described file for clearance is not less than described supplementary space; Described file for clearance is added list for clearance, and by described list display for clearance;
File clean-up module, for when equipment generates delete instruction for list for clearance, deletes the file for clearance in list for clearance according to described delete instruction;
File cache module, for starting, buffer memory is appointed treats cache file.
Compared with prior art, the method and system described in the application, reaches following effect:
(1) utilize described screening rule, filter out the lower and cache file of volume adequacy of desirability as file for clearance for user in advance;
(2) by showing list for clearance to user, guiding user directly to operate list for clearance, reaching the object of cleaning storage space;
(3) avoid in existing storage space scale removal process, the process of the catalogue of cache file is transferred in manual the searching of user, also prevent user and forgets cleaning storage space, or does not know that the situation of how to clear up storage space occurs.
Certainly, the arbitrary product implementing the application must not necessarily need to reach above-described all technique effects simultaneously.
Embodiment
As employed some vocabulary to censure specific components in the middle of instructions and claim.Those skilled in the art should understand, and hardware manufacturer may call same assembly with different noun.This specification and claims are not used as with the difference of title the mode distinguishing assembly, but are used as the criterion of differentiation with assembly difference functionally." comprising " as mentioned in the middle of instructions and claim is in the whole text an open language, therefore should be construed to " comprise but be not limited to "." roughly " refer to that in receivable error range, those skilled in the art can solve the technical problem within the scope of certain error, reach described technique effect substantially.In addition, " couple " word and comprise directly any and indirectly electric property coupling means at this.Therefore, if describe a first device in literary composition to be coupled to one second device, then represent described first device and directly can be electrically coupled to described second device, or be indirectly electrically coupled to described second device by other devices or the means that couple.Instructions subsequent descriptions is implement the better embodiment of the application, and right described description is for the purpose of the rule that the application is described, and is not used to the scope limiting the application.The protection domain of the application is when being as the criterion depending on the claims person of defining.
In the application, the cache file making equipment buffer memory new will be needed user, but during memory space inadequate, show a list for clearance, thus guide user to delete part cache file formerly, to reach the effect of cleaning storage space; To ensure that new cache file can be saved in the middle of the built-in storage of equipment smoothly.Shown in Figure 1, be the method for sorting of equipment cache file described in the application.Described in the present embodiment, method comprises the following steps:
Step 101, when equipment specify treat cache file, then judge described in treat whether the volume of cache file is greater than the current residual memory space of equipment; If described in treat that the volume of cache file is greater than described residual memory space, then by the difference space as a supplement of the volume and described residual memory space for the treatment of cache file.
In the present embodiment, suppose that user specifies a volume to be that the file A of 1.5GB is as treating cache file by equipment.Inevitable, need in equipment to leave the storage space being greater than 1.5GB, described in treat that cache file can complete buffer memory, otherwise namely memory space inadequate is described.
After specifying and treating cache file, reading current device residual memory space is 0.9GB, then treat that the volume of cache file is greater than the current residual memory space of equipment, current memory space deficiency is described, cannot completes the buffer memory treating cache file A.Now, by the difference 1.5-0.9=0.6GB of the volume and described residual memory space for the treatment of cache file, space as a supplement.Described supplementary space also just means, must clean out the space of at least 0.6GB in device storage, can realize the buffer memory treating cache file A.
The screening rule that step 102, basis are preset, screens the cache file of one or more buffer memory as file for clearance; The volume of described file for clearance is not less than described supplementary space; Described file for clearance is added list for clearance, and by described list display for clearance.
When device memory is not enough, a large amount of cache file of buffer memory before general remark equipment, and arrange timely or delete, thus occupy too much space.In the present embodiment, in order to positive guide user completes the arrangement of storage space in this case, so filter out one or more as file for clearance from the cache file of previous buffer memory using automatic, optionally delete to clean out storage space for user.Aforementionedly calculate, supplementary space is 0.6GB, so the volume of the file for clearance filtered out also needs to be not less than described 0.6GB, like this after deletion file for clearance, can solve the problem of memory space inadequate.
The screening of file for clearance is based on screening rule, the cardinal rule of described screening rule is filter out cache file that user no longer needs as much as possible as file for clearance.Can with reference to following several mode:
A, according to the time sequencing completing buffer memory, the cache file that screening completes one or more buffer memorys of buffer memory is at first as file for clearance.
Namely according to time sequencing, thought buffer memory time more early, preserve more of a specified duration in a device, most possibly no longer needed by user, can prioritizing selection delete.
B, according to completing the time sequencing browsed, the cache file that screening finally completes the one or more buffer memorys browsed is as file for clearance.
Namely same according to time sequencing, think browsed in the recent period cache file, browse since completed, then most possibly no longer needed by user, so prioritizing selection is deleted.
C, filter out play the minimum one or more buffer memorys of frequency cache file as file for clearance.
Namely think, browse that namely frequency is low means that the desirability of user is low, can preferentially delete.
D, filter out the cache file of the maximum one or more buffer memorys of volume as file for clearance.
Which no longer from the angle of user's request degree, but filters out the large cache file that takes up room as far as possible and preferentially deletes, to clean out more space as much as possible.
Above any-mode all separately as the screening rule in the present embodiment, also can be combined with each other as the screening rule in the present embodiment in any way.In addition, other similar screening modes, can be combined in the middle of the overall technical architecture of the present embodiment as screening rule equally.In a word, in the present embodiment, concrete restriction is not done for the content of screening rule.
Suppose in the present embodiment, select a mode as screening rule, then filter out B, C, D tri-cache files completing buffer memory the earliest, the volume of three is respectively 0.2GB, 0.3GB and 0.5GB, summation is 1GB, be greater than described supplementary space, then using this three as file for clearance, join in the middle of a list for clearance.
Subsequently, described list for clearance shown to user, whether user can learn the information that the filename, file size etc. of each file for clearance filtered out are relevant, and determine by file erase for clearance.User directly can input instruction, by file erase for clearance wherein to described list for clearance.
In the present embodiment, so-called positive guide user clears up storage space, shows a list for clearance to user in fact namely automatically, makes user directly to described list operation for clearance, can avoid the catalogue that cache file is transferred in manual searching; Also prevent user and forget cleaning storage space, or do not know that the situation of how to clear up storage space occurs.
Preferably, can also comprise herein in this step:
Step 102a, when equipment generates extended instruction for list for clearance, then again according to the screening rule preset, screen the cache file of one or more buffer memory as file for clearance; Described file for clearance is added list for clearance.
That is, if user does not want to delete the file for clearance filtered out first, or user only wishes to delete wherein part file for clearance, and the volume of this part file for clearance is less than supplementary space, user can also obtain file more how for clearance by extended instruction, more artificially selects.
Such as, in the present embodiment, in file B, C, D for clearance of filtering out, user wishes to retain file D for clearance.But the volume sum of file B and C for clearance is 0.5GB, is less than supplementary space.Then now user will input an extended instruction by equipment, and then the screening rule that basis is again preset screens new file for clearance, namely again filters out the file E for clearance that volume is 0.9GB, joins list for clearance.
Described again according to preset screening rule screen file for clearance, its principle is identical with screening file for clearance in step 102, this not Reduplicated describe.
Step 103, when equipment generates delete instruction for list for clearance, then delete the file for clearance in list for clearance according to described delete instruction.
User artificial selection can delete those files for clearance in list for clearance, directly operates list for clearance, and input delete instruction, deletes the file any one or more for clearance in list for clearance.In the present embodiment, user can operate and only delete file E for clearance, also file B, C, E for clearance all can be deleted, and can both realize the object of clearing up enough storage spaces.
Step 104, start that buffer memory is appointed treats cache file.
After cleaning obtains being not less than the storage space of supplementary space size, can start that buffer memory is appointed treats cache file.
As seen through the above technical solutions, the beneficial effect that the present embodiment exists is: utilize described screening rule, filters out the lower and cache file of volume adequacy of desirability as file for clearance in advance for user; And by showing list for clearance to user, guiding user directly to operate list for clearance, reaching the object of cleaning storage space; Avoid in existing storage space scale removal process, the process of the catalogue of cache file is transferred in manual the searching of user, also prevent user and forgets cleaning storage space, or does not know that the situation of how to clear up storage space occurs.
See the specific embodiment of Fig. 2 for equipment cache file clearing system described in the application.System described in the present embodiment for realize embodiment illustrated in fig. 1 described in method.The technical scheme of described system is consistent with the embodiment of the method shown in Fig. 1 in essence, and in embodiment illustrated in fig. 1, corresponding description is equally applicable to, in the middle of the present embodiment, not make repeated description at this.Described in the present embodiment, system comprises:
Space judge module 201, for when equipment is specified until cache file, treats described in judgement whether the volume of cache file is greater than the current residual memory space of equipment; If described in treat that the volume of cache file is greater than described residual memory space, then by the difference space as a supplement of the volume and described residual memory space for the treatment of cache file.
Screening management module 202, for according to the screening rule preset, screens the cache file of one or more buffer memory as file for clearance; The volume of described file for clearance is not less than described supplementary space; Described file for clearance is added list for clearance, and by described list display for clearance.
File clean-up module 203, for when equipment generates delete instruction for list for clearance, deletes the file for clearance in list for clearance according to described delete instruction.
File cache module 204, for starting, buffer memory is appointed treats cache file.
As seen through the above technical solutions, the beneficial effect that system described in the present embodiment exists is: utilize described screening rule, filters out the lower and cache file of volume adequacy of desirability as file for clearance in advance for user; And by showing list for clearance to user, guiding user directly to operate list for clearance, reaching the object of cleaning storage space; Avoid in existing storage space scale removal process, the process of the catalogue of cache file is transferred in manual the searching of user, also prevent user and forgets cleaning storage space, or does not know that the situation of how to clear up storage space occurs.
Visible by above each embodiment, the beneficial effect that the application exists is:
(1) utilize described screening rule, filter out the lower and cache file of volume adequacy of desirability as file for clearance for user in advance;
(2) by showing list for clearance to user, guiding user directly to operate list for clearance, reaching the object of cleaning storage space;
(3) avoid in existing storage space scale removal process, the process of the catalogue of cache file is transferred in manual the searching of user, also prevent user and forgets cleaning storage space, or does not know that the situation of how to clear up storage space occurs.
Those skilled in the art should understand, the embodiment of the application can be provided as method, device or computer program.Therefore, the application can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the application can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.
Above-mentioned explanation illustrate and describes some preferred embodiments of the application, but as previously mentioned, be to be understood that the application is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope described herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the application, then all should in the protection domain of the application's claims.