Disclosure of Invention
In order to overcome the above technical problems or at least partially solve the above technical problems, the following technical solutions are proposed:
the embodiment of the invention provides a file cleaning method, which comprises the following steps:
receiving characteristic data of a file to be cleaned, which is sent by a client;
inputting the characteristic data of the file to be cleaned into a pre-stored judgment model to obtain an output result;
determining a file cleaning directory of the file to be cleaned based on the output result;
and issuing the file cleaning catalog of the file to be cleaned to the corresponding client.
Optionally, the method further comprises:
acquiring related information of a plurality of files and corresponding cleaning modes as original sample data;
constructing training characteristics based on original sample data;
training the training features through a predetermined algorithm to determine a judgment model;
wherein the predetermined algorithm comprises a GBDT classification algorithm.
Preferably, inputting the feature data of the file to be cleaned into a pre-stored judgment model to obtain an output result, including:
inputting the characteristic data of the file to be cleaned into a pre-stored judgment model, determining whether the file in the file to be cleaned needs to be cleaned or not according to a judgment rule in the judgment model, and taking the file as an output result;
wherein the judgment rule comprises at least one of the following items:
clearing a file containing a suffix with a preset name;
cleaning a log file of a system;
cleaning a residual file after the application program is unloaded;
files with the same suffix name and the number of files with the size exceeding a preset threshold value are cleaned.
Preferably, the characteristic data of the file to be cleaned comprises at least one of:
the name of the application program, the package name of the application program, the root path of the application program in the client, the sub path, the label information of the package name of the application program, the classification information of the package name of the application program, the suffix information of the file, the size of the file of the application program and the number of the files of the application program.
Preferably, the file cleaning directory includes at least one of description information of the file, a file type, a cleaning suggestion and an unloading residual.
Another embodiment of the present invention provides a method for cleaning a client file, including:
extracting characteristic data of a file to be cleaned based on the triggering operation of file cleaning;
sending the characteristic data of the file to be cleaned to a server for training;
receiving a file cleaning directory of a file to be cleaned returned by a server;
and executing corresponding operation on the file to be cleaned according to the file cleaning directory of the file to be cleaned.
Preferably, the corresponding operation executed on the file to be cleaned comprises at least one of one-key cleaning, manual cleaning and reservation suggestion.
Preferably, according to the cleaning directory of the file to be cleaned, executing a corresponding one-key cleaning operation on the file, including:
acquiring the file name of a cleaning file in a cleaning directory of a file to be cleaned;
and executing one-key cleaning operation on the file corresponding to the file name in the client according to the file name of the cleaning file.
Preferably, the characteristic data of the file to be cleaned comprises at least one of:
the name of the application program, the package name of the application program, the root path of the application program in the client, the sub path, the label information of the package name of the application program, the classification information of the package name of the application program, the suffix information of the file, the size of the file of the application program and the number of the files of the application program.
Preferably, the file cleaning directory includes at least one of description information of the file, a file type, a cleaning suggestion and an unloading residual.
Yet another embodiment of the present invention provides a file cleaning apparatus, including:
the first receiving module is used for receiving the characteristic data of the file to be cleaned, which is sent by the client;
the input module is used for inputting the characteristic data of the file to be cleaned into a prestored judging model so as to obtain an output result;
the determining module is used for determining a file cleaning directory of the file to be cleaned based on the output result;
and the issuing module is used for issuing the file cleaning catalog of the file to be cleaned to the corresponding client.
Optionally, the apparatus further comprises:
the acquisition module is used for acquiring relevant information of a plurality of files and corresponding cleaning modes to serve as original sample data;
the building module is used for building training characteristics based on original sample data;
the training module is used for training the training characteristics through a preset algorithm to determine a judgment model;
wherein the predetermined algorithm comprises a GBDT classification algorithm.
Preferably, the input module is used for inputting the characteristic data of the file to be cleaned into a prestored judging model, determining whether the file in the file to be cleaned needs to be cleaned according to a judging rule in the judging model, and taking the file as an output result;
wherein the judgment rule comprises at least one of the following items:
clearing a file containing a suffix with a preset name;
cleaning a log file of a system;
cleaning a residual file after the application program is unloaded;
files with the same suffix name and the number of files with the size exceeding a preset threshold value are cleaned.
Preferably, the characteristic data of the file to be cleaned comprises at least one of:
the name of the application program, the package name of the application program, the root path of the application program in the client, the sub path, the label information of the package name of the application program, the classification information of the package name of the application program, the suffix information of the file, the size of the file of the application program and the number of the files of the application program.
Preferably, the file cleaning directory includes at least one of description information of the file, a file type, a cleaning suggestion and an unloading residual.
Yet another embodiment of the present invention provides a file cleaning client, including:
the extraction module is used for extracting the characteristic data of the file to be cleaned based on the triggering operation of file cleaning;
the sending module is used for sending the characteristic data of the file to be cleaned to the server for training;
the second receiving module is used for receiving a file cleaning directory of the file to be cleaned, which is returned by the server;
and the execution module is used for executing corresponding operation on the file to be cleaned according to the file cleaning directory of the file to be cleaned.
Preferably, the corresponding operation executed on the file to be cleaned comprises at least one of one-key cleaning, manual cleaning and reservation suggestion.
Preferably, the execution module comprises:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring the file name of a cleaning file in a cleaning directory of a file to be cleaned;
and the one-key cleaning unit is used for executing one-key cleaning operation on the file corresponding to the file name in the client according to the file name of the cleaned file.
Preferably, the characteristic data of the file to be cleaned comprises at least one of:
the name of the application program, the package name of the application program, the root path of the application program in the client, the sub path, the label information of the package name of the application program, the classification information of the package name of the application program, the suffix information of the file, the size of the file of the application program and the number of the files of the application program.
Preferably, the file cleaning directory includes at least one of description information of the file, a file type, a cleaning suggestion and an unloading residual.
In the embodiment of the invention, a file cleaning scheme is provided, the characteristic data of the file to be cleaned sent by a client is received, and the characteristic data of the file to be cleaned is input into a prestored judgment model to obtain an output result, so that the characteristic data of the file to be cleaned sent by the client is automatically and accurately and quickly processed, and reliable precondition guarantee is provided for subsequently determining a file cleaning directory of the file to be cleaned; and determining the file cleaning directory of the file to be cleaned based on the output result, and issuing the file cleaning directory of the file to be cleaned to the corresponding client, so that important precondition guarantee is provided for the corresponding client to accurately and quickly clean the corresponding file according to the file cleaning directory of the file to be cleaned. Furthermore, the operation efficiency of the terminal equipment where the corresponding client is located is improved by cleaning the files to be cleaned of the corresponding client, so that the user experience is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
FIG. 1 is a flowchart of a file cleaning method according to an embodiment of the present invention.
In the embodiment of the present invention, the content executed by each step is summarized as follows: step S110: receiving characteristic data of a file to be cleaned, which is sent by a client; step S120: inputting the characteristic data of the file to be cleaned into a pre-stored judgment model to obtain an output result; step S130: determining a file cleaning directory of the file to be cleaned based on the output result; step S140: and issuing the file cleaning catalog of the file to be cleaned to the corresponding client.
The embodiment of the invention provides a file cleaning method, which comprises the steps of receiving characteristic data of a file to be cleaned sent by a client, inputting the characteristic data of the file to be cleaned into a prestored judgment model to obtain an output result, realizing automatic accurate and rapid processing of the characteristic data of the file to be cleaned sent by the client, and providing reliable precondition guarantee for subsequently determining a file cleaning directory of the file to be cleaned; and determining the file cleaning directory of the file to be cleaned based on the output result, and issuing the file cleaning directory of the file to be cleaned to the corresponding client, so that important precondition guarantee is provided for the corresponding client to accurately and quickly clean the corresponding file according to the file cleaning directory of the file to be cleaned. Furthermore, the operation efficiency of the terminal equipment where the corresponding client is located is improved by cleaning the files to be cleaned of the corresponding client, so that the user experience is improved.
The following further explains the specific implementation of each step:
step S110: and receiving characteristic data of the file to be cleaned, which is sent by the client.
Specifically, the server receives characteristic data of a file to be cleaned, which is sent by the client.
The characteristic data of the file to be cleaned comprises at least one of the following items:
the method comprises the following steps of obtaining the name of an application program, the package name of the application program, the root path and the sub-path of the application program in a client, the label information of the package name of the application program, the classification information of the package name of the application program, the suffix information of a file in a file cleaning directory, the size of the file of the application program and the number of the files of the application program.
For example, the server receives characteristic data of a file to be cleaned, such as package name information "com.tencent.mm" of an application QQ, root path information "./data/" of the QQ in the terminal device, sub-path information "./data/data/com.tencent.qq/databases/" of the QQ in the terminal device, label information "1" of the QQ package name, classification information "instant messaging" of the QQ package name, and suffix information of the file, such as size information and total number of suffixes of all files under a path of the file ". tencent/" of the terminal device of ". temp" and ". txt", a size of the application file and the number of the application file, such as total number of file names ". tencent.qq/databas". 10 ", of the size information and total number of suffixes of each file under the path of the terminal device". tencent.tenq/databases/"of the terminal device of the QQ.
Step S120: and inputting the characteristic data of the file to be cleaned into a pre-stored judgment model to obtain an output result.
Specifically, the server inputs the characteristic data of the file to be cleaned, which is sent by the receiving terminal device, into a pre-stored judgment model for training, so as to obtain an output result after training.
In practical application, before the server inputs the characteristic data of the file to be cleaned sent by the receiving terminal device into the pre-stored judging model for training, the characteristic data of the file to be cleaned can be normalized in advance, and then the characteristic data of the file to be cleaned after the normalization processing is input into the judging model for training to obtain an output result after training, wherein the output result comprises information such as a file type, a cleaning suggestion and the like corresponding to the file to be cleaned.
For another example, the server inputs the feature data of the file to be cleaned sent by the receiving terminal device into a pre-stored judgment model for training, the pre-stored judgment model trains the feature data of the file to be cleaned by analyzing the feature data of the file to be cleaned by a matrix data analysis method, on the basis of a matrix diagram, the feature data of each file to be cleaned is respectively placed in rows and columns, then the comparison between the factors is described by the number in the intersections of the rows and columns, and then the quantity calculation and quantitative analysis are performed to determine the feature data of the file to be cleaned with higher possibility of being relatively required to be cleaned, so as to obtain the output result after training, wherein the output result includes the file type, the cleaning suggestion and other information corresponding to the file to be cleaned.
In a preferred embodiment, step S120 specifically includes step S121 (not shown in the figure); step S121: inputting the characteristic data of the file to be cleaned into a pre-stored judgment model, determining whether the file in the file to be cleaned needs to be cleaned or not according to a judgment rule in the judgment model, and taking the file as an output result;
wherein the judgment rule comprises at least one of the following items:
clearing a file containing a suffix with a preset name;
cleaning a log file of a system;
cleaning a residual file after the application program is unloaded;
files with the same suffix name and the number of files with the size exceeding a preset threshold value are cleaned.
For example, the server inputs the received characteristic data of the file to be cleaned, which is sent by the terminal device, into a pre-stored judgment model for training, and the pre-stored judgment model trains the characteristic data of the file to be cleaned, for example, the characteristic data of the file to be cleaned is analyzed and processed by a matrix data analysis method, so that the characteristic data of the file to be cleaned, which has a relatively high possibility of being cleaned, is determined; judging rules in the judging model such as cleaning files containing a 'temp' suffix, cleaning log files of a system, cleaning residual files after unloading of an application program and cleaning files with the same suffix name and the number and the size of which exceed 200, then judging that files containing the 'temp' suffix, log files, residual files after unloading of QQ and residual files after unloading of WeChat are files needing to be cleaned after analysis processing is carried out by a matrix data analysis method according to the judging rules, wherein the characteristic data of each file to be cleaned comprises the files with the same suffix name, the log files, the residual files after unloading of QQ and the residual files after unloading of WeChat are files needing to be cleaned, the characteristic data of each file to be cleaned has the same suffix name and the size of 300, cleaning the files with the same suffix name and the size of more than 200 according to the judging rules, judging that the files with the suffix name of 'txt' are files needing to be cleaned, and outputting a judgment result, wherein the output result comprises information of file types corresponding to the files to be cleaned, such as system files or log files, cleaning types, such as one-key cleaning or manual cleaning, cleaning suggestions, such as suggestion reservation, and the like.
Step S130: and determining a file cleaning directory of the file to be cleaned based on the output result.
Specifically, a file cleaning directory of the file to be cleaned is determined based on an output result of the prestored judgment model.
Preferably, the file cleaning directory includes at least one of description information of the file, a file type, a cleaning suggestion and an unloading residual.
For example, the server inputs the characteristic data of the file to be cleaned, which is sent by the receiving terminal device, into a pre-stored judgment model for training, and determines a file cleaning directory of the file to be cleaned based on information such as a file type, a cleaning suggestion and the like corresponding to each file to be cleaned in an output result after training, where, for example, the description information of the file is "file name: temp, file path: ../data/data/com. tenent.qq/databases/", the cleaning type information corresponding to the file description information is" text cleaning ", the cleaning suggestion information is" one-click cleaning ", and the unload residue information is" non-unload residue file ".
Step S140: and issuing the file cleaning catalog of the file to be cleaned to the corresponding client.
Specifically, the file cleaning directory for determining the files to be cleaned based on the output result is issued to the client side for sending the characteristic data of the files to be cleaned.
For example, the server inputs the characteristic data of the file to be cleaned, which is sent by the client of the receiving terminal device a, into a pre-stored judgment model for training, determines a file cleaning directory of the file to be cleaned based on information such as the file type, the cleaning suggestion and the like corresponding to each file to be cleaned in the output result after training, and then sends the file cleaning directory to the corresponding client of the terminal device a.
In a preferred embodiment, the method further comprises step S150 (not shown), step S160 (not shown), and step S170 (not shown); step S150: acquiring related information of a plurality of files and corresponding cleaning modes as original sample data; step S160: constructing training characteristics based on original sample data; step S170: the training features are trained through a predetermined algorithm to determine a judgment model.
Preferably, the predetermined algorithm comprises a GBDT classification algorithm.
For example, the server acquires relevant information of each file to be cleaned from historical data, including feature data of each file to be cleaned and a cleaning mode of each file to be cleaned, wherein the cleaning mode includes one-key cleaning, manual cleaning and suggested retention, the cleaning mode is used as original sample data, training features are constructed through a matrix data analysis method based on the acquired original sample data, and the training features are trained through a GBDT classification algorithm to determine a judgment model.
Fig. 2 is a flowchart of a method for cleaning a client file according to another embodiment of the present invention.
In the embodiment of the present invention, the content executed by each step is summarized as follows: step S210: extracting characteristic data of a file to be cleaned based on the triggering operation of file cleaning; step S220: sending the characteristic data of the file to be cleaned to a server for training; step S230: receiving a file cleaning directory of a file to be cleaned returned by a server; step S240: and executing corresponding operation on the file to be cleaned according to the file cleaning directory of the file to be cleaned.
The following further explains the specific implementation of each step:
step S210: and extracting the characteristic data of the file to be cleaned based on the triggering operation of file cleaning.
Preferably, the characteristic data of the file to be cleaned comprises at least one of:
the method comprises the following steps of obtaining the name of an application program, the package name of the application program, the root path and the sub-path of the application program in a client, the label information of the package name of the application program, the classification information of the package name of the application program, the suffix information of files in a directory, the size of the file of the application program and the number of the files of the application program.
For example, in a terminal device of a client, a user clicks a file cleaning button in a human-computer interaction interface provided by an application APP, and then based on a click trigger operation on the file cleaning button, the APP extracts feature data of a file to be cleaned, such as package name information "com.tencent.mm" of the application QQ, root path information "./data/" of the QQ in the terminal device, sub-path information "./data/data/com.tencent.qq/databases/" of the QQ in the terminal device, tag information "1" of the QQ package name, classification information "instant communication" of the QQ package name, suffix information of the file, such as two types of files under the terminal device "./data/" directory containing ". temp" and ". txt" respectively, the size of the application file, and the number of application files, such as the size of each file under the terminal device ". data/data/com.tencent.qq/databases" And the total number of all files is 1000, the total number of files with a suffix name of ". temp" is 500, and the total number of files with a suffix name of ". txt" is 100.
Step S220: and sending the characteristic data of the file to be cleaned to a server for training.
For example, in the terminal device a of the client, the user triggers the file cleaning button, the client extracts the feature data of the file to be cleaned, then sends the extracted feature data of the file to be cleaned to the pre-stored judgment model of the server for training, the server determines the file cleaning directory of the file to be cleaned according to the output result, and then the server sends the file cleaning directory of the determined file to be cleaned to the client of the terminal device a.
Step S230: and receiving a file cleaning directory of the file to be cleaned returned by the server.
Preferably, the file cleaning directory includes at least one of description information of the file, a file type, a cleaning suggestion and an unloading residual.
For example, in the above example, the terminal device a at the client receives a file cleaning directory of a file to be cleaned, where the file cleaning directory includes description information, a file type, a cleaning suggestion, and an unloading residue of the file, and the description information of the file is "file name: temp, file path: ../data/data/com. tenent.qq/databases/", the cleaning type information corresponding to the file description information is" text cleaning ", the cleaning suggestion information is" one-click cleaning ", and the unload residue information is" non-unload residue file ".
Step S240: and executing corresponding operation on the file to be cleaned according to the file cleaning directory of the file to be cleaned.
The corresponding operation executed on the file to be cleaned comprises at least one of one-key cleaning, manual cleaning and suggested reservation.
In a preferred embodiment, step S240 further includes step S241 (not shown) and step S242 (not shown); step S241: acquiring the file name of a cleaning file in a cleaning directory of a file to be cleaned; step S242: and executing one-key cleaning operation on the file corresponding to the file name in the client according to the file name of the cleaning file.
For example, the client receives a file cleaning directory of a file to be cleaned returned by the server, and the description information of the file in the file cleaning directory of the file to be cleaned is "file name: temp, file path: ../data/com.tenent.qq/databases/"the corresponding cleaning suggestion information is" one-key cleaning ", the operation of one-key cleaning is executed to the" aaa.temp "file under the path". data/data/com.tenent.qq/databases/"in the terminal equipment, the description information of the file in the file cleaning directory according to the file to be cleaned is" file name: cache, file path: ../data/data/com.tenent.qq/databases/"corresponding cleaning suggestion information is 'suggestion reservation', and no operation is performed on 'bb.cache' files under the path of './data/data/com.tenent.qq/databases/' in the terminal equipment.
FIG. 3 is a schematic structural diagram of a document cleaning apparatus according to yet another embodiment of the present invention.
In the embodiment of the present invention, the content executed by each module is summarized as follows: the first receiving module 310 receives the feature data of the file to be cleaned sent by the client; the input module 320 inputs the characteristic data of the file to be cleaned into a pre-stored judgment model to obtain an output result; the determining module 330 determines a file cleaning directory of the file to be cleaned based on the output result; the issuing module 340 issues the file cleaning directory of the file to be cleaned to the corresponding client.
In the embodiment of the invention, the file cleaning device is provided, the characteristic data of the file to be cleaned, which is sent by a client, is received, and the characteristic data of the file to be cleaned is input into a prestored judgment model to obtain an output result, so that the characteristic data of the file to be cleaned, which is sent by the client, is automatically and accurately and quickly processed, and reliable precondition guarantee is provided for the subsequent determination of a file cleaning directory of the file to be cleaned; and determining the file cleaning directory of the file to be cleaned based on the output result, and issuing the file cleaning directory of the file to be cleaned to the corresponding client, so that important precondition guarantee is provided for the corresponding client to accurately and quickly clean the corresponding file according to the file cleaning directory of the file to be cleaned. Furthermore, the operation efficiency of the terminal equipment where the corresponding client is located is improved by cleaning the files to be cleaned of the corresponding client, so that the user experience is improved.
The following further explains the specific implementation of each module:
the first receiving module 310 receives the feature data of the file to be cleaned sent by the client.
Specifically, the server receives characteristic data of a file to be cleaned, which is sent by the client.
The characteristic data of the file to be cleaned comprises at least one of the following items:
the method comprises the following steps of obtaining the name of an application program, the package name of the application program, the root path and the sub-path of the application program in a client, the label information of the package name of the application program, the classification information of the package name of the application program, the suffix information of a file in a file cleaning directory, the size of the file of the application program and the number of the files of the application program.
For example, the server receives characteristic data of a file to be cleaned, such as package name information "com.tencent.mm" of an application QQ, root path information "./data/" of the QQ in the terminal device, sub-path information "./data/data/com.tencent.qq/databases/" of the QQ in the terminal device, label information "1" of the QQ package name, classification information "instant messaging" of the QQ package name, and suffix information of the file, such as size information and total number of suffixes of all files under a path of the file ". tencent/" of the terminal device of ". temp" and ". txt", a size of the application file and the number of the application file, such as total number of file names ". tencent.qq/databas". 10 ", of the size information and total number of suffixes of each file under the path of the terminal device". tencent.tenq/databases/"of the terminal device of the QQ.
The input module 320 inputs the feature data of the file to be cleaned into a pre-stored judgment model to obtain an output result.
Specifically, the server inputs the characteristic data of the file to be cleaned, which is sent by the receiving terminal device, into a pre-stored judgment model for training, so as to obtain an output result after training.
In practical application, before the server inputs the characteristic data of the file to be cleaned sent by the receiving terminal device into the pre-stored judging model for training, the characteristic data of the file to be cleaned can be normalized in advance, and then the characteristic data of the file to be cleaned after the normalization processing is input into the judging model for training to obtain an output result after training, wherein the output result comprises information such as a file type, a cleaning suggestion and the like corresponding to the file to be cleaned.
For another example, the server inputs the feature data of the file to be cleaned sent by the receiving terminal device into a pre-stored judgment model for training, the pre-stored judgment model trains the feature data of the file to be cleaned by analyzing the feature data of the file to be cleaned by a matrix data analysis method, on the basis of a matrix diagram, the feature data of each file to be cleaned is respectively placed in rows and columns, then the comparison between the factors is described by the number in the intersections of the rows and columns, and then the quantity calculation and quantitative analysis are performed to determine the feature data of the file to be cleaned with higher possibility of being relatively required to be cleaned, so as to obtain the output result after training, wherein the output result includes the file type, the cleaning suggestion and other information corresponding to the file to be cleaned.
In a preferred embodiment, the input module 320 inputs the feature data of the file to be cleaned into a pre-stored judgment model, determines whether the file in the file to be cleaned needs to be cleaned according to a judgment rule in the judgment model, and uses the determination rule as an output result;
wherein the judgment rule comprises at least one of the following items:
clearing a file containing a suffix with a preset name;
cleaning a log file of a system;
cleaning a residual file after the application program is unloaded;
files with the same suffix name and the number of files with the size exceeding a preset threshold value are cleaned.
For example, the server inputs the received characteristic data of the file to be cleaned, which is sent by the terminal device, into a pre-stored judgment model for training, and the pre-stored judgment model trains the characteristic data of the file to be cleaned, for example, the characteristic data of the file to be cleaned is analyzed and processed by a matrix data analysis method, so that the characteristic data of the file to be cleaned, which has a relatively high possibility of being cleaned, is determined; judging rules in the judging model such as cleaning files containing a 'temp' suffix, cleaning log files of a system, cleaning residual files after unloading of an application program and cleaning files with the same suffix name and the number and the size of which exceed 200, then judging that files containing the 'temp' suffix, log files, residual files after unloading of QQ and residual files after unloading of WeChat are files needing to be cleaned after analysis processing is carried out by a matrix data analysis method according to the judging rules, wherein the characteristic data of each file to be cleaned comprises the files with the same suffix name, the log files, the residual files after unloading of QQ and the residual files after unloading of WeChat are files needing to be cleaned, the characteristic data of each file to be cleaned has the same suffix name and the size of 300, cleaning the files with the same suffix name and the size of more than 200 according to the judging rules, judging that the files with the suffix name of 'txt' are files needing to be cleaned, and outputting a judgment result, wherein the output result comprises information of file types corresponding to the files to be cleaned, such as system files or log files, cleaning types, such as one-key cleaning or manual cleaning, cleaning suggestions, such as suggestion reservation, and the like.
The determination module 330 determines a file cleaning directory of the file to be cleaned based on the output result.
Specifically, a file cleaning directory of the file to be cleaned is determined based on an output result of the prestored judgment model.
Preferably, the file cleaning directory includes at least one of description information of the file, a file type, a cleaning suggestion and an unloading residual.
For example, the server inputs the characteristic data of the file to be cleaned, which is sent by the receiving terminal device, into a pre-stored judgment model for training, and determines a file cleaning directory of the file to be cleaned based on information such as a file type, a cleaning suggestion and the like corresponding to each file to be cleaned in an output result after training, where, for example, the description information of the file is "file name: temp, file path: ../data/data/com. tenent.qq/databases/", the cleaning type information corresponding to the file description information is" text cleaning ", the cleaning suggestion information is" one-click cleaning ", and the unload residue information is" non-unload residue file ".
The issuing module 340 issues the file cleaning directory of the file to be cleaned to the corresponding client.
Specifically, the file cleaning directory for determining the files to be cleaned based on the output result is issued to the client side for sending the characteristic data of the files to be cleaned.
For example, the server inputs the characteristic data of the file to be cleaned, which is sent by the client of the receiving terminal device a, into a pre-stored judgment model for training, determines a file cleaning directory of the file to be cleaned based on information such as the file type, the cleaning suggestion and the like corresponding to each file to be cleaned in the output result after training, and then sends the file cleaning directory to the corresponding client of the terminal device a.
In a preferred embodiment, the apparatus further comprises an acquisition module 350 (not shown), a construction module 360 (not shown), and a training module 370 (not shown); the obtaining module 350 obtains the related information of the plurality of files and the corresponding cleaning mode as original sample data; the construction module 360 constructs training features based on original sample data; the training module 370 trains the training features through a predetermined algorithm to determine a judgment model.
Preferably, the predetermined algorithm comprises a GBDT classification algorithm.
For example, the server acquires relevant information of each file to be cleaned from historical data, including feature data of each file to be cleaned and a cleaning mode of each file to be cleaned, wherein the cleaning mode includes one-key cleaning, manual cleaning and suggested retention, the cleaning mode is used as original sample data, training features are constructed through a matrix data analysis method based on the acquired original sample data, and the training features are trained through a GBDT classification algorithm to determine a judgment model.
Fig. 4 is a schematic structural diagram of a client for file cleaning according to yet another embodiment of the present invention.
In the embodiment of the present invention, the content executed by each module is summarized as follows: the extraction module 410 extracts feature data of a file to be cleaned based on the trigger operation of file cleaning; the sending module 420 sends the feature data of the file to be cleaned to a server for training; the second receiving module 430 receives a file cleaning directory of the file to be cleaned returned by the server; the executing module 440 executes corresponding operations on the file to be cleaned according to the file cleaning directory of the file to be cleaned.
The following further explains the specific implementation of each module:
the extraction module 410 extracts feature data of a file to be cleaned based on a trigger operation of file cleaning.
Preferably, the characteristic data of the file to be cleaned comprises at least one of:
the method comprises the following steps of obtaining the name of an application program, the package name of the application program, the root path and the sub-path of the application program in a client, the label information of the package name of the application program, the classification information of the package name of the application program, the suffix information of files in a directory, the size of the file of the application program and the number of the files of the application program.
For example, in a terminal device of a client, a user clicks a file cleaning button in a human-computer interaction interface provided by an application APP, and then based on a click trigger operation on the file cleaning button, the APP extracts feature data of a file to be cleaned, such as package name information "com.tencent.mm" of the application QQ, root path information "./data/" of the QQ in the terminal device, sub-path information "./data/data/com.tencent.qq/databases/" of the QQ in the terminal device, tag information "1" of the QQ package name, classification information "instant communication" of the QQ package name, suffix information of the file, such as two types of files under the terminal device "./data/" directory containing ". temp" and ". txt" respectively, the size of the application file, and the number of application files, such as the size of each file under the terminal device ". data/data/com.tencent.qq/databases" And the total number of all files is 1000, the total number of files with a suffix name of ". temp" is 500, and the total number of files with a suffix name of ". txt" is 100.
The sending module 420 sends the feature data of the file to be cleaned to the server for training.
For example, in the terminal device a of the client, the user triggers the file cleaning button, the client extracts the feature data of the file to be cleaned, then sends the extracted feature data of the file to be cleaned to the pre-stored judgment model of the server for training, the server determines the file cleaning directory of the file to be cleaned according to the output result, and then the server sends the file cleaning directory of the determined file to be cleaned to the client of the terminal device a.
The second receiving module 430 receives the file cleaning directory of the file to be cleaned returned by the server.
Preferably, the file cleaning directory includes at least one of description information of the file, a file type, a cleaning suggestion and an unloading residual.
For example, in the above example, the terminal device a at the client receives a file cleaning directory of a file to be cleaned, where the file cleaning directory includes description information, a file type, a cleaning suggestion, and an unloading residue of the file, and the description information of the file is "file name: temp, file path: ../data/data/com. tenent.qq/databases/", the cleaning type information corresponding to the file description information is" text cleaning ", the cleaning suggestion information is" one-click cleaning ", and the unload residue information is" non-unload residue file ".
The executing module 440 executes corresponding operations on the file to be cleaned according to the file cleaning directory of the file to be cleaned.
The corresponding operation executed on the file to be cleaned comprises at least one of one-key cleaning, manual cleaning and suggested reservation.
In a preferred embodiment, the execution module 440 includes an obtaining unit 441 (not shown) and a key cleaning unit 442 (not shown); the obtaining unit 441 obtains the file name of the cleaning file in the cleaning directory of the file to be cleaned; the one-key cleaning unit 442 performs one-key cleaning operation on the file corresponding to the file name in the client according to the file name of the cleaned file.
For example, the client receives a file cleaning directory of a file to be cleaned returned by the server, and the description information of the file in the file cleaning directory of the file to be cleaned is "file name: temp, file path: ../data/com.tenent.qq/databases/"the corresponding cleaning suggestion information is" one-key cleaning ", the operation of one-key cleaning is executed to the" aaa.temp "file under the path". data/data/com.tenent.qq/databases/"in the terminal equipment, the description information of the file in the file cleaning directory according to the file to be cleaned is" file name: cache, file path: ../data/data/com.tenent.qq/databases/"corresponding cleaning suggestion information is 'suggestion reservation', and no operation is performed on 'bb.cache' files under the path of './data/data/com.tenent.qq/databases/' in the terminal equipment.
Those skilled in the art will appreciate that the present invention includes apparatus directed to performing one or more of the operations described in the present application. These devices may be specially designed and manufactured for the required purposes, or they may comprise known devices in general-purpose computers. These devices have stored therein computer programs that are selectively activated or reconfigured. Such a computer program may be stored in a device (e.g., computer) readable medium, including, but not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magnetic-optical disks, ROMs (Read-Only memories), RAMs (Random Access memories), EPROMs (Erasable programmable Read-Only memories), EEPROMs (Electrically Erasable programmable Read-Only memories), flash memories, magnetic cards, or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a bus. That is, a readable medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer).
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. Those skilled in the art will appreciate that the computer program instructions may be implemented by a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the features specified in the block or blocks of the block diagrams and/or flowchart illustrations of the present disclosure.
Those of skill in the art will appreciate that various operations, methods, steps in the processes, acts, or solutions discussed in the present application may be alternated, modified, combined, or deleted. Further, various operations, methods, steps in the flows, which have been discussed in the present application, may be interchanged, modified, rearranged, decomposed, combined, or eliminated. Further, steps, measures, schemes in the various operations, methods, procedures disclosed in the prior art and the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.