Embodiment
Technical scheme in the embodiment of the present invention is understood better in order to make those skilled in the art person, and enable the above-mentioned purpose of the embodiment of the present invention, feature and advantage become apparent more, below in conjunction with accompanying drawing, technical scheme in the embodiment of the present invention is described in further detail.
Fig. 1 is the process flow diagram of file scanning method first embodiment in mobile terminal storage space of the present invention.As shown in Figure 1, the flow process of the file scanning method in the present embodiment mobile terminal storage space specifically comprises the steps:
Step 101, in the process that storage space is scanned, obtain the routing information of file of Current Scan.
In the present embodiment, the routing information of file can be the information such as file store path, file name or file layout, by store path, the information such as file name or file layout of file, quantity and the mean value of son file in the kind of file, file can be known, or know in file whether store total description document etc.Such as, total description document can for being stored in the Journal son file in file.Wherein, the kind of file can comprise APK installation kit, syslog file, or large files etc.Such as, syslog file and APK installation kit are stored in different files usually, so syslog file is different with the store path of APK installation kit, therefore, can know that this file is APK file or syslog file etc. according to the store path of file.In actual applications, be large files by the document definition being greater than 10M usually.
In this step, after obtaining the routing information of file, step 102 is entered.
Step 102, in scanning strategy database, search respective scanned strategy according to the routing information of file.
In the present embodiment, when the file of scanning mobile terminal, the scanning software in mobile terminal determines different scanning strategies according to the routing information of file.Scanning strategy in the present embodiment can comprise: total scanning strategy of description document, the scanning strategy of file size mean value and skip the scanning strategy of scanning.
After searching respective scanned strategy according to the routing information of file in scanning strategy database, enter step 103.
The scanning strategy that step 103, basis find determines the scanning result of file.
In the present embodiment, the scanning strategy of description document specifically comprises: search and total description document under resolving catalogue, according to the size of each file recorded in total description document, calculate the scanning result of size as file of catalogue file, total description document is generally Journal file.
The scanning strategy of file size mean value specifically comprises: according to scanning strategy, after obtaining the sum of file under catalogue, by the product of sum with file size mean value, as the scanning result of file.If according to scanning result, determine that the quantity of documents under catalogue exceedes setting threshold value, and the variance of the size of each file is in setting range, the then file size mean value of calculation document, and using the file size mean value that the calculates scanning strategy as file, with the routing information corresponding stored of file in scanning strategy database, thus while raising scan efficiency, also scanning accuracy can be improved.
In the present embodiment, in the process that storage space is scanned, obtain the routing information of the file of Current Scan, routing information according to file searches respective scanned strategy in scanning strategy database, the scanning result of file is determined according to the scanning strategy found, realize adopting different scanning strategies according to different routing informations, avoid scanning files all in SD card or buffer memory and the problem causing scan efficiency low, thus improve sweep velocity, the scanning improving user is experienced.
Fig. 2 is the process flow diagram of file scanning method second embodiment in mobile terminal storage space of the present invention, Fig. 3 is the first scanning interface schematic diagram of mobile terminal in the present embodiment, Fig. 4 is the second scanning interface schematic diagram of mobile terminal in the present embodiment, and Fig. 5 is the second scanning interface schematic diagram of mobile terminal in the present embodiment.As shown in Figure 2, the flow process of the file scanning method in the present embodiment mobile terminal storage space specifically comprises the steps:
Step 201, receive ff instruction after, determine the type of the file involved by ff instruction.
In this step, after receiving ff instruction, the scanning strategy that the type of locating file is corresponding in scanning strategy database, according to the routing information of file, starts a scanning element corresponding in scanning software.In this step, scanning strategy is specially the scanning strategy skipping scanning, skip the scanning to the file involved by scanning strategy corresponding to the type of file, such as, for the type of APK file, the catalogue involved by scanning strategy that the type of APK file is corresponding comprises: system directory, size exceed the catalogue of capping.Retrieve in SD card in the scanning process of APK file or syslog file, in the large files such as electronic chart, APK file or syslog file can not be stored, so do not go to scan the large files such as these electronic charts, to improve scan efficiency.
After the type determining the file involved by ff instruction, enter step 202.
Step 202, in the process that storage space is scanned, obtain the routing information of file of Current Scan.
In the present embodiment, the routing information of file can be the information such as file store path, file name or file layout, by store path, the information such as file name or file layout of file, quantity and the mean value of son file in the kind of file, file can be known, or know in file and whether store total description document etc., such as, total description document can for being stored in the Journal son file in file.Wherein, the kind of file can comprise APK installation kit, syslog file, or large files etc.Such as, syslog file and APK installation kit are stored in different files usually, so syslog file is different with the store path of APK installation kit, therefore, can know that this file is APK file or syslog file etc. according to the store path of file.
In this step, after obtaining the routing information of file, step 203 is entered.
Step 203, in scanning strategy database, search respective scanned strategy according to the routing information of file.
In the present embodiment, when the file of scanning mobile terminal, the scanning software in mobile terminal determines different scanning strategies according to the routing information of file, adopts different scanning strategies, while raising file scan efficiency, file scan accuracy rate can be guaranteed.Scanning strategy can comprise: total scanning strategy of description document, the scanning strategy of file size mean value and skip the scanning strategy of scanning.After searching respective scanned strategy according to the routing information of file in scanning strategy database, enter step 204.
The scanning strategy that step 204, basis find determines the scanning result of file.
In the present embodiment, the scanning strategy of description document specifically comprises: search and total description document under resolving catalogue, according to the size of each file recorded in total description document, calculate the scanning result of size as file of file.
The scanning strategy of file size mean value specifically comprises: according to scanning strategy, after obtaining the sum of file under catalogue, by the product of sum with file size mean value, as the scanning result of file.If according to scanning result, determine that the quantity of documents under catalogue exceedes setting threshold value, and the variance of the size of each file is in setting range, the then file size mean value of calculation document, and using the file size mean value that the calculates scanning strategy as file, with the routing information corresponding stored of file in scanning strategy database, thus while raising scan efficiency, also scanning accuracy can be improved.
In actual applications, as shown in Figure 3, in display interface, show the scanning result of above-mentioned steps, scanning result at least comprises the data of a kind: memory file, data cached, system disk garbage files, promotional literature, installation kit file, unloading Stub File, large files etc.In display interface, show file of all categories, so that user clearly distinguishes the information such as the size of the file of the storage spaces such as SD card or internal memory, Consumer's Experience can be improved.If user needs to clear up all files or partial document that scan, then can select " a key cleaning ".
Further, on display interface as shown in Figure 4, receive a kind the file scanned " expansion " button click after, show the relevant information of each son file under such other file; Wherein, the relevant information of son file comprises: the title of son file, take size and choose state.
On display interface as shown in Figure 5, also can the garbage files that goes out of a reading scan in display interface, " internal memory rubbish " represents the garbage files of internal memory, and " 204MB " represents the size of the garbage files scanned; " buffer memory rubbish " represents the garbage files of the nonvolatile storage space such as SD card, and " 91.4MB " represents the size of the garbage files of the nonvolatile storage space such as the SD card scanned.If user needs to clear up all files or partial document that scan, then user can select " key a cleaning.
In the present embodiment, after receiving ff instruction, determine the type of the file involved by ff instruction, in the process that storage space is scanned, obtain the routing information of the file of Current Scan, routing information according to file searches respective scanned strategy in scanning strategy database, the scanning result of file is determined according to the scanning strategy found, realize adopting different scanning strategies according to different routing informations, avoid scanning files all in SD card or buffer memory and the problem causing scan efficiency low, thus improve sweep velocity, the scanning improving user is experienced.
Fig. 6 is the structural representation of file scanning device first embodiment in mobile terminal storage space of the present invention.As shown in Figure 6, file scanning device in the present embodiment mobile terminal storage space comprises: routing information acquisition module 601, search module 602 and scanning result determination module 603, wherein, routing information acquisition module 601, in the process scanned storage space, obtains the routing information of the file of Current Scan; Search module 602 and in scanning strategy database, search respective scanned strategy for the routing information according to file; Scanning result determination module 603 is for determining the scanning result of file according to the scanning strategy found.
In the present embodiment, in the process that storage space is scanned, routing information acquisition module obtains the routing information of the file of Current Scan, search module and in scanning strategy database, search respective scanned strategy according to the routing information of file, scanning result determination module determines the scanning result of file according to the scanning strategy found, realize adopting different scanning strategies according to different routing informations, avoid scanning files all in SD card or buffer memory and the problem causing scan efficiency low, thus improve sweep velocity, the scanning improving user is experienced.
Fig. 7 is the structural representation of file scanning device second embodiment in mobile terminal storage space of the present invention.As shown in Figure 7, file scanning device in the present embodiment mobile terminal storage space comprises: scanning software 604, scanning software 604 is for after receiving ff instruction, determine the type of the file involved by ff instruction, and in scanning strategy database, search scanning strategy corresponding to type; The scanning strategy of scanning result determination module specifically also comprises: skip scanning; When scanning storage space, scan method comprises: skip the scanning to the file involved by scanning strategy corresponding to type.
Further, the scanning strategy of scanning result determination module 603 is specially: resolve total description document.Scanning result determination module 603 determines the scanning result of file according to the scanning strategy found, specifically comprise: according to scanning strategy, search and total description document under resolving catalogue, according to the size of each file recorded in total description document, calculate the scanning result of size as described file of file.
The scanning strategy of scanning result determination module 603 is specially: file size mean value; Scanning result determination module 603 determines the scanning result of described file according to the scanning strategy found, specifically comprise: according to scanning strategy, after obtaining the sum of file under described catalogue, by the product of described sum and described file size mean value, as the scanning result of file.
Scanning result determination module 603 also for: if according to scanning result, determine that the quantity of documents under catalogue exceedes setting threshold value, and the variance of the size of each file is in setting range, the then file size mean value of calculation document, and using the file size mean value that the calculates scanning strategy as file, with the routing information corresponding stored of file in scanning strategy database.
In the process that storage space is scanned, after scanning software receives ff instruction, determine the type of the file involved by ff instruction, and in scanning strategy database, search scanning strategy corresponding to type, routing information acquisition module obtains the routing information of the file of Current Scan, search module and in scanning strategy database, search respective scanned strategy according to the routing information of file, scanning result determination module determines the scanning result of file according to the scanning strategy found, realize adopting different scanning strategies according to different routing informations, avoid scanning files all in SD card or buffer memory and the problem causing scan efficiency low, thus improve sweep velocity, the scanning improving user is experienced.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is that the hardware that can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, this program perform time, step comprising embodiment of the method one or a combination set of.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing module, also can be that the independent physics of unit exists, also can be integrated in a module by two or more unit.Above-mentioned integrated module both can adopt the form of hardware to realize, and the form of software function module also can be adopted to realize.If described integrated module using the form of software function module realize and as independently production marketing or use time, also can be stored in a computer read/write memory medium.
The above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The above is only some embodiments of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.