CN106528577B - Method and device for setting file to be cleaned - Google Patents

Method and device for setting file to be cleaned Download PDF

Info

Publication number
CN106528577B
CN106528577B CN201510586538.XA CN201510586538A CN106528577B CN 106528577 B CN106528577 B CN 106528577B CN 201510586538 A CN201510586538 A CN 201510586538A CN 106528577 B CN106528577 B CN 106528577B
Authority
CN
China
Prior art keywords
file
names
files
directory
category
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
CN201510586538.XA
Other languages
Chinese (zh)
Other versions
CN106528577A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510586538.XA priority Critical patent/CN106528577B/en
Priority to PCT/CN2016/094191 priority patent/WO2017045493A1/en
Publication of CN106528577A publication Critical patent/CN106528577A/en
Application granted granted Critical
Publication of CN106528577B publication Critical patent/CN106528577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

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)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for setting files to be cleaned, and belongs to the technical field of computers. The method comprises the following steps: acquiring file directories and file names of a plurality of target files; dividing the target files meeting the preset matching conditions of the directory names and the file names into the same category according to the file name of each target file and the directory names of all levels of the file directory; and for each divided category, if the category comprises the target files meeting the cleaning condition, setting all the target files contained in the category as the files to be cleaned. By adopting the method and the device, the efficiency of setting the files to be cleaned can be improved.

Description

Method and device for setting file to be cleaned
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for setting files to be cleaned.
Background
With the rapid development of computer technology, various types of application programs are widely developed and used, and accordingly, the types and the number of files in the terminal are more and more extensive. A common function of the system management application is to clean up useless files in the terminal and release the storage space of the terminal.
The background server of the system management application program generally sets files to be cleaned, checks each file possibly stored in the terminal one by one, and judges whether the file needs to be cleaned according to a preset cleaning condition (for example, the application program can run normally after the file is deleted or the file name of the file is a specified file name). And then setting the file to be cleaned as the file to be cleaned. And further, the related information of the file to be cleaned can be notified to a system management application program on the terminal side so as to perform corresponding cleaning.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
in the process of setting the files to be cleaned, a large amount of time is spent on examining and verifying all the files one by one, so that the efficiency of setting the files to be cleaned is greatly reduced.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for setting a file to be cleaned. The technical scheme is as follows:
in a first aspect, a method for setting a file to be cleaned is provided, the method comprising:
acquiring file directories and file names of a plurality of target files;
dividing the target files meeting the preset matching conditions of the directory names and the file names into the same category according to the file name of each target file and the directory names of all levels of the file directory;
and for each divided category, if the category comprises the target files meeting the cleaning condition, setting all the target files contained in the category as the files to be cleaned.
In a second aspect, there is provided an apparatus for setting a document to be cleaned, the apparatus comprising:
the acquisition module is used for acquiring file directories and file names of a plurality of target files;
the classification module is used for classifying the target files meeting the preset matching conditions of the directory names and the file names into the same category according to the file names of the target files and the directory names of all levels of the file directories;
and the setting module is used for setting all the target files contained in the category as files to be cleaned if the divided categories contain the target files meeting the cleaning conditions.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, file directories and file names of a plurality of target files are obtained; and for each divided category, if the category comprises the target files meeting the cleaning condition, all the target files contained in the category are set as files to be cleaned. Therefore, in the process of setting the files to be cleaned, the files are classified according to the directory names and the file names, and then whether all the files in the category are the files to be cleaned can be determined only by checking part of the files in each category, so that the efficiency of setting the files to be cleaned can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart of a method for setting a file to be cleaned according to an embodiment of the present invention;
FIG. 2 is a block diagram of a process for setting a document to be cleaned according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for setting a file to be cleaned according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for setting a file to be cleaned according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
The embodiment of the invention provides a method for setting a file to be cleaned, which can be realized by a server. The server may be a backend server of the system management application described above. The server may include a processor that may be configured to perform the process of setting a file to be cleaned in the following procedure, and a memory that may be configured to store data required and data generated in the following process. The server may further include a transmission component and an input/output unit, the transmission component may be configured to receive and transmit data in the process of setting a file to be cleaned, and the input/output unit may be configured to input a user instruction and display the data, as shown in fig. 1, a processing flow of the method may include the following steps:
step 101, obtaining file directories and file names of a plurality of target files.
And 102, dividing the target files meeting the preset matching conditions of the directory names and the file names into the same category according to the file name of each target file and the directory names of all levels of the file directory.
And 103, for each divided category, if the category comprises the target files meeting the cleaning condition, setting all the target files contained in the category as the files to be cleaned.
The specific processing procedure can be seen in the detailed description in the following examples.
In the embodiment of the invention, file directories and file names of a plurality of target files are obtained; and for each divided category, if the category comprises the target files meeting the cleaning condition, all the target files contained in the category are set as files to be cleaned. Therefore, in the process of setting the files to be cleaned, the files are classified according to the directory names and the file names, and then whether all the files in the category are the files to be cleaned can be determined only by checking part of the files in each category, so that the efficiency of setting the files to be cleaned can be improved.
Example two
The embodiment of the invention provides a method for setting a file to be cleaned, which can be realized by a server. The server may be a backend server of the system management application described above. The server may include a processor that may be configured to perform the process of setting a file to be cleaned in the following procedure, and a memory that may be configured to store data required and data generated in the following process. The server can further comprise a transmission component and an input and output unit, the transmission component can be used for setting the receiving and sending of data in the process of the file to be cleaned, and the input and output unit can be used for inputting user instructions and displaying the data.
The process flow shown in fig. 1 will be described in detail below with reference to specific embodiments, and the contents may be as follows:
step 101, obtaining file directories and file names of a plurality of target files.
In implementation, before determining the file to be cleaned, the server corresponding to the system management application may obtain and record a file directory and a file name of a large number of files (i.e., target files) that may be stored on the terminal.
Optionally, a technician may simulate a user to use through a certain terminal, and then notify a server of a file stored after the terminal is used, and corresponding processing may be as follows: and receiving the file directories and file names of all files stored by the terminal and transmitted by the terminal as the file directories and file names of the plurality of target files.
In an implementation, the server may include a test terminal for simulating all user terminals, and a technician may install all applications that the user may install on the test terminal, so that a large number of files that may exist on the user terminal may be stored on the test terminal. Furthermore, the test terminal may transmit the file directories and file names of all files stored locally to the server, and the server may use the file directories and file names as the file directories and file names of the plurality of target files.
And 102, dividing the target files meeting the preset matching conditions of the directory names and the file names into the same category according to the file name of each target file and the directory names of all levels of the file directory.
In an implementation, the server may preset a plurality of matching conditions for the directory names and the file names, and if the file name of a certain target file and each level of directory names of the file directories satisfy the one or more matching conditions, the target file may be classified into a corresponding category, and the file names of all target files and each level of directory names of the file directories included in the category all satisfy the same matching conditions. If the matching conditions are 1, 2, 3, and 4, respectively, and the file name of a certain target file and the directory names of the file directories at each level satisfy 1 and 3, the target file may be classified into a category satisfying the matching conditions 1 and 3.
Optionally, the preset matching conditions of the directory name and the file name may be as follows: the first-level directory names are the same, only one different name is selected from the other directory names and file names except the first-level directory name, and the different names meet the same preset naming standard.
In implementation, if the first-level directory names of the target files are the same, the directory names of other levels except the first-level directory name are different from the file names of the target files, and the different names all satisfy the same preset naming standard, the target files can be considered to satisfy the preset matching conditions of the directory names and the file names, and can be divided into the same categories. For example, if there are three target files whose file names and directory names at different levels of the file directory are "a/b/c/1", "a/b/c/2" and "a/b/c/3", respectively, they can be divided into the same category "a/b/c/" and the file name of the fourth target file and directory name at different levels of the file directory are "a/b/d/1", then the fourth target file does not belong to the same category as the above three target files, but belongs to the category "a/b/1" as the first target file, and the file name of the fifth target file and directory name at different levels of the file directory are "a/b/c/first", since "first" and "1" do not satisfy the same preset naming standards, the fifth target file does not belong to the category "a/b/c/, whereas the file name of the sixth target file and the respective level of the file directory are" b/b/c/1 ", nor belong to the category" a/b/c/, since the first level of the file name is not identical to the three target files mentioned above. It is worth mentioning that there is no category ". x/b/c/d" in this scheme, so if the first-level directory names of two target files are different, the two target files may not belong to the same category.
Optionally, the matching conditions may further define common conditions that different names need to satisfy, and the matching conditions of the corresponding directory name and file name may be as follows: the first-level directory names are the same, only one different name is selected from the other-level directory names and the file names, and the different names meet the same preset naming standard and have the same number of characters.
In practice, if the file name of the first target file and the directory name of each level of the file directory are "a/b/c/1", the file name of the second target file and the directory name of each level of the file directory are "a/b/c/2", the file name of the third target file and the directory name of each level of the file directory are "a/b/c/11", and the file name of the fourth target file and the directory name of each level of the file directory are "a/b/c/12", the first target file and the second target file belong to the category: "a/b/c/, number of characters 1", the third target file and the fourth target file belong to the category: "a/b/c/, number of characters 2".
Optionally, the preset naming standard may be: consists of a pure number, consists of a word, contains a date, and consists of a package name.
In implementation, the server may preset a classification standard for the different names according to a naming mode, that is, the preset naming standard may be: 1. the name of the characters such as 32415, 981141, etc. which are all numbers, meets the preset naming standard; 2. the server divides the different names into words, wherein each word is an existing word in a server word bank, and the different names are considered to accord with the preset naming standard, for example, a 'happy new year' word is divided into two words, namely a 'happy' word and a 'new year', and the two words are the existing words in the server word bank, so that the two words accord with the preset naming standard; 3. including dates, which may be considered to meet the preset naming standards if the different names contain portions in a format that meets the date format, such as "2001.02.12", "2015-11-30", etc.; 4. consists of a package name that can be considered to conform to the preset naming convention if the different name contains a portion of a format that conforms to the package name format, such as "com.
And 103, for each divided category, if the category comprises the target files meeting the cleaning condition, setting all the target files contained in the category as the files to be cleaned.
In implementation, after classifying all target files according to file directories and file names of the target files, the server can randomly select one target file in each class, then judge whether the file directories and the file names of the target files meet the cleaning condition, and if the file directories and the file names of the target files meet the cleaning condition, set all the target files belonging to the same class as the target files as files to be cleaned.
After the server selects one target file, the target file can be deleted in the test terminal, and if the application program to which the target file belongs can normally run after deletion, the target file can be judged to accord with the cleaning condition. Or after the server selects a target file, whether the file name of the target file and the directory names of all levels of the file directory belong to the file name of the historical file to be cleaned and the directory names of all levels of the file directory can be judged, and if the file names of all levels of the file directory belong to the file name of the historical file to be cleaned, the target file can be judged to accord with the cleaning condition.
Optionally, whether all the target files in a category are to-be-cleaned files may be determined according to whether all the target files in the category meet the cleaning condition, and correspondingly, the processing in step 103 may be as follows: and selecting a preset number of target files in the category, and setting all the target files contained in the category as files to be cleaned if all the preset number of target files meet cleaning conditions.
In implementation, after classifying all target files according to file directories and file names of the target files, the server may select a category, and arbitrarily select one target file from all the target files in the category, if the file directories and the file names of the target files meet the cleaning condition, arbitrarily select a next target file from the category until a preset number of target files are selected, and if the file directories and the file names of the target files meet the cleaning condition, all the target files belonging to the same category as the target files may be set as files to be cleaned. Wherein, the preset number may be 1. And if the file directory and the file name of one target file do not accord with the cleaning condition, setting all the target files contained in the category as the files not to be cleaned.
Alternatively, some directories or files that cannot be cleaned may be specified in advance, and accordingly, the processing of step 103 may be as follows: and if the category comprises the target file meeting the cleaning condition and the file name of the target file contained in the category and the directory names of all levels of the file directory do not comprise preset directory names and file names, setting all the target files contained in the category as files to be cleaned.
In implementation, after classifying all target files according to file directories and file names of the target files, the server can randomly select one target file in each class, then judge whether the file directories and the file names of the target files meet the cleaning condition, if the file directories and the file names of the target files meet the cleaning condition, preset directory names and file names can be searched in the file directories and the file names of all the target files in the class, and if the searching result is empty, all the target files in the class can be set as files to be cleaned; if the search result is not null, that is, the file name of the target file and the directory names of the file directories in each level include preset directory names and file names, all the target files included in the category can be set as files not to be cleaned. For example, for some archived files, the normal operation of the application program is not affected after the archived files are deleted, but the archived files obviously should not be cleaned, the preset directory name and file name may be set as "save", "user data", and the like.
Optionally, the terminal may perform file cleaning according to a file to be cleaned set by the server, and the corresponding processing may be as follows: and sending the file name of the file to be cleaned and the directory names of all levels of the file directory to the terminal so that the terminal can clean the file according to the file name of the file to be cleaned and the directory names of all levels of the file directory.
In implementation, after the server sets the file to be cleaned, the server may send the file name of the file to be cleaned and the directory names of the file directories at different levels to the terminal. The user can install the system management application program on the terminal, when the user needs to clean useless files in the terminal, the user can click to open the system management application program and select a file cleaning function, and at the moment, the system management application program can clean the files on the terminal according to the file names of the files to be cleaned and the directory names of all levels of the file directories sent by the server.
FIG. 2 provides a processing framework diagram of an embodiment of the present invention.
In the embodiment of the invention, file directories and file names of a plurality of target files are obtained; and for each divided category, if the category comprises the target files meeting the cleaning condition, all the target files contained in the category are set as files to be cleaned. Therefore, in the process of setting the files to be cleaned, the files are classified according to the directory names and the file names, and then whether all the files in the category are the files to be cleaned can be determined only by checking part of the files in each category, so that the efficiency of setting the files to be cleaned can be improved.
EXAMPLE III
Based on the same technical concept, an embodiment of the present invention further provides a device for setting a file to be cleaned, as shown in fig. 3, the device includes:
an obtaining module 301, configured to obtain file directories and file names of multiple target files;
the classification module 302 is configured to classify target files that meet preset matching conditions of directory names and file names into the same category according to the file name of each target file and the directory names of the file directories at different levels;
a setting module 303, configured to, for each of the divided categories, set all the target files included in the category as files to be cleaned if the category includes target files that meet cleaning conditions.
Optionally, the obtaining module 301 is configured to:
and receiving the file directories and the file names of all files stored by the terminal and sent by the terminal as the file directories and the file names of a plurality of target files.
Optionally, the preset matching condition of the directory name and the file name includes:
the first-level directory names are the same, only one different name is selected from the other directory names and the file names except the first-level directory names, and the different names meet the same preset naming standard.
Optionally, the preset matching condition of the directory name and the file name includes:
the directory names of the first level are the same, only one different name is selected from the directory names and the file names of other levels, and the different names meet the same preset naming standard and have the same number of characters.
Optionally, the preset naming standard includes:
consists of a pure number, consists of a word, contains a date, and consists of a package name.
Optionally, the setting module 303 is configured to:
and selecting a preset number of target files in the category, and setting all the target files contained in the category as files to be cleaned if all the preset number of target files meet cleaning conditions.
Optionally, the setting module 303 is configured to:
and if the category comprises the target files meeting the cleaning condition and the file names of the target files and the directory names of all levels of the file directories contained in the category do not comprise preset directory names and file names, setting all the target files contained in the category as files to be cleaned.
Optionally, as shown in fig. 4, the apparatus further includes:
the sending module 304 is configured to send the file name of the file to be cleaned and the directory names of the file directories at different levels to a terminal, so that the terminal performs file cleaning according to the file name of the file to be cleaned and the directory names of the file directories at different levels.
In the embodiment of the invention, file directories and file names of a plurality of target files are obtained; and for each divided category, if the category comprises the target files meeting the cleaning condition, all the target files contained in the category are set as files to be cleaned. Therefore, in the process of setting the files to be cleaned, the files are classified according to the directory names and the file names, and then whether all the files in the category are the files to be cleaned can be determined only by checking part of the files in each category, so that the efficiency of setting the files to be cleaned can be improved.
It should be noted that: in the device for setting a file to be cleaned provided in the above embodiment, when the file to be cleaned is set, only the division of the above functional modules is used for illustration, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the server is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the device for setting the file to be cleaned and the method for setting the file to be cleaned provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Example four
Fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention. The server 1900, which may vary widely in configuration or performance, may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
Server 1900 may include memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors include instructions for:
acquiring file directories and file names of a plurality of target files;
dividing the target files meeting the preset matching conditions of the directory names and the file names into the same category according to the file name of each target file and the directory names of all levels of the file directory;
and for each divided category, if the category comprises the target files meeting the cleaning condition, setting all the target files contained in the category as the files to be cleaned.
Optionally, the obtaining file directories and file names of a plurality of target files includes:
and receiving the file directories and the file names of all files stored by the terminal and sent by the terminal as the file directories and the file names of a plurality of target files.
Optionally, the preset matching condition of the directory name and the file name includes:
the first-level directory names are the same, only one different name is selected from the other directory names and the file names except the first-level directory names, and the different names meet the same preset naming standard.
Optionally, the preset matching condition of the directory name and the file name includes:
the directory names of the first level are the same, only one different name is selected from the directory names and the file names of other levels, and the different names meet the same preset naming standard and have the same number of characters.
Optionally, the preset naming standard includes:
consists of a pure number, consists of a word, contains a date, and consists of a package name.
Optionally, if the class includes a target file meeting the cleaning condition, setting all target files included in the class as files to be cleaned, including:
and selecting a preset number of target files in the category, and setting all the target files contained in the category as files to be cleaned if all the preset number of target files meet cleaning conditions.
Optionally, if the class includes a target file meeting the cleaning condition, setting all target files included in the class as files to be cleaned, including:
and if the category comprises the target files meeting the cleaning condition and the file names of the target files and the directory names of all levels of the file directories contained in the category do not comprise preset directory names and file names, setting all the target files contained in the category as files to be cleaned.
Optionally, after all the target files included in the category are set as files to be cleaned, the method further includes:
and sending the file name of the file to be cleaned and all levels of directory names of the file directory to a terminal so that the terminal can clean the file according to the file name of the file to be cleaned and all levels of directory names of the file directory.
In the embodiment of the invention, file directories and file names of a plurality of target files are obtained; and for each divided category, if the category comprises the target files meeting the cleaning condition, all the target files contained in the category are set as files to be cleaned. Therefore, in the process of setting the files to be cleaned, the files are classified according to the directory names and the file names, and then whether all the files in the category are the files to be cleaned can be determined only by checking part of the files in each category, so that the efficiency of setting the files to be cleaned can be improved.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (13)

1. A method of setting a document to be cleaned, the method comprising:
receiving file directories and file names of all files stored by a terminal and sent by the terminal as the file directories and the file names of a plurality of target files;
dividing the target files meeting the preset matching conditions of the directory names and the file names into the same category according to the file name of each target file and the directory names of all levels of the file directory;
for each divided category, judging whether one or more target files in the category meet the cleaning condition, and if the category contains the target files meeting the cleaning condition, setting all the target files contained in the category as files to be cleaned;
and sending the file name of the file to be cleaned and all levels of directory names of the file directory to a terminal so that the terminal can clean the file according to the file name of the file to be cleaned and all levels of directory names of the file directory.
2. The method according to claim 1, wherein the preset matching condition of directory name and file name comprises:
the first-level directory names are the same, only one different name is selected from the other directory names and the file names except the first-level directory names, and the different names meet the same preset naming standard.
3. The method according to claim 2, wherein the preset matching condition of directory name and file name comprises:
the directory names of the first level are the same, only one different name is selected from the directory names and the file names of other levels, and the different names meet the same preset naming standard and have the same number of characters.
4. The method according to claim 2 or 3, wherein the preset naming standard comprises:
consists of a pure number, consists of a word, contains a date, and consists of a package name.
5. The method according to claim 1, wherein if the class includes the object files meeting the cleaning condition, setting all the object files included in the class as the files to be cleaned comprises:
and selecting a preset number of target files in the category, and setting all the target files contained in the category as files to be cleaned if all the preset number of target files meet cleaning conditions.
6. The method according to claim 1, wherein if the class includes the object files meeting the cleaning condition, setting all the object files included in the class as the files to be cleaned comprises:
and if the category comprises the target files meeting the cleaning condition and the file names of the target files and the directory names of all levels of the file directories contained in the category do not comprise preset directory names and file names, setting all the target files contained in the category as files to be cleaned.
7. An apparatus for setting a document to be cleaned, the apparatus comprising:
the acquisition module is used for receiving file directories and file names of all files stored by the terminal and sent by the terminal as the file directories and the file names of a plurality of target files;
the classification module is used for classifying the target files meeting the preset matching conditions of the directory names and the file names into the same category according to the file names of the target files and the directory names of all levels of the file directories;
the setting module is used for judging whether one or more target files in the category meet the cleaning condition or not for each divided category, and if the category contains the target files meeting the cleaning condition, all the target files contained in the category are set as files to be cleaned;
and the sending module is used for sending the file name of the file to be cleaned and all levels of directory names of the file directory to a terminal so that the terminal can clean the file according to the file name of the file to be cleaned and all levels of directory names of the file directory.
8. The apparatus of claim 7, wherein the preset matching condition of directory name and file name comprises:
the first-level directory names are the same, only one different name is selected from the other directory names and the file names except the first-level directory names, and the different names meet the same preset naming standard.
9. The apparatus of claim 8, wherein the preset matching condition of directory name and file name comprises:
the directory names of the first level are the same, only one different name is selected from the directory names and the file names of other levels, and the different names meet the same preset naming standard and have the same number of characters.
10. The apparatus according to claim 8 or 9, wherein the preset naming standard comprises:
consists of a pure number, consists of a word, contains a date, and consists of a package name.
11. The apparatus of claim 7, wherein the setup module is configured to:
and selecting a preset number of target files in the category, and setting all the target files contained in the category as files to be cleaned if all the preset number of target files meet cleaning conditions.
12. The apparatus of claim 7, wherein the setup module is configured to:
and if the category comprises the target files meeting the cleaning condition and the file names of the target files and the directory names of all levels of the file directories contained in the category do not comprise preset directory names and file names, setting all the target files contained in the category as files to be cleaned.
13. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor, to implement the method of setting a file to be cleaned according to any one of claims 1 to 6.
CN201510586538.XA 2015-09-15 2015-09-15 Method and device for setting file to be cleaned Active CN106528577B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510586538.XA CN106528577B (en) 2015-09-15 2015-09-15 Method and device for setting file to be cleaned
PCT/CN2016/094191 WO2017045493A1 (en) 2015-09-15 2016-08-09 Method and device for setting files to be removed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510586538.XA CN106528577B (en) 2015-09-15 2015-09-15 Method and device for setting file to be cleaned

Publications (2)

Publication Number Publication Date
CN106528577A CN106528577A (en) 2017-03-22
CN106528577B true CN106528577B (en) 2019-12-24

Family

ID=58288441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510586538.XA Active CN106528577B (en) 2015-09-15 2015-09-15 Method and device for setting file to be cleaned

Country Status (2)

Country Link
CN (1) CN106528577B (en)
WO (1) WO2017045493A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934692A (en) * 2020-07-14 2022-01-14 北京字节跳动网络技术有限公司 File cleaning method and device, storage medium and equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7028019B2 (en) * 1998-11-11 2006-04-11 Wise Solutions, Inc. Method and system of managing software conflicts in computer system that receive, processing change information to determine which files and shared resources conflict with one another
KR20090131220A (en) * 2008-06-17 2009-12-28 삼성전자주식회사 Imaging apparatus and method of controlling the same
CN102654872A (en) * 2011-03-03 2012-09-05 腾讯科技(深圳)有限公司 Method and device for cleaning junk files generated by application programs
CN102880714B (en) * 2012-09-29 2016-08-24 北京奇虎科技有限公司 File clean-up method and device
CN103559299B (en) * 2013-11-14 2017-02-15 贝壳网际(北京)安全技术有限公司 Method, device and mobile terminal for cleaning up files
CN104239574B (en) * 2014-09-30 2019-03-26 珠海市君天电子科技有限公司 Garbage files lookup method and system
CN104572943B (en) * 2014-12-30 2018-05-08 北京奇虎科技有限公司 Exempt from installation procedure method for cleaning and device
CN104679851B (en) * 2015-02-12 2019-02-05 Oppo广东移动通信有限公司 A kind of data-erasure method and terminal
CN104881493B (en) * 2015-06-12 2018-09-11 北京金山安全软件有限公司 file cleaning method and device

Also Published As

Publication number Publication date
CN106528577A (en) 2017-03-22
WO2017045493A1 (en) 2017-03-23

Similar Documents

Publication Publication Date Title
EP3447642B1 (en) System and method for predicting application performance for large data size on big data cluster
CN107273280B (en) Log processing method and device, electronic equipment and storage medium
US20150199433A1 (en) Method and system for search engine indexing and searching using the index
CN110134738B (en) Distributed storage system resource estimation method and device
CN110825694A (en) Data processing method, device, equipment and storage medium
CN110737689A (en) Data standard conformance detection method, device, system and storage medium
CN110851474A (en) Data query method, database middleware, data query device and storage medium
CN113485999A (en) Data cleaning method and device and server
US9213759B2 (en) System, apparatus, and method for executing a query including boolean and conditional expressions
CN112860412B (en) Service data processing method and device, electronic equipment and storage medium
CN106528577B (en) Method and device for setting file to be cleaned
CN111428117B (en) Application program data acquisition method and device
CN109101595B (en) Information query method, device, equipment and computer readable storage medium
JP2004326480A (en) Distributed parallel analysis method of mass data
CN116662302A (en) Data processing method, device, electronic equipment and storage medium
CN116628042A (en) Data processing method, device, equipment and medium
CN111143177B (en) Method, system, device and storage medium for collecting RMF III data of IBM host
CN112308074A (en) Method and device for generating thumbnail
CN113220573B (en) Test method and device for micro-service architecture and electronic equipment
CN111459411B (en) Data migration method, device, equipment and storage medium
CN116860183B (en) Data storage method, electronic equipment and storage medium
CN112988528B (en) Log processing method, device and container group
CN113656443B (en) Data disassembling method and device, electronic equipment and storage medium
CN114997917A (en) Mobile banking information pushing method and device
CN117271445A (en) Log data processing method, device, server, storage medium and program product

Legal Events

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