CN104978152A - Method and apparatus for cleaning up files in cache - Google Patents

Method and apparatus for cleaning up files in cache Download PDF

Info

Publication number
CN104978152A
CN104978152A CN201510389129.0A CN201510389129A CN104978152A CN 104978152 A CN104978152 A CN 104978152A CN 201510389129 A CN201510389129 A CN 201510389129A CN 104978152 A CN104978152 A CN 104978152A
Authority
CN
China
Prior art keywords
file
buffer memory
clearance
scan
storer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510389129.0A
Other languages
Chinese (zh)
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 Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510389129.0A priority Critical patent/CN104978152A/en
Publication of CN104978152A publication Critical patent/CN104978152A/en
Pending legal-status Critical Current

Links

Abstract

The present invention discloses a method and apparatus for cleaning up files in a cache. The method comprises: acquiring filtering rules for carrying out file cleanup from a server so as to carry out storage; scanning folders in the cache and determining folders to be cleaned up; according to the filtering rules, filtering files in the folders to be cleaned up, which do not need to be cleaned up; and cleaning up the rest of files in the filtered folders to be cleaned up. The method solves the problem that when the folders comprise the files which do not need to be cleaned up, the folders are retained and are not cleaned up, so that the cache is incompletely cleaned up; and the method obtains the beneficial effects of saving cache resources, improving device performance and avoiding the files being deleted by mistake.

Description

The method of buffer memory file cleaning and device
Technical field
The present invention relates to field of computer technology, be specifically related to method and the device of the cleaning of a kind of buffer memory file.
Background technology
When application runs in a device, some garbage files can be produced in the buffer.Along with in equipment, application is more and more, and in buffer memory, garbage files also increases thereupon.Therefore, need to provide a kind of technology of clearing up garbage files in buffer memory, discharge the cache resources taken by garbage files, improve equipment performance.
In prior art, the technology of carrying out cache cleaner comprises: scan buffer memory, in units of file, when file file is all the garbage files needing cleaning, Delete Folder, when file comprises the file not needing to clear up, reserved folder, does not clear up.
The defect of prior art is, when file comprises the file not needing to clear up, reserved folder, does not clear up, and makes cache cleaner not thorough, causes equipment cache resources to waste.
Summary of the invention
In view of the above problems, propose the present invention in case provide a kind of overcome the problems referred to above or solve the problem at least in part buffer memory file cleaning method and device.
According to one aspect of the present invention, provide the method for a kind of buffer memory file cleaning, the method comprises:
Carry out file clean-up filtering rule used from server acquisition to store;
Buffer memory file folder is scanned, determines file for clearance;
From file for clearance, not cleaned file is filtered out according to filtering rule; And
Clear up remaining file in the file for clearance after filtration.
Alternatively, described folder buffer memory file is scanned, and determines file for clearance, specifically comprises:
Use default regular expression to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
Alternatively, described method also comprises:
After file clean-up completes in the buffer, the storer file except buffer memory is scanned, determines file for clearance;
File for clearance in storer is cleared up.
Alternatively, described storer file except buffer memory to be scanned, specifically comprises:
For the external storage file except buffer memory, the file filter of being specified by blacklist is fallen and does not scan.
Alternatively, described blacklist comprises: size exceedes the file of predetermined threshold value.
Alternatively, described storer file except buffer memory to be scanned, specifically comprises:
Use C language to create the class operated Java file, use the storer file of class scanning except buffer memory created.
Alternatively, the described storer file of class scanning except buffer memory using establishment, specifically comprises:
The class created is used to judge whether filename length exceedes pre-set length threshold;
When filename length exceedes pre-set length threshold, skip filename respective file and do not scan;
When filename length does not exceed pre-set length threshold, scanning document name respective file.
According to a further aspect in the invention, provide the device of a kind of buffer memory file cleaning, this device comprises:
Memory module, is suitable for carrying out file clean-up filtering rule used from server acquisition and stores;
Scan module, is suitable for scanning buffer memory file folder, determines file for clearance;
Filtering module, is suitable for from file for clearance, filtering out not cleaned file according to filtering rule; And
Cleaning module, is suitable for remaining file in the file for clearance after to filtration and clears up.
Alternatively, described memory module, is also suitable for preserving the regular expression preset in this locality;
Described scan module, is specifically suitable for using the regular expression preset to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
Alternatively, described scan module, is also suitable for after file clean-up completes in the buffer, scanning, determine file for clearance to the storer file except buffer memory;
Described cleaning module, is also suitable for clearing up file for clearance in storer.
Alternatively, described scan module, is specifically suitable for, for the external storage file except buffer memory, being fallen by the file filter of being specified by blacklist and not scanning.
Alternatively, described blacklist comprises: size exceedes the file of predetermined threshold value.
Alternatively, described scan module, is specifically suitable for using C language to create the class operated Java file, uses the storer file of class scanning except buffer memory created.
Alternatively, described scan module, specifically comprises:
Judge submodule, be suitable for using the class created to judge whether filename length exceedes pre-set length threshold;
Scanning submodule, is suitable for when filename length exceedes pre-set length threshold, skips filename respective file and do not scan; When filename length does not exceed pre-set length threshold, scanning document name respective file.
According to the technology of buffer memory file cleaning of the present invention, file clean-up filtering rule used can be carried out from server acquisition and store; Buffer memory file folder is scanned, determines file for clearance; From file for clearance, not cleaned file is filtered out according to filtering rule; And clear up remaining file in the file for clearance after filtration.Solve thus when file comprises the file not needing to clear up, reserved folder, does not clear up, and makes the halfway problem of cache cleaner, achieves saving cache resources, improves equipment performance, and avoids file by the beneficial effect deleted by mistake.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the process flow diagram of the method for buffer memory file cleaning according to an embodiment of the invention;
Fig. 2 shows the process flow diagram of the method for buffer memory file cleaning according to an embodiment of the invention;
Fig. 3 shows the process flow diagram of the process of swept memory file according to an embodiment of the invention;
Fig. 4 shows the process flow diagram of the method for buffer memory file cleaning according to an embodiment of the invention;
Fig. 5 shows the structural drawing of the device of buffer memory file cleaning according to an embodiment of the invention; And
Fig. 6 shows the structural drawing of the device of buffer memory file cleaning according to an embodiment of the invention.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Fig. 1 shows the process flow diagram of the method for buffer memory file cleaning according to an embodiment of the invention.The method can be used for various terminal device, such as PC (PC), intelligent mobile terminal etc.As shown in Figure 1, the method comprises the steps S110-S140.
In step s 110, carry out file clean-up filtering rule used from server acquisition to store.
For example, terminal device is connected with Cloud Server by wired or wireless network, from Cloud Server, download filtering rule, and filtering rule is stored into this locality.
Server receives user feeds back, and according to user feedback amendment filtering rule, upgrades filtering rule.
After filtering rule is updated, server can issue the filtering rule after renewal to terminal device.Filtering rule after the renewal that terminal device reception server issues.
On the other hand, terminal device also regularly can send inquiry request to server; After server receives inquiry request, whether inquiry has the filtering rule of renewal, and when having the filtering rule of renewal, server sends the filtering rule upgraded to terminal device; The filtering rule of the renewal that terminal device reception server sends.
Wherein, filtering rule can comprise: filtered out by downloading map data, makes the rule that downloading map data is not cleaned; Application icon file filter is fallen, makes the rule that application icon file is not cleaned; Cause the file filter of program crashing to fall by after deletion, make the rule that this program is not cleaned.
In one embodiment, the filtering rule obtained from server is encrypt file, after encrypt file deciphering, obtains the rear file of deciphering, is stored by the file of deciphering.
In the step s 120, buffer memory file folder is scanned, determines file for clearance.
For example, according to default scanning rule, buffer memory file folder is scanned.Preset scanning rule and comprise the file matching condition corresponding with the file that needs are cleared up, use this file matching condition to check file, when file meets file matching condition, determine that this file is file for clearance.Such as, file matching condition can be Folder Name matching condition, also can be folder path matching condition.When Folder Name meets file matching condition, determine that this file is file for clearance; When folder path meets file matching condition, determine that this file is file for clearance.
In one embodiment, described folder buffer memory file is scanned, and determines file for clearance, specifically comprises: use the regular expression preset to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
Use regular expression to represent file matching condition in the present embodiment, will meet the file of regular expression rule, the file namely meeting file matching condition is defined as file for clearance.
In step s 130, which, from file for clearance, not cleaned file is filtered out according to filtering rule.
Filtering rule is used to filter file file for clearance.For example, use filtering rule to be filtered out by downloading map data in file for clearance, make the rule that downloading map data is not cleaned; Use filtering rule to be fallen by application icon file filter in file for clearance, make the rule that application icon file is not cleaned; Use filtering rule to cause the file filter of program crashing to fall after deleting in file for clearance, make the rule that this program is not cleaned.
In step S140, clear up remaining file in the file for clearance after filtration.
Adopt technical scheme in the present embodiment, by filtercondition, file file for clearance is filtered, improve the security of cache cleaner; And when file comprises the file not needing to clear up, this partial document can be retained, and clear up alternative document in file, achieve saving cache resources, improve equipment performance, and avoid file by the beneficial effect deleted by mistake.
In one embodiment, as shown in Figure 2, described method also comprises the steps.
In step S210, after file clean-up completes in the buffer, the storer file except buffer memory is scanned, determines file for clearance.
In step S220, file for clearance in storer is cleared up.
Further, described storer file except buffer memory to be scanned, specifically comprise: for the external storage file except buffer memory, the file filter of being specified by blacklist is fallen and does not scan.
Wherein, blacklist can comprise: size exceedes the file of predetermined threshold value.
For example, except scanning buffer memory, in cleaning buffer memory outside garbage files, scan full hard disk can also be carried out to storer, garbage files in cleanup memory (such as SD card).Because the quantity of documents of scan full hard disk is large, easily causes local resource to take too much, blacklist can be stored in this locality, the file that blacklist is specified is not scanned.Such as, blacklist comprises the file that size exceedes predetermined threshold value, when carrying out scan full hard disk, size is exceeded to the file of predetermined threshold value, as installation kit file, video file etc., does not clear up.
So, by using blacklist to make not scan large files, scan full hard disk efficiency can be improved.
In one embodiment, described storer file except buffer memory to be scanned, specifically comprise: use C language to create the class operated Java file, use the class created to scan storer file except buffer memory.
Further, as shown in Figure 3, the described storer file of class scanning except buffer memory using establishment, specifically comprises the steps.
In step S310, the class created is used to judge whether filename length exceedes pre-set length threshold.
In step s 320, when filename length exceedes pre-set length threshold, skip filename respective file and do not scan.
In step S330, when filename length does not exceed pre-set length threshold, scanning document name respective file.
For example, pre-set length threshold is 150 bytes, the class created is used to judge that whether filename length is more than 150 bytes, when filename length exceedes pre-set length threshold, skip filename respective file not scan, so, can avoid because filename is long, and cause system crash in scanning process.
By using C language to create the class operated Java file, using the storer file of class scanning except buffer memory created, so, bottom C language can be used to carry out file scan, improve file extraction efficiency.Further, use the class created can carry out various operation in file scan process, increase the dirigibility to file scan.
Fig. 4 shows the process flow diagram of the method for buffer memory file cleaning according to an embodiment of the invention.The method can be used for various terminal device, such as PC (PC), intelligent mobile terminal etc.As shown in Figure 4, the method comprises the steps.
In step S402, carry out file clean-up filtering rule used from server acquisition and store.
In step s 404, use default regular expression to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
In step S406, from file for clearance, filter out not cleaned file according to filtering rule.
In step S408, clear up remaining file in the file for clearance after filtration.
In step S410, C language is used to create the class operated Java file.
In step S412, for except buffer memory external storage in not by the file that blacklist is specified, use create class judge whether filename length exceedes pre-set length threshold.
Wherein, blacklist can comprise: size exceedes the file of predetermined threshold value.
In step S414, when filename length exceedes pre-set length threshold, skip filename respective file and do not scan.
In step S416, when filename length does not exceed pre-set length threshold, scanning document name respective file, determines file for clearance.
In step S418, clear up except file for clearance in the external storage of buffer memory.
The exemplary that above are only the method for buffer memory file of the present invention cleaning illustrates, the present invention is not limited thereto.All do within spirit of the present invention or principle any amendment, equivalent replacement, improvement etc., be all included in protection scope of the present invention.
Fig. 5 shows the structural drawing of the device of buffer memory file cleaning according to an embodiment of the invention.This device can be used for various terminal device, such as PC (PC), intelligent mobile terminal etc.As shown in Figure 5, this device comprises as lower module.
Memory module 510, is suitable for carrying out file clean-up filtering rule used from server acquisition and stores;
Scan module 520, is suitable for scanning buffer memory file folder, determines file for clearance;
Filtering module 530, is suitable for from file for clearance, filtering out not cleaned file according to filtering rule; And
Cleaning module 540, is suitable for remaining file in the file for clearance after to filtration and clears up.
For example, terminal device is connected with Cloud Server by wired or wireless network, and memory module 510 downloads filtering rule from Cloud Server, and filtering rule is stored into this locality.
Server receives user feeds back, and according to user feedback amendment filtering rule, upgrades filtering rule.
After filtering rule is updated, server can issue the filtering rule after renewal to terminal device.Filtering rule after the renewal that the server of reception issues by memory module 510.
On the other hand, memory module 510 also regularly can send inquiry request to server; After server receives inquiry request, whether inquiry has the filtering rule of renewal, and when having the filtering rule of renewal, server sends the filtering rule upgraded to terminal device; The filtering rule of the renewal that memory module 510 reception server sends.
Wherein, filtering rule can comprise: filtered out by downloading map data, makes the rule that downloading map data is not cleaned; Application icon file filter is fallen, makes the rule that application icon file is not cleaned; Cause the file filter of program crashing to fall by after deletion, make the rule that this program is not cleaned.
In one embodiment, the filtering rule that memory module 510 obtains from server is encrypt file, after encrypt file deciphering, obtains the rear file of deciphering, is stored by the file of deciphering.
Scan module 520 scans buffer memory file folder according to default scanning rule.Preset scanning rule and comprise the file matching condition corresponding with the file that needs are cleared up, scan module 520 uses this file matching condition to check file, when file meets file matching condition, determine that this file is file for clearance.Such as, file matching condition can be Folder Name matching condition, also can be folder path matching condition.When Folder Name meets file matching condition, scan module 520 determines that this file is file for clearance; When folder path meets file matching condition, scan module 520 determines that this file is file for clearance.
Filtering module 530 uses filtering rule to filter file file for clearance.For example, filtering module 530 uses filtering rule to be filtered out by downloading map data in file for clearance, makes the rule that downloading map data is not cleaned; Use filtering rule to be fallen by application icon file filter in file for clearance, make the rule that application icon file is not cleaned; Use filtering rule to cause the file filter of program crashing to fall after deleting in file for clearance, make the rule that this program is not cleaned.
Adopt technical scheme in the present embodiment, by filtercondition, file file for clearance is filtered, improve the security of cache cleaner; And when file comprises the file not needing to clear up, this partial document can be retained, and clear up alternative document in file, achieve saving cache resources, improve equipment performance, and avoid file by the beneficial effect deleted by mistake.
In one embodiment, memory module 510, is also suitable for preserving the regular expression preset in this locality;
Scan module 520, is specifically suitable for using the regular expression preset to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
Use regular expression to represent file matching condition in the present embodiment, will meet the file of regular expression rule, the file namely meeting file matching condition is defined as file for clearance.
In one embodiment, scan module 520, is also suitable for after file clean-up completes in the buffer, scanning, determine file for clearance to the storer file except buffer memory;
Cleaning module 540, is also suitable for clearing up file for clearance in storer.
Further, scan module 520, is specifically suitable for, for the external storage file except buffer memory, being fallen by the file filter of being specified by blacklist and not scanning.
Wherein, blacklist comprises: size exceedes the file of predetermined threshold value.
Further, scan module 520, is specifically suitable for using C language to create the class operated Java file, uses the storer file of class scanning except buffer memory created.
For example, scan module 520 makes cleaning module 540 clear up in buffer memory except garbage files except carrying out scanning to buffer memory, can also carry out scan full hard disk make garbage files in cleaning module 540 cleanup memory (such as SD card) to storer.Because the quantity of documents of scan full hard disk is large, easily cause local resource to take too much, can store blacklist in this locality, the file that scan module 520 pairs of blacklists are specified does not scan.Such as, blacklist comprises the file that size exceedes predetermined threshold value, when scan module 520 carries out scan full hard disk, size is exceeded to the file of predetermined threshold value, as installation kit file, video file etc., does not scan.
So, by using blacklist to make not scan large files, scan full hard disk efficiency can be improved.
As shown in Figure 6, scan module 520, specifically comprises:
Judge submodule 522, be suitable for using the class created to judge whether filename length exceedes pre-set length threshold;
Scanning submodule 524, is suitable for when filename length exceedes pre-set length threshold, skips filename respective file and do not scan; When filename length does not exceed pre-set length threshold, scanning document name respective file.
For example, pre-set length threshold is 150 bytes, judge that submodule 522 uses the class created to judge that whether filename length is more than 150 bytes, scanning submodule 524 is when filename length exceedes pre-set length threshold, skip filename respective file not scan, so, can avoid because filename is long, and cause system crash in scanning process.
By using C language to create the class operated Java file, using the storer file of class scanning except buffer memory created, so, bottom C language can be used to carry out file scan, improve file extraction efficiency.Further, use the class created can carry out various operation in file scan process, increase the dirigibility to file scan.
The exemplary illustration of said apparatus, see the detailed description of corresponding part in said method, does not repeat them here.
The invention discloses following technical characteristic.
The method of A1, a kind of buffer memory file cleaning, the method comprises:
Carry out file clean-up filtering rule used from server acquisition to store;
Buffer memory file folder is scanned, determines file for clearance;
From file for clearance, not cleaned file is filtered out according to filtering rule; And
Clear up remaining file in the file for clearance after filtration.
A2, method according to A1, wherein, describedly to scan buffer memory file folder, determine file for clearance, specifically comprise:
Use default regular expression to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
A3, method according to A1, wherein, described method also comprises:
After file clean-up completes in the buffer, the storer file except buffer memory is scanned, determines file for clearance;
File for clearance in storer is cleared up.
A4, method according to A3, wherein, describedly to scan the storer file except buffer memory, specifically comprise:
For the external storage file except buffer memory, the file filter of being specified by blacklist is fallen and does not scan.
A5, method according to A1, wherein, described blacklist comprises: size exceedes the file of predetermined threshold value.
A6, method according to A1, wherein, describedly to scan the storer file except buffer memory, specifically comprise:
Use C language to create the class operated Java file, use the storer file of class scanning except buffer memory created.
A7, method according to A6, wherein, describedly use the storer file of class scanning except buffer memory created, specifically comprise:
The class created is used to judge whether filename length exceedes pre-set length threshold;
When filename length exceedes pre-set length threshold, skip filename respective file and do not scan;
When filename length does not exceed pre-set length threshold, scanning document name respective file.
The device of B8, a kind of buffer memory file cleaning, this device comprises:
Memory module, is suitable for carrying out file clean-up filtering rule used from server acquisition and stores;
Scan module, is suitable for scanning buffer memory file folder, determines file for clearance;
Filtering module, is suitable for from file for clearance, filtering out not cleaned file according to filtering rule; And
Cleaning module, is suitable for remaining file in the file for clearance after to filtration and clears up.
B9, device according to B8, wherein, described memory module, is also suitable for preserving the regular expression preset in this locality;
Described scan module, is specifically suitable for using the regular expression preset to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
B10, device according to B8, wherein, described scan module, is also suitable for after file clean-up completes in the buffer, scanning, determine file for clearance to the storer file except buffer memory;
Described cleaning module, is also suitable for clearing up file for clearance in storer.
B11, device according to B10, wherein, described scan module, is specifically suitable for, for the external storage file except buffer memory, being fallen by the file filter of being specified by blacklist and not scanning.
B12, device according to B8, wherein, described blacklist comprises: size exceedes the file of predetermined threshold value.
B13, device according to B8, wherein, described scan module, is specifically suitable for using C language to create the class operated Java file, uses the class created to scan storer file except buffer memory.
B14, device according to B13, wherein, described scan module, specifically comprises:
Judge submodule, be suitable for using the class created to judge whether filename length exceedes pre-set length threshold;
Scanning submodule, is suitable for when filename length exceedes pre-set length threshold, skips filename respective file and do not scan; When filename length does not exceed pre-set length threshold, scanning document name respective file.
It should be noted that:
Intrinsic not relevant to any certain computer, virtual bench or miscellaneous equipment with display at this algorithm provided.Various fexible unit also can with use based on together with this teaching.According to description above, the structure constructed required by this kind of device is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize the some or all parts in the equipment cleared up according to the buffer memory file of the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.

Claims (10)

1. a method for buffer memory file cleaning, the method comprises:
Carry out file clean-up filtering rule used from server acquisition to store;
Buffer memory file folder is scanned, determines file for clearance;
From file for clearance, not cleaned file is filtered out according to filtering rule; And
Clear up remaining file in the file for clearance after filtration.
2. method according to claim 1, wherein, described folder buffer memory file is scanned, and determines file for clearance, specifically comprises:
Use default regular expression to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
3. method according to claim 1, wherein, described method also comprises:
After file clean-up completes in the buffer, the storer file except buffer memory is scanned, determines file for clearance;
File for clearance in storer is cleared up.
4. method according to claim 3, wherein, describedly to scan the storer file except buffer memory, specifically comprises:
For the external storage file except buffer memory, the file filter of being specified by blacklist is fallen and does not scan.
5. method according to claim 1, wherein, described blacklist comprises: size exceedes the file of predetermined threshold value.
6. method according to claim 1, wherein, describedly to scan the storer file except buffer memory, specifically comprises:
Use C language to create the class operated Java file, use the storer file of class scanning except buffer memory created.
7. method according to claim 6, wherein, the described storer file of class scanning except buffer memory using establishment, specifically comprises:
The class created is used to judge whether filename length exceedes pre-set length threshold;
When filename length exceedes pre-set length threshold, skip filename respective file and do not scan;
When filename length does not exceed pre-set length threshold, scanning document name respective file.
8. a device for buffer memory file cleaning, this device comprises:
Memory module, is suitable for carrying out file clean-up filtering rule used from server acquisition and stores;
Scan module, is suitable for scanning buffer memory file folder, determines file for clearance;
Filtering module, is suitable for from file for clearance, filtering out not cleaned file according to filtering rule; And
Cleaning module, is suitable for remaining file in the file for clearance after to filtration and clears up.
9. device according to claim 8, wherein, described memory module, is also suitable for preserving the regular expression preset in this locality;
Described scan module, is specifically suitable for using the regular expression preset to scan buffer memory file folder, the file meeting regular expression rule is defined as file for clearance.
10. device according to claim 8, wherein, described scan module, is also suitable for after file clean-up completes in the buffer, scanning, determine file for clearance to the storer file except buffer memory;
Described cleaning module, is also suitable for clearing up file for clearance in storer.
CN201510389129.0A 2015-07-03 2015-07-03 Method and apparatus for cleaning up files in cache Pending CN104978152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510389129.0A CN104978152A (en) 2015-07-03 2015-07-03 Method and apparatus for cleaning up files in cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510389129.0A CN104978152A (en) 2015-07-03 2015-07-03 Method and apparatus for cleaning up files in cache

Publications (1)

Publication Number Publication Date
CN104978152A true CN104978152A (en) 2015-10-14

Family

ID=54274698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510389129.0A Pending CN104978152A (en) 2015-07-03 2015-07-03 Method and apparatus for cleaning up files in cache

Country Status (1)

Country Link
CN (1) CN104978152A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460669A (en) * 2017-09-06 2019-03-12 北京国双科技有限公司 A kind of file filter method and device based on Spark
CN110019033A (en) * 2017-09-21 2019-07-16 北京金山安全软件有限公司 Junk feature acquisition method and device, server and readable storage medium
WO2019196287A1 (en) * 2018-04-10 2019-10-17 平安科技(深圳)有限公司 Cache clearing method, device, computer device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102654872A (en) * 2011-03-03 2012-09-05 腾讯科技(深圳)有限公司 Method and device for cleaning junk files generated by application programs
CN103761306A (en) * 2014-01-22 2014-04-30 深圳市欧珀通信软件有限公司 Smart terminal file cleaning method and device
CN104317628A (en) * 2014-11-13 2015-01-28 北京奇虎科技有限公司 Mobile terminal and storage space cleaning method thereof
CN104317740A (en) * 2014-11-13 2015-01-28 北京奇虎科技有限公司 Method and device for cleaning cache directory/document based on sandbox technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102654872A (en) * 2011-03-03 2012-09-05 腾讯科技(深圳)有限公司 Method and device for cleaning junk files generated by application programs
CN103761306A (en) * 2014-01-22 2014-04-30 深圳市欧珀通信软件有限公司 Smart terminal file cleaning method and device
CN104317628A (en) * 2014-11-13 2015-01-28 北京奇虎科技有限公司 Mobile terminal and storage space cleaning method thereof
CN104317740A (en) * 2014-11-13 2015-01-28 北京奇虎科技有限公司 Method and device for cleaning cache directory/document based on sandbox technology

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460669A (en) * 2017-09-06 2019-03-12 北京国双科技有限公司 A kind of file filter method and device based on Spark
CN110019033A (en) * 2017-09-21 2019-07-16 北京金山安全软件有限公司 Junk feature acquisition method and device, server and readable storage medium
WO2019196287A1 (en) * 2018-04-10 2019-10-17 平安科技(深圳)有限公司 Cache clearing method, device, computer device, and storage medium

Similar Documents

Publication Publication Date Title
CN103176828A (en) Method and device of deleting application program residual files
CN104809198A (en) Picture cleanup method, picture cleanup device and terminal device
CN104021159B (en) Client file cleaning method and device
CN104021160B (en) Client data cleaning method and device
CN104461504A (en) Managing method of terminal application program
CN104331376B (en) The method for cleaning and device of the installation kit stored in mobile terminal
CN102917057B (en) Personalized application supplying system and method
CN104951507A (en) Method and device for clearing up files in mobile terminal applications
CN105045631A (en) Method and device for upgrading client-side applications
CN103645914A (en) Software cleaning method and device
CN107016123B (en) File management method and terminal device
CN104978152A (en) Method and apparatus for cleaning up files in cache
CN103631603A (en) Software cleaning method and system
CN105049514A (en) File downloading method and file downloading device
CN110647502A (en) File loading method, equipment, device and computer storage medium
CN104468774A (en) Data presentation method applied to could disk client side and could disk client side
CN104461505A (en) Terminal
CN105447167A (en) Processing method and apparatus for node cache data in distributed system
EP2523103A1 (en) Stabilized binary differencing
CN106557500B (en) Method and device for cleaning uninstalled residual file and terminal
CN104461556A (en) Plugin processing method, client side and cloud server
CN104602104A (en) Cache file processing method and digital TV terminal
CN103473350A (en) File processing method and equipment
CN104504113A (en) Method and device for processing information by mobile browser and mobile terminal
CN105354229A (en) Information processing method and electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20151014

RJ01 Rejection of invention patent application after publication