CN104239091B - File cleaning method and device and terminal - Google Patents

File cleaning method and device and terminal Download PDF

Info

Publication number
CN104239091B
CN104239091B CN201410422443.XA CN201410422443A CN104239091B CN 104239091 B CN104239091 B CN 104239091B CN 201410422443 A CN201410422443 A CN 201410422443A CN 104239091 B CN104239091 B CN 104239091B
Authority
CN
China
Prior art keywords
msp
files
fileinfo
redundancy
file
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.)
Active
Application number
CN201410422443.XA
Other languages
Chinese (zh)
Other versions
CN104239091A (en
Inventor
程海涛
赵昱
黄舰
刘桂峰
姚辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Baoqu Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201410422443.XA priority Critical patent/CN104239091B/en
Publication of CN104239091A publication Critical patent/CN104239091A/en
Application granted granted Critical
Publication of CN104239091B publication Critical patent/CN104239091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a file cleaning method, which comprises the following steps: receiving a cleaning instruction for cleaning junk files; according to the cleaning instruction, identifying redundant MSP files in a registry scanning mode; acquiring the file name and the associated storage path of the redundant MSP file; and deleting the redundant MSP file according to the file name and the associated storage path of the redundant MSP file. The embodiment of the invention also discloses a file cleaning device and a terminal. By adopting the embodiment of the invention, the accuracy and the efficiency of the clear redundant MSP file can be improved.

Description

A kind of file clean-up method, device and terminal
Technical field
The present invention relates to field of computer technology, more particularly to a kind of file clean-up method, device and terminal.
Background technology
Windows Installer are more than installation procedure, but also are expansible software management systems, and it is mainly wrapped Include following functions:The installation of management software, the addition of management software component and deletion, monitoring file reset and use rollback skill Art safeguards basic disaster recovery etc..Want to use these functions, must just use MSI (Microsoft Software Installer, Microsoft's application installer) file, wherein, MSI files are to be based on Windows Installer software installation technologies The software installation APMB package of making.
Generally, when the application software based on Windows Installer fabrication techniques is installed, Windows Installer The MSP files of generation can be discharged into %systemroot% in Installer catalogues;After user unloads the application software, Some the MSP files related to the application software retained under this catalogue can't be automatically deleted, so that it is empty to take disk Between, wherein, MSP files refer to the intermediate file produced in MSI file processes are installed, such as repair patch, services package (Service pack) etc..
To avoid MSP files from taking disk space, conventional method be it is direct delete %systemroot% Installer Whole catalogue, can not normally be transported however, this method may result in based on the Windows Installer partial softwares installed OK.
The content of the invention
The embodiment of the present invention provides a kind of file clean-up method, device and terminal, can improve the MSP files of cleaning redundancy The degree of accuracy and efficiency.
The embodiment of the present invention provides a kind of file clean-up method, including:
The cleaning for clearing up garbage files is received to instruct;
Instructed according to the cleaning, by way of scanning registration table, recognize the MSP files of redundancy;
Obtain the file name and the store path associated of the MSP files of the redundancy;
According to the file name of the MSP files of the redundancy and the store path associated, the MSP files of the redundancy are deleted.
Correspondingly, the embodiment of the present invention also provides a kind of file clean-up device, including:
Receiving module, for receiving the cleaning instruction for being used to clear up garbage files;
Identification module, for being instructed according to the cleaning, by way of scanning registration table, recognizes the MSP files of redundancy;
Acquisition module, file name and the store path associated for the MSP files that obtain the redundancy;
Removing module, for file name and the store path associated of the MSP files according to the redundancy, deletes this superfluous Remaining MSP files.
Correspondingly, the embodiment of the present invention also provides a kind of terminal, including file clean-up device as described above.
Implement the embodiment of the present invention, when receiving cleaning instruction, scan registration table, recognize the MSP files of redundancy and obtain The file name of the MSP files of the redundancy identified and the store path associated;According to the MSP files of accessed redundancy File name and the store path associated, delete the MSP files of the redundancy.Using the embodiment of the present invention, cleaning can be improved The degree of accuracy of the MSP files of redundancy and efficiency.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, makes required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached Figure.
Fig. 1 is a kind of schematic flow sheet of file clean-up method provided in an embodiment of the present invention;
Fig. 2 is a kind of another schematic flow sheet of file clean-up method provided in an embodiment of the present invention;
Fig. 2 a are the schematic flow sheets of the method for the one of which identification redundant file that Fig. 2 is provided;
Fig. 3 is a kind of another schematic flow sheet of file clean-up method provided in an embodiment of the present invention;
Fig. 3 a are a kind of schematic flow sheets for file matching method that Fig. 3 is provided;
Fig. 4 is a kind of another schematic flow sheet of file clean-up method provided in an embodiment of the present invention;
Fig. 4 a are the schematic diagrames that the one of which that Fig. 4 is provided shows redundant file list;
Fig. 5 is a kind of structural representation of file clean-up device provided in an embodiment of the present invention;
Fig. 6 is a kind of another structural representation of file clean-up device provided in an embodiment of the present invention;
Fig. 6 a are the structural representations for the one of which identification module that Fig. 6 is provided;
Fig. 6 b are another structural representations for the one of which identification module that Fig. 6 is provided;
Fig. 7 is a kind of structural representation of terminal provided in an embodiment of the present invention;
Fig. 8 is a kind of another structural representation of file clean-up device provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
The embodiments of the invention provide a kind of file clean-up method, device and terminal, known by way of scanning registration table The MSP files of other redundancy, and the file name and store path of the MSP files of the redundancy are further obtained, delete the redundancy MSP files.Using the embodiment of the present invention, the degree of accuracy and the efficiency of the MSP files of cleaning redundancy can be improved.Below in conjunction with attached Fig. 1-accompanying drawing 8 describes in detail respectively to a kind of file clean-up method provided in an embodiment of the present invention, device and terminal.
Fig. 1 is referred to, Fig. 1 is a kind of schematic flow sheet of file clean-up method provided in an embodiment of the present invention, in this hair In bright embodiment, this method may comprise steps of.
S101:The cleaning for clearing up garbage files is received to instruct.
In the embodiment of the present invention, methods described can be applied in optimization class software, can also be carried in application program In Unload module, specifically, the embodiment of the present invention is not restricted.For convenience of description, the embodiment of the present invention is to apply in computer On optimization class software in exemplified by, but it should explanation, the embodiment of the present invention is not limited to using in a computer, and do not limit In for optimizing in class software, every device that can implement the embodiment of the present invention is belonged to needed for the embodiment of the present invention The scope of protection.
In the embodiment of the present invention, when receiving cleaning instruction, the inventive method is performed, wherein, the cleaning instruction refers to Instruction for clearing up garbage files.For example:" key cleaning " button in application software " Kingsoft bodyguard " is clicked on, cleaning is sent Instruction, so that computer receives cleaning instruction;Again for example:After COMPUTER DETECTION has been unloaded to application software, automatically initiate clear Reason instruction;Again for example:Computer is periodically executed the cleaning of rubbish, so as to automatically initiate cleaning garbage files every preset duration Cleaning instruction.Specifically, the embodiment of the present invention is not restricted.
S102:Instructed according to the cleaning, by way of scanning registration table, recognize the MSP files of redundancy.
Generally, when the application software based on Windows Installer fabrication techniques is installed, Windows Installer The MSP files of generation can be discharged into %systemroot% backed up in Installer catalogues, the MSP files discharged It can be used for reparation operation of the application software etc., meanwhile, these MSP files synchronously can be also documented in registration table.Wherein, % Systemroot% is a windows system parameter values, represents windows installation directory, and %systemroot% is general In the case of be C:Windows, be also likely to be D according to installation directory difference:\Windows、C:WinXP etc..In general, After the application software unloading of certain MSI type, what the application software of this MSI type was produced or discharge in use owns MSP files can turn into invalid MSP files, accordingly, in registration table the MSP files will be marked to be invalid MSP files.So And, existing software uninstalling method is unloaded after the application software of the type, can't go to be automatically deleted soft with unloaded application The associated MSP files of part, therefore, cause the MSP files of this partial invalidity to take the disk space of computer, increase computer Storage burden.Certainly, also part MSP files are caused to turn into redundant file in the presence of some other situations, for example:Run patch journey During sequence, Windows Installer by the MSP files of generation be discharged into %systemroot% in Installer catalogues, draw Lead the user installation patch, if user guide install during click cancellation operation or patch installs necessary requirement Not enough and cause install failure, Windows Installer will move out installation procedure, by be discharged into %systemroot% MSP files inside Installer catalogues are remained;When user runs same patch again, Windows Installer again can %systemroot% the (filename and upper of new MSP files of generation one inside Installer catalogues Difference once), the MSP files without the MSP files produced using last time release, therefore last release generation also will MSP files as redundancy.
In the embodiment of the present invention, receive after cleaning instruction, scan registration table, recognize the MSP files of redundancy, so that, lead to The MSP files of redundancy on the mode of registration table, identification computer are over-scanned, recognize that the speed of the MSP files of redundancy is fast, efficiency It is high.
What deserves to be explained is, the method that the MSP files of redundancy are recognized in the embodiment of the present invention can be direct scanning registration Table obtains MSP files invalid on computer, and accessed invalid MSP files are defined as to the MSP files of redundancy;Also may be used To be that scanning registration table obtains effective MSP files on computer, excluded from all MSP files on computer accessed Effective MSP files, remaining MSP files may be considered the MSP files of redundancy.Specifically, the embodiment of the present invention is not It is restricted.
S103:Obtain the file name and the store path associated of the MSP files of the redundancy.
After the MSP files that redundancy is recognized by step S102, the MSP of the redundancy is further obtained by way of registration table The file name of file and the store path associated, wherein, the storage associated by the file name and with the file name Path uniquely determines a MSP file.For example:The file name of the MSP files of acquired redundancy is 1fd27a.msp, storage Path is C:Windows the MSP files of Installer, the i.e. redundancy refer to C:\Windows\Installer\ 1fd27a.msp。
S104:According to the file name of the MSP files of the redundancy and the store path associated, the MSP of the redundancy is deleted File.
According to the file name of the MSP files of the step S103 redundancies got and the store path associated, delete this and deposit Store up the MSP files of the file name of the MSP files of the entitled accessed redundancy of file under path.For example:Delete storage road Footpath C:Under Windows Installer the entitled 1fd27a.msp of file MSP files.
In the file clean-up method that the embodiment of the present invention is described, when receiving cleaning instruction, registration table is scanned, is recognized superfluous Remaining MSP files and the file name and the store path associated of the MSP files for obtaining identified redundancy;According to acquired The file name of the MSP files of the redundancy arrived and the store path associated, delete the MSP files of the redundancy.Using of the invention real Example is applied, the degree of accuracy and the efficiency of the MSP files of cleaning redundancy can be improved.
Fig. 2 is referred to, Fig. 2 is a kind of another schematic flow sheet of file clean-up method provided in an embodiment of the present invention, In the embodiment of the present invention, this method may comprise steps of.
S201:The cleaning for clearing up garbage files is received to instruct.
For example:User clicks on " key cleaning " button in application software " Kingsoft bodyguard ", sends cleaning instruction;Computer When detecting the application software of unloading MSI types, the cleaning instruction of cleaning garbage files is automatically initiated;Computer is periodically executed rubbish The cleaning of rubbish, so that, cleaning instruction of cleaning garbage files etc. is automatically initiated every preset duration.In the embodiment of the present invention, The cleaning that computer receives for clearing up garbage files is instructed.
S202:By way of scanning registration table, the state flag bit of MSP files is obtained.
Generally, when the application software based on Windows Installer fabrication techniques is installed, Windows Installer The MSP files of generation can be discharged into %systemroot% backed up in Installer catalogues, the MSP files can be used Operated in the reparation of the software etc., accordingly, these MSP files synchronously can be also documented in registration table.In general, certain money After the application software unloading of MSI types, all MSP that the application software of this MSI type is produced or discharged in use File can turn into invalid MSP files, accordingly, in registration table the MSP files will be marked to be invalid MSP files.However, Existing software uninstalling method is unloaded after the application software of the type, can't go to be automatically deleted and unloaded application software phase The MSP files of association, therefore, cause the MSP files of this partial invalidity to take the disk space of computer, increase depositing for computer Storage burden.In the embodiment of the present invention, receive after cleaning instruction, scan registration table, recognize the MSP files of redundancy, so that, pass through The MSP files of redundancy on the mode of registration table, identification computer are scanned, recognize that the speed of the MSP files of redundancy is fast, efficiency high.
For example:Each MSP files institute of different application software under currently logged on user is obtained by way of scanning registration table Including sub-key in numerical designations be " State " numeric data, for convenience of description, such as obtained by way of scanning registration table The numeric data of following sub-key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\ CurrentVersion\Installer\UserData\S-1-5-18\Products\ 00002109150000000000000000F01FEC Patches institute under 5A9E342B77DEB1F43B834268DF28CD58 Including sub-key in numerical designations be " State " numeric data.What deserves to be explained is, in above-mentioned registration table path, sub-key The first sub-key " S-1-5-18 " under " UserData " represents the second sub-key under User logs in mark, sub-key " Products " " 00002109150000000000000000F01FEC " represents the exclusive identification code of the application software of MSI types, sub-key The 3rd sub-key " 5A9E342B77DEB1F43B834268DF28CD58 " under " Patches " represents related to the application software The exclusive identification code of MSP files.Understand, in registration table, MSI files and MSP files pass through the exclusive identification code of file respectively To distinguish.What deserves to be explained is, in actual process, the title of the first sub-key, the second sub-key and the 3rd sub-key is by reality Situation determines, the titles of these three sub-keys respectively by active user's mark of log into thr computer, the application software of MSP types only The exclusive identification code of one identification code and MSP files is determined.
S203:If the value for identifying the state flag bit is preset value, the MSP files that the MSP files are redundancy are determined, Wherein, it is invalid MSP files that the MSP files are represented when the value of the state flag bit of MSP files is the preset value.
Generally, registration table is when marking MSI files and MSP files, if user unloads some MSI file, corresponding application is soft Part, then change the state flag bit of the MSP file relevant with the application software in registration table, the value of the state flag bit is changed For preset value, so that, the value of the state flag bit of MSP files represents that the MSP files are invalid MSP texts when being the preset value Part.In the embodiment of the present invention, after the state flag bit for getting MSP files by step S202, the value of the state flag bit is recognized Whether it is preset value, if, it is determined that the MSP files are the MSP files of redundancy;If it is not, then can not directly determine the MSP files Whether the MSP files of redundancy, can use correlation technique further recognize the MSP files whether for redundancy MSP files, Can be without further identification, specifically, the embodiment of the present invention is not restricted.But, it is preferred that it can use such as Fig. 2 a institutes The method shown further is recognized to the MSP files that the value of state flag bit is not the preset value, recognizes that the MSP files are The no MSP files for redundancy.
For example:For convenience of description, it is assumed that get HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\ 00002109150000000000000000F01FEC\Patches\5A9E342B77DEB1F43B834268DF28CD58
" State "=" 2 "
Wherein, sub-key " State " is the state flag bit of MSP files, in the embodiment of the present invention, for convenience of description, it is assumed that Preset value is 2, then can determine that the MSP files that exclusive identification code is " 5A9E342B77DEB1F43B834268DF28CD58 " are The MSP files of redundancy.
S204:Obtain the file name and the store path associated of the MSP files of the redundancy.
The MSP files of redundancy according to determined by step S203, by way of scanning registration table, further obtain this superfluous The file name of remaining MSP files and the store path associated.
For convenience of understanding, continuation is illustrated with above-mentioned example, and getting exclusive identification code by step S203 is After the MSP files of " 5A9E342B77DEB1F43B834268DF28CD58 " is the MSP files of redundancy, registration table is scanned, is obtained For pointing to, local exclusive identification code is believed for the path of the MSP files of " 5A9E342B77DEB1F43B834268DF28CD58 " Breath.For example:The numeric data of following sub-key is obtained by way of scanning registration table:HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\ Patches in sub-key included under 5A9E342B77DEB1F43B834268DF28CD58 numerical designations be The numeric data of " LocalPackage ", wherein, in the sub-key " S-1-5-18 " and step S203 under sub-key " UserData " The title of the first sub-key under sub-key " UserData " is identical, the sub-key under sub-key " Patches " " 5A9E342B77DEB1F43B834268DF28CD58 " and the name of the second sub-key under the sub-key " Patches " in step S203 Claim identical.
Assuming that get HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion\Installer\UserData\S-1-5-18\Patches\ 5A9E342B77DEB1F43B834268DF28CD58
" LocalPackage "=" C:\Windows\Installer\2f046.msp”
Then understand, exclusive identification code is the MSP files of the redundancy of " 5A9E342B77DEB1F43B834268DF28CD58 " File name be 2f046.msp, store path associate with the file name of the MSP files be C:\Windows\ Installer。
S205:According to the file name of the MSP files of the redundancy and the store path associated, the MSP of the redundancy is deleted File.
According to the file name of the MSP files of the step S204 redundancies got and the store path associated, delete this and deposit Store up the MSP files of the file name of the MSP files of the entitled accessed redundancy of file under path.For example:Delete storage road Footpath C:Under Windows Installer the entitled 2f046.msp of file MSP files.What deserves to be explained is or root According to the routing information of the MSP files of accessed redundancy, such as C:Windows Installer 2f046.msp, directly delete The MSP files of the redundancy.
What deserves to be explained is, before the MSP files of redundancy are deleted, can also according to the file names of the MSP files and Store path, detects that the MSP files of the entitled file name specified of file in the store path specified whether there is, if depositing Then deleting the MSP files.
In the file clean-up method that the embodiment of the present invention is described, when receiving cleaning instruction, registration table is scanned, is recognized superfluous Remaining MSP files and the file name and the store path associated of the MSP files for obtaining identified redundancy;According to acquired The file name of the MSP files of the redundancy arrived and the store path associated, delete the MSP files of the redundancy.Using of the invention real Example is applied, the degree of accuracy and the efficiency of the MSP files of cleaning redundancy can be improved.
What deserves to be explained is, in the above-described embodiments, after the state flag bit that MSP files are obtained according to step S202, Can also not be the preset value to the value of state flag bit if the value for identifying the state flag bit is not the preset value MSP files determined whether, recognize the MSP files whether be redundancy MSP files.As shown in Figure 2 a, Fig. 2 a are Fig. 2 The schematic flow sheet of the method for the one of which identification redundant file of offer, this method may comprise steps of.
S202a:The value for obtaining state flag bit is not the fileinfo of the MSP files of the preset value, this document information File name and the store path associated including the MSP files.
After the state flag bit for getting MSP files by step S202, if the value of accessed state flag bit is not The preset value, obtains the fileinfo of the MSP files, and this document information includes the file names of the MSP files and associated Store path.
For example:For convenience of description, it is assumed that get HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\ 68AB67CA7DA72502B744BA0000000010\Patches\68AB67CA7DA700005205A7C804100180
" State "=" 1 "
Understand, the value of the state flag bit is not the preset value pre-set, then further obtaining exclusive identification code is The file name of the MSP files of " 68AB67CA7DA700005205A7C804100180 " and the store path associated.
For example:Assuming that get HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion\Installer\UserData\S-1-5-18\Patches\ 68AB67CA7DA700005205A7C804100180
" LocalPackage "=" C:\Windows\Installer\16957b5.msp”
Then understand, exclusive identification code is the file of the MSP files of " 68AB67CA7DA700005205A7C804100180 " Entitled 16957b5.msp, the store path associated with the file name of the MSP files is C:\Windows\Installer.
S202b:The fileinfo of effective MSP files is obtained, this document information includes the text of the effective MSP files Part title and the store path associated.
Generally, effective MSP file consolidations record is led under a certain path, therefore in the embodiment of the present invention in registration table The mode of overscanning registration table obtains the fileinfo of effective MSP files.
For example:Obtained by way of scanning registration table in the sub-key " SourceList " included by effective MSP files Numerical designations are the numeric data of " PackageName ", for convenience of description, following son are such as obtained by way of scanning registration table The numeric data of key:
HKEY_CLASSES_ROOT\Installer\Patches\DC3BF90CC0D3D2F398A9A6D1762F70F3\ SourceList
" PackageName "=" KB958481.msp "
What deserves to be explained is, the 4th sub-key under sub-key " Patches " " DC3BF90CC0D3D2F398A9A6D1762F70F3 " represents the exclusive identification code of effective MSP files.In actual treatment mistake Cheng Zhong, the title of the 4th sub-key determines by actual conditions, generally, HKEY_CLASSES_ROOT Installer Patches' The fileinfo of the MSP files of mass efficient can be recorded under registration table path.
Further, the effective MSP that file name is " KB958481.msp " is obtained by way of scanning registration table The store path of file association, such as:HKEY_CLASSES_ROOT\Installer\Patches\ DC3BF90CC0D3D2F398A9A6D1762F70F3\SourceList\Net
" 1 "=" C:\windows\system32\installer\KB958481.msp”
So as to, it is known that, the file name of effective MSP files is KB958481.msp, and store path associated with it is C:\windows\system32\installer。
S202c:If the value of state flag bit be not the MSP files of the preset value fileinfo with it is described effective The fileinfos of MSP files is mismatched, during the value for determining state flag bit is not the fileinfo of MSP files of the preset value MSP files corresponding to unmatched fileinfo are the MSP files of redundancy.
For example:The routing information of the MSP files, such as C are constructed with the store path associated according to file name:\ Windows system32 installer KB958481.msp, the value for comparing state flag bit is not the MSP of the preset value The routing information of file whether there is in the routing information of the fileinfo of effective MSP files, if in the presence of matching;If It is not present, then mismatches.
Again for example:Can also be by the value of the step S202a state flag bits got be not the preset value MSP text The fileinfo of part is believed as shown in first group of data in table 1 by the file of the step S202b effective MSP files got Breath is as shown in second group of data in table 1.Recognize wall scroll data in table 1 in first group of data whether with second group of data A wherein data is matched, if there are the data as the wall scroll data in first group of data, i.e. file in second group of data Title and the store path all same associated, then the wall scroll data in first group of data and second group of Data Matching, so as to Using the MSP files specified by this group of data for determining to match in first group of data as effective MSP files;If in second group of data In the absence of the wall scroll data in first group of data, that is, there is file name and/or store path is differed, then can determine first The MSP files specified by the wall scroll data in group data are not effective MSP files, further be can determine that in first group of data The wall scroll data specified by MSP files be redundancy MSP files.
The one of which fileinfo provided in an embodiment of the present invention of table 1
In table 1, first group of data refers to that the value of state flag bit is not the file letter of the MSP files of the preset value Breath, second group of data refer to the fileinfo of effective MSP files.As it can be seen from table 1 only first number in first group of data According to being present in second group of data, i.e., file name is " 16957b5.msp ", and store path is " C:\Windows\ Installer”;Although there is the MSP files that file name is " 1fd2c6.msp " in second group of data, however, second group of number Differed according to the store path and the store path in first group of data of middle this document.Therefore, it is known that, in the Status Flag of table 1 During the value of position is not the fileinfo of MSP files of the preset value, only file name for " 16957b5.msp " MSP texts Part is effective MSP files, and file name can be defined as superfluous for the MSP files of " 1fd2c6.msp " or " 1fd25e.msp " Remaining MSP files.
Fig. 3 is referred to, Fig. 3 is a kind of another schematic flow sheet of file clean-up method provided in an embodiment of the present invention, In the embodiment of the present invention, this method may comprise steps of.
S301:The cleaning for clearing up garbage files is received to instruct.
S302:By way of scanning registration table, the fileinfo of effective MSP files is obtained, this document information includes The file name and the store path associated of the effective MSP files.
Generally, effective MSP file consolidations record is led under a certain path, therefore in the embodiment of the present invention in registration table The mode of overscanning registration table obtains the fileinfo of effective MSP files.
For example:Obtained by way of scanning registration table in the sub-key " SourceList " included by effective MSP files Numerical designations are the numeric data of " PackageName ", for convenience of description, it is assumed that obtain following by way of scanning registration table The numeric data of sub-key:
HKEY_CLASSES_ROOT\Installer\Patches\DC3BF90CC0D3D2F398A9A6D1762F70F3\ SourceList
" PackageName "=" KB958481.msp "
What deserves to be explained is, the 4th sub-key under sub-key " Patches " " DC3BF90CC0D3D2F398A9A6D1762F70F3 " represents the exclusive identification code of effective MSP files.In actual treatment mistake Cheng Zhong, the title of the 4th sub-key determines by actual conditions, generally, HKEY_CLASSES_ROOT Installer Patches' The fileinfo of the MSP files of mass efficient can be recorded under registration table path.
Further, the effective MSP that file name is " KB958481.msp " is obtained by way of scanning registration table The store path of file association, such as:HKEY_CLASSES_ROOT\Installer\Patches\ DC3BF90CC0D3D2F398A9A6D1762F70F3\SourceList\Net
" 1 "=" C:\windows\system32\installer\KB958481.msp”
So as to, it is known that, the file name of effective MSP files is KB958481.msp, and store path associated with it is C:\windows\system32\installer。
S303:Recognize whether default fileinfo matches with the fileinfo of the effective MSP files.
In the embodiment of the present invention, the default fileinfo can be got by way of scanning registration table The fileinfo of MSP files;And/or the fileinfo of the MSP files under predetermined directory.Specifically, the embodiment of the present invention is not made Limitation.
For example:Predetermined directory can be:%systemroot% installer and/or %systemroot% Downloaded Installations, obtain the fileinfo of all MSP files stored under predetermined directory, this document information File name and the store path associated including MSP files.
Generally, the MSP files of backup are recorded in following path in registration table:HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\ Patches, therefore, by way of scanning registration table, can obtain the file letter of each MSP files recorded in registration table Breath.For example:Obtain the numeric data of following sub-key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\ CurrentVersion\Installer\UserData\S-1-5-18\Patches\ Numerical designations are the number of " LocalPackage " in included sub-key under 03B1AA968252C7936A9DAB34B14E4B36 Value Data.What deserves to be explained is, in above-mentioned registration table path, the first sub-key " S-1-5-18 " table under sub-key " UserData " Show that User logs in is identified, the 5th sub-key " 03B1AA968252C7936A9DAB34B14E4B36 " table under sub-key " Patches " Show the exclusive identification code of MSP files, in actual process, the title of the first sub-key and the 5th sub-key is true by actual conditions It is fixed.
In the embodiment of the present invention, recognize default fileinfo whether the fileinfo with the effective MSP files The method matched somebody with somebody can as shown in Figure 3 a, and Fig. 3 a are a kind of schematic flow sheets for file matching method that Fig. 3 is provided, and this method can be with Comprise the following steps.
S303a:Inquire about in the fileinfo of the effective MSP files and whether there is in the default fileinfo File name.
For example:Assuming that default fileinfo is as shown in first group of data in table 2, by step S302 get it is effective MSP files fileinfo as shown in second group of data in table 2.Wall scroll data in identification table 2 in first group of data are A no wherein data with second group of data is matched, the filename matched in the wall scroll data for referring to first group of data Claim and store path is identical one by one respectively with the file name in certain data in second group of data and store path, if the There are the data with the wall scroll Data Matching in first group of data in two groups of data, then the wall scroll data institute in first group of data The MSP files specified are effective MSP files, if being not present, the MSP texts specified by the wall scroll data in first group of data Part is not effective MSP files, determines MSP text of the MSP files specified by the wall scroll data in first group of data for redundancy Part.
Inquire about respectively in second group of data with the presence or absence of file entitled " 16957b5.msp " in first group of data, The data of " 1fd2c6.msp ", " 1fd25e.msp ", " 1fd388.msp " or " 2f29f.msp ", if in the presence of performing step S303b, if being not present, can directly judge that the data and second group of data are mismatched, so as to perform step S303c.
The one of which fileinfo provided in an embodiment of the present invention of table 2
S303b:If in the presence of there being the store path of this document names associate with described in relatively more described default fileinfo Whether the store path of this document names associate is identical in the fileinfo of the MSP files of effect, if differing, and determines described default Fileinfo in this document title and fileinfo and the effective MSP files corresponding to the store path of association text Part information is mismatched.
It is relatively more described if there is the file name in default fileinfo in the fileinfo of effective MSP files The store path of this document names associate and this document in the fileinfo of the effective MSP files in default fileinfo Whether the store path of names associate is identical, if differing, and can determine this document title in the default fileinfo With the file name in the fileinfo of the fileinfo corresponding to the store path of association and the effective MSP files and pass The store path of connection is mismatched.
For example:There are the data that file name is " 16957b5.msp " or " 1fd2c6.msp " in second group of data, because This, compares the storage of this document names associate in the store path of this document names associate and second group of data in first group of data Whether path is identical, if identical, illustrates that the data in first group of data is present in second group of data, that is, matches;Cause This, it may be determined that the corresponding MSP files of the data are effective MSP files, and such as file name is " 16957b5.msp ", is deposited Storage path is " C:Windows Installer " MSP files.If store path is differed, illustrate first group of data and Two groups of signified MSP files of data are not identical files, that is, are mismatched, thus may determine that should in the default fileinfo File name MSP files corresponding with the store path associated are the MSP files of redundancy.If file name is " 1fd2c6.msp " MSP files, signified this document is stored in " C in first group of data:Windows in Installer ", in second group of data Signified this document is stored in " C:Windows system33 in installer ", therefore, this two groups of data are mismatched.
S303c:If being not present, determine that this document title and the store path institute associated are right in the default fileinfo The fileinfo of the fileinfo answered and the effective MSP files is mismatched.
, can be direct if the file name in default fileinfo is not present in the fileinfo of effective MSP files Determine the fileinfo and the effective MSP corresponding to the store path of this document title in default fileinfo and association File name in the fileinfo of file is mismatched with the store path associated..
For example:In table 2, first group of data refers to default fileinfo, and second group of data refers to the text of effective MSP files Part information.Be not present in second group of data the file name recorded in first group of data for " 1fd25e.msp ", " 1fd388.msp ", " 2f29f.msp " data, therefore, it can directly judge that file is entitled in first group of data " 1fd25e.msp ", " 1fd388.msp ", the fileinfo of " 2f29f.msp " and the effective MSP files fileinfo Mismatch.
S304:If the fileinfo of the default fileinfo and the effective MSP files is mismatched, it is determined that described MSP files in default fileinfo corresponding to unmatched fileinfo are the MSP files of redundancy.
According to step S303a~step S303c, state file name in default fileinfo if identifying and associate Store path is mismatched with the file name in the fileinfo of the effective MSP files and the store path associated, then really Unmatched file name and the MSP that the MSP files corresponding to the store path associated are redundancy in fixed default fileinfo File.
For example:In table 2, only the first data is present in second group of data in first group of data, i.e., file name is " 16957b5.msp ", store path is " C:\Windows\Installer”;It is although there is file name in second group of data The MSP files of " 1fd2c6.msp ", however, the storage road in second group of data in the store path of this document and first group of data Footpath is differed, and the second data and second group of data in first group of data are mismatched.Therefore, it is known that in the default text of table 2 In part information, only file name is that the MSP files of " 16957b5.msp " are effective MSP files, other four files To be defined as the MSP files of redundancy.
S305:Obtain the file name and the store path associated of the MSP files of the redundancy.
For example:C:\Windows\Installer\1fd2c6.msp、C:\Windows\Installer\1fd25e.msp、 C:\Windows\Installer\1fd388.msp、C:\Windows\Installer\2f29f.msp。
S306:According to the file name of the MSP files of the redundancy and the store path associated, the MSP of the redundancy is deleted File.
In the file clean-up method that the embodiment of the present invention is described, when receiving cleaning instruction, registration table is scanned, is recognized superfluous Remaining MSP files and the file name and the store path associated of the MSP files for obtaining identified redundancy;According to acquired The file name of the MSP files of the redundancy arrived and the store path associated, delete the MSP files of the redundancy.Using of the invention real Example is applied, the degree of accuracy and the efficiency of the MSP files of cleaning redundancy can be improved.
Fig. 4 is referred to, Fig. 4 is a kind of another schematic flow sheet of file clean-up method provided in an embodiment of the present invention, In the embodiment of the present invention, this method may comprise steps of.
S401:The cleaning for clearing up garbage files is received to instruct.
S402:Instructed according to the cleaning, by way of scanning registration table, recognize the MSP files of redundancy.
S403:Obtain the file name and the store path associated of the MSP files of the redundancy.
S404:According to the MSP files of the redundancy identified, redundant file list for clearance is shown, wherein, it is described superfluous The fileinfo of the MSP files of a list items one redundancy of correspondence in remaining listed files.
For example:Assuming that identifying the MSP files of 4 redundancies, it is respectively:C:\Windows\Installer\ 1fd2c6.msp、C:\Windows\Installer\1fd25e.msp、C:\Windows\Installer\1fd388.msp、 C:\Windows\Installer\2f29f.msp.According to the MSP files of the redundancy identified, redundancy text for clearance is generated Part list, wherein, the fileinfo of the MSP files of a list items one redundancy of correspondence in the redundant file list, institute State the file name and store path of MSP file of the fileinfo including the redundancy.Optionally, the MSP files of redundancy are obtained The title of description information, such as this document, theme, modification date, size information.Display redundant file list for clearance, The MSP files for the redundancy that can be cleared up are shown to user, as shown in fig. 4 a, Fig. 4 a are that the one of which that Fig. 4 is provided shows redundancy text The schematic diagram of part list, so that user can further determine whether that needs are deleted according to the fileinfo described by every list items Except this document.
S405:According to the selected list items of user, the corresponding MSP files of the selected list items are deleted.
For example:Assuming that the corresponding list items of user's selection 1fd2c6.msp files, then delete the corresponding MSP texts of the list items Part, i.e. C:\Windows\Installer\1fd2c6.msp.
In the file clean-up method that the embodiment of the present invention is described, when receiving cleaning instruction, registration table is scanned, is recognized superfluous Remaining MSP files and the file name and the store path associated of the MSP files for obtaining identified redundancy;According to acquired The file name of the MSP files of the redundancy arrived and the store path associated, delete the MSP files of the redundancy.Using of the invention real Example is applied, the degree of accuracy and the efficiency of the MSP files of cleaning redundancy can be improved.
It is apparatus of the present invention embodiment below, apparatus of the present invention embodiment belongs to same structure with the inventive method embodiment Think, for performing the method described in the inventive method embodiment.For convenience of description, apparatus of the present invention embodiment only show with The related part of apparatus of the present invention embodiment, particular technique details is not disclosed, refer to the description of the inventive method embodiment, No longer repeat one by one herein.
Fig. 5 is referred to, Fig. 5 is a kind of structural representation of file clean-up device provided in an embodiment of the present invention, in this hair In bright embodiment, the device can include:Receiving module 101, identification module 102, acquisition module 103 and removing module 104.
Receiving module 101, for receiving the cleaning instruction for being used to clear up garbage files.
Identification module 102, for being instructed according to the cleaning, by way of scanning registration table, recognizes the MSP texts of redundancy Part.
Acquisition module 103, file name and the store path associated for the MSP files that obtain the redundancy.
Removing module 104, for file name and the store path associated of the MSP files according to the redundancy, is deleted The MSP files of the redundancy.
In the file clean-up device that the embodiment of the present invention is described, when receiving cleaning instruction, registration table is scanned, is recognized superfluous Remaining MSP files and the file name and the store path associated of the MSP files for obtaining identified redundancy;According to acquired The file name of the MSP files of the redundancy arrived and the store path associated, delete the MSP files of the redundancy.Using of the invention real Example is applied, the degree of accuracy and the efficiency of the MSP files of cleaning redundancy can be improved.
Fig. 6 is referred to, Fig. 6 is a kind of another structural representation of file clean-up device provided in an embodiment of the present invention, In the embodiment of the present invention, the device can include:Receiving module 201, identification module 202, acquisition module 203, removing module 204th, display module 205 and sending module 206.
Receiving module 201, for receiving the cleaning instruction for being used to clear up garbage files.
Identification module 202, for being instructed according to the cleaning, by way of scanning registration table, recognizes the MSP texts of redundancy Part.
Acquisition module 203, file name and the store path associated for the MSP files that obtain the redundancy.
Removing module 204, for file name and the store path associated of the MSP files according to the redundancy, is deleted The MSP files of the redundancy.
Display module 205, is used for:
According to the MSP files of the redundancy identified, redundant file list for clearance is shown, wherein, the redundancy text The fileinfo of the MSP files of a list items one redundancy of correspondence in part list, the fileinfo includes the redundancy The file name and store path of MSP files.
Sending module 206, is used for:
The cleaning instruction of cleaning garbage files is initiated every preset duration;And/or
When detecting the application software of unloading MSI types, the cleaning instruction of cleaning garbage files is initiated.
It is preferred that, removing module 204 specifically for:
According to the selected list items of user, the corresponding MSP files of the selected list items are deleted.
It is preferred that, on the one hand, identification module 202 can include:First acquisition unit 2021, the first determining unit 2022, Second acquisition unit 2023, the 3rd acquiring unit 2024 and the second determining unit 2025.As shown in Figure 6 a, Fig. 6 a are Fig. 6 offers One of which identification module structural representation.
First acquisition unit 2021, the state flag bit for obtaining MSP files.
First determining unit 2022, if for identifying that the value of the state flag bit is preset value, determining the MSP files For the MSP files of redundancy, wherein, the value of the state flag bit of MSP files represents that the MSP files are invalid when being the preset value MSP files.
Second acquisition unit 2023, if the value for identifying the state flag bit is not the preset value, obtains shape The value of state flag bit is not the fileinfo of the MSP files of the preset value, and this document information includes the filename of the MSP files Claim and the store path associated.
3rd acquiring unit 2024, the fileinfo for obtaining effective MSP files, this document information has including described The file name of the MSP files of effect and the store path associated.
Second determining unit 2025, if the value for state flag bit is not the file letter of the MSP files of the preset value The fileinfo of breath and the effective MSP files is mismatched, and the value for determining state flag bit is not the MSP texts of the preset value MSP files in the fileinfo of part corresponding to unmatched fileinfo are the MSP files of redundancy.
It is preferred that, on the other hand, identification module 202 can include:4th acquiring unit 202a, recognition unit 202b and Three determining unit 202c.As shown in Figure 6 b, Fig. 6 b are another structural representations for the one of which identification module that Fig. 6 is provided.
4th acquiring unit 202a, the fileinfo for obtaining effective MSP files, this document information has including described The file name of the MSP files of effect and the store path associated.
Recognition unit 202b, for recognize default fileinfo whether the fileinfo with the effective MSP files Matching.
3rd determining unit 202c, if the file for the default fileinfo and the effective MSP files is believed Breath is mismatched, and determines MSP text of the MSP files in the default fileinfo corresponding to unmatched fileinfo for redundancy Part.
It is preferred that, recognition unit 202b specifically for:
The filename that whether there is in the default fileinfo is inquired about in the fileinfo of the effective MSP files Claim;
If in the presence of, if in the presence of, relatively in the default fileinfo store path of this document names associate with it is described Whether the store path of this document names associate is identical in the fileinfo of effective MSP files, if differing, determines described pre- If fileinfo in this document title and fileinfo and the effective MSP files corresponding to the store path of association Fileinfo is mismatched;
If being not present, this document title and the text corresponding to the store path associated in the default fileinfo are determined Part information and the fileinfo of the effective MSP files are mismatched.
It is preferred that, the default fileinfo includes:
The fileinfo of the MSP files got by way of scanning registration table;And/or
The fileinfo of MSP files under predetermined directory.
In the file clean-up device that the embodiment of the present invention is described, when receiving cleaning instruction, registration table is scanned, is recognized superfluous Remaining MSP files and the file name and the store path associated of the MSP files for obtaining identified redundancy;According to acquired The file name of the MSP files of the redundancy arrived and the store path associated, delete the MSP files of the redundancy.Using of the invention real Example is applied, the degree of accuracy and the efficiency of the MSP files of cleaning redundancy can be improved.
Fig. 7 is referred to, Fig. 7 is a kind of structural representation of terminal provided in an embodiment of the present invention, in the embodiment of the present invention In, terminal 10 includes file clean-up device as described above.The terminal can be computer, but be not limited to computer, tool Body, the embodiment of the present invention is not restricted.
What deserves to be explained is, terminal 10 includes any file clean-up device as described above, for convenience of description, with wherein A kind of file clean-up device is illustrated.The cleaning that terminal 10 receives for clearing up garbage files is instructed;According to the cleaning Instruction, by way of scanning registration table, recognizes the MSP files of redundancy;Obtain the redundancy MSP files file name and The store path of association;According to the file name of the MSP files of the redundancy and the store path associated, the redundancy is deleted MSP files.
In the terminal that the embodiment of the present invention is described, when receiving cleaning instruction, registration table is scanned, the MSP of redundancy is recognized The file name and the store path associated of file and the MSP files of the identified redundancy of acquisition;According to accessed superfluous The file name of remaining MSP files and the store path associated, delete the MSP files of the redundancy., can using the embodiment of the present invention To improve the degree of accuracy and the efficiency of the MSP files for clearing up redundancy.
Fig. 8 is referred to, Fig. 8 is a kind of another structural representation of file clean-up device provided in an embodiment of the present invention, used In performing file clean-up method disclosed in the embodiment of the present invention, the device can include:At least one processor 301, for example CPU, at least one network interface 304 or other users interface 303, memory 305, at least one communication bus 302.Communication Bus 302 is used to realize the connection communication between these components.Wherein, user interface 303 optionally can include USB interface with And other standard interfaces, wireline interface.Network interface 304 can optionally include Wi-Fi interface and other wave points.Deposit Reservoir 305 may include high-speed RAM memory, it is also possible to also including non-labile memory (non-volatile Memory), for example, at least one magnetic disk storage.Memory 305 optionally can be located remotely from foregoing place comprising at least one Manage the storage device of device 301.As shown in figure 8, being as operation can be included in a kind of memory 305 of computer-readable storage medium System 3051 and application program 3052.
In some embodiments, memory 305 stores following element, can perform module or data structure, or Their subset of person, or their superset:
Operating system 3051, comprising various system programs, for realizing various basic businesses and handling hardware based Task;
Application program 3052, the setting program of the deblocking parameter comprising objective network data, stroke of target data block The comparison program of data block in branch, target data block and database and the deletion program of target data block etc. are various should With program, for realizing various applied business.
Specifically, processor 301 is used to call the program stored in memory 305, performs following operate:
The cleaning for clearing up garbage files is received to instruct;
Instructed according to the cleaning, by way of scanning registration table, recognize the MSP files of redundancy;
Obtain the file name and the store path associated of the MSP files of the redundancy;
According to the file name of the MSP files of the redundancy and the store path associated, the MSP files of the redundancy are deleted.
In another embodiment, processor 301 perform it is described identification redundancy MSP files operation, including perform with Lower operation:
Obtain the state flag bit of MSP files;
If the value for identifying the state flag bit is preset value, the MSP files that the MSP files are redundancy are determined, wherein, The value of the state flag bit of MSP files represents that the MSP files are invalid MSP files when being the preset value.
In another embodiment, if processor 301 identifies that the value of the state flag bit is not the preset value, also Perform following operate:
The value for obtaining state flag bit is not the fileinfo of the MSP files of the preset value, and this document information includes should The file name of MSP files and the store path associated;
The fileinfo of effective MSP files is obtained, this document information includes the file name of the effective MSP files With the store path of association;
If the value of state flag bit is not the fileinfo and the effective MSP files of the MSP files of the preset value Fileinfo mismatch, the value for determining state flag bit be not the MSP files of the preset value fileinfo in mismatch Fileinfo corresponding to MSP files be redundancy MSP files.
In another embodiment, processor 301 performs the operation of the MSP files of the identification redundancy, specifically includes and holds Row is following to be operated:
The fileinfo of effective MSP files is obtained, this document information includes the file name of the effective MSP files With the store path of association;
Recognize whether default fileinfo matches with the fileinfo of the effective MSP files;
If the fileinfo of the default fileinfo and the effective MSP files is mismatched, determine described default Fileinfo in MSP files corresponding to unmatched fileinfo be redundancy MSP files.
In another embodiment, processor 301 perform the default fileinfo of the identification whether with it is described effective The operation of the fileinfo matching of MSP files, including perform following operate:
The filename that whether there is in the default fileinfo is inquired about in the fileinfo of the effective MSP files Claim;
If in the presence of, relatively in the default fileinfo store path of this document names associate with it is described effective Whether the store path of this document names associate is identical in the fileinfo of MSP files, if differing, and determines the default text The file of this document title and fileinfo and the effective MSP files corresponding to the store path of association is believed in part information Breath is mismatched;
If being not present, this document title and the text corresponding to the store path associated in the default fileinfo are determined Part information and the fileinfo of the effective MSP files are mismatched.
In another embodiment, the default fileinfo includes:
The fileinfo of the MSP files got by way of scanning registration table;And/or
The fileinfo of MSP files under predetermined directory.
In another embodiment, processor 301 is performed before the operation of the MSP files of the deletion redundancy, is also held Row is following to be operated:
According to the MSP files of the redundancy identified, redundant file list for clearance is shown, wherein, the redundancy text The fileinfo of the MSP files of a list items one redundancy of correspondence in part list, the fileinfo includes the redundancy The file name and store path of MSP files;
The MSP files for deleting the redundancy, including:
According to the selected list items of user, the corresponding MSP files of the selected list items are deleted.
In another embodiment, processor 301 performs the behaviour for receiving the cleaning instruction for clearing up garbage files Before work, following operate also is performed:
The cleaning instruction of cleaning garbage files is initiated every preset duration;And/or
When detecting the application software of unloading MSI types, the cleaning instruction of cleaning garbage files is initiated.
In the technical scheme that the embodiment of the present invention is described, when receiving cleaning instruction, registration table is scanned, identification redundancy The file name and the store path associated of MSP files and the MSP files of the identified redundancy of acquisition;According to accessed The file name of the MSP files of redundancy and the store path associated, delete the MSP files of the redundancy.Using the embodiment of the present invention, The degree of accuracy and the efficiency of the MSP files of cleaning redundancy can be improved.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means to combine specific features, structure, material or the spy that the embodiment or example are described Point is contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not Must must be directed to identical embodiment or example.Moreover, specific features, structure, material or the feature of description can be Combined in an appropriate manner in any one or more embodiments or example.In addition, in the case of not conflicting, this area Technical staff can be carried out the feature of the not be the same as Example described in this specification or example and non-be the same as Example or example With reference to and combination.
Those skilled in the art can be by the not be the same as Example and the feature of non-be the same as Example described in this specification It is combined and combines.Module or unit in all embodiments of the invention, can pass through universal integrated circuit, such as CPU (Central Processing Unit, central processing unit), or pass through ASIC (Application Specific Integrated Circuit, application specific integrated circuit) realize.
Step in all embodiments of the invention method can be sequentially adjusted, merged and deleted according to actual needs; Module or unit in all embodiments of the invention device can be combined, divided and deleted according to actual needs.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include Module, fragment or the portion of the code of one or more executable instructions for the step of realizing specific logical function or process Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not be by shown or discussion suitable Sequence, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Represent in flow charts or logic and/or step described otherwise above herein, for example, being considered use In the order list for the executable instruction for realizing logic function, it may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system including the system of processor or other can be held from instruction The system of row system, device or equipment instruction fetch and execute instruction) use, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicate, propagate or pass Defeated program is for instruction execution system, device or equipment or the dress for combining these instruction execution systems, device or equipment and using Put.The more specifically example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wirings Connecting portion (electronic installation), portable computer diskette box (magnetic device), random access memory (RAM), read-only storage (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device, and portable optic disk is read-only deposits Reservoir (CDROM).In addition, can even is that can be in the paper of printing described program thereon or other are suitable for computer-readable medium Medium, because can then enter edlin, interpretation or if necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried Rapid to can be by program to instruct the hardware of correlation to complete, described program can be stored in a kind of computer-readable storage medium In matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing module, can also That unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mould Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.The integrated module is such as Fruit is realized using in the form of software function module and as independent production marketing or in use, can also be stored in a computer In read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..Although having been shown and retouching above Embodiments of the invention are stated, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as the limit to the present invention System, one of ordinary skill in the art can be changed to above-described embodiment, change, replace and become within the scope of the invention Type.
Above disclosed is only presently preferred embodiments of the present invention, can not limit the right of the present invention with this certainly Scope, one of ordinary skill in the art will appreciate that all or part of flow of above-described embodiment is realized, and according to right of the present invention It is required that the equivalent variations made, still fall within and invent covered scope.

Claims (13)

1. a kind of file clean-up method, it is characterised in that including:
The cleaning for clearing up garbage files is received to instruct;
Instructed according to the cleaning, by way of scanning registration table, recognize the MSP files of redundancy;
Obtain the file name and the store path associated of the MSP files of the redundancy;
According to the file name of the MSP files of the redundancy and the store path associated, the MSP files of the redundancy are deleted;
Wherein, the MSP files of the identification redundancy, including:
Obtain the state flag bit of MSP files;
If the value for identifying the state flag bit is preset value, the MSP files that the MSP files are redundancy are determined, wherein, MSP The value of the state flag bit of file represents that the MSP files are invalid MSP files when being the preset value;
Or, the MSP files of the identification redundancy, including:
The fileinfo of effective MSP files is obtained, this document information includes file name and the pass of the effective MSP files The store path of connection;
Recognize whether default fileinfo matches with the fileinfo of the effective MSP files;
If the fileinfo of the default fileinfo and the effective MSP files is mismatched, the default text is determined MSP files in part information corresponding to unmatched fileinfo are the MSP files of redundancy.
2. the method as described in claim 1, it is characterised in that after the state flag bit of the acquisition MSP files, if identification The value for going out the state flag bit is not the preset value, and methods described also includes:
The value for obtaining state flag bit is not the fileinfo of the MSP files of the preset value, and this document information includes MSP texts The file name of part and the store path associated;
The fileinfo of effective MSP files is obtained, this document information includes file name and the pass of the effective MSP files The store path of connection;
If the value of state flag bit is not text of the fileinfo with the effective MSP files of the MSP files of the preset value Part information mismatch, the value for determining state flag bit be not the MSP files of the preset value fileinfo in unmatched text MSP files corresponding to part information are the MSP files of redundancy.
3. the method as described in claim 1, it is characterised in that the default fileinfo of identification whether with it is described effective The fileinfo matching of MSP files, including:
The file name that whether there is in the default fileinfo is inquired about in the fileinfo of the effective MSP files;
If in the presence of the store path of this document names associate and the effective MSP texts in relatively more described default fileinfo Whether the store path of this document names associate is identical in the fileinfo of part, if differing, and determines the default file letter The fileinfo of this document title and fileinfo and the effective MSP files corresponding to the store path of association is not in breath Matching;
If being not present, determine that this document title is believed with the file corresponding to the store path associated in the default fileinfo The fileinfo of breath and the effective MSP files is mismatched.
4. the method as described in claim 1, it is characterised in that the default fileinfo includes:
The fileinfo of the MSP files got by way of scanning registration table;And/or
The fileinfo of MSP files under predetermined directory.
5. the method as described in claim any one of 1-4, it is characterised in that before the MSP files of the deletion redundancy, institute Stating method also includes:
According to the MSP files of the redundancy identified, redundant file list for clearance is shown, wherein, the redundant file row The fileinfo of the MSP files of a list items one redundancy of correspondence in table, the fileinfo includes the MSP texts of the redundancy The file name of part and the store path associated;
The MSP files for deleting the redundancy, including:
According to the selected list items of user, the corresponding MSP files of the selected list items are deleted.
6. method as claimed in claim 5, it is characterised in that the cleaning that the reception is used to clear up garbage files instructs it Before, methods described also includes:
The cleaning instruction of cleaning garbage files is initiated every preset duration;And/or
When detecting the application software of unloading MSI types, the cleaning instruction of cleaning garbage files is initiated.
7. a kind of file clean-up device, it is characterised in that including:
Receiving module, for receiving the cleaning instruction for being used to clear up garbage files;
Identification module, for being instructed according to the cleaning, by way of scanning registration table, recognizes the MSP files of redundancy;
Acquisition module, file name and the store path associated for the MSP files that obtain the redundancy;
Removing module, for file name and the store path associated of the MSP files according to the redundancy, deletes the redundancy MSP files;
Wherein, the identification module includes:
First acquisition unit, the state flag bit for obtaining MSP files;
First determining unit, if for identifying that the value of the state flag bit is preset value, it is redundancy to determine the MSP files MSP files, wherein, the value of the state flag bit of MSP files represents that the MSP files are invalid MSP texts when being the preset value Part;
Or, the identification module includes:
4th acquiring unit, the fileinfo for obtaining effective MSP files, this document information includes the effective MSP The file name of file and the store path associated;
Recognition unit, for recognizing whether default fileinfo matches with the fileinfo of the effective MSP files;
3rd determining unit, if the fileinfo for the default fileinfo and the effective MSP files is mismatched, Determine the MSP files that the MSP files in the default fileinfo corresponding to unmatched fileinfo are redundancy.
8. device as claimed in claim 7, it is characterised in that the identification module also includes:
Second acquisition unit, if the value for identifying the state flag bit is not the preset value, obtains state flag bit Value be not the preset value MSP files fileinfo, the file name of this document information including the MSP files and association Store path;
3rd acquiring unit, the fileinfo for obtaining effective MSP files, this document information includes the effective MSP The file name of file and the store path associated;
Second determining unit, if the value for state flag bit be not the MSP files of the preset value fileinfo with it is described The fileinfo of effective MSP files is mismatched, and the value for determining state flag bit is not the file of the MSP files of the preset value MSP files in information corresponding to unmatched fileinfo are the MSP files of redundancy.
9. device as claimed in claim 7, it is characterised in that the recognition unit specifically for:
The file name that whether there is in the default fileinfo is inquired about in the fileinfo of the effective MSP files;
If in the presence of the store path of this document names associate and the effective MSP texts in relatively more described default fileinfo Whether the store path of this document names associate is identical in the fileinfo of part, if differing, and determines the default file letter The fileinfo of this document title and fileinfo and the effective MSP files corresponding to the store path of association is not in breath Matching;
If being not present, determine that this document title is believed with the file corresponding to the store path associated in the default fileinfo The fileinfo of breath and the effective MSP files is mismatched.
10. device as claimed in claim 7, it is characterised in that the default fileinfo includes:
The fileinfo of the MSP files got by way of scanning registration table;And/or
The fileinfo of MSP files under predetermined directory.
11. the device as described in claim any one of 7-10, it is characterised in that described device also includes display module, is used for:
According to the MSP files of the redundancy identified, redundant file list for clearance is shown, wherein, the redundant file row The fileinfo of the MSP files of a list items one redundancy of correspondence in table, the fileinfo includes the MSP texts of the redundancy The file name of part and the store path associated;
The removing module specifically for:
According to the selected list items of user, the corresponding MSP files of the selected list items are deleted.
12. device as claimed in claim 11, it is characterised in that described device also includes sending module, is used for:
The cleaning instruction of cleaning garbage files is initiated every preset duration;And/or
When detecting the application software of unloading MSI types, the cleaning instruction of cleaning garbage files is initiated.
13. a kind of terminal, it is characterised in that including the device as described in claim any one of 7-12.
CN201410422443.XA 2014-08-25 2014-08-25 File cleaning method and device and terminal Active CN104239091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410422443.XA CN104239091B (en) 2014-08-25 2014-08-25 File cleaning method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410422443.XA CN104239091B (en) 2014-08-25 2014-08-25 File cleaning method and device and terminal

Publications (2)

Publication Number Publication Date
CN104239091A CN104239091A (en) 2014-12-24
CN104239091B true CN104239091B (en) 2017-08-04

Family

ID=52227226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410422443.XA Active CN104239091B (en) 2014-08-25 2014-08-25 File cleaning method and device and terminal

Country Status (1)

Country Link
CN (1) CN104239091B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471764A (en) * 2019-08-01 2019-11-19 郑州阿帕斯科技有限公司 A kind of processing method and processing device of memory cleaning

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462596B (en) * 2014-12-30 2019-02-01 广州视睿电子科技有限公司 Junk data delet method and system
CN106294488A (en) * 2015-06-05 2017-01-04 腾讯科技(深圳)有限公司 Garbage files scan method and device
CN105224877B (en) * 2015-09-30 2018-01-26 四川效率源信息安全技术股份有限公司 A kind of confidential data sweep-out method
CN106775809B (en) * 2016-11-15 2020-02-07 北京安云世纪科技有限公司 Method and device for cleaning memory of mobile terminal and mobile terminal
CN108399071B (en) * 2018-01-19 2021-07-20 五八有限公司 Application program installation package size processing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043655A (en) * 2011-01-04 2011-05-04 奇智软件(北京)有限公司 Method and system for carrying out advanced uninstall on software
CN102654872A (en) * 2011-03-03 2012-09-05 腾讯科技(深圳)有限公司 Method and device for cleaning junk files generated by application programs
CN103500104A (en) * 2013-09-09 2014-01-08 北京奇虎科技有限公司 Method and device for realizing sandbox interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365882A (en) * 2012-03-30 2013-10-23 网秦无限(北京)科技有限公司 Method and system for cleaning junk files on mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043655A (en) * 2011-01-04 2011-05-04 奇智软件(北京)有限公司 Method and system for carrying out advanced uninstall on software
CN102654872A (en) * 2011-03-03 2012-09-05 腾讯科技(深圳)有限公司 Method and device for cleaning junk files generated by application programs
CN103500104A (en) * 2013-09-09 2014-01-08 北京奇虎科技有限公司 Method and device for realizing sandbox interface

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《WICLEANUP帮你清除残留安装文件》;越野苍狼;《电脑迷》;20071215;第71页 *
《冗余Windows Installer文件的清理》;afterain;《百度文库》;20110919;第1-2页 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471764A (en) * 2019-08-01 2019-11-19 郑州阿帕斯科技有限公司 A kind of processing method and processing device of memory cleaning

Also Published As

Publication number Publication date
CN104239091A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN104239091B (en) File cleaning method and device and terminal
CN104487960B (en) Automated disaster recovery and Data Migration
TWI575362B (en) Backup method, pre-testing method for enviornment updating and system thereof
TWI434195B (en) Method and computer program product for managing virus and backup filtration processes
US20070271561A1 (en) Updating virtual machine with patch or the like
CN1992723A (en) Apparatus, system, and method for autonomously preserving high-availability network boot services
CN100568176C (en) The method and system that is used for file version control management
JP5319133B2 (en) Document management system, document management method and program
CN1524223A (en) Systems and methods of information backup
CN1500243A (en) Collecting and restoring user environment data using removable storage
CN105893171B (en) Store the method and apparatus that fault recovery is used in equipment
US20060129616A1 (en) System and method for synchronizing computer files between a local computer and a remote server
CN107992355A (en) A kind of method, apparatus and virtual machine of application deployment software
CN106095624A (en) Data recovery method and device, terminal equipment and server
CN105867962A (en) System upgrading method and device
JP2008217340A (en) Document discard processing system and program
CN108776643A (en) A kind of object code merging control method and system based on Version Control flow
JP2008524682A (en) Rapid provisioning of computers to a homogenized resource pool
CN102456036A (en) Operation repealing method and system
CN105243102B (en) Processing method and device for unloading residual file and terminal
CN102567143A (en) Proactive error scan and isolated error correction
CN102419758A (en) Data processing system and method
CN101344741A (en) Program determining apparatus and program determining method
CN103064871B (en) Document management apparatus and control method thereof
US8056052B2 (en) Populating service requests

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
TR01 Transfer of patent right

Effective date of registration: 20181128

Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Patentee after: Zhuhai Leopard Technology Co.,Ltd.

Address before: 100085 East District, Second Floor, 33 Xiaoying West Road, Haidian District, Beijing

Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

TR01 Transfer of patent right