[go: up one dir, main page]

CN106201601B - A kind of file clean-up method, electronic equipment and server - Google Patents

A kind of file clean-up method, electronic equipment and server Download PDF

Info

Publication number
CN106201601B
CN106201601B CN201610512757.8A CN201610512757A CN106201601B CN 106201601 B CN106201601 B CN 106201601B CN 201610512757 A CN201610512757 A CN 201610512757A CN 106201601 B CN106201601 B CN 106201601B
Authority
CN
China
Prior art keywords
cleaning
application program
information
electronic equipment
prune policies
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610512757.8A
Other languages
Chinese (zh)
Other versions
CN106201601A (en
Inventor
陈耀攀
李富钦
朱江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 360 Zhiling Technology Co ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201610512757.8A priority Critical patent/CN106201601B/en
Publication of CN106201601A publication Critical patent/CN106201601A/en
Application granted granted Critical
Publication of CN106201601B publication Critical patent/CN106201601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明涉及计算机领域,公开了一种文件清理方法、电子设备及服务器,由此解决了现有技术中针对应用程序的清理策略控制不够精确的技术问题,该该方法包括:从服务器获取针对第一应用程序进行清理的第一清理策略,所述第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;判断所述第一清理策略的清理优先级是否高于默认清理策略的清理优先级;若是,通过所述第一清理策略对所述第一应用程序进行清理;若否,通过所述默认清理策略对所述第一应用程序进行清理。达到了对清理策略控制更加精确的技术效果。

The invention relates to the field of computers, and discloses a file cleaning method, an electronic device and a server, thereby solving the technical problem of inaccurate control of a cleaning strategy for an application program in the prior art. A first cleaning strategy for cleaning an application, the first cleaning strategy is determined based on the installation location of the first application on the electronic device; determining whether the cleaning priority of the first cleaning strategy is higher than the default cleaning strategy the cleaning priority; if yes, the first application is cleaned up through the first cleaning strategy; if not, the first application is cleaned up through the default cleaning strategy. A more precise technical effect of controlling the cleaning strategy is achieved.

Description

一种文件清理方法、电子设备及服务器A file cleaning method, electronic device and server

技术领域technical field

本发明涉及计算机领域,尤其涉及一种文件清理方法、电子设备及服务器。The invention relates to the field of computers, in particular to a file cleaning method, an electronic device and a server.

背景技术Background technique

随着科学技术的不断发展,电子技术也得到了飞速的发展,电子产品的种类也越来越多,人们也享受到了科技发展带来的各种便利。现在人们可以通过各种类型的移动终端,享受随着科技发展带来的舒适生活。例如,智能手机、平板电脑等移动终端已经成为人们生活中一个重要的组成部分,用户可以使用智能手机、平板电脑等移动终端来听音乐、玩游戏等等,以减轻现代快节奏生活所带来的压力。With the continuous development of science and technology, electronic technology has also developed rapidly, and there are more and more types of electronic products. People also enjoy various conveniences brought by the development of science and technology. Now people can enjoy the comfortable life brought by the development of science and technology through various types of mobile terminals. For example, mobile terminals such as smartphones and tablet computers have become an important part of people's lives. Users can use mobile terminals such as smartphones and tablet computers to listen to music, play games, etc., so as to alleviate the problems brought by modern fast-paced life pressure.

通常情况下,电子设备上可以安装多种应用程序,而由于电子设备的存储空间有限,故而需要对电子设备上所安装的应用程序进行清理,现有技术中针对应用程序进行清理的策略往往写死在应用程序上,只能按照单一的清理策略对应用程序进行清理,故而无法实现精确的控制。Usually, a variety of application programs can be installed on an electronic device, and due to the limited storage space of the electronic device, it is necessary to clean up the application programs installed on the electronic device. The strategy for cleaning up the application programs in the prior art often writes Dead on the application, the application can only be cleaned according to a single cleaning strategy, so precise control cannot be achieved.

发明内容SUMMARY OF THE INVENTION

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的文件清理方法、电子设备及服务器。In view of the above problems, the present invention is proposed to provide a file cleaning method, electronic device and server that overcome the above problems or at least partially solve the above problems.

第一方面,本发明实施例提供一种文件清理方法,包括:In a first aspect, an embodiment of the present invention provides a file cleaning method, including:

从服务器获取针对第一应用程序进行清理的第一清理策略,所述第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;obtaining a first cleaning strategy for cleaning a first application from a server, where the first cleaning strategy is determined based on an installation location of the first application on the electronic device;

判断所述第一清理策略的清理优先级是否高于默认清理策略的清理优先级;Determine whether the cleaning priority of the first cleaning strategy is higher than the cleaning priority of the default cleaning strategy;

若是,通过所述第一清理策略对所述第一应用程序进行清理;If so, clean up the first application through the first cleanup strategy;

若否,通过所述默认清理策略对所述第一应用程序进行清理。If not, the first application is cleaned up through the default cleaning policy.

可选的,所述方法还包括:Optionally, the method further includes:

获得所述服务器发送至的所述第一清理策略的所述清理优先级,其中,所述服务器基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述清理优先级。Obtain the cleaning priority of the first cleaning strategy sent by the server, wherein the server is based on cleaning results of cleaning the first applications on each electronic device through the first cleaning strategy The report information determines the cleaning priority.

可选的,所述清理结果报告信息包括:误删信息和/或漏删信息。Optionally, the cleaning result report information includes: mistakenly deleted information and/or omitted deletion information.

可选的,所述误删信息包括:误删的概率信息和误删的文件类型信息中的至少一种信息;Optionally, the erroneous deletion information includes: at least one information in the probability information of erroneous deletion and the file type information of erroneous deletion;

所述漏删信息包括:漏删的概率信息、漏删的文件数量、存在漏删的电子设备数量中的至少一种信息。The omission and deletion information includes at least one kind of information among probability information of omission and deletion, number of files that are omitted to be deleted, and number of electronic devices that have been omitted to be deleted.

可选的,在所述从服务器获取针对第一应用程序的第一清理策略之前,所述方法还包括:Optionally, before acquiring the first cleaning policy for the first application from the server, the method further includes:

将所述第一应用程序的安装位置信息发送至所述服务器。Sending the installation location information of the first application to the server.

可选的,所述方法还包括:Optionally, the method further includes:

检测所述第一应用程序在所述电子设备上的PE可移植的可执行文件;Detecting the PE-portable executable file of the first application on the electronic device;

将所述PE可移植的可执行文件所在位置确定为所述安装位置。The location where the PE portable executable file is located is determined as the installation location.

可选的,所述通过所述第一清理策略对所述第一应用程序进行清理,包括:Optionally, the cleaning of the first application by using the first cleaning strategy includes:

基于在所述电子设备上安装所述第一应用程序时所生成的文件的快照确定出对所述第一应用程序进行清理的待清理文件集合;determining a set of files to be cleaned for cleaning the first application based on the snapshot of the file generated when the first application is installed on the electronic device;

对所述待清理文件集合基于所述第一清理策略进行清理。The set of files to be cleaned is cleaned based on the first cleaning policy.

可选的,所述方法还包括:Optionally, the method further includes:

获得服务器为所述第一应用程序确定的用于提供给用户的标签信息,所述标签信息用于基于所述第一应用程序在M个电子设备上的相关数据信息确定,M为正整数。The tag information determined by the server for the first application and used for providing the user is obtained, where the tag information is determined based on the related data information of the first application on M electronic devices, where M is a positive integer.

第二方面,本发明实施例提供一种文件清理方法,包括:In a second aspect, an embodiment of the present invention provides a file cleaning method, including:

获取第一应用程序在电子设备上的安装位置;obtaining the installation location of the first application on the electronic device;

通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略;determining a first cleaning strategy for cleaning the first application on the electronic device according to the installation location;

将所述第一清理策略发送至所述电子设备,以使所述电子设备基于所述第一清理策略和所述第一应用程序的默认清理策略对所述第一应用程序进行清理。Sending the first cleanup policy to the electronic device, so that the electronic device cleans up the first application based on the first cleanup policy and a default cleanup policy of the first application.

可选的,所述通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略,包括:Optionally, the determining the first cleaning strategy for cleaning the first application on the electronic device according to the installation location includes:

通过所述第一应用程序的PE可移植的可执行文件确定出所述第一应用程序的标识信息;Determine the identification information of the first application program through the PE portable executable file of the first application program;

通过所述标识信息和所述安装位置在清理策略集合中查找以获得所述第一清理策略。The first cleaning strategy is obtained by searching in the cleaning strategy set by using the identification information and the installation location.

可选的,所述通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略,包括:Optionally, the determining the first cleaning strategy for cleaning the first application on the electronic device according to the installation location includes:

判断所述安装位置是否位于预定安装位置;judging whether the installation position is located at a predetermined installation position;

如果所述安装位置位于所述预定安装位置,所确定出的所述第一清理策略为针对第一类文件进行清理的清理策略;If the installation location is located at the predetermined installation location, the determined first cleaning strategy is a cleaning strategy for cleaning the first type of files;

如果所述安装位置不位于所述预定安装位置,所确定出的所述第一清理策略为针对第二类文件进行清理的清理策略,所述第一类文件与所述第二类文件不完全相同。If the installation location is not located in the predetermined installation location, the determined first cleaning strategy is a cleaning strategy for cleaning a second type of file, and the first type of file and the second type of file are incomplete same.

可选的,所述方法还包括:Optionally, the method further includes:

从M个电子设备分别获得所述第一应用程序的相关数据信息,M为正整数;Respectively obtain relevant data information of the first application program from M electronic devices, where M is a positive integer;

基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息。Tag information of the first application for providing to the user is determined based on the relevant data information obtained from the M electronic devices.

可选的,所述基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息,包括:Optionally, the determining, based on the relevant data information obtained from the M electronic devices, the tag information of the first application for providing to the user, including:

从所述M个电子设备所获得的所述相关数据信息中确定出所述第一应用程序在所述M个电子设备上的程序行为数据和/或所述M个电子设备的用户针对所述第一应用程序所产生的用户行为数据;From the relevant data information obtained by the M electronic devices, it is determined that the program behavior data of the first application on the M electronic devices and/or the user of the M electronic devices is directed to the M electronic devices. User behavior data generated by the first application;

基于所述程序行为数据和/或所述用户行为数据确定出所述标签信息。The tag information is determined based on the program behavior data and/or the user behavior data.

可选的,所述方法还包括:Optionally, the method further includes:

将所述第一清理策略所对应的清理优先级发送至所述电子设备,以使所述电子设备基于所述清理优先级和所述默认清理策略的默认优先级从所述第一清理策略和所述默认清理策略中择一对所述第一应用程序进行清理。Sending the cleaning priority corresponding to the first cleaning strategy to the electronic device, so that the electronic device can retrieve the cleaning priority from the first cleaning strategy and the default cleaning strategy based on the cleaning priority and the default priority of the default cleaning strategy. A pair of the first application program is selected from the default cleaning strategy for cleaning.

可选的,所述方法还包括:Optionally, the method further includes:

基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级。The cleaning priority of the first cleaning strategy is determined based on the cleaning result report information of cleaning the first application program on each electronic device by the first cleaning strategy.

可选的,所述基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级,包括:Optionally, determining the cleaning priority of the first cleaning strategy based on cleaning result report information of cleaning the first application program on each electronic device through the first cleaning strategy, including:

获得所述第一清理策略的预设优先级;obtaining the preset priority of the first cleaning strategy;

基于所述清理结果报告信息对所述预设优先级进行调整,从而获得所述第一清理策略的所述清理优先级。The preset priority is adjusted based on the cleaning result report information, so as to obtain the cleaning priority of the first cleaning policy.

第三方面,本发明实施例提供一种电子设备,包括:In a third aspect, an embodiment of the present invention provides an electronic device, including:

第一获取模块,用于从服务器获取针对第一应用程序进行清理的第一清理策略,所述第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;a first obtaining module, configured to obtain a first cleaning strategy for cleaning a first application from a server, where the first cleaning strategy is determined based on an installation location of the first application on the electronic device;

判断模块,用于判断所述第一清理策略的清理优先级是否高于默认清理策略的清理优先级;a judging module for judging whether the cleaning priority of the first cleaning strategy is higher than the cleaning priority of the default cleaning strategy;

第一清理模块,用于若是,通过所述第一清理策略对所述第一应用程序进行清理;a first cleaning module, configured to clean up the first application program through the first cleaning strategy;

第二清理模块,用于若否,通过所述默认清理策略对所述第一应用程序进行清理。The second cleaning module is configured to, if not, clean up the first application program by using the default cleaning policy.

可选的,所述电子设备还包括:Optionally, the electronic device further includes:

第一获得模块,用于获得所述服务器发送至的所述第一清理策略的所述清理优先级,其中,所述服务器基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述清理优先级。A first obtaining module, configured to obtain the cleaning priority of the first cleaning policy sent by the server, wherein the server determines the first cleaning policy on each electronic device based on the first cleaning policy. The cleaning priority is determined by the cleaning result report information of the cleaning performed by the application.

可选的,所述清理结果报告信息包括:误删信息和/或漏删信息。Optionally, the cleaning result report information includes: mistakenly deleted information and/or omitted deletion information.

可选的,所述误删信息包括:误删的概率信息和误删的文件类型信息中的至少一种信息;Optionally, the erroneous deletion information includes: at least one information in the probability information of erroneous deletion and the file type information of erroneous deletion;

所述漏删信息包括:漏删的概率信息、漏删的文件数量、存在漏删的电子设备数量中的至少一种信息。The omission and deletion information includes at least one kind of information among probability information of omission and deletion, number of files that are omitted to be deleted, and number of electronic devices that have been omitted to be deleted.

可选的,所述电子设备还包括:Optionally, the electronic device further includes:

第一发送模块,用于将所述第一应用程序的安装位置信息发送至所述服务器。A first sending module, configured to send the installation location information of the first application to the server.

可选的,所述电子设备还包括:Optionally, the electronic device further includes:

检测模块,用于检测所述第一应用程序在所述电子设备上的PE可移植的可执行文件;a detection module, configured to detect the PE-portable executable file of the first application on the electronic device;

第一确定模块,用于将所述PE可移植的可执行文件所在位置确定为所述安装位置。The first determining module is configured to determine the location where the PE portable executable file is located as the installation location.

可选的,所述第一清理模块,包括:Optionally, the first cleaning module includes:

第一确定单元,用于基于在所述电子设备上安装所述第一应用程序时所生成的文件的快照确定出对所述第一应用程序进行清理的待清理文件集合;a first determining unit, configured to determine a set of files to be cleaned for cleaning the first application based on a snapshot of a file generated when the first application is installed on the electronic device;

清理单元,用于对所述待清理文件集合基于所述第一清理策略进行清理。A cleaning unit, configured to clean up the set of files to be cleaned based on the first cleaning policy.

可选的,所述电子设备还包括:Optionally, the electronic device further includes:

第二获得模块,用于获得服务器为所述第一应用程序确定的用于提供给用户的标签信息,所述标签信息用于基于所述第一应用程序在M个电子设备上的相关数据信息确定,M为正整数。The second obtaining module is configured to obtain the tag information determined by the server for the first application and provided to the user, where the tag information is used based on the related data information of the first application on M electronic devices OK, M is a positive integer.

第四方面,本发明实施例提供一种服务器,包括:In a fourth aspect, an embodiment of the present invention provides a server, including:

第二获取模块,用于获取第一应用程序在电子设备上的安装位置;a second obtaining module, configured to obtain the installation position of the first application on the electronic device;

第二确定模块,用于通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略;a second determining module, configured to determine, by using the installation location, a first cleaning strategy for cleaning the first application on the electronic device;

第二发送模块,用于将所述第一清理策略发送至所述电子设备,以使所述电子设备基于所述第一清理策略和所述第一应用程序的默认清理策略对所述第一应用程序进行清理。A second sending module, configured to send the first cleanup policy to the electronic device, so that the electronic device sends the first cleanup policy to the first cleanup policy based on the first cleanup policy and the default cleanup policy of the first application application to clean up.

可选的,所述第二确定模块,包括:Optionally, the second determining module includes:

第二确定单元,用于通过所述第一应用程序的PE可移植的可执行文件确定出所述第一应用程序的标识信息;a second determining unit, configured to determine the identification information of the first application program through the PE portable executable file of the first application program;

查找单元,用于通过所述标识信息和所述安装位置在清理策略集合中查找以获得所述第一清理策略。A searching unit, configured to search in the cleaning policy set by using the identification information and the installation location to obtain the first cleaning policy.

可选的,所述第二确定模块,包括:Optionally, the second determining module includes:

判断单元,用于判断所述安装位置是否位于预定安装位置;a judging unit for judging whether the installation position is located at a predetermined installation position;

第三确定单元,用于如果所述安装位置位于所述预定安装位置,所确定出的所述第一清理策略为针对第一类文件进行清理的清理策略;a third determining unit, configured to, if the installation location is located at the predetermined installation location, the determined first cleaning strategy is a cleaning strategy for cleaning the first type of files;

第四确定单元,用于如果所述安装位置不位于所述预定安装位置,所确定出的所述第一清理策略为针对第二类文件进行清理的清理策略,所述第一类文件与所述第二类文件不完全相同。The fourth determining unit is configured to, if the installation location is not located in the predetermined installation location, the determined first cleaning strategy is a cleaning strategy for cleaning the second type of files, the first type of files and the The documents of the second type are not identical.

可选的,所述服务器还包括:Optionally, the server further includes:

第三获得模块,用于从M个电子设备分别获得所述第一应用程序的相关数据信息,M为正整数;a third obtaining module, configured to obtain the relevant data information of the first application program from M electronic devices respectively, where M is a positive integer;

第三确定模块,用于基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息。A third determining module is configured to determine, based on the relevant data information obtained from the M electronic devices, the tag information of the first application program for providing to the user.

可选的,所述第三确定模块,包括:Optionally, the third determining module includes:

第五确定单元,用于从所述M个电子设备所获得的所述相关数据信息中确定出所述第一应用程序在所述M个电子设备上的程序行为数据和/或所述M个电子设备的用户针对所述第一应用程序所产生的用户行为数据;A fifth determining unit, configured to determine, from the relevant data information obtained by the M electronic devices, the program behavior data of the first application on the M electronic devices and/or the M electronic devices User behavior data generated by the user of the electronic device for the first application;

第六确定单元,用于基于所述程序行为数据和/或所述用户行为数据确定出所述标签信息。A sixth determining unit, configured to determine the tag information based on the program behavior data and/or the user behavior data.

可选的,所述服务器还包括:Optionally, the server further includes:

第三发送模块,用于将所述第一清理策略所对应的清理优先级发送至所述电子设备,以使所述电子设备基于所述清理优先级和所述默认清理策略的默认优先级从所述第一清理策略和所述默认清理策略中择一对所述第一应用程序进行清理。a third sending module, configured to send the cleaning priority corresponding to the first cleaning strategy to the electronic device, so that the electronic device can send the cleaning priority from the A pair of the first cleaning strategy and the default cleaning strategy is selected for cleaning the first application.

可选的,所述服务器还包括:Optionally, the server further includes:

第四确定模块,用于基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级。The fourth determining module is configured to determine the cleaning priority of the first cleaning strategy based on the cleaning result report information of cleaning the first application program on each electronic device through the first cleaning strategy.

可选的,所述第四确定模块,包括:Optionally, the fourth determining module includes:

获得单元,用于获得所述第一清理策略的预设优先级;an obtaining unit, configured to obtain the preset priority of the first cleaning strategy;

调整单元,用于基于所述清理结果报告信息对所述预设优先级进行调整,从而获得所述第一清理策略的所述清理优先级。An adjustment unit, configured to adjust the preset priority based on the cleaning result report information, so as to obtain the cleaning priority of the first cleaning strategy.

本申请实施例中提供的技术方案,至少具有如下技术效果或优点:The technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

由于在本发明实施例中,在对第一应用程序进行清理时,可以获得两套清理策略,分别为:从服务器获得的第一清理策略以及电子设备的默认清理策略,第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;然后可以基于第一清理策略的清理优先级和默认清理策略的清理优先级,从中选择出一种清理策略对第一应用程序进行清理,也即是说,并非单纯通过第一应用程序的默认清理策略对第一应用程序进行清理,而是提供多种清理策略进行选择,故而达到了对清理策略控制更加精确的技术效果。Because in this embodiment of the present invention, when cleaning the first application, two sets of cleaning policies can be obtained, namely: the first cleaning policy obtained from the server and the default cleaning policy of the electronic device. The first cleaning policy is based on the The installation location of the first application on the electronic device is determined; then a cleaning strategy may be selected from the cleaning priority of the first cleaning strategy and the cleaning priority of the default cleaning strategy to clean the first application, and the That is to say, instead of simply cleaning the first application program through the default cleaning strategy of the first application program, multiple cleaning strategies are provided for selection, thus achieving the technical effect of more precise control of the cleaning strategy.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be considered limiting of the invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:

图1示出了本发明第一方面的一种文件清理方法的流程图;Fig. 1 shows a flow chart of a file cleaning method according to the first aspect of the present invention;

图2示出了本发明第二方面的一种文件清理方法的流程图;Fig. 2 shows a flow chart of a file cleaning method according to the second aspect of the present invention;

图3示出了本发明第三方面的电子设备的结构图;Fig. 3 shows the structure diagram of the electronic device of the third aspect of the present invention;

图4示出了本发明第四方面的服务器的结构图。FIG. 4 shows a structural diagram of a server according to the fourth aspect of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.

本发明实施例提供了一种文件清理方法、电子设备及服务器,用以解决现有技术中针对应用程序的清理策略控制不够精确的技术问题。The embodiments of the present invention provide a file cleaning method, an electronic device and a server, which are used to solve the technical problem that the cleaning policy control for an application program in the prior art is not precise enough.

本申请实施例中的技术方案为解决上述技术问题总体思路如下:The general idea of the technical solutions in the embodiments of the present application for solving the above-mentioned technical problems is as follows:

在对第一应用程序进行清理时,可以获得两套清理策略,分别为:从服务器获得的第一清理策略以及电子设备的默认清理策略,第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;然后可以基于第一清理策略的清理优先级和默认清理策略的清理优先级,从中选择出一种清理策略对第一应用程序进行清理,也即是说,并非单纯通过第一应用程序的默认清理策略对第一应用程序进行清理,而是提供多种清理策略进行选择,故而达到了对清理策略控制更加精确的技术效果。When cleaning the first application, two sets of cleaning policies can be obtained, which are: the first cleaning policy obtained from the server and the default cleaning policy of the electronic device. The first cleaning policy is based on the first application in the electronic device. The installation location on the application is determined; then a cleaning strategy can be selected to clean the first application based on the cleaning priority of the first cleaning strategy and the cleaning priority of the default cleaning strategy. The default cleaning strategy of an application cleans the first application, but provides multiple cleaning strategies for selection, thus achieving the technical effect of more precise control of the cleaning strategy.

第一方面,本发明实施例提供一种文件清理方法,请参考图1,包括:In a first aspect, an embodiment of the present invention provides a file cleaning method, please refer to FIG. 1 , including:

步骤S101:从服务器获取针对第一应用程序进行清理的第一清理策略,所述第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;Step S101: Acquire a first cleaning strategy for cleaning a first application from a server, where the first cleaning strategy is determined based on an installation location of the first application on an electronic device;

步骤S102:判断所述第一清理策略的清理优先级是否高于默认清理策略的清理优先级;Step S102: judging whether the cleaning priority of the first cleaning strategy is higher than the cleaning priority of the default cleaning strategy;

步骤S103:若是,通过所述第一清理策略对所述第一应用程序进行清理;Step S103: if yes, clean up the first application program through the first cleaning strategy;

步骤S104:若否,通过所述默认清理策略对所述第一应用程序进行清理。Step S104: If no, clean up the first application program through the default cleanup policy.

举例来说,该方案应用于电子设备中,该电子设备例如为:手机、平板电脑、笔记本电脑等等。For example, the solution is applied to an electronic device, such as a mobile phone, a tablet computer, a notebook computer, and the like.

该方案可以应用于单个应用程序的清理过程中,例如:用户希望卸载电子设备上所安装的浏览器A,则可以先选择浏览器A,然后执行清理操作(例如:点击清理按钮、产生清理手势等等),则第一应用程序可以为浏览器A,后续可以通过步骤S101~步骤S104实现对浏览器A的清理;该方案也可以应用多个应用程序的清理过程中,例如:用户通过电子设备所携带的应用程序管理软件扫描出电子设备上所安装的应用程序,然后从中选择部分应用程序(例如:浏览器A、音乐播放器B、微博C等等),接着执行清理操作,则用户所选择出的应用程序可以分别作为第一应用程序,后续可以通过步骤S101~S104所提供的方案分别确定出针对用户所选择出的各个应用程序进行清理。This solution can be applied to the cleaning process of a single application. For example, if the user wants to uninstall the browser A installed on the electronic device, he can first select the browser A, and then perform the cleaning operation (for example, click the cleaning button, generate the cleaning gesture etc.), then the first application can be browser A, and the subsequent steps S101 to S104 can be used to clean up browser A; this solution can also be applied to the cleaning process of multiple applications, for example: the user The application management software carried by the device scans out the applications installed on the electronic device, and then selects some applications (for example: browser A, music player B, microblog C, etc.), and then performs the cleaning operation, then The application programs selected by the user may be respectively used as the first application programs, and subsequently, it may be determined through the solutions provided in steps S101 to S104 that each application program selected by the user should be cleaned up.

步骤S101中,可以通过以下步骤获得第一应用程序在电子设备上的安装位置:查找所述第一应用程序在所述电子设备上的PE(Portable Executable:可移植的可执行)文件;将所述PE文件所在位置作为所述第一应用程序的所述安装位置。In step S101, the installation location of the first application on the electronic device can be obtained through the following steps: searching for a PE (Portable Executable: Portable Executable) file of the first application on the electronic device; The location where the PE file is located is used as the installation location of the first application.

举例来说,可以通过注册表Uninstall项或开机启动项等位置查找第一应用程序的PE文件,进而获取第一应用程序的安装位置及对应的PE文件;或者通过桌面快捷方式,开始菜单快捷方式、计划任务、服务项等常用入口查找第一应用程序的PE文件,进而获取第一应用程序的安装位置及PE文件等等,当然,还可以通过其他方式获取第一应用程序的安装位置,本发明实施例不再详细列举,并且不作限制。For example, the PE file of the first application can be searched through the registry Uninstall item or the startup item, etc., and then the installation location of the first application and the corresponding PE file can be obtained; or through the desktop shortcut, the start menu shortcut , scheduled tasks, service items and other common entrances to find the PE file of the first application, and then obtain the installation location and PE file of the first application, etc. Of course, the installation location of the first application can also be obtained in other ways. The embodiments of the invention are not listed in detail and are not limited.

PE文件通常为操作系统上的程序文件,例如:EXE(executable program:可执行)文件、DLL(Dynamic Link Library:动态链接库)文件、OCX(Object Linking andEmbedding:对象类别扩充组件)文件、SYS(SYSTEM:系统)文件、COM(Component ObjectModel:组件对象模型)文件等等。PE files are usually program files on the operating system, such as: EXE (executable program: executable) files, DLL (Dynamic Link Library: Dynamic Link Library) files, OCX (Object Linking and Embedding: Object Class Expansion Components) files, SYS ( SYSTEM: System) file, COM (Component ObjectModel: Component Object Model) file and so on.

PE文件可以包括以下一种或多种信息:消息摘要信息(例如:MD5信息)、图标信息、签名信息、文件大小、创建时间、访问时间、修改时间、版本号、是否捆绑别的应用程序、是否存在流氓行为(例如:锁定主页、弹出广告、后台执行各种不合法操作等等)。在确定出第一应用程序的安装位置之后,可以将第一应用程序的安装位置信息直接发送至服务器;电子设备也可以将第一应用程序的安装位置和PE文件生成日志文件,然后将日志文件发送至到服务器,服务器在接收到该日志文件之后,从该日志文件中提取出第一应用程序的安装位置信息。PE files can include one or more of the following information: message digest information (for example: MD5 information), icon information, signature information, file size, creation time, access time, modification time, version number, whether to bundle other applications, Whether there is rogue behavior (for example: locking the home page, popping up advertisements, performing various illegal operations in the background, etc.). After the installation location of the first application is determined, the installation location information of the first application can be directly sent to the server; the electronic device can also generate a log file from the installation location of the first application and the PE file, and then the log file It is sent to the server, and after receiving the log file, the server extracts the installation location information of the first application program from the log file.

在具体实施过程中,服务器可以预先存储有针对各个应用程序进行清理的清理策略集合,该清理策略集合可以为数据库,也可以为对应关系列表,该清理策略集合中包含有至少一个应用程序以及其对应的清理策略,可以通过每个应用程序的程序名或者其他参数(例如:图标编号、版本号等)以及应用程序的安装位置在在该清理策略集合中查找到对应应用程序的清理策略。In the specific implementation process, the server may pre-store a cleaning strategy set for cleaning each application. The cleaning strategy set may be a database or a corresponding relationship list, and the cleaning strategy set includes at least one application and its For the corresponding cleaning strategy, the cleaning strategy of the corresponding application can be found in the cleaning strategy set through the program name of each application or other parameters (eg icon number, version number, etc.) and the installation location of the application.

又或者,可以首先通过每个应用程序的程序名或者其他参数(例如:图标编号、版本号等)在该清理策略集合中查找获得对应应用程序所包含的所有清理策略,然后通过该应用程序的安装位置在应用程序的所有清理策略中查找获得对应的应用程序的清理策略。Alternatively, all the cleaning strategies included in the corresponding application can be obtained by searching the cleaning strategy set through the program name or other parameters (for example: icon number, version number, etc.) of each application, and then The installation location looks for the cleaning strategy of the corresponding application in all cleaning strategies of the application.

而作为一种可选的实施例,服务器可以通过以下方式确定出第一应用程序所对应的第一清理策略:通过所述第一应用程序的PE可移植的可执行文件确定出所述第一应用程序的标识信息;通过所述标识信息和所述安装位置在清理策略集合中查找以获得所述第一清理策略。As an optional embodiment, the server may determine the first cleanup policy corresponding to the first application in the following manner: Determine the first cleanup policy by using the PE portable executable file of the first application. The identification information of the application; the first cleaning strategy is obtained by searching the cleaning policy set through the identification information and the installation location.

举例来说,有些应用程序可能安装于不同的电子设备时,其程序名称或者其他参数(例如:图标编号、版本号等等)可能会发生变化,故而导致可能无法准确在清理策略库中查找获得对应的清理策略,因此可以首先通过第一应用程序的PE文件准确的确定出第一应用程序的标识信息(该标识信息用于唯一标识第一应用程序),然后再通过该标识信息和安装位置在清理策略集合中查找获得对应的清理策略。其中,可以通过标识信息和安装位置同时在清理策略集合中进行匹配,进而获得标识信息和安装位置都匹配的清理策略作为第一应用程序所对应的第一清理策略;也可以先通过标识信息在清理策略集合中进行查找获得该标识信息所对应的所有清理策略,然后通过安装位置在该标识信息所对应的所有清理策略中查找获得与安装位置对应的第一清理策略。For example, when some applications may be installed on different electronic devices, their program names or other parameters (such as icon number, version number, etc.) may change, so it may not be possible to accurately find the cleaning strategy library. Corresponding cleaning strategy, therefore can first accurately determine the identification information of the first application through the PE file of the first application (the identification information is used to uniquely identify the first application), and then pass the identification information and the installation location. Find the corresponding cleaning strategy in the cleaning strategy collection. Wherein, the identification information and the installation location can be matched in the cleaning strategy set at the same time, and then the cleaning strategy that matches both the identification information and the installation location can be obtained as the first cleaning strategy corresponding to the first application; Search in the cleaning strategy set to obtain all cleaning strategies corresponding to the identification information, and then search for the first cleaning strategy corresponding to the installation location from all cleaning strategies corresponding to the identification information through the installation location.

其中,可以通过第一应用程序的程序名称、图标信息、签名信息、文件大小等信息来确定出第一应用程序的标识信息,例如,有些应用程序其图标信息不会发生变化,则可以设置一个图标信息所对应的图标标识库;有些应用程序其签名信息不会发生变化,则可以设置一个签名信息对应的签名标识库等等,有些应用程序其程序名称+文件大小能够唯一表征该应用程序,则可以设置一个程序名称+文件大小所对应的标识库等等,然后通过第一应用程序的各个参数在各个标识库中进行查找,例如:通过第一应用程序的图标信息在图标标识库中进行查找,如果查找到对应的标识信息,则将查找到的标识信息作为第一应用程序的标识信息,停止继续查找;如果查找不到对应的标识信息,则通过第一应用程序的签名信息在签名标识库中继续查找,直至查找到第一应用程序的标识信息位置。Wherein, the identification information of the first application can be determined by the program name, icon information, signature information, file size and other information of the first application. For example, if the icon information of some applications will not change, an The icon identification library corresponding to the icon information; for some applications whose signature information will not change, you can set a signature identification library corresponding to the signature information, etc. For some applications, the program name + file size can uniquely characterize the application. Then you can set a program name + the corresponding identification library of the file size, etc., and then search in each identification library through the parameters of the first application, for example: use the icon information of the first application in the icon identification library. Search, if the corresponding identification information is found, then the found identification information is used as the identification information of the first application, and the search is stopped; if the corresponding identification information cannot be found, the signature information of the first application is used to sign the Continue searching in the identification library until the identification information location of the first application program is found.

由于在上述方案中,可以通过第一应用程序的标识信息唯一的标识第一应用程序,因此能够更加精确的查找到第一应用程序所对应的第一清理策略。Since in the above solution, the first application program can be uniquely identified by the identification information of the first application program, the first cleaning policy corresponding to the first application program can be found more accurately.

步骤S102中,举例来说,可以设置默认清理策略的清理优先级为一固定值(例如:1、2等等),而针对基于安装位置所确定出的第一清理策略,其清理优先级则处于可调状态。举例来说,服务器可以基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述清理优先级。In step S102, for example, the cleaning priority of the default cleaning strategy can be set to a fixed value (for example: 1, 2, etc.), and for the first cleaning strategy determined based on the installation location, the cleaning priority is in an adjustable state. For example, the server may determine the cleaning priority based on the cleaning result report information of cleaning the first application program on each electronic device through the first cleaning policy.

在具体实施过程中,清理结果报告信息可以包含多种信息,下面列举其中的两种进行介绍,当然,在具体实施过程中,不限于以下两种情况,另外,在不冲突的情况下,以下两种情况可以组合使用。In the specific implementation process, the cleaning result report information may contain a variety of information, two of which are listed below for introduction. Of course, in the specific implementation process, it is not limited to the following two situations. In addition, in the case of no conflict, the following Both cases can be used in combination.

第一种,所述清理结果报告信息包括:误删信息。First, the cleaning result report information includes: mistakenly deleted information.

在具体实施过程中,可以首先确定出多台实验用于的电子设备,这些电子设备上安装有第一应用程序,服务器可以将第一清理策略分配给这些电子设备,然后由这些电子设备通过第一清理策略对第一应用程序进行清理,在清理结束之后,通过专业人员判断在对第一应用程序进行清理时,是否存在误删情况,如果存在误删情况,则上报至服务器,由服务器基于误删情况确定出误删信息,该该误删信息例如包括:误删的概率信息和误删的文件类型信息中的至少一种信息,误删的概率信息可以通过清理出现误删的电子设备数量除以总电子设备数量获得;误删的文件类型例如包括:系统文件、非系统文件等等,通过误删的文件类型可以确定出误删的严重程度,如果误删的文件类型包括系统文件,则可以确定出其严重程度较高,如果不包含系统文件,则说明误删的严重程度较低等等。In the specific implementation process, a plurality of electronic devices used for the experiment can be determined first, and the first application program is installed on these electronic devices. The server can assign the first cleaning strategy to these electronic devices, and then these electronic devices pass the first A cleaning strategy cleans the first application. After the cleaning is completed, a professional judges whether there is an accidental deletion when cleaning the first application. If there is an accidental deletion, it is reported to the server, and the server based on the The accidental deletion situation determines the accidental deletion information, and the accidental deletion information includes, for example, at least one of the probability information of the accidental deletion and the file type information of the accidental deletion. Divide the number by the total number of electronic devices; for example, the types of files deleted by mistake include: system files, non-system files, etc. The severity of the accidental deletion can be determined by the type of files deleted by mistake. If the type of files accidentally deleted includes system files , it can be determined that its severity is high, if it does not contain system files, it means that the severity of accidental deletion is low, and so on.

第二种,所述清理结果报告信息包括:漏删信息。Second, the cleaning result report information includes: omission and deletion information.

举例来说,漏删信息例如包括:漏删的概率信息、漏删的文件数量、存在漏删的电子设备数量中的至少一种信息。漏删的概率信息包括:存在漏删的电子设备的比例信息、漏删的文件的比例信息等等,存在漏删的电子设备的可以通过存在漏删的电子设备数量除以电子设备总数量获得,漏删的文件的比例信息可以通过漏删的文件数量除以总文件数量(例如:被删除的文件数量与漏删的文件数量之和)获得。For example, the missing deletion information includes, for example, at least one type of information among: probability information of missing deletion, number of files missing to be deleted, and number of electronic devices with missing deletion. The probability information of missing deletions includes: information on the proportion of electronic devices that are missing to be deleted, the proportion of files that are missing to be deleted, etc. The number of electronic devices that are missing to be deleted can be obtained by dividing the number of missing electronic devices by the total number of electronic devices. , the information on the proportion of missing files can be obtained by dividing the number of missing files by the total number of files (for example: the sum of the number of deleted files and the number of missing files).

作为一种可选的实施例,服务器可以通过以下方式获得第一清理策略所对应的清理优先级:获得所述第一清理策略的预设优先级;基于所述清理结果报告信息对所述预设优先级进行调整,从而获得所述第一清理策略的所述清理优先级。As an optional embodiment, the server may obtain the cleaning priority corresponding to the first cleaning strategy in the following manner: obtaining the preset priority of the first cleaning strategy; The priority is set for adjustment, so as to obtain the cleaning priority of the first cleaning strategy.

举例来说,针对基于安装位置所确定的第一清理策略,可以为其设置一个默认的预设优先级(例如:2、1.5等等),然后基于清理结果报告信息对预设优先级进行调整,从而获得第一清理策略的清理优先级。For example, for the first cleaning strategy determined based on the installation location, a default preset priority (for example: 2, 1.5, etc.) can be set for it, and then the preset priority can be adjusted based on the cleaning result report information , so as to obtain the cleaning priority of the first cleaning strategy.

例如,如果不存在误删信息,则在基于误删信息对预设优先级进行调整时,可以保持其不变;如果存在误删信息,则可以视误删的概率信息或者文件类型信息对其进行调整,例如:如果误删的概率较高,则较大幅度降低对应的清理优先级,如果误删的概率较低,则较小幅度的降低对应的清理优先级;如果误删的文件包含系统文件,则较大幅度的降低其对应的清理优先级,如果误删的文件不包含系统文件,则较小幅度的降低其对应清理优先级等等。For example, if there is no accidental deletion information, the preset priority can be kept unchanged when the preset priority is adjusted based on the accidental deletion information; Adjust, for example: if the probability of accidental deletion is high, the corresponding cleaning priority will be greatly reduced; if the probability of accidental deletion is low, the corresponding cleaning priority will be reduced slightly; if the mistakenly deleted file contains If the deleted file does not contain system files, the corresponding cleaning priority will be reduced to a lesser extent, and so on.

基于漏删信息对清理优先级的调整方式与基于误删信息对其调整的方式类似。例如:如果漏删的概率信息为0%,则不改变该清理优先级;如果0%<漏删的概率信息≤10%,则可以将该预设优先级降低一个梯度(例如:降低0.5);如果10%<清理全面率≤20%,则可以将该预设优先级降低两个梯度(例如:降低2*0.5)以此类推。The adjustment method of the cleaning priority based on the missing deletion information is similar to the adjustment method based on the mistaken deletion information. For example: if the probability information of missing deletion is 0%, the cleaning priority will not be changed; if 0% < probability information of missing deletion ≤ 10%, the preset priority can be reduced by a gradient (for example: reduce by 0.5) ; If 10%<cleaning comprehensive rate≤20%, the preset priority can be reduced by two gradients (for example: reduce by 2*0.5) and so on.

步骤S103中,如果比较出第一清理策略的清理优先级高于默认清理策略的清理优先级的话,可以通过以下步骤实现对电子设备上的第一应用程序的清理:基于在所述电子设备上安装所述第一应用程序时所生成的文件的快照确定出对所述第一应用程序进行清理时的待清理文件集合;对所述待清理文件集合中与所述第一清理策略所对应的文件类型进行清理。In step S103, if it is compared that the cleaning priority of the first cleaning strategy is higher than the cleaning priority of the default cleaning strategy, the cleaning of the first application on the electronic device can be realized by the following steps: A snapshot of files generated when the first application is installed determines a set of files to be cleaned when cleaning the first application; File types are cleaned up.

举例来说,通常情况下,在第一应用程序安装时,可以通过电子设备的工具生成对应的快照,快照中包含安装第一应用程序时生成了哪些文件,以及这些文件所在的位置,从快照中可以直接提取出所生成的文件,这些生成的文件即构成待清理文件集合,其中,可以在第一应用程序安装之后就通过快照获得对应的待清理文件,也可以在对第一应用程序进行清理时,基于快照获得对应的待清理文件,本发明实施例不作限制。例如,安装360安全浏览器,它会把产生如下文件:For example, under normal circumstances, when the first application is installed, a corresponding snapshot can be generated by a tool of the electronic device, and the snapshot includes which files are generated when the first application is installed, and the location of these files, from the snapshot The generated files can be directly extracted from the file, and these generated files constitute a set of files to be cleaned, wherein the corresponding files to be cleaned can be obtained through snapshots after the first application is installed, or the first application can be cleaned , the corresponding file to be cleaned is obtained based on the snapshot, which is not limited in this embodiment of the present invention. For example, install the 360 security browser, it will generate the following files:

%AppData%\360se6\%AppData%\360se6\

%Desktop%\360安全浏览器.lnk%Desktop%\360 Safe Browser.lnk

HKEY_CURRENT_USER\Software\360\360se6HKEY_CURRENT_USER\Software\360\360se6

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\360se6HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\360se6

等。Wait.

在获得待清理文件之后,就可以通过第一清理策略对第一应用程序进行清理。After obtaining the file to be cleaned up, the first application program can be cleaned up through the first cleaning strategy.

针对上面的360安全浏览器我们可以基于其快照以及第一清理策略,确定出需要删除一下内容:For the above 360 security browser, we can determine the following content to be deleted based on its snapshot and the first cleaning strategy:

删除文件夹:%AppData%\360se6\Delete folder: %AppData%\360se6\

删除文件:%Desktop%\360安全浏览器.lnkDeleted file: %Desktop%\360 Safe Browser.lnk

删除注册表:Delete the registry:

HKEY_CURRENT_USER\Software\360\360se6HKEY_CURRENT_USER\Software\360\360se6

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\360se6HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\360se6

等。Wait.

作为一种可选的实施例,在基于第一清理策略对第一应用程序清理完后,还可以增加反查机制,根据删除的文件和文件夹在电子设备上一些常用位置进行反查。例如:对电子设备上的桌面快捷方式、开始菜单快捷方式、注册表中服务项、开机启动项、CLSID、AppPath、Uninstall项等进行反查,如果它这些位置指向的PE文件所在位置,是我们要删除的文件或者文件夹,则将这些位置的快捷方式和注册表项删除,还给用户一个干净的系统。As an optional embodiment, after the first application is cleaned up based on the first cleaning policy, a reverse check mechanism may be added to perform reverse check at some common locations on the electronic device according to deleted files and folders. For example: check the desktop shortcuts, start menu shortcuts, service items in the registry, startup items, CLSID, AppPath, Uninstall items, etc. on the electronic device. If it points to the location of the PE file, it is our To delete files or folders, the shortcuts and registry entries for those locations are deleted, and the user is given a clean system.

步骤S104中,如果第一清理策略的清理优先级不高于默认清理策略的清理优先级的话,则可以通过默认清理策略对第一应用程序进行清理。默认清理策略是指在早期针对应用程序生成的清理规则(例如:在安装应用程序时生成的清理规则),根据应用程序安装和时生成的文件和注册表生成的删除对应的文件、文件夹、注册表、服务项等的写死的本地库规则。每一个软件对应一个相应的库。每一个软件有一个唯一的软件ID,每个软件ID对应唯一的清理规则。即一个软件对应本地唯一的一个清理规则。它一般和软件安装在正常的路径下差别不大,只是规则写的比较复杂,把所有的文件和子文件夹和注册表项都包含在内,并且通常情况下,默认清理策略没有反查机制。In step S104, if the cleaning priority of the first cleaning strategy is not higher than the cleaning priority of the default cleaning strategy, the first application may be cleaned up through the default cleaning strategy. The default cleanup policy refers to the cleanup rules generated for the application in the early stage (for example: the cleanup rules generated when the application is installed), and the corresponding files, folders, Hard-coded native library rules for registry, service items, etc. Each software corresponds to a corresponding library. Each software has a unique software ID, and each software ID corresponds to a unique cleaning rule. That is, a software corresponds to a local only cleaning rule. It is generally not much different from the software installed in the normal path, but the rules are more complicated to write, including all files, subfolders and registry entries, and usually, the default cleanup policy does not have an anti-check mechanism.

作为一种可选的实施例,所述方法还包括:获得服务器为所述第一应用程序确定的用于提供给用户的标签信息,所述标签信息用于基于所述第一应用程序在M个电子设备上的所述PE可移植的可执行文件确定,M为正整数。As an optional embodiment, the method further includes: obtaining tag information determined by the server for the first application and used for providing the user to the user, where the tag information is used to The PE portable executable file on each electronic device is determined, and M is a positive integer.

在上述方案中,可以通过PE文件为第一应用程序确定出标签信息,而不是采用默认的标签信息,故而达到了所确定出的第一应用程序的标签信息更加精确的技术效果。In the above solution, the label information can be determined for the first application program through the PE file instead of using the default label information, thus achieving the technical effect that the determined label information of the first application program is more accurate.

在具体实施过程中,在通过PE文件确定出第一应用程序的标签信息时,可以采用多种参数,下面列举其中的两种进行介绍,当然,在具体实施过程中,不限于以下两种情况,另外,在不冲突的情况下,以下两种情况可以组合使用。In the specific implementation process, when determining the label information of the first application program through the PE file, a variety of parameters can be used, two of which are listed below for introduction, of course, in the specific implementation process, it is not limited to the following two situations , in addition, the following two cases can be used in combination without conflict.

第一种,所述标签信息通过以下方式获得:从所述第一应用程序在M个电子设备上的所述PE可移植的可执行文件中确定出所述第一应用程序在所述M个电子设备上的程序行为数据;通过程序行为数据确定出所述标签信息。First, the label information is obtained by: determining from the PE portable executable files of the first application on M electronic devices that the first application is in the M electronic devices The program behavior data on the electronic device; the label information is determined through the program behavior data.

举例来说,服务器可以通过分析第一应用程序在各个电子设备上的PE文件确定出第一应用程序在各个电子设备上的程序行为数据,该程序行为数据例如包括:是否捆绑有其他应用程序、是否在后台偷偷运行、是否存在其他流氓行为(例如:软件自启、偷跑流量等等),针对各个程序行为可以对应不同的标签信息,例如:如果第一应用程序捆绑由其他应用程序,则其对应的标签信息例如为:捆绑插件;如果第一应用程序在后台偷偷运行,则对应的标签信息例如为:后台运行;如果第一应用程序存在自启情况,则其标签信息例如为:软件自启,如果第一应用程序存在偷跑流量情况,则其标签信息例如为:偷跑流量等等。其中,针对每一种程序行为服务器都可以获得其对应的标签信息,然后将其发送至电子设备;因为显示标签信息的区域有限,故而也可以针对每种标签信息统计其对应的程序行为出现次数,然后基于出现次数从高到低对各个标签信息进行排序,最后获取排序位于前几位(例如:2位、3位等等)的标签信息,并将其提供给电子设备。For example, the server can determine the program behavior data of the first application program on each electronic device by analyzing the PE file of the first application program on each electronic device, and the program behavior data includes, for example: whether other application programs are bundled, Whether it is running secretly in the background, and whether there are other rogue behaviors (for example: software self-starting, stealing traffic, etc.), different label information can be corresponding to each program behavior, for example: if the first application is bundled with other applications, then The corresponding label information is, for example, a bundled plug-in; if the first application runs secretly in the background, the corresponding label information is, for example, running in the background; if the first application is self-starting, the label information is, for example: software Self-starting, if there is a situation of stealing traffic in the first application, the label information thereof is, for example, stealing traffic and so on. Among them, the server can obtain the corresponding label information for each type of program behavior, and then send it to the electronic device; because the area for displaying the label information is limited, the number of occurrences of the corresponding program behavior can also be counted for each type of label information. , and then sort each tag information from high to low based on the number of occurrences, and finally obtain the tag information that is ranked in the first few digits (for example: 2 digits, 3 digits, etc.), and provide it to the electronic device.

基于上述方案,达到了可以基于第一应用程序的程序行为数据确定出第一应用程序的标签信息的技术效果,因此可以通过第一应用程序的标签信息对第一应用程序在电子设备上的行为进行提示。Based on the above solution, the technical effect of determining the label information of the first application program based on the program behavior data of the first application program is achieved. Therefore, the behavior of the first application program on the electronic device can be determined by the label information of the first application program. prompt.

第二种,从所述第一应用程序在M个电子设备上的所述PE可移植的可执行文件中确定出所述M个电子设备的用户针对所述第一应用程序所产生的用户行为数据;基于所述用户行为数据确定出所述标签信息。The second is to determine, from the PE portable executable files of the first application on the M electronic devices, the user behaviors generated by the users of the M electronic devices for the first application data; the tag information is determined based on the user behavior data.

举例来说,用户行为数据例如包括:最后使用时间、使用次数、安装时间等等。该标签信息可以直接为用户行为数据,例如:最后使用时间为3天前、用户共使用5次、安装时间为1个月前等等;该标签信息也可以为基于用户行为数据所确定的其他标签信息,例如:如果最后使用时间距离当前时间大于预设时间值(例如:半个月、1个月等等),则可以确定出标签信息为“用户很久没有使用”,又例如,如果用户使用次数小于预设次数(例如:3次、5次等等),则可以确定出标签信息为“用户很少使用”等等。For example, the user behavior data includes, for example, the last usage time, the number of usage times, the installation time, and the like. The label information can be directly the user behavior data, for example: the last use time is 3 days ago, the user has used it 5 times in total, the installation time is 1 month ago, etc.; the label information can also be other data determined based on the user behavior data Label information, for example: if the last used time is greater than the preset time value from the current time (for example: half a month, 1 month, etc.), it can be determined that the label information is "the user has not used it for a long time", for example, if the user If the number of times of use is less than the preset number of times (for example: 3 times, 5 times, etc.), it can be determined that the tag information is "the user rarely uses" and so on.

基于上述方案,达到了可以基于用户针对第一应用程序的用户行为数据确定出第一应用程序的标签信息的技术效果,因此可以通过第一应用程序的标签信息对用户对其的使用情况进行提示。Based on the above solution, the technical effect of determining the label information of the first application program based on the user behavior data of the user for the first application program is achieved, so the user can be prompted for the usage of the first application program through the label information of the first application program. .

另外,在具体实施过程中,还可以基于PE文件产生针对是否对第一应用程序进行清理的提示信息,例如,可以通过PE文件判断第一应用程序是否存在流氓行为(例如:捆绑软件、软件自启、弹出广告、偷跑流量等等),如果存在这些流氓行为的话,则可以产生建议清理第一应用程序的提示信息,该提示信息例如为“第一应用程序对设备存在不利影响,建议立刻卸载”;又或者,可以通过用户针对第一应用程序的情况来判断是否清理第一应用程序,例如:可以判断用户上次使用第一应用程序的使用时间距离当前时间是否大于预设时间值(例如:半个月、1个月等等),如果大于预设时间值,则产生建议删除第一应用程序的提示信息,该提示信息例如为“用户很久没有使用该应用程序,建议删除”,又例如,判断用户使用第一应用程序的使用次数是否小于预设次数(例如:3次、5次等等),如果小于,则产生建议清理第一应用程序的提示信息,该提示信息例如为“用户很少使用该应用程序,建议清理该应用程序”等等,当然,该提示信息还可以为其他提示信息,也可以基于其他原则产生,本发明实施例不再详细列举,并且不作限制。In addition, in the specific implementation process, prompt information for whether to clean up the first application program can also be generated based on the PE file. For example, whether the first application program has rogue behavior (for example, bundled software, software self-assembly, etc.) can be determined through the PE file. startup, pop-up ads, stealing traffic, etc.), if there are these rogue behaviors, a prompt message suggesting cleaning the first application can be generated, for example, "The first application has adverse effects on the device, it is recommended to immediately Alternatively, it can be judged whether to clean up the first application program by the user's situation of the first application program, for example: it can be judged whether the usage time of the user's last use of the first application program is greater than the current time from the current time value ( For example: half a month, 1 month, etc.), if it is greater than the preset time value, a prompt message for recommending to delete the first application is generated. For another example, determine whether the number of times the user uses the first application is less than a preset number of times (for example: 3 times, 5 times, etc.), if it is less than, then generate a prompt message suggesting cleaning the first application program, the prompt information is, for example, "The user rarely uses the application, it is recommended to clean the application", etc. Of course, the prompt information can also be other prompt information, and can also be generated based on other principles, which are not listed in detail in this embodiment of the present invention, and are not limited.

第二方面,基于同一发明构思,本发明实施例提供一种文件清理方法,请参考图2,包括:In the second aspect, based on the same inventive concept, an embodiment of the present invention provides a file cleaning method, please refer to FIG. 2 , including:

步骤S201:获取第一应用程序在电子设备上的安装位置;Step S201: obtaining the installation location of the first application on the electronic device;

步骤S202:通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略;Step S202: determining a first cleaning strategy for cleaning the first application on the electronic device through the installation location;

步骤S203:将所述第一清理策略发送至所述电子设备,以使所述电子设备基于所述第一清理策略和所述第一应用程序的默认清理策略对所述第一应用程序进行清理。Step S203: Send the first cleanup policy to the electronic device, so that the electronic device cleans up the first application based on the first cleanup policy and the default cleanup policy of the first application .

步骤S201中,所述通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略,包括:通过所述第一应用程序的PE可移植的可执行文件确定出所述第一应用程序的标识信息;通过所述标识信息和所述安装位置在清理策略集合中查找以获得所述第一清理策略。In step S201, the determining the first cleaning strategy for cleaning the first application on the electronic device according to the installation location includes: using a PE portable executable of the first application. The identification information of the first application program is determined from the file; the identification information and the installation location are searched in the cleaning strategy set to obtain the first cleaning strategy.

步骤S202中,在基于安装位置确定出第一清理策略时,可以采用多种方式,下面列举其中的两种进行介绍,当然,在具体实施过程中,不限于以下两种情况。In step S202, when the first cleaning strategy is determined based on the installation location, various methods can be used, two of which are listed below for introduction. Of course, in the specific implementation process, it is not limited to the following two situations.

第一种,所述基于所述安装位置从所述清理策略集合中查找获得所述第一清理策略,包括:判断所述安装位置是否位于预定安装位置;如果所述安装位置位于所述预定安装位置,所确定出的所述第一清理策略为针对第一类文件进行清理的清理策略;如果所述安装位置不位于所述预定安装位置,所确定出的所述第一清理策略为针对第二类文件进行清理的清理策略,所述第一类文件与所述第二类文件不完全相同。First, the searching and obtaining the first cleaning policy from the cleaning policy set based on the installation location includes: judging whether the installation location is located in a predetermined installation location; if the installation location is located in the predetermined installation location location, the determined first cleaning strategy is a cleaning strategy for cleaning the first type of files; if the installation location is not located in the predetermined installation location, the determined first cleaning strategy is for the first cleaning strategy. A cleaning strategy for cleaning up two types of files, the first type of files and the second type of files are not exactly the same.

举例来说,该预定安装位置例如包括:系统关键的安装位置,例如:系统根目录、Program Files根目录、Programs Files(x86)根目录等等。安装在这些目录下的文件,如果清理策略不合适的话,往往会导致删除系统文件,导致系统出现故障,故而为了防止这种情况,可以针对第一应用程序是否安装于预定安装位置,采取不同的第一清理策略。For example, the predetermined installation location includes, for example, a system-critical installation location, such as a system root directory, a Program Files root directory, a Programs Files (x86) root directory, and the like. The files installed in these directories, if the cleaning strategy is not appropriate, will often lead to deletion of system files, resulting in system failure. Therefore, in order to prevent this situation, different measures can be taken according to whether the first application is installed in the predetermined installation location. First cleanup strategy.

其中,在针对应用程序进行清理时,其清理策略例如包括:删除指定文件夹、删除指定文件、删除注册表、删除驱动、删除服务项、删除输入法等等。进而在具体实施过程中,第一类文件例如包括:单个文件、文件夹、注册表、驱动、服务项、输入法等等;第二类文件例如包括:驱动、服务项、输入法等等,其中,第一类文件与第二类文件中至少有部分文件不同,例如:所包含的文件不同、所包含的文件夹不同等等。Wherein, when cleaning up an application, the cleaning strategy includes, for example, deleting a specified folder, deleting a specified file, deleting the registry, deleting a driver, deleting a service item, deleting an input method, and so on. Further in the specific implementation process, the first type of files, for example, includes: a single file, a folder, a registry, a driver, a service item, an input method, etc.; the second type of file, for example, includes: a driver, a service item, an input method, etc., Among them, at least some of the files in the first type of files and the second type of files are different, for example, the included files are different, the included folders are different, and so on.

举例来说,如果应用程序安装时安装于自己的目录(也就是说并未安装于预定安装位置),例如:浏览器A安装在%ProgramFiles%\BrowserA\目录下,这属于正常安装的应用程序,则可以确定第二类文件包括:BrowserA目录及其子目录中的文件和文件夹、以及指向这个安装位置的注册表项及快捷方式,从而在通过第一清理策略对第一应用程序进行清理时可以将BrowserA目录及其子目录中的文件和文件夹等全部删除,然后将指向这个安装位置的注册表项及快捷方式等删除。For example, if the application is installed in its own directory (that is to say, it is not installed in the predetermined installation location), for example: Browser A is installed in the %ProgramFiles%\BrowserA\ directory, which is a normally installed application , it can be determined that the second type of files include: files and folders in the BrowserA directory and its subdirectories, as well as registry entries and shortcuts pointing to this installation location, so that the first application program is cleaned up through the first cleaning strategy You can delete all the files and folders in the BrowserA directory and its subdirectories, and then delete the registry entries and shortcuts pointing to this installation location.

而如果应用程序安装于预定安装位置,例如:浏览器A如果安装在了磁盘根目录(如C:\),没有生成属于自己的专有目录,所有的文件都放到了C盘目录下,这样就不能按照安装位置进行删除了,否则会把系统文件夹和其他程序进行删除,导致系统和其他程序文件丢失,此时的第一清理策略所对应的第一类文件例如包括:该应用程序自己的文件及子文件夹,在第一清理策略中就会指定各个具体的文件,防止误删除,然后删除对应的注册表和快捷方式等。And if the application is installed in a predetermined installation location, for example, if browser A is installed in the root directory of the disk (such as C:\), it does not generate its own dedicated directory, and all files are placed in the C drive directory, so It cannot be deleted according to the installation location, otherwise the system folders and other programs will be deleted, resulting in the loss of system and other program files. The first type of files corresponding to the first cleaning strategy at this time include, for example: the application itself In the first cleaning strategy, specific files will be specified to prevent accidental deletion, and then the corresponding registry and shortcuts will be deleted.

第二种,所述基于所述安装位置从所述清理策略集合中查找获得所述第一清理策略,包括:确定第一应用程序的安装位置与清理策略的对应关系;通过当前获得的第一应用程序的安装位置在对应关系中查找获得对应的第一清理策略。In the second type, the searching and obtaining the first cleaning strategy from the cleaning strategy set based on the installation location includes: determining the corresponding relationship between the installation location of the first application and the cleaning strategy; The installation location of the application is searched in the corresponding relationship to obtain the corresponding first cleaning policy.

举例来说,可以将电子设备的存储空间划分为多个区域,例如:系统盘ProgramFiles根目录、系统盘非Program Files根目录、非系统盘等等,然后针对每个区域可以设置不同的清理策略,如表1所示:For example, the storage space of the electronic device can be divided into multiple areas, such as: the root directory of Program Files in the system disk, the root directory of non-Program Files in the system disk, the non-system disk, etc., and then different cleaning policies can be set for each area ,As shown in Table 1:

进而在确定出第一应用程序在电子设备上的安装位置之后,可以确定该安装位置属于那个安装区域,然后通过安装区域查找获得对应的第一清理策略。Furthermore, after the installation location of the first application on the electronic device is determined, it can be determined which installation area the installation location belongs to, and then the corresponding first cleaning policy is obtained by searching the installation area.

步骤S203中,举例来说,电子设备可以采用第一清理策略和默认清理策略共同对第一应用程序进行清理,例如:先通过第一清理策略对第一应用程序进行清理、然后通过默认清理策略对第一应用程序进行清理、或者先通过默认清理策略对第一应用程序进行清理、然后通过默认清理策略对第一应用程序进行清理等等;电子设备也可以从第一清理策略和默认清理策略中择一对第一应用程序进行清理,例如:服务器还可以将所述第一清理策略所对应的清理优先级发送至所述电子设备,以使所述电子设备基于所述清理优先级和所述默认清理策略的清理优先级从所述第一清理策略和所述默认清理策略中择一对所述第一应用程序进行清理。In step S203, for example, the electronic device may use the first cleaning strategy and the default cleaning strategy to jointly clean the first application, for example: first cleaning the first application through the first cleaning strategy, and then cleaning the first application through the default cleaning strategy. Clean up the first application, or first clean up the first application by using the default cleaning policy, and then clean up the first application by using the default cleaning policy, etc.; the electronic device can also use the first cleaning policy and the default cleaning policy Selecting a pair of first applications to clean up, for example, the server may also send the cleaning priority corresponding to the first cleaning policy to the electronic device, so that the electronic device can perform cleaning based on the cleaning priority and all The cleaning priority of the default cleaning strategy selects a pair of the first application to be cleaned from the first cleaning strategy and the default cleaning strategy.

在这种情况下,所述方法还包括:基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级。In this case, the method further includes: determining a cleaning priority of the first cleaning strategy based on cleaning result report information of cleaning the first application program on each electronic device through the first cleaning strategy class.

作为一种可选的实施例,所述基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级,包括:获得所述第一清理策略的预设优先级;基于所述清理结果报告信息对所述预设优先级进行调整,从而获得所述第一清理策略。As an optional embodiment, the cleaning priority of the first cleaning strategy is determined based on cleaning result report information of cleaning the first application program on each electronic device through the first cleaning strategy , comprising: obtaining the preset priority of the first cleaning strategy; and adjusting the preset priority based on the cleaning result report information, so as to obtain the first cleaning strategy.

作为一种可选的实施例,所述方法还包括:从M个电子设备分别获得所述第一应用程序的相关数据信息,M为正整数;基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息。As an optional embodiment, the method further includes: respectively obtaining relevant data information of the first application from M electronic devices, where M is a positive integer; based on the data obtained from the M electronic devices The relevant data information determines the tag information of the first application for providing to the user.

作为一种可选的实施例,所述基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息,包括:从所述M个电子设备所获得的所述相关数据信息中确定出所述第一应用程序在所述M个电子设备上的程序行为数据和/或所述M个电子设备的用户针对所述第一应用程序所产生的用户行为数据;基于所述程序行为数据和/或所述用户行为数据确定出所述标签信息。As an optional embodiment, the determining, based on the relevant data information obtained from the M electronic devices, the tag information of the first application for providing to the user includes: from the The relevant data information obtained by the M electronic devices determines the program behavior data of the first application on the M electronic devices and/or the users of the M electronic devices target the first application User behavior data generated by a program; the tag information is determined based on the program behavior data and/or the user behavior data.

由于本发明实施例第二方面所介绍的文件清理方法与本发明实施例第一方面所介绍的文件清理方法对应,基于本发明第一方面所介绍的文件清理方法,本领域所属技术人员能够了解本发明实施例第二方面所介绍的文件清理方法的具体实施过程,故而在此不再赘述。Since the file cleaning method described in the second aspect of the embodiment of the present invention corresponds to the file cleaning method described in the first aspect of the embodiment of the present invention, based on the file cleaning method described in the first aspect of the present invention, those skilled in the art can understand The specific implementation process of the file cleaning method introduced in the second aspect of the embodiment of the present invention will not be repeated here.

第二方面,基于同一发明构思,本发明实施例提供一种电子设备,请参考图3,包括:In the second aspect, based on the same inventive concept, an embodiment of the present invention provides an electronic device, please refer to FIG. 3 , including:

第一获取模块30,用于从服务器获取针对第一应用程序进行清理的第一清理策略,所述第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;a first obtaining module 30, configured to obtain a first cleaning strategy for cleaning a first application from a server, where the first cleaning strategy is determined based on an installation location of the first application on the electronic device;

判断模块31,用于判断所述第一清理策略的清理优先级是否高于默认清理策略的清理优先级;Judging module 31, configured to judge whether the cleaning priority of the first cleaning strategy is higher than the cleaning priority of the default cleaning strategy;

第一清理模块32,用于若是,通过所述第一清理策略对所述第一应用程序进行清理;a first cleaning module 32, configured to clean up the first application program through the first cleaning strategy;

第二清理模块33,用于若否,通过所述默认清理策略对所述第一应用程序进行清理。The second cleanup module 33 is configured to clean up the first application program by using the default cleanup policy if not.

可选的,所述电子设备还包括:第一获得模块,用于获得所述服务器发送至的所述第一清理策略的所述清理优先级,其中,所述服务器基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述清理优先级。Optionally, the electronic device further includes: a first obtaining module, configured to obtain the cleaning priority of the first cleaning policy sent by the server, wherein the server is based on passing the first cleaning The clearing priority is determined according to the clearing result report information of the clearing of the first application program on each electronic device by the policy.

可选的,所述清理结果报告信息包括:误删信息和/或漏删信息。Optionally, the cleaning result report information includes: mistakenly deleted information and/or omitted deletion information.

可选的,所述误删信息包括:误删的概率信息和误删的文件类型信息中的至少一种信息;所述漏删信息包括:漏删的概率信息、漏删的文件数量、存在漏删的电子设备数量中的至少一种信息。Optionally, the erroneous deletion information includes: at least one of the probability information of erroneous deletion and the file type information of erroneous deletion; the omissions and deletions information includes: probability information of omissions, number of files omitted, existence At least one type of information in the number of missing electronic devices.

可选的,所述电子设备还包括:第一发送模块,用于将所述第一应用程序的安装位置信息发送至所述服务器。Optionally, the electronic device further includes: a first sending module, configured to send the installation location information of the first application to the server.

可选的,所述电子设备还包括:检测模块,用于检测所述第一应用程序在所述电子设备上的PE可移植的可执行文件;第一确定模块,用于将所述PE可移植的可执行文件所在位置确定为所述安装位置。Optionally, the electronic device further includes: a detection module for detecting the PE-portable executable file of the first application on the electronic device; a first determination module for detecting the PE-portable executable file of the first application on the electronic device; The location where the ported executable file is located is determined as the installation location.

可选的,所述第一清理模块32,包括:第一确定单元,用于基于在所述电子设备上安装所述第一应用程序时所生成的文件的快照确定出对所述第一应用程序进行清理的待清理文件集合;清理单元,用于对所述待清理文件集合基于所述第一清理策略进行清理。Optionally, the first cleaning module 32 includes: a first determining unit, configured to determine, based on a snapshot of a file generated when the first application is installed on the electronic device, the A set of files to be cleaned that is cleaned up by the program; a cleaning unit, configured to clean the set of files to be cleaned based on the first cleaning policy.

可选的,所述电子设备还包括:第二获得模块,用于获得服务器为所述第一应用程序确定的用于提供给用户的标签信息,所述标签信息用于基于所述第一应用程序在M个电子设备上的相关数据信息确定,M为正整数。Optionally, the electronic device further includes: a second obtaining module, configured to obtain tag information determined by the server for the first application and used to provide the user, where the tag information is used based on the first application The relevant data information of the program on M electronic devices is determined, and M is a positive integer.

第四方面,基于同一发明构思,本发明实施例提供一种服务器,请参考图4,包括:In the fourth aspect, based on the same inventive concept, an embodiment of the present invention provides a server, please refer to FIG. 4 , including:

第二获取模块40,用于获取第一应用程序在电子设备上的安装位置;The second obtaining module 40 is configured to obtain the installation position of the first application on the electronic device;

第二确定模块41,用于通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略;A second determining module 41, configured to determine a first cleaning strategy for cleaning the first application on the electronic device by using the installation location;

第二发送模块42,用于将所述第一清理策略发送至所述电子设备,以使所述电子设备基于所述第一清理策略和所述第一应用程序的默认清理策略对所述第一应用程序进行清理。The second sending module 42 is configured to send the first cleanup policy to the electronic device, so that the electronic device sends the first cleanup policy to the first cleanup policy and the default cleanup policy of the first application An app to clean up.

可选的,所述第二确定模块41,包括:第二确定单元,用于通过所述第一应用程序的PE可移植的可执行文件确定出所述第一应用程序的标识信息;查找单元,用于通过所述标识信息和所述安装位置在清理策略集合中查找以获得所述第一清理策略。Optionally, the second determination module 41 includes: a second determination unit, configured to determine the identification information of the first application program through the PE portable executable file of the first application program; a search unit , which is used to search in the cleaning strategy set by using the identification information and the installation location to obtain the first cleaning strategy.

可选的,所述第二确定模块41,包括:判断单元,用于判断所述安装位置是否位于预定安装位置;第三确定单元,用于如果所述安装位置位于所述预定安装位置,所确定出的所述第一清理策略为针对第一类文件进行清理的清理策略;第四确定单元,用于如果所述安装位置不位于所述预定安装位置,所确定出的所述第一清理策略为针对第二类文件进行清理的清理策略,所述第一类文件与所述第二类文件不完全相同。Optionally, the second determining module 41 includes: a judging unit for judging whether the installation position is at a predetermined installation position; a third determination unit for determining whether the installation position is at the predetermined installation position, if the installation position is at the predetermined installation position. The determined first cleaning strategy is a cleaning strategy for cleaning the first type of files; a fourth determining unit is configured to, if the installation location is not located in the predetermined installation location, the determined first cleaning strategy The policy is a cleaning policy for cleaning the second type of file, and the first type of file is not identical to the second type of file.

可选的,所述服务器还包括:第三获得模块,用于从M个电子设备分别获得所述第一应用程序的相关数据信息,M为正整数;第三确定模块,用于基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息。Optionally, the server further includes: a third obtaining module, configured to obtain the relevant data information of the first application program from M electronic devices respectively, where M is a positive integer; The relevant data information obtained by the M electronic devices determines the tag information of the first application for providing to the user.

可选的,所述第三确定模块,包括:第五确定单元,用于从所述M个电子设备所获得的所述相关数据信息中确定出所述第一应用程序在所述M个电子设备上的程序行为数据和/或所述M个电子设备的用户针对所述第一应用程序所产生的用户行为数据;第六确定单元,用于基于所述程序行为数据和/或所述用户行为数据确定出所述标签信息。Optionally, the third determining module includes: a fifth determining unit, configured to determine, from the relevant data information obtained by the M electronic devices, that the first application is in the M electronic devices. Program behavior data on the device and/or user behavior data generated by the users of the M electronic devices for the first application; a sixth determination unit, configured to be based on the program behavior data and/or the user Behavioral data determines the tag information.

可选的,所述服务器还包括:第三发送模块,用于将所述第一清理策略所对应的清理优先级发送至所述电子设备,以使所述电子设备基于所述清理优先级和所述默认清理策略的默认优先级从所述第一清理策略和所述默认清理策略中择一对所述第一应用程序进行清理。Optionally, the server further includes: a third sending module, configured to send the cleaning priority corresponding to the first cleaning policy to the electronic device, so that the electronic device can send the cleaning priority to the electronic device based on the cleaning priority and the cleaning priority. The default priority of the default cleanup policy selects a pair of the first application program from the first cleanup policy and the default cleanup policy.

可选的,所述服务器还包括:第四确定模块,用于基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级。Optionally, the server further includes: a fourth determination module, configured to determine the first application program based on the cleaning result report information of cleaning the first application program on each electronic device through the first cleaning strategy. The cleanup priority of the cleanup policy.

可选的,所述第四确定模块,包括:获得单元,用于获得所述第一清理策略的预设优先级;调整单元,用于基于所述清理结果报告信息对所述预设优先级进行调整,从而获得所述第一清理策略的所述清理优先级。Optionally, the fourth determining module includes: an obtaining unit, configured to obtain a preset priority of the first cleaning strategy; an adjusting unit, configured to determine the preset priority based on the cleaning result report information An adjustment is made to obtain the cleanup priority of the first cleanup policy.

本申请实施例中提供的技术方案,至少具有如下技术效果或优点:The technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

由于在本发明实施例中,在对第一应用程序进行清理时,可以获得两套清理策略,分别为:从服务器获得的第一清理策略以及电子设备的默认清理策略,第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;然后可以基于第一清理策略的清理优先级和默认清理策略的清理优先级,从中选择出一种清理策略对第一应用程序进行清理,也即是说,并非单纯通过第一应用程序的默认清理策略对第一应用程序进行清理,而是提供多种清理策略进行选择,故而达到了对清理策略控制更加精确的技术效果。Because in this embodiment of the present invention, when cleaning the first application, two sets of cleaning policies can be obtained, namely: the first cleaning policy obtained from the server and the default cleaning policy of the electronic device. The first cleaning policy is based on the The installation location of the first application on the electronic device is determined; then a cleaning strategy may be selected from the cleaning priority of the first cleaning strategy and the cleaning priority of the default cleaning strategy to clean the first application, and the That is to say, instead of simply cleaning the first application program through the default cleaning strategy of the first application program, multiple cleaning strategies are provided for selection, thus achieving the technical effect of more precise control of the cleaning strategy.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with teaching based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not directed to any particular programming language. It is to be understood that various programming languages may be used to implement the inventions described herein, and that the descriptions of specific languages above are intended to disclose the best mode for carrying out the invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or its description. This disclosure, however, should not be construed as reflecting an intention that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, it will be understood by those skilled in the art that although some of the embodiments herein include certain features, but not others, included in other embodiments, that combinations of features of the different embodiments are intended to be within the scope of the present invention And form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的网关、代理服务器、系统中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all of the gateways, proxy servers, and systems according to embodiments of the present invention. The present invention can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.

本发明公开了,A1、一种文件清理方法,包括:The invention discloses, A1, a file cleaning method, comprising:

从服务器获取针对第一应用程序进行清理的第一清理策略,所述第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;obtaining a first cleaning strategy for cleaning a first application from a server, where the first cleaning strategy is determined based on an installation location of the first application on the electronic device;

判断所述第一清理策略的清理优先级是否高于默认清理策略的清理优先级;Determine whether the cleaning priority of the first cleaning strategy is higher than the cleaning priority of the default cleaning strategy;

若是,通过所述第一清理策略对所述第一应用程序进行清理;If so, clean up the first application through the first cleanup strategy;

若否,通过所述默认清理策略对所述第一应用程序进行清理。If not, the first application is cleaned up through the default cleaning policy.

A2、如A1所述的方法,其特征在于,所述方法还包括:A2. The method according to A1, wherein the method further comprises:

获得所述服务器发送至的所述第一清理策略的所述清理优先级,其中,所述服务器基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述清理优先级。Obtain the cleaning priority of the first cleaning strategy sent by the server, wherein the server is based on cleaning results of cleaning the first applications on each electronic device through the first cleaning strategy The report information determines the cleaning priority.

A3、如A2所述的方法,其特征在于,所述清理结果报告信息包括:误删信息和/或漏删信息。A3. The method according to A2, wherein the cleaning result report information includes: mistakenly deleted information and/or omitted deletion information.

A4、如A3所述的方法,其特征在于,所述误删信息包括:误删的概率信息和误删的文件类型信息中的至少一种信息;A4. The method according to A3, wherein the mistakenly deleted information includes: at least one of the probability information of mistakenly removed and the file type information of mistakenly removed;

所述漏删信息包括:漏删的概率信息、漏删的文件数量、存在漏删的电子设备数量中的至少一种信息。The omission and deletion information includes at least one kind of information among probability information of omission and deletion, number of files that are omitted to be deleted, and number of electronic devices that have been omitted to be deleted.

A5、如A1-A4任一所述的方法,其特征在于,在所述从服务器获取针对第一应用程序的第一清理策略之前,所述方法还包括:A5. The method according to any one of A1-A4, characterized in that, before acquiring the first cleaning policy for the first application from the server, the method further comprises:

将所述第一应用程序的安装位置信息发送至所述服务器。Sending the installation location information of the first application to the server.

A6、如A5所述的方法,其特征在于,所述方法还包括:A6. The method according to A5, wherein the method further comprises:

检测所述第一应用程序在所述电子设备上的PE可移植的可执行文件;Detecting the PE-portable executable file of the first application on the electronic device;

将所述PE可移植的可执行文件所在位置确定为所述安装位置。The location where the PE portable executable file is located is determined as the installation location.

A7、如A1-A4任一所述的方法,其特征在于,所述通过所述第一清理策略对所述第一应用程序进行清理,包括:A7. The method according to any one of A1-A4, wherein the cleaning the first application program by using the first cleaning strategy includes:

基于在所述电子设备上安装所述第一应用程序时所生成的文件的快照确定出对所述第一应用程序进行清理的待清理文件集合;determining a set of files to be cleaned for cleaning the first application based on the snapshot of the file generated when the first application is installed on the electronic device;

对所述待清理文件集合基于所述第一清理策略进行清理。The set of files to be cleaned is cleaned based on the first cleaning policy.

A8、如A1-A4任一所述的方法,其特征在于,所述方法还包括:A8. The method according to any one of A1-A4, wherein the method further comprises:

获得服务器为所述第一应用程序确定的用于提供给用户的标签信息,所述标签信息用于基于所述第一应用程序在M个电子设备上的相关数据信息确定,M为正整数。The tag information determined by the server for the first application and used for providing the user is obtained, where the tag information is determined based on the related data information of the first application on M electronic devices, where M is a positive integer.

B9、一种文件清理方法,包括:B9. A file cleaning method, comprising:

获取第一应用程序在电子设备上的安装位置;obtaining the installation location of the first application on the electronic device;

通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略;determining a first cleaning strategy for cleaning the first application on the electronic device according to the installation location;

将所述第一清理策略发送至所述电子设备,以使所述电子设备基于所述第一清理策略和所述第一应用程序的默认清理策略对所述第一应用程序进行清理。Sending the first cleanup policy to the electronic device, so that the electronic device cleans up the first application based on the first cleanup policy and a default cleanup policy of the first application.

B10、如B9所述的方法,其特征在于,所述通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略,包括:B10. The method according to B9, wherein the determining the first cleaning strategy for cleaning the first application on the electronic device according to the installation location includes:

通过所述第一应用程序的PE可移植的可执行文件确定出所述第一应用程序的标识信息;Determine the identification information of the first application program through the PE portable executable file of the first application program;

通过所述标识信息和所述安装位置在清理策略集合中查找以获得所述第一清理策略。The first cleaning strategy is obtained by searching in the cleaning strategy set by using the identification information and the installation location.

B11、如B9所述的方法,其特征在于,所述通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略,包括:B11. The method according to B9, wherein the determining the first cleaning strategy for cleaning the first application on the electronic device according to the installation location includes:

判断所述安装位置是否位于预定安装位置;judging whether the installation position is located at a predetermined installation position;

如果所述安装位置位于所述预定安装位置,所确定出的所述第一清理策略为针对第一类文件进行清理的清理策略;If the installation location is located at the predetermined installation location, the determined first cleaning strategy is a cleaning strategy for cleaning the first type of files;

如果所述安装位置不位于所述预定安装位置,所确定出的所述第一清理策略为针对第二类文件进行清理的清理策略,所述第一类文件与所述第二类文件不完全相同。If the installation location is not located in the predetermined installation location, the determined first cleaning strategy is a cleaning strategy for cleaning a second type of file, and the first type of file and the second type of file are incomplete same.

B12、如B9-B11任一所述的方法,其特征在于,所述方法还包括:B12. The method according to any one of B9-B11, wherein the method further comprises:

从M个电子设备分别获得所述第一应用程序的相关数据信息,M为正整数;Respectively obtain relevant data information of the first application program from M electronic devices, where M is a positive integer;

基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息。Tag information of the first application for providing to the user is determined based on the relevant data information obtained from the M electronic devices.

B13、如B12所述的方法,其特征在于,所述基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息,包括:B13. The method according to B12, wherein the determining, based on the relevant data information obtained from the M electronic devices, determines the tag information of the first application for providing to the user, comprising: :

从所述M个电子设备所获得的所述相关数据信息中确定出所述第一应用程序在所述M个电子设备上的程序行为数据和/或所述M个电子设备的用户针对所述第一应用程序所产生的用户行为数据;From the relevant data information obtained by the M electronic devices, it is determined that the program behavior data of the first application on the M electronic devices and/or the user of the M electronic devices is directed to the M electronic devices. User behavior data generated by the first application;

基于所述程序行为数据和/或所述用户行为数据确定出所述标签信息。The tag information is determined based on the program behavior data and/or the user behavior data.

B14、如B9-B11任一所述的方法,其特征在于,所述方法还包括:B14. The method according to any one of B9-B11, wherein the method further comprises:

将所述第一清理策略所对应的清理优先级发送至所述电子设备,以使所述电子设备基于所述清理优先级和所述默认清理策略的默认优先级从所述第一清理策略和所述默认清理策略中择一对所述第一应用程序进行清理。Sending the cleaning priority corresponding to the first cleaning strategy to the electronic device, so that the electronic device can retrieve the cleaning priority from the first cleaning strategy and the default cleaning strategy based on the cleaning priority and the default priority of the default cleaning strategy. A pair of the first application program is selected from the default cleaning strategy for cleaning.

B15、如B14所述的方法,其特征在于,所述方法还包括:B15. The method according to B14, wherein the method further comprises:

基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级。The cleaning priority of the first cleaning strategy is determined based on the cleaning result report information of cleaning the first application program on each electronic device by the first cleaning strategy.

B16、如B15所述的方法,其特征在于,所述基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级,包括:B16. The method according to B15, wherein the first cleaning strategy is determined based on cleaning result report information of cleaning the first application program on each electronic device through the first cleaning strategy cleaning priorities, including:

获得所述第一清理策略的预设优先级;obtaining the preset priority of the first cleaning strategy;

基于所述清理结果报告信息对所述预设优先级进行调整,从而获得所述第一清理策略的所述清理优先级。The preset priority is adjusted based on the cleaning result report information, so as to obtain the cleaning priority of the first cleaning policy.

C17、一种电子设备,包括:C17. An electronic device comprising:

第一获取模块,用于从服务器获取针对第一应用程序进行清理的第一清理策略,所述第一清理策略基于所述第一应用程序在电子设备上的安装位置确定;a first obtaining module, configured to obtain a first cleaning strategy for cleaning a first application from a server, where the first cleaning strategy is determined based on an installation location of the first application on the electronic device;

判断模块,用于判断所述第一清理策略的清理优先级是否高于默认清理策略的清理优先级;a judging module for judging whether the cleaning priority of the first cleaning strategy is higher than the cleaning priority of the default cleaning strategy;

第一清理模块,用于若是,通过所述第一清理策略对所述第一应用程序进行清理;a first cleaning module, configured to clean up the first application program through the first cleaning strategy;

第二清理模块,用于若否,通过所述默认清理策略对所述第一应用程序进行清理。The second cleaning module is configured to, if not, clean up the first application program by using the default cleaning policy.

C18、如C17所述的电子设备,其特征在于,所述电子设备还包括:C18. The electronic device according to C17, wherein the electronic device further comprises:

第一获得模块,用于获得所述服务器发送至的所述第一清理策略的所述清理优先级,其中,所述服务器基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述清理优先级。A first obtaining module, configured to obtain the cleaning priority of the first cleaning policy sent by the server, wherein the server determines the first cleaning policy on each electronic device based on the first cleaning policy. The cleaning priority is determined by the cleaning result report information of the cleaning performed by the application.

C19、如C18所述的电子设备,其特征在于,所述清理结果报告信息包括:误删信息和/或漏删信息。C19. The electronic device according to C18, wherein the cleaning result report information includes: mistaken deletion information and/or omission deletion information.

C20、如C19所述的电子设备,其特征在于,所述误删信息包括:误删的概率信息和误删的文件类型信息中的至少一种信息;C20. The electronic device according to C19, wherein the erroneously deleted information includes: at least one of the probability information of erroneous deletion and the information of the file type of erroneous deletion;

所述漏删信息包括:漏删的概率信息、漏删的文件数量、存在漏删的电子设备数量中的至少一种信息。The omission and deletion information includes at least one kind of information among probability information of omission and deletion, number of files that are omitted to be deleted, and number of electronic devices that have been omitted to be deleted.

C21、如C17-C20任一所述的电子设备,其特征在于,所述电子设备还包括:C21. The electronic device according to any one of C17-C20, wherein the electronic device further comprises:

第一发送模块,用于将所述第一应用程序的安装位置信息发送至所述服务器。A first sending module, configured to send the installation location information of the first application to the server.

C22、如C21所述的电子设备,其特征在于,所述电子设备还包括:C22. The electronic device according to C21, wherein the electronic device further comprises:

检测模块,用于检测所述第一应用程序在所述电子设备上的PE可移植的可执行文件;a detection module, configured to detect the PE-portable executable file of the first application on the electronic device;

第一确定模块,用于将所述PE可移植的可执行文件所在位置确定为所述安装位置。The first determining module is configured to determine the location where the PE portable executable file is located as the installation location.

C23、如C17-C20任一所述的电子设备,其特征在于,所述第一清理模块,包括:C23. The electronic device according to any one of C17-C20, wherein the first cleaning module includes:

第一确定单元,用于基于在所述电子设备上安装所述第一应用程序时所生成的文件的快照确定出对所述第一应用程序进行清理的待清理文件集合;a first determining unit, configured to determine a set of files to be cleaned for cleaning the first application based on a snapshot of a file generated when the first application is installed on the electronic device;

清理单元,用于对所述待清理文件集合基于所述第一清理策略进行清理。A cleaning unit, configured to clean up the set of files to be cleaned based on the first cleaning policy.

C24、如C17-C20任一所述的电子设备,其特征在于,所述电子设备还包括:C24. The electronic device according to any one of C17-C20, wherein the electronic device further comprises:

第二获得模块,用于获得服务器为所述第一应用程序确定的用于提供给用户的标签信息,所述标签信息用于基于所述第一应用程序在M个电子设备上的相关数据信息确定,M为正整数。The second obtaining module is configured to obtain the tag information determined by the server for the first application and provided to the user, where the tag information is used based on the related data information of the first application on M electronic devices OK, M is a positive integer.

D25、一种服务器,包括:D25. A server, comprising:

第二获取模块,用于获取第一应用程序在电子设备上的安装位置;a second obtaining module, configured to obtain the installation position of the first application on the electronic device;

第二确定模块,用于通过所述安装位置确定出在所述电子设备上对所述第一应用程序进行清理的第一清理策略;a second determining module, configured to determine, by using the installation location, a first cleaning strategy for cleaning the first application on the electronic device;

第二发送模块,用于将所述第一清理策略发送至所述电子设备,以使所述电子设备基于所述第一清理策略和所述第一应用程序的默认清理策略对所述第一应用程序进行清理。A second sending module, configured to send the first cleanup policy to the electronic device, so that the electronic device sends the first cleanup policy to the first cleanup policy based on the first cleanup policy and the default cleanup policy of the first application application to clean up.

D26、如D25所述的服务器,其特征在于,所述第二确定模块,包括:D26. The server according to D25, wherein the second determination module includes:

第二确定单元,用于通过所述第一应用程序的PE可移植的可执行文件确定出所述第一应用程序的标识信息;a second determining unit, configured to determine the identification information of the first application program through the PE portable executable file of the first application program;

查找单元,用于通过所述标识信息和所述安装位置在清理策略集合中查找以获得所述第一清理策略。A searching unit, configured to search in the cleaning policy set by using the identification information and the installation location to obtain the first cleaning policy.

D27、如D25所述的服务器,其特征在于,所述第二确定模块,包括:D27. The server according to D25, wherein the second determination module includes:

判断单元,用于判断所述安装位置是否位于预定安装位置;a judging unit for judging whether the installation position is located at a predetermined installation position;

第三确定单元,用于如果所述安装位置位于所述预定安装位置,所确定出的所述第一清理策略为针对第一类文件进行清理的清理策略;a third determining unit, configured to, if the installation location is located at the predetermined installation location, the determined first cleaning strategy is a cleaning strategy for cleaning the first type of files;

第四确定单元,用于如果所述安装位置不位于所述预定安装位置,所确定出的所述第一清理策略为针对第二类文件进行清理的清理策略,所述第一类文件与所述第二类文件不完全相同。The fourth determining unit is configured to, if the installation location is not located in the predetermined installation location, the determined first cleaning strategy is a cleaning strategy for cleaning the second type of files, the first type of files and the The second type of documents described above are not exactly the same.

D28、如D25-D27任一所述的服务器,其特征在于,所述服务器还包括:D28. The server according to any one of D25-D27, wherein the server further comprises:

第三获得模块,用于从M个电子设备分别获得所述第一应用程序的相关数据信息,M为正整数;a third obtaining module, configured to obtain the relevant data information of the first application program from M electronic devices respectively, where M is a positive integer;

第三确定模块,用于基于从所述M个电子设备所获得的所述相关数据信息确定出所述第一应用程序的用于提供给用户的标签信息。A third determining module is configured to determine, based on the relevant data information obtained from the M electronic devices, the tag information of the first application program for providing to the user.

D29、如D28所述的服务器,其特征在于,所述第三确定模块,包括:D29. The server according to D28, wherein the third determination module includes:

第五确定单元,用于从所述M个电子设备所获得的所述相关数据信息中确定出所述第一应用程序在所述M个电子设备上的程序行为数据和/或所述M个电子设备的用户针对所述第一应用程序所产生的用户行为数据;A fifth determining unit, configured to determine, from the relevant data information obtained by the M electronic devices, the program behavior data of the first application on the M electronic devices and/or the M electronic devices User behavior data generated by the user of the electronic device for the first application;

第六确定单元,用于基于所述程序行为数据和/或所述用户行为数据确定出所述标签信息。A sixth determining unit, configured to determine the tag information based on the program behavior data and/or the user behavior data.

D30、如D25-D27任一所述的服务器,其特征在于,所述服务器还包括:D30. The server according to any one of D25-D27, wherein the server further comprises:

第三发送模块,用于将所述第一清理策略所对应的清理优先级发送至所述电子设备,以使所述电子设备基于所述清理优先级和所述默认清理策略的默认优先级从所述第一清理策略和所述默认清理策略中择一对所述第一应用程序进行清理。a third sending module, configured to send the cleaning priority corresponding to the first cleaning strategy to the electronic device, so that the electronic device can send the cleaning priority from the A pair of the first cleaning strategy and the default cleaning strategy is selected for cleaning the first application.

D31、如D30所述的服务器,其特征在于,所述服务器还包括:D31. The server according to D30, wherein the server further comprises:

第四确定模块,用于基于通过所述第一清理策略对各个电子设备上的所述第一应用程序进行清理的清理结果报告信息确定出所述第一清理策略的清理优先级。The fourth determining module is configured to determine the cleaning priority of the first cleaning strategy based on the cleaning result report information of cleaning the first application program on each electronic device through the first cleaning strategy.

D32、如D31所述的服务器,其特征在于,所述第四确定模块,包括:D32. The server according to D31, wherein the fourth determination module includes:

获得单元,用于获得所述第一清理策略的预设优先级;an obtaining unit, configured to obtain the preset priority of the first cleaning strategy;

调整单元,用于基于所述清理结果报告信息对所述预设优先级进行调整,从而获得所述第一清理策略的所述清理优先级。An adjustment unit, configured to adjust the preset priority based on the cleaning result report information, so as to obtain the cleaning priority of the first cleaning strategy.

Claims (32)

1. a kind of file clean-up method characterized by comprising
The first Prune Policies cleared up for the first application program are obtained from server, first Prune Policies are based on institute The identification information for stating the first application program described in the installation site and unique identification of the first application program on an electronic device determines;
Judge whether the cleaning priority of first Prune Policies is higher than the cleaning priority of default Prune Policies;
If so, being cleared up by first Prune Policies first application program;
If it is not, being cleared up by the default Prune Policies first application program.
2. the method as described in claim 1, which is characterized in that the method also includes:
Obtain the cleaning priority for first Prune Policies that the server is sent to, wherein the server base In the cleaning result report cleared up by first Prune Policies first application program on each electronic equipment It accuses information and determines the cleaning priority.
3. method according to claim 2, which is characterized in that the cleaning result report information include: accidentally delete information and/or Information is deleted in leakage.
4. method as claimed in claim 3, which is characterized in that the information of accidentally deleting includes: the probabilistic information accidentally deleted and accidentally deletes At least one of file type information information;
It includes: to leak the probabilistic information deleted, the quantity of documents that leakage is deleted, exist in the number of electronic devices that leakage is deleted that information is deleted in the leakage At least one information.
5. the method as described in claim 1-4 is any, which is characterized in that apply journey for first in described obtain from server Before first Prune Policies of sequence, the method also includes:
The installation site information of first application program is sent to the server.
6. method as claimed in claim 5, which is characterized in that the method also includes:
Detect PE transplantable executable file of first application program on the electronic equipment;
The transplantable executable file position the PE is determined as the installation site.
7. the method as described in claim 1-4 is any, which is characterized in that it is described by first Prune Policies to described One application program is cleared up, comprising:
Snapshot based on file generated when installing first application program on the electronic equipment is determined to described The file set for clearance that first application program is cleared up;
First Prune Policies are based on to the file set for clearance to clear up.
8. the method as described in claim 1-4 is any, which is characterized in that the method also includes:
Obtaining server is the label information for being used to be supplied to user that first application program determines, the label information is used In the related data information determination based on first application program on M electronic equipment, M is positive integer.
9. a kind of file clean-up method characterized by comprising
Obtain the installation site of the first application program on an electronic device;
It is determined by the identification information of the first application program described in the installation site and unique identification in the electronic equipment On the first Prune Policies that first application program is cleared up;
First Prune Policies are sent to the electronic equipment, so that the electronic equipment is based on first Prune Policies First application program is cleared up with the default Prune Policies of first application program.
10. method as claimed in claim 9, which is characterized in that described to be determined by the installation site in the electronics The first Prune Policies that first application program is cleared up in equipment, comprising:
The mark letter of first application program is determined by the transplantable executable file of PE of first application program Breath;
It is searched in Prune Policies set by the identification information and the installation site to obtain first Prune Policies.
11. method as claimed in claim 9, which is characterized in that described to be determined by the installation site in the electronics The first Prune Policies that first application program is cleared up in equipment, comprising:
Judge whether the installation site is located at predetermined installation site;
If the installation site is located at the predetermined installation site, first Prune Policies determined are for first The Prune Policies that class file is cleared up;
If the installation site is not located at the predetermined installation site, first Prune Policies determined are for the The Prune Policies that two class files are cleared up, first class file and second class file are not exactly the same.
12. the method as described in claim 9-11 is any, which is characterized in that the method also includes:
Obtain the related data information of first application program respectively from M electronic equipment, M is positive integer;
Based on determining being used for for first application program from the M electronic equipment related data information obtained It is supplied to the label information of user.
13. method as claimed in claim 12, which is characterized in that described to be based on from M electronic equipment institute obtained State the label information for being used to be supplied to user that related data information determines first application program, comprising:
Determine first application program in the M from the M electronic equipment related data information obtained The user of program behavior data and/or the M electronic equipment on a electronic equipment is produced for first application program Raw user behavior data;
The label information is determined based on described program behavioral data and/or the user behavior data.
14. the method as described in claim 9-11 is any, which is characterized in that the method also includes:
Cleaning priority corresponding to first Prune Policies is sent to the electronic equipment, so that the electronic equipment base It is clear from first Prune Policies and the default in the default priority of the cleaning priority and the default Prune Policies A pair of first application program is selected in reason strategy to be cleared up.
15. method as claimed in claim 14, which is characterized in that the method also includes:
Based on the cleaning cleared up by first Prune Policies first application program on each electronic equipment As a result report information determines the cleaning priority of first Prune Policies.
16. method as claimed in claim 15, which is characterized in that described to be based on through first Prune Policies to each electricity The cleaning result report information that first application program in sub- equipment is cleared up determines first Prune Policies Clear up priority, comprising:
Obtain the pre-set priority of first Prune Policies;
The pre-set priority is adjusted based on the cleaning result report information, to obtain first Prune Policies The cleaning priority.
17. a kind of electronic equipment characterized by comprising
First obtains module, described for obtaining the first Prune Policies cleared up for the first application program from server First Prune Policies are determined based on the installation site of first application program on an electronic device;
Judgment module, for judge the cleaning priority of first Prune Policies whether be higher than default Prune Policies cleaning it is excellent First grade;
First cleaning modul, for if so, being cleared up by first Prune Policies first application program;
Second cleaning modul, for if it is not, being cleared up by the default Prune Policies first application program.
18. electronic equipment as claimed in claim 17, which is characterized in that the electronic equipment further include:
First obtains module, for obtaining the cleaning priority for first Prune Policies that the server is sent to, Wherein, the server based on by first Prune Policies on each electronic equipment first application program carry out The cleaning result report information of cleaning determines the cleaning priority.
19. electronic equipment as claimed in claim 18, which is characterized in that the cleaning result report information includes: accidentally to delete letter Information is deleted in breath and/or leakage.
20. electronic equipment as claimed in claim 19, which is characterized in that the information of accidentally deleting includes: the probabilistic information accidentally deleted At least one of file type information accidentally deleted information;
It includes: to leak the probabilistic information deleted, the quantity of documents that leakage is deleted, exist in the number of electronic devices that leakage is deleted that information is deleted in the leakage At least one information.
21. the electronic equipment as described in claim 17-20 is any, which is characterized in that the electronic equipment further include:
First sending module, for the installation site information of first application program to be sent to the server.
22. electronic equipment as claimed in claim 21, which is characterized in that the electronic equipment further include:
Detection module, for detecting PE transplantable executable file of first application program on the electronic equipment;
First determining module, for the transplantable executable file position the PE to be determined as the installation site.
23. the electronic equipment as described in claim 17-20 is any, which is characterized in that first cleaning modul, comprising:
First determination unit, for based on file generated when installing first application program on the electronic equipment Snapshot determines the file set for clearance cleared up first application program;
Unit is cleared up, is cleared up for being based on first Prune Policies to the file set for clearance.
24. the electronic equipment as described in claim 17-20 is any, which is characterized in that the electronic equipment further include:
Second obtains module, is the label letter for being supplied to user that first application program determines for obtaining server Breath, the label information are used for the related data information based on first application program on M electronic equipment and determine that M is Positive integer.
25. a kind of server characterized by comprising
Second obtains module, for obtaining the installation site of the first application program on an electronic device;
Second determining module, for being determined on the electronic equipment by the installation site to first application program The first Prune Policies cleared up;
Second sending module, for first Prune Policies to be sent to the electronic equipment, so that the electronic equipment base First application program is cleared up in first Prune Policies and the default Prune Policies of first application program.
26. server as claimed in claim 25, which is characterized in that second determining module, comprising:
Second determination unit, for determining described first by the transplantable executable file of PE of first application program The identification information of application program;
Searching unit obtains described for being searched in Prune Policies set by the identification information and the installation site First Prune Policies.
27. server as claimed in claim 25, which is characterized in that second determining module, comprising:
Judging unit, for judging whether the installation site is located at predetermined installation site;
Third determination unit, if being located at the predetermined installation site, described first determined for the installation site Prune Policies are the Prune Policies cleared up for the first class file;
4th determination unit, if not being located at the predetermined installation site for the installation site, determined described One Prune Policies are the Prune Policies cleared up for the second class file, and first class file and second class file are not It is identical.
28. the server as described in claim 25-27 is any, which is characterized in that the server further include:
Third obtains module, and for obtaining the related data information of first application program respectively from M electronic equipment, M is Positive integer;
Third determining module, for described based on being determined from the M electronic equipment related data information obtained The label information for being used to be supplied to user of first application program.
29. server as claimed in claim 28, which is characterized in that the third determining module, comprising:
5th determination unit, for determining described from the M electronic equipment related data information obtained The user of program behavior data and/or the M electronic equipment of one application program on the M electronic equipment is for described User behavior data caused by first application program;
6th determination unit, for determining the label based on described program behavioral data and/or the user behavior data Information.
30. the server as described in claim 25-27 is any, which is characterized in that the server further include:
Third sending module, for cleaning priority corresponding to first Prune Policies to be sent to the electronic equipment, So that default priority of the electronic equipment based on the cleaning priority and the default Prune Policies is clear from described first A pair of first application program is selected in reason strategy and the default Prune Policies to be cleared up.
31. server as claimed in claim 30, which is characterized in that the server further include:
4th determining module, for based on by first Prune Policies to described first on each electronic equipment apply journey The cleaning result report information that sequence is cleared up determines the cleaning priority of first Prune Policies.
32. server as claimed in claim 31, which is characterized in that the 4th determining module, comprising:
Obtaining unit, for obtaining the pre-set priority of first Prune Policies;
Adjustment unit, for being adjusted based on the cleaning result report information to the pre-set priority, to obtain institute State the cleaning priority of the first Prune Policies.
CN201610512757.8A 2016-06-30 2016-06-30 A kind of file clean-up method, electronic equipment and server Active CN106201601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610512757.8A CN106201601B (en) 2016-06-30 2016-06-30 A kind of file clean-up method, electronic equipment and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610512757.8A CN106201601B (en) 2016-06-30 2016-06-30 A kind of file clean-up method, electronic equipment and server

Publications (2)

Publication Number Publication Date
CN106201601A CN106201601A (en) 2016-12-07
CN106201601B true CN106201601B (en) 2019-11-26

Family

ID=57463999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610512757.8A Active CN106201601B (en) 2016-06-30 2016-06-30 A kind of file clean-up method, electronic equipment and server

Country Status (1)

Country Link
CN (1) CN106201601B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018985B (en) * 2017-11-08 2022-10-28 阿里巴巴集团控股有限公司 Snapshot deleting method, device and system
CN109669779B (en) * 2018-12-25 2023-05-26 上海碳蓝网络科技有限公司 Method and device for determining cleaning path of data and cleaning data
CN113505104A (en) * 2021-05-17 2021-10-15 新华三大数据技术有限公司 File cleaning method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876914A (en) * 2010-04-23 2010-11-03 中兴通讯股份有限公司 Method for deleting files and mobile terminal
CN103645922B (en) * 2013-12-25 2017-12-22 北京奇虎科技有限公司 It is a kind of that the method, apparatus and system for carrying out software cleaning are inquired about based on cloud
CN104754002B (en) * 2013-12-30 2019-03-26 北京猎豹网络科技有限公司 Clear up method, apparatus, mobile terminal and the cloud server of file
CN104317956A (en) * 2014-11-13 2015-01-28 北京奇虎科技有限公司 Query and memory space cleaning method and system based on cloud server
CN105159913B (en) * 2015-07-06 2020-08-07 北京金山安全软件有限公司 Method and device for determining file to be cleaned

Also Published As

Publication number Publication date
CN106201601A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
US8418257B2 (en) Collection user interface
US9098370B2 (en) Apparatus and methods for improving uninstall process
US20080034017A1 (en) Links to a common item in a data structure
US20130234963A1 (en) File management method and electronic device having file management function
US20160224207A1 (en) Method and system for freezing and unfreezing applications
US8875303B2 (en) Detecting pirated applications
US9274778B2 (en) Software signature discovery
US11940982B2 (en) Systems and methods for locating application specific data
CN102867147B (en) A kind of method and apparatus of file scan
US20170139813A1 (en) Method and device for checking influence of deleting cache file, and mobile terminal
CN106201602B (en) Label providing method, label obtaining method, server and electronic equipment
US9760842B2 (en) Operation target management apparatus and non-transitory computer readable medium
CN106201601B (en) A kind of file clean-up method, electronic equipment and server
CN110363011B (en) Method and apparatus for verifying security of UEFI-based BIOS
CN104572197A (en) Processing method and device for starting items
US10097488B2 (en) System and method for recovering electronic mail messages deleted from an information handling system
CN106201595A (en) The cleaning control method of a kind of application program and device
CN103019906A (en) Method, device and system for popup information display
US10394551B2 (en) Managing kernel application binary interface/application programming interface-based discrepancies relating to kernel packages
US9858413B1 (en) Reduction of false positives in malware detection using file property analysis
CN105786650A (en) Data management method and device
CN110471793B (en) Data backup method, data recovery method, first terminal and second terminal
CN108197041A (en) A kind of method, equipment and its storage medium of the parent process of determining subprocess
AU2011326237A1 (en) Application file system access
JP6359566B2 (en) Market price distinction for in-app software billing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220728

Address after: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee after: 3600 Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230710

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing Hongxiang Technical Service Co.,Ltd.

Address before: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee before: 3600 Technology Group Co.,Ltd.

TR01 Transfer of patent right
CP03 Change of name, title or address

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing 360 Zhiling Technology Co.,Ltd.

Country or region after: China

Address before: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee before: Beijing Hongxiang Technical Service Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address