CN102880713A - File deleting method and file deleting device - Google Patents

File deleting method and file deleting device Download PDF

Info

Publication number
CN102880713A
CN102880713A CN2012103794723A CN201210379472A CN102880713A CN 102880713 A CN102880713 A CN 102880713A CN 2012103794723 A CN2012103794723 A CN 2012103794723A CN 201210379472 A CN201210379472 A CN 201210379472A CN 102880713 A CN102880713 A CN 102880713A
Authority
CN
China
Prior art keywords
file
files
target
deletion
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012103794723A
Other languages
Chinese (zh)
Other versions
CN102880713B (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210379472.3A priority Critical patent/CN102880713B/en
Publication of CN102880713A publication Critical patent/CN102880713A/en
Application granted granted Critical
Publication of CN102880713B publication Critical patent/CN102880713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention discloses a file deleting method and a file deleting device. The file deleting method includes acquiring attribute information of various files in disks; selecting the files with attribute information according with preset conditions as target files; acquiring description information of the various target files and displaying; providing a deleting access for the target files so as to delete the corresponding target files when the deleting access receives deleting requests. By the aid of the file deleting method and the file deleting device, user operation can be facilitated and file deleting efficiency is improved.

Description

File cleaning method and device
Technical Field
The invention relates to the technical field of file cleaning, in particular to a file cleaning method and device.
Background
With the long-term operation of the computer system, files are continuously accumulated, and the large files in the computer are more and more. For example, when the Windows operating system and running application programs are used, a lot of temporary files are generated, and when the operating system has updated security patches, up to hundreds of million useless patch packages and the like may exist under the Windows directory, and these files may cause an increasing occupation of disk space of the computer, including a system disk (typically, a C disk). In such a case, not only a large amount of storage space is occupied, the computer becomes slow to run, but also some applications cannot be installed because of insufficient system disk space, and so on. However, for the ordinary user, it is not always known how to process the data so as to optimize the system and improve the above situation.
Disclosure of Invention
In view of the above, the present invention has been made to provide a document cleaning method and a corresponding document cleaning apparatus that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a file cleaning method including:
acquiring attribute information of each file in a disk;
selecting a file with attribute information meeting preset conditions as a target file;
acquiring and displaying the description information of each target file;
and providing a deletion entry for the target file so as to delete the corresponding target file when a deletion request is received through the deletion entry.
Optionally, the obtaining attribute information of each file in the disk includes:
and acquiring the attribute information of each file in the disk in a mode of inquiring a disk main file table.
Optionally, the attribute information includes a size, a path, a directory, a file name, a suffix name, and/or a file type of the file, and the selecting the file whose attribute information meets a preset condition as the target file includes:
selecting a pending file according to the size of the file;
and filtering out system key files and important files from the pending files according to the paths of the files, the directories, the file names, the suffix names and/or the file types, and determining the residual files as the target files.
Optionally, the selecting the pending file according to the size of the file includes:
selecting a preset number of files with the largest file size as files to be determined;
or,
and selecting the file with the size exceeding a preset threshold value as the pending file.
Optionally, the filtering out system key files and important files from the pending files includes:
judging the path, the directory, the file name, the suffix name and/or the file type of the undetermined file, judging whether the undetermined file hits a preset white list rule, if so, filtering the undetermined file to obtain a system key file or an important file.
Optionally, the white list rule includes a specific keyword, a specific directory, a specific file name, a specific suffix name in the file path, or a regular matching condition established according to the file path, the file name, and the file type.
Optionally, the description information of the target file includes: descriptive information for describing the file's role and/or descriptive information for describing possible consequences that may result after deletion.
Optionally, the obtaining and displaying the description information of each target file includes:
respectively counting the sum of the sizes of various files and the proportion of the sum of the sizes of various files in the sum of the sizes of all the target files according to the types of the target files;
and displaying the files in a ring diagram mode according to the proportion of the files of various types.
Optionally, the providing a delete entry for the target file includes:
and respectively providing a total deletion entry for each type of target file so as to delete all target files of corresponding types when a deletion request is received through the total deletion entry.
Optionally, the method further comprises:
when the operation focus enters the area where a certain type of target file is located, displaying the description information of all target files in the type in a list form;
the providing a deletion entry for the target file comprises:
and respectively providing a separate deleting inlet for each target file under the type.
According to another aspect of the present invention, there is provided a document cleaning apparatus including
The attribute information acquisition unit is used for acquiring the attribute information of each file in the disk;
the target file acquisition unit is used for selecting a file of which the attribute information meets preset conditions as a target file;
the description information display unit is used for acquiring and displaying the description information of each target file;
and the deletion entry providing unit is used for providing a deletion entry for the target file so as to delete the corresponding target file when a deletion request is received through the deletion entry.
Optionally, the attribute information acquiring unit includes:
and the main file table query subunit is used for acquiring the attribute information of each file in the disk in a mode of querying the main file table of the disk.
Optionally, the attribute information includes a size, a path, a directory, a file name, a suffix name, and/or a file type of the file, and the target file obtaining unit includes:
the undetermined file acquisition subunit is used for selecting the undetermined file according to the size of the file;
and the filtering subunit is used for filtering system key files and important files from the pending files according to the path of the file, the directory where the file is located, the file name, the suffix name and/or the file type, and determining the rest files as the target files.
Optionally, the pending file obtaining subunit includes:
the first candidate selecting subunit is used for selecting a preset number of files with the largest file size as files to be determined;
or,
and the second candidate selecting subunit is used for selecting the file with the file size exceeding the preset threshold value as the pending file.
Optionally, the filtering subunit comprises:
and the judging subunit is used for judging whether the path, the directory, the file name, the suffix name and/or the file type of the undetermined file hit a preset white list rule, if so, the undetermined file is a system key file or an important file, and filtering the system key file or the important file.
Optionally, the white list rule includes a specific keyword, a specific directory, a specific file name, a specific suffix name in the file path, or a regular matching condition established according to the file path, the file name, and the file type.
Optionally, the description information of the target file includes: explanatory information for expressing the file action and/or helpful information for expressing the consequences that may result after deletion.
Optionally, the description information presenting unit includes:
the counting subunit is used for respectively counting the size sum of the various files according to the types of the target files and the proportion of the size sum of the various files in the size sum of all the target files;
and the image display subunit is used for displaying the files in a ring image mode according to the proportion of the files of various types.
Optionally, the delete entry providing unit includes:
and the first deletion entry providing subunit is configured to provide a total deletion entry for each type of target file, so that when a deletion request is received through the total deletion entry, all target files of corresponding types are deleted.
Optionally, the method further comprises:
the expansion unit is used for displaying the description information of all the target files in a certain type in a list form when the operation focus enters the area where the target files in the type are located;
the deletion entry providing unit includes:
and the second deletion entry providing subunit is used for respectively providing a separate deletion entry for each target file under the type.
According to the file cleaning method and device, some target files can be selected according to the preset rules, the file names, the description information and the like are displayed to the user, and meanwhile deletion entries of all the files are provided, so that when the user needs to delete a certain file, the user can directly enter the file through the entry to execute deletion operation, user operation is facilitated, and the implementation efficiency of file cleaning is improved.
In addition, through the setting of specific rules, only files which may affect the system performance and do not belong to the system key files or the user important files can be displayed to the user, so that the user can more intuitively find the files which can be deleted, and the condition that the system key files or the user important files are mistakenly deleted is avoided.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a flow diagram of a method according to an embodiment of the invention;
FIG. 2 illustrates a first presentation interface diagram according to one embodiment of the invention;
FIG. 3 illustrates a second presentation interface diagram according to one embodiment of the invention;
FIG. 4 illustrates a third presentation interface diagram according to one embodiment of the invention;
FIG. 5 illustrates a fourth presentation interface diagram according to one embodiment of the invention; and
fig. 6 shows a schematic view of an apparatus according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the embodiment of the present invention, in order to help a user manage files in a disk, attribute information of each file in the disk may be first obtained, some target files are selected from the target files according to a certain policy, then attributes and description information of the target files are displayed to the user, meanwhile, a deletion entry of the file may be provided in a display interface of the file, the user may determine which files need to be deleted through the description information of the file, and the like, and then may specify a deletion operation through the corresponding deletion entry, instead of executing the deletion operation of the file in a conventional manner. The conventional method is to find a directory where a file is located according to a path of the file to be deleted, and then manually execute a file deletion operation (including selecting a "delete" option in a right-click menu after selecting the file, or deleting the selected file in a manner of using a combination key "shift + delete", or the like). Therefore, the method provided by the embodiment of the invention can provide a convenient way for arranging the files, and can improve the implementation efficiency of file arrangement. The method is described in detail in steps below.
Referring to fig. 1, a file cleaning method provided in an embodiment of the present invention may include the following steps:
s101: acquiring attribute information of each file in a disk;
in the embodiment of the present invention, in order to help a user manage files in a disk, first, attribute information of each file in the disk needs to be acquired, for example, including a size, a name, a path, and the like of each file. In a specific implementation, the attribute information of each file in the disk may be obtained in various ways, for example, all files on the disk may be enumerated directly, which is a very time-consuming process. In consideration of the importance of the query efficiency, the embodiment of the present invention may obtain the attribute information in a manner of querying an MFT (Master File Table). Based on the management mode of Windows on disk files, MFT is the index of each file on the disk, and holds a set of records called attributes for each file, where each attribute stores different types of information. In other words, the MFT is an index file that maps all objects stored in the disk. In MFT, there is at least one map entry for each file on disk (including the MFT itself). Each entry in the MFT contains the following data: size, time and timestamp, security attributes, data location, and the like. By only inquiring the index information to obtain the attribute information of the file, the inquiring efficiency is greatly improved compared with the full-disk file searching.
S102: selecting a file with attribute information meeting preset conditions as a target file;
after acquiring the attribute information of each file on the disk, it is necessary to select a file that may affect the system performance from many files, such as some files that occupy a large space and are generally useless. That is, not all files with large occupied space can be deleted, and some files are some system key files or important files, and once deleted, the system files will be lost or other problems may occur. Therefore, it becomes very important to reasonably present files that may affect the performance of the system to the user, while protecting some system critical files and important files from being deleted by mistake.
For this reason, in the embodiment of the present invention, a selection condition may be preset, for example, the file may be preselected according to the size of the file, and some pending files may be selected. If the preset number of files with the largest file size is selected as the pending files, the files can be sequenced from large to small, and the top 1000 (or other number) files are taken out as the pending files; or, a file with a file size larger than a certain preset threshold value can be selected as a pending file, and the like.
After the pending file is selected, the system key file and the important file can be filtered from the pending file according to the path of the file, the directory, the file name, the suffix name and/or the file type and other information, and the remaining files are determined as the target file. The size, path, directory, file name, suffix name, file type, and the like of the file all belong to the attribute information of the file, and can be obtained from step S101.
When a system key file and an important file are filtered from a pending file according to information such as a path of the file, a directory of the file, a file name, a suffix name and/or a file type, a white list can be set in advance according to experience and the like, and if a certain attribute of a certain file hits the white list, the file can be regarded as the system key file or the important file. The white list is used for storing some file characteristics which may belong to system key files or important files, so that each pending file can be matched with the characteristics in the white list, and if the matching is successful, the pending file can be used as the system key file or the important file. In a specific implementation, the white list may exist in the form of a library file (e.g., a data file) or the like, and may be stored in an encrypted manner.
In this case, the system is exposed to some risk if the critical files of the system, that is, the files that play a critical role in the normal operation of the system, are deleted or lost. Specifically, the setting of the white list may include:
and if the path of a certain file contains a certain keyword in the white list, the certain keyword can be filtered out as a system key file. The file system comprises a directory white list, wherein specific directories are stored in the white list, and if the directory where a certain file is located appears in the white list, the directory white list can be used as a system key file to be filtered. Such as Windows, all files in the system directory as system critical files, and so on.
Suffix name, file name white list, some specific suffix names or file names are stored in the white list, that is, the files are filtered according to the suffix names or file names of the files, if the suffix name of a certain file hits the white list, the file is filtered as a system key file. In addition, some system specific attribute files may be listed directly in a white list of file names, such as desktop.
In specific implementation, each white list can be set respectively, so that each file can be matched with each white list respectively, and any hit white list can be filtered out.
For example, the structure of the path white list may be as follows:
Figure BDA00002219889300081
the structure of the file name white list may be as follows:
Figure BDA00002219889300082
Figure BDA00002219889300091
the structure of the suffix name whitelist may be as follows:
Figure BDA00002219889300092
in addition, in order to improve efficiency, filtering may also be performed in a regular matching manner, that is, a regular expression may be created according to attributes such as a path, a file name, a file type, and the like, and then each file is matched with the regular expression, and matched to any regular condition, may be filtered out as a system key file and not displayed. For example, one regular expression may be:
< spafilitem filename ". times.kb 936929". times.dir ". times.des ═ Windows XP SP3 patch file"/>
The regular expression means that if the file name of a certain file includes "KB 936929" (the "+" in the expression indicates that the file name may also contain other characters, as long as the string including "KB 936929" hits the condition), or the description information is "Windows XP SP3 patch file", the file can be filtered out as a system key file.
These protective measures can to a large extent mask large files that may cause serious problems, so that the user sees what is really a file that can be deleted.
In addition, the important file generally means a file that is important and useful for the user. Deletion of such files does not cause problems in the computer system, but may be data required by the user, rather than garbage data, and may cause user trouble after mistaken deletion. For such files, discrimination and filtering can be mainly performed through a suffix name list of the types of the files. For example, database files, archived files of professional software, etc., are typically important files, the suffix name of the database file, the suffix name of the archived file of professional software, etc., may be added to the white list. If a word document generally takes doc or docx and the like as suffix names, the document is generally a file edited or downloaded by a user and the like, and generally may be useful, so that the suffix names of doc, docx and the like can be added into a white list, and the file with the suffix name hitting the white list can be filtered out as an important file. For example, the structure of the file type white list may be as follows:
Figure BDA00002219889300101
in summary, both the system key files and the important files can be filtered by means of a white list. The files are filtered out and not displayed to the user so as to avoid being deleted by mistake.
Of course, in practical applications, the files may be filtered by a white list, and the files may be filtered by a black list. Certainly, under the filtering mode of the blacklist, some characteristic attributes of the files which can be displayed to the user are stored in the blacklist, that is, the files of which the attribute information hits the blacklist are the files which need to be displayed to the user. That is to say, after the pending files with a large occupied space are selected, the key files or important files of the system can be selected in a white list mode and then filtered out, but the files which hit the black list rule can be selected from the pending files and displayed to the user as the files which have influence on the system performance and can be deleted. When creating the black list, the black list may be created according to past experience, for example, the directory where the common junk files in the system disk (generally, C disk) are located includes the following:
cookies record (c: Cookies of Documents and Settings user names);
windows user temporary folder (c: Documents and Settings user name LocalSettingsTemp);
browser cache directory (c: Documents and Settings user name LocalSettings TemporaryInternet Files);
history file records opened recently (c: all files under Documents and Settings user name localsettingsHistory);
history shortcut records opened recently (c: all files under Documents and Settings user name Recent);
windows temporary directory (c: all files under WINDOWSTemp);
windows update patch directory (c: all files under WINDOWSSOWWARNeDistributionTownload);
the files generally occupy a large space and are not useful for a system or a user, so that a blacklist rule can be created according to information such as a path and a directory of the files and used for filtering the files to be determined.
It should be noted that, in practical applications, the preset rules for filtering the files may be manually set by the user according to practical needs, and corresponding entries may also be provided to allow the user to add new rules, or delete or change original rules, and so on.
S103: acquiring and displaying the description information of each target file;
after the target file that can be presented to the user is determined, the target file can be presented. In the embodiment of the invention, not only the file name, the path and other basic attribute information of each target file can be displayed, but also the description information of each target file can be acquired and displayed to the user, so that the user can refer to the description information of each target file to judge whether to execute the deleting operation. The description information may be explanatory information for describing the action of the file and/or explanatory information for describing the effect that may be caused after deletion, that is, including the use of the file, what effect is exerted after deletion, and the like. In general, each file stored on the disk stores the description information of each file at the same time, so that the description information of each file can be directly obtained from the description information, or the description information matched with the target file can be obtained according to the description information of each file stored on the server, and so on.
S104: and providing a deletion entry for the target file so as to delete the corresponding target file when a deletion request is received through the deletion entry.
When the target file and the description information thereof are displayed to the user, an operation entry for deleting the file can be provided for the user, so that if the user determines that a certain file needs to be deleted according to the description information and the like of each file, a deletion instruction can be directly sent out from the entry, and then the corresponding file can be automatically found according to the path and the like of the file, and the deletion operation is executed. Therefore, in the process, the user does not need to search the file in the specific disk, and the file is deleted manually, so that the user operation is facilitated, and the implementation efficiency of file arrangement can be improved.
In practical applications, when each target file and its corresponding description information are presented to a user, the target files and their corresponding description information may be presented in a list manner, as shown in the left part of fig. 2, it can be seen that attribute information such as a file name, a located disk name, and a size of each target file is presented in the list, and the description information about the file may be displayed in a pop-up window or the like when the user moves an operation focus to an entry where a certain file is located. For example, in fig. 2, when the mouse is moved over the file "enterwww.cab", a rectangular box is shown under the entry, in which descriptive information is shown, including the complete path of the file and its use, such as "office installation file". Or, in order to be more intuitive, in the embodiment of the present invention, the size sum of each type of file and the proportion of the size sum of each type of file in the size sum of all target files may be respectively counted according to the type of each target file, and then the sum is displayed in a more intuitive manner, such as a histogram, a bar graph, a pie chart, a ring chart, and the like according to the proportion of each type of file. For example, as shown in the right-hand portion of fig. 2, this is the case in which the ring-shaped body is present. For convenience of description, referring to fig. 3, it is equivalent to the display effect after enlarging the right part of fig. 2, and as can be seen from fig. 3, the statistical result is that the target file is divided into six categories of document, image, video, music, compression, and others, in the ring diagram, different types can be represented by different colors, and different area areas represent the proportion of each type of file. It should be noted that, since the drawings can only be illustrated by black and white pictures, the file types corresponding to the respective areas are illustrated by using the lead lines, and in practical applications, the lead lines do not need to be displayed, but can display the file types corresponding to a certain area and the occupied proportion thereof in the central area of the annular diagram when the mouse enters the certain area. For example, in FIG. 3, the mouse enters the "other" file area, and "other, 1.3 GB" is displayed in the center area. If the mouse does not enter any area of the ring graph, the aggregate size of the currently selected large files, e.g., "aggregate size 2.8 GB", may be displayed in the center area.
Under the presentation mode of the annular diagram, when the deletion entries are provided, the total deletion entries can be respectively provided for the target files of various types, so that if a user determines that the files of a certain type need to be deleted completely, a deletion request can be sent through the total deletion entries corresponding to the type, when the deletion request is received through the total deletion entries, the target files of the corresponding type can be deleted completely, and the operation of the user is further facilitated. Of course, in order to facilitate the user to delete a single file, separate deletion entries may be provided for each file. In specific implementation, when an operation focus of a user enters an area where a certain type is located, each file in the type can be expanded and displayed in a list form, and the list provides the individual operation entry for each file, so that when a deletion request is received through an individual deletion entry, the individual file corresponding to the deletion entry can be deleted. Referring to fig. 4, when the user enters the area where the video type is located through the operation focus, the target files of the type can be listed in the left window in a list form, meanwhile, a check box is arranged in front of each file, if a file is to be deleted, the file to be deleted can be checked in a mode of checking the check box, and the deletion can be performed through a deletion entry in the interface. As shown in fig. 5, assuming that three video files are selected, the "delete" button in the upper right corner becomes available, and the three files can be deleted by clicking the button.
In short, through the embodiment of the invention, some specific files can be selected, the file names and the description information thereof are displayed to the user, and meanwhile, deletion entries of all the files are provided, so that when the user needs to delete a certain file, the user can directly enter the file through the entry to execute deletion operation, the user operation is facilitated, and the realization efficiency of file cleaning is improved. In addition, through the setting of specific rules, only files which may affect the system performance and do not belong to the system key files or the user important files can be displayed to the user, so that the user can more intuitively see the files which can be deleted, and the system key files or the user important files are prevented from being deleted.
Corresponding to the file cleaning method provided by the embodiment of the present invention, the embodiment of the present invention further provides a file cleaning apparatus, and referring to fig. 6, the apparatus may include:
an attribute information acquisition unit 601 configured to acquire attribute information of each file in the disk;
a target file obtaining unit 602, configured to select a file whose attribute information meets a preset condition as a target file;
a description information presentation unit 603 configured to obtain and present description information of each target file;
a delete entry providing unit 604, configured to provide a delete entry for the target file, so that when a delete request is received through the delete entry, the corresponding target file is deleted.
Wherein, the attribute information acquiring unit 601 may include:
and the main file table query subunit is used for acquiring the attribute information of each file in the disk in a mode of querying the main file table of the disk.
The attribute information includes the size, path, directory, file name, suffix name and/or file type of the file, and the target file obtaining unit includes:
the undetermined file acquisition subunit is used for selecting the undetermined file according to the size of the file;
and the filtering subunit is used for filtering system key files and important files from the pending files according to the path of the file, the directory where the file is located, the file name, the suffix name and/or the file type, and determining the rest files as the target files.
In a specific implementation, the pending file obtaining subunit may include:
the first candidate selecting subunit is used for selecting a preset number of files with the largest file size as files to be determined;
or,
and the second candidate selecting subunit is used for selecting the file with the file size exceeding the preset threshold value as the pending file.
Wherein the filtering subunit comprises:
and the judging subunit is used for judging whether the path, the directory, the file name, the suffix name and/or the file type of the undetermined file hit a preset white list rule, if so, the undetermined file is a system key file or an important file, and filtering the system key file or the important file.
The white list rule comprises a specific keyword, a specific directory, a specific file name and a specific suffix name in a file path, or a regular matching condition established according to the file path, the file name and the file type.
Wherein the description information of the target file comprises: explanatory information for expressing the file action and/or helpful information for expressing the consequences that may result after deletion.
Wherein the description information presentation unit includes:
the counting subunit is used for respectively counting the size sum of the various files according to the types of the target files and the proportion of the size sum of the various files in the size sum of all the target files;
and the image display subunit is used for displaying the files in a ring image mode according to the proportion of the files of various types.
Wherein the deletion entry providing unit includes:
and the first deletion entry providing subunit is configured to provide a total deletion entry for each type of target file, so that when a deletion request is received through the total deletion entry, all target files of corresponding types are deleted.
In addition, the apparatus may further include:
the expansion unit is used for displaying the description information of all the target files in a certain type in a list form when the operation focus enters the area where the target files in the type are located;
the deletion entry providing unit includes:
and the second deletion entry providing subunit is used for respectively providing a separate deletion entry for each target file under the type.
The device provided by the embodiment of the invention can select some specific files, display the file names and the description information thereof to the user, and provide the deletion entries of all the files, so that when the user needs to delete a certain file, the user can directly enter the file through the entry to execute the deletion operation, the operation of the user is facilitated, and the realization efficiency of file cleaning is improved. In addition, through the setting of specific rules, only files which may affect the system performance and do not belong to the system key files or the user important files can be displayed to the user, so that the user can more intuitively see the files which can be deleted, and the system key files or the user important files are prevented from being deleted.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a document cleaning apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The application is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the computer system/server include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems, and the like. The computer system/server may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.

Claims (20)

1. A file cleaning method, comprising:
acquiring attribute information of each file in a disk;
selecting a file with attribute information meeting preset conditions as a target file;
acquiring and displaying the description information of each target file;
and providing a deletion entry for the target file so as to delete the corresponding target file when a deletion request is received through the deletion entry.
2. The method of claim 1, wherein the obtaining attribute information of each file in the disk comprises:
and acquiring the attribute information of each file in the disk in a mode of inquiring a disk main file table.
3. The method according to claim 1, wherein the attribute information includes a size, a path, a directory, a file name, a suffix name and/or a file type of the file, and the selecting the file whose attribute information meets a preset condition as the target file includes:
selecting a pending file according to the size of the file;
and filtering out system key files and important files from the pending files according to the paths of the files, the directories, the file names, the suffix names and/or the file types, and determining the residual files as the target files.
4. The method of claim 3, wherein the selecting the pending file according to the size of the file comprises:
selecting a preset number of files with the largest file size as files to be determined;
or,
and selecting the file with the size exceeding a preset threshold value as the pending file.
5. The method of claim 3, wherein the filtering out system critical and important files from the pending files comprises:
judging the path, the directory, the file name, the suffix name and/or the file type of the undetermined file, judging whether the undetermined file hits a preset white list rule, if so, filtering the undetermined file to obtain a system key file or an important file.
6. The method of claim 5, wherein the white list rule comprises a specific keyword in a file path, a specific directory, a specific file name, a specific suffix name, or a regular matching condition established according to the file path, the file name, and the file type.
7. The method of any one of claims 1 to 6, wherein the description information of the target file comprises: descriptive information for describing the file's role and/or descriptive information for describing possible consequences that may result after deletion.
8. The method according to any one of claims 1 to 6, wherein the obtaining and presenting the description information of each target file comprises:
respectively counting the sum of the sizes of various files and the proportion of the sum of the sizes of various files in the sum of the sizes of all the target files according to the types of the target files;
and displaying the files in a ring diagram mode according to the proportion of the files of various types.
9. The method of claim 8, wherein said providing a delete entry for said target file comprises:
and respectively providing a total deletion entry for each type of target file so as to delete all target files of corresponding types when a deletion request is received through the total deletion entry.
10. The method of claim 8, further comprising:
when the operation focus enters the area where a certain type of target file is located, displaying the description information of all target files in the type in a list form;
the providing a deletion entry for the target file comprises:
and respectively providing a separate deleting inlet for each target file under the type.
11. A file cleaning device comprises
The attribute information acquisition unit is used for acquiring the attribute information of each file in the disk;
the target file acquisition unit is used for selecting a file of which the attribute information meets preset conditions as a target file;
the description information display unit is used for acquiring and displaying the description information of each target file;
and the deletion entry providing unit is used for providing a deletion entry for the target file so as to delete the corresponding target file when a deletion request is received through the deletion entry.
12. The apparatus of claim 11, wherein the attribute information acquisition unit comprises:
and the main file table query subunit is used for acquiring the attribute information of each file in the disk in a mode of querying the main file table of the disk.
13. The apparatus according to claim 11, wherein the attribute information includes a size, a path, a directory where the file exists, a file name, a suffix name, and/or a file type of the file, and the target file obtaining unit includes:
the undetermined file acquisition subunit is used for selecting the undetermined file according to the size of the file;
and the filtering subunit is used for filtering system key files and important files from the pending files according to the path of the file, the directory where the file is located, the file name, the suffix name and/or the file type, and determining the rest files as the target files.
14. The apparatus of claim 13, wherein the pending file acquiring subunit comprises:
the first candidate selecting subunit is used for selecting a preset number of files with the largest file size as files to be determined;
or,
and the second candidate selecting subunit is used for selecting the file with the file size exceeding the preset threshold value as the pending file.
15. The apparatus of claim 13, wherein the filtering subunit comprises:
and the judging subunit is used for judging whether the path, the directory, the file name, the suffix name and/or the file type of the undetermined file hit a preset white list rule, if so, the undetermined file is a system key file or an important file, and filtering the system key file or the important file.
16. The apparatus of claim 15, wherein the white list rule comprises a specific keyword in a file path, a specific directory, a specific file name, a specific suffix name, or a regular matching condition established according to the file path, the file name, and a file type.
17. The apparatus of any one of claims 11 to 16, wherein the description information of the object file comprises: explanatory information for expressing the file action and/or helpful information for expressing the consequences that may result after deletion.
18. The apparatus of any one of claims 11 to 16, wherein the description information presentation unit comprises:
the counting subunit is used for respectively counting the size sum of the various files according to the types of the target files and the proportion of the size sum of the various files in the size sum of all the target files;
and the image display subunit is used for displaying the files in a ring image mode according to the proportion of the files of various types.
19. The apparatus of claim 18, wherein the delete entry providing unit comprises:
and the first deletion entry providing subunit is configured to provide a total deletion entry for each type of target file, so that when a deletion request is received through the total deletion entry, all target files of corresponding types are deleted.
20. The apparatus of claim 18, further comprising:
the expansion unit is used for displaying the description information of all the target files in a certain type in a list form when the operation focus enters the area where the target files in the type are located;
the deletion entry providing unit includes:
and the second deletion entry providing subunit is used for respectively providing a separate deletion entry for each target file under the type.
CN201210379472.3A 2012-09-29 2012-09-29 File clean-up method and device Active CN102880713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210379472.3A CN102880713B (en) 2012-09-29 2012-09-29 File clean-up method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210379472.3A CN102880713B (en) 2012-09-29 2012-09-29 File clean-up method and device

Publications (2)

Publication Number Publication Date
CN102880713A true CN102880713A (en) 2013-01-16
CN102880713B CN102880713B (en) 2016-08-03

Family

ID=47482039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210379472.3A Active CN102880713B (en) 2012-09-29 2012-09-29 File clean-up method and device

Country Status (1)

Country Link
CN (1) CN102880713B (en)

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880714A (en) * 2012-09-29 2013-01-16 北京奇虎科技有限公司 File deleting method and file deleting device
CN103176828A (en) * 2013-03-29 2013-06-26 北京奇虎科技有限公司 Method and device of deleting application program residual files
CN104111773A (en) * 2014-06-13 2014-10-22 北京金山安全软件有限公司 Data information display method and terminal
CN104699688A (en) * 2013-12-04 2015-06-10 杭州鹰湾科技有限公司 File searching method and electronic device
CN104809198A (en) * 2015-04-23 2015-07-29 北京奇虎科技有限公司 Picture cleanup method, picture cleanup device and terminal device
CN104881493A (en) * 2015-06-12 2015-09-02 北京金山安全软件有限公司 File cleaning method and device
CN104881495A (en) * 2015-06-15 2015-09-02 北京金山安全软件有限公司 Folder path identification and folder cleaning method and device
CN104881496A (en) * 2015-06-15 2015-09-02 北京金山安全软件有限公司 File name identification and file cleaning method and device
CN104951388A (en) * 2015-06-04 2015-09-30 广东欧珀移动通信有限公司 Method and device for displaying information in folder
CN105045928A (en) * 2015-08-27 2015-11-11 北京金山安全软件有限公司 To-be-cleaned data display method and device and electronic equipment
CN105159975A (en) * 2015-08-27 2015-12-16 北京金山安全软件有限公司 To-be-cleaned data identification method and device and electronic equipment
CN105183902A (en) * 2015-09-30 2015-12-23 北京金山安全软件有限公司 File cleaning method and device and terminal
WO2016000553A1 (en) * 2014-06-30 2016-01-07 北京金山安全软件有限公司 Junk directory authentication method and apparatus
CN105260367A (en) * 2014-06-11 2016-01-20 腾讯科技(深圳)有限公司 Method and device for determining downloaded file address
CN105335405A (en) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 System file detection method and device
CN105446980A (en) * 2014-06-27 2016-03-30 北京金山安全软件有限公司 Method and device for identifying picture junk files
CN105930252A (en) * 2016-04-29 2016-09-07 杨夫春 Mobile terminal file memory display method
WO2016145804A1 (en) * 2015-08-03 2016-09-22 中兴通讯股份有限公司 Data processing and device
CN106202325A (en) * 2016-07-01 2016-12-07 北京金山安全软件有限公司 File processing method and device based on social software and mobile terminal
CN106557515A (en) * 2015-09-29 2017-04-05 北京国双科技有限公司 File delet method and device
US20170132239A1 (en) * 2014-06-30 2017-05-11 Beijing Kingsoft Internet Security Software Co., Ltd. Junk picture file identification method, apparatus, and electronic device
CN106874366A (en) * 2016-12-30 2017-06-20 腾讯科技(深圳)有限公司 The processing method and processing device of software information
CN107133139A (en) * 2016-02-26 2017-09-05 宏碁股份有限公司 Intelligent disc monitoring method and the device using this method
CN107273523A (en) * 2017-06-22 2017-10-20 北京北信源软件股份有限公司 A kind of network access record purge method and device
CN107609066A (en) * 2017-08-30 2018-01-19 努比亚技术有限公司 Method, equipment and the computer for clearing up file can storage mediums
CN107704595A (en) * 2017-10-13 2018-02-16 苏州亿科赛卓电子科技有限公司 A kind of method and device of quickly deleting file
CN108021590A (en) * 2016-10-28 2018-05-11 阿里巴巴集团控股有限公司 A kind of destination object attribute determining method, attribute update method and device
CN108829765A (en) * 2018-05-29 2018-11-16 平安科技(深圳)有限公司 A kind of information query method, device, computer equipment and storage medium
CN114328407A (en) * 2021-12-10 2022-04-12 成都鲁易科技有限公司 File deletion method and device, storage medium and terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256575A (en) * 2008-03-25 2008-09-03 华为技术有限公司 Method and apparatus for improving veneer disk space utilization ratio
CN101795320A (en) * 2010-01-28 2010-08-04 惠州Tcl移动通信有限公司 Method for cleaning up files in mobile communication terminal
CN102332014A (en) * 2011-09-14 2012-01-25 奇智软件(北京)有限公司 Method and device for deleting file
CN102346771A (en) * 2011-09-22 2012-02-08 奇智软件(北京)有限公司 Information expression method and device
CN102609644A (en) * 2012-01-11 2012-07-25 杭州东信北邮信息技术有限公司 File protection process

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256575A (en) * 2008-03-25 2008-09-03 华为技术有限公司 Method and apparatus for improving veneer disk space utilization ratio
CN101795320A (en) * 2010-01-28 2010-08-04 惠州Tcl移动通信有限公司 Method for cleaning up files in mobile communication terminal
CN102332014A (en) * 2011-09-14 2012-01-25 奇智软件(北京)有限公司 Method and device for deleting file
CN102346771A (en) * 2011-09-22 2012-02-08 奇智软件(北京)有限公司 Information expression method and device
CN102609644A (en) * 2012-01-11 2012-07-25 杭州东信北邮信息技术有限公司 File protection process

Cited By (46)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880714A (en) * 2012-09-29 2013-01-16 北京奇虎科技有限公司 File deleting method and file deleting device
CN102880714B (en) * 2012-09-29 2016-08-24 北京奇虎科技有限公司 File clean-up method and device
CN103176828A (en) * 2013-03-29 2013-06-26 北京奇虎科技有限公司 Method and device of deleting application program residual files
CN103176828B (en) * 2013-03-29 2017-06-09 北京奇虎科技有限公司 Delete the method and device of application program Stub File
CN104699688A (en) * 2013-12-04 2015-06-10 杭州鹰湾科技有限公司 File searching method and electronic device
CN105260367B (en) * 2014-06-11 2019-08-30 腾讯科技(深圳)有限公司 A kind of determination method and device for downloading file address
CN105260367A (en) * 2014-06-11 2016-01-20 腾讯科技(深圳)有限公司 Method and device for determining downloaded file address
CN104111773A (en) * 2014-06-13 2014-10-22 北京金山安全软件有限公司 Data information display method and terminal
US10540325B2 (en) * 2014-06-27 2020-01-21 Beijing Kingsoft Internet Security Software Co., Ltd. Method and device for identifying junk picture files
CN105446980A (en) * 2014-06-27 2016-03-30 北京金山安全软件有限公司 Method and device for identifying picture junk files
CN105446980B (en) * 2014-06-27 2018-12-14 北京金山安全软件有限公司 Method and device for identifying picture junk files
US20170132239A1 (en) * 2014-06-30 2017-05-11 Beijing Kingsoft Internet Security Software Co., Ltd. Junk picture file identification method, apparatus, and electronic device
WO2016000553A1 (en) * 2014-06-30 2016-01-07 北京金山安全软件有限公司 Junk directory authentication method and apparatus
US10838917B2 (en) * 2014-06-30 2020-11-17 Beijing Kingsoft Internet Security Software Co., Ltd. Junk picture file identification method, apparatus, and electronic device
CN105335405B (en) * 2014-07-29 2018-10-12 北京奇虎科技有限公司 The detection method and device of system file
CN105335405A (en) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 System file detection method and device
CN104809198A (en) * 2015-04-23 2015-07-29 北京奇虎科技有限公司 Picture cleanup method, picture cleanup device and terminal device
CN104951388A (en) * 2015-06-04 2015-09-30 广东欧珀移动通信有限公司 Method and device for displaying information in folder
CN104951388B (en) * 2015-06-04 2017-10-13 广东欧珀移动通信有限公司 A kind of method and device for showing folder information
CN104881493B (en) * 2015-06-12 2018-09-11 北京金山安全软件有限公司 file cleaning method and device
CN104881493A (en) * 2015-06-12 2015-09-02 北京金山安全软件有限公司 File cleaning method and device
CN104881495B (en) * 2015-06-15 2019-03-26 北京金山安全软件有限公司 Folder path identification and folder cleaning method and device
US10705748B2 (en) 2015-06-15 2020-07-07 Beijing Kingsoft Internet Security Software Co., Ltd. Method and device for file name identification and file cleaning
CN104881496A (en) * 2015-06-15 2015-09-02 北京金山安全软件有限公司 File name identification and file cleaning method and device
CN104881496B (en) * 2015-06-15 2018-12-14 北京金山安全软件有限公司 File name identification and file cleaning method and device
CN104881495A (en) * 2015-06-15 2015-09-02 北京金山安全软件有限公司 Folder path identification and folder cleaning method and device
WO2016145804A1 (en) * 2015-08-03 2016-09-22 中兴通讯股份有限公司 Data processing and device
US10664443B2 (en) 2015-08-27 2020-05-26 Beijing Kingsoft Internet Security Software Co., Ltd. Method and apparatus for presenting to-be-cleaned data, and electronic device
CN105045928A (en) * 2015-08-27 2015-11-11 北京金山安全软件有限公司 To-be-cleaned data display method and device and electronic equipment
CN105159975A (en) * 2015-08-27 2015-12-16 北京金山安全软件有限公司 To-be-cleaned data identification method and device and electronic equipment
CN105159975B (en) * 2015-08-27 2018-09-11 北京金山安全软件有限公司 To-be-cleaned data identification method and device and electronic equipment
CN106557515A (en) * 2015-09-29 2017-04-05 北京国双科技有限公司 File delet method and device
CN105183902A (en) * 2015-09-30 2015-12-23 北京金山安全软件有限公司 File cleaning method and device and terminal
CN105183902B (en) * 2015-09-30 2019-03-15 北京金山安全软件有限公司 File cleaning method and device and terminal
CN107133139A (en) * 2016-02-26 2017-09-05 宏碁股份有限公司 Intelligent disc monitoring method and the device using this method
CN105930252A (en) * 2016-04-29 2016-09-07 杨夫春 Mobile terminal file memory display method
CN106202325A (en) * 2016-07-01 2016-12-07 北京金山安全软件有限公司 File processing method and device based on social software and mobile terminal
CN108021590A (en) * 2016-10-28 2018-05-11 阿里巴巴集团控股有限公司 A kind of destination object attribute determining method, attribute update method and device
CN108021590B (en) * 2016-10-28 2022-01-18 斑马智行网络(香港)有限公司 Target object attribute determining method, attribute updating method and device
CN106874366A (en) * 2016-12-30 2017-06-20 腾讯科技(深圳)有限公司 The processing method and processing device of software information
CN106874366B (en) * 2016-12-30 2020-06-02 腾讯科技(深圳)有限公司 Software information processing method and device
CN107273523A (en) * 2017-06-22 2017-10-20 北京北信源软件股份有限公司 A kind of network access record purge method and device
CN107609066A (en) * 2017-08-30 2018-01-19 努比亚技术有限公司 Method, equipment and the computer for clearing up file can storage mediums
CN107704595A (en) * 2017-10-13 2018-02-16 苏州亿科赛卓电子科技有限公司 A kind of method and device of quickly deleting file
CN108829765A (en) * 2018-05-29 2018-11-16 平安科技(深圳)有限公司 A kind of information query method, device, computer equipment and storage medium
CN114328407A (en) * 2021-12-10 2022-04-12 成都鲁易科技有限公司 File deletion method and device, storage medium and terminal

Also Published As

Publication number Publication date
CN102880713B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN102880713B (en) File clean-up method and device
CN102880714B (en) File clean-up method and device
EP3221803B1 (en) Relevant file identification using automated queries to disparate data storage locations
JP5106045B2 (en) Search engine linkage file sharing system
US9135306B2 (en) System for forensic analysis of search terms
US9852157B2 (en) Searching of images based upon visual similarity
US9361320B1 (en) Modeling big data
EP2215568B1 (en) Presenting and navigating content having varying properties
US20070233647A1 (en) Sharing Items In An Operating System
US20150199433A1 (en) Method and system for search engine indexing and searching using the index
CA2698179A1 (en) Document search tool
CN110825694A (en) Data processing method, device, equipment and storage medium
WO2005111864A2 (en) Item type specific structured search
CN102929875B (en) A kind of locating file method, device and electronic equipment
US20130332429A1 (en) Model for generating custom file plans towards management of content as records
CN112882789A (en) Information display method and device, electronic equipment and storage medium
WO2024082525A1 (en) File snapshot method and system, electronic device, and storage medium
GB2539384A (en) Data search method and device
KR101653096B1 (en) Method and apparatus for managing intellectual property
KR20170122353A (en) Method and apparatus for managing intellectual property
WO2017045493A1 (en) Method and device for setting files to be removed
JP6131646B2 (en) SEARCH SYSTEM, PROGRAM, STORAGE MEDIUM, AND SEARCH METHOD
JP5751974B2 (en) Integrated management apparatus, document management method, and computer program
JP2005309512A (en) Information processing program, information processing method, information processor and recording medium
KR101663887B1 (en) Method and apparatus for managing intellectual property

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220721

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right