CN105224356A - Directory clearing method and device and mobile terminal - Google Patents
Directory clearing method and device and mobile terminal Download PDFInfo
- Publication number
- CN105224356A CN105224356A CN201510544122.1A CN201510544122A CN105224356A CN 105224356 A CN105224356 A CN 105224356A CN 201510544122 A CN201510544122 A CN 201510544122A CN 105224356 A CN105224356 A CN 105224356A
- Authority
- CN
- China
- Prior art keywords
- catalogue
- result
- class
- directory
- directory name
- 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.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The embodiment of the invention discloses a directory clearing method, a directory clearing device and a mobile terminal, wherein the method comprises the following steps: acquiring all first-level directories under a self system storage directory; judging whether an application program corresponding to the primary catalog is installed in the mobile terminal or not aiming at each primary catalog in all the obtained primary catalogs; if not, the directory name of the primary directory is sent to the server; receiving a first result or a second result fed back by the server; under the condition of receiving the first result, executing clearing operation corresponding to the directory clearing type carried in the first result on the primary directory; and in the case of receiving the second result, clearing the primary directory according to a preset filtering condition. By applying the embodiment of the invention, the occupation of the storage space of the mobile terminal is reduced, and the directory clearing efficiency is improved.
Description
Technical field
The present invention relates to technical field of mobile terminals, particularly a kind of catalogue sweep-out method, device and mobile terminal.
Background technology
Mobile applications, refer to can running of mobile terminal and the software realizing some appellative function is provided to user, such as: mobile phone version antivirus software, mobile phone version chat software etc.
When application program is unloaded, this application catalog in the system storage catalogue that this application program is corresponding can be removed automatically by system, wherein, this system storage catalogue can be for: the andriod/data catalogue corresponding to Android operation system or/andriod/obb catalogue, etc.But under many circumstances, due to system fault or other reasons, cause this application catalog not deleted.In this case, user can utilize installation cleaning software scans system storage catalogue in the terminal usually, thus application catalog residual in the system storage catalogue scanned is cleared up, concrete, cleaning software is when scanning an application catalog, judge whether application program corresponding to this application catalog is installed in mobile terminal, if do not had, then detect the catalogue prestored in cleaning software and remain in storehouse whether there is the directory name corresponding with the directory name of this application catalog, if existed, then remove this application catalog.
But along with the fast development of mobile terminal technology, the application program being applied to mobile terminal also gets more and more, the directory name stored in storehouse is also corresponding to be increased to cause the catalogue of clearing up software to remain, and takies the storage space of mobile terminal; And, the arithmetic capability of mobile terminal has limitation, catalogue along with cleaning software remains the increase of the directory name stored in storehouse, the catalogue detecting cleaning software remains the time also corresponding increase that whether there is the directory name corresponding to the directory name of application catalog in storehouse, and catalogue elimination efficiency is lower.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of catalogue sweep-out method, device and mobile terminal, to reduce taking of mobile terminal storage space, improves catalogue elimination efficiency.
For achieving the above object, the embodiment of the invention discloses a kind of catalogue sweep-out method, being applied to mobile terminal, comprising:
Obtain all first class catalogues in self mobile terminal under system storage catalogue;
For each first class catalogue in obtained all first class catalogues, perform catalogue clear operation respectively, wherein, described catalogue clear operation, comprising:
Judge whether application program corresponding to this first class catalogue is installed in described mobile terminal;
If do not had, then the directory name of this first class catalogue is sent to server, judge to make described server the catalogue self stored remains in storehouse whether there is the directory name identical with the described directory name received, if judged result is yes, determine that the catalogue corresponding to received directory name removes type, the first result is fed back to described mobile terminal device, if judged result is no, the second result is fed back to described mobile terminal, wherein, carry catalogue in described first result and remove type, the information being used to indicate catalogue and not finding is carried in described second result,
Receive described first result of described server feedback or described second result;
When receiving described first result, the catalogue of carrying in described first result being performed to this first class catalogue and removes clear operation corresponding to type;
When receiving described second result, according to predetermined filtercondition, removing process is carried out to this first class catalogue.
Optionally, describedly judge whether application program corresponding to this first class catalogue is installed, comprising in described mobile terminal:
Judge that the application program of described mobile terminal installs the directory name that whether there is this first class catalogue in list, if existed, represent in described mobile terminal and application program corresponding to this first class catalogue is installed.
Optionally, described when receiving described first result, the catalogue of carrying in described first result is performed to this first class catalogue and removes clear operation corresponding to type, comprising:
When receiving entrained catalogue removing type and being the first result of suggestion removing type, the directory name of this first class catalogue being added to suggestion removes in directory listing, after receiving user and removing the clear instruction of the directory name of this first class catalogue in directory listing for suggestion, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result removing type cautiously, the directory name of this first class catalogue is added in prudent removing directory listing, receive user for prudent remove the clear instruction of the directory name of this first class catalogue in directory listing after, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result not removing type, the directory name of this first class catalogue is added to and does not remove in directory listing.
Optionally, described system storage catalogue is the first system storage directory;
Described according to predetermined filtercondition to this first class catalogue carry out removing process, comprising:
Judge whether this first class catalogue meets the first filtercondition preset, if met, then removes this first class catalogue.
Optionally, described the first default filtercondition, comprising:
The first character is there is in directory name, and directory name is not with described first character beginning, and the second character do not existed in directory name in the first default character type, and exist in target designation any one described in first character after the first character be not the three-character doctrine in the second character type of presetting.
Optionally, described the first default filtercondition, comprising:
The application program of described mobile terminal is installed in the application package title stored in list, there is not the prefix of directory name as application package title or the application package title of suffix of this first class catalogue.
Optionally, described the first default filtercondition, comprising:
The sub-directory that last modification time is not more than preset time period is there is not in the next stage sub-directory of this first class catalogue.
Optionally, described the first default filtercondition, comprising:
The catalogue that directory name is predetermined title is there is in the next stage sub-directory of this first class catalogue.
Optionally, described system storage catalogue is second system storage directory;
Described according to predetermined filtercondition to this first class catalogue carry out removing process, comprising:
Judge whether this first class catalogue meets the second filtercondition preset, if met, then removes this first class catalogue.
Optionally, described the second default filtercondition, comprising:
The file that file name meets default regular expression is there is in this first class catalogue.
For achieving the above object, the embodiment of the invention also discloses a kind of catalogue scavenge unit, being applied to mobile terminal, comprising: catalogue obtains module, the first judge module, sending module, receiver module, the first removing module and the second removing module, wherein,
Described catalogue obtains module, for obtaining all first class catalogues in self mobile terminal under system storage catalogue;
Described first judge module, for for each first class catalogue in obtained all first class catalogues, judges whether be provided with application program corresponding to this first class catalogue in described mobile terminal;
Described sending module, for when described first judge module judged result is no, the directory name of this first class catalogue is sent to server, judge to make described server the catalogue self stored remains in storehouse whether there is the directory name identical with the described directory name received, if judged result is yes, determine that the catalogue corresponding to received directory name removes type, the first result is fed back to described mobile terminal device, if judged result is no, the second result is fed back to described mobile terminal, wherein, carry catalogue in described first result and remove type, the information being used to indicate catalogue and not finding is carried in described second result,
Described receiver module, for receiving described first result of described server feedback or described second result;
Described first removes module, for when described receiver module receives described first result, performs the catalogue of carrying in described first result remove clear operation corresponding to type to this first class catalogue;
Described second removes module, for when described receiver module receives described second result, carries out removing process according to predetermined filtercondition to this first class catalogue.
Optionally, described first judge module, specifically for:
Judge that the application program of described mobile terminal installs the directory name that whether there is this first class catalogue in list, if existed, represent in described mobile terminal and application program corresponding to this first class catalogue is installed.
Optionally, described first removes module, specifically for:
When receiving entrained catalogue removing type and being the first result of suggestion removing type, the directory name of this first class catalogue being added to suggestion removes in directory listing, after receiving user and removing the clear instruction of the directory name of this first class catalogue in directory listing for suggestion, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result removing type cautiously, the directory name of this first class catalogue is added in prudent removing directory listing, receive user for prudent remove the clear instruction of the directory name of this first class catalogue in directory listing after, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result not removing type, the directory name of this first class catalogue is added to and does not remove in directory listing.
Optionally, described system storage catalogue is the first system storage directory;
Described second removes module, specifically for:
When described receiver module receives described second result, judge whether this first class catalogue meets the first filtercondition preset, if met, then removes this first class catalogue.
Optionally, described second removes module, comprising: first judges that submodule, second judges that submodule, the 3rd judges that submodule, the 4th judges submodule and removes submodule, wherein,
Described first judges submodule, for when described receiver module receives described second result, judges whether there is the first character in the directory name of this first class catalogue;
Described second judges submodule, for when described first judges submodule judged result for being, judges that whether the directory name of this first class catalogue is with described first character beginning;
Described 3rd judges submodule, for when described second judges that submodule judged result is no, judges whether there is the second character in the first default character type in the directory name of this first class catalogue;
Shown 4th judges submodule, for when the described 3rd judges that submodule judged result is no, judge to exist in the directory name of this first class catalogue any one described in first character after the first character be whether three-character doctrine in default the second character type;
Described removing submodule, for when the described 4th judges that submodule is judged as NO, removes this first class catalogue.
Optionally, described the first default filtercondition, comprising:
The application program of described mobile terminal is installed in the application package title stored in list, there is not the prefix of directory name as application package title or the application package title of suffix of this first class catalogue.
Optionally, described the first default filtercondition, comprising: there is not the sub-directory that last modification time is not more than preset time period in the next stage sub-directory of this first class catalogue.
Optionally, described the first default filtercondition, comprising:
The catalogue that directory name is predetermined title is there is in the next stage sub-directory of this first class catalogue.
Optionally, described system storage catalogue is second system storage directory;
Described second removes module, specifically for:
When described receiver module receives described second result, judge whether this first class catalogue meets the second filtercondition preset, if met, then removes this first class catalogue.
Optionally, described the second default filtercondition, comprising:
The file that file name meets default regular expression is there is in this first class catalogue.
For achieving the above object, the embodiment of the invention discloses a kind of mobile terminal, comprising: processor, storer, communication interface and bus;
Described processor, described storer and described communication interface are connected by described bus and complete mutual communication;
Described storer stores executable programs code;
Described processor runs the program corresponding with described executable program code by reading the executable program code stored in described storer, for any one catalogue sweep-out method that the execution embodiment of the present invention provides.
As seen from the above technical solution, embodiments provide a kind of catalogue sweep-out method and device, be applied to mobile terminal, method comprises: obtain all first class catalogues in self mobile terminal under system storage catalogue; For each first class catalogue in obtained all first class catalogues, judge whether application program corresponding to this first class catalogue is installed in described mobile terminal; If no, the directory name of this first class catalogue is sent to server; Receive the first result or second result of described server feedback; When receiving described first result, the catalogue of carrying in described first result being performed to this first class catalogue and removes clear operation corresponding to type; When receiving described second result, according to predetermined filtercondition, removing process is carried out to this first class catalogue.The technical scheme that the application embodiment of the present invention provides, server stores catalogue remains storehouse, mobile terminal remains storehouse without the need to storage directory again, decrease taking of mobile terminal storage space, and the arithmetic capability of server is better than the arithmetic capability of mobile terminal usually, it is shorter that server detection catalogue remains the time that whether there is the directory name corresponding with the directory name of catalogue in storehouse, improve catalogue elimination efficiency, even if server does not detect the directory name corresponding with the directory name of catalogue, mobile terminal is also without the need to detecting, only need to perform several judgement operation, just can determine whether catalogue is the catalogue needing to remove, when determining that catalogue is the catalogue needing to remove, remove this catalogue, judge the time that the time of operation operates much smaller than detection, determine whether catalogue is need the catalogue removed to expend time in shorter, improve catalogue elimination efficiency, complicated and changeable simultaneously due to directory name, catalogue remains storehouse cannot store all needs catalogue for clearance, apply above-mentioned sweep-out method and device, most of routine data catalogue can be removed.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The first schematic flow sheet of the catalogue sweep-out method that Fig. 1 provides for the embodiment of the present invention;
The second schematic flow sheet of the catalogue sweep-out method that Fig. 2 provides for the embodiment of the present invention;
The first structural representation of the catalogue scavenge unit that Fig. 3 provides for the embodiment of the present invention;
The second structural representation of the catalogue scavenge unit that Fig. 4 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
In order to solve prior art problem, embodiments provide a kind of catalogue sweep-out method and device.First a kind of catalogue sweep-out method that the embodiment of the present invention provides is introduced below.
It should be noted that, embodiments of the invention are preferably applicable to the mobile terminal having installed iOS operating system (iOS is the handheld equipment operating system developed by Apple) or Android operation system (android system is a kind of based on the freedom of Linux and the operating system of open source code) or WindowsPhone operating system (WindowsPhone is the Mobile phone operating system that Microsoft issues), certainly be also applicable to other mobile terminals, the present invention is not construed as limiting this.
The schematic flow sheet of a kind of catalogue sweep-out method that Fig. 1 provides for the embodiment of the present invention, can comprise:
S101: obtain all first class catalogues in self mobile terminal under system storage catalogue;
S102: for each first class catalogue in obtained all first class catalogues, judges whether be provided with application program corresponding to this first class catalogue in described mobile terminal; If so, perform S107, if not, perform S103;
S103: the directory name of this first class catalogue is sent to server, judge to make described server the catalogue self stored remains in storehouse whether there is the directory name identical with the described directory name received, if judged result is yes, determine that the catalogue corresponding to received directory name removes type, the first result is fed back to described mobile terminal device, if judged result is no, the second result is fed back to described mobile terminal, wherein, carry catalogue in described first result and remove type, the information being used to indicate catalogue and not finding is carried in described second result,
S104: receive described first result of described server feedback or described second result;
S105: when receiving described first result, performs the catalogue of carrying in described first result to this first class catalogue and removes clear operation corresponding to type;
S106: when receiving described second result, carries out removing process according to predetermined filtercondition to this first class catalogue;
S107: terminate.
Concrete, in actual applications, said system storage directory can the first system storage directory, also can be second system storage directory; The first system storage directory can be/andriod/data catalogue, and second system storage directory can be/andriod/obb catalogue.Under normal circumstances, the first class catalogue under/andriod/data catalogue or/andriod/obb catalogue is application catalog.
When said system storage directory be /andriod/data catalogue, all first class catalogues under acquisition andriod/data catalogue, for each first class catalogue under the andriod/data catalogue obtained, judge whether application program corresponding to this first class catalogue is installed in mobile terminal, if had, represent that application program corresponding to this catalogue is installed in the terminal, not unloaded, if do not had, then the directory name of this first class catalogue is sent to server, judge to make described server the catalogue self stored remains in storehouse whether there is the directory name identical with the described directory name received, if judged result is yes, determine that the catalogue corresponding to received directory name removes type, the first result is fed back to described mobile terminal device, if judged result is no, the second result is fed back to described mobile terminal, wherein, carry catalogue in described first result and remove type, the information being used to indicate catalogue and not finding is carried in described second result.
Concrete, judge whether application program corresponding to this first class catalogue is installed in mobile terminal, can judge that the application program of described mobile terminal installs the directory name that whether there is this first class catalogue in list, if existed, represent in described mobile terminal and application program corresponding to this first class catalogue is installed.
Suppose this first class catalogue to be directory name be the catalogue (hereinafter referred to as com.android.browser catalogue) of com.android.browser, suppose that the application program of mobile terminal installs list as shown in table 1:
Table 1
Application name | Application program installation path | Directory name |
Browser | /andriod/data/com.android.browser | com.android.browser |
/andriod/data/com.android.email | com.android.email |
Mobile terminal judges to there is directory name com.android.browser in application program installation list, represents in mobile terminal and is provided with application program corresponding to com.android.browser catalogue.
If mobile terminal judges there is not directory name com.android.browser in application program installation list, then the directory name com.android.browser of com.android.browser catalogue is sent to server, server judges the catalogue self stored remains in storehouse whether there is the directory name identical with directory name com.android.browser, supposes that the catalogue of server remains storehouse as shown in table 2:
Table 2
Directory name | Catalogue removes type |
com.android.browser | Suggestion is removed |
com.android.email | Do not remove |
com.security | Prudent removing |
If server judges the catalogue self stored and remains in storehouse and have the directory name identical with directory name com.android.browser, then determine that the catalogue that directory name com.android.browser is corresponding removes type, carry to mobile terminal feedback the first result that catalogue removes type, if server judges that the catalogue self stored remains directory name not identical with directory name com.android.browser in storehouse, the second result being used to indicate the information that catalogue does not find is carried to mobile terminal feedback, concrete, determine that the catalogue corresponding to directory name removes type, the catalogue of searching corresponding to this directory name can be remained in storehouse in catalogue and remove type, also can remain in storehouse in catalogue and find catalogue removing types value corresponding to this directory name, remove types value determination catalogue according to this catalogue and remove type, such as: catalogue remove types value be 1 represent catalogue remove type for suggestion remove, it is 2 represent catalogue and remove type and remove for prudent that catalogue removes types value, catalogue remove types value be 5 represent catalogue remove type for not remove.
First result of reception server feedback or the second result.
When receiving the first result, the catalogue of carrying in the first result being performed to com.android.browser catalogue and removes clear operation corresponding to type.Concrete, when receiving entrained catalogue removing type and being the first result of suggestion removing type, the directory name of this first class catalogue being added to suggestion removes in directory listing, after receiving user and removing the clear instruction of the directory name of this first class catalogue in directory listing for suggestion, remove this first class catalogue; When receiving entrained catalogue to remove type being the first result removing type cautiously, the directory name of this first class catalogue is added in prudent removing directory listing, receive user for prudent remove the clear instruction of the directory name of this first class catalogue in directory listing after, remove this first class catalogue; When receiving entrained catalogue to remove type being the first result not removing type, the directory name of this first class catalogue is added to and does not remove in directory listing.Namely when receiving entrained catalogue removing type and being the first result of suggestion removing type, the directory name com.android.browser of com.android.browser catalogue being added to suggestion removes in directory listing, after receiving user and removing the clear instruction of directory name com.android.browser in directory listing for suggestion, remove com.android.browser catalogue; When receiving entrained catalogue to remove type being the first result removing type cautiously, the directory name com.android.browser of com.android.browser catalogue is added in prudent removing directory listing, receive user for prudent remove the clear instruction of directory name com.android.browser in directory listing after, remove com.android.browser catalogue; When receiving entrained catalogue to remove type being the first result not removing type, the directory name com.android.browser of com.android.browser catalogue is added to and does not remove in directory listing.
When receiving the second result, judge whether this first class catalogue meets the first filtercondition preset, if met, then removes this first class catalogue.
Concrete, in actual applications, the first filtercondition preset can be for: the application program of described mobile terminal is installed in the application package title stored in list, there is not the prefix of directory name as application package title or the application package title of suffix of this first class catalogue.
Exemplary, suppose that the directory name of this first class catalogue is com.android.browser, in the application program of mobile terminal, the application package name stored in list is installed and is called com.android.browser.XXXXX, the application program that the directory name com.android.browser of this first class catalogue is mobile terminal installs the prefix that the name stored in list is called the application package of com.android.browser.XXXXX, then this first class catalogue does not meet the first filtercondition preset, do not remove the first class catalogue that this directory name is com.android.browser.
Suppose that the directory name of this first class catalogue is com.android.browser, in the application program of mobile terminal, the application package name stored in list is installed and is called XXXXX.com.android.browser, the application program that the directory name com.android.browser of this first class catalogue is mobile terminal installs the suffix that the name stored in list is called the application package of XXXXX.com.android.browser, the first filtercondition then preset, does not remove the first class catalogue that this directory name is com.android.browser.
Concrete, in actual applications, the first filtercondition preset can also be: there is not the sub-directory that last modification time is not more than preset time period in the next stage sub-directory of this first class catalogue.
Exemplary, suppose that preset time period is 3 days, then judge whether there is the catalogue that last modification time is not more than 3 days in the next stage sub-directory of com.android.browser catalogue, if there is no, represent the first filtercondition that com.android.browser catalogue meets, then remove com.android.browser catalogue.
Concrete, in actual applications, the first filtercondition preset can also be: there is the catalogue that directory name is predetermined title in the next stage sub-directory of this first class catalogue.Directory name is the catalogue of predetermined title can be the catalogue of cache for directory name, can be also the catalogue of files for directory name.
Exemplary, judge whether there is the catalogue that directory name is cache or files in the next stage sub-directory of com.android.browser catalogue, if existed, represent that com.android.browser catalogue meets the first default filtercondition, then remove com.android.browser catalogue.
Concrete, when system storage catalogue be/andriod/obb catalogue, when receiving the second result, can also judge whether this first class catalogue meets the second filtercondition preset, if satisfied, then removes this first class catalogue.Preset regular expression can be " (patch|main). d+. (bag name) .obb ".
Exemplary, suppose this first class catalogue to be directory name be the catalogue (hereinafter referred to as com.ea.game.fifa14_row catalogue) of com.ea.game.fifa14_row, then judge whether to exist in com.ea.game.fifa14_row catalogue file name meet regular expression " (patch|main). d+. (and bag name) .obb " file, suppose to exist in com.ea.game.fifa14_row catalogue the file that name is called main.130.com.ea.game.fifa14_row, represent com.ea.game.fifa14_row catalogue in exist file name meet regular expression " (patch|main). d+. (and bag name) .obb " file, namely com.ea.game.fifa14_row catalogue meets the second default filtercondition, then remove com.ea.game.fifa14_row catalogue.
It should be noted that, to be above-mentionedly described for com.android.browser catalogue and com.ea.game.fifa14_row catalogue, be only an instantiation of the present invention, do not form limitation of the invention.
The present invention is embodiment illustrated in fig. 1 in application, server stores catalogue remains storehouse, mobile terminal remains storehouse without the need to storage directory again, decrease taking of mobile terminal storage space, and the arithmetic capability of server is better than the arithmetic capability of mobile terminal usually, it is shorter that server detection catalogue remains the time that whether there is the directory name corresponding with the directory name of catalogue in storehouse, improve catalogue elimination efficiency, even if server does not detect the directory name corresponding with the directory name of catalogue, mobile terminal is also without the need to detecting, only need to perform several judgement operation, just can determine whether catalogue is the catalogue needing to remove, when determining that catalogue is the catalogue needing to remove, remove this catalogue, judge the time that the time of operation operates much smaller than detection, and then determine whether catalogue is need the catalogue removed to expend time in also shorter, improve catalogue elimination efficiency, complicated and changeable simultaneously due to directory name, catalogue remains storehouse cannot store all needs catalogue for clearance, apply above-mentioned sweep-out method and device, most of routine data catalogue can be removed.
The second schematic flow sheet of the catalogue sweep-out method that Fig. 2 provides for the embodiment of the present invention, the present invention is embodiment illustrated in fig. 2 on basis embodiment illustrated in fig. 1, and when described system storage catalogue is the first system storage directory, S106 can comprise:
S1061: judge whether there is the first character in the directory name of this first class catalogue, if so, performs S1062, if not, performs S107;
S1062: judge that whether the directory name of this first class catalogue is with the first character beginning, if not, performs S1063, if so, performs S107;
S1063: judge whether there is the second character in the first default character type in the directory name of this first class catalogue, if not, performs S1064, if so, performs S107;
S1064: judge to exist in the directory name of this first class catalogue any one described in first character after the first character be whether the three-character doctrine of the second default character type, if not, perform S1065, if so, perform S107;
S1065: remove this first class catalogue.
In actual applications, above-mentioned first character can be ". "; The character that the first above-mentioned character type comprises can be: except other characters except numeral, letter, underscore and "-ext ", such as " # ", " % ", " " etc.; The character that the second above-mentioned character type comprises can be numeral or underscore.
Exemplary, suppose that the directory name of this first class catalogue is for " browser ", does not exist ". " in this directory name, does not then remove the first class catalogue that this directory name is " browser ";
Suppose that the directory name of this first class catalogue is for " .browser ", exists ". " in the directory name of this first class catalogue, and with ". " beginning, then do not remove the first class catalogue that this directory name is " .browser ";
Suppose that the directory name of this first class catalogue is for " browser.#123 ", ". " is there is in the directory name of this first class catalogue, and do not start with ". ", but other character " # " existed in this directory name except numeral, English alphabet, underscore and "-ext ", then do not remove the first class catalogue that this directory name is " browser.#123 ";
Suppose that the directory name of this first class catalogue is for " browser.cm123._234 ", first character in the directory name of this first class catalogue after second ". " number is underscore " _ ", then do not remove the first class catalogue that this directory name is " browser.cm123._234 ";
Suppose that the directory name of this first class catalogue is for " com.android.browser ", there is ". " in the directory name of this first class catalogue and be not with ". " beginning and other characters do not existed except numeral, English alphabet, underscore and "-ext " and first character after each ". " number is all digital or underscore, then remove the first class catalogue that this directory name is " com.android.browser ".
The present invention is embodiment illustrated in fig. 2 in application, server stores catalogue remains storehouse, mobile terminal remains storehouse without the need to storage directory again, decrease taking of mobile terminal storage space, and the arithmetic capability of server is better than the arithmetic capability of mobile terminal usually, it is shorter that server detection catalogue remains the time that whether there is the directory name corresponding with the directory name of catalogue in storehouse, improve catalogue elimination efficiency, even if server does not detect the directory name corresponding with the directory name of catalogue, mobile terminal is also without the need to detecting, only need to perform several judgement operation, just can determine whether catalogue is the catalogue needing to remove, when determining that catalogue is the catalogue needing to remove, remove this catalogue, judge the time that the time of operation operates much smaller than detection, and then determine whether catalogue is need the catalogue removed to expend time in also shorter, improve catalogue elimination efficiency, complicated and changeable simultaneously due to directory name, catalogue remains storehouse cannot store all needs catalogue for clearance, apply above-mentioned scavenge unit, most of routine data catalogue can be removed.
Corresponding with above-mentioned embodiment of the method, the embodiment of the present invention also provides a kind of catalogue scavenge unit.
The first structural representation of the catalogue scavenge unit that Fig. 3 provides for the embodiment of the present invention, can comprise: catalogue obtains module 201, first judge module 202, sending module 203, receiver module 204, first removing module 205 and the second removing module 206, wherein
Catalogue obtains module 201, for obtaining all first class catalogues in self mobile terminal under system storage catalogue;
First judge module 202, for for each first class catalogue in obtained all first class catalogues, judges whether be provided with application program corresponding to this first class catalogue in described mobile terminal;
First judge module 202 shown in the embodiment of the present invention, specifically may be used for:
Judge that the application program of described mobile terminal installs the directory name that whether there is this first class catalogue in list, if existed, represent in described mobile terminal and application program corresponding to this first class catalogue is installed.
Sending module 203, for when the first judge module 202 judged result is no, the directory name of this first class catalogue is sent to server, judge to make described server the catalogue self stored remains in storehouse whether there is the directory name identical with the described directory name received, if judged result is yes, determine that the catalogue corresponding to received directory name removes type, the first result is fed back to described mobile terminal device, if judged result is no, the second result is fed back to described mobile terminal, wherein, carry catalogue in described first result and remove type, the information being used to indicate catalogue and not finding is carried in described second result,
Receiver module 204, for receiving described first result of described server feedback or described second result;
First removes module 205, for when receiver module 204 receives described first result, performs the catalogue of carrying in described first result remove clear operation corresponding to type to this first class catalogue;
Shown in the embodiment of the present invention, first removes module 205, specifically may be used for:
When receiving entrained catalogue removing type and being the first result of suggestion removing type, the directory name of this first class catalogue being added to suggestion removes in directory listing, after receiving user and removing the clear instruction of the directory name of this first class catalogue in directory listing for suggestion, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result removing type cautiously, the directory name of this first class catalogue is added in prudent removing directory listing, receive user for prudent remove the clear instruction of the directory name of this first class catalogue in directory listing after, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result not removing type, the directory name of this first class catalogue is added to and does not remove in directory listing.
Second removes module 206, for when receiver module 204 receives described second result, carries out removing process according to predetermined filtercondition to this first class catalogue.
In actual applications, described system storage catalogue can be the first system storage directory, and the first system storage directory can be/andriod/data catalogue; Shown in the embodiment of the present invention, second removes module 206, specifically may be used for:
When described receiver module receives described second result, judge whether this first class catalogue meets the first filtercondition preset, if met, then removes this first class catalogue.
In actual applications, the first filtercondition preset, can install in the application package title stored in list for the application program of described mobile terminal, there is not the prefix of directory name as application package title or the application package title of suffix of this first class catalogue; Can also for there is not the sub-directory that last modification time is not more than preset time period in the next stage sub-directory of this first class catalogue; Can also for there is the catalogue that directory name is predetermined title in the next stage sub-directory of this first class catalogue.
In actual applications, directory name is the catalogue of predetermined title can be the catalogue of cache for directory name, can be also the catalogue of files for directory name.
In actual applications, described system storage catalogue can be second system storage directory, and second system storage directory can be/andriod/obb catalogue; Shown in the embodiment of the present invention, second removes module 206, specifically may be used for:
When described receiver module receives described second result, judge whether this first class catalogue meets the second filtercondition preset, if met, then removes this first class catalogue.
In actual applications, the second filtercondition preset, can for there is the file that file name meets default regular expression in this first class catalogue, default regular expression can be " (patch|main). d+. (bag name) .obb ".
The present invention is embodiment illustrated in fig. 3 in application, server stores catalogue remains storehouse, mobile terminal remains storehouse without the need to storage directory again, decrease taking of mobile terminal storage space, and the arithmetic capability of server is better than the arithmetic capability of mobile terminal usually, it is shorter that server detection catalogue remains the time that whether there is the directory name corresponding with the directory name of catalogue in storehouse, improve catalogue elimination efficiency, even if server does not detect the directory name corresponding with the directory name of catalogue, mobile terminal is also without the need to detecting, only need to perform several judgement operation, just can determine whether catalogue is the catalogue needing to remove, when determining that catalogue is the catalogue needing to remove, remove this catalogue, judge the time that the time of operation operates much smaller than detection, and then determine whether catalogue is need the catalogue removed to expend time in also shorter, improve catalogue elimination efficiency, complicated and changeable simultaneously due to directory name, catalogue remains storehouse cannot store all needs catalogue for clearance, apply above-mentioned scavenge unit, most of routine data catalogue can be removed.
The second structural representation of the catalogue scavenge unit that Fig. 4 provides for the embodiment of the present invention, the present invention is embodiment illustrated in fig. 4 on basis embodiment illustrated in fig. 3, when described system storage catalogue is the first system storage directory, second removes module 206, can comprise: first judges that submodule, second judges that submodule, the 3rd judges that submodule, the 4th judges submodule and removes submodule, wherein
First judges submodule, for when receiver module 204 receives the second result, judges whether there is the first character in the directory name of this first class catalogue;
Second judges submodule, for when first judges submodule judged result for being, judges that whether the directory name of this first class catalogue is with the first character beginning;
3rd judges submodule, for when second judges that submodule judged result is no, judges whether there is the second character in the first default character type in the directory name of this first class catalogue;
4th judges submodule, for when the 3rd judges that submodule judged result is no, judges that whether first character after any one first character existed in the directory name of this first class catalogue is the three-character doctrine in the second default character type;
Remove submodule, for when the 4th judges that submodule is judged as NO, remove this first class catalogue.
In actual applications, above-mentioned first character can be ". "; The character that the first above-mentioned character type comprises can be: except other characters except numeral, letter, underscore and "-ext ", such as " # ", " % ", " " etc.; The character that the second above-mentioned character type comprises can be numeral or underscore.
The present invention is embodiment illustrated in fig. 4 in application, server stores catalogue remains storehouse, mobile terminal remains storehouse without the need to storage directory again, decrease taking of mobile terminal storage space, and the arithmetic capability of server is better than the arithmetic capability of mobile terminal usually, it is shorter that server detection catalogue remains the time that whether there is the directory name corresponding with the directory name of catalogue in storehouse, improve catalogue elimination efficiency, even if server does not detect the directory name corresponding with the directory name of catalogue, mobile terminal is also without the need to detecting, only need to perform several judgement operation, just can determine whether catalogue is the catalogue needing to remove, when determining that catalogue is the catalogue needing to remove, remove this catalogue, judge the time that the time of operation operates much smaller than detection, and then determine whether catalogue is need the catalogue removed to expend time in also shorter, improve catalogue elimination efficiency, complicated and changeable simultaneously due to directory name, catalogue remains storehouse cannot store all needs catalogue for clearance, apply above-mentioned scavenge unit, most of routine data catalogue can be removed.
In addition, the embodiment of the present invention additionally provides a kind of mobile terminal, can comprise:
Processor, storer, communication interface and bus;
Described processor, described storer and described communication interface are connected by described bus and complete mutual communication;
Described storer stores executable programs code;
Described processor runs the program corresponding with described executable program code by reading the executable program code stored in described storer, for the catalogue sweep-out method that execution the embodiment of the present application provides; Wherein, the catalogue sweep-out method that the embodiment of the present application provides, can comprise: obtain all first class catalogues in self mobile terminal under system storage catalogue;
For each first class catalogue in obtained all first class catalogues, perform catalogue clear operation respectively, wherein, described catalogue clear operation, comprising:
Judge whether application program corresponding to this first class catalogue is installed in described mobile terminal;
If do not had, then the directory name of this first class catalogue is sent to server, judge to make described server the catalogue self stored remains in storehouse whether there is the directory name identical with the described directory name received, if judged result is yes, determine that the catalogue corresponding to received directory name removes type, the first result is fed back to described mobile terminal device, if judged result is no, the second result is fed back to described mobile terminal, wherein, carry catalogue in described first result and remove type, the information being used to indicate catalogue and not finding is carried in described second result,
Receive described first result of described server feedback or described second result;
When receiving described first result, the catalogue of carrying in described first result being performed to this first class catalogue and removes clear operation corresponding to type;
When receiving described second result, according to predetermined filtercondition, removing process is carried out to this first class catalogue.
Wherein, describedly judge whether application program corresponding to this first class catalogue is installed, can comprise in described mobile terminal:
Judge that the application program of described mobile terminal installs the directory name that whether there is this first class catalogue in list, if existed, represent in described mobile terminal and application program corresponding to this first class catalogue is installed.
Wherein, described when receiving described first result, the catalogue of carrying in described first result is performed to this first class catalogue and removes clear operation corresponding to type, can comprise:
When receiving entrained catalogue removing type and being the first result of suggestion removing type, the directory name of this first class catalogue being added to suggestion removes in directory listing, after receiving user and removing the clear instruction of the directory name of this first class catalogue in directory listing for suggestion, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result removing type cautiously, the directory name of this first class catalogue is added in prudent removing directory listing, receive user for prudent remove the clear instruction of the directory name of this first class catalogue in directory listing after, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result not removing type, the directory name of this first class catalogue is added to and does not remove in directory listing.
Wherein, described system storage catalogue is the first system storage directory;
Described according to predetermined filtercondition to this first class catalogue carry out removing process, can comprise:
Judge whether this first class catalogue meets the first filtercondition preset, if met, then removes this first class catalogue.
Wherein, described the first default filtercondition, can comprise:
The first character is there is in directory name, and directory name is not with described first character beginning, and the second character do not existed in directory name in the first default character type, and exist in target designation any one described in first character after the first character be not the three-character doctrine in the second character type of presetting.
Wherein, described the first default filtercondition, can comprise:
The application program of described mobile terminal is installed in the application package title stored in list, there is not the prefix of directory name as application package title or the application package title of suffix of this first class catalogue.
Wherein, described the first default filtercondition, can comprise: there is not the sub-directory that last modification time is not more than preset time period in the next stage sub-directory of this first class catalogue.
Wherein, described the first default filtercondition, can comprise:
The catalogue that directory name is predetermined title is there is in the next stage sub-directory of this first class catalogue.
Wherein, described system storage catalogue is second system storage directory;
Described according to predetermined filtercondition to this first class catalogue carry out removing process, can comprise:
Judge whether this first class catalogue meets the second filtercondition preset, if met, then removes this first class catalogue.
Wherein, described the second default filtercondition, can comprise:
The file that file name meets default regular expression is there is in this first class catalogue.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
Each embodiment in this instructions all adopts relevant mode to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
One of ordinary skill in the art will appreciate that all or part of step realized in said method embodiment is that the hardware that can carry out instruction relevant by program has come, described program can be stored in computer read/write memory medium, here the alleged storage medium obtained, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.
Claims (10)
1. a catalogue sweep-out method, is characterized in that, is applied to mobile terminal, comprising:
Obtain all first class catalogues in self mobile terminal under system storage catalogue;
For each first class catalogue in obtained all first class catalogues, perform catalogue clear operation respectively, wherein, described catalogue clear operation, comprising:
Judge whether application program corresponding to this first class catalogue is installed in described mobile terminal;
If do not had, then the directory name of this first class catalogue is sent to server, judge to make described server the catalogue self stored remains in storehouse whether there is the directory name identical with the described directory name received, if judged result is yes, determine that the catalogue corresponding to received directory name removes type, the first result is fed back to described mobile terminal device, if judged result is no, the second result is fed back to described mobile terminal, wherein, carry catalogue in described first result and remove type, the information being used to indicate catalogue and not finding is carried in described second result,
Receive described first result of described server feedback or described second result;
When receiving described first result, the catalogue of carrying in described first result being performed to this first class catalogue and removes clear operation corresponding to type;
When receiving described second result, according to predetermined filtercondition, removing process is carried out to this first class catalogue.
2. method according to claim 1, is characterized in that, describedly judges whether be provided with application program corresponding to this first class catalogue in described mobile terminal, comprising:
Judge that the application program of described mobile terminal installs the directory name that whether there is this first class catalogue in list, if existed, represent in described mobile terminal and application program corresponding to this first class catalogue is installed.
3. method according to claim 1, is characterized in that, described when receiving described first result, performs the catalogue of carrying in described first result and removes clear operation corresponding to type, comprising this first class catalogue:
When receiving entrained catalogue removing type and being the first result of suggestion removing type, the directory name of this first class catalogue being added to suggestion removes in directory listing, after receiving user and removing the clear instruction of the directory name of this first class catalogue in directory listing for suggestion, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result removing type cautiously, the directory name of this first class catalogue is added in prudent removing directory listing, receive user for prudent remove the clear instruction of the directory name of this first class catalogue in directory listing after, remove this first class catalogue;
When receiving entrained catalogue to remove type being the first result not removing type, the directory name of this first class catalogue is added to and does not remove in directory listing.
4. method according to claim 1, is characterized in that, described system storage catalogue is the first system storage directory;
Described according to predetermined filtercondition to this first class catalogue carry out removing process, comprising:
Judge whether this first class catalogue meets the first filtercondition preset, if met, then removes this first class catalogue.
5. method according to claim 4, is characterized in that, described the first default filtercondition, comprising:
The first character is there is in directory name, and directory name is not with described first character beginning, and the second character do not existed in directory name in the first default character type, and exist in target designation any one described in first character after the first character be not the three-character doctrine in the second character type of presetting.
6. method according to claim 4, is characterized in that, described the first default filtercondition, comprising:
The application program of described mobile terminal is installed in the application package title stored in list, there is not the prefix of directory name as application package title or the application package title of suffix of this first class catalogue.
7. method according to claim 4, is characterized in that, described the first default filtercondition, comprising:
The sub-directory that last modification time is not more than preset time period is there is not in the next stage sub-directory of this first class catalogue.
8. method according to claim 4, is characterized in that, described the first default filtercondition, comprising:
The catalogue that directory name is predetermined title is there is in the next stage sub-directory of this first class catalogue.
9. a catalogue scavenge unit, is characterized in that, is applied to mobile terminal, comprising: catalogue obtains module, the first judge module, sending module, receiver module, the first removing module and the second removing module, wherein,
Described catalogue obtains module, for obtaining all first class catalogues in self mobile terminal under system storage catalogue;
Described first judge module, for for each first class catalogue in obtained all first class catalogues, judges whether be provided with application program corresponding to this first class catalogue in described mobile terminal;
Described sending module, for when described first judge module judged result is no, the directory name of this first class catalogue is sent to server, judge to make described server the catalogue self stored remains in storehouse whether there is the directory name identical with the described directory name received, if judged result is yes, determine that the catalogue corresponding to received directory name removes type, the first result is fed back to described mobile terminal device, if judged result is no, the second result is fed back to described mobile terminal, wherein, carry catalogue in described first result and remove type, the information being used to indicate catalogue and not finding is carried in described second result,
Described receiver module, for receiving described first result of described server feedback or described second result;
Described first removes module, for when described receiver module receives described first result, performs the catalogue of carrying in described first result remove clear operation corresponding to type to this first class catalogue;
Described second removes module, for when described receiver module receives described second result, carries out removing process according to predetermined filtercondition to this first class catalogue.
10. a mobile terminal, is characterized in that, comprising: processor, storer, communication interface and bus;
Described processor, described storer and described communication interface are connected by described bus and complete mutual communication;
Described storer stores executable programs code;
Described processor runs the program corresponding with described executable program code by reading the executable program code stored in described storer, requires the catalogue sweep-out method described in 1 to 8 any one for enforcement of rights.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510544122.1A CN105224356B (en) | 2015-08-28 | 2015-08-28 | Directory clearing method and device and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510544122.1A CN105224356B (en) | 2015-08-28 | 2015-08-28 | Directory clearing method and device and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105224356A true CN105224356A (en) | 2016-01-06 |
CN105224356B CN105224356B (en) | 2018-09-14 |
Family
ID=54993348
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510544122.1A Active CN105224356B (en) | 2015-08-28 | 2015-08-28 | Directory clearing method and device and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105224356B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107977566A (en) * | 2017-11-27 | 2018-05-01 | 珠海市君天电子科技有限公司 | A kind of function triggering method, device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103559276A (en) * | 2013-11-05 | 2014-02-05 | 广东欧珀移动通信有限公司 | Method and device for clearing useless files |
CN104021160A (en) * | 2014-05-26 | 2014-09-03 | 北京金山安全软件有限公司 | Client data cleaning method and device |
US20140373168A1 (en) * | 2013-04-12 | 2014-12-18 | Tencent Technology (Shenzhen) Company Limited | Method of protecting privacy data of an application program and apparatus using the same |
CN104317956A (en) * | 2014-11-13 | 2015-01-28 | 北京奇虎科技有限公司 | Query and memory space cleaning method and system based on cloud server |
CN104536792A (en) * | 2014-12-30 | 2015-04-22 | 北京奇虎科技有限公司 | Method and device for eliminating application program residual files |
-
2015
- 2015-08-28 CN CN201510544122.1A patent/CN105224356B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140373168A1 (en) * | 2013-04-12 | 2014-12-18 | Tencent Technology (Shenzhen) Company Limited | Method of protecting privacy data of an application program and apparatus using the same |
CN103559276A (en) * | 2013-11-05 | 2014-02-05 | 广东欧珀移动通信有限公司 | Method and device for clearing useless files |
CN104021160A (en) * | 2014-05-26 | 2014-09-03 | 北京金山安全软件有限公司 | Client data cleaning method and device |
CN104317956A (en) * | 2014-11-13 | 2015-01-28 | 北京奇虎科技有限公司 | Query and memory space cleaning method and system based on cloud server |
CN104536792A (en) * | 2014-12-30 | 2015-04-22 | 北京奇虎科技有限公司 | Method and device for eliminating application program residual files |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107977566A (en) * | 2017-11-27 | 2018-05-01 | 珠海市君天电子科技有限公司 | A kind of function triggering method, device and electronic equipment |
CN107977566B (en) * | 2017-11-27 | 2021-03-19 | 珠海市君天电子科技有限公司 | Function triggering method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105224356B (en) | 2018-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10705748B2 (en) | Method and device for file name identification and file cleaning | |
CN104536792A (en) | Method and device for eliminating application program residual files | |
US7523500B1 (en) | Filtered antivirus scanning | |
US20130276126A1 (en) | Website scanning device and method | |
US10382477B2 (en) | Identification apparatus, control method therefor, and storage medium | |
US7155742B1 (en) | Countering infections to communications modules | |
CN104461504A (en) | Managing method of terminal application program | |
CN107247722B (en) | File scanning method and device and intelligent terminal | |
US20190005057A1 (en) | Methods and Devices for File Folder Path Identification and File Folder Cleaning | |
EP3543858B1 (en) | Method for checking and compiling system start-up files | |
CN112579202B (en) | Method, device, equipment and storage medium for editing server program of Windows system | |
CN104217165B (en) | The processing method of file and device | |
US7216344B2 (en) | Side-by-side drivers | |
CN104199704A (en) | Application program installation package clearing method and device | |
CN104461505A (en) | Terminal | |
CN104965731A (en) | Data processing method and electronic terminal | |
CN102968321A (en) | Application program installation device and application program installation method | |
CN104239091A (en) | File cleaning method and device and terminal | |
CN102156650B (en) | Method and device capable of implementing automatic analysis of patch | |
CN106557500B (en) | Method and device for cleaning uninstalled residual file and terminal | |
CN103778188A (en) | Method and equipment for inquiring and/or maintaining data in library file | |
CN106201595A (en) | The cleaning control method of a kind of application program and device | |
JP2020004220A (en) | Information processing apparatus, client terminal, control method, and program | |
CN105224356A (en) | Directory clearing method and device and mobile terminal | |
CN104572943B (en) | Exempt from installation procedure method for cleaning and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |