CN112131189A - Method and device for cleaning junk files and electronic equipment - Google Patents

Method and device for cleaning junk files and electronic equipment Download PDF

Info

Publication number
CN112131189A
CN112131189A CN202011068477.5A CN202011068477A CN112131189A CN 112131189 A CN112131189 A CN 112131189A CN 202011068477 A CN202011068477 A CN 202011068477A CN 112131189 A CN112131189 A CN 112131189A
Authority
CN
China
Prior art keywords
file
cleaned
determining
basic information
tolerance threshold
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.)
Pending
Application number
CN202011068477.5A
Other languages
Chinese (zh)
Inventor
李雪峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Hainiao Technology Co ltd
Original Assignee
Zhuhai Hainiao Technology 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 Zhuhai Hainiao Technology Co ltd filed Critical Zhuhai Hainiao Technology Co ltd
Priority to CN202011068477.5A priority Critical patent/CN112131189A/en
Publication of CN112131189A publication Critical patent/CN112131189A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a method and a device for clearing junk files and electronic equipment, relates to the field of file clearing, and aims to improve the accuracy of providing junk file clearing suggestions for users. The method comprises the following steps: determining a priority value of a file to be cleaned; determining a tolerance threshold corresponding to the current state of equipment, wherein the equipment is the equipment where the file to be cleaned is located; judging whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value or not; and if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value, prompting to clean the file to be cleaned. The application is suitable for clearing junk files.

Description

Method and device for cleaning junk files and electronic equipment
Technical Field
The present application relates to the field of file cleaning technologies, and in particular, to a method and an apparatus for cleaning junk files, an electronic device, and a readable storage medium.
Background
With the development of technology, electronic devices (devices) are more and more widely used, and with the use of electronic devices, files which occupy system resources and have little value, that is, junk files, appear in the electronic devices, and in order to increase the operating speed of the electronic devices, the junk files need to be cleaned, and related software is usually used to provide a junk file cleaning suggestion for users, in the prior art, the proposal for the junk file cleaning suggestion is to search and determine which files need to be cleaned through file types and/or specific file directories such as "/tmp" directory, and so on, that is, files of a certain file type and under a specific file directory are regarded as files which need to be cleaned, however, whether the files need to be cleaned is related to the device status of the files, that is, some files may be junk files on a certain electronic device, the junk files may not be junk files on other electronic devices, and the solution of the junk file clearing proposal in the prior art does not consider the influence of the state of the electronic device in the process of determining the files needing to be cleared, so that the junk file clearing proposal provided to the user is not accurate enough.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for clearing a spam file, an electronic device, and a readable storage medium, which can improve accuracy of a spam file clearing suggestion provided to a user.
In a first aspect, an embodiment of the present application provides a method for clearing junk files, including: determining a priority value of a file to be cleaned; determining a tolerance threshold corresponding to the current state of equipment, wherein the equipment is the equipment where the file to be cleaned is located; judging whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value or not; and if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value, prompting to clean the file to be cleaned.
According to a specific implementation manner of the embodiment of the present application, the determining a priority value of a file to be cleaned includes: acquiring basic information of a file to be cleaned, wherein the basic information comprises basic information parameters; determining influence factors corresponding to the basic information parameters of the files to be cleaned according to the basic information parameters and the corresponding relation between the basic information parameters of the files to be cleaned and the influence factors; and determining the priority value of the file to be cleaned according to the influence factor corresponding to each basic information parameter of the file to be cleaned.
According to a specific implementation manner of the embodiment of the present application, the basic information parameters of the file to be cleaned at least include one of the following items: the method comprises the steps of file type, file size, file position, last access time, last modification time, creation time, file calling time period, calling frequency and process for calling the file to be cleaned.
According to a specific implementation manner of the embodiment of the present application, the determining a tolerance threshold corresponding to the current state of the device includes: determining influence factors corresponding to all current state parameters in the current state of the equipment according to all current state parameters in the current state of the equipment and the corresponding relation between all state parameters of the state of the equipment and the influence factors; and determining tolerance threshold values corresponding to the current state of the equipment according to the influence factors corresponding to the current state parameters in the current state of the equipment.
According to a specific implementation manner of the embodiment of the present application, the current state parameter of the device at least includes one of the following items: disk usage, usage of the device, system resource usage.
According to a specific implementation manner of the embodiment of the present application, the tolerance threshold corresponding to the current state of the device includes a maximum tolerance threshold and a minimum tolerance threshold; if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold corresponding to the current state of the equipment, prompting a user to clean the file to be cleaned, and the method comprises the following steps: and if the priority value of the file to be cleaned is greater than or equal to the minimum tolerance threshold value and a garbage scanning instruction is received, prompting a user to clean the file to be cleaned.
According to a specific implementation manner of the embodiment of the application, after the user is prompted to clean the file to be cleaned, the method further includes: receiving an operation selection instruction of a user on the file to be cleaned; adjusting an influence factor corresponding to the basic information parameter of the file to be cleaned according to the operation selection instruction; and updating the corresponding relation between the basic information parameters of the file to be cleaned and the influence factors according to the adjusted influence factors.
According to a specific implementation manner of the embodiment of the application, after determining whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold, the method further includes: adjusting the value corresponding to the detection parameter in the detection condition according to the judgment result; the detection condition comprises a detection parameter and a numerical value corresponding to the detection parameter; the detection parameters correspond to basic information parameters of the file to be cleaned; and determining the file to be cleaned according to the adjusted detection condition.
In a second aspect, the present application provides an apparatus for cleaning junk files, comprising: the device comprises a first determining module, a second determining module, a judging module and a first prompting module; the first determining module is used for determining the priority value of the file to be cleaned; the second determining module is configured to determine a tolerance threshold corresponding to a current state of the device, where the device is a device where the file to be cleaned is located; the judging module is used for judging whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value; and the first prompting module is used for prompting to clean the file to be cleaned if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value.
According to a specific implementation manner of the embodiment of the present application, the first determining module includes: the method comprises the steps of obtaining a submodule, a first influence factor determining submodule and a priority value determining submodule; the acquisition submodule is used for acquiring basic information of a file to be cleaned, wherein the basic information comprises basic information parameters; the first influence factor determining submodule is used for determining influence factors corresponding to all parameters of the files to be cleaned according to the basic information parameters and the corresponding relation between the basic information parameters of the files to be cleaned and the influence factors; and the priority value determining submodule is used for determining the priority value of the file to be cleaned according to the influence factor corresponding to each basic information parameter of the file to be cleaned.
According to a specific implementation manner of the embodiment of the present application, the basic information parameters of the file to be cleaned at least include one of the following items: the method comprises the steps of file type, file size, file position, last access time, last modification time, creation time, file calling time period, calling frequency and process for calling the file to be cleaned.
According to a specific implementation manner of the embodiment of the present application, the second determining module includes: a second influence factor determining submodule and a tolerance threshold determining submodule; the second influence factor determining submodule is used for determining influence factors corresponding to all current state parameters in the current state of the equipment according to all current state parameters in the current state of the equipment and the corresponding relations between all states of the equipment state and the influence factors; and the tolerance threshold determining submodule is used for determining the tolerance threshold corresponding to the current state of the equipment according to the influence factors corresponding to the current state parameters in the current state of the equipment.
According to a specific implementation manner of the embodiment of the present application, the current state parameter of the device at least includes one of the following items: disk usage, usage of the device, system resource usage.
According to a specific implementation manner of the embodiment of the present application, the tolerance threshold corresponding to the current state of the device includes a maximum tolerance threshold and a minimum tolerance threshold; the first prompting module is specifically configured to prompt a user to clean the file to be cleaned if the priority value of the file to be cleaned is greater than or equal to the minimum tolerance threshold and a garbage scanning instruction is received.
According to a specific implementation manner of the embodiment of the application, the method further includes: the device comprises a receiving module, a first adjusting module and an updating module; the receiving module is used for receiving an operation selection instruction of a user on the file to be cleaned; the first adjusting module is used for adjusting the influence factor corresponding to the basic information parameter corresponding to the file to be cleaned according to the operation selection instruction; and the updating module is used for updating the corresponding relation between the basic information parameter of the file to be cleaned and the influence factor according to the adjusted influence factor.
According to a specific implementation manner of the embodiment of the application, the method further includes: a second adjusting module and a third determining module; the second adjusting module is used for adjusting the value corresponding to the detection parameter in the detection condition according to the judgment result; the detection condition comprises a detection parameter and a numerical value corresponding to the detection parameter; the detection parameters correspond to basic information of the file to be cleaned; and the third determining module is used for determining the file to be cleaned according to the adjusted detection condition.
In a third aspect, an embodiment of the present application provides an electronic device, including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes the program corresponding to the executable program code by reading the executable program code stored in the memory, and is used for executing the method of any one of the foregoing implementation modes.
In a fourth aspect, embodiments of the present application further provide a readable storage medium storing one or more programs, which are executable by one or more processors to implement the method of any of the foregoing embodiments.
The method and the device for clearing junk files, the electronic equipment and the readable storage medium provided by the embodiment of the application, determining the priority value of the file to be cleaned and the tolerance threshold corresponding to the current state of the equipment, and then judging whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold, if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value, prompting to clean the file to be cleaned, as the priority value of the junk file is compared with the tolerance threshold value corresponding to the current state of the equipment, the user is prompted to clean the file to be cleaned according to the comparison result, in the process, the priority value of the file to be cleaned and the tolerance threshold value of the equipment are combined, and then a cleaning suggestion which is in accordance with the current equipment use condition is given, so that the accuracy of the junk file cleaning suggestion provided for a user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a method for clearing junk files according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for clearing junk files according to another embodiment of the present application;
FIG. 3 is a schematic structural diagram of an apparatus for cleaning junk files according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic flow diagram of a method for clearing junk files according to an embodiment of the present application, and as shown in fig. 1, the method according to this embodiment may include:
step 101, determining a priority value of a file to be cleaned.
The file to be cleaned can be a file which needs to be further determined whether the file needs to be cleaned or not; the priority values can be distinguished according to the importance degree of the files, and the priority values can be determined according to the importance degree of the files, for example, the priority of the files to be cleaned can be determined by means of scoring the files to be cleaned, and it can be understood that the priority of the files to be cleaned can also be determined by means of other methods.
The garbage priority value (unimportant degree value) can be maintained by means of a configuration file, a database file, a cloud service and the like.
And 102, determining a tolerance threshold corresponding to the current state of the equipment, wherein the equipment is the equipment where the file to be cleaned is located.
The device can be a mobile terminal, a portable entertainment device, a desktop computer, and the like; the tolerance threshold may be a tolerance value for the file to be cleaned. The tolerance threshold can be determined according to the state of the equipment, and if the disk residual space of the equipment is 100G, the tolerance threshold can be 80; if the disk remaining space of the device is 80G, the tolerance threshold may be 60, and it is understood that the current state of the device, such as the system resource usage and the disk usage, may be considered comprehensively to obtain the tolerance threshold corresponding to the current state of the device.
Step 103, judging whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value of the equipment.
Comparing the priority value of the file to be cleaned determined in the steps 101 and 102 with a tolerance threshold corresponding to the current state of the equipment, and judging the size relationship between the priority value and the tolerance threshold.
And 104, if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold, prompting to clean the file to be cleaned.
When the priority value of the file to be cleaned is larger than or equal to the tolerance threshold value corresponding to the current state of the equipment, a user is prompted to clean the file to be cleaned, a dialog box can be popped up in a specific prompting mode, the dialog box comprises information of the file to be cleaned and an operation selection button of the file to be cleaned, and the dialog box can be used for cleaning the file to be cleaned, and the words such as 'cleaning' and 'not cleaning' are similar.
In this embodiment, whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value is determined, and then whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value is determined, if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value, cleaning of the file to be cleaned is prompted.
It is understood that step 102 in the above embodiments may be after step 101.
The method for clearing the junk files can realize identification, importance degree identification and junk file clearing of the junk files on a Linux operating platform.
In an embodiment of the present application, determining a priority value of a file to be cleaned (step 101) includes:
step 101a, acquiring basic information of a file to be cleaned, wherein the basic information comprises basic information parameters.
The basic information of the file to be cleaned may include one or more basic information parameters, and the basic information parameters may specifically include: one or more of file type, file size, file position, last access time, last modification time, creation time, file calling time period, calling frequency, process for calling the file to be cleaned and the like.
The method for acquiring the basic information of the file to be cleaned can adopt the Linux Hook technology, the active file scanning technology and other technologies to acquire program execution behaviors and file basic information, operate in other modes such as Linux service and the like, identify the calling time, calling frequency, calling process, file type, file size, file position, creating time, last opening time and last modification time of the system file by monitoring the system API method, and also can acquire the current system disk information, system resource use information and the like by the above modes; the Hook function is called a Hook function, before the system does not call the function, the Hook program captures the message, the Hook function obtains control right first, and the Hook function can process (change) the execution behavior of the function and can also forcibly end the transfer of the message.
Step 101b, determining the influence factors corresponding to the basic information parameters of the file to be cleaned according to the basic information parameters and the corresponding relationship between the basic information parameters of the file to be cleaned and the influence factors.
The impact factor for C-disc is 0.6, the impact factor for D-disc is 0.5, and if a file is located on C-disc, the impact factor corresponding to the file is 0.6. If the influence factor of the file with the size of more than or equal to 200M is 0.5, and the influence factor of the file with the size of less than or equal to 200M is 0.3, the influence factor of the file with the size of 150M is 0.3. The influence factor corresponding to the basic information of the file to be cleaned is determined by taking the basic information of the file to be cleaned and the corresponding relation between the basic information of the file and the influence factor as an example.
The corresponding relation between the basic information parameter and the influence factor of the file to be processed can be given in the form of a comparison table, and specifically, the corresponding relation between the basic information parameter and the influence factor can be configured in a manual configuration mode, namely, the influence factor corresponding to the basic information parameter A is 0.1; and correspondingly obtaining an influence factor based on the basic information parameter, wherein the influence factor can be a function taking the basic information parameter as an independent variable and can be configured by combining with an operator according to the program operation condition.
Step 101c, determining a priority value of the file to be cleaned according to the influence factor corresponding to each basic information parameter of the file to be cleaned.
Recording the priority level value of the junk file by adopting f (x, y), wherein x can be a basic information condition space of the file, and y is an influence factor corresponding to a specific parameter in the space; the x is used as a basic information condition space of the file, and mainly comprises file types, file sizes, file positions, last access time, creation time, calling time periods, calling frequency, user feedback acceptance degree and the like, and comprises the above parameters, but is not limited to the parameters, and the y is used as an influence factor, can be calculated and maintained by the cloud server through machine learning according to user habits, is issued through a configuration file, and can be dynamically adjusted, maintained and generated through neural network learning. In some examples, the initial value of y can be manually configured according to parameters in the basic information condition space, and can be adjusted according to the processing condition of the file during the running process of the program.
There are many ways to determine the priority value of the file to be cleaned according to the basic information of the file to be cleaned and the influence factor corresponding to the basic information of the file to be cleaned.
In the embodiment, the influence factors corresponding to the basic information parameters of the file to be cleaned are determined according to the acquired basic information parameters of the file to be cleaned and the corresponding relation between the basic information parameters of the file to be cleaned and the influence factors, and the priority value of the file to be cleaned is determined according to the influence factors corresponding to the basic information parameters of the file to be cleaned.
In an embodiment of the present application, determining a tolerance threshold corresponding to a current state of a device (step 102) includes:
step 102a, determining an influence factor corresponding to each current state parameter in the current state of the equipment according to each current state parameter in the current state of the equipment and the corresponding relationship between each state parameter of the equipment state and the influence factor.
The current state parameters of the device may include one or more of the usage of the disk, the usage of the device, and the usage of system resources. If the disk utilization is greater than or equal to 50%, the corresponding impact factor may be 0.6, the disk utilization is less than 50%, and the corresponding impact factor may be 0.8, then when the current state parameter of the device is disk utilization of 40%, the corresponding impact factor is 0.8.
The corresponding relation between each state parameter of the equipment state and the influence factor can also be correspondingly obtained based on the equipment state parameter, the influence factor can be a function taking the equipment state parameter as an independent variable, and the configuration can be carried out according to the program operation condition by combining with an operator.
And 102b, determining tolerance threshold values corresponding to the current state of the equipment according to the influence factors corresponding to the current state parameters in the current state of the equipment.
The tolerance threshold may be a discrete type of data value, i.e. differentiated by strict classification, or a continuous type of data, i.e. not differentiated by a specific classification.
Tolerance threshold values corresponding to the current state of the equipment in one embodiment of the application comprise a maximum tolerance threshold value and a minimum tolerance threshold value;
if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold corresponding to the current state of the device, prompting to clean the file to be cleaned (step 104), which specifically includes: and if the priority value of the file to be cleaned is greater than or equal to the maximum tolerance threshold value, prompting to clean the file to be cleaned.
The maximum tolerance threshold value represents the maximum value of the garbage files which can be tolerated by the current state of the equipment, and the minimum tolerance threshold value represents the minimum value of the garbage files which can be tolerated by the current state of the equipment; in one example, the device maximum tolerance threshold is identified by gmax (a, b0), the minimum tolerance threshold is identified by gmin (a, b1), a is the corresponding device condition space, and b0 and b1 are the corresponding impact factors, respectively, where a is the device condition space and may include the disk usage, the usage of the rest of the device resources, the usage habits (work, life, etc.) of the user, the user characters, and so on, including but not limited to the device usage, b0 and b1 may use the pre-stored correspondence between the device status and the impact factors to determine the impact factors corresponding to the current status of the device, or the impact factors calculated by the cloud server or the local engine according to the current device status, in which case, the initial impact factors may be manually configured, and may be adjusted according to the cleaning status of the file during the program operation, if the adjustment can be performed according to the feedback of the user, specifically, the initial value of the impact factor corresponding to one parameter in the device condition space is 0.5, when the user selects to clean the file corresponding to the factor through the interactive interface, the impact factor is adjusted to be 0.55, and if the user does not agree with the cleaning, the impact factor is reduced to be 0.45, so as to weaken the influence of the parameter corresponding to the impact factor on the junk file.
There are many ways to determine the priority value of the file to be cleaned according to the basic information of the file to be cleaned and the influence factor corresponding to the basic information of the file to be cleaned.
When the priority value of the file to be cleaned is larger than or equal to the maximum tolerance threshold value, actively prompting a user to clean the file to be cleaned.
In one example, when a file appears with a priority value f (x, y) greater than or equal to a maximum tolerance threshold gmax (a, b0), the user may be actively popup to indicate that the file may be cleaned and to present a specific processing scheme.
Tolerance threshold values corresponding to the current state of the device in another embodiment of the present application include a maximum tolerance threshold value and a minimum tolerance threshold value;
if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold corresponding to the current state of the device, prompting a user to clean the file to be cleaned (step 104), specifically including:
and if the priority value of the file to be cleaned is greater than or equal to the minimum tolerance threshold value and a garbage scanning instruction is received, prompting a user to clean the file to be cleaned.
When the priority value of the file to be cleaned is greater than or equal to the minimum tolerance threshold value, the file can be regarded as a junk file, the user can not be actively prompted to process the file, but the user is prompted to clean the file when the user actively scans the file.
In one example, when a file occurs with a priority f (x, y) equal to or greater than a minimum tolerance threshold gmin (a, b1), the user is prompted that the file can be cleaned when actively scanning.
In yet another embodiment of the present application, if f (x, y) < gmax (a, b0) and f (x, y) > -gmin (a, b1), the user may not be prompted actively for processing, but is prompted during the user's active scan for a file that may be considered garbage file for cleaning; if f (x, y) < gmin (a, b1), it indicates that the current system is in harmony with the file and the file should not be treated as a junk file.
Referring to fig. 2, a further embodiment of the present application is substantially the same as the above embodiment, except that after prompting a user to clean a file to be cleaned, the method of the present embodiment further includes:
and 105, receiving an operation selection instruction of the user for the file to be cleaned.
The operation selection instructions may include a clean up instruction and a no clean up instruction, in one example, a clean up button and a no clean up button on a pop-up window that prompts the user to clean up the file to be cleaned. When a user selects a cleaning button, namely a cleaning instruction is sent out, the cleaning instruction is received, and the processing file is used for cleaning; when the user selects the non-cleaning button, the non-cleaning instruction is sent out, and then the non-cleaning instruction is received so as not to clean the processing file.
And 106, adjusting the influence factor corresponding to the basic information parameter of the file to be cleaned according to the operation selection instruction.
If the user accepts the suggestion for cleaning the file, the influence factor corresponding to the basic information of the file is improved, if the user rejects the suggestion for processing, the influence factor corresponding to the basic information of the file is reduced, and if the user is prompted to clean the file to be cleaned, the user selects to clean the file A on the disk C, and the influence factor corresponding to the basic information of the file A is improved.
And step 107, updating the corresponding relation between the basic information parameters of the file to be cleaned and the influence factors according to the adjusted influence factors.
And re-determining the corresponding relation between the basic information parameters of the file to be processed and the influence factors according to the adjusted influence factors.
In this embodiment, by receiving an operation selection instruction of a user for the file to be cleaned, adjusting the influence factor corresponding to the basic information parameter of the file to be cleaned according to the operation selection instruction, updating the corresponding relationship between the basic information parameter of the file and the influence factor according to the adjusted influence factor, and when calculating the priority value of the file to be cleaned again, introducing the attitude of the user for processing the file to be cleaned this time into the calculation parameter, after a period of use, the program will give a processing suggestion that best meets the mind of the user, thereby further improving the accuracy of identifying the junk file and improving the user experience.
In another embodiment of the present application, after determining whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold (step 103), the method further includes:
step 108, adjusting the value corresponding to the detection parameter in the detection condition according to the judgment result; the detection condition comprises a detection parameter and a numerical value corresponding to the detection parameter; the detection parameters correspond to basic information parameters of the file to be cleaned.
In an example, the detection parameter corresponds to a basic information parameter of the file to be cleaned, specifically, the basic information of the file a to be processed includes a called frequency in a predetermined time period, and the detection parameter also includes a called frequency of the file in the predetermined time period.
Comparing the priority value of the file A to be cleaned with a tolerance threshold corresponding to the current state of the equipment, and when the priority value of the file A to be cleaned is greater than the tolerance threshold corresponding to the current state of the equipment, increasing the value in the detection condition, wherein if the basic information of the file A to be cleaned comprises 200 times of calling in a unit time period, the detection condition A is called less than 1000 times in the unit time period, and when the priority value of the file A to be cleaned is greater than or equal to the tolerance threshold corresponding to the current state of the equipment, the value corresponding to the file calling frequency in the detection condition is reduced, and can be specifically adjusted to 800 times from 1000 times, namely the detection condition is increased; when the priority value of the file A to be cleaned is smaller than the tolerance threshold corresponding to the current state of the equipment, the value corresponding to the called frequency of the file in the detection condition is increased, specifically, the number can be adjusted from 1000 times to 1200 times, namely, the detection condition is reduced.
In some examples, it may be determined which types of files, which processes use files, which locations of files, when, etc. to focus or reduce the monitoring criteria based on the determination.
And step 110, determining the file to be cleaned according to the adjusted detection condition.
And determining a file to be cleaned from a plurality of files of the equipment according to the adjusted detection condition, so as to determine a priority value and compare the priority value with a tolerance threshold value of the current state of the equipment, and finally determining whether to prompt a user to clean the file.
In this embodiment, the occupation of system resources in the implementation process of the method of this embodiment can be dynamically adjusted by adjusting the value corresponding to the detection parameter in the detection condition according to the determination result, and then determining the file to be cleaned according to the adjusted detection condition.
Fig. 3 is a schematic structural diagram of an apparatus for clearing junk files according to an embodiment of the present application, and as shown in fig. 3, the apparatus according to the embodiment may include: the device comprises a first determining module 11, a second determining module 12, a judging module 13 and a first prompting module 14; wherein the content of the first and second substances,
the first determining module 11 is configured to determine a priority value of a file to be cleaned;
the second determining module 12 is configured to determine a tolerance threshold corresponding to a current state of a device, where the device is a device where the file to be cleaned is located;
the judging module 13 is configured to judge whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold;
and the first prompting module 14 is configured to prompt to clean the file to be cleaned if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
The device of this embodiment determines the priority value of the file to be cleaned and the tolerance threshold corresponding to the current state of the device, and then determines whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold corresponding to the current state of the device, if the priority value of the file to be cleaned is larger than or equal to the tolerance threshold corresponding to the current state of the equipment, the file to be cleaned is prompted to be cleaned, as the priority value of the junk file is compared with the tolerance threshold value corresponding to the current state of the equipment, the user is prompted to clean the file to be cleaned according to the comparison result, in the process, the priority value of the file to be cleaned and the tolerance threshold value of the equipment are combined, so that a cleaning proposal according with the current equipment use condition is given, therefore, the accuracy of junk file clearing suggestions provided for the user is improved, and further, the user experience can be improved.
As an optional implementation, the first determining module includes: the method comprises the steps of obtaining a submodule, a first influence factor determining submodule and a priority value determining submodule; the acquisition submodule is used for acquiring basic information of a file to be cleaned, wherein the basic information comprises basic information parameters; the first influence factor determining submodule is used for determining influence factors corresponding to all basic information parameters of the files to be cleaned according to the basic information parameters and the corresponding relation between the basic information parameters of the files to be cleaned and the influence factors; and the priority value determining submodule is used for determining the priority value of the file to be cleaned according to the influence factor corresponding to each basic information parameter of the file to be cleaned.
As an optional implementation manner, the basic information parameter of the file to be cleaned at least includes one of the following items: the method comprises the steps of file type, file size, file position, last access time, last modification time, creation time, file calling time period, calling frequency and process for calling the file to be cleaned.
As an optional implementation, the second determining module includes: a second influence factor determining submodule and a tolerance threshold determining submodule; the second influence factor determining submodule is used for determining influence factors corresponding to all current state parameters in the current state of the equipment according to all current state parameters in the current state of the equipment and the corresponding relations between all states of the equipment state and the influence factors; and the tolerance threshold determining submodule is used for determining the tolerance threshold corresponding to the current state of the equipment according to the influence factors corresponding to the current state parameters in the current state of the equipment.
As an optional implementation manner, the current state parameter of the device includes at least one of the following: disk usage, usage of the device, system resource usage.
As an optional embodiment, the tolerance threshold corresponding to the current state of the device includes a maximum tolerance threshold and a minimum tolerance threshold; the first prompting module is specifically configured to prompt to clean the file to be cleaned if the priority value of the file to be cleaned is greater than or equal to a maximum tolerance threshold.
As an optional embodiment, the tolerance threshold corresponding to the current state of the device includes a maximum tolerance threshold and a minimum tolerance threshold; the first prompting module is specifically configured to prompt a user to clean the file to be cleaned if the priority value of the file to be cleaned is greater than or equal to the minimum tolerance threshold and a garbage scanning instruction is received.
As an optional implementation, further comprising: the device comprises a receiving module, a first adjusting module and an updating module; the receiving module is used for receiving an operation selection instruction of a user on the file to be cleaned; the first adjusting module is used for adjusting the influence factor corresponding to the basic information parameter of the file to be cleaned according to the operation selection instruction; and the updating module is used for updating the corresponding relation between the basic information parameter of the file to be cleaned and the influence factor according to the adjusted influence factor.
As an optional implementation, further comprising: a second adjusting module and a third determining module; the second adjusting module is used for adjusting the value corresponding to the detection parameter in the detection condition according to the judgment result; the detection condition comprises a detection parameter and a numerical value corresponding to the detection parameter; the detection parameters correspond to basic information parameters of the file to be cleaned; and the third determining module is used for determining the file to be cleaned according to the adjusted detection condition.
An embodiment of the present application further provides an electronic device, which includes the apparatus according to any of the foregoing embodiments.
Fig. 4 is a schematic structural diagram of an embodiment of an electronic device of the present application, which may implement the process of the embodiment shown in fig. 1 of the present application, and as shown in fig. 4, the electronic device may include: the device comprises a shell 41, a processor 42, a memory 43, a circuit board 44 and a power circuit 45, wherein the circuit board 44 is arranged inside a space enclosed by the shell 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; a power supply circuit 45 for supplying power to each circuit or device of the electronic apparatus; the memory 43 is used for storing executable program code; the processor 42 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 43, and is used for executing the method for clearing the garbage file according to any of the foregoing embodiments.
The specific execution process of the above steps by the processor 42 and the steps further executed by the processor 42 by running the executable program code may refer to the description of the embodiment shown in fig. 1 in this application, and are not described herein again.
The electronic device exists in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
Embodiments of the application also provide a readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement a method provided by any of the embodiments of the application.
Embodiments of the present application further provide an application program, which is executed to implement the method provided in any of the embodiments of the present application.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations when the present application is implemented.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of cleaning junk files, comprising:
determining a priority value of a file to be cleaned;
determining a tolerance threshold corresponding to the current state of equipment, wherein the equipment is the equipment where the file to be cleaned is located;
judging whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value or not;
and if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value, prompting to clean the file to be cleaned.
2. The method of claim 1, wherein determining a priority value for the file to be cleaned comprises:
acquiring basic information of a file to be cleaned, wherein the basic information comprises basic information parameters;
determining influence factors corresponding to the basic information parameters of the files to be cleaned according to the basic information parameters and the corresponding relation between the basic information parameters of the files to be cleaned and the influence factors;
and determining the priority value of the file to be cleaned according to the influence factor corresponding to each basic information parameter of the file to be cleaned.
3. The method according to claim 2, wherein the basic information parameters of the file to be cleaned at least comprise one of the following items: the method comprises the steps of file type, file size, file position, last access time, last modification time, creation time, file calling time period, calling frequency and process for calling the file to be cleaned.
4. The method of claim 1, wherein determining the tolerance threshold corresponding to the current state of the device comprises:
determining influence factors corresponding to all current state parameters in the current state of the equipment according to all current state parameters in the current state of the equipment and the corresponding relation between all state parameters of the state of the equipment and the influence factors;
and determining tolerance threshold values corresponding to the current state of the equipment according to the influence factors corresponding to the current state parameters in the current state of the equipment.
5. The method of claim 4, wherein the current state parameter comprises at least one of: disk usage, usage of the device, system resource usage.
6. The method of claim 1, wherein the tolerance threshold corresponding to the current state of the device comprises a maximum tolerance threshold and a minimum tolerance threshold; if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold corresponding to the current state of the equipment, prompting a user to clean the file to be cleaned, and the method comprises the following steps:
and if the priority value of the file to be cleaned is greater than or equal to the minimum tolerance threshold value and a garbage scanning instruction is received, prompting a user to clean the file to be cleaned.
7. The method of claim 6, wherein after prompting a user to clean the file to be cleaned, the method further comprises:
receiving an operation selection instruction of a user on the file to be cleaned;
adjusting the influence factor corresponding to the basic information parameter according to the operation selection instruction;
and updating the corresponding relation between the basic information parameters of the file to be cleaned and the influence factors according to the adjusted influence factors.
8. The method according to claim 1, wherein after determining whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold, the method further comprises:
adjusting the value corresponding to the detection parameter in the detection condition according to the judgment result; the detection condition comprises a detection parameter and a numerical value corresponding to the detection parameter; the detection parameters correspond to basic information parameters of the file to be cleaned;
and determining the file to be cleaned according to the adjusted detection condition.
9. An apparatus for cleaning junk files, comprising: the device comprises a first determining module, a second determining module, a judging module and a first prompting module; wherein the content of the first and second substances,
the first determining module is used for determining the priority value of the file to be cleaned;
the second determining module is configured to determine a tolerance threshold corresponding to a current state of the device, where the device is a device where the file to be cleaned is located;
the judging module is used for judging whether the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value;
and the first prompting module is used for prompting to clean the file to be cleaned if the priority value of the file to be cleaned is greater than or equal to the tolerance threshold value.
10. The apparatus of claim 9, wherein the first determining module comprises: the method comprises the steps of obtaining a submodule, a first influence factor determining submodule and a priority value determining submodule; wherein the content of the first and second substances,
the acquisition submodule is used for acquiring basic information of the file to be cleaned, and the basic information comprises basic information parameters;
the first influence factor determining submodule is used for determining influence factors corresponding to all parameters of the files to be cleaned according to the basic information parameters and the corresponding relation between the basic information parameters of the files to be cleaned and the influence factors;
and the priority value determining submodule is used for determining the priority value of the file to be cleaned according to the influence factor corresponding to each basic information parameter of the file to be cleaned.
CN202011068477.5A 2020-09-29 2020-09-29 Method and device for cleaning junk files and electronic equipment Pending CN112131189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011068477.5A CN112131189A (en) 2020-09-29 2020-09-29 Method and device for cleaning junk files and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011068477.5A CN112131189A (en) 2020-09-29 2020-09-29 Method and device for cleaning junk files and electronic equipment

Publications (1)

Publication Number Publication Date
CN112131189A true CN112131189A (en) 2020-12-25

Family

ID=73843773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011068477.5A Pending CN112131189A (en) 2020-09-29 2020-09-29 Method and device for cleaning junk files and electronic equipment

Country Status (1)

Country Link
CN (1) CN112131189A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601683A (en) * 2014-12-31 2015-05-06 广东欧珀移动通信有限公司 File download management method, mobile terminal and communication system
CN106227744A (en) * 2016-07-12 2016-12-14 努比亚技术有限公司 Terminal document managing device, terminal and terminal document management method
CN106708912A (en) * 2015-11-18 2017-05-24 中兴通讯股份有限公司 Useless file identification method and device, useless file management method and device and terminal
CN108038001A (en) * 2017-12-13 2018-05-15 腾讯科技(深圳)有限公司 Cleaning garbage files strategy-generating method, device and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601683A (en) * 2014-12-31 2015-05-06 广东欧珀移动通信有限公司 File download management method, mobile terminal and communication system
CN106708912A (en) * 2015-11-18 2017-05-24 中兴通讯股份有限公司 Useless file identification method and device, useless file management method and device and terminal
CN106227744A (en) * 2016-07-12 2016-12-14 努比亚技术有限公司 Terminal document managing device, terminal and terminal document management method
CN108038001A (en) * 2017-12-13 2018-05-15 腾讯科技(深圳)有限公司 Cleaning garbage files strategy-generating method, device and server

Similar Documents

Publication Publication Date Title
CN106202427B (en) Application processing method and device and computer storage medium
CN106250182B (en) File processing method and device and electronic equipment
CN106095587B (en) Cache scanning method and device of application program and electronic equipment
CN108763251B (en) Personalized recommendation method and device for nuclear product and electronic equipment
CN105955606B (en) Terminal device memory cleaning method and device and electronic device
CN111030968A (en) Detection method and device capable of customizing threat detection rule and storage medium
CN107992361B (en) Background application cleaning method and device, storage medium and electronic equipment
CN112131189A (en) Method and device for cleaning junk files and electronic equipment
JP6900996B2 (en) Conversation support devices, conversation support methods, and programs
CN110706691B (en) Voice verification method and device, electronic equipment and computer readable storage medium
CN110719367A (en) Cloud mobile phone friend recommendation method, device, equipment and storage medium
CN111539206A (en) Method, device and equipment for determining sensitive information and storage medium
CN115630152A (en) Virtual character live conversation mode, device, electronic equipment and storage medium
CN113012687B (en) Information interaction method and device and electronic equipment
CN114065005A (en) System configuration optimization parameter method and device, electronic equipment and storage medium
CN110597566B (en) Application processing method and device, storage medium and electronic equipment
CN108958929B (en) Method and device for applying algorithm library, storage medium and electronic equipment
CN112698791A (en) System disk cleaning method and device, electronic equipment and storage medium
CN114036277A (en) Dialogue robot route skipping method and device, electronic equipment and medium
CN114338102A (en) Security detection method and device, electronic equipment and storage medium
CN110312166B (en) Live broadcast room message filtering method and device, electronic equipment and storage medium
CN106383898B (en) Chat content recommendation method and device and electronic equipment
CN112138399A (en) Game data updating method and system and game server
CN110888971A (en) Multi-round interaction method and device for robot customer service and user
US20170346908A1 (en) Method and apparatus for controlling running of service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201225