CN106708912B - Junk file identification and management method, identification device, management device and terminal - Google Patents

Junk file identification and management method, identification device, management device and terminal Download PDF

Info

Publication number
CN106708912B
CN106708912B CN201510807437.0A CN201510807437A CN106708912B CN 106708912 B CN106708912 B CN 106708912B CN 201510807437 A CN201510807437 A CN 201510807437A CN 106708912 B CN106708912 B CN 106708912B
Authority
CN
China
Prior art keywords
file
junk
attribute data
storage object
junk 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
CN201510807437.0A
Other languages
Chinese (zh)
Other versions
CN106708912A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510807437.0A priority Critical patent/CN106708912B/en
Priority to PCT/CN2016/083174 priority patent/WO2016197814A1/en
Publication of CN106708912A publication Critical patent/CN106708912A/en
Application granted granted Critical
Publication of CN106708912B publication Critical patent/CN106708912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1727Details of free space management performed by the file system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1724Details of de-fragmentation performed by the file system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a junk file identification and management method, an identification device, a management device and a terminal, wherein the junk file identification method comprises the following steps: acquiring an element set comprising at least one element, and setting a junk file judgment strategy according to a threshold value of the at least one element; the elements are set according to target attribute data of the storage object in the file system; analyzing actual values of all elements in the element set of the storage object according to the current actual target attribute data of the storage object in the file system; and judging whether the storage object is a junk file or not according to the actual value of each element in the storage object element set and the threshold matching condition of the corresponding element in the junk file judgment strategy. By adopting the junk file identification method, the target attribute data setting elements of the storage object in the file system can be effectively utilized, a junk judgment strategy is formulated, the junk files are quickly and accurately identified, the method is ensured to be suitable for different terminals, and the adaptability and the judgment accuracy of the method are improved.

Description

Junk file identification and management method, identification device, management device and terminal
Technical Field
The invention relates to the technical field of computers, in particular to a junk file identification and management method, an identification device, a management device and a terminal.
Background
With the development of science and technology, people have increasingly greater dependence on terminals such as computers, mobile phones and the like, and have higher requirements on the running speed of the terminals. After the terminal is used for a period of time, more and more junk files are generated, so that the terminal is in the situations of blockage, insufficient internal and external storage spaces and the like, and the use of the terminal is influenced. In order to recover the running speed of the terminal, the garbage files of the terminal need to be cleaned, and more storage space is released.
At present, the general junk file identification method is as follows: the method comprises the steps that a user selects a file needing to be judged, then the file is added into a certain detection application, and the detection application utilizes a preset garbage judgment model to identify whether the file added by the user is a garbage file. If a file is identified as junk, the detection application suggests to the user to clean up the junk. In the existing cleaning method, a preset garbage judgment model is unknown to a user, the model is invariable in the using process, but the garbage degree of a plurality of files in the terminal changes along with different using modes and using times, the method for identifying the garbage files based on the preset model has poor adaptability, errors can be generated, and the judgment accuracy is reduced.
Disclosure of Invention
The invention provides a junk file identification and management method, an identification device, a management device and a terminal, and solves the problems of poor adaptability and low accuracy of a junk file identification method in the prior art.
In order to solve the above technical problem, the present invention provides a junk file identification method, including:
acquiring an element set comprising at least one element, and setting a junk file judgment strategy according to a threshold value of the at least one element; the elements are set according to target attribute data of the storage object in the file system;
analyzing actual values of all elements in the element set of the storage object according to the current actual target attribute data of the storage object in the file system;
and judging whether the storage object is a junk file or not according to the actual value of each element in the storage object element set and the threshold matching condition of the corresponding element in the junk file judgment strategy.
Further, the storage object includes: files and/or folders.
Further, the target attribute data includes operation attribute data and/or size attribute data, and the elements include an operation attribute element set according to the operation attribute data and/or a size attribute element set according to the size attribute data.
Further, the matching when the storage object element set includes the operation attribute element includes: whether the actual value of the operation attribute element is matched with the threshold value of the operation attribute element or not; when the storage object element set comprises the size attribute elements, the matching condition comprises the following steps: what the size attribute element is whether the actual value matches the threshold value of the size attribute element.
Further, the object attribute data also displays status attribute data, and the elements also include status display elements set according to the display status attribute data.
Further, when the storage object element set includes the status display element, the matching condition includes: whether the actual value of the display status element matches the threshold value of the display status element.
Further, when the target attribute data includes operation attribute data, the operation attribute data includes at least one of an operation type, an operation time and an operation time interval, and the operation attribute element includes at least one of an operation type element, an operation time element and an operation time interval element;
when the target attribute data comprises the size attribute data, the size attribute data comprises at least one of the current size of the storage object, the size variation of the storage object in a preset time period and the space size of the storage area where the storage object is located; the size attribute element comprises at least one of a current size element of the storage object, a size variation element of the storage object and a space size element of the storage area where the storage object is located.
Further, still include: and receiving a strategy modification instruction sent by a user, and modifying the junk file judgment strategy according to the strategy modification instruction.
Further, the strategy modification instruction is an element adjustment instruction for adjusting elements of the junk file judgment strategy; the modifying the junk file judgment policy comprises the following steps: updating the elements in the element set according to the element adjusting instruction, and updating the strategy according to the updated element set;
or the strategy modification instruction is an element threshold value adjusting instruction used for adjusting the threshold value of the element of the junk file judgment strategy; the modifying the junk file judgment policy comprises the following steps: and updating the threshold of the corresponding element according to the element threshold adjusting instruction, and updating the strategy according to the updated threshold.
In order to better manage the garbage file based on the solution of the above technical problem, the present invention provides a garbage file management method, including:
identifying the junk files by the identification method of the junk files;
and managing the junk files.
Further, managing the junk file includes:
directly deleting the junk files;
or displaying the junk files to a user for confirmation, and managing the junk files according to a first confirmation instruction of the user;
or the junk files and the junk file judgment strategy are presented to the user for confirmation, and the junk files are managed according to a second confirmation instruction of the user.
The invention also provides a junk file identification device, which comprises:
the policy setting module is used for acquiring an element set comprising at least one element and setting a junk file judgment policy according to a threshold value of the at least one element; the elements are set according to target attribute data of the storage object in the file system;
the analysis module is used for analyzing and obtaining the actual value of each element in the element set of the storage object according to the current actual target attribute data of the storage object in the file system;
and the judging module is used for judging whether the storage object is a junk file according to the actual value of each element in the storage object element set and the threshold matching condition of the corresponding element in the junk file judging strategy.
Further, the target attribute data includes operation attribute data and/or size attribute data, and the elements include an operation attribute element set according to the operation attribute data and/or a size attribute element set according to the size attribute data.
Further, the target attribute data further includes display status attribute data, and the element further includes a status display element set according to the display status attribute data.
Further, the policy setting module further comprises: a receiving module: the system comprises a policy modification instruction used for receiving a policy modification instruction sent by a user; modifying the sub-modules: and the strategy modification module is used for modifying the junk file judgment strategy according to the strategy modification instruction.
Further, the receiving module comprises a first receiving submodule for receiving an element adjusting instruction, wherein the element adjusting instruction is a strategy modifying instruction for adjusting the elements of the junk file judging strategy; the modification submodule includes a first modification submodule: the strategy updating module is used for updating the elements in the element set according to the element adjusting instruction and updating the strategy according to the updated element set;
or the receiving module comprises a second receiving submodule and is used for receiving an element threshold adjusting instruction, wherein the element threshold adjusting instruction is a strategy modifying instruction used for adjusting the threshold of the element of the junk file judging strategy; the modification submodule includes a second modification submodule: and updating the threshold of the corresponding element according to the element threshold adjusting instruction, and updating the strategy according to the updated threshold.
The present invention also provides a junk file management apparatus, including:
the junk file identification device is used for identifying junk files in the terminal file system;
and the management module is used for managing the junk files.
Further, the management module comprises a management submodule:
the method is used for directly deleting the junk files;
or the junk file is presented to the user for confirmation, and the junk file is managed according to a first confirmation instruction of the user;
or the junk file management module is used for presenting the junk file and the junk file judgment strategy to a user for confirmation, and managing the junk file according to a second confirmation instruction of the user.
The present invention also provides a terminal, comprising:
the junk file identifying means and the junk file managing means as described above; the junk file identification device is used for identifying junk files in the terminal file system; the junk file management device is used for managing the junk files identified by the junk file identification device.
Has the advantages that:
by adopting the method for identifying the junk files, the target attribute data of the storage objects in the file system can be utilized, setting an element set containing at least one element according to the data, setting a junk file judgment strategy capable of judging the junk file according to the threshold value of the elements, then according to the current actual target attribute data of the storage object in the file system, analyzing to obtain the actual value of the element, the identification method provided by the invention has higher judgment accuracy by judging whether the storage object is the junk file or not according to the actual value of each element in the element set of the storage object and the junk file judgment strategy, and because the junk file judgment strategy adopted by the method is set according to the element set by the target attribute data of the actual storage object, the method can be adapted to different requirements according to different selected elements, so that the method has good adaptability.
Further, in order to improve the accuracy of judgment and better utilize the existing resources, the invention selects the operation attribute data and/or the size attribute data from the target attribute data of the storage object as the important data source of the setting element, and sets the operation attribute element and the size attribute element according to the two data respectively.
Furthermore, considering that different users may have different requirements for the junk file judgment policy, in order to adapt to actual needs and improve judgment accuracy, the present invention may also modify the junk file judgment policy according to a policy modification instruction sent by the user.
Drawings
Fig. 1 is a schematic flow chart of a junk file identification method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a junk file management method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal according to a third embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for clearing junk files according to a fourth embodiment of the present invention.
Detailed Description
During the use process of the terminal, the system or various applications can generate corresponding files or folders, and the files or folders have corresponding attribute data. The method comprises the steps that a system or an application is operated, the attributes of corresponding files or folders comprise operations such as reading, writing and modifying, data related to the operations and other attribute data corresponding to the files are recorded by a terminal, and the junk files are identified based on deep mining of the original data.
The present invention will be described in further detail with reference to the following detailed description and accompanying drawings.
The first embodiment is as follows:
the present embodiment provides a garbage file cleaning method capable of more accurately determining and cleaning garbage files, improving the determination efficiency, and reducing the determination time, and the method please refer to fig. 1, which includes:
s101: acquiring an element set comprising at least one element, and setting a junk file judgment strategy according to a threshold value of the at least one element; (ii) a The elements are set according to target attribute data of the storage object in the file system;
s102: analyzing actual values of all elements in the element set of the storage object according to the current actual target attribute data of the storage object in the file system;
s103: judging whether the storage object is a junk file or not according to the actual value of each element in the storage object element set and the threshold matching condition of the corresponding element in the junk file judgment strategy;
in this embodiment, the storage object in the file system in S101 includes a file or a folder, and certainly includes data stored in the terminal in other forms, which is gradually generated in the process of using the system or various applications, and the longer the time is, the number and size of the file will increase, which will affect the running speed of the terminal.
In order to improve the accuracy of judging the garbage objects and fully utilize the existing data, the present embodiment analyzes the garbage degree of the storage objects based on the data indexes of various aspects of the storage objects in the file system, and of course, the data indexes of the storage objects are various and not all data are helpful for our judgment, so the present embodiment selects the target attribute data of the storage objects as the basis.
The target attribute data selected in this embodiment includes, but is not limited to: operation attribute data, size attribute data, and display state attribute data, the operation data including various data related to the operation of the storage object, such as data related to the type of the operation of the storage object, data related to the time of the operation of the storage object, and data related to the time interval of the operation of the storage object; the size attribute data includes data related to the size of the storage object, such as the size of the storage area where the storage object is located, the size of the area where the storage object is located, and the increment of the size of the storage object in a certain period of time, and if the storage object is a folder, the size attribute data also includes the number of subfiles of the folder; the display state attribute data is data related to various display states of the storage object, such as an originator of the storage object, a format of the storage object (being a file/folder), whether the storage object is readable, whether the storage object is writable, whether the storage object is display/hidden, and the like.
Correspondingly, the elements set according to the target attribute data in S101 include: the operation attribute elements set according to the operation attribute data, the size attribute elements set according to the size attribute data, and the status display elements set according to the display status attribute data, but the above three elements cannot be individually selected and used for making a spam file judgment policy to judge spam files.
Preferably, the operation attribute elements and/or the size attribute elements are/is selected as basic elements to formulate a garbage strategy, and when the storage object element set comprises the operation attribute elements, the matching condition comprises: whether the actual value of the operation attribute element is matched with the threshold value of the operation attribute element or not;
when the storage object element set comprises the size attribute elements, the matching condition comprises the following steps: what the size attribute element is whether the actual value matches the threshold value of the size attribute element.
The operation attribute elements of the embodiment include an operation type element, an operation time element, and an operation time interval element, where the operation type element includes all operation actions of the monitored file, such as deleting, creating, moving, copying, opening, modifying, and modifying readable and writable rights; the operation time pressure element includes times corresponding to the above-described various operations, such as a time of creating a file, a time of modifying a file, and the like; the operation time interval element may be regarded as a time period derived from the operation time, such as a time interval between the last modification time and the current time, a time interval between the last file opening and the current time, and the like.
After the elements are selected, a junk file judgment strategy can be set according to the threshold values of the elements, the selected elements are the time, the threshold values are numerical values related to the time, the selected elements are operation types, the threshold values are a specific operation type, and the junk strategy customized according to the operation attribute elements comprises the following modes:
firstly, selecting the operation type element, and setting the junk file judgment policy to judge a certain file as a junk file when detecting that the type of an operation performed on the certain file is deletion.
Selecting an operation time element, wherein the junk file judgment policy can be set to judge that a certain operation time of a certain file is before a certain time point, and the specific setting can be that the file is judged to be a junk file when the modification time of the file is before No. 8/8 of 2015. The above matching means that if the actual modification time of the file is No. 8/6 in 2015, the actual value of the modification time of the file is matched with the threshold value of the modification time in the garbage file judgment policy.
Selecting an operation time interval element, wherein the junk file judgment strategy can be limited to a certain operation time interval of a certain file from the current maximum time interval, and the file is judged to be a junk file when the operation time interval exceeds the interval, and the specific setting can be that the file is judged to be a junk file when the last time of access of the file exceeds the current time length by 10 days, or the file is judged to be a junk file when the effective activity time of an owner of the file is less than 30s within one week of the current time. .
And fourthly, selecting at least two elements of the operation type element, the operation time element and the operation time interval element to set garbage judgment processing, and judging that the file is a garbage file if the modification time of the file is all before No. 8/8 in 2015 and the last access time of the file is more than 10 days from the current time length.
The size attribute element of this embodiment includes a current size element of the storage object, a size variation element of the storage object, a size element of the storage area where the storage object is located, and the like, where the current size element of the storage object includes the size of the storage object, and if the storage object is a folder, the element refers to the entire size of the folder; the storage object size variation element comprises the size variation amount of the storage object in a certain period of time, and can be an increment or a difference; the size element of the storage area in which the storage object is located includes the total size of the storage area in which the storage object is located, and the threshold value set corresponding to the size element is a numerical condition that a certain size or a change amount of the size satisfies.
In the above-mentioned several size attribute elements, the garbage file is judged only by combining the general garbage judgment condition set according to the size element of the storage area where the storage object is located and the garbage judgment condition formulated according to other elements, and the garbage customization policy formulated according to the above-mentioned size attribute elements includes the following modes:
firstly, selecting the current size element of the storage object, wherein the junk file judgment strategy can be as follows: the cumulative write size of a single file exceeds 1G, or the overall size of the folder exceeds 800M, and the like.
Secondly, storing the size variable quantity elements of the object, wherein the junk file judgment strategy can be set as follows: if the size change of the stored object exceeds a certain value within a certain period of time, determining that the file is a junk file, specifically, if the increment of the file exceeds 300M within 7 days according to the current time, determining that the file is possibly a junk file. The above matching means that if the actual size of the file is increased by 200M within 7 days from the current time, the actual value of the storage object size variation element of the file does not match the threshold value of the storage object size variation element in the garbage file determination policy.
Thirdly, selecting any one of the current size element and the size variation element of the storage object or fully selecting the current size element and the size variation element of the storage object, setting a garbage file judgment strategy by combining the selected size element and the size element of the storage area where the storage object is located,
if the accumulated writing size of a single file exceeds 1G, the residual space of the partition where the file is located is less than 10%, and the size of the file occupies top 10 in the partition, judging that the file is a junk file;
or within 7 weeks from the current time, the increment of a certain file exceeds 300M, the residual space of the partition where the file is located is less than 10%, the size of the file occupies top 10 in the partition, and the file is judged to be a junk file;
or within the current 7 weeks, the increment of a certain file exceeds 300M, the cumulative writing size of the file exceeds 1G, the residual space of the partition where the file is located is less than 10%, the size of the file occupies top 10 in the partition, and the file is judged to be a junk file.
When the storage object element set of this embodiment includes the status display element, the matching condition includes: whether the actual value of the display status element matches the threshold value of the display status element.
The status display element of the present embodiment includes a format element indicating whether the storage object is a file or a folder; a readable attribute element indicating whether the document is readable; a writable attribute element indicating whether the file is writable; an originator element indicating an originator of the storage object; and a display/hide element indicating whether the storage object is in a hidden or displayed state.
The customized garbage strategy manufactured according to the state display element comprises the following modes:
one, only the format elements are selected, and the strategy is set that the storage object is a file or the storage object is a folder.
And secondly, only selecting the readable attribute elements or the writable attribute elements, and setting the strategy to be that the storage object can be read or the storage object can be written, wherein the file can be a junk file.
And thirdly, only selecting the originator elements, and setting the strategy that the originator of the storage object is an application or system which is easy to generate garbage, for example, the file originator is an application which is easy to generate garbage, such as QQ, WeChat, microblog and the like. The above matching means that if the originator of the document is a QQ, the actual values of the originator elements of the document match the threshold values of the originator elements in the spam determination policy.
And fourthly, only selecting the display/hidden elements, and setting the strategy that if the file or the folder is a hidden file, the file or the folder is not judged to be a junk file.
And fifthly, the garbage file judgment strategies set according to the four state display elements can be selected to be combined randomly to obtain a new garbage file judgment strategy.
The above is based on three major categories: the operation attribute elements, the size attribute elements and the state display elements can be combined into a new junk file judgment strategy at will, but the junk file judgment strategy made according to the state display elements needs to be used together with the junk file judgment strategy made according to other elements.
The junk file determination policy made according to the operation attribute element and the size attribute element may be a set of junk determination conditions set according to the respective sub-elements, for example, when the read-write time interval of a certain file currently exceeds 7 days or more, the cumulative write size of the file reaches or exceeds 1GB or more, and the time for the owner (application or system) of the file to effectively act within one week is less than or equal to 30s, the file is determined to be a junk file.
The junk file judgment policy made according to the operation attribute elements and the state display elements may be that the last operation time of a certain file is before 10 months and 30 th, the read-write time interval of the file currently exceeds more than 7 days, and the file is a non-hidden file, and the file is judged to be a junk file.
The strategy for judging the junk files specified by the three major elements can be as follows: the last operation time of a certain file is before No. 30 of 10 months; and the size of the file exceeds 1G; and the residual space of the partition where the file is located is less than 10%; and the increment of the file in one week exceeds 800M.
Of course, besides the above attribute data, the elements of the present embodiment may be set according to other data available for data mining.
If the spam file judgment policy is set in the above manner, more than one selected element is selected, and more than one spam file judgment policy is set, and it is possible that for a certain storage object, the actual values of all the elements do not match the threshold values of the elements in the spam file judgment policy, but only a part of the elements are matched, then a judgment rule may be set again, and the spam file is judged according to the actual matching condition, where the judgment rule may be that the storage object element set has elements whose actual values match the threshold values of the corresponding elements in the spam file judgment policy, and of course, these elements must include at least one of the above-mentioned operation attribute elements and size attribute elements, and the number of the matched elements is greater than a preset certain number value, and the storage object is judged to be a spam file. For example, the selected elements are an operation time interval element, an operation time element, a storage object current size element and a display state element, and the junk file judgment policy set according to the elements is as follows: 1. the last time of file access is more than 10 days from the current time, 2, the size of the file is more than 1G, 3, the originator of the storage object is an application or system which is easy to generate garbage, for example, the originator of the file is an application which is easy to generate garbage, such as QQ, WeChat, microblog and the like, and 4, the modification time of the file is all before No. 8/8 in 2015. The determination rule may be set such that the actual value of an element in the storage object element set matches at least the threshold value of an element in policy 1, or the actual value of an element in the storage object element set matches at least the threshold value of an element in policy 2, and on the basis that the number of matched elements in the storage object element set exceeds 2, the storage object is determined to be a junk file.
In this embodiment, the spam file determining policy set in S101 may be preset on the terminal, so S101 may also directly obtain a preset spam file determining policy.
The attribute data of the storage objects on different terminals are different, so that different users may have different requirements on the junk file judgment policy. In order to meet the requirements of users and improve the adaptability of the invention in different terminals, preferably, the implementation can receive a processing modification instruction sent by the user, and modify the junk file judgment policy according to the policy modification instruction.
Preferably, the policy modification instruction may be an element adjustment instruction for adjusting an element of the spam file determination policy or a threshold adjustment instruction; when the command is a component adjustment command, the components in the component set need to be updated, the updating of the components in the component set includes deleting or adding the components in the component set according to an updated component set updating strategy, the corresponding junk file judgment strategy is correspondingly deleted or added in the strategy, and when the current target attribute data of the storage object is acquired, the acquired target attribute data is correspondingly deleted or added along with the addition or deletion of the components. For example, when the element set deletes the size element of the storage area where the storage object is located, the determination policy for the junk file set according to the element in the determination policy is also deleted, and when the target attribute data of the storage object is obtained, the size data of the storage area where the storage object is located is not obtained.
The policy modification instruction may also be a threshold adjustment instruction for adjusting a threshold of an element of the spam file determination policy, the threshold of the corresponding element is updated according to the threshold adjustment instruction, and the policy is updated according to the updated threshold, for example, if the threshold adjustment instruction instructs to modify the threshold of the policy "the size of the file exceeds 1G" to 900M, the updated spam file determination policy "the size of the file exceeds 900M".
By adopting the junk file identification method of the embodiment, the original attribute data on the terminal is fully utilized, the element set comprising at least one element is set according to the attribute data, the junk file judgment strategy is set according to the elements, then the actual values of the elements are obtained on the basis of obtaining the current actual attribute data of the storage object, and whether the storage object is a junk file is judged according to the threshold matching condition of the corresponding element in the actual values and the junk file judgment strategy, so that the judgment method has good adaptability and higher judgment accuracy.
Example two:
the embodiment provides a garbage management method for managing identified garbage files, referring to fig. 2, including:
s201: identifying a junk file by the junk file identification method in the first embodiment;
s202: and managing the junk files.
After identifying the junk files, the junk files need to be processed, but there may be files in the junk files that are needed by the user, such as videos or photos that are not read for a long time, and although the junk files are determined, the files may actually need to be retained by the user, and if cleaned, user data may be lost. To avoid this, the present embodiment preferably provides the user with different ways of managing junk files for the user to choose:
firstly, directly deleting the junk files;
and secondly, displaying the junk files to a user for confirmation, managing the junk files according to a first confirmation instruction of the user, directly deleting the junk files if the first confirmation instruction is to delete the files, and judging the files to be non-junk files if the first confirmation instruction is not to delete the files.
And thirdly, presenting the junk files and the junk file judgment strategies corresponding to the junk files to a user for confirmation, managing the junk files according to a second confirmation instruction of the user, directly deleting the junk files if the second confirmation instruction is to delete the files, and judging the files to be non-junk files if the second confirmation instruction is not to delete the files.
If the user selects the method for managing junk files in the second or third aspect, after the junk file identification device, the junk files may be marked as files to be cleaned, and the identified junk files may be processed after a certain rule is satisfied.
The embodiment provides different management modes for the user to manage the identified junk files, can meet different requirements of the user, improves the use feeling of the user, and particularly presents judgment strategies for the junk files and the junk files for the user, so that the user can visually know the junk files and the judgment strategies for the junk files, and the user is helped to finally determine which files need to be deleted.
Example three:
the present embodiment provides a terminal 3, referring to fig. 3, including:
a junk file identification device 31, configured to identify a junk file in the terminal file system;
and a junk file management means 32 for managing the junk files recognized by the junk file recognition means.
The junk file identifying apparatus 31 and the junk file managing apparatus 32 will be described in detail below with reference to fig. 3.
The junk file identifying means 31, see fig. 3, comprises:
311: the policy setting module is used for acquiring an element set comprising at least one element and setting a junk file judgment policy according to a threshold value of the at least one element; the elements are set according to target attribute data of the storage object in the file system;
312: the analysis module is used for analyzing and obtaining the actual value of each element in the element set of the storage object according to the current actual target attribute data of the storage object in the file system;
313: and the judging module is used for judging whether the storage object is a junk file according to the actual value of each element in the storage object element set and the threshold matching condition of the corresponding element in the junk file judging strategy.
Preferably, the storage object in the present embodiment is a file or a folder.
The present embodiment uses data indexes of various aspects of a storage object in a file system, and these data may be recorded when the storage object is created, or may be related information recorded during the use process, and these information are very complicated.
Preferably, the target attribute data acquired by the policy setting module 311 of the present embodiment includes operation attribute data and/or size attribute data, and the element includes an operation attribute element set according to the operation attribute data and/or a size attribute element set according to the size attribute data.
Preferably, the target attribute data acquired by the policy setting module 311 in this embodiment further includes display state attribute data, and correspondingly, the element further includes a state display element set according to the display state attribute data.
The specific contents of the above elements and the method for setting the spam file judgment policy according to the elements are referred to in the first embodiment of the invention.
The attribute data of the storage objects on different terminals are different, so that different users may have different requirements on the junk file judgment policy. In order to meet the requirements of users and improve the adaptability of the present invention in different terminals, preferably, the policy setting module 311 of this implementation further includes a receiving module 3111 for receiving a policy modification instruction sent by a user, and a modification sub-module 3112: and the strategy modification module is used for modifying the junk file judgment strategy according to the strategy modification instruction.
Preferably, the policy modification instruction may be a factor adjustment instruction or a threshold adjustment instruction; the receiving module 3111 includes a first receiving submodule 31111 configured to receive a component adjustment instruction, which is a policy modification instruction for adjusting a component of the spam file determination policy. Accordingly, the modification sub-module 3112 includes a first modification sub-module 31121: the strategy updating module is used for updating the elements in the element set according to the element adjusting instruction and updating the strategy according to the updated element set; the first modification sub-module 31121 updates the elements in the element set by deleting or adding the elements in the element set, and accordingly deletes or adds the corresponding spam file determination policy in the policy, and accordingly, when the policy setting module 311 acquires the current target attribute data of the storage object, the acquired target attribute data is also deleted or added correspondingly with the addition or deletion of the elements. For example, when the element set deletes the size element of the storage area where the storage object is located, the determination policy for the junk file set according to the element in the determination policy is also deleted, and when the target attribute data of the storage object is obtained, the size data of the storage area where the storage object is located is not obtained.
Alternatively, the receiving module 3111 includes a second receiving sub-module 31112 configured to receive an element threshold value adjusting instruction, which is a policy modification instruction for adjusting a threshold value of an element of the spam file determination policy. Accordingly, the modification sub-module 3112 includes a second modification sub-module 31122: the strategy updating module is used for updating the elements in the element set according to the element adjusting instruction and updating the strategy according to the updated element set; for example, the second modification sub-module 31122 updates the original spam file determination policy to "the size of the file exceeds 900M" according to a threshold modification instruction for modifying the threshold of the policy "the size of the file exceeds 1G" to 900M.
The junk file identifying means 32, see fig. 3, comprises:
a garbage recognition device 31, configured to recognize garbage files in the terminal file system;
the management module 321 is configured to manage the garbage file.
Preferably, in order to provide users with different methods for managing junk files, the management module 321 of this embodiment further includes a management submodule 3211:
the method is used for directly deleting the junk files;
or the method is used for presenting the junk files to a user for confirmation, managing the junk files according to a first confirmation instruction of the user, directly deleting the junk files if the first confirmation instruction is to delete the files, and judging the files to be non-junk files if the first confirmation instruction is not to delete the files.
Or the junk file judgment policy is used for presenting the junk file and the junk file judgment policy corresponding to the junk file to a user for confirmation, managing the junk file according to a second confirmation instruction of the user, directly deleting the junk file if the second confirmation instruction is a deleted file, and judging the file as a non-junk file if the second confirmation instruction is a non-deleted file.
By adopting the terminal of the embodiment, the elements set according to the attribute data of the storage object can be obtained, the junk file judgment strategy is set according to the threshold values of the elements, the actual values of the elements corresponding to the storage object are obtained through analysis according to the obtained current attribute data of the storage object, whether the storage object is a junk file is judged according to the actual values and the threshold value matching condition of the corresponding elements in the junk file judgment strategy, and then the junk file is managed by selecting a management method.
Example four:
in this embodiment, a detailed description is made of a method for clearing a junk file by taking an example of determining whether a certain file is a junk file, in this embodiment, a junk file determination policy is preset on a terminal, but please refer to fig. 4, and a specific flow is as follows:
s401: when a certain file is accessed, recording related data of the file;
such data includes, but is not limited to, the read/write type of the file, the read/write time, the read/write size, the size change of the file after reading and writing, etc.
S402: acquiring an element set, wherein elements in the element set are set according to related data of a recorded file;
s403: acquiring a junk file judgment strategy;
s404: acquiring the current actual attribute data of the file;
s405: analyzing actual attribute data of the file to obtain actual values of the elements;
s406: judging whether the file is a junk file according to the junk file judgment strategy and the actual value of the element, if so, entering S307, and if not, returning to S401;
s407: presenting the junk files and the corresponding junk file judgment strategies to a user;
s408: receiving a user instruction, entering S409 if the user instruction is to delete the junk file, and entering S410 if the user instruction is not to delete the file;
s409: deleting the junk files selected by the user;
s410: and changing the junk file into a non-junk file.
It will be apparent to those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented in program code executable by a computing device, such that they may be stored on a storage medium (ROM/RAM, magnetic disk, optical disk) and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (19)

1. A junk file identification method is characterized by comprising the following steps:
acquiring an element set comprising at least two elements, and setting a junk file judgment strategy according to threshold values of the at least two elements; the element is set according to target attribute data of a storage object in a file system, the target attribute data comprises operation attribute data, and the element comprises an operation attribute element set according to the operation attribute data;
analyzing actual values of all elements in the element set of the storage object according to the current actual target attribute data of the storage object in the file system;
and judging whether the storage object is a junk file or not according to the actual value of each element in the storage object element set and the threshold matching condition of the corresponding element in the junk file judgment strategy.
2. The junk file identification method of claim 1 wherein the storage object comprises: files and/or folders.
3. A junk file identification method in accordance with claim 1 wherein the object attribute data further includes size attribute data and the element comprises a size attribute element arranged in accordance with the size attribute data.
4. A spam file identifying method according to claim 3, wherein when said set of storage object elements includes an operation attribute element, said matching condition includes: the operation attribute element is whether the actual value is matched with the threshold value of the operation attribute element;
when the storage object element set comprises a size attribute element, the matching condition comprises: the size attribute element is whether the actual value matches the threshold value of the size attribute element.
5. A spam file identifying method according to claim 3, wherein said object attribute data further includes display status attribute data, and said elements further include status display elements set according to said display status attribute data.
6. The junk file identification method of claim 5 wherein when the set of storage object elements includes a status display element, the matching comprises: whether the actual value of the display status element matches the threshold value of the display status element.
7. A spam file identifying method according to claim 3, wherein when said target attribute data includes operation attribute data, said operation attribute data includes at least one of an operation type, an operation time, and an operation time interval, and said operation attribute element includes at least one of an operation type element, an operation time element, and an operation time interval element;
when the target attribute data comprises size attribute data, the size attribute data comprises at least one of the current size of the storage object, the size variation of the storage object in a preset time period and the space size of the storage area where the storage object is located; the size attribute element comprises at least one of a current size element of the storage object, a size variation element of the storage object and a space size element of the storage area where the storage object is located.
8. A junk file identification method according to any one of claims 1 to 7 further comprising: and receiving a strategy modification instruction sent by a user, and modifying the junk file judgment strategy according to the strategy modification instruction.
9. The junk file identifying method according to claim 8, wherein the policy modification instruction is an element adjustment instruction for adjusting an element of the junk file determination policy; the modifying the junk file judgment policy comprises: updating the elements in the element set according to the element adjusting instruction, and updating a junk file judgment strategy according to the updated element set;
or, the policy modification instruction is an element threshold value adjustment instruction for adjusting the threshold value of the element of the junk file judgment policy; the modifying the junk file judgment policy comprises: and updating the threshold value of the corresponding element according to the element threshold value adjusting instruction, and updating the junk file judgment strategy according to the updated threshold value.
10. A junk file management method is characterized by comprising the following steps:
identifying junk files by the method of identifying junk files of any one of claims 1-9;
and managing the junk files.
11. The junk file management method of claim 10 wherein the managing of junk files comprises:
directly deleting the junk files;
or presenting the junk files to a user for confirmation, and managing the junk files according to a first confirmation instruction of the user;
or presenting the junk files and the junk file judgment strategy to a user for confirmation, and managing the junk files according to a second confirmation instruction of the user.
12. A junk file identifying apparatus, comprising:
the policy setting module is used for acquiring an element set comprising at least two elements and setting a junk file judgment policy according to the threshold values of the at least two elements; the element is set according to target attribute data of a storage object in a file system, the target attribute data comprises operation attribute data, and the element comprises an operation attribute element set according to the operation attribute data;
the analysis module is used for analyzing and obtaining the actual value of each element in the element set of the storage object according to the current actual target attribute data of the storage object in the file system;
and the judging module is used for judging whether the storage object is a junk file according to the actual value of each element in the storage object element set and the threshold matching condition of the corresponding element in the junk file judging strategy.
13. A junk file identification apparatus as claimed in claim 12 wherein the target attribute data further comprises size attribute data and the element comprises a size attribute element arranged in accordance with the size attribute data.
14. The junk file identification apparatus of claim 13 wherein the object attribute data further comprises display state attribute data and the element further comprises a state display element arranged in accordance with the display state attribute data.
15. A junk file identification apparatus as claimed in any one of claims 12 to 14 wherein the policy setting module further comprises:
a receiving module: the system comprises a policy modification instruction used for receiving a policy modification instruction sent by a user;
modifying the sub-modules: and the strategy modification instruction is used for modifying the junk file judgment strategy according to the strategy modification instruction.
16. The junk file identification apparatus of claim 15 wherein the receiving module comprises a first receiving submodule configured to receive a factor adjustment instruction, the factor adjustment instruction being a policy modification instruction configured to adjust a factor of the junk file determination policy; the modification sub-module includes a first modification sub-module: the garbage file judgment strategy is used for updating the elements in the element set according to the element adjustment instruction and updating the garbage file judgment strategy according to the updated element set;
or, the receiving module includes a second receiving submodule, configured to receive an element threshold adjustment instruction, where the element threshold adjustment instruction is a policy modification instruction for adjusting a threshold of an element of the spam file determination policy; the modification submodule includes a second modification submodule: and the threshold adjusting instruction is used for updating the threshold of the corresponding element according to the element adjusting threshold, and updating the junk file judgment strategy according to the updated threshold.
17. A junk file management apparatus, comprising:
the junk file identifying apparatus according to any one of claims 12 to 16, being configured to identify a junk file in a file system of a terminal;
and the management module is used for managing the junk files.
18. The junk file management apparatus of claim 17 wherein the management module comprises a management submodule to:
the garbage file deleting device is used for directly deleting the garbage file;
or the junk file is presented to a user for confirmation, and the junk file is managed according to a first confirmation instruction of the user;
or the junk file management module is used for presenting the junk file and the junk file judgment strategy to a user for confirmation, and managing the junk file according to a second confirmation instruction of the user.
19. A terminal, characterized by comprising junk file identifying means according to any one of claims 12 to 16 and junk file managing means according to claim 17 or 18; the junk file identification device is used for identifying junk files in a terminal file system; the junk file management device is used for managing the junk files identified by the junk file identification device.
CN201510807437.0A 2015-11-18 2015-11-18 Junk file identification and management method, identification device, management device and terminal Active CN106708912B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510807437.0A CN106708912B (en) 2015-11-18 2015-11-18 Junk file identification and management method, identification device, management device and terminal
PCT/CN2016/083174 WO2016197814A1 (en) 2015-11-18 2016-05-24 Junk file identification and management method, identification device, management device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510807437.0A CN106708912B (en) 2015-11-18 2015-11-18 Junk file identification and management method, identification device, management device and terminal

Publications (2)

Publication Number Publication Date
CN106708912A CN106708912A (en) 2017-05-24
CN106708912B true CN106708912B (en) 2021-06-25

Family

ID=57502878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510807437.0A Active CN106708912B (en) 2015-11-18 2015-11-18 Junk file identification and management method, identification device, management device and terminal

Country Status (2)

Country Link
CN (1) CN106708912B (en)
WO (1) WO2016197814A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019036912A1 (en) * 2017-08-22 2019-02-28 深圳传音通讯有限公司 Junk file processing method for electronic terminal, and electronic terminal
CN108021630B (en) * 2017-11-21 2021-03-30 深圳市雷鸟网络传媒有限公司 Junk file cleaning method, intelligent terminal and computer readable storage medium
CN108255930B (en) * 2017-11-30 2020-06-05 维沃移动通信有限公司 Data cleaning method of mobile terminal and mobile terminal
CN109656875B (en) * 2018-12-05 2023-05-16 广东小天才科技有限公司 Classification management method and device for storage space, terminal and storage medium
CN111177075B (en) 2019-12-26 2022-04-22 浪潮电子信息产业股份有限公司 Junk data identification method and system, electronic equipment and storage medium
CN112131189A (en) * 2020-09-29 2020-12-25 珠海海鸟科技有限公司 Method and device for cleaning junk files and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012167392A3 (en) * 2011-06-06 2013-02-28 ETH Zürich Method and devices for secure deletion of data in a log structured file system
CN103530424A (en) * 2013-10-31 2014-01-22 北京奇虎科技有限公司 Useless file detection method and device
CN103631934A (en) * 2013-12-06 2014-03-12 贝壳网际(北京)安全技术有限公司 Garbage-file detecting method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464904A (en) * 2009-01-09 2009-06-24 华为技术有限公司 File identification method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012167392A3 (en) * 2011-06-06 2013-02-28 ETH Zürich Method and devices for secure deletion of data in a log structured file system
CN103530424A (en) * 2013-10-31 2014-01-22 北京奇虎科技有限公司 Useless file detection method and device
CN103631934A (en) * 2013-12-06 2014-03-12 贝壳网际(北京)安全技术有限公司 Garbage-file detecting method and device

Also Published As

Publication number Publication date
WO2016197814A1 (en) 2016-12-15
CN106708912A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106708912B (en) Junk file identification and management method, identification device, management device and terminal
US9582199B2 (en) Method and an apparatus for analyzing data to facilitate data allocation in a storage device
CN106031127B (en) Method and apparatus for management of applications
US20130006996A1 (en) Clustering E-Mails Using Collaborative Information
CN103150079A (en) Application icon management method and device based on Firefox OS (Operation System) platform
CN104238897A (en) Menu item displaying method and device
CN109240607B (en) File reading method and device
CN103347009A (en) Method and device filtering information
CN108255989B (en) Picture storage method and device, terminal equipment and computer storage medium
CN107835986B (en) Data operation method of electronic equipment and electronic equipment
CN110795400B (en) File management method, device, equipment and medium
CN104601683A (en) File download management method, mobile terminal and communication system
CN105893471B (en) Data processing method and electronic equipment
CN106156038B (en) Date storage method and device
CN104065617B (en) A kind of harassing and wrecking email processing method, device and system
US9549044B1 (en) Data processing
CN110780820A (en) Method and device for determining continuous storage space, electronic equipment and storage medium
CN106250992A (en) Task processing method in a kind of mobile electronic device and device
CN114896298A (en) Same type label data prediction method, terminal device and storage medium
CN103870603A (en) Directory management method and electronic device
CN111104777A (en) Document editing method and device, computer storage medium and terminal
US20140188846A1 (en) Data list customization based on social relationship
CN112883316A (en) Data processing method and device, electronic equipment and storage medium
CN114519153A (en) Webpage history record display method, device, equipment and storage medium
CN106980685A (en) Data processing method and data processing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant