File cleaning method and device of terminal equipment and electronic equipment

By calculating the candidate file stability impact index and software correlation index of the terminal device, and combining them with the cleaning index, the files to be cleaned are accurately screened, which solves the problem of inaccurate cleaning of target software-related files on the terminal device and improves the accuracy of file cleaning and device performance.

CN122111965APending Publication Date: 2026-05-29STATE GRID BEIJING ELECTRIC POWER CO +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID BEIJING ELECTRIC POWER CO
Filing Date
2026-02-05
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, terminal devices often have inaccuracies in cleaning up files related to the target software, leading to wasted storage resources and insufficient device performance optimization.

Method used

By identifying candidate files corresponding to the target operation, and calculating the stability impact index and software correlation index of the candidate files based on terminal data and software data of the terminal device, the cleanup index is determined by combining the two, and the files to be cleaned are accurately screened.

Benefits of technology

It achieves accurate and targeted file cleanup of terminal devices, avoids accidental or missed file cleanup, and ensures device operation stability and performance optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111965A_ABST
    Figure CN122111965A_ABST
Patent Text Reader

Abstract

The application discloses a file cleaning method and device of terminal equipment and electronic equipment. The method comprises the following steps: determining a target operation performed on a target software in the terminal equipment; determining a plurality of candidate files corresponding to the target operation; determining a stable influence index corresponding to the plurality of candidate files based on terminal data of the terminal equipment; determining a software association index corresponding to the plurality of candidate files based on software data; determining a cleaning index corresponding to the plurality of candidate files according to the software association index and the stable influence index corresponding to the plurality of candidate files; and determining a target file to be cleaned from the plurality of candidate files according to the cleaning index corresponding to the plurality of candidate files, and cleaning the target file. The application solves the technical problem of inaccurate file cleaning when cleaning the files related to the target software of the terminal equipment in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a file cleaning method, apparatus, and electronic device for terminal devices. Background Technology

[0002] In related technologies, after the target software on a terminal device is installed or uninstalled, unnecessary files can be cleaned up to free up storage resources and optimize device performance. However, these technologies suffer from inaccurate file cleanup issues when cleaning up files related to the target software on the terminal device.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides a file cleaning method, apparatus, and electronic device for terminal devices, to at least solve the technical problem of inaccurate file cleaning when cleaning files related to target software on terminal devices in related technologies.

[0005] According to one aspect of the present invention, a file cleanup method for a terminal device is provided, comprising: determining a target operation performed on target software in the terminal device; determining a plurality of candidate files corresponding to the target operation; determining a stability impact index corresponding to each of the plurality of candidate files based on terminal data of the terminal device, wherein the corresponding stability impact index represents the degree of influence of the corresponding candidate file on the operational stability of the terminal device, and the terminal data includes software data of the target software; determining a software association index corresponding to each of the plurality of candidate files based on the software data, wherein the corresponding software association index represents the degree of association between the corresponding candidate file and the target software; determining a cleanup index corresponding to each of the plurality of candidate files based on the software association index and the stability impact index corresponding to each of the plurality of candidate files; determining a target file to be cleaned from the plurality of candidate files based on the cleanup index corresponding to each of the plurality of candidate files, and cleaning the target file.

[0006] Optionally, determining the software association index corresponding to each of the plurality of candidate files based on the software data includes: when the software data includes software installation data, determining a plurality of first predetermined item data based on the software installation data, wherein the plurality of first predetermined item data is used to characterize the installation path of the target software; determining the path association index corresponding to each of the plurality of candidate files based on the plurality of first predetermined item data, wherein the corresponding path association index represents the degree of association between the storage path of the corresponding candidate file and the installation path of the target software; and determining the software association index corresponding to each of the plurality of candidate files based on the path association index corresponding to each of the plurality of candidate files.

[0007] Optionally, determining the software association index corresponding to each of the multiple candidate files based on the path association index corresponding to each of the multiple candidate files includes: determining the environment association index corresponding to each of the multiple candidate files based on the software installation data, wherein the corresponding environment association index is used to represent the degree of association between the corresponding candidate file and the operating environment of the target software; and determining the software association index corresponding to each of the multiple candidate files based on the environment association index and the path association index corresponding to each of the multiple candidate files.

[0008] Optionally, determining the software association index corresponding to each of the multiple candidate files based on the environment association index and path association index respectively includes: determining the file source identifier corresponding to each of the multiple candidate files; determining the software source identifier corresponding to the target software; determining the identifier association index corresponding to each of the multiple candidate files based on the file source identifier corresponding to each of the multiple candidate files and the software source identifier corresponding to the target software, wherein the corresponding identifier association index represents the degree of association between the file source identifier of the corresponding candidate file and the software source identifier of the target software; and determining the software association index corresponding to each of the multiple candidate files based on the identifier association index, environment association index, and path association index respectively.

[0009] Optionally, determining the stability impact index corresponding to each of the plurality of candidate files based on the terminal data of the terminal device includes: when the terminal data also includes terminal environment data, determining a plurality of second predetermined item data based on the terminal environment data and the software data, wherein the plurality of second predetermined item data is used to characterize the usage intensity of the corresponding candidate file by the terminal device; determining the intensity correlation index corresponding to each of the plurality of candidate files based on the plurality of second predetermined item data, wherein the corresponding intensity correlation index represents the degree to which the corresponding candidate file is used by the terminal device; and determining the stability impact index corresponding to each of the plurality of candidate files based on the intensity correlation index corresponding to each of the plurality of candidate files.

[0010] Optionally, determining the stability impact index corresponding to each of the plurality of candidate files based on the strength correlation indexes corresponding to each of the plurality of candidate files includes: when the terminal data also includes operational security data, determining a plurality of third predetermined item data based on the operational security data, wherein the plurality of third predetermined item data is used to characterize the impact of the corresponding candidate file on the secure operation of the terminal device; determining the security correlation index corresponding to each of the plurality of candidate files based on the plurality of third predetermined item data, wherein the corresponding security correlation index represents the importance of the corresponding candidate file to the secure operation of the terminal device; and determining the stability impact index corresponding to each of the plurality of candidate files based on the security correlation index and the strength correlation index corresponding to each of the plurality of candidate files.

[0011] Optionally, determining the stability impact index corresponding to each of the plurality of candidate files based on the terminal data of the terminal device includes: when the target operation is an uninstallation operation that uninstalls the target software from the terminal device, determining a plurality of fourth predetermined item data based on the terminal data, wherein the plurality of fourth predetermined item data is used to characterize the change characteristics of the terminal device's usage time of the corresponding candidate files; determining the time correlation index corresponding to each of the plurality of candidate files based on the plurality of fourth predetermined item data, wherein the corresponding time correlation index is used to characterize the degree to which the corresponding candidate file is used by the terminal device from a time dimension; and determining the stability impact index corresponding to each of the plurality of candidate files based on the time correlation index corresponding to each of the plurality of candidate files.

[0012] According to one aspect of the present invention, a file cleaning apparatus for a terminal device is provided, comprising: a first determining module, configured to determine a target operation performed on target software in the terminal device; a second determining module, configured to determine a plurality of candidate files corresponding to the target operation; a third determining module, configured to determine a stability impact index corresponding to each of the plurality of candidate files based on terminal data of the terminal device, wherein the corresponding stability impact index represents the degree of influence of the corresponding candidate file on the operational stability of the terminal device, and the terminal data includes software data of the target software; a fourth determining module, configured to determine a software association index corresponding to each of the plurality of candidate files based on the software data, wherein the corresponding software association index represents the degree of association between the corresponding candidate file and the target software; a fifth determining module, configured to determine a cleaning index corresponding to each of the plurality of candidate files based on the software association index and the stability impact index corresponding to each of the plurality of candidate files; and a sixth determining module, configured to determine a target file to be cleaned from the plurality of candidate files based on the cleaning index corresponding to each of the plurality of candidate files, and clean the target file.

[0013] According to one aspect of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the file cleaning method of the terminal device described in any of the preceding claims.

[0014] According to one aspect of the present invention, a computer-readable storage medium is provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the file cleaning method of the terminal device described in any of the preceding claims.

[0015] In this embodiment of the invention, a target operation performed on the target software in the terminal device is determined; multiple candidate files corresponding to the target operation are determined; based on the terminal data of the terminal device, a stability impact index corresponding to each of the multiple candidate files is determined, wherein the corresponding stability impact index represents the degree of influence of the corresponding candidate file on the operational stability of the terminal device, and the terminal data includes the software data of the target software; based on the software data, a software association index corresponding to each of the multiple candidate files is determined, wherein the corresponding software association index represents the degree of association between the corresponding candidate file and the target software; based on the software association index and stability impact index corresponding to each of the multiple candidate files, a cleanup index corresponding to each of the multiple candidate files is determined; based on the cleanup index corresponding to each of the multiple candidate files, a target file to be cleaned is determined from the multiple candidate files, and the target file is cleaned. By first identifying the installation or uninstallation operation of the target software on the terminal device, multiple candidate files related to this operation can be accurately identified. Then, based on terminal data containing target software data, the stability impact index of the candidate files on the device's operational stability is determined. Simultaneously, the degree of correlation between the candidate files and the target software, i.e., the software correlation index, is determined based on the software data. Combining these two indices, the cleaning index of each candidate file is determined. Finally, the files to be cleaned with the highest priority are selected according to the cleaning index for cleaning. This avoids the accidental or missed cleaning of files caused by relying on only a single dimension for judgment, ensuring that file cleaning is more targeted and accurate. It effectively solves the problem of inaccurate file cleaning in related technologies, and thus solves the technical problem of inaccurate file cleaning when cleaning files related to the target software on the terminal device. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of a file cleaning method for a terminal device according to an embodiment of the present invention;

[0018] Figure 2 This is a schematic diagram of the file cleaning system structure of a terminal device in an optional embodiment of the present invention;

[0019] Figure 3 This is a structural block diagram of a file cleaning device for a terminal device according to an embodiment of the present invention. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0022] Example 1

[0023] According to an embodiment of the present invention, an embodiment of a file cleaning method for a terminal device is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0024] Figure 1 This is a flowchart of a file cleaning method for a terminal device according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0025] S102, determine the target operation performed on the target software in the terminal device;

[0026] This involves terminal devices, which are electronic devices that can install and run software, such as mobile phones and computers.

[0027] This involves target software, which is software on the terminal device that requires corresponding file cleanup operations. Specifically, the target software is software used to perform the target operation (installation or uninstallation).

[0028] This involves target operations, which are specific operations performed on the target software, including installation operations that install the target software onto the terminal device and uninstallation operations that remove the target software from the terminal device.

[0029] By clearly defining the target operations performed on the target software in the terminal device, it is possible to avoid analyzing and processing files corresponding to irrelevant operations.

[0030] S104, identify multiple candidate files corresponding to the target operation;

[0031] This involves multiple candidate files, which are a collection of files associated with the target operation performed on the target software.

[0032] By identifying multiple candidate files corresponding to the target operation, the scope of cleanup can be focused, and interference from irrelevant files can be eliminated. This provides a clear analysis object, ensuring that index calculations are more targeted and accurate, and avoiding inaccurate cleanup due to ambiguity in the file range.

[0033] S106, Based on the terminal data of the terminal device, determine the stability impact index corresponding to each of the multiple candidate files, wherein the corresponding stability impact index represents the degree of impact of the corresponding candidate file on the operational stability of the terminal device, and the terminal data includes the software data of the target software;

[0034] This involves terminal data, which comprises all data reflecting the operational status of the terminal device. This includes data related to the target software, as well as various data affecting the stability of the terminal device's operation. For example, this terminal data includes software data of the target software, terminal environment data, and operational security data.

[0035] This includes a stability impact index, which is used to quantify the degree of impact of candidate files on the operational stability of terminal devices, reflecting the risk to the stable operation of terminal devices after the corresponding candidate files are cleaned up.

[0036] This involves software data, which includes various types of data related to the target software, covering the entire lifecycle of the target software from installation to uninstallation, including software installation data, software operation data, software uninstallation data, etc.

[0037] Based on terminal data, the stability impact index corresponding to multiple candidate files is determined, which can quantify the degree of impact of each candidate file on the stability of device operation. This ensures that the system stability risk is fully considered when screening files to be cleaned, and avoids failures caused by accidental deletion of files that affect device operation.

[0038] S108, Based on software data, determine the software correlation index corresponding to multiple candidate files respectively, wherein the corresponding software correlation index represents the degree of correlation between the corresponding candidate file and the target software;

[0039] This includes a software association index, which is an index that quantifies the degree of association between candidate files and target software.

[0040] By determining the software correlation index corresponding to multiple candidate files based on software data, the degree of correlation between each candidate file and the target software can be accurately quantified, ensuring that redundant files that are strongly related to the target software are screened, avoiding the inclusion of irrelevant files in the cleanup scope, and enhancing the targeting of the cleanup.

[0041] S110, based on the software correlation index and stability impact index corresponding to the multiple candidate files respectively, determine the cleanup index corresponding to the multiple candidate files respectively;

[0042] This includes a software association index, which is an indicator that quantifies the degree of association between candidate files and target software, reflecting the probability that a candidate file originates from the target software or is a component of the target software.

[0043] This includes a cleanup index, which is a comprehensive indicator combining the software correlation index and the stability impact index. It is used to determine the cleanup priority of candidate files and reflects whether the corresponding candidate files need to be cleaned up.

[0044] By integrating the software association index, which quantifies the closeness of the association between candidate files and target software, and the stability impact index, which reflects the degree of impact of candidate files on the operational stability of terminal devices, a comprehensive cleanup index can be formed that considers both association attributes and security impact. This ensures that the attribution and association of candidate files are fully considered, as well as the security of cleanup, avoiding incomplete or excessive cleanup caused by a single dimension. It ensures that the cleanup decision takes into account both the accurate screening of redundant files and helps to avoid potential risks to the system stability of terminal devices.

[0045] S112, Based on the cleaning index corresponding to each of the multiple candidate files, determine the target file to be cleaned from the multiple candidate files, and clean the target file.

[0046] This involves target files, which are candidate files selected based on a cleanup index that need to be cleaned. These are redundant files that are closely related to the target software and whose cleanup will have minimal impact on the stability of the terminal device. The target files include candidate files whose cleanup index is greater than a predetermined cleanup threshold.

[0047] By determining the target files to be cleaned based on the cleanup index of multiple candidate files, and then cleaning them, redundant files with high cleanup priority can be screened out using quantitative standards, avoiding the accidental cleanup of critical files or the omission of core remnants, while making the file cleanup process more targeted and efficient.

[0048] Through the above steps S102-S112, the target operation performed on the target software in the terminal device is determined; multiple candidate files corresponding to the target operation are determined; based on the terminal data of the terminal device, a stability impact index corresponding to each of the multiple candidate files is determined, wherein the corresponding stability impact index represents the degree of influence of the corresponding candidate file on the operational stability of the terminal device, and the terminal data includes the software data of the target software; based on the software data, a software association index corresponding to each of the multiple candidate files is determined, wherein the corresponding software association index represents the degree of association between the corresponding candidate file and the target software; based on the software association index and stability impact index corresponding to each of the multiple candidate files, a cleanup index corresponding to each of the multiple candidate files is determined; based on the cleanup index corresponding to each of the multiple candidate files, the target file to be cleaned is determined from the multiple candidate files, and the target file is cleaned. By first identifying the installation or uninstallation operation of the target software on the terminal device, multiple candidate files related to this operation can be accurately identified. Then, based on terminal data containing target software data, the stability impact index of the candidate files on the device's operational stability is determined. Simultaneously, the degree of correlation between the candidate files and the target software, i.e., the software correlation index, is determined based on the software data. Combining these two indices, the cleaning index of each candidate file is determined. Finally, the files to be cleaned with the highest priority are selected according to the cleaning index for cleaning. This avoids the accidental or missed cleaning of files caused by relying on only a single dimension for judgment, ensuring that file cleaning is more targeted and accurate. It effectively solves the problem of inaccurate file cleaning in related technologies, and thus solves the technical problem of inaccurate file cleaning when cleaning files related to the target software on the terminal device.

[0049] As an optional embodiment, determining the software association index corresponding to each of the multiple candidate files based on software data includes: when the software data includes software installation data, determining multiple first predetermined item data based on the software installation data, wherein the multiple first predetermined item data are used to characterize the installation path of the target software; determining the path association index corresponding to each of the multiple candidate files based on the multiple first predetermined item data, wherein the corresponding path association index represents the degree of association between the storage path of the corresponding candidate file and the installation path of the target software; and determining the software association index corresponding to each of the multiple candidate files based on the path association index corresponding to each of the multiple candidate files.

[0050] This includes software installation data, which is data related to the installation process of the target software, including the installation package of the target software.

[0051] This involves multiple first predetermined item data, which are pre-determined data used to characterize the predetermined item corresponding to the target software installation path.

[0052] This includes a path association index, which represents the degree of association between the storage path of the corresponding candidate file and the installation path of the target software.

[0053] Based on software data, by extracting multiple first predetermined items representing the installation path of the target software, accurate basis can be provided for subsequent path association analysis. Based on these data, the path association index between the candidate file and the target software installation path is determined, quantifying the closeness of the path-level association between the two. Then, the software association index is determined based on the path association index to ensure that the software association index can truly reflect the association relationship (such as the attribution relationship) between the file and the target software.

[0054] As an optional embodiment, the software association index corresponding to each of the multiple candidate files is determined based on the path association index corresponding to each of the multiple candidate files, including: determining the environment association index corresponding to each of the multiple candidate files based on software installation data, wherein the corresponding environment association index is used to represent the degree of association between the corresponding candidate file and the operating environment of the target software; and determining the software association index corresponding to each of the multiple candidate files based on the environment association index and the path association index corresponding to each of the multiple candidate files.

[0055] This includes the environmental correlation index, which is an indicator that quantifies the degree of correlation between candidate files and the target software's operating environment, reflecting the relevance of the files to the environment required for the target software to run.

[0056] By determining the environment association index corresponding to multiple candidate files based on software installation data, the degree of association between the files and the target software's operating environment can be quantified. Combined with the path association index, the software association index is determined to ensure that the software association index can more comprehensively and accurately reflect the attribution relationship between the candidate files and the target software.

[0057] As an optional embodiment, based on the environment association index and path association index corresponding to multiple candidate files respectively, a software association index corresponding to each of the multiple candidate files is determined, including: determining the file source identifier corresponding to each of the multiple candidate files; determining the software source identifier corresponding to the target software; determining the identifier association index corresponding to each of the multiple candidate files based on the file source identifier corresponding to each of the multiple candidate files and the software source identifier corresponding to the target software, wherein the corresponding identifier association index represents the degree of association between the file source identifier of the corresponding candidate file and the software source identifier of the target software; and determining the software association index corresponding to each of the multiple candidate files based on the identifier association index, environment association index, and path association index corresponding to each of the multiple candidate files.

[0058] This includes a file source identifier, which is used to identify the source of candidate files.

[0059] This includes a software source identifier, which is used to identify the source of the target software.

[0060] This includes an identifier association index, which represents the degree of association between the file source identifier of the corresponding candidate file and the software source identifier of the target software, in order to quantify the closeness of the association between the file source identifier of the candidate file and the software source identifier of the target software.

[0061] By identifying the source identifiers of multiple candidate files and the source identifier of the target software, a core basis can be provided for determining the source correlation between the two, quantifying the degree of homology between the files and the target software, and then combining the environmental correlation index and the path correlation index to jointly determine the software correlation index. This can enrich the dimensions of correlation determination, make up for the limitations of single-dimensional determination, and ensure that the software correlation index can more comprehensively and accurately determine the correlation relationship (such as attribution relationship) between candidate files and target software.

[0062] As an optional embodiment, determining a stability impact index corresponding to multiple candidate files based on terminal data from a terminal device includes: if the terminal data also includes terminal environment data, determining multiple second predetermined item data based on the terminal environment data and software data, wherein the multiple second predetermined item data are used to characterize the usage intensity of the corresponding candidate file by the terminal device; determining an intensity correlation index corresponding to each of the multiple candidate files based on the multiple second predetermined item data, wherein the corresponding intensity correlation index represents the degree to which the corresponding candidate file is used by the terminal device; and determining a stability impact index corresponding to each of the multiple candidate files based on the intensity correlation index corresponding to each of the multiple candidate files.

[0063] This includes terminal environment data, which is data used to characterize the system operating environment features of terminal devices.

[0064] This involves multiple second-predetermined data items, which are used to characterize the usage intensity of the corresponding candidate file by the terminal device (including reflecting the frequency of the candidate file being used by the terminal device).

[0065] This includes a strength correlation index, which represents the degree to which the corresponding candidate file is used by the terminal device.

[0066] By combining terminal data from terminal devices with terminal environment data and software data to determine multiple second predetermined data that characterize the usage intensity of candidate files, a precise basis for quantifying the degree of file usage can be provided. The intensity correlation index determined based on these data can clearly reflect the usage of files by terminal devices. Then, by determining the stability impact index based on the intensity correlation index, the assessment of the impact of candidate files on the stability of device operation can be made more in line with the actual use scenario, avoiding risk misjudgment caused by ignoring the intensity of use, and ensuring the objectivity and reliability of the stability impact index.

[0067] As an optional embodiment, determining a stability impact index corresponding to each of the multiple candidate files based on the strength correlation indexes corresponding to each candidate file includes: when the terminal data also includes operational security data, determining multiple third predetermined item data based on the operational security data, wherein the multiple third predetermined item data are used to characterize the impact of the corresponding candidate file on the secure operation of the terminal device; determining a security correlation index corresponding to each of the multiple candidate files based on the multiple third predetermined item data, wherein the corresponding security correlation index represents the importance of the corresponding candidate file to the secure operation of the terminal device; and determining a stability impact index corresponding to each of the multiple candidate files based on the security correlation index and the strength correlation index corresponding to each candidate file.

[0068] This includes operational security data, which refers to data related to operational security in the terminal device.

[0069] This involves multiple third-order data items, which are used to characterize the impact of the corresponding candidate files on the secure operation of the terminal equipment (including the degree of impact, the status of impact, etc.).

[0070] This involves a corresponding security correlation index, which is used to characterize the importance of the corresponding candidate file to the secure operation of the terminal device, that is, to quantify the importance of the corresponding candidate file to the secure operation of the terminal device.

[0071] When terminal data includes operational safety data, extracting multiple third-order data representing the impact of candidate files on equipment safe operation from the operational safety data can provide accurate basis for safety correlation analysis. The safety correlation index determined based on these data can quantify the importance of files to equipment safe operation. Combined with the strength correlation index, a stability impact index can be determined. This allows for the assessment of the impact of files on equipment operational stability from both usage dependence and safety risk dimensions, avoiding risk misjudgment caused by single-dimensional assessment and ensuring a more comprehensive and objective stability impact index.

[0072] As an optional embodiment, determining a stability impact index corresponding to multiple candidate files based on terminal data of the terminal device includes: when the target operation is an uninstallation operation that removes the target software from the terminal device, determining multiple fourth predetermined item data based on the terminal data, wherein the multiple fourth predetermined item data are used to characterize the change characteristics of the terminal device's usage time of the corresponding candidate files; determining a time correlation index corresponding to each of the multiple candidate files based on the multiple fourth predetermined item data, wherein the corresponding time correlation index is used to characterize the degree to which the corresponding candidate file is used by the terminal device from a time dimension; and determining a stability impact index corresponding to each of the multiple candidate files based on the time correlation index corresponding to each of the multiple candidate files.

[0073] This includes an uninstallation operation, which is the process of removing the target software from the terminal device.

[0074] This involves multiple fourth-order data items, which are used to characterize the changes in the usage time of the corresponding candidate files by the terminal device (including the patterns of changes in the usage time of the candidate files by the terminal device).

[0075] This includes a time correlation index, which is used to characterize the degree to which the corresponding candidate file is used by the terminal device from a time dimension, so as to reflect the probability that the candidate file is still used after the target software is uninstalled and the residual use value.

[0076] When the target operation is to uninstall the target software, by extracting multiple fourth predetermined data that characterize the changes in the usage time of candidate files from terminal data, we can provide a precise basis for the analysis of usage in the time dimension. The time correlation index determined based on these data can clearly reflect the usage of the file before and after uninstallation. Then, based on the time correlation index, we can determine the stability impact index, which can make the assessment of the impact of candidate files on the stability of device operation more in line with the actual needs of the uninstallation scenario, avoid misjudgment caused by ignoring the residual use value in the time dimension, and ensure that the stability impact index is more scenario-adaptable and reliable.

[0077] Based on the above embodiments and optional embodiments, an optional implementation method is provided, which is described in detail below.

[0078] In related technologies, after software installation or uninstallation is performed on a terminal device, unnecessary files can be cleaned up to free up storage resources and optimize device performance. For example, when installing software, the installation package can be cleaned up; after uninstalling software, residual files can be cleaned up. However, in these technologies, there is a technical problem of inaccurate file cleanup when cleaning up software-related files on the terminal device.

[0079] Specifically, taking computers and mobile phones as examples, the accumulation of software installation packages and residual files is a common problem affecting device performance during computer and mobile phone use. A software installation package is a compressed file containing all the files and installation program required for the software to run. After installation, if not deleted promptly, it will remain in the download folder or a specified storage path as the original files. Residual files are associated files that were not completely removed after software uninstallation, including configuration files, cache data, registry entries, log files, etc. There are three main reasons for this: First, some software uninstallation programs are poorly designed, only deleting the main program file and ignoring auxiliary components; second, when users manually delete software folders, they do not clean up hidden user data directories and registry entries; and third, temporary files and plugin remnants generated during software operation are not automatically destroyed due to system permissions or file association issues.

[0080] Many software programs only remove their core components during uninstallation, failing to completely erase all data. This incomplete cleanup accumulates over time, gradually evolving into a redundant layer deep within the system. This layer eventually fills up storage space, slows down system response, causes program conflicts, and can even lead to system malfunctions due to outdated registry pointers or incomplete dynamic link libraries.

[0081] There is currently no effective solution to the above problems.

[0082] In view of this, an optional embodiment of the present invention provides a file cleaning method for a terminal device, which can effectively solve the above-mentioned technical problems.

[0083] S1, determine the target operation performed on the target software in the terminal device;

[0084] The target operation includes one of the following: installing the target software onto the terminal device, or uninstalling the target software from the terminal device.

[0085] S2, identify multiple candidate files corresponding to the target operation;

[0086] S3, based on the terminal data of the terminal device, determine the stability impact index corresponding to each of the multiple candidate files. The corresponding stability impact index represents the degree of impact of the corresponding candidate file on the operational stability of the terminal device. The terminal data includes the software data of the target software.

[0087] The terminal data includes data covering the entire lifecycle of the target software, from installation to operation to uninstallation.

[0088] Specifically, S3 includes:

[0089] S31, when the terminal data also includes terminal environment data, based on the terminal environment data and software data, a plurality of second predetermined item data are determined, wherein the plurality of second predetermined item data are used to characterize the usage intensity of the corresponding candidate file by the terminal device; based on the plurality of second predetermined item data, a strength correlation index corresponding to the plurality of candidate files is determined, wherein the corresponding strength correlation index represents the degree to which the corresponding candidate file is used by the terminal device.

[0090] Based on multiple second-predetermined terms, determine the strength correlation index corresponding to each of the multiple candidate documents. It can be determined using the following formula:

[0091]

[0092] in, This represents the citation status index (i.e., the strength of association index). Represents the strength of file references. Represents registry reference strength. Represents the service reference strength of the process. Represents the strength of system dependencies. Represents the penalty coefficient for detached files. , , , , Represents weight, and .

[0093] Among them, several second pre-defined items include , , , and .

[0094] S32, if the terminal data also includes operational security data, based on the operational security data, determine multiple third predetermined item data, wherein the multiple third predetermined item data are used to characterize the impact of the corresponding candidate file on the secure operation of the terminal device; based on the multiple third predetermined item data, determine the security correlation index corresponding to each of the multiple candidate files, wherein the corresponding security correlation index indicates the importance of the corresponding candidate file to the secure operation of the terminal device;

[0095] Based on multiple third-party predefined data, security correlation indices corresponding to multiple candidate documents are determined. It can be determined using the following formula:

[0096]

[0097] in, This represents the system security index (i.e., the security correlation index). Represents the location safety factor. Represents the functional safety factor. Represents the signature verification coefficient. Represents the allowed list coefficients. Represents data sensitivity, , , , , Represents weight, and .

[0098] Among them, several third-party pre-defined data include , , , and .

[0099] S33, when the target operation is an uninstallation operation that uninstalls the target software from the terminal device, based on the terminal data, a plurality of fourth predetermined item data are determined, wherein the plurality of fourth predetermined item data are used to characterize the change characteristics of the terminal device’s usage time of the corresponding candidate file; based on the plurality of fourth predetermined item data, time correlation indices corresponding to the plurality of candidate files are determined, wherein the corresponding time correlation indices are used to characterize the degree to which the corresponding candidate file is used by the terminal device from the time dimension.

[0100] Based on data from multiple fourth predefined items, time correlation indices corresponding to multiple candidate documents were determined. It can be determined using the following formula:

[0101]

[0102] in, It represents timeliness (i.e., time-related index). Represents usage activity. Represents the installation time decay coefficient. Represents the baseline coefficient for file types. This represents the uninstallation time penalty coefficient. , , , Represents weight, and .

[0103] Among them, several fourth-order data items include , , ,and .

[0104] S34. Based on the time correlation index, security correlation index and strength correlation index corresponding to multiple candidate files respectively, determine the stability influence index corresponding to each of the multiple candidate files.

[0105] S4. Based on the software data, determine the software association index corresponding to each of the multiple candidate files, where the corresponding software association index represents the degree of association between the corresponding candidate file and the target software.

[0106] Specifically, S4 includes:

[0107] S41, when the software data includes software installation data, based on the software installation data, determine multiple first predetermined item data, wherein the multiple first predetermined item data are used to characterize the installation path of the target software; based on the multiple first predetermined item data, determine the path association index corresponding to the multiple candidate files respectively, wherein the corresponding path association index represents the degree of association between the storage path of the corresponding candidate file and the installation path of the target software.

[0108] Based on multiple first-order data, the path association index corresponding to each of the multiple candidate files can be determined using the following formula:

[0109]

[0110] in, The path structure relevance score (i.e., the path relevance index) is calculated. This indicates the degree of matching between the installation paths. Represents the similarity of directory structures. Represents the degree of naming pattern matching. , , Represents weight, and ;

[0111] Among them, several first-order items include data , and .

[0112] S42, Based on the software installation data, determine the environment correlation index corresponding to each of the multiple candidate files, wherein the corresponding environment correlation index is used to represent the degree of correlation between the corresponding candidate file and the operating environment of the target software;

[0113] The following formula can be used to determine this:

[0114]

[0115] in, The installation context score (i.e., the environment context index) is used to determine the installation context. This indicates the frequency of file paths appearing in the registry. Represents the shortcut's affinity. Represents the correlation between environmental variables. , , Represents weight, and ;

[0116] S43, determine the file source identifier corresponding to each of the multiple candidate files, and determine the software source identifier corresponding to the target software; based on the file source identifiers corresponding to each of the multiple candidate files and the software source identifier corresponding to the target software, determine the identifier association index corresponding to each of the multiple candidate files, wherein the corresponding identifier association index represents the degree of association between the file source identifier of the corresponding candidate file and the software source identifier of the target software;

[0117] Signature and metadata verification score The calculation formula is:

[0118]

[0119] In the formula, Represents the degree of matching of digital signatures. Represents the degree of metadata matching. Represents the degree of hash value matching. , , Represents weight, and .

[0120] Both the file source identifier and the software source identifier include a digital signature, metadata, and a hash value. Based on the file source identifier and the software source identifier, the degree of matching of the digital signature, the degree of matching of the metadata, and the degree of matching of the hash value are determined.

[0121] S44. Based on the identifier association index, environment association index and path association index corresponding to multiple candidate files respectively, determine the software association index corresponding to each of the multiple candidate files.

[0122] The specific formula is as follows:

[0123]

[0124] in, The index represents the attribution association characteristic (i.e., the software association index). Representing the Dimensional correlation score, Representing the The weights of the dimensional correlation scores. Represents the false alarm penalty factor. Represents the positive reward factor. ; Including path structure correlation score Installation context relevance score Runtime behavior correlation score Signature and metadata verification score ;

[0125] Runtime behavior correlation score The calculation formula is:

[0126]

[0127] in, This represents the degree of compatibility between the process and the software. This represents the correlation between file access time and software runtime. This indicates the dependency relationship between the checked file and other software resources. , , Represents weight, and .

[0128] S5. Based on the software correlation index and stability impact index corresponding to the multiple candidate files, determine the cleanup index corresponding to each of the multiple candidate files.

[0129] Specifically, residual files and normal files are distinguished based on the residual coefficient (i.e., the cleanup index). The calculation formula is:

[0130]

[0131] in, The weights representing the attribution association characteristic index. The weights representing the reference state index, Weights representing timeliness The weights represent the system security index.

[0132] S6: Based on the cleaning index corresponding to each of the multiple candidate files, determine the target file to be cleaned from the multiple candidate files, and clean the target file.

[0133] The preferred method for distinguishing between residual files and normal files is as follows:

[0134] when It was determined to be a residual file;

[0135] when It was determined to be a normal file.

[0136] The above steps can be achieved through a software installation package residual file intelligent cleanup system (i.e., a file cleanup system for terminal devices). Figure 2 This is a schematic diagram of the file cleaning system structure of a terminal device in an optional embodiment of the present invention, such as... Figure 2 As shown, it includes a full-link data detection module, a feature analysis module, a residue identification module, a cleaning and optimization module, and an effect verification module;

[0137] The end-to-end data detection module is used to construct data covering the entire lifecycle from installation to operation to uninstallation, providing comprehensive, accurate and traceable basic data support for the entire intelligent cleaning system;

[0138] Full lifecycle data includes software installation data, software operation data, software uninstallation data, and system basic environment data (i.e., terminal environment data).

[0139] Software installation data includes the installation path, a list of created directory files, registry entries, environment variable modification records, and shared component registration information;

[0140] Software runtime data includes cache files, log files, process identifier (ID) and file handle associations, and network cache data generated during runtime;

[0141] Software uninstallation data includes uninstallation program execution logs, deleted files, a list of registry entries, unreleased file handles, and directories that still exist after uninstallation.

[0142] The system's basic environment data includes the system version, the list of installed software, file reference counts, the list of allowed system core files, and the list of currently running processes. The allowed list includes a list of files that are allowed to be accessed, used, modified, or updated. The system core files are files that are related to the stability of the terminal device's operation.

[0143] Software installation data is monitored and obtained through hooking technology; software operation data is obtained by periodically scanning the file system and combining the process enumeration interface (API) to associate process IDs with file handles; software uninstallation data is obtained by parsing the uninstallation program execution logs, using handle query tools to identify unreleased file handles, and locating residual directories by comparing the directory structure before and after uninstallation; system basic environment data is obtained by calling the system information interface, combining the uninstallation entries in the registry to read the list of installed software, and using the built-in list of allowed system core files to complete data collection.

[0144] Software installation data, software operation data, software uninstallation data, and system basic environment data (i.e., terminal environment data) cover all key stages of the software lifecycle, breaking the limitations of data collection at a single stage, avoiding omissions in residual identification due to data fragmentation, ensuring comprehensive capture of key information of residual files, and providing a data foundation for subsequent determination and cleanup of residual files.

[0145] The feature analysis module is used to extract features based on full lifecycle data and calculate the attribution association feature index, reference status index, timeliness, and system security index.

[0146] The formula for calculating the attribution association characteristic index is:

[0147]

[0148] in, Represents the index of attribution association characteristics. Representing the Dimensional correlation score, Representing the The weights of the dimensional correlation scores. Represents the false alarm penalty factor. Represents the positive reward factor. ; Including path structure correlation score Installation context relevance score Runtime behavior correlation score Signature and metadata verification score Attribution-related characteristic index By combining path structure correlation score Installation context relevance score Runtime behavior correlation score Signature and metadata verification score And false alarm penalty factor Positive reward factor It quantifies the strength of the association between the file to be detected and the target software, providing accurate and comprehensive basis for association determination for residual file identification.

[0149] Path structure relevance score The calculation formula is:

[0150]

[0151] in, This indicates the degree of matching between the installation paths. Represents the similarity of directory structures. Represents the degree of naming pattern matching. , , Represents weight, and Path structure relevance score Starting from the static structural features of file paths, the degree of correlation between the file to be detected and the target software at the path level is quantified, reflecting the likelihood that the file to be detected points to the target software through path-related attributes.

[0152] Installation context association score The calculation formula is:

[0153]

[0154] in, This indicates the frequency of file paths appearing in the registry. Represents the shortcut's affinity. Represents the correlation between environmental variables. , , Represents weight, and Installation context relevance score Starting from the indirect association traces formed in the system after software installation, the degree of association between the file to be detected and the target software at the system configuration level is quantified, reflecting the likelihood that the file to be detected points to the target software through system-level configuration association.

[0155] Runtime behavior correlation score The calculation formula is:

[0156]

[0157] in, This represents the degree of compatibility between the process and the software. This represents the correlation between file access time and software runtime. This indicates the dependency relationship between the checked file and other software resources. , , Represents weight, and Runtime behavior correlation score Starting from the dynamic interaction traces during software operation, the degree of correlation between the file to be detected and the target software in real-time running scenarios is quantified, reflecting the likelihood that the file to be detected will point to the target software through runtime behavioral interactions.

[0158] Signature and metadata verification score The calculation formula is:

[0159]

[0160] in, Represents the degree of matching of digital signatures. Represents the degree of metadata matching. Represents the degree of hash value matching. , , Represents weight, and Signature and metadata verification score Starting from the source identification and inherent attribute information of the file, the similarity and authenticity between the file to be detected and the target software are quantified, reflecting the reliability of whether the file to be detected is from the same source as the target software and the original supporting components. This provides strong correlation evidence to compensate for possible defects in the path structure, running behavior, and other dimensions that may have been forged or indirectly related.

[0161] The formula for calculating the reference state index is:

[0162]

[0163] in, Represents the citation state index. Represents the strength of file references. Represents registry reference strength. Represents the service reference strength of the process. Represents the strength of system dependencies. Represents the penalty coefficient for detached files. , , , , Represents weight, and ;

[0164] Reference State Index By quantifying the reference strength and survival value of the file to be tested from the perspective of system resource dependency, it reflects whether the file is depended on by other programs, services or system components in the current system environment, and whether it is a detached file with no related references, ultimately providing a key basis for determining whether the file can be safely cleaned up.

[0165] The formula for calculating timeliness is:

[0166]

[0167] in, Represents timeliness, Represents usage activity. Represents the installation time decay coefficient. Represents the baseline coefficient for file types. This represents the uninstallation time penalty coefficient. , , , Represents weight, and Timeliness By combining multiple dimensions to quantify the redundancy timeliness and the degree of decay of the use value of the files to be tested, it reflects whether the files still have actual use needs in the current system environment, and whether they become redundant residues due to long-term inactivity and strong correlation with uninstallation behavior.

[0168] The formula for calculating the system security index is:

[0169]

[0170] in, Represents the system security index. Represents the location safety factor. Represents the functional safety factor. Represents the signature verification coefficient. Represents the allowed list coefficients. Represents data sensitivity, , , , , Represents weight, and System security index The security risk level of cleaning the file to be detected is quantified from multiple dimensions, reflecting whether cleaning the file will have a negative impact on system stability, functional integrity or data security, and ultimately providing a risk-safe basis for determining whether the residual can be safely cleaned.

[0171] The residual identification module distinguishes between residual files and normal files based on a residual coefficient. The formula for calculating the residual coefficient is as follows:

[0172]

[0173] in, The weights representing the attribution association characteristic index. The weights representing the reference state index, Weights representing timeliness The weights representing the system security index;

[0174] when It was determined to be a residual file;

[0175] when It was determined to be a normal file;

[0176] The residual identification module distinguishes residual files from normal files based on residual coefficients, realizing a comprehensive and collaborative judgment of multi-dimensional features, improving the comprehensiveness and accuracy of residual file cleaning. At the same time, it establishes standardized and quantitative judgment rules through threshold judgment, achieving the dual goals of accurate cleaning and security protection, balancing cleaning effect and system risk.

[0177] The cleaning and optimization module is used to automatically clean up residual files based on the judgment results.

[0178] After the cleanup and optimization module automatically cleans up residual files, the effect verification module retrieves the list of residual files and registry entries identified before cleanup, rescans the corresponding locations in the system, and calculates the cleanup rate by dividing the number of cleaned residual files by the total number of residual files. At the same time, it specifically checks the actual cleanup status of core residual files in the list. If the cleanup rate exceeds the cleanup rate threshold and all core residual files are removed, the cleanup is confirmed to be effective. If the cleanup rate is lower than the cleanup rate threshold, or if the cleanup rate meets the threshold but core residual files are not completely removed, an abnormal alarm is issued.

[0179] The effect verification module accurately quantifies the cleaning effect, ensuring the comprehensiveness and accuracy of residual file cleaning and avoiding incomplete cleaning. At the same time, through core residual special verification and abnormal alarm mechanism, it eliminates system redundancy caused by the omission of key residuals, ensures that the cleaning operation does not cause hidden risks, and realizes a closed loop of the whole process of identification-cleaning-verification-optimization.

[0180] Based on the above, the system first constructs a full-lifecycle data system covering installation, operation, and uninstallation through a full-link data detection module. This includes software installation data, software operation data, software uninstallation data, and system basic environment data. This provides comprehensive, accurate, and traceable foundational data support for the entire intelligent cleanup system, breaking the limitations of single-stage data collection and avoiding omissions in residual file identification due to data fragmentation. It ensures comprehensive capture of key information about residual files, providing a data foundation for subsequent residual file determination and cleanup. Furthermore, the feature analysis module extracts features based on the full lifecycle data, calculating attribution association feature indices, citation status indices, timeliness, and system security indices. Combined with the residual identification module, which distinguishes residual files from normal files based on residual coefficients, this achieves a comprehensive and collaborative determination of multi-dimensional features, improving the comprehensiveness and accuracy of residual file cleanup. Simultaneously, standardized and quantifiable judgment rules are established through threshold determination, achieving the dual goals of accurate cleanup and security protection, balancing cleanup effectiveness and system risk.

[0181] The above optional implementation methods can achieve at least the following beneficial effects:

[0182] (1) Compared with related technologies, the present invention first clarifies the installation or uninstallation operation of the target software in the terminal device, and can accurately locate multiple candidate files related to the operation. Then, based on the terminal data containing the target software data, the stability impact index of the candidate files on the stability of device operation is determined. At the same time, the degree of association between the candidate files and the target software is clarified based on the software data, i.e., the software association index. Combining these two indices, the cleaning index of each candidate file is determined. Finally, the highest priority file to be cleaned is selected according to the cleaning index for cleaning. This can avoid the file mis-cleaning or omission caused by relying on a single dimension for judgment, and ensure that the file cleaning is more targeted and accurate. It effectively solves the problem of inaccurate file cleaning in related technologies, and thus solves the technical problem of inaccurate file cleaning when cleaning files related to the target software of the terminal device in related technologies.

[0183] (2) Compared with related technologies, the present invention is based on software data. By extracting multiple first predetermined items of data that characterize the installation path of the target software, it can provide accurate basis for subsequent path association analysis. Based on these data, the path association index between the candidate file and the installation path of the target software is determined, the closeness of the path-level association between the two is quantified, and then the software association index is determined based on the path association index to ensure that the software association index can truly reflect the ownership relationship between the file and the target software.

[0184] (3) Compared with related technologies, the present invention determines multiple second predetermined data that characterize the usage intensity of candidate files by combining terminal data and software data based on terminal data of terminal devices. This provides a precise basis for quantifying the degree of file usage. The intensity correlation index determined based on these data can clearly reflect the usage of files by terminal devices. Then, the stability impact index is determined based on the intensity correlation index, which makes the impact assessment of candidate files on the stability of device operation more in line with the actual use scenario, avoids risk misjudgment caused by ignoring the usage intensity, and ensures the objectivity and reliability of the stability impact index.

[0185] (4) Compared with related technologies, the present invention can provide a precise basis for the analysis of the degree of use in the time dimension by extracting multiple fourth predetermined items of data that characterize the changes in the usage time of candidate files from terminal data when the target operation is to uninstall the target software. The time correlation index determined based on these data can clearly reflect the usage of the file before and after uninstallation. Then, the stability impact index is determined based on the time correlation index, which can make the assessment of the impact of candidate files on the stability of device operation more in line with the actual needs of the uninstallation scenario, avoid misjudgment caused by ignoring the residual use value in the time dimension, and ensure that the stability impact index is more adaptable to the scenario and more reliable.

[0186] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0187] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0188] Example 2

[0189] According to embodiments of the present invention, an apparatus for implementing the file cleaning method for the terminal device described above is also provided. Figure 3 This is a structural block diagram of a file cleaning device for a terminal device according to an embodiment of the present invention, such as... Figure 3 As shown, the device includes: a first determining module 302, a second determining module 304, a third determining module 306, a fourth determining module 308, a fifth determining module 310, and a sixth determining module 312. The device will be described in detail below.

[0190] The first determining module 302 is used to determine the target operation performed on the target software in the terminal device; the second determining module 304, connected to the first determining module 302, is used to determine multiple candidate files corresponding to the target operation; the third determining module 306, connected to the second determining module 304, is used to determine the stability impact index corresponding to each of the multiple candidate files based on the terminal data of the terminal device, wherein the corresponding stability impact index represents the degree of influence of the corresponding candidate file on the operational stability of the terminal device, and the terminal data includes the software data of the target software; the fourth determining module 308, connected to the third determining module 306, is used to determine the software association index corresponding to each of the multiple candidate files based on the software association index and stability impact index corresponding to each of the multiple candidate files, wherein the corresponding software association index represents the degree of association between the corresponding candidate file and the target software; the fifth determining module 310, connected to the fourth determining module 308, is used to determine the cleanup index corresponding to each of the multiple candidate files based on the software association index and stability impact index corresponding to each of the multiple candidate files; the sixth determining module 312, connected to the fifth determining module 310, is used to determine the target file to be cleaned from the multiple candidate files based on the cleanup index corresponding to each of the multiple candidate files, and clean the target file.

[0191] It should be noted that the first determining module 302, the second determining module 304, the third determining module 306, the fourth determining module 308, the fifth determining module 310 and the sixth determining module 312 mentioned above correspond to steps S102 to S112 in the file cleaning method for implementing terminal devices. The instances and application scenarios implemented by multiple modules and their corresponding steps are the same, but are not limited to the content disclosed in the above embodiment 1.

[0192] Example 3

[0193] According to another aspect of the present invention, an electronic device is also provided, comprising: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute instructions to implement the file cleaning method of the terminal device described above.

[0194] Example 4

[0195] According to another aspect of the present invention, a computer-readable storage medium is also provided, which, when the instructions in the computer-readable storage medium are executed by the processor of an electronic device, enables the electronic device to perform the file cleaning method of any of the above-described terminal devices.

[0196] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0197] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0198] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0199] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0200] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0201] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0202] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for cleaning up files on a terminal device, characterized in that, include: Determine the target operation performed on the target software in the terminal device; Identify multiple candidate files corresponding to the target operation; Based on the terminal data of the terminal device, a stability impact index corresponding to each of the plurality of candidate files is determined, wherein the corresponding stability impact index represents the degree of influence of the corresponding candidate file on the operational stability of the terminal device, and the terminal data includes the software data of the target software; Based on the software data, a software association index corresponding to each of the multiple candidate files is determined, wherein the corresponding software association index represents the degree of association between the corresponding candidate file and the target software; Based on the software association index and stability impact index corresponding to the multiple candidate files, a cleanup index corresponding to each of the multiple candidate files is determined. Based on the cleaning index corresponding to each of the multiple candidate files, a target file to be cleaned is determined from the multiple candidate files, and the target file is cleaned.

2. The method according to claim 1, characterized in that, The step of determining the software association index corresponding to each of the plurality of candidate files based on the software data includes: When the software data includes software installation data, a plurality of first predetermined item data are determined based on the software installation data, wherein the plurality of first predetermined item data are used to characterize the installation path of the target software; Based on the multiple first predetermined item data, a path association index corresponding to each of the multiple candidate files is determined, wherein the corresponding path association index represents the degree of association between the storage path of the corresponding candidate file and the installation path of the target software; Based on the path association index corresponding to each of the multiple candidate files, a software association index corresponding to each of the multiple candidate files is determined.

3. The method according to claim 2, characterized in that, The step of determining the software association index corresponding to each of the multiple candidate files based on the path association index corresponding to each of the multiple candidate files includes: Based on the software installation data, an environment correlation index is determined for each of the multiple candidate files, wherein the corresponding environment correlation index is used to represent the degree of correlation between the corresponding candidate file and the operating environment of the target software; Based on the environmental correlation index and path correlation index corresponding to the multiple candidate files, the software correlation index corresponding to the multiple candidate files is determined.

4. The method according to claim 3, characterized in that, The step of determining the software association index corresponding to each of the multiple candidate files based on the environment association index and path association index respectively includes: Determine the file source identifiers corresponding to the plurality of candidate files respectively; Determine the software source identifier corresponding to the target software; Based on the file source identifiers corresponding to the multiple candidate files and the software source identifier corresponding to the target software, an identifier association index is determined for each of the multiple candidate files. The corresponding identifier association index represents the degree of association between the file source identifier of the corresponding candidate file and the software source identifier of the target software. Based on the identifier association index, environment association index and path association index corresponding to the multiple candidate files respectively, the software association index corresponding to the multiple candidate files is determined.

5. The method according to claim 1, characterized in that, The step of determining the stability impact index corresponding to each of the plurality of candidate files based on the terminal data of the terminal device includes: If the terminal data also includes terminal environment data, a plurality of second predetermined item data are determined based on the terminal environment data and the software data, wherein the plurality of second predetermined item data are used to characterize the usage intensity of the corresponding candidate file by the terminal device; Based on the multiple second predetermined item data, a strength correlation index corresponding to each of the multiple candidate files is determined, and the corresponding strength correlation index indicates the degree to which the corresponding candidate file is used by the terminal device. Based on the strength correlation index corresponding to each of the multiple candidate files, a stability influence index corresponding to each of the multiple candidate files is determined.

6. The method according to claim 5, characterized in that, The step of determining the stable influence index corresponding to each of the multiple candidate files based on the strength correlation indexes corresponding to each candidate file includes: If the terminal data also includes operational security data, a plurality of third predetermined item data are determined based on the operational security data, wherein the plurality of third predetermined item data are used to characterize the impact of the corresponding candidate file on the secure operation of the terminal device; Based on the multiple third-predetermined data, a security association index corresponding to each of the multiple candidate files is determined, wherein the corresponding security association index represents the importance of the corresponding candidate file to the secure operation of the terminal device; Based on the security correlation index and strength correlation index corresponding to the multiple candidate files, a stability influence index corresponding to each of the multiple candidate files is determined.

7. The method according to any one of claims 1 to 6, characterized in that, The step of determining the stability impact index corresponding to each of the plurality of candidate files based on the terminal data of the terminal device includes: In the case where the target operation is an uninstallation operation that removes the target software from the terminal device, a plurality of fourth predetermined item data are determined based on the terminal data, wherein the plurality of fourth predetermined item data are used to characterize the change characteristics of the terminal device's usage time of the corresponding candidate file; Based on the multiple fourth predetermined item data, a time correlation index corresponding to each of the multiple candidate files is determined, wherein the corresponding time correlation index is used to characterize the degree to which the corresponding candidate file is used by the terminal device from a time dimension; Based on the time correlation index corresponding to each of the multiple candidate files, a stability influence index corresponding to each of the multiple candidate files is determined.

8. A file cleaning device for a terminal device, characterized in that, include: The first determining module is used to determine the target operation performed on the target software in the terminal device; The second determining module is used to determine multiple candidate files corresponding to the target operation; The third determining module is used to determine the stability impact index corresponding to each of the plurality of candidate files based on the terminal data of the terminal device, wherein the corresponding stability impact index represents the degree of influence of the corresponding candidate file on the operational stability of the terminal device, and the terminal data includes the software data of the target software; The fourth determining module is used to determine, based on the software data, a software association index corresponding to each of the plurality of candidate files, wherein the corresponding software association index represents the degree of association between the corresponding candidate file and the target software; The fifth determining module is used to determine the cleanup index corresponding to each of the multiple candidate files based on the software correlation index and stability impact index corresponding to each of the multiple candidate files respectively; The sixth determining module is used to determine the target file to be cleaned from the multiple candidate files based on the cleaning index corresponding to each of the multiple candidate files, and to clean the target file.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the file cleaning method of the terminal device as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the file cleaning method of the terminal device as described in any one of claims 1 to 7.