Summary of the invention
Embodiments provide a kind of disposal route, device and the terminal that unload Stub File.Adopt the embodiment of the present invention, the unloading Stub File lacking cleaning type can be cleared up further, thus expand cleaning coverage rate, add the storage resources of terminal, improve the operational efficiency of terminal.
On the one hand, The embodiment provides a kind of disposal route unloading Stub File, the method can comprise:
Residual catalogue under certainty annuity storage directory;
Detect the cleaning type of described residual catalogue, wherein, described cleaning type comprise acquiescence cleaning, acquiescence retain, classification cleaning, classification retain and will not clear up;
If when the cleaning type of described residual catalogue being detected for classification cleaning or classification reservation, detect the cleaning type of the first level subdirectory that described residual catalogue comprises;
If the not identified cleaning type of described first level subdirectory detected, then according to the cleaning type of described residual catalogue, determine the cleaning type of described first level subdirectory.
As optional embodiment, the residual catalogue under described certainty annuity storage directory, comprising:
Obtain the first class catalogue under described system storage catalogue;
For the first class catalogue of described acquisition, judge whether the application program that described first class catalogue is corresponding unloads;
If judge that the application program that described first class catalogue is corresponding unloads, then determine that all sub-directories under described first class catalogue and described first class catalogue are residual catalogue.
As optional embodiment, described for obtained first class catalogue, judge whether the application program that described first class catalogue is corresponding unloads, and comprising:
Judge in described first class catalogue, whether to there is APMB package corresponding to described application program, if there is no then determine that the application program that described first class catalogue is corresponding unloads; Or
Judge that application program installs the directory name that whether there is described first class catalogue in list, if there is no then determine that the application program that described first class catalogue is corresponding unloads.
As optional embodiment, the described cleaning type according to described residual catalogue, determine the cleaning type of described first level subdirectory, comprising:
If the cleaning type of described residual catalogue is classification cleaning, then determine that the cleaning type of described first level subdirectory is for acquiescence cleaning;
If the cleaning type of described residual catalogue retains for classification, then determine that the cleaning type of described first level subdirectory retains for giving tacit consent to.
As optional embodiment, described method also comprises:
If when the cleaning type of described residual catalogue being detected for classification cleaning or classification reservation, detect the cleaning type of the son file that described residual catalogue comprises;
The not identified cleaning type of son file that described residual catalogue comprises if detect, then according to the cleaning type of described residual catalogue, determine the cleaning type of the son file that described residual catalogue comprises.
As optional embodiment, the described cleaning type according to described residual catalogue, determine the cleaning type of the son file that described residual catalogue comprises, comprising:
If the cleaning type of described residual catalogue is classification cleaning, then determine that the cleaning type of the son file that described residual catalogue comprises is for acquiescence cleaning;
If the cleaning type of described residual catalogue retains for classification, then determine that the cleaning type of the son file that described residual catalogue comprises retains for giving tacit consent to.
As optional embodiment, described method also comprises:
If when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for acquiescence cleaning, described residual catalogue, described first level subdirectory or described son file are presented at suggestion cleaning interface;
According to the confirmation operation of user on described suggestion cleaning interface, cleaning operation is performed to described residual catalogue, described first level subdirectory or described son file.
As optional embodiment, described method also comprises:
If when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for acquiescence reservation, described residual catalogue, described first level subdirectory or described son file are presented at degree of depth cleaning interface;
According to the selection operation of user on described degree of depth cleaning interface, residual catalogue, first level subdirectory or the son file corresponding to selection operation is performed and stores operation.
As optional embodiment, described method also comprises:
If when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for clearing up, described residual catalogue, described first level subdirectory or described son file are performed and stores operation.
On the other hand, The embodiment provides a kind for the treatment of apparatus unloading Stub File, this device can comprise:
First determination module, for the residual catalogue under certainty annuity storage directory;
First detection module, for detecting the cleaning type of described residual catalogue, wherein, described cleaning type comprise acquiescence cleaning, acquiescence retain, classification cleaning, classification retain and will not clear up;
Second detection module, during for the cleaning type of described residual catalogue being detected when described first detection module for classification cleaning or classification reservation, detects the cleaning type of the first level subdirectory that described residual catalogue comprises;
Second determination module, for the not identified cleaning type of described first level subdirectory being detected when described second detection module, then according to the cleaning type of described residual catalogue, determines the cleaning type of described first level subdirectory.
As optional embodiment, described first determination module comprises:
Acquiring unit, for obtaining the first class catalogue under described system storage catalogue;
Judging unit, for the first class catalogue for described acquisition, judges whether the application program that described first class catalogue is corresponding unloads;
First determining unit, if judge that the application program that described first class catalogue is corresponding unloads for judging unit, then determines that all sub-directories under described first class catalogue and described first class catalogue are residual catalogue.
As optional embodiment, described judging unit comprises:
Whether the first judgment sub-unit, existing APMB package corresponding to described application program for judging, if there is no then determining that the application program that described first class catalogue is corresponding unloads in described first class catalogue; And/or
Second judgment sub-unit, for judging that application program installs the directory name that whether there is described first class catalogue in list, if there is no then determines that the application program that described first class catalogue is corresponding unloads.
As optional embodiment, described second determination module also for:
If the cleaning type of described residual catalogue is classification cleaning, then determine that the cleaning type of described first level subdirectory is for acquiescence cleaning;
If the cleaning type of described residual catalogue retains for classification, then determine that the cleaning type of described first level subdirectory retains for giving tacit consent to.
As optional embodiment, described second detection module is also for the cleaning type of described residual catalogue being detected for classification cleaning or classification reservation during when described first detection module, detect the cleaning type of the son file that described residual catalogue comprises;
Described second determination module, also for detecting when described second detection module the not identified cleaning type of son file that described residual catalogue comprises, then according to the cleaning type of described residual catalogue, determines the cleaning type of the son file that described residual catalogue comprises.
As optional embodiment, described second determination module also for:
If the cleaning type of described residual catalogue is classification cleaning, then determine that the cleaning type of the son file that described residual catalogue comprises is for acquiescence cleaning;
If the cleaning type of described residual catalogue retains for classification, then determine that the cleaning type of the son file that described residual catalogue comprises retains for giving tacit consent to.
As optional embodiment, described device also comprises:
First display module, for detect when described first detection module or described second detection module or cleaning type that described second determination module determines described residual catalogue, described first level subdirectory or described son file for acquiescence cleaning time, described residual catalogue, described first level subdirectory or described son file are presented at suggestion cleaning interface;
Cleaning module, for according to the confirmation operation of user on described suggestion cleaning interface, performs cleaning operation to described residual catalogue, described first level subdirectory or described son file.
As optional embodiment, described device also comprises:
Second display module, for detect when described first detection module or described second detection module or cleaning type that described second determination module determines described residual catalogue, described first level subdirectory or described son file for acquiescence retain time, described residual catalogue, described first level subdirectory or described son file are presented at degree of depth cleaning interface;
Memory module, for according to the selection operation of user on described degree of depth cleaning interface, performs residual catalogue, first level subdirectory or the son file corresponding to selection operation and stores operation.
As optional embodiment, described memory module is also for the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for clearing up during when described first detection module or described second detection module, described residual catalogue, described first level subdirectory or described son file is performed and stores operation.
Another aspect, The embodiment provides a kind of terminal, and this terminal can comprise user interface, storer and processor, wherein, store batch processing code in described storer, and described processor calls the program code stored in described storer, for performing following operation:
Residual catalogue under certainty annuity storage directory;
Detect the cleaning type of described residual catalogue, wherein, described cleaning type comprise acquiescence cleaning, acquiescence retain, classification cleaning, classification retain and will not clear up;
If when the cleaning type of described residual catalogue being detected for classification cleaning or classification reservation, detect the cleaning type of the first level subdirectory that described residual catalogue comprises;
If the not identified cleaning type of described first level subdirectory detected, then according to the cleaning type of described residual catalogue, determine the cleaning type of described first level subdirectory.
In the embodiment of the present invention, first can determine the Stub File in terminal under system storage catalogue, and by detecting the cleaning type of residual catalogue, determine the processing mode to this residual catalogue; If when the cleaning type of residual catalogue being detected for classification cleaning or classification reservation, then the cleaning type of the first level subdirectory that residual catalogue comprises can be detected further; If the not identified cleaning type of first level subdirectory detected, the cleaning type of this first level subdirectory then can be determined according to the cleaning type of residual catalogue, thus this first level subdirectory can be further processed, expand cleaning coverage rate, and the cleaning of the more degree of depth can be carried out current Stub File, the operational efficiency of terminal can be strengthened.
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 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.
Below with reference to the accompanying drawings embodiments of the invention are described.Wherein, terminal described in the embodiment of the present invention comprises the subscriber equipment of the application program can installing android system, as mobile phone, panel computer, notebook, Wearable etc.
See a kind of process flow diagram unloading an embodiment of the disposal route of Stub File that Fig. 1, Fig. 1 are in the present invention.The method can comprise the following steps.
Step S101, the residual catalogue under certainty annuity storage directory.
In one embodiment, after a certain application program is unloaded, need to determine the Stub File in terminal under system storage catalogue.Concrete, be residual catalogue by the first class catalogue under various ways determination storage directory.As determined whether there is APMB package corresponding to unloaded application program in this first class catalogue, or determine that the application program of terminal installs the directory name that whether there is this first class catalogue in list; There is not the directory name that there is not this first class catalogue in APMB package or application program installation list if determine in this first class catalogue, then can determine that this first class catalogue is for residual catalogue.And then, according to the cleaning type of residual catalogue, a step process can be done to the residual catalogue determined.
Step S102, detects the cleaning type of described residual catalogue, wherein, described cleaning type comprise acquiescence cleaning, acquiescence retain, classification cleaning, classification retain and will not clear up.
In one embodiment, after certain first class catalogue under determining terminal system storage directory is for residual catalogue, the cleaning type of this residual catalogue can be detected.Concrete, cleaning type can comprise acquiescence cleaning, acquiescence retains, classification cleaning, classification retain and confirm cleaning.During as comprised file (as the temporary file etc.) only for application program in a certain catalogue; Or comprise user create but unreadable file (if suffix is the video file etc. of dat) time, then the cleaning type that can identify this catalogue is in advance acquiescence cleaning, namely when user need clear up residual catalogue, can advise clearing up this catalogue.When and for example comprising readable documents (as picture, the audio-video document etc.) of user's foundation in a certain catalogue, then can identify the cleaning type of this catalogue in advance for acquiescence reservation, namely when user need clear up residual catalogue, need the confirmation by user, could clear up the catalogue of the type, otherwise acquiescence retains this catalogue.
When there is sub-directory under a certain catalogue, and the not identified cleaning type of some or multiple sub-directory, then can identify the cleaning type of this catalogue in advance for classification cleaning or classification reservation, namely when user need clear up residual catalogue, if the cleaning type detecting residual catalogue is cleared up for classification or classification retains, then need the sub-directory traveling through this residual catalogue, different process operations is carried out to the sub-directory of difference cleaning type.Further, can according to the directory information of a certain catalogue, the cleaning type of pre-this catalogue of mark is cleared up for classification or classification retains; As this catalogue is created by application program, then can identify the cleaning type of this catalogue in advance for classification cleaning, if this catalogue is created by user, then the cleaning type that can identify this catalogue in advance retains for classifying.
If the file that a certain catalogue comprises is the file that will not clear up, then can identify the cleaning type of this catalogue in advance for clearing up.Namely, when user need clear up Stub File, the file of this cleaning type or catalogue are not detected.
Step S103, if when the cleaning type of described residual catalogue being detected for classification cleaning or classification reservation, detect the cleaning type of the first level subdirectory that described residual catalogue comprises.
In one embodiment, when detecting that the identified cleaning type of residual catalogue retains for classification cleaning or classification, then need the cleaning type further detecting the first level subdirectory comprised in residual catalogue.According to the cleaning type of first level subdirectory, classification process is carried out to this first level subdirectory.Wherein, if the cleaning type of first level subdirectory is classification cleaning or classification reservation, then the cleaning type of the secondary sub-directory comprised under can continuing to detect this first level subdirectory.Can travel through the N level sub-directory to this residual catalogue or minimum first level subdirectory, wherein, not comprising cleaning type in N level sub-directory is the sub-directory that classification cleaning or classification retain.
Step S104, if the not identified cleaning type of described first level subdirectory detected, then according to the cleaning type of described residual catalogue, determines the cleaning type of described first level subdirectory.
In one embodiment, if the not identified cleaning type of some or multiple first level subdirectory in residual catalogue detected, then according to the cleaning type of this residual catalogue, the cleaning type of first level subdirectory can be determined.Concrete, if the cleaning type of this residual catalogue is classification cleaning, then can determine that the cleaning type of this first level subdirectory is for acquiescence cleaning; If the cleaning type of this residual catalogue retains for classification, then can determine that the cleaning type of this first level subdirectory retains for giving tacit consent to.Thus, catalogue can be remained to certain one-level for mark cleaning type and be further processed.
In the embodiment of the present invention, first can determine the Stub File in terminal under system storage catalogue, and by detecting the cleaning type of residual catalogue, determine the processing mode to this residual catalogue; If when the cleaning type of residual catalogue being detected for classification cleaning or classification reservation, then the cleaning type of the first level subdirectory that residual catalogue comprises can be detected further; If the not identified cleaning type of first level subdirectory detected, the cleaning type of this first level subdirectory then can be determined according to the cleaning type of residual catalogue, thus this first level subdirectory can be further processed, expand cleaning coverage rate, and the cleaning of the more degree of depth can be carried out current Stub File, the operational efficiency of terminal can be strengthened.
See a kind of process flow diagram unloading another embodiment of the disposal route of Stub File that Fig. 2, Fig. 2 are in the present invention.The method can comprise the following steps.
Step S201, obtains the first class catalogue under system storage catalogue.
In one embodiment, when scanning the system storage catalogue of terminal, the first class catalogue under system storage catalogue in this terminal can be obtained.Wherein, regularly can scan system storage catalogue, to find residual catalogue, and the unloading that residual catalogue adds in terminal can be remained in storehouse; Also by triggering command, system storage catalogue is scanned, to find residual catalogue.
Step S202, for obtained first class catalogue, judges whether the application program that described first class catalogue is corresponding unloads.
In one embodiment, for obtained first class catalogue, by judging whether the application program that in terminal, this first class catalogue is corresponding unloads, determine just whether first class catalogue is residual catalogue.Wherein, judge by various ways:
As by judging whether there is APMB package corresponding to this application program in this first class catalogue.Concrete, inquire about by the local high frequency storehouse set up to terminal or server, inquire about the number of APMB package of correspondence and the filename of the APMB package of correspondence under this catalogue, and then judge whether also there is APMB package corresponding to this application program under this catalogue;
And for example, by judging that the application program of terminal installs the directory name that whether also there is this first class catalogue in list, due to the corresponding application program of this first class catalogue, there is not this first class catalogue if install in list in application program, then the application program showing its correspondence no longer application program is installed in list.
Step S203, if judge that the application program that this first class catalogue is corresponding unloads, then determines that all sub-directories under described first class catalogue and described first class catalogue are residual catalogue.
In one embodiment, when judging that the application program that in terminal, this first class catalogue is corresponding unloads by the way, then can determine that all sub-directories under this first class catalogue and first class catalogue are residual catalogue, and all son files under this first class catalogue are Stub File.Concrete, when there is not APMB package corresponding to this application program in the first class catalogue judging terminal, or the application program of terminal installs the directory name that there is not this catalogue in list, then can determine that this catalogue is for residual catalogue, and all sub-directories under this first class catalogue are also residual catalogue.
Step S204, detects the cleaning type of described residual catalogue, wherein, described cleaning type comprise acquiescence cleaning, acquiescence retain, classification cleaning, classification retain and will not clear up.
In one embodiment, in one embodiment, after certain first class catalogue under determining terminal system storage directory is for residual catalogue, the cleaning type of this residual catalogue can be detected.Concrete, cleaning type can comprise acquiescence cleaning, acquiescence retains, classification cleaning, classification retain and confirm cleaning.During as comprised file (as the temporary file etc.) only for application program in a certain catalogue; Or comprise user create but unreadable file (if suffix is the video file etc. of dat) time, then the cleaning type that can identify this catalogue is in advance acquiescence cleaning, namely when user need clear up residual catalogue, can advise clearing up this catalogue.When and for example comprising readable documents (as picture, the audio-video document etc.) of user's foundation in a certain catalogue, then can identify the cleaning type of this catalogue in advance for acquiescence reservation, namely when user need clear up residual catalogue, need the confirmation by user, could clear up the catalogue of the type, otherwise acquiescence retains this catalogue.
When there is sub-directory under a certain catalogue, and the not identified cleaning type of some or multiple sub-directory, then can identify the cleaning type of this catalogue in advance for classification cleaning or classification reservation, namely when user need clear up residual catalogue, if the cleaning type detecting residual catalogue is cleared up for classification or classification retains, then need the sub-directory traveling through this residual catalogue, different process operations is carried out to the sub-directory of difference cleaning type.Further, can according to the directory information of a certain catalogue, the cleaning type of pre-this catalogue of mark is cleared up for classification or classification retains; As this catalogue is created by application program, then can identify the cleaning type of this catalogue in advance for classification cleaning, if this catalogue is created by user, then the cleaning type that can identify this catalogue in advance retains for classifying.
If the file that a certain catalogue comprises is the file that needs retain, then can identify the cleaning type of this catalogue in advance for clearing up.Namely, when user need clear up Stub File, the confirmation without the need to user can retain this catalogue.
Step S205, if the cleaning type described residual catalogue being detected for classification cleaning or classification retain time, detect the cleaning type of first level subdirectory that described residual catalogue comprises or son file.
In one embodiment, when detecting that the cleaning type of residual catalogue retains for classification cleaning or classification, then need the cleaning type further detecting the first level subdirectory comprised in residual catalogue, if comprise son file in current residual catalogue, then also need the cleaning type detecting this son file.Wherein, the cleaning type of first level subdirectory or one-level son file is identical with the cleaning type of residual catalogue, if when the cleaning type of first level subdirectory or son file being detected for acquiescence cleaning, the cleaning type that processing mode is equal to residual catalogue is, when giving tacit consent to cleaning, can perform step S207 ~ S208; If when detecting that the cleaning type of first level subdirectory or son file is acquiescence reservation, the cleaning type that processing mode is equal to residual catalogue is, when giving tacit consent to reservation, can perform step S209 ~ 210; If when cleaning type first level subdirectory or son file being detected is for clearing up, then can according to the cleaning of residual catalogue be will not clear up time mode, can step S211 be performed.
Wherein, if when the manner of cleaning up of first level subdirectory being detected still for classification cleaning or classification reservation, because first level subdirectory is also residual catalogue, the step of S204 ~ S211 can be repeated, also the step of S102 ~ S104 in above-described embodiment can be repeated, using current first level subdirectory as residual catalogue, continue to travel through the sub-directory under it.
Step S206, if the not identified cleaning type of described first level subdirectory or son file detected, then according to the cleaning type of described residual catalogue, determines the cleaning type of described first level subdirectory or son file.
In one embodiment, if the some or multiple first level subdirectory in residual catalogue or the not identified cleaning type of son file detected, then according to the cleaning type of this residual catalogue, the cleaning type of first level subdirectory or son file can be determined.Concrete, if the cleaning type of this residual catalogue is classification cleaning, then can determine that the cleaning type of this first level subdirectory or son file is for acquiescence cleaning; If the cleaning type of this residual catalogue retains for classification, then can determine that the cleaning type of this first level subdirectory or son file retains for giving tacit consent to.And then, according to following cleanup step, the first level subdirectory or son file identifying cleaning type can be processed, equally, be also identified as acquiescence cleaning by steps of processing cleaning type, give tacit consent to the residual catalogue retaining and maybe will not clear up.
Step S207, if when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for acquiescence cleaning, is presented at suggestion cleaning interface by described residual catalogue, described first level subdirectory or described son file.
In one embodiment, when detecting that in step S204 the cleaning type of residual catalogue is for acquiescence cleaning, or in step S205, detect that the cleaning type of first level subdirectory or son file is for acquiescence cleaning, or in step S206, according to the cleaning type of residual catalogue, when the cleaning type of mark first level subdirectory or son file is for acquiescence cleaning, above-mentioned residual catalogue, first level subdirectory or the son file detected can be presented at suggestion cleaning interface, wherein, the information such as the file suggestion deletion shown by user can be pointed out in suggestion cleaning interface.
Step S208, according to the confirmation operation of user on described suggestion cleaning interface, performs cleaning operation to described residual catalogue, described first level subdirectory or described son file.
In one embodiment, if the confirmation cleaning operation of user detected, then can perform cleaning operation to the first level subdirectory that suggestion cleaning interface shows or son file.Wherein, the confirmation operation of user can be detected according to various ways, as detected user to the touch control operation of terminal touching display screen, or the clicking operation etc. to virtual key; Also the touch control gesture by other correspondences confirms that user have input confirmation cleaning operation.
Step S209, if when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for acquiescence reservation, is presented at degree of depth cleaning interface by described residual catalogue, described first level subdirectory or described son file.
In one embodiment, when detecting that in step S204 the cleaning type of residual catalogue is for acquiescence reservation, or in step S205, detect that the cleaning type of first level subdirectory or son file is for acquiescence reservation, or in step S206, according to the cleaning type of residual catalogue, when the cleaning type of mark first level subdirectory or son file is for acquiescence reservation, can by the above-mentioned residual catalogue detected, first level subdirectory or son file are presented at degree of depth cleaning interface, wherein, degree of depth cleaning interface can be pointed out the file shown by user to comprise user and be set up information, suggestion user deletes cautiously or carries out the information such as retaining.
Step S210, according to the selection operation of user on described degree of depth cleaning interface, performs residual catalogue, first level subdirectory or the son file corresponding to selection operation and stores operation.
In one embodiment, user can select the list in degree of depth cleaning interface display, selection portion can divide reservation or all retain, when after selection operation user being detected, can store the execution of the residual catalogue selected, first level subdirectory or son file and operate.Then cleaning operation can be performed for the option in unselected list.
Step S211, if when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for clearing up, performs described residual catalogue, described first level subdirectory or described son file and stores operation.
In one embodiment, when detecting that in step S204 the cleaning type of residual catalogue is for clearing up, or when the cleaning type of first level subdirectory or son file being detected for clearing up in step S205, can perform above-mentioned residual catalogue, first level subdirectory or the son file that will not clear up and store operation, wherein, can be that the catalogue that will not clear up and file are stored to other paths of specifying by cleaning type, namely clearing up type by unified path management be the catalogue and file that will not clear up; Also can be, under the catalogue that will not clear up and file are stored in original path, do not carry out cleaning type any process, also it is not detected.
In the embodiment of the present invention, first can determine the Stub File in terminal under system storage catalogue, and by detecting the cleaning type of residual catalogue, determine the processing mode to this residual catalogue; If when the cleaning type of residual catalogue being detected for classification cleaning or classification reservation, then the cleaning type of the first level subdirectory that residual catalogue comprises can be detected further; If the not identified cleaning type of first level subdirectory detected, the cleaning type of this first level subdirectory then can be determined according to the cleaning type of residual catalogue, thus this first level subdirectory can be further processed, expand cleaning coverage rate, and the cleaning of the more degree of depth can be carried out current Stub File, the operational efficiency of terminal can be strengthened.
See Fig. 3, it is a kind of structural representation unloading an embodiment of the treating apparatus of Stub File in the present invention.Wherein this device can comprise: the first determination module 301, first detection module 302, second detection module 303, second determination module 304.
Wherein, the first determination module 301, for the residual catalogue under certainty annuity storage directory.
In one embodiment, after a certain application program is unloaded, the first determination module 301 needs to determine the Stub File in terminal under system storage catalogue.Concrete, the first determination module 301 is residual catalogue by the first class catalogue under various ways determination storage directory.As determined whether there is APMB package corresponding to unloaded application program in this first class catalogue, or determine that the application program of terminal installs the directory name that whether there is this first class catalogue in list; There is not the directory name that there is not this first class catalogue in APMB package or application program installation list if determine in this first class catalogue, then can determine that this first class catalogue is for residual catalogue.And then, according to the cleaning type of residual catalogue, a step process can be done to the residual catalogue determined.
First detection module 302, for detecting the cleaning type of described residual catalogue, wherein, described cleaning type comprise acquiescence cleaning, acquiescence retain, classification cleaning, classification retain and will not clear up.
In one embodiment, after certain first class catalogue under the first determination module 301 determines terminal system storage directory is for residual catalogue, first detection module 302 can detect the cleaning type of this residual catalogue.Concrete, cleaning type can comprise acquiescence cleaning, acquiescence retains, classification cleaning, classification retain and confirm cleaning.During as comprised file (as the temporary file etc.) only for application program in a certain catalogue; Or comprise user create but unreadable file (if suffix is the video file etc. of dat) time, then the cleaning type that can identify this catalogue is in advance acquiescence cleaning, namely when user need clear up residual catalogue, can advise clearing up this catalogue.When and for example comprising readable documents (as picture, the audio-video document etc.) of user's foundation in a certain catalogue, then can identify the cleaning type of this catalogue in advance for acquiescence reservation, namely when user need clear up residual catalogue, need the confirmation by user, could clear up the catalogue of the type, otherwise acquiescence retains this catalogue.
When there is sub-directory under a certain catalogue, and the not identified cleaning type of some or multiple sub-directory, then can identify the cleaning type of this catalogue in advance for classification cleaning or classification reservation, namely when user need clear up residual catalogue, if the cleaning type detecting residual catalogue is cleared up for classification or classification retains, then need the sub-directory traveling through this residual catalogue, different process operations is carried out to the sub-directory of difference cleaning type.Further, can according to the directory information of a certain catalogue, the cleaning type of pre-this catalogue of mark is cleared up for classification or classification retains; As this catalogue is created by application program, then can identify the cleaning type of this catalogue in advance for classification cleaning, if this catalogue is created by user, then the cleaning type that can identify this catalogue in advance retains for classifying.
If the file that a certain catalogue comprises is the file that will not clear up, then can identify the cleaning type of this catalogue in advance for clearing up.Namely, when user need clear up Stub File, the file of this cleaning type or catalogue are not detected.
Second detection module 303, during for the cleaning type of described residual catalogue being detected when described first detection module 302 for classification cleaning or classification reservation, detects the cleaning type of the first level subdirectory that described residual catalogue comprises.
In one embodiment, when first detection module 302 detects that the identified cleaning type of residual catalogue retains for classification cleaning or classification, then the second detection module 303 needs the cleaning type further detecting the first level subdirectory comprised in residual catalogue.According to the cleaning type of first level subdirectory, classification process is carried out to this first level subdirectory.Wherein, if the cleaning type of first level subdirectory is classification cleaning or classification reservation, then the cleaning type of the secondary sub-directory comprised under can continuing to detect this first level subdirectory.Can travel through the N level sub-directory to this residual catalogue or minimum first level subdirectory, wherein, not comprising cleaning type in N level sub-directory is the sub-directory that classification cleaning or classification retain.
Second determination module 304, for the not identified cleaning type of described first level subdirectory being detected when described second detection module 303, then according to the cleaning type of described residual catalogue, determines the cleaning type of described first level subdirectory.
In one embodiment, if the second detection module 303 detects the not identified cleaning type of some or multiple first level subdirectory in residual catalogue, then the second determination module 304 according to the cleaning type of this residual catalogue, can determine the cleaning type of first level subdirectory.Concrete, if the cleaning type of this residual catalogue is classification cleaning, then can determine that the cleaning type of this first level subdirectory is for acquiescence cleaning; If the cleaning type of this residual catalogue retains for classification, then can determine that the cleaning type of this first level subdirectory retains for giving tacit consent to.Thus, catalogue can be remained to certain one-level for mark cleaning type and be further processed.
In the embodiment of the present invention, first can determine the Stub File in terminal under system storage catalogue, and by detecting the cleaning type of residual catalogue, determine the processing mode to this residual catalogue; If when the cleaning type of residual catalogue being detected for classification cleaning or classification reservation, then the cleaning type of the first level subdirectory that residual catalogue comprises can be detected further; If the not identified cleaning type of first level subdirectory detected, the cleaning type of this first level subdirectory then can be determined according to the cleaning type of residual catalogue, thus this first level subdirectory can be further processed, expand cleaning coverage rate, and the cleaning of the more degree of depth can be carried out current Stub File, the operational efficiency of terminal can be strengthened.
See Fig. 4, it is a kind of structural representation unloading another embodiment of the treating apparatus of Stub File in the present invention.Wherein this device can comprise: the first determination module 401, first detection module 402, second detection module 403, second determination module 404, first display module 405, cleaning module 406, second display module 407, memory module 408.
Wherein, the first determination module 401, for the residual catalogue under certainty annuity storage directory.
In the embodiment of the present invention, the first determination module 401 comprises:
Acquiring unit 4011, for obtaining the first class catalogue under described system storage catalogue.
In one embodiment, when scanning the system storage catalogue of terminal, the first class catalogue under system storage catalogue in this terminal can be obtained.Wherein, regularly can scan system storage catalogue, to find residual catalogue, and the unloading that residual catalogue adds in terminal can be remained in storehouse; Also by triggering command, system storage catalogue is scanned, to find residual catalogue.
Judging unit 4012, for the first class catalogue for described acquisition, judges whether the application program that described first class catalogue is corresponding unloads.
In one embodiment, for obtained first class catalogue, by judging whether the application program that in terminal, this first class catalogue is corresponding unloads, determine just whether first class catalogue is residual catalogue.Wherein, judging unit 4012 can comprise the first judgment sub-unit and/or the second judgment sub-unit, concrete:
APMB package corresponding to this application program whether is there is in this first class catalogue as judged by the first judgment sub-unit.Concrete, inquire about by the local high frequency storehouse set up to terminal or server, inquire about the number of APMB package of correspondence and the filename of the APMB package of correspondence under this catalogue, and then judge whether also there is APMB package corresponding to this application program under this catalogue;
And for example, judge that the application program of terminal installs the directory name that whether also there is this first class catalogue in list by the second judgment sub-unit, due to the corresponding application program of this first class catalogue, there is not this first class catalogue if install in list in application program, then the application program showing its correspondence no longer application program is installed in list.
First determining unit 4013, if judge that the application program that described first class catalogue is corresponding unloads for judging unit 4012, then determines that all sub-directories under described first class catalogue and described first class catalogue are residual catalogue.
In one embodiment, when judging that the application program that in terminal, this first class catalogue is corresponding unloads by above-mentioned judgment sub-unit, then the first determining unit 4013 can determine that all sub-directories under this first class catalogue and first class catalogue are residual catalogue, and all son files under this first class catalogue are Stub File.Concrete, when there is not APMB package corresponding to this application program in the first class catalogue judging terminal, or the application program of terminal installs the directory name that there is not this catalogue in list, then can determine that this catalogue is for residual catalogue, and all sub-directories under this first class catalogue are also residual catalogue.
First detection module 402, for detecting the cleaning type of described residual catalogue, wherein, described cleaning type comprise acquiescence cleaning, acquiescence retain, classification cleaning, classification retain and will not clear up.
In one embodiment, after certain first class catalogue under the first determining unit 4013 determines terminal system storage directory is for residual catalogue, first detection module 402 can detect the cleaning type of this residual catalogue.Concrete, cleaning type can comprise acquiescence cleaning, acquiescence retains, classification cleaning, classification retain and confirm cleaning.During as comprised file (as the temporary file etc.) only for application program in a certain catalogue; Or comprise user create but unreadable file (if suffix is the video file etc. of dat) time, then the cleaning type that can identify this catalogue is in advance acquiescence cleaning, namely when user need clear up residual catalogue, can advise clearing up this catalogue.When and for example comprising readable documents (as picture, the audio-video document etc.) of user's foundation in a certain catalogue, then can identify the cleaning type of this catalogue in advance for acquiescence reservation, namely when user need clear up residual catalogue, need the confirmation by user, could clear up the catalogue of the type, otherwise acquiescence retains this catalogue.
When there is sub-directory under a certain catalogue, and the not identified cleaning type of some or multiple sub-directory, then can identify the cleaning type of this catalogue in advance for classification cleaning or classification reservation, namely when user need clear up residual catalogue, if the cleaning type detecting residual catalogue is cleared up for classification or classification retains, then need the sub-directory traveling through this residual catalogue, different process operations is carried out to the sub-directory of difference cleaning type.Further, can according to the directory information of a certain catalogue, the cleaning type of pre-this catalogue of mark is cleared up for classification or classification retains; As this catalogue is created by application program, then can identify the cleaning type of this catalogue in advance for classification cleaning, if this catalogue is created by user, then the cleaning type that can identify this catalogue in advance retains for classifying.
If the file that a certain catalogue comprises is the file that needs retain, then can identify the cleaning type of this catalogue in advance for clearing up.Namely, when user need clear up Stub File, the confirmation without the need to user can retain this catalogue.
Second detection module 403, for cleaning type that described residual catalogue detected when described first detection module 402 for classification cleaning or classification retain time, detect the cleaning type of first level subdirectory that described residual catalogue comprises or son file.
In one embodiment, when first detection module 402 detects that the cleaning type of residual catalogue retains for classification cleaning or classification, then the second detection module 403 needs the cleaning type further detecting the first level subdirectory comprised in residual catalogue, if comprise son file in current residual catalogue, then also need the cleaning type detecting this son file.Wherein, the cleaning type of first level subdirectory or one-level son file is identical with the cleaning type of residual catalogue, if when the cleaning type of first level subdirectory or son file being detected for acquiescence cleaning, the cleaning type that processing mode is equal to residual catalogue is when giving tacit consent to cleaning, can clear up according to the first display module 405 and cleaning module 406 to the catalogue of this cleaning type or file; If when the cleaning type of first level subdirectory or son file being detected for acquiescence reservation, the cleaning type that processing mode is equal to residual catalogue is, when giving tacit consent to reservation, can process according to the second display module 407 and memory module 408 to the catalogue of this cleaning type or file; If when cleaning type first level subdirectory or son file being detected is for clearing up, then can according to the cleaning of residual catalogue be will not clear up time mode, can process the catalogue of this cleaning type or file according to memory module 408.
Wherein, if when the manner of cleaning up of first level subdirectory being detected still for classification cleaning or classification reservation, because first level subdirectory is also residual catalogue, by the mode that above-mentioned module performs, also by the mode of the execution of module described in a upper embodiment, using current first level subdirectory as residual catalogue, continue to travel through the sub-directory under it.
Second determination module 404, for the not identified cleaning type of described first level subdirectory being detected when described second detection module 403, then according to the cleaning type of described residual catalogue, determines the cleaning type of described first level subdirectory.
In one embodiment, if the second detection module 403 detects some or multiple first level subdirectory in residual catalogue or the not identified cleaning type of son file, then the second determination module 404 according to the cleaning type of this residual catalogue, can determine the cleaning type of first level subdirectory or son file.Concrete, if the cleaning type of this residual catalogue is classification cleaning, then can determine that the cleaning type of this first level subdirectory or son file is for acquiescence cleaning; If the cleaning type of this residual catalogue retains for classification, then can determine that the cleaning type of this first level subdirectory or son file retains for giving tacit consent to.And then, according to lower module, the first level subdirectory or son file identifying cleaning type can be processed, equally, be also identified as acquiescence cleaning by following resume module cleaning type, give tacit consent to the residual catalogue retaining and maybe will not clear up.
First display module 405, if detect for described first detection module 402 or described second detection module 403 or cleaning type that described second determination module 404 determines described residual catalogue, described first level subdirectory or described son file for acquiescence cleaning time, described residual catalogue, described first level subdirectory or described son file are presented at suggestion cleaning interface.
In one embodiment, when first detection module 402 detects that the cleaning type of residual catalogue is for acquiescence cleaning, or second detection module 403 cleaning type that first level subdirectory or son file detected be acquiescence cleaning, or second determination module 404 according to the cleaning type of residual catalogue, when the cleaning type of mark first level subdirectory or son file is for acquiescence cleaning, above-mentioned residual catalogue, first level subdirectory or the son file detected can be presented at suggestion cleaning interface, wherein, the information such as the file suggestion deletion shown by user can be pointed out in suggestion cleaning interface.
Cleaning module 406, for according to the confirmation operation of user on described suggestion cleaning interface, performs cleaning operation to described residual catalogue, described first level subdirectory or described son file.
In one embodiment, if the confirmation cleaning operation of user detected, then clear up module 406 and can perform cleaning operation to the first level subdirectory that suggestion cleaning interface shows or son file.Wherein, the confirmation operation of user can be detected according to various ways, as detected user to the touch control operation of terminal touching display screen, or the clicking operation etc. to virtual key; Also the touch control gesture by other correspondences confirms that user have input confirmation cleaning operation.
Second display module 407, if detect for described first detection module 402 or described second detection module 403 or cleaning type that described second determination module 404 determines described residual catalogue, described first level subdirectory or described son file for acquiescence retain time, described residual catalogue, described first level subdirectory or described son file are presented at degree of depth cleaning interface.
In one embodiment, when detecting that at first detection module 402 the cleaning type of residual catalogue is for acquiescence reservation, or detect that the cleaning type of first level subdirectory or son file is for acquiescence reservation at the second detection module 403, or in the cleaning type of the second determination module 404 according to residual catalogue, when the cleaning type of mark first level subdirectory or son file is for acquiescence reservation, can by the above-mentioned residual catalogue detected, first level subdirectory or son file are presented at degree of depth cleaning interface, wherein, degree of depth cleaning interface can be pointed out the file shown by user to comprise user and be set up information, suggestion user deletes cautiously or carries out the information such as retaining.
Memory module 408, for according to the selection operation of user on described degree of depth cleaning interface, performs residual catalogue, first level subdirectory or the son file corresponding to selection operation and stores operation.
In one embodiment, user can select the list in degree of depth cleaning interface display, selection portion can divide reservation or all retain, when after selection operation user being detected, memory module 408 can perform to store to the residual catalogue selected, first level subdirectory or son file and operate.Then cleaning operation can be performed for the option in unselected list.
Wherein, memory module 408, if when also the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for clearing up for described first detection module 402 or described second detection module 403, described residual catalogue, described first level subdirectory or described son file are performed and stores operation.
In one embodiment, when first detection module 402 detects that the cleaning type of residual catalogue is for clearing up, or second detection module 403 first level subdirectory or son file detected cleaning type for clearing up time, can perform above-mentioned residual catalogue, first level subdirectory or the son file that will not clear up and store operation, wherein, can be that the catalogue that will not clear up and file are stored to other paths of specifying by cleaning type, namely clearing up type by unified path management be the catalogue and file that will not clear up; Also can be, under the catalogue that will not clear up and file are stored in original path, do not carry out cleaning type any process, also it is not detected.
In the embodiment of the present invention, first can determine the Stub File in terminal under system storage catalogue, and by detecting the cleaning type of residual catalogue, determine the processing mode to this residual catalogue; If when the cleaning type of residual catalogue being detected for classification cleaning or classification reservation, then the cleaning type of the first level subdirectory that residual catalogue comprises can be detected further; If the not identified cleaning type of first level subdirectory detected, the cleaning type of this first level subdirectory then can be determined according to the cleaning type of residual catalogue, thus this first level subdirectory can be further processed, expand cleaning coverage rate, and the cleaning of the more degree of depth can be carried out current Stub File, the operational efficiency of terminal can be strengthened.
See Fig. 5, it is the structural representation of an embodiment of a kind of terminal in the present invention.This terminal can comprise: at least one processor 501, as CPU, and at least one user interface 503, storer 504 and at least one communication bus 502.Wherein, communication bus 502 is for realizing the connection communication between these assemblies, user interface 503 can comprise display screen (Display) and keyboard (Keyboard), optionally, user interface 503 can also comprise wireline interface and the wave point of standard, storer 504 can be high-speed RAM storer, also can be non-labile storer (non-volatilememory), as at least one magnetic disk memory, optionally, storer 504 can also be that at least one is positioned at the memory storage away from aforementioned processor 501.Wherein, in storer 504, store batch processing code, and processor 501 calls the program code stored in storer 504, for performing following operation:
Residual catalogue under certainty annuity storage directory;
Detect the cleaning type of described residual catalogue, wherein, described cleaning type comprise acquiescence cleaning, acquiescence retain, classification cleaning, classification retain and will not clear up;
If when the cleaning type of described residual catalogue being detected for classification cleaning or classification reservation, detect the cleaning type of the first level subdirectory that described residual catalogue comprises;
If the not identified cleaning type of described first level subdirectory detected, then according to the cleaning type of described residual catalogue, determine the cleaning type of described first level subdirectory.
As optional embodiment, the concrete mode of the residual catalogue under processor 501 certainty annuity storage directory is:
Obtain the first class catalogue under described system storage catalogue;
For the first class catalogue of described acquisition, judge whether the application program that described first class catalogue is corresponding unloads;
If judge that the application program that described first class catalogue is corresponding unloads, then determine that all sub-directories under described first class catalogue and described first class catalogue are residual catalogue.
As optional embodiment, processor 501, for obtained first class catalogue, judges that the concrete the mode whether application program that described first class catalogue is corresponding has unloaded is:
Judge in described first class catalogue, whether to there is APMB package corresponding to described application program, if there is no then determine that the application program that described first class catalogue is corresponding unloads; Or
Judge that application program installs the directory name that whether there is described first class catalogue in list, if there is no then determine that the application program that described first class catalogue is corresponding unloads.
As optional embodiment, processor 501, according to the cleaning type of described residual catalogue, determines that the concrete mode of the cleaning type of described first level subdirectory is:
If the cleaning type of described residual catalogue is classification cleaning, then determine that the cleaning type of described first level subdirectory is for acquiescence cleaning;
If the cleaning type of described residual catalogue retains for classification, then determine that the cleaning type of described first level subdirectory retains for giving tacit consent to.
As optional embodiment, processor 501 also calls the program code that storer 504 stores, for performing following operation:
If when the cleaning type of described residual catalogue being detected for classification cleaning or classification reservation, detect the cleaning type of the son file that described residual catalogue comprises;
The not identified cleaning type of son file that described residual catalogue comprises if detect, then according to the cleaning type of described residual catalogue, determine the cleaning type of the son file that described residual catalogue comprises.
As optional embodiment, processor 501, according to the cleaning type of described residual catalogue, determines that the concrete mode of the cleaning type of the son file that described residual catalogue comprises is:
If the cleaning type of described residual catalogue is classification cleaning, then determine that the cleaning type of the son file that described residual catalogue comprises is for acquiescence cleaning;
If the cleaning type of described residual catalogue retains for classification, then determine that the cleaning type of the son file that described residual catalogue comprises retains for giving tacit consent to.
As optional embodiment, processor 501 also calls the program code that storer 504 stores, for performing following operation:
If when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for acquiescence cleaning, described residual catalogue, described first level subdirectory or described son file are presented at suggestion cleaning interface;
According to the confirmation operation of user on described suggestion cleaning interface, cleaning operation is performed to described residual catalogue, described first level subdirectory or described son file.
As optional embodiment, processor 501 also calls the program code that storer 504 stores, for performing following operation:
If when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for acquiescence reservation, described residual catalogue, described first level subdirectory or described son file are presented at degree of depth cleaning interface;
According to the selection operation of user on described degree of depth cleaning interface, residual catalogue, first level subdirectory or the son file corresponding to selection operation is performed and stores operation.
As optional embodiment, processor 501 also calls the program code that storer 504 stores, for performing following operation:
If when the cleaning type of described residual catalogue, described first level subdirectory or described son file being detected for clearing up, described residual catalogue, described first level subdirectory or described son file are performed and stores operation.
In the embodiment of the present invention, first can determine the Stub File in terminal under system storage catalogue, and by detecting the cleaning type of residual catalogue, determine the processing mode to this residual catalogue; If when the cleaning type of residual catalogue being detected for classification cleaning or classification reservation, then the cleaning type of the first level subdirectory that residual catalogue comprises can be detected further; If the not identified cleaning type of first level subdirectory detected, the cleaning type of this first level subdirectory then can be determined according to the cleaning type of residual catalogue, thus this first level subdirectory can be further processed, expand cleaning coverage rate, and the cleaning of the more degree of depth can be carried out current Stub File, the operational efficiency of terminal can be strengthened.
Device embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.Those of ordinary skill in the art, when not paying performing creative labour, are namely appreciated that and implement.
Step in embodiment of the present invention method can be carried out order according to actual needs and be adjusted, merges and delete.
Unit in embodiment of the present invention terminal or equipment or subelement can carry out merging, divide and deleting according to actual needs.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that each embodiment can add required general hardware platform by software and realize, and can certainly pass through hardware.Based on such understanding, technique scheme can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product can store in a computer-readable storage medium, as ROM/RAM, magnetic disc, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment or embodiment.
Above-described embodiment, does not form the restriction to this technical scheme protection domain.The amendment done within any spirit at above-mentioned embodiment and principle, equivalently to replace and improvement etc., within the protection domain that all should be included in this technical scheme.