WO2019085754A1 - Application cleaning method and apparatus, and storage medium and electronic device - Google Patents

Application cleaning method and apparatus, and storage medium and electronic device Download PDF

Info

Publication number
WO2019085754A1
WO2019085754A1 PCT/CN2018/110632 CN2018110632W WO2019085754A1 WO 2019085754 A1 WO2019085754 A1 WO 2019085754A1 CN 2018110632 W CN2018110632 W CN 2018110632W WO 2019085754 A1 WO2019085754 A1 WO 2019085754A1
Authority
WO
WIPO (PCT)
Prior art keywords
ridge regression
error
parameter
feature set
application
Prior art date
Application number
PCT/CN2018/110632
Other languages
French (fr)
Chinese (zh)
Inventor
曾元清
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019085754A1 publication Critical patent/WO2019085754A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

Disclosed are an application cleaning method and apparatus, and a storage medium and an electronic device. The method in the embodiments of the present application involves: acquiring multi-dimensional features of an application to obtain a training feature set of the application; training a ridge regression model according to the training feature set to obtain a trained ridge regression model; acquiring the multi-dimensional features of the application to obtain a predictive feature set of the application; and predicting whether the application can be cleaned according to the predictive feature set and the trained ridge regression model.

Description

应用清理方法、装置、存储介质及电子设备Application cleaning method, device, storage medium and electronic device
本申请要求于2017年10月31日提交中国专利局、申请号为201711050187.6、发明名称为“应用清理方法、装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on Oct. 31, 2017, filed on Jan. 31, 2011, filed Jan. In this application.
技术领域Technical field
本发明涉及电子设备通信技术领域,尤其涉及一种应用清理方法、装置、存储介质及电子设备。The present invention relates to the field of electronic device communication technologies, and in particular, to an application cleaning method, device, storage medium, and electronic device.
背景技术Background technique
目前,智能手机等电子设备上,通常会有多个应用同时运行,其中,一个应用在前台运行,其他应用在后台运行。如果长时间不清理后台运行的应用,则会导致电子设备的可用内存变小、中央处理器(central processing unit,CPU)占用率过高,导致电子设备出现运行速度变慢,卡顿,耗电过快等问题。At present, on electronic devices such as smart phones, there are usually multiple applications running simultaneously, one of which runs in the foreground and the other runs in the background. If the application running in the background is not cleaned for a long time, the available memory of the electronic device becomes smaller, and the central processing unit (CPU) usage rate is too high, causing the electronic device to run slower, jamming, and power consumption. Too fast and other issues.
发明内容Summary of the invention
本申请实施例提供了一种应用清理方法、装置、存储介质及电子设备,能够提高电子设备的运行流畅度,降低功耗。The embodiment of the present application provides an application cleaning method, a device, a storage medium, and an electronic device, which can improve the running fluency of the electronic device and reduce power consumption.
第一方面,本申请实施例了提供了的一种应用清理方法,包括:In a first aspect, an application cleaning method provided by the embodiment of the present application includes:
获取应用的多维特征,得到所述应用的训练特征集合;Obtaining a multi-dimensional feature of the application to obtain a training feature set of the application;
根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;The ridge regression model is trained according to the applied training feature set, and the trained ridge regression model is obtained;
获取所述应用的多维特征,得到所述应用的预测特征集合;Obtaining a multi-dimensional feature of the application to obtain a predicted feature set of the application;
根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。And predicting whether the application is cleanable according to the predicted feature set and the trained ridge regression model.
第二方面,本申请实施例了提供了的一种应用清理装置,包括:In a second aspect, an application cleaning apparatus provided by the embodiment of the present application includes:
训练特征获取单元,用于获取应用的多维特征,得到所述应用的训练特征集合;a training feature acquiring unit, configured to acquire a multi-dimensional feature of the application, and obtain a training feature set of the application;
训练单元,用于根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;a training unit, configured to train the ridge regression model according to the applied training feature set, and obtain a trained ridge regression model;
预测特征获取单元,用于获取所述应用的多维特征,得到所述应用的预测特征集合;a prediction feature acquiring unit, configured to acquire a multi-dimensional feature of the application, to obtain a predicted feature set of the application;
预测单元,用于根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。And a prediction unit, configured to predict whether the application is cleanable according to the predicted feature set and the trained ridge regression model.
第三方面,本申请实施例提供的存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如本申请任一实施例提供的应用清理方法。In a third aspect, a storage medium provided by an embodiment of the present application has a computer program stored thereon, and when the computer program is run on a computer, the computer is caused to perform an application cleaning method according to any embodiment of the present application.
第四方面,本申请实施例提供的电子设备,包括处理器和存储器,所述存储器有计算机程序,所述处理器通过调用所述计算机程序,用于执行如本申请任一实施例提供的应用清理方法。In a fourth aspect, an electronic device provided by an embodiment of the present application includes a processor and a memory, where the memory has a computer program, and the processor is used to execute an application provided by any embodiment of the present application by calling the computer program. Cleaning method.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付 出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application. Other drawings can also be obtained from those skilled in the art based on these drawings without paying any creative effort.
图1为本申请实施例提供的应用清理方法的应用场景示意图。FIG. 1 is a schematic diagram of an application scenario of an application cleaning method according to an embodiment of the present disclosure.
图2是本申请实施例提供的应用清理方法的一个流程示意图。FIG. 2 is a schematic flowchart of an application cleaning method provided by an embodiment of the present application.
图3是本申请实施例提供的应用清理方法的另一个流程示意图。FIG. 3 is another schematic flowchart of an application cleaning method provided by an embodiment of the present application.
图4是本申请实施例提供的应用清理装置的一个结构示意图。FIG. 4 is a schematic structural diagram of an application cleaning device according to an embodiment of the present application.
图5是本申请实施例提供的应用清理装置的另一结构示意图。FIG. 5 is another schematic structural diagram of an application cleaning device according to an embodiment of the present application.
图6是本申请实施例提供的电子设备的一个结构示意图。FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
图7是本申请实施例提供的电子设备的另一结构示意图。FIG. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
请参照图式,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Referring to the drawings, the principles of the application are exemplified by being implemented in a suitable computing environment. The following description is based on the specific embodiments of the present invention as illustrated, and should not be construed as limiting the specific embodiments that are not described herein.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。References to "an embodiment" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the present application. The appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
本申请实施例提供了一种应用清理方法,包括:An embodiment of the present application provides an application cleaning method, including:
获取应用的多维特征,得到所述应用的训练特征集合;Obtaining a multi-dimensional feature of the application to obtain a training feature set of the application;
根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;The ridge regression model is trained according to the applied training feature set, and the trained ridge regression model is obtained;
获取所述应用的多维特征,得到所述应用的预测特征集合;Obtaining a multi-dimensional feature of the application to obtain a predicted feature set of the application;
根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。And predicting whether the application is cleanable according to the predicted feature set and the trained ridge regression model.
在一些实施例中,根据所述应用的训练样本对岭回归模型进行训练,得到训练后的述岭回归模型,包括:In some embodiments, the ridge regression model is trained according to the applied training samples to obtain a trained ridge regression model, including:
建立所述岭回归模型的误差判断函数;Establishing an error judgment function of the ridge regression model;
根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;Obtaining a target ridge regression parameter of the ridge regression model according to the training feature set and the error judgment function, where the target ridge regression parameter includes a ridge parameter and a regression parameter;
根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型。A trained ridge regression model is obtained according to the target ridge regression parameter and the ridge regression model.
在一些实施例中,根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,包括:In some embodiments, acquiring a target ridge regression parameter of the ridge regression model according to the training feature set and the error determination function includes:
根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。Corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters according to the error corresponding to each set of ridge regression parameters.
在一些实施例中,根据所述误差判断函数获取多组岭回归参数,包括:In some embodiments, acquiring a plurality of sets of ridge regression parameters according to the error determination function comprises:
根据所述误差判断函数获取相应的回归参数获取函数;Obtaining a corresponding regression parameter acquisition function according to the error judgment function;
根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter acquisition function, regression parameters corresponding to each preset ridge parameter are obtained, and multiple sets of ridge regression parameters are obtained.
在一些实施例中,根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,包括:In some embodiments, the error of the training feature set for the ridge regression model under the ridge regression parameter is obtained according to the training feature set, the ridge regression parameter, and the error judgment function, including:
将所述训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
根据所述子训练特征集合、所述岭回归参数以及所述误差判断函数,获取在所述岭回归参数下所述子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的所述子误差;Obtaining a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function, and obtaining a corresponding sub-training feature set Narrative error
根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to a sub-error corresponding to each sub-training feature set.
在一些实施例中,根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,包括:In some embodiments, the error of the training feature set for the ridge regression model under the ridge regression parameter is obtained according to a sub-error corresponding to each sub-training feature set, including:
根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;Obtaining an average error of the sub-training feature set according to the sub-error corresponding to each sub-training feature set;
根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the average error.
在一些实施例中,根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数,包括:In some embodiments, the corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters according to the error corresponding to each set of ridge regression parameters, including:
从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the error corresponding to each set of ridge regression parameters;
从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。A ridge regression parameter corresponding to the minimum error is selected from the plurality of sets of ridge regression parameters as a target ridge regression parameter.
在一些实施例中,根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,包括:In some embodiments, obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the average error comprises:
将所述平均误差直接作为在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。The average error is directly taken as the error of the training feature set for the ridge regression model under the ridge regression parameter.
在一些实施例中,根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理,包括:In some embodiments, predicting whether the application is cleanable based on the predicted feature set and the trained ridge regression model comprises:
根据所述预测特征集合以及所述训练后的岭回归模型计算出应用可清理的概率;Calculating a probability that the application can be cleaned according to the predicted feature set and the trained ridge regression model;
当所述概率大于预设阈值时,确定所述应用可清理。When the probability is greater than a preset threshold, it is determined that the application is cleanable.
本申请实施例提供一种应用清理方法,该应用清理方法的执行主体可以是本申请实施例提供的后台应用清理装置,或者集成了该应用清理装置的电子设备,其中该应用清理装置可以采用硬件或者软件的方式实现。其中,电子设备可以是智能手机、平板电脑、掌上电脑、笔记本电脑、或者台式电脑等设备。The embodiment of the present application provides an application cleaning method, which may be a background application cleaning device provided by an embodiment of the present application, or an electronic device integrated with the application cleaning device, where the application cleaning device may adopt hardware. Or software implementation. The electronic device may be a device such as a smart phone, a tablet computer, a palmtop computer, a notebook computer, or a desktop computer.
请参阅图1,图1为本申请实施例提供的应用清理方法的应用场景示意图,以应用清理装置集成在电子设备中为例,电子设备可以获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理。此外,电子设备还可以可清理的应用进行清理。Referring to FIG. 1 , FIG. 1 is a schematic diagram of an application scenario of an application cleaning method according to an embodiment of the present application. The application device is integrated into an electronic device as an example, and the electronic device can acquire a multi-dimensional feature of the application and obtain a training feature set of the application. According to the applied training feature set, the ridge regression model is trained to obtain the trained ridge regression model; the applied multi-dimensional features are obtained to obtain the applied prediction feature set; and the predicted feature set and the trained ridge regression model are used to predict whether the application can be used. Clean up. In addition, electronic devices can be cleaned up with cleanable applications.
具体地,例如图1所示,以判断后台运行的应用程序a(如邮箱应用、游戏应用等)是否可以清理为例,可以在历史时间段内,采集应用a的多维特征(例如应用a在后台运行的时长、应用a运行的时 间信息等),得到应用a的特征集合,根据特征集合(例如应用a在后台运行的时长、应用a运行的时间信息等)对岭回归模型进行训练,得到训练后的岭回归模型;根据预测时间(如t)采集应用对应的多维特征(例如在t时刻应用a在后台运行的时长、应用a运行的时间信息等),得到应用a的预测特征集合;根据预测特征集合和训练后的岭回归模型预测应用a是否可清理。此外,当预测应用a可清理时,电子设备对应用a进行清理。Specifically, for example, as shown in FIG. 1 , in order to determine whether the application a (such as a mailbox application, a game application, and the like) running in the background can be cleaned up, the multi-dimensional feature of the application a can be collected in a historical time period (for example, the application a is The duration of the background running, the time information of the application a, etc.), the feature set of the application a is obtained, and the ridge regression model is trained according to the feature set (for example, the time length of the application a running in the background, the time information of the application a running, etc.) The ridge regression model after training; collecting the multi-dimensional features corresponding to the application according to the prediction time (such as t) (for example, the time length of the application a running in the background at time t, the time information of the application a running, etc.), and obtaining the predicted feature set of the application a; It is predicted whether the application a can be cleaned based on the predicted feature set and the trained ridge regression model. In addition, the electronic device cleans up the application a when it is predicted that the application a can be cleaned up.
请参阅图2,图2为本申请实施例提供的应用清理方法的流程示意图。本申请实施例提供的应用清理方法的具体流程可以如下:Referring to FIG. 2, FIG. 2 is a schematic flowchart of an application cleaning method according to an embodiment of the present application. The specific process of the application cleaning method provided by the embodiment of the present application may be as follows:
201、获取应用的多维特征,得到应用的训练特征集合。201. Acquire a multi-dimensional feature of the application, and obtain a training feature set of the application.
本申请实施例所提及的应用,可以是电子设备上安装的任何一个应用,例如办公应用、通信应用、游戏应用、购物应用等。其中,应用可以包括前台运行的应用,即前台应用,也可以包括后台运行的应用,即后台应用。The application mentioned in the embodiment of the present application may be any application installed on the electronic device, such as an office application, a communication application, a game application, a shopping application, and the like. The application may include an application running in the foreground, that is, a foreground application, and may also include an application running in the background, that is, a background application.
在一实施例中,可以接收应用清理请求,根据应用清理请求确定待清理的应用,然后,获取应用的多维特征,得到应用的训练特征集合。In an embodiment, the application cleanup request may be received, the application to be cleaned is determined according to the application cleanup request, and then the multidimensional feature of the application is obtained, and the applied training feature set is obtained.
具体地,可以从特征数据库中获取应用的多维特征,其中,多维特征可以为历史时间采集到的多维特征,也即历史多维特征。特征数据库中存储有应用在历史时间的多种特征。Specifically, the multi-dimensional feature of the application may be obtained from the feature database, wherein the multi-dimensional feature may be a multi-dimensional feature collected by the historical time, that is, a historical multi-dimensional feature. The feature database stores various features of the application at historical time.
其中,训练特征集合可以包括应用的多维特征,即应用的多个特征。The training feature set may include multi-dimensional features of the application, that is, multiple features of the application.
其中,应用的多维特征具有一定长度的维度,其每个维度上的参数均对应表征应用的一种特征信息,即该多维特征息由多个特征构成。该多个特征可以包括应用自身相关的特征信息,例如:应用切入到后台的时长;应用切入到后台期间,电子设备的灭屏时长;应用进入前台的次数;应用处于前台的时间;应用处于后台的时间、应用进入后台的方式,例如被主页键(home键)切换进入、被返回键切换进入,被其他应用切换进入等;应用的类型,包括一级(常用应用)、二级(其他应用)等。The multi-dimensional feature of the application has a dimension of a certain length, and the parameters in each dimension correspond to a feature information that represents the application, that is, the multi-dimensional feature is composed of multiple features. The plurality of features may include feature information related to the application itself, for example, the duration of the application cutting into the background; the duration of the electronic device when the application is cut into the background; the number of times the application enters the foreground; the time when the application is in the foreground; the application is in the background The time, the way the application enters the background, such as being switched by the home button (home button), being switched back by the return button, being switched in by other applications, etc.; the type of application, including the first level (common application), the second level (other applications) )Wait.
该多维特征信息还可以包括应用所在的电子设备的相关特征信息,例如:电子设备的灭屏时间、亮屏时间、当前电量,电子设备的无线网络连接状态,电子设备是否在充电状态等。The multi-dimensional feature information may further include related feature information of the electronic device where the application is located, for example, the time when the electronic device is off, the time of the bright screen, the current power, the wireless network connection status of the electronic device, whether the electronic device is in the charging state, or the like.
其中,应用的训练样本包括应用的多维特征。该多维特征可以是在历史时间段内,按照预设频率采集的多个特征。历史时间段,例如可以是过去7天、10天;预设频率,例如可以是每10分钟采集一次、每半小时采集一次。可以理解的是,一次采集的应用的多维特征数据构成一个训练特征集合。Among them, the applied training samples include multi-dimensional features of the application. The multi-dimensional feature may be a plurality of features acquired at a preset frequency during a historical time period. The historical time period may be, for example, the past 7 days or 10 days; the preset frequency may be, for example, collected every 10 minutes and collected every half hour. It can be understood that the multi-dimensional feature data of the once collected application constitutes a training feature set.
在一实施例中,为便于应用清理,可以将应用的多维特征信息中,未用数值直接表示的特征信息用具体的数值量化出来,例如针对电子设备的无线网连接状态这个特征信息,可以用数值1表示正常的状态,用数值0表示异常的状态(反之亦可);再例如,针对电子设备是否在充电状态这个特征信息,可以用数值1表示充电状态,用数值0表示未充电状态(反之亦可)。In an embodiment, in order to facilitate application cleaning, the feature information that is not directly represented by the value in the multi-dimensional feature information of the application may be quantized by a specific value, for example, the feature information of the wireless network connection state of the electronic device may be used. The value 1 indicates the normal state, and the value 0 indicates the abnormal state (or vice versa); for example, for the characteristic information of whether the electronic device is in the charging state, the value 1 indicates the state of charge, and the value 0 indicates the uncharged state ( The opposite is also possible).
202、根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型。202. Train the ridge regression model according to the applied training feature set, and obtain the trained ridge regression model.
其中,岭回归模型可以一种机器学习算法,岭回归(ridge regression,Tikhonov regularization)算法又称为脊回归是一种专用于共线性数据分析的有偏估计回归方法,实质上是一种改良的最小二乘估计法,通过放弃最小二乘法的无偏性,以损失部分信息、降低精度为代价获得回归系数更为符合实际、 更可靠的回归方法,对病态数据的拟合要强于最小二乘法。Among them, the ridge regression model can be a machine learning algorithm, ridge regression (Tikhonov regularization) algorithm, also known as ridge regression is a biased estimation regression method dedicated to collinear data analysis, which is essentially an improved The least squares estimation method, by abandoning the unbiasedness of the least squares method, obtains a more realistic and reliable regression method with the regression coefficient at the cost of losing part of the information and reducing the accuracy, and fits the ill-conditioned data more strongly than the least squares method. .
本申请实施例中,可以利用岭回归模型来预测应用是否可清理,其中,岭回归模型的输出包括可清理、或不可清理。在利用岭回归模型预测应用是否可清理时,需要利用已有的特征信息对模型进行训练,提升预测的准确性。In the embodiment of the present application, the ridge regression model can be used to predict whether the application can be cleaned, wherein the output of the ridge regression model includes cleanable or non-cleanable. When using the ridge regression model to predict whether the application can be cleaned up, it is necessary to use the existing feature information to train the model to improve the accuracy of the prediction.
在一实施例中,对岭回归模型训练的过程就是求解岭回归模型的岭回归参数的过程,比如,可以先计算出岭回归模型所需的岭回归参数,然后,基于该岭回归参数对岭回归模型进行设置。比如,步骤“根据应用的训练样本对岭回归模型进行训练,得到训练后的述岭回归模型”,可以包括:In an embodiment, the process of training the ridge regression model is a process of solving the ridge regression parameter of the ridge regression model. For example, the ridge regression parameter required by the ridge regression model may be calculated first, and then the ridge is determined based on the ridge regression parameter. The regression model is set. For example, the step "training the ridge regression model according to the applied training samples to obtain the post-training ridge regression model" may include:
建立岭回归模型的误差判断函数;Establish an error judgment function of the ridge regression model;
根据训练特征集合和误差判断函数获取岭回归模型的目标岭回归参数,目标岭回归参数包括岭参数和回归参数;The target ridge regression parameter of the ridge regression model is obtained according to the training feature set and the error judgment function, and the target ridge regression parameter includes a ridge parameter and a regression parameter;
根据目标岭回归参数和岭回归模型得到训练后的岭回归模型。The trained ridge regression model is obtained according to the target ridge regression parameter and the ridge regression model.
其中,岭回归参数可以包括岭参数和回归参数,岭回归(Ridge Regression)是在平方误差的基础上增加正则项,通过确定λ的值可以使得在方差和偏差之间达到平衡:随着λ的增大,模型方差减小而偏差增大。岭参数可以正则化参数λ,该回归参数可以为待求解的岭回归模型的模型参数w。Among them, the ridge regression parameter may include a ridge parameter and a regression parameter, and Ridge Regression is to add a regular term on the basis of the square error, and the balance between the variance and the deviation can be achieved by determining the value of λ: with λ As the model increases, the variance of the model decreases and the deviation increases. The ridge parameter can normalize the parameter λ, which can be the model parameter w of the ridge regression model to be solved.
本申请实施例中,误差判断函数为岭回归模型的损失函数,用于计算岭回归模型在样本上的输出值与真实值之间的误差。In the embodiment of the present application, the error judgment function is a loss function of the ridge regression model, and is used to calculate an error between the output value and the true value of the ridge regression model on the sample.
在一实施例中,岭回归模型的误差判断函数可以包括如下函数:In an embodiment, the error judgment function of the ridge regression model may include the following functions:
Figure PCTCN2018110632-appb-000001
Figure PCTCN2018110632-appb-000001
其中,λ为岭参数,即正则化参数,x为样本的特征,w为岭回归模型的回归参数,n为特征的维度。Where λ is the ridge parameter, ie the regularization parameter, x is the characteristic of the sample, w is the regression parameter of the ridge regression model, and n is the dimension of the feature.
在一实施例中,可以对岭回归模型的误差判断函数进行变形,得到回归参数获取函数,然后,基于回归参数获取函数来获取岭回归参数。比如,可以对误差判断函数进行求导,以得到回归参数获取函数,然后,基于该回归参数获取函数和训练特征集合获取岭回归参数。In an embodiment, the error judgment function of the ridge regression model may be deformed to obtain a regression parameter acquisition function, and then the ridge regression parameter is obtained based on the regression parameter acquisition function. For example, the error judgment function can be derived to obtain a regression parameter acquisition function, and then the ridge regression parameter is obtained based on the regression parameter acquisition function and the training feature set.
例如,岭回归模型的误差判断函数可以包括如下函数:For example, the error judgment function of the ridge regression model may include the following functions:
Figure PCTCN2018110632-appb-000002
Figure PCTCN2018110632-appb-000002
可以对误差判断函数进行求导,得到函数:The error judgment function can be derived to obtain a function:
2X T(Y-XW)-2λW,X为特征x的矩阵或向量,X T为X的转置,Y为y的矩阵或向量; 2X T (Y-XW)-2λW, where X is a matrix or vector of features x, X T is a transpose of X, and Y is a matrix or vector of y;
然后,令2X T(Y-XW)-2λW等零,可以得到如下的回归参数计算公式: Then, by making 2X T (Y-XW)-2λW equal to zero, the following regression parameter calculation formula can be obtained:
Figure PCTCN2018110632-appb-000003
Figure PCTCN2018110632-appb-000003
其中,
Figure PCTCN2018110632-appb-000004
为待求解的回归参数。
among them,
Figure PCTCN2018110632-appb-000004
The regression parameter to be solved.
在得到回归参数计算公式后,便可以基于该公式和训练特征集合来计算回归参数
Figure PCTCN2018110632-appb-000005
最终得到岭参数λ以及相应的回归参数
Figure PCTCN2018110632-appb-000006
After the regression parameter calculation formula is obtained, the regression parameter can be calculated based on the formula and the training feature set.
Figure PCTCN2018110632-appb-000005
Finally, the ridge parameter λ and the corresponding regression parameters are obtained.
Figure PCTCN2018110632-appb-000006
在一实施例中,为了提升预测准确性,可以计算出多组岭回归参数,然后,选取最合适的岭回归参数。比如,步骤“根据训练特征集合和误差判断函数获取岭回归模型的目标岭回归参数”,可以包括:In an embodiment, in order to improve the prediction accuracy, multiple sets of ridge regression parameters may be calculated, and then the most suitable ridge regression parameters are selected. For example, the step "acquiring the target ridge regression parameter of the ridge regression model according to the training feature set and the error judgment function" may include:
根据误差判断函数获取多组岭回归参数,岭回归参数包括:岭参数和回归参数;According to the error judgment function, multiple sets of ridge regression parameters are obtained, and the ridge regression parameters include: ridge parameters and regression parameters;
根据训练特征集合、岭回归参数和误差判断函数,获取在岭回归参数下训练特征集合对于岭回归模型的误差,得到每组岭回归参数对应的误差;According to the training feature set, the ridge regression parameter and the error judgment function, the error of the training feature set for the ridge regression model under the ridge regression parameter is obtained, and the error corresponding to each set of ridge regression parameters is obtained;
根据每组岭回归参数对应的误差,从多组岭回归参数中选取相应的目标岭回归参数;According to the error corresponding to each group of ridge regression parameters, the corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters;
根据目标岭回归参数和岭回归模型得到训练后的岭回归模型。The trained ridge regression model is obtained according to the target ridge regression parameter and the ridge regression model.
其中,岭回归参数对应的误差为该岭回归参数下的岭回归模型,输入训练样本集合得出的预测值与真实值之间的误差。The error corresponding to the ridge regression parameter is the ridge regression model under the ridge regression parameter, and the error between the predicted value and the true value obtained by inputting the training sample set.
比如,可以获取岭回归参数
Figure PCTCN2018110632-appb-000007
其中,m可以为大于2的正整数,可以根据实际需求设定,比如,20、30、40……。
For example, you can get the ridge regression parameters.
Figure PCTCN2018110632-appb-000007
Where m can be a positive integer greater than 2, which can be set according to actual needs, for example, 20, 30, 40...
然后,根据训练特征集合、岭回归参数
Figure PCTCN2018110632-appb-000008
以及误差判断函数,获取在该组回归参数
Figure PCTCN2018110632-appb-000009
Figure PCTCN2018110632-appb-000010
下训练特征集合对于岭回归模型的误差Fk,得到每组岭回归参数对应的误差如F1、F2……Fk……Fm。基于每组岭回归参数对应的误差F从岭回归参数
Figure PCTCN2018110632-appb-000011
选取相应的目标岭回归参数
Figure PCTCN2018110632-appb-000012
Then, according to the training feature set, the ridge regression parameter
Figure PCTCN2018110632-appb-000008
And an error judgment function to obtain regression parameters in the set
Figure PCTCN2018110632-appb-000009
Figure PCTCN2018110632-appb-000010
For the error Fk of the lower training model set for the ridge regression model, the errors corresponding to each set of ridge regression parameters are obtained, such as F1, F2, ..., Fk...Fm. Error F from the ridge regression parameters based on the regression parameters of each set of ridges
Figure PCTCN2018110632-appb-000011
Select the corresponding target ridge regression parameter
Figure PCTCN2018110632-appb-000012
在一实施例中,可以对岭回归模型的误差判断函数进行变形,得到回归参数获取函数,然后,基于回归参数获取函数以及多个预设岭参数λ来获取回归参数
Figure PCTCN2018110632-appb-000013
得到多组岭回归参数
Figure PCTCN2018110632-appb-000014
比如, 可以对误差判断函数进行求导,以得到回归参数获取函数,然后,基于该回归参数获取函数和训练特征集合获取岭回归参数。
In an embodiment, the error judgment function of the ridge regression model may be deformed to obtain a regression parameter acquisition function, and then the regression parameter is obtained based on the regression parameter acquisition function and the plurality of preset ridge parameters λ.
Figure PCTCN2018110632-appb-000013
Get multiple sets of ridge regression parameters
Figure PCTCN2018110632-appb-000014
For example, the error judgment function may be derived to obtain a regression parameter acquisition function, and then the ridge regression parameter is obtained based on the regression parameter acquisition function and the training feature set.
例如,岭回归模型的误差判断函数可以包括如下函数:For example, the error judgment function of the ridge regression model may include the following functions:
Figure PCTCN2018110632-appb-000015
Figure PCTCN2018110632-appb-000015
可以对误差判断函数进行求导,得到函数:The error judgment function can be derived to obtain a function:
2X T(Y-XW)-2λW,X为特征x的矩阵或向量,X T为X的转置,Y为y的矩阵或向量; 2X T (Y-XW)-2λW, where X is a matrix or vector of features x, X T is a transpose of X, and Y is a matrix or vector of y;
然后,令2X T(Y-XW)-2λW等零,可以得到如下的回归参数计算公式: Then, by making 2X T (Y-XW)-2λW equal to zero, the following regression parameter calculation formula can be obtained:
Figure PCTCN2018110632-appb-000016
Figure PCTCN2018110632-appb-000016
其中,
Figure PCTCN2018110632-appb-000017
为待求解的回归参数。
among them,
Figure PCTCN2018110632-appb-000017
The regression parameter to be solved.
在得到回归参数计算公式后,便可以基于该公式和多个预设岭参数λ来计算回归参数
Figure PCTCN2018110632-appb-000018
最终得到岭参数λ以及相应的回归参数
Figure PCTCN2018110632-appb-000019
After obtaining the regression parameter calculation formula, the regression parameter can be calculated based on the formula and a plurality of preset ridge parameters λ.
Figure PCTCN2018110632-appb-000018
Finally, the ridge parameter λ and the corresponding regression parameters are obtained.
Figure PCTCN2018110632-appb-000019
例如,初始化岭参数λ的值为1,利用公式
Figure PCTCN2018110632-appb-000020
计算求得λ=1对应的
Figure PCTCN2018110632-appb-000021
值;λ加1,重复利用公式
Figure PCTCN2018110632-appb-000022
求得λ=2对应的
Figure PCTCN2018110632-appb-000023
值;λ再加1,重复利用公式
Figure PCTCN2018110632-appb-000024
求得λ=3对应的
Figure PCTCN2018110632-appb-000025
值……直到求得λ=m对应的
Figure PCTCN2018110632-appb-000026
值,比如m=20。此时,便可以得到m组如20组不同的
Figure PCTCN2018110632-appb-000027
值,进而得到m组如20组
Figure PCTCN2018110632-appb-000028
For example, the initial value of the ridge parameter λ is 1, using the formula
Figure PCTCN2018110632-appb-000020
Calculate the corresponding λ=1
Figure PCTCN2018110632-appb-000021
Value; λ plus 1, reuse formula
Figure PCTCN2018110632-appb-000022
Find λ=2 corresponding
Figure PCTCN2018110632-appb-000023
Value; λ plus 1, reuse formula
Figure PCTCN2018110632-appb-000024
Find λ=3 corresponding
Figure PCTCN2018110632-appb-000025
Value... until the corresponding λ=m is obtained
Figure PCTCN2018110632-appb-000026
Value, such as m=20. At this point, you can get m groups such as 20 groups of different
Figure PCTCN2018110632-appb-000027
Value, and then get m group such as 20 groups
Figure PCTCN2018110632-appb-000028
在一实施例中,为了能够准确性地和快速地获取训练特征集合对于岭回归模型的误差,可以将训练特征集合划分成多个子训练特征集合,获取各子训练特征集合在岭回归参数下对于岭回归模型的误差f,然后,基于各子训练特征集合在岭回归参数下对于岭回归模型的误差得到整个训练特征集合在岭回归参数下对于岭回归模型的误差F。In an embodiment, in order to accurately and quickly acquire the error of the training feature set for the ridge regression model, the training feature set may be divided into a plurality of sub-training feature sets, and each sub-training feature set is obtained under the ridge regression parameter. The error f of the ridge regression model is then obtained based on the error of the sub-training feature set for the ridge regression model under the ridge regression parameter to obtain the error F of the entire training feature set for the ridge regression model under the ridge regression parameter.
比如,步骤“根据训练特征集合、岭回归参数和误差判断函数,获取在岭回归参数下训练特征集合 对于岭回归模型的误差”,可以包括:For example, the step "acquiring the error of the training feature set to the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function" may include:
将训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
根据子训练特征集合、岭回归参数以及误差判断函数,获取在岭回归参数下子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的子误差;According to the sub-training feature set, the ridge regression parameter and the error judgment function, the sub-errors of the sub-training set for the ridge regression model under the ridge regression parameter are obtained, and the sub-error corresponding to each sub-training feature set is obtained;
根据每个子训练特征集合对应的子误差,获取在岭回归参数下训练特征集合对于岭回归模型的误差。According to the sub-error corresponding to each sub-training feature set, the error of the training feature set for the ridge regression model under the ridge regression parameter is obtained.
其中,子训练特征集合划分数量可以根据实际需求设定,比如10个、20个等等。在一实施例中,为提升误差获取的准确度,子训练特征集合包含的特征数量相等,也即将训练特征集合等分成多个子训练特征集合。The number of sub-training feature set partitions can be set according to actual needs, such as 10, 20, and so on. In an embodiment, to improve the accuracy of the error acquisition, the sub-training feature set includes the same number of features, that is, the training feature set is equally divided into a plurality of sub-training feature sets.
例如,可以将训练特征集合D划分成M个子训练特征集合,得到子训练特征集合D1、D2……DM;其中,M为大于1的正整数。然后,根据误差判断函数以及岭回归参数,计算每个子训练特征集合在岭回归参数下对于岭回归模型的子误差,如D1在岭回归参数
Figure PCTCN2018110632-appb-000029
下对于岭回归模型的子误差f11、D2在岭回归参数
Figure PCTCN2018110632-appb-000030
下对于岭回归模型的子误差f12、……DM在岭回归参数
Figure PCTCN2018110632-appb-000031
下对于岭回归模型的子误差f1M,基于每个子训练特征集合在该在岭回归参数
Figure PCTCN2018110632-appb-000032
下对于岭回归模型的子误差,即f11、f12……f1M获取训练特征D在岭回归参数
Figure PCTCN2018110632-appb-000033
下对于岭回归模型的误差F1。
For example, the training feature set D may be divided into M sub-training feature sets to obtain sub-training feature sets D1, D2, . . . DM; wherein M is a positive integer greater than one. Then, according to the error judgment function and the ridge regression parameter, calculate the sub-error of each sub-training feature set for the ridge regression model under the ridge regression parameter, such as D1 in the ridge regression parameter
Figure PCTCN2018110632-appb-000029
The sub-errors f11 and D2 for the ridge regression model are in the ridge regression parameters.
Figure PCTCN2018110632-appb-000030
Sub-errors f12, ... DM in the ridge regression model
Figure PCTCN2018110632-appb-000031
The sub-error f1M for the ridge regression model is based on the ridge regression parameter for each sub-training feature set.
Figure PCTCN2018110632-appb-000032
The sub-errors for the ridge regression model, ie f11, f12...f1M, obtain the training feature D in the ridge regression parameter
Figure PCTCN2018110632-appb-000033
The error F1 for the ridge regression model.
接着,根据误差判断函数以及下一组岭回归参数,计算每个子训练特征集合在岭回归参数下对于下一组岭回归模型的子误差,如D1在岭回归参数
Figure PCTCN2018110632-appb-000034
下对于岭回归模型的子误差f21、D2在岭回归参数
Figure PCTCN2018110632-appb-000035
下对于岭回归模型的子误差f22、……DM在岭回归参数
Figure PCTCN2018110632-appb-000036
下对于岭回归模型的子误差f2M,基于每个子训练特征集合在该在岭回归参数
Figure PCTCN2018110632-appb-000037
下对于岭回归模型的子误差,即f21、f22……f2M获取训练特征D在岭回归参数
Figure PCTCN2018110632-appb-000038
下对于岭回归模型的误差F2。
Then, according to the error judgment function and the next set of ridge regression parameters, calculate the sub-error of each sub-training feature set under the ridge regression parameter for the next set of ridge regression models, such as D1 in the ridge regression parameter
Figure PCTCN2018110632-appb-000034
The sub-errors f21 and D2 for the ridge regression model are in the ridge regression parameters.
Figure PCTCN2018110632-appb-000035
Sub-errors for the ridge regression model, f22, ... DM in the ridge regression parameters
Figure PCTCN2018110632-appb-000036
The sub-error f2M for the ridge regression model is based on the ridge regression parameter for each sub-training feature set.
Figure PCTCN2018110632-appb-000037
The sub-errors for the ridge regression model, ie f21, f22...f2M, obtain the training feature D in the ridge regression parameter
Figure PCTCN2018110632-appb-000038
The error F2 for the ridge regression model.
依次类推,可以计算出训练特征集合在m组岭回归参数对于岭回归模型的误差,得到误差F1、F2……Fm。By analogy, the error of the training feature set in the m-group ridge regression parameter for the ridge regression model can be calculated, and the errors F1, F2, ... Fm are obtained.
本申请实施例在得到每个子训练特征集合对应的子误差后,便可以基于子误差获取整个训练特征集合对于岭回归模型的误差,该获取方式可以有多种。比如,在一实施例中,为了提升误差的准确性,可以计算子误差的平均值,然后,基于平均值获取整个训练特征集合对于岭回归模型的误差。比如,步骤“根据每个子训练特征集合对应的子误差,获取在岭回归参数下训练特征集合对于岭回归模型的误差”,可以包括:After obtaining the sub-error corresponding to each sub-training feature set, the embodiment of the present application can obtain the error of the entire training feature set for the ridge regression model based on the sub-error, and the obtaining manner can be various. For example, in an embodiment, in order to improve the accuracy of the error, the average value of the sub-errors may be calculated, and then the error of the entire training feature set for the ridge regression model is obtained based on the average value. For example, the step “acquiring the error of the training feature set to the ridge regression model under the ridge regression parameter according to the sub-error corresponding to each sub-training feature set” may include:
根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;Obtaining an average error of the sub-training feature set according to the sub-error corresponding to each sub-training feature set;
根据平均误差获取在岭回归参数下训练特征集合对于岭回归模型的误差。The error of the training feature set for the ridge regression model under the ridge regression parameter is obtained according to the average error.
在一实施例中,可以将该平均误差作为在岭回归参数下训练特征集合对于岭回归模型的误差。In an embodiment, the average error can be used as an error of the training feature set for the ridge regression model under the ridge regression parameter.
比如,以岭回归参数为
Figure PCTCN2018110632-appb-000039
为例,在计算出各子下对于岭回归模型的子误差f11、D2在岭回归参数
Figure PCTCN2018110632-appb-000040
下对于岭回归模型的子误差f12、……DM在岭回归参数
Figure PCTCN2018110632-appb-000041
下对于岭回归模型的子误差f1M,基于每个子训练特征集合在该在岭回归参数
Figure PCTCN2018110632-appb-000042
下对于岭回归模型的子误差,即f11、f12……f1M后,可以计算平均误差f’=(f11+f12+……+f1M)/M;该f’即为训练特征D在岭回归参数
Figure PCTCN2018110632-appb-000043
下对于岭回归模型的误差F1。
For example, the ridge regression parameter is
Figure PCTCN2018110632-appb-000039
For example, in the calculation of the sub-errors f11, D2 for the ridge regression model under the ridges in the ridge regression parameters
Figure PCTCN2018110632-appb-000040
Sub-errors f12, ... DM in the ridge regression model
Figure PCTCN2018110632-appb-000041
The sub-error f1M for the ridge regression model is based on the ridge regression parameter for each sub-training feature set.
Figure PCTCN2018110632-appb-000042
For the sub-errors of the ridge regression model, ie f11, f12...f1M, the average error f'=(f11+f12+...+f1M)/M can be calculated; the f' is the training feature D in the ridge regression parameter.
Figure PCTCN2018110632-appb-000043
The error F1 for the ridge regression model.
在一实施例中,为了提升参数准确性以及预测精确性,可以在得到每组岭回归参数对应的误差后,可以选取误差最小对应的岭回归参数作为岭回归模型的目标岭回归参数,即最终参数。In an embodiment, in order to improve parameter accuracy and prediction accuracy, after obtaining the error corresponding to each set of ridge regression parameters, the ridge regression parameter corresponding to the smallest error may be selected as the target ridge regression parameter of the ridge regression model, that is, finally parameter.
比如,在得到每组岭回归参数对应的误差如F1、F2……Fk……Fm后,假设Fk最小,此时,可以选取Fk对应的岭回归参数
Figure PCTCN2018110632-appb-000044
作为岭回归模型的目标岭回归参数。
For example, after obtaining the error corresponding to each group of ridge regression parameters such as F1, F2, ..., Fk...Fm, it is assumed that Fk is the smallest. At this time, the ridge regression parameter corresponding to Fk can be selected.
Figure PCTCN2018110632-appb-000044
The target ridge regression parameter as a ridge regression model.
根据上述描述,下面将以岭回归参数为20组、子训练特征集合数量为10来介绍目标岭回归参数的选取过程,也即岭回归模型的训练过程,如下:According to the above description, the selection process of the target ridge regression parameters, that is, the training process of the ridge regression model, will be introduced as follows: the ridge regression parameter is 20 groups and the number of sub-training feature sets is 10.
(1)、建立岭回归的误差判断函数为:(1) The error judgment function for establishing the ridge regression is:
Figure PCTCN2018110632-appb-000045
Figure PCTCN2018110632-appb-000045
对进行求导,结果为:For the purpose of derivation, the result is:
2X T(Y-XW)-2λW 2X T (Y-XW)-2λW
令其值为0可求得w的值为:Let its value be 0 to find the value of w:
Figure PCTCN2018110632-appb-000046
Figure PCTCN2018110632-appb-000046
(2)、初始化λ的值为1,按照(3)步骤中的
Figure PCTCN2018110632-appb-000047
公式计算求得相应的
Figure PCTCN2018110632-appb-000048
值。
(2), the initial value of λ is 1, according to the step (3)
Figure PCTCN2018110632-appb-000047
Formula calculation
Figure PCTCN2018110632-appb-000048
value.
(3)、λ加1,重复(2)步骤求得20组不同的
Figure PCTCN2018110632-appb-000049
值;
(3), λ plus 1, repeat (2) steps to obtain 20 different sets
Figure PCTCN2018110632-appb-000049
value;
(4)、将特征集合分为10等分,选(3)步骤中
Figure PCTCN2018110632-appb-000050
的一个数值,下面的误差判断公式分别计算10等分的各个子特征集合对于岭回归的不同误差值,得到10个不同的误差值:
(4), divide the feature set into 10 equal parts, and select (3) step
Figure PCTCN2018110632-appb-000050
A numerical value, the following error judgment formula respectively calculates the different error values of each sub-feature set of 10 equal parts for the ridge regression, and obtains 10 different error values:
Figure PCTCN2018110632-appb-000051
Figure PCTCN2018110632-appb-000051
然后计算将10等分各子特征集合对于岭回归的误差值的平均误差值,并将平均误差值作为特征集合在选取的
Figure PCTCN2018110632-appb-000052
和λ下对岭回归的误差;
Then calculate the average error value of the error value of 10 sets of sub-feature sets for the ridge regression, and use the average error value as the feature set in the selected
Figure PCTCN2018110632-appb-000052
And the error of the regression of λ on the ridge;
(5)、重复(4)步骤,分别计算出特征集合在20组不同的
Figure PCTCN2018110632-appb-000053
值下对于岭回归的特征误差;
(5), repeat (4) steps, respectively calculate the feature set in 20 different groups
Figure PCTCN2018110632-appb-000053
The characteristic error for the ridge regression under the value;
(6)、从(5)中求得的20组特征误差取最小值对应的
Figure PCTCN2018110632-appb-000054
和λ值,该
Figure PCTCN2018110632-appb-000055
和λ值即为岭回归拟合得到岭回归参数,即岭回归模型最终选用的参数。
(6), the 20 sets of characteristic errors obtained from (5) take the minimum value corresponding to
Figure PCTCN2018110632-appb-000054
And λ value, the
Figure PCTCN2018110632-appb-000055
The λ value is the ridge regression fitting to obtain the ridge regression parameters, that is, the parameters finally selected by the ridge regression model.
通过上述步骤(1)-(6)可以计算出每个应用对应的岭回归参数。The ridge regression parameters corresponding to each application can be calculated by the above steps (1)-(6).
203、获取应用的多维特征,得到应用的预测特征集合。203. Obtain a multi-dimensional feature of the application, and obtain a set of predicted features of the application.
比如,可以根据预测时间采集应用的多维特征作为预测样本。For example, the multidimensional features of the application can be collected as prediction samples based on the predicted time.
其中,预测时间可以根据需求设定,如可以为当前时间等。The prediction time can be set according to requirements, such as the current time.
比如,可以在预测时间点采集应用的多维特征作为预测样本。For example, a multi-dimensional feature of an application can be acquired as a prediction sample at a predicted time point.
本申请实施例中,步骤201和203中采集的多维特征是相同类型特征,例如:应用切入到后台的时长;应用切入到后台期间,电子设备的灭屏时长;应用进入前台的次数;应用处于前台的时间;应用进入后台的方式。In the embodiment of the present application, the multi-dimensional features collected in steps 201 and 203 are the same type of features, for example, the length of time when the application is cut into the background; the time when the application is cut into the background, the duration of the electronic device; the number of times the application enters the foreground; The time at the front desk; the way the app enters the background.
204、根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理。204. Predict whether the application is cleanable according to the predicted feature set and the trained ridge regression model.
比如,可以基于岭回归模型和预测特征集合计算出应用可清理的概率,当概率大于某个阈值时,确定该应用可清理等等。For example, the probability that the application can be cleaned can be calculated based on the ridge regression model and the predicted feature set, and when the probability is greater than a certain threshold, the application can be cleaned and the like.
由上可知,本申请实施例获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗和节省了资源。As can be seen from the above, the embodiment of the present application obtains the multi-dimensional features of the application, and obtains the applied training feature set; the ridge regression model is trained according to the applied training feature set, and the trained ridge regression model is obtained; the multi-dimensional feature of the application is obtained, and the application is obtained. The set of predicted features; predicting whether the application can be cleaned according to the predicted feature set and the trained ridge regression model; in order to clean up the cleanable application; the solution can automatically clean the application and improve the running fluency of the electronic device. Reduced power consumption and saved resources.
进一步地,由于特征集合中,包括了反映用户使用应用的行为习惯的多个特征信息,因此本申请实施例可以使得对对应应用的清理更加个性化和智能化。Further, since the feature set includes a plurality of feature information that reflects the behavior of the user using the application, the embodiment of the present application can make the cleaning of the corresponding application more personalized and intelligent.
进一步地,基于岭回归模型来实现应用清理预测,可以提升用户行为预测的准确性,进而提高清理的准确度。此外,本申请实施例在对模型训练时还可以计算出多组岭回归参数,并采用特征误差选取误差最下的岭回归参数,以作为岭回归模型的最终参数,可以进一步地提升岭回归模型对应用清理预测的准确性。Further, the application of the cleanup prediction based on the ridge regression model can improve the accuracy of the user behavior prediction, thereby improving the accuracy of the cleanup. In addition, in the embodiment of the present application, multiple sets of ridge regression parameters can be calculated during the training of the model, and the ridge regression parameter with the lowest error of the feature error is used as the final parameter of the ridge regression model, and the ridge regression model can be further improved. The accuracy of the forecast for application cleanup.
下面将在上述实施例描述的方法基础上,对本申请的清理方法做进一步介绍。参考图3,该应用清理方法可以包括:The cleaning method of the present application will be further described below based on the method described in the above embodiments. Referring to FIG. 3, the application cleaning method may include:
301、获取应用的多维特征,得到应用的训练特征集合。301. Obtain a multi-dimensional feature of the application, and obtain a training feature set of the application.
比如,从特征数据库中获取应用的多维特征,其中,多维特征可以为历史时间采集到的多维特征,也即历史多维特征。特征数据库中存储有应用在历史时间的多种特征。For example, the multi-dimensional feature of the application is obtained from the feature database, wherein the multi-dimensional feature can be a multi-dimensional feature collected by the historical time, that is, a historical multi-dimensional feature. The feature database stores various features of the application at historical time.
其中,训练特征集合可以包括应用的多维特征,即应用的多个特征。The training feature set may include multi-dimensional features of the application, that is, multiple features of the application.
其中,应用的多维特征具有一定长度的维度,其每个维度上的参数均对应表征应用的一种特征信息,即该多维特征息由多个特征构成。该多个特征可以包括应用自身相关的特征信息,例如:应用切入到后台的时长;应用切入到后台期间,电子设备的灭屏时长;应用进入前台的次数;应用处于前台的时间;应用处于后台的时间、应用进入后台的方式,例如被主页键(home键)切换进入、被返回键切换进入,被其他应用切换进入等;应用的类型,包括一级(常用应用)、二级(其他应用)等。The multi-dimensional feature of the application has a dimension of a certain length, and the parameters in each dimension correspond to a feature information that represents the application, that is, the multi-dimensional feature is composed of multiple features. The plurality of features may include feature information related to the application itself, for example, the duration of the application cutting into the background; the duration of the electronic device when the application is cut into the background; the number of times the application enters the foreground; the time when the application is in the foreground; the application is in the background The time, the way the application enters the background, such as being switched by the home button (home button), being switched back by the return button, being switched in by other applications, etc.; the type of application, including the first level (common application), the second level (other applications) )Wait.
该多维特征信息还可以包括应用所在的电子设备的相关特征信息,例如:电子设备的灭屏时间、亮屏时间、当前电量,电子设备的无线网络连接状态,电子设备是否在充电状态等。The multi-dimensional feature information may further include related feature information of the electronic device where the application is located, for example, the time when the electronic device is off, the time of the bright screen, the current power, the wireless network connection status of the electronic device, whether the electronic device is in the charging state, or the like.
一个具体的训练特征集合可如下所示,包括多个维度(30个维度)的特征信息,需要说明的是,如下所示的特征信息仅为举例,实际中,一个训练特征集合所包含的特征信息的数量,可以多于如下所示信息的数量,也可以少于如下所示信息的数量,所取的具体特征信息也可以与如下所示特征信息不同,此处不作具体限定。A specific training feature set may be as follows, including feature information of multiple dimensions (30 dimensions). It should be noted that the feature information shown below is only an example. In practice, a feature included in a training feature set is included. The number of the information may be more than the number of the information shown below, or may be less than the number of the information shown below. The specific feature information may be different from the feature information shown below, and is not specifically limited herein.
APP上一次切入后台到现在的时长;The last time the APP cuts into the background until now;
APP上一次切入后台到现在的期间中,累计屏幕关闭时间长度;The length of the screen off time accumulated by the APP during the last cut into the background;
APP一天里(按每天统计)进入前台的次数;The number of times the APP enters the foreground in one day (by daily statistics);
APP一天里(休息日按工作日、休息日分开统计)进入前台的次数,比如若当前预测时间为工作日,则该特征使用数值为工作日统计到的平均每个工作日在前台使用次数;The number of times the APP enters the foreground in the day (the rest day is divided by the working day and the rest day). For example, if the current forecasting time is the working day, the feature usage value is the average number of working days in the foreground for each working day.
APP一天中(按每天统计)处于前台的时间;APP time (by daily statistics) is in the foreground;
该后台APP紧跟当前前台APP后被打开次数,不分工作日休息日统计所得;The background APP is followed by the number of times the current foreground APP is opened, regardless of the workday rest day statistics;
该后台APP紧跟当前前台APP后被打开次数,分工作日休息日统计;The background APP is closely followed by the number of times the current foreground APP is opened, and is counted as a workday rest day;
目标APP被切换的方式,分为被home键切换、被recent键切换、被其他APP切换;The way in which the target APP is switched is divided into a home key switch, a recent key switch, and another APP switch;
目标APP一级类型(常用应用);Target APP level type (common application);
目标APP二级类型(其他应用);Target APP secondary type (other applications);
手机屏幕灭屏时间;The screen of the mobile phone is off;
手机屏幕亮屏时间;Phone screen bright time;
当前屏幕亮灭状态;The current screen is on and off;
当前的电量;Current power;
当前wifi状态;Current wifi status;
App上一次切入后台到现在的时长;The last time the app cuts into the background until now;
APP上一次在前台被使用时长;The last time the APP was used in the foreground;
APP上上一次在前台被使用时长;The last time the APP was used in the foreground;
APP上上上一次在前台被使用时长;The last time the APP was used in the foreground;
若一天分了6个时间段,每段4小时,当前预测时间点为早上8:30,则处于第3段,则该特征表示的是目标app每天在8:00-12:00这个时段被使用的时间长度;If there are 6 time periods in a day, 4 hours each, and the current predicted time is 8:30 in the morning, then in the third paragraph, the feature indicates that the target app is being used every day from 8:00 to 12:00. Length of time used;
当前前台APP进入后台到目标APP进入前台按每天统计的平均间隔时间;The current front-end APP enters the background to the target APP and enters the foreground according to the average interval of daily statistics;
当前前台APP进入后台到目标APP进入前台期间按每天统计的平均屏幕熄灭时间;The current foreground APP goes to the background until the target APP enters the foreground and the average screen is extinguished by daily statistics;
目标APP在后台停留时间直方图第一个bin(0-5分钟对应的次数占比);The target APP stays in the background for the first bin of the histogram (the proportion of times corresponding to 0-5 minutes);
目标APP在后台停留时间直方图第一个bin(5-10分钟对应的次数占比);The target APP stays in the background for the first bin of the histogram (5-10 minutes corresponds to the proportion of times);
目标APP在后台停留时间直方图第一个bin(10-15分钟对应的次数占比);The target APP stays in the background for the first bin of the histogram (10-15 minutes corresponds to the proportion of times);
目标APP在后台停留时间直方图第一个bin(15-20分钟对应的次数占比);The target APP stays in the background for the first bin of the histogram (15-20 minutes corresponds to the proportion of times);
目标APP在后台停留时间直方图第一个bin(15-20分钟对应的次数占比);The target APP stays in the background for the first bin of the histogram (15-20 minutes corresponds to the proportion of times);
目标APP在后台停留时间直方图第一个bin(25-30分钟对应的次数占比);The target APP stays in the background for the first bin of the histogram (25-30 minutes corresponds to the proportion of times);
目标APP在后台停留时间直方图第一个bin(30分钟以后对应的次数占比);The target APP stays in the background for the first bin of the histogram (the proportion of the corresponding number of times after 30 minutes);
当前是否有在充电。Is there currently charging?
302、建立岭回归模型的误差判断函数,根据误差判断函数获取相应的回归参数获取函数。302. Establish an error judgment function of the ridge regression model, and obtain a corresponding regression parameter acquisition function according to the error judgment function.
其中,岭回归模型可以一种机器学习算法,岭回归(ridge regression,Tikhonov regularization)算法又称为脊回归是一种专用于共线性数据分析的有偏估计回归方法,实质上是一种改良的最小二乘估 计法,通过放弃最小二乘法的无偏性,以损失部分信息、降低精度为代价获得回归系数更为符合实际、更可靠的回归方法,对病态数据的拟合要强于最小二乘法。Among them, the ridge regression model can be a machine learning algorithm, ridge regression (Tikhonov regularization) algorithm, also known as ridge regression is a biased estimation regression method dedicated to collinear data analysis, which is essentially an improved The least squares estimation method, by abandoning the unbiasedness of the least squares method, obtains a more realistic and reliable regression method with the regression coefficient at the cost of losing part of the information and reducing the accuracy, and fits the ill-conditioned data more strongly than the least squares method. .
比如,岭回归模型的误差判断函数可以包括如下函数:For example, the error judgment function of the ridge regression model may include the following functions:
Figure PCTCN2018110632-appb-000056
Figure PCTCN2018110632-appb-000056
其中,λ为岭参数,即正则化参数,x为样本的特征,w为岭回归模型的回归参数,n为特征的维度。Where λ is the ridge parameter, ie the regularization parameter, x is the characteristic of the sample, w is the regression parameter of the ridge regression model, and n is the dimension of the feature.
可以对误差判断函数进行求导,得到函数:The error judgment function can be derived to obtain a function:
2X T(Y-XW)-2λW,X为特征x的矩阵或向量,X T为X的转置,Y为y的矩阵或向量; 2X T (Y-XW)-2λW, where X is a matrix or vector of features x, X T is a transpose of X, and Y is a matrix or vector of y;
然后,令2X T(Y-XW)-2λW等零,可以得到如下的回归参数计算公式: Then, by making 2X T (Y-XW)-2λW equal to zero, the following regression parameter calculation formula can be obtained:
Figure PCTCN2018110632-appb-000057
Figure PCTCN2018110632-appb-000057
其中,
Figure PCTCN2018110632-appb-000058
为待求解的回归参数。
among them,
Figure PCTCN2018110632-appb-000058
The regression parameter to be solved.
303、根据多个预设岭参数以及回归参数获取函数,获取相应的多个回归参数,得到多组岭回归参数。303. Acquire a plurality of regression parameters according to a plurality of preset ridge parameters and a regression parameter acquisition function, and obtain multiple sets of ridge regression parameters.
其中,岭回归参数包括岭参数λ以及相应的回归参数
Figure PCTCN2018110632-appb-000059
Among them, the ridge regression parameters include the ridge parameter λ and the corresponding regression parameters
Figure PCTCN2018110632-appb-000059
例如,初始化岭参数λ的值为1,利用公式
Figure PCTCN2018110632-appb-000060
计算求得λ=1对应的
Figure PCTCN2018110632-appb-000061
值;λ加1,重复利用公式
Figure PCTCN2018110632-appb-000062
求得λ=2对应的
Figure PCTCN2018110632-appb-000063
值;λ再加1,重复利用公式
Figure PCTCN2018110632-appb-000064
求得λ=3对应的
Figure PCTCN2018110632-appb-000065
值……直到求得λ=m对应的
Figure PCTCN2018110632-appb-000066
值,比如m=20。此时,便可以得到m组如20组不同的
Figure PCTCN2018110632-appb-000067
值,进而得到m组如20组
Figure PCTCN2018110632-appb-000068
For example, the initial value of the ridge parameter λ is 1, using the formula
Figure PCTCN2018110632-appb-000060
Calculate the corresponding λ=1
Figure PCTCN2018110632-appb-000061
Value; λ plus 1, reuse formula
Figure PCTCN2018110632-appb-000062
Find λ=2 corresponding
Figure PCTCN2018110632-appb-000063
Value; λ plus 1, reuse formula
Figure PCTCN2018110632-appb-000064
Find λ=3 corresponding
Figure PCTCN2018110632-appb-000065
Value... until the corresponding λ=m is obtained
Figure PCTCN2018110632-appb-000066
Value, such as m=20. At this point, you can get m groups such as 20 groups of different
Figure PCTCN2018110632-appb-000067
Value, and then get m group such as 20 groups
Figure PCTCN2018110632-appb-000068
304、将训练特征集合划分成多个子训练特征集合。304. Divide the training feature set into a plurality of sub-training feature sets.
其中,子训练特征集合划分数量可以根据实际需求设定,比如10个、20个等等。在一实施例中,为提升误差获取的准确度,子训练特征集合包含的特征数量相等,也即将训练特征集合等分成多个子训 练特征集合。The number of sub-training feature set partitions can be set according to actual needs, such as 10, 20, and so on. In an embodiment, to improve the accuracy of the error acquisition, the sub-training feature set includes the same number of features, that is, the training feature set is equally divided into a plurality of sub-training feature sets.
305、根据子训练特征集合、岭回归参数以及误差判断函数,获取在岭回归参数下子训练集合对于岭回归模型的子误差。305. Obtain a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function.
例如,可以将训练特征集合D划分成M个子训练特征集合,得到子训练特征集合D1、D2……DM;其中,M为大于1的正整数。然后,根据误差判断函数以及岭回归参数,计算每个子训练特征集合在岭回归参数下对于岭回归模型的子误差,如D1在岭回归参数
Figure PCTCN2018110632-appb-000069
下对于岭回归模型的子误差f11、D2在岭回归参数
Figure PCTCN2018110632-appb-000070
下对于岭回归模型的子误差f12、……DM在岭回归参数
Figure PCTCN2018110632-appb-000071
下对于岭回归模型的子误差f1M,得到每个子训练特征集合在该在岭回归参数
Figure PCTCN2018110632-appb-000072
下对于岭回归模型的子误差,f11、f12……f1M。
For example, the training feature set D may be divided into M sub-training feature sets to obtain sub-training feature sets D1, D2, . . . DM; wherein M is a positive integer greater than one. Then, according to the error judgment function and the ridge regression parameter, calculate the sub-error of each sub-training feature set for the ridge regression model under the ridge regression parameter, such as D1 in the ridge regression parameter
Figure PCTCN2018110632-appb-000069
The sub-errors f11 and D2 for the ridge regression model are in the ridge regression parameters.
Figure PCTCN2018110632-appb-000070
Sub-errors f12, ... DM in the ridge regression model
Figure PCTCN2018110632-appb-000071
For the sub-error f1M of the ridge regression model, the sub-training feature set is obtained in the ridge regression parameter.
Figure PCTCN2018110632-appb-000072
The sub-errors for the ridge regression model, f11, f12...f1M.
306、根据在岭回归参数下每个子训练集合对于岭回归模型的子误差,获取在岭回归参数下训练特征集合对于岭回归模型的误差,重复步骤305和306得到每组岭回归参数下训练特征对于岭回归模型的误差。306. According to the sub-error of each sub-training set for the ridge regression model under the ridge regression parameter, obtain the error of the training feature set for the ridge regression model under the ridge regression parameter, and repeat steps 305 and 306 to obtain the training characteristics of each set of ridge regression parameters. The error for the ridge regression model.
比如,根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;根据平均误差获取在岭回归参数下训练特征集合对于岭回归模型的误差。For example, according to the sub-error corresponding to each sub-training feature set, the average error of the sub-training feature set is obtained; and the error of the training feature set for the ridge regression model under the ridge regression parameter is obtained according to the average error.
在一实施例中,可以将该平均误差作为在岭回归参数下训练特征集合对于岭回归模型的误差。In an embodiment, the average error can be used as an error of the training feature set for the ridge regression model under the ridge regression parameter.
比如,以岭回归参数为
Figure PCTCN2018110632-appb-000073
为例,在计算出各子下对于岭回归模型的子误差f11、D2在岭回归参数
Figure PCTCN2018110632-appb-000074
下对于岭回归模型的子误差f12、……DM在岭回归参数
Figure PCTCN2018110632-appb-000075
下对于岭回归模型的子误差f1M,基于每个子训练特征集合在该在岭回归参数
Figure PCTCN2018110632-appb-000076
下对于岭回归模型的子误差,即f11、f12……f1M后,可以计算平均误差f’=(f11+f12+……+f1M)/M;该f’即为训练特征D在岭回归参数
Figure PCTCN2018110632-appb-000077
下对于岭回归模型的误差F1。
For example, the ridge regression parameter is
Figure PCTCN2018110632-appb-000073
For example, in the calculation of the sub-errors f11, D2 for the ridge regression model under the ridges in the ridge regression parameters
Figure PCTCN2018110632-appb-000074
Sub-errors f12, ... DM in the ridge regression model
Figure PCTCN2018110632-appb-000075
The sub-error f1M for the ridge regression model is based on the ridge regression parameter for each sub-training feature set.
Figure PCTCN2018110632-appb-000076
For the sub-errors of the ridge regression model, ie f11, f12...f1M, the average error f'=(f11+f12+...+f1M)/M can be calculated; the f' is the training feature D in the ridge regression parameter.
Figure PCTCN2018110632-appb-000077
The error F1 for the ridge regression model.
接着重复步骤305和306可以计算出每组岭回归参数下训练特征集合对于岭回归模型的误差;如岭 回归参数
Figure PCTCN2018110632-appb-000078
分别对应的误差F1、F2……Fk……Fm。
Then repeat steps 305 and 306 to calculate the error of the training feature set for the ridge regression model under each set of ridge regression parameters; such as the ridge regression parameter
Figure PCTCN2018110632-appb-000078
Corresponding errors F1, F2, ..., Fk ... Fm, respectively.
307、选取误差最小对应的岭回归参数作为岭回归模型的目标岭回归参数。307. Select the ridge regression parameter corresponding to the minimum error as the target ridge regression parameter of the ridge regression model.
比如,在得到每组岭回归参数对应的误差如F1、F2……Fk……Fm后,假设Fk最小,此时,可以选取Fk对应的岭回归参数
Figure PCTCN2018110632-appb-000079
作为岭回归模型的目标岭回归参数。
For example, after obtaining the error corresponding to each group of ridge regression parameters such as F1, F2, ..., Fk...Fm, it is assumed that Fk is the smallest. At this time, the ridge regression parameter corresponding to Fk can be selected.
Figure PCTCN2018110632-appb-000079
The target ridge regression parameter as a ridge regression model.
在一实施例中,重复上述步骤301-307可以得到每个应用对应的岭回归参数。In an embodiment, the above steps 301-307 are repeated to obtain the ridge regression parameters corresponding to each application.
308、根据目标岭回归参数对岭回归模型中相应参数更新,得到训练后的岭回归模型。308. Update the corresponding parameters in the ridge regression model according to the target ridge regression parameter, and obtain the trained ridge regression model.
比如,对岭回归模型中回归参数w的值进行更新。For example, the value of the regression parameter w in the ridge regression model is updated.
在一实施例中,重复上述步骤301-308可以得到每个应用对应的训练后岭回归模型In an embodiment, repeating the above steps 301-308 can obtain a post-training ridge regression model corresponding to each application.
309、获取应用的多维特征,得到应用的预测特征集合。309. Obtain a multi-dimensional feature of the application, and obtain a set of predicted features of the application.
其中,预测时间可以根据需求设定,如可以为当前时间等。The prediction time can be set according to requirements, such as the current time.
比如,可以在预测时间点采集应用的多维特征作为预测样本。For example, a multi-dimensional feature of an application can be acquired as a prediction sample at a predicted time point.
本申请实施例中,该步骤采集的多维特征与步骤301中获取的特征是相同类型特征,也即预测特征集合与训练特征集合所包含的特征类型相同,例如均包括:应用切入到后台的时长;应用切入到后台期间,电子设备的灭屏时长;应用进入前台的次数;应用处于前台的时间;应用进入后台的方式。In the embodiment of the present application, the multi-dimensional feature collected in the step is the same type of feature as the feature acquired in step 301, that is, the predicted feature set and the feature set included in the training feature set are the same, for example, the time length of the application is cut into the background. The time when the application is cut into the background, the duration of the electronic device; the number of times the application enters the foreground; the time the application is in the foreground; and the way the application enters the background.
310、根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理。310. Predict whether the application can be cleaned according to the predicted feature set and the trained ridge regression model.
比如,可以基于岭回归模型和预测特征集合计算出应用可清理的概率,当概率大于某个阈值时,确定该应用可清理等等。For example, the probability that the application can be cleaned can be calculated based on the ridge regression model and the predicted feature set, and when the probability is greater than a certain threshold, the application can be cleaned and the like.
在一个具体的例子中,可以通过上述步骤301-308获取每个后台应用的训练后岭回归模型;然后,基于每个后台应用的训练后岭回归模型预测后台运行的多个应用是否可清理,如表1所示,则确定可以清理后台运行的应用A1和应用A3,而保持应用A2在后台运行的状态不变。In a specific example, the post-training ridge regression model of each background application can be obtained through the above steps 301-308; then, based on the post-training ridge regression model of each background application, it is predicted whether multiple applications running in the background can be cleaned up, As shown in Table 1, it is determined that the application A1 and the application A3 running in the background can be cleaned, while the state in which the application A2 is running in the background is maintained.
应用application 预测结果forecast result
应用A1Application A1 可清理Can be cleaned
应用A2Application A2 不可清理Can't clean
应用A3Application A3 可清理Can be cleaned
表1Table 1
由上可知,本申请实施例获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该 方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗和节省了资源。As can be seen from the above, the embodiment of the present application obtains the multi-dimensional features of the application, and obtains the applied training feature set; the ridge regression model is trained according to the applied training feature set, and the trained ridge regression model is obtained; the multi-dimensional feature of the application is obtained, and the application is obtained. The set of predicted features; predicting whether the application can be cleaned according to the predicted feature set and the trained ridge regression model; in order to clean up the cleanable application; the solution can automatically clean the application and improve the running fluency of the electronic device. Reduced power consumption and saved resources.
进一步地,由于特征集合中,包括了反映用户使用应用的行为习惯的多个特征信息,因此本申请实施例可以使得对对应应用的清理更加个性化和智能化。Further, since the feature set includes a plurality of feature information that reflects the behavior of the user using the application, the embodiment of the present application can make the cleaning of the corresponding application more personalized and intelligent.
进一步地,基于岭回归模型来实现应用清理预测,可以提升用户行为预测的准确性,进而提高清理的准确度。此外,本申请实施例在对模型训练时还可以计算出多组岭回归参数,并采用特征误差选取误差最下的岭回归参数,以作为岭回归模型的最终参数,可以进一步地提升岭回归模型对应用清理预测的准确性。Further, the application of the cleanup prediction based on the ridge regression model can improve the accuracy of the user behavior prediction, thereby improving the accuracy of the cleanup. In addition, in the embodiment of the present application, multiple sets of ridge regression parameters can be calculated during the training of the model, and the ridge regression parameter with the lowest error of the feature error is used as the final parameter of the ridge regression model, and the ridge regression model can be further improved. The accuracy of the forecast for application cleanup.
本申请实施例还提供了一种应用清理装置,包括:The embodiment of the present application further provides an application cleaning device, including:
训练特征获取单元,用于获取应用的多维特征,得到所述应用的训练特征集合;a training feature acquiring unit, configured to acquire a multi-dimensional feature of the application, and obtain a training feature set of the application;
训练单元,用于根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;a training unit, configured to train the ridge regression model according to the applied training feature set, and obtain a trained ridge regression model;
预测特征获取单元,用于获取所述应用的多维特征,得到所述应用的预测特征集合;a prediction feature acquiring unit, configured to acquire a multi-dimensional feature of the application, to obtain a predicted feature set of the application;
预测单元,用于根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。And a prediction unit, configured to predict whether the application is cleanable according to the predicted feature set and the trained ridge regression model.
在一些实施例中,所述训练单元,包括:In some embodiments, the training unit includes:
建立子单元,用于建立所述岭回归模型的误差判断函数;Establishing a subunit for establishing an error judgment function of the ridge regression model;
参数获取子单元,用于根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;a parameter obtaining subunit, configured to acquire a target ridge regression parameter of the ridge regression model according to the training feature set and the error judgment function, where the target ridge regression parameter includes a ridge parameter and a regression parameter;
训练子单元,用于根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型。And a training subunit, configured to obtain a trained ridge regression model according to the target ridge regression parameter and the ridge regression model.
在一些实施例中,所述参数获取子单元,用于:In some embodiments, the parameter acquisition subunit is configured to:
根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。Corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters according to the error corresponding to each set of ridge regression parameters.
在一些实施例中,所述参数获取子单元,具体用于:In some embodiments, the parameter acquisition subunit is specifically configured to:
根据所述误差判断函数获取相应的回归参数获取函数;Obtaining a corresponding regression parameter acquisition function according to the error judgment function;
根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter acquisition function, regression parameters corresponding to each preset ridge parameter are obtained, and multiple sets of ridge regression parameters are obtained.
在一些实施例中,所述参数获取子单元,具体用于:In some embodiments, the parameter acquisition subunit is specifically configured to:
将所述训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
根据所述子训练特征集合、所述岭回归参数以及所述误差判断函数,获取在所述岭回归参数下所述子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的所述子误差;Obtaining a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function, and obtaining a corresponding sub-training feature set Narrative error
根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to a sub-error corresponding to each sub-training feature set.
在一些实施例中,所述参数获取子单元,具体用于:In some embodiments, the parameter acquisition subunit is specifically configured to:
根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the error corresponding to each set of ridge regression parameters;
从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。A ridge regression parameter corresponding to the minimum error is selected from the plurality of sets of ridge regression parameters as a target ridge regression parameter.
在一些实施例中,所述参数获取子单元,具体用于:将所述平均误差直接作为在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。In some embodiments, the parameter acquisition subunit is specifically configured to: directly use the average error as an error of the training feature set for the ridge regression model under the ridge regression parameter.
在一些实施例中,所述预测单元,用于:In some embodiments, the predicting unit is configured to:
根据所述预测特征集合以及所述训练后的岭回归模型计算出应用可清理的概率;Calculating a probability that the application can be cleaned according to the predicted feature set and the trained ridge regression model;
当所述概率大于预设阈值时,确定所述应用可清理。When the probability is greater than a preset threshold, it is determined that the application is cleanable.
在一实施例中还提供了一种应用清理装置。请参阅图4,图4为本申请实施例提供的应用清理装置的结构示意图。其中该应用清理装置应用于电子设备,该应用清理装置包括训练特征获取单元401、训练单元402、预测特征获取单元403、和预测单元404,如下:An application cleaning device is also provided in an embodiment. Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of an application cleaning apparatus according to an embodiment of the present application. The application cleaning device is applied to an electronic device, and the application cleaning device includes a training feature acquisition unit 401, a training unit 402, a prediction feature acquisition unit 403, and a prediction unit 404, as follows:
训练特征获取单元401,用于获取应用的多维特征,得到应用的训练特征集合;The training feature acquiring unit 401 is configured to acquire a multi-dimensional feature of the application, and obtain a training feature set of the application;
训练单元402,用于根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;The training unit 402 is configured to train the ridge regression model according to the applied training feature set to obtain a trained ridge regression model;
预测特征获取单元403,用于获取所述应用的多维特征,得到所述应用的预测特征集合;a prediction feature acquisition unit 403, configured to acquire a multi-dimensional feature of the application, to obtain a prediction feature set of the application;
预测单元404,用于根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。The prediction unit 404 is configured to predict whether the application is cleanable according to the predicted feature set and the trained ridge regression model.
在一实施例中,参考图5,其中,训练单元402,包括:In an embodiment, referring to FIG. 5, the training unit 402 includes:
建立子单元4021,用于建立所述岭回归模型的误差判断函数;Establishing a sub-unit 4021 for establishing an error judgment function of the ridge regression model;
参数获取子单元4022,用于根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;a parameter obtaining sub-unit 4022, configured to acquire a target ridge regression parameter of the ridge regression model according to the training feature set and the error determination function, where the target ridge regression parameter includes a ridge parameter and a regression parameter;
训练子单元4023,用于根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型。The training sub-unit 4023 is configured to obtain a trained ridge regression model according to the target ridge regression parameter and the ridge regression model.
在一实施例中,参数获取子单元4022,可以用于:In an embodiment, the parameter acquisition subunit 4022 can be used to:
根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。Corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters according to the error corresponding to each set of ridge regression parameters.
在一实施例中,参数获取子单元4022,可以具体用于:In an embodiment, the parameter obtaining subunit 4022 may be specifically configured to:
根据所述误差判断函数获取相应的回归参数获取函数;Obtaining a corresponding regression parameter acquisition function according to the error judgment function;
根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter acquisition function, regression parameters corresponding to each preset ridge parameter are obtained, and multiple sets of ridge regression parameters are obtained.
在一实施例中,参数获取子单元4022,可以具体用于:In an embodiment, the parameter obtaining subunit 4022 may be specifically configured to:
将所述训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
根据所述子训练特征集合、所述岭回归参数以及所述误差判断函数,获取在所述岭回归参数下所述子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的所述子误差;Obtaining a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function, and obtaining a corresponding sub-training feature set Narrative error
根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to a sub-error corresponding to each sub-training feature set.
在一实施例中,参数获取子单元4022,可以具体用于:In an embodiment, the parameter obtaining subunit 4022 may be specifically configured to:
根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;Obtaining an average error of the sub-training feature set according to the sub-error corresponding to each sub-training feature set;
根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the average error.
在一实施例中,参数获取子单元4022,可以具体用于:In an embodiment, the parameter obtaining subunit 4022 may be specifically configured to:
从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the error corresponding to each set of ridge regression parameters;
从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。A ridge regression parameter corresponding to the minimum error is selected from the plurality of sets of ridge regression parameters as a target ridge regression parameter.
在一实施例中,参数获取子单元4022,可以具体用于:In an embodiment, the parameter obtaining subunit 4022 may be specifically configured to:
将所述训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
根据所述子训练特征集合、所述岭回归参数以及所述误差判断函数,获取在所述岭回归参数下所述子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的所述子误差;Obtaining a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function, and obtaining a corresponding sub-training feature set Narrative error
根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;Obtaining an average error of the sub-training feature set according to the sub-error corresponding to each sub-training feature set;
根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the average error.
在一实施例中,参数获取子单元4022,可以具体用于:In an embodiment, the parameter obtaining subunit 4022 may be specifically configured to:
根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the error corresponding to each set of ridge regression parameters;
从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。A ridge regression parameter corresponding to the minimum error is selected from the plurality of sets of ridge regression parameters as a target ridge regression parameter.
在一实施例中,参数获取子单元4022,可以具体用于:将所述平均误差直接作为在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。In an embodiment, the parameter obtaining sub-unit 4022 may be specifically configured to: directly use the average error as an error of the training feature set for the ridge regression model under the ridge regression parameter.
在一实施例中,所述预测单元404,用于:In an embodiment, the predicting unit 404 is configured to:
根据所述预测特征集合以及所述训练后的岭回归模型计算出应用可清理的概率;Calculating a probability that the application can be cleaned according to the predicted feature set and the trained ridge regression model;
当所述概率大于预设阈值时,确定所述应用可清理。其中,应用清理装置中各单元执行的步骤可以参考上述方法实施例描述的方法步骤。该应用清理装置可以集成在电子设备中,如手机、平板电脑等。When the probability is greater than a preset threshold, it is determined that the application is cleanable. The steps performed by each unit in the application cleaning device may refer to the method steps described in the foregoing method embodiments. The application cleaning device can be integrated in an electronic device such as a mobile phone, a tablet computer, or the like.
具体实施时,以上各个单元可以作为独立的实体实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单位的具体实施可参见前面的实施例,在此不再赘述。In the specific implementation, the foregoing various units may be implemented as an independent entity, and may be implemented in any combination, and may be implemented as the same entity or a plurality of entities. For the specific implementation of the foregoing units, refer to the foregoing embodiments, and details are not described herein again.
本文所使用的术语“模块”“单元”可看做为在该运算系统上执行的软件对象。本文所述的不同组件、模块、引擎及服务可看做为在该运算系统上的实施对象。而本文所述的装置及方法可以以软件的方式进行实施,当然也可在硬件上进行实施,均在本申请保护范围之内。The term "module" "unit" as used herein may be taken to mean a software object that is executed on the computing system. The different components, modules, engines, and services described herein can be considered as implementation objects on the computing system. The apparatus and method described herein may be implemented in software, and may of course be implemented in hardware, all of which are within the scope of the present application.
由上可知,本实施例应用清理装置可以由训练特征获取单元401获取应用的多维特征,得到应用的 训练特征集合;由训练单元402根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;由预测特征获取单元403获取应用的多维特征,得到应用的预测特征集合;由预测单元404根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗和节省了资源。It can be seen that, in the embodiment, the application cleaning device can obtain the multi-dimensional feature of the application by the training feature acquiring unit 401, and obtain the applied training feature set; the training unit 402 trains the ridge regression model according to the applied training feature set, and obtains the training. The ridge regression model; the multi-dimensional feature of the application is obtained by the prediction feature acquisition unit 403 to obtain the applied prediction feature set; the prediction unit 404 predicts whether the application can be cleaned according to the predicted feature set and the trained ridge regression model; The application is cleaned; the solution can automatically clean the application, improve the running fluency of the electronic device, reduce power consumption and save resources.
本申请实施例还提供一种电子设备。请参阅图6,电子设备500包括处理器501以及存储器502。其中,处理器501与存储器502电性连接。An embodiment of the present application further provides an electronic device. Referring to FIG. 6, the electronic device 500 includes a processor 501 and a memory 502. The processor 501 is electrically connected to the memory 502.
所述处理器500是电子设备500的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器502内的计算机程序,以及调用存储在存储器502内的数据,执行电子设备500的各种功能并处理数据,从而对电子设备500进行整体监控。The processor 500 is a control center of the electronic device 500 that connects various portions of the entire electronic device using various interfaces and lines, by running or loading a computer program stored in the memory 502, and recalling data stored in the memory 502, The various functions of the electronic device 500 are performed and the data is processed to perform overall monitoring of the electronic device 500.
所述存储器502可用于存储软件程序以及模块,处理器501通过运行存储在存储器502的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器501对存储器502的访问。The memory 502 can be used to store software programs and modules, and the processor 501 executes various functional applications and data processing by running computer programs and modules stored in the memory 502. The memory 502 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a computer program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of electronic devices, etc. Moreover, memory 502 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 502 can also include a memory controller to provide processor 501 access to memory 502.
在本申请实施例中,电子设备500中的处理器501会按照如下的步骤,将一个或一个以上的计算机程序的进程对应的指令加载到存储器502中,并由处理器501运行存储在存储器502中的计算机程序,从而实现各种功能,如下:In the embodiment of the present application, the processor 501 in the electronic device 500 loads the instructions corresponding to the process of one or more computer programs into the memory 502 according to the following steps, and is stored in the memory 502 by the processor 501. The computer program in which to implement various functions, as follows:
获取应用的多维特征,得到应用的训练特征集合;Obtaining multi-dimensional features of the application, and obtaining a training feature set of the application;
根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;The ridge regression model is trained according to the applied training feature set, and the trained ridge regression model is obtained;
获取所述应用的多维特征,得到所述应用的预测特征集合;Obtaining a multi-dimensional feature of the application to obtain a predicted feature set of the application;
根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清。And predicting whether the application is clearable according to the predicted feature set and the trained ridge regression model.
在某些实施方式中,在根据所述应用的训练样本对岭回归模型进行训练,得到训练后的述岭回归模型时,处理器501可以具体执行以下步骤:In some embodiments, when the ridge regression model is trained according to the applied training samples to obtain the trained ridge regression model, the processor 501 may specifically perform the following steps:
建立所述岭回归模型的误差判断函数;Establishing an error judgment function of the ridge regression model;
根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;Obtaining a target ridge regression parameter of the ridge regression model according to the training feature set and the error judgment function, where the target ridge regression parameter includes a ridge parameter and a regression parameter;
根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型。A trained ridge regression model is obtained according to the target ridge regression parameter and the ridge regression model.
在某些实施方式中,在根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数时,处理器501可以具体执行以下步骤:In some embodiments, when acquiring the target ridge regression parameter of the ridge regression model according to the training feature set and the error judgment function, the processor 501 may specifically perform the following steps:
根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。Corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters according to the error corresponding to each set of ridge regression parameters.
在某些实施方式中,在根据所述误差判断函数获取多组岭回归参数时,处理器501可以具体执行以下步骤:In some embodiments, when acquiring a plurality of sets of ridge regression parameters according to the error determination function, the processor 501 may specifically perform the following steps:
根据所述误差判断函数获取相应的回归参数获取函数;Obtaining a corresponding regression parameter acquisition function according to the error judgment function;
根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter acquisition function, regression parameters corresponding to each preset ridge parameter are obtained, and multiple sets of ridge regression parameters are obtained.
在某些实施方式中,在根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差时,处理器501可以具体执行以下步骤:In some embodiments, when an error of the training feature set for the ridge regression model under the ridge regression parameter is obtained according to the training feature set, the ridge regression parameter, and the error judgment function, The processor 501 can specifically perform the following steps:
将所述训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
根据所述子训练特征集合、所述岭回归参数以及所述误差判断函数,获取在所述岭回归参数下所述子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的所述子误差;Obtaining a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function, and obtaining a corresponding sub-training feature set Narrative error
根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to a sub-error corresponding to each sub-training feature set.
在某些实施方式中,在根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差时,处理器501可以具体执行以下步骤:In some embodiments, when obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to a sub-error corresponding to each sub-training feature set, the processor 501 may specifically perform the following steps. :
根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;Obtaining an average error of the sub-training feature set according to the sub-error corresponding to each sub-training feature set;
根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the average error.
在某些实施方式中,在根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数时,处理器501可以具体执行以下步骤:In some embodiments, when selecting a corresponding target ridge regression parameter from the plurality of sets of ridge regression parameters according to an error corresponding to each set of ridge regression parameters, the processor 501 may specifically perform the following steps:
从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the error corresponding to each set of ridge regression parameters;
从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。A ridge regression parameter corresponding to the minimum error is selected from the plurality of sets of ridge regression parameters as a target ridge regression parameter.
在某些实施方式中,在根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差时,处理器501可以具体执行以下步骤:In some embodiments, when acquiring an error of the training feature set for the ridge regression model under the ridge regression parameter according to the average error, the processor 501 may specifically perform the following steps:
将所述平均误差直接作为在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。The average error is directly taken as the error of the training feature set for the ridge regression model under the ridge regression parameter.
在某些实施方式中,在根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理时,处理器501可以具体执行以下步骤:In some embodiments, when predicting whether the application is cleanable according to the predicted feature set and the trained ridge regression model, the processor 501 may specifically perform the following steps:
根据所述预测特征集合以及所述训练后的岭回归模型计算出应用可清理的概率;Calculating a probability that the application can be cleaned according to the predicted feature set and the trained ridge regression model;
当所述概率大于预设阈值时,确定所述应用可清理。When the probability is greater than a preset threshold, it is determined that the application is cleanable.
由上述可知,本申请实施例的电子设备,获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗。It can be seen from the above that the electronic device in the embodiment of the present application acquires the multi-dimensional feature of the application, obtains the applied training feature set, and trains the ridge regression model according to the applied training feature set to obtain the trained ridge regression model; Feature, obtain the applied feature set; according to the predicted feature set and the trained ridge regression model, predict whether the application can be cleaned; to clean up the cleanable application; the solution can automatically clean the application and improve the electronic device Smooth operation and reduced power consumption.
请一并参阅图7,在某些实施方式中,电子设备500还可以包括:显示器503、射频电路504、音频电路505以及电源506。其中,其中,显示器503、射频电路504、音频电路505以及电源506分别与处理器501电性连接。Referring to FIG. 7 together, in some embodiments, the electronic device 500 may further include: a display 503, a radio frequency circuit 504, an audio circuit 505, and a power source 506. The display 503, the radio frequency circuit 504, the audio circuit 505, and the power source 506 are electrically connected to the processor 501, respectively.
所述显示器503可以用于显示由用户输入的信息或提供给用户的信息以及各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示器503可以包括显示面板,在某些实施方式中,可以采用液晶显示器(Liquid Crystal Display,LCD)、或者有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板。The display 503 can be used to display information entered by a user or information provided to a user, as well as various graphical user interfaces, which can be composed of graphics, text, icons, video, and any combination thereof. The display 503 can include a display panel. In some embodiments, the display panel can be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
所述射频电路504可以用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 504 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic device through wireless communication, and to transmit and receive signals with a network device or other electronic device.
所述音频电路505可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。The audio circuit 505 can be used to provide an audio interface between a user and an electronic device through a speaker or a microphone.
所述电源506可以用于给电子设备500的各个部件供电。在一些实施例中,电源506可以通过电源管理系统与处理器501逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power source 506 can be used to power various components of the electronic device 500. In some embodiments, the power source 506 can be logically coupled to the processor 501 through a power management system to enable functions such as managing charging, discharging, and power management through the power management system.
尽管图7中未示出,电子设备500还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 7, the electronic device 500 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
本申请实施例还提供一种存储介质,所述存储介质存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述任一实施例中的应用清理方法,比如:获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理。The embodiment of the present application further provides a storage medium, where the storage medium stores a computer program, and when the computer program runs on a computer, causes the computer to execute an application cleaning method in any of the above embodiments, such as: obtaining Applying the multi-dimensional characteristics, the applied training feature set is obtained; the ridge regression model is trained according to the applied training feature set, and the trained ridge regression model is obtained; the applied multi-dimensional features are obtained, and the applied predicted feature set is obtained; according to the predicted feature set And the trained ridge regression model to predict whether the application can be cleaned up.
在本申请实施例中,存储介质可以是磁碟、光盘、只读存储器(Read Only Memory,ROM,)、或者随机存取记忆体(Random Access Memory,RAM)等。In the embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory (RAM).
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
需要说明的是,对本申请实施例的应用清理方法而言,本领域普通测试人员可以理解实现本申请实施例的应用清理方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如应用清理方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器、随机存取记忆体等。It should be noted that, in the application cleaning method of the embodiment of the present application, a common tester in the art can understand all or part of the process of implementing the application cleaning method of the embodiment of the present application, which can be completed by controlling the related hardware through a computer program. The computer program may be stored in a computer readable storage medium, such as in a memory of the electronic device, and executed by at least one processor in the electronic device, and may include, for example, an application cleaning method during execution. The flow of the embodiment. The storage medium may be a magnetic disk, an optical disk, a read only memory, a random access memory, or the like.
对本申请实施例的应用清理装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,所述存储介质譬如为只读存储器,磁盘或光盘等。For the application cleaning device of the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated module, if implemented in the form of a software functional module and sold or used as a standalone product, may also be stored in a computer readable storage medium, such as a read only memory, a magnetic disk or an optical disk, etc. .
以上对本申请实施例所提供的一种应用清理方法、装置、存储介质及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The application clearing method, device, storage medium and electronic device provided by the embodiments of the present application are described in detail. The principles and implementation manners of the application are described in the specific examples. The description of the above embodiments is only The method for understanding the present application and its core idea; at the same time, those skilled in the art, according to the idea of the present application, there will be changes in the specific embodiment and the scope of application, in summary, the present specification The content should not be construed as limiting the application.

Claims (20)

  1. 一种应用清理方法,其中,包括:An application cleaning method, which includes:
    获取应用的多维特征,得到所述应用的训练特征集合;Obtaining a multi-dimensional feature of the application to obtain a training feature set of the application;
    根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;The ridge regression model is trained according to the applied training feature set, and the trained ridge regression model is obtained;
    获取所述应用的多维特征,得到所述应用的预测特征集合;Obtaining a multi-dimensional feature of the application to obtain a predicted feature set of the application;
    根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。And predicting whether the application is cleanable according to the predicted feature set and the trained ridge regression model.
  2. 如权利要求1所述的应用清理方法,其中,根据所述应用的训练样本对岭回归模型进行训练,得到训练后的述岭回归模型,包括:The application cleaning method according to claim 1, wherein the ridge regression model is trained according to the applied training samples, and the trained ridge regression model is obtained, including:
    建立所述岭回归模型的误差判断函数;Establishing an error judgment function of the ridge regression model;
    根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;Obtaining a target ridge regression parameter of the ridge regression model according to the training feature set and the error judgment function, where the target ridge regression parameter includes a ridge parameter and a regression parameter;
    根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型。A trained ridge regression model is obtained according to the target ridge regression parameter and the ridge regression model.
  3. 如权利要求2所述的应用清理方法,其中,根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,包括:The application cleanup method according to claim 2, wherein the target ridge regression parameters of the ridge regression model are obtained according to the training feature set and the error judgment function, including:
    根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
    根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
    根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。Corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters according to the error corresponding to each set of ridge regression parameters.
  4. 如权利要求3所述的应用清理方法,其中,根据所述误差判断函数获取多组岭回归参数,包括:The application cleaning method according to claim 3, wherein the plurality of sets of ridge regression parameters are obtained according to the error judgment function, including:
    根据所述误差判断函数获取相应的回归参数获取函数;Obtaining a corresponding regression parameter acquisition function according to the error judgment function;
    根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter acquisition function, regression parameters corresponding to each preset ridge parameter are obtained, and multiple sets of ridge regression parameters are obtained.
  5. 如权利要求3所述的应用清理方法,其中,根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,包括:The application cleaning method according to claim 3, wherein the training feature set is acquired for the ridge regression under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function Model errors, including:
    将所述训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
    根据所述子训练特征集合、所述岭回归参数以及所述误差判断函数,获取在所述岭回归参数下所述子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的所述子误差;Obtaining a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function, and obtaining a corresponding sub-training feature set Narrative error
    根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to a sub-error corresponding to each sub-training feature set.
  6. 如权利要求5所述的应用清理方法,其中,根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,包括:The application cleaning method according to claim 5, wherein the error of the training feature set for the ridge regression model under the ridge regression parameter is obtained according to a sub-error corresponding to each sub-training feature set, including:
    根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;Obtaining an average error of the sub-training feature set according to the sub-error corresponding to each sub-training feature set;
    根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the average error.
  7. 如权利要求3所述的应用清理方法,其中,根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数,包括:The application cleaning method according to claim 3, wherein the corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters according to the error corresponding to each set of ridge regression parameters, including:
    从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the error corresponding to each set of ridge regression parameters;
    从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。A ridge regression parameter corresponding to the minimum error is selected from the plurality of sets of ridge regression parameters as a target ridge regression parameter.
  8. 如权利要求6所述的应用清理方法,其中,根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,包括:The application cleaning method according to claim 6, wherein the error of the training feature set for the ridge regression model under the ridge regression parameter is obtained according to the average error, including:
    将所述平均误差直接作为在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。The average error is directly taken as the error of the training feature set for the ridge regression model under the ridge regression parameter.
  9. 如权利要求1所述的应用清理方法,其中,根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理,包括:The application cleanup method according to claim 1, wherein predicting whether the application is cleanable according to the predicted feature set and the trained ridge regression model comprises:
    根据所述预测特征集合以及所述训练后的岭回归模型计算出应用可清理的概率;Calculating a probability that the application can be cleaned according to the predicted feature set and the trained ridge regression model;
    当所述概率大于预设阈值时,确定所述应用可清理。When the probability is greater than a preset threshold, it is determined that the application is cleanable.
  10. 一种应用清理装置,其中,包括:An application cleaning device, comprising:
    训练特征获取单元,用于获取应用的多维特征,得到所述应用的训练特征集合;a training feature acquiring unit, configured to acquire a multi-dimensional feature of the application, and obtain a training feature set of the application;
    训练单元,用于根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;a training unit, configured to train the ridge regression model according to the applied training feature set, and obtain a trained ridge regression model;
    预测特征获取单元,用于获取所述应用的多维特征,得到所述应用的预测特征集合;a prediction feature acquiring unit, configured to acquire a multi-dimensional feature of the application, to obtain a predicted feature set of the application;
    预测单元,用于根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。And a prediction unit, configured to predict whether the application is cleanable according to the predicted feature set and the trained ridge regression model.
  11. 如权利要求10所述的应用清理装置,其中,所述训练单元,包括:The application cleaning device of claim 10, wherein the training unit comprises:
    建立子单元,用于建立所述岭回归模型的误差判断函数;Establishing a subunit for establishing an error judgment function of the ridge regression model;
    参数获取子单元,用于根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;a parameter obtaining subunit, configured to acquire a target ridge regression parameter of the ridge regression model according to the training feature set and the error judgment function, where the target ridge regression parameter includes a ridge parameter and a regression parameter;
    训练子单元,用于根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型。And a training subunit, configured to obtain a trained ridge regression model according to the target ridge regression parameter and the ridge regression model.
  12. 如权利要求11所述的应用清理装置,其中,所述参数获取子单元,用于:The application cleaning device according to claim 11, wherein said parameter acquisition subunit is configured to:
    根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
    根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
    根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。Corresponding target ridge regression parameters are selected from the plurality of sets of ridge regression parameters according to the error corresponding to each set of ridge regression parameters.
  13. 如权利要求12所述的应用清理装置,其中,所述参数获取子单元,具体用于:The application cleaning device according to claim 12, wherein the parameter acquisition subunit is specifically configured to:
    根据所述误差判断函数获取相应的回归参数获取函数;Obtaining a corresponding regression parameter acquisition function according to the error judgment function;
    根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter acquisition function, regression parameters corresponding to each preset ridge parameter are obtained, and multiple sets of ridge regression parameters are obtained.
  14. 如权利要求12所述的应用清理装置,其中,所述参数获取子单元,具体用于:The application cleaning device according to claim 12, wherein the parameter acquisition subunit is specifically configured to:
    将所述训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
    根据所述子训练特征集合、所述岭回归参数以及所述误差判断函数,获取在所述岭回归参数下所述子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的所述子误差;Obtaining a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function, and obtaining a corresponding sub-training feature set Narrative error
    根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to a sub-error corresponding to each sub-training feature set.
  15. 如权利要求14所述的应用清理装置,其中,所述参数获取子单元,具体用于:The application cleaning device according to claim 14, wherein the parameter acquisition subunit is specifically configured to:
    将所述训练特征集合划分成多个子训练特征集合;Dividing the training feature set into a plurality of sub-training feature sets;
    根据所述子训练特征集合、所述岭回归参数以及所述误差判断函数,获取在所述岭回归参数下所述子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的所述子误差;Obtaining a sub-error of the sub-training set for the ridge regression model under the ridge regression parameter according to the sub-training feature set, the ridge regression parameter, and the error judging function, and obtaining a corresponding sub-training feature set Narrative error
    根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;Obtaining an average error of the sub-training feature set according to the sub-error corresponding to each sub-training feature set;
    根据所述平均误差获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the average error.
  16. 如权利要求12所述的应用清理装置,其中,所述参数获取子单元,具体用于:The application cleaning device according to claim 12, wherein the parameter acquisition subunit is specifically configured to:
    根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtaining a plurality of sets of ridge regression parameters according to the error judgment function, the ridge regression parameters including: a ridge parameter and a regression parameter;
    根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,得到每组岭回归参数对应的误差;Obtaining an error of the training feature set for the ridge regression model under the ridge regression parameter according to the training feature set, the ridge regression parameter, and the error judgment function, and obtaining an error corresponding to each set of ridge regression parameters ;
    从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the error corresponding to each set of ridge regression parameters;
    从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。A ridge regression parameter corresponding to the minimum error is selected from the plurality of sets of ridge regression parameters as a target ridge regression parameter.
  17. 如权利要求15所述的应用清理装置,其中,所述参数获取子单元,具体用于:将所述平均误差直接作为在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。The application cleaning device according to claim 15, wherein the parameter acquisition subunit is specifically configured to: directly use the average error as the training feature set for the ridge regression model under the ridge regression parameter error.
  18. 如权利要求10所述的应用清理装置,其中,所述预测单元,用于:The application cleaning device according to claim 10, wherein the prediction unit is configured to:
    根据所述预测特征集合以及所述训练后的岭回归模型计算出应用可清理的概率;Calculating a probability that the application can be cleaned according to the predicted feature set and the trained ridge regression model;
    当所述概率大于预设阈值时,确定所述应用可清理。When the probability is greater than a preset threshold, it is determined that the application is cleanable.
  19. 一种存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上运行时,使得所 述计算机执行如权利要求1至9任一项所述的应用清理方法。A storage medium having stored thereon a computer program, wherein when the computer program is run on a computer, the computer is caused to perform the application cleaning method according to any one of claims 1 to 9.
  20. 一种电子设备,包括处理器和存储器,所述存储器有计算机程序,其中,所述处理器通过调用所述计算机程序,用于执行如权利要求1至9任一项所述的应用清理方法。An electronic device comprising a processor and a memory, the memory having a computer program, wherein the processor is configured to execute the application cleaning method according to any one of claims 1 to 9 by calling the computer program.
PCT/CN2018/110632 2017-10-31 2018-10-17 Application cleaning method and apparatus, and storage medium and electronic device WO2019085754A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711050187.6A CN107807730B (en) 2017-10-31 2017-10-31 Using method for cleaning, device, storage medium and electronic equipment
CN201711050187.6 2017-10-31

Publications (1)

Publication Number Publication Date
WO2019085754A1 true WO2019085754A1 (en) 2019-05-09

Family

ID=61583133

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/110632 WO2019085754A1 (en) 2017-10-31 2018-10-17 Application cleaning method and apparatus, and storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN107807730B (en)
WO (1) WO2019085754A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107807730B (en) * 2017-10-31 2019-12-03 Oppo广东移动通信有限公司 Using method for cleaning, device, storage medium and electronic equipment
CN111050385A (en) * 2018-10-15 2020-04-21 中兴通讯股份有限公司 Application cleaning method, device, equipment and readable storage medium
CN111797859A (en) * 2019-04-09 2020-10-20 Oppo广东移动通信有限公司 Feature processing method, feature processing device, storage medium and electronic equipment
CN113705107B (en) * 2021-09-01 2023-09-08 桂林电子科技大学 Power consumption analysis method based on mean value ridge regression

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902266A (en) * 2012-12-26 2014-07-02 中兴通讯股份有限公司 Method and device for cleaning application running in background
CN104298549A (en) * 2014-09-30 2015-01-21 北京金山安全软件有限公司 Method and device for cleaning application programs in mobile terminal and mobile terminal
CN104866069A (en) * 2015-06-12 2015-08-26 广东小天才科技有限公司 Method and device for automatically clearing background application programs
CN107133094A (en) * 2017-06-05 2017-09-05 努比亚技术有限公司 Application management method, mobile terminal and computer-readable recording medium
CN107807730A (en) * 2017-10-31 2018-03-16 广东欧珀移动通信有限公司 Using method for cleaning, device, storage medium and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763503B (en) * 2009-12-30 2012-08-22 中国科学院计算技术研究所 Face recognition method of attitude robust
CN104159294B (en) * 2014-08-01 2018-05-25 西南科技大学 A kind of cloud locating platform based on 4.0 technology of bluetooth
US9910481B2 (en) * 2015-02-13 2018-03-06 Intel Corporation Performing power management in a multicore processor
CN104899474B (en) * 2015-06-09 2018-02-09 大连三生科技发展有限公司 Method and system based on ridge regression correction MB seq methylation levels
CN106709295A (en) * 2016-12-08 2017-05-24 湖南文理学院 Intelligent terminal program permission control method based on finger screen-touching information analysis

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902266A (en) * 2012-12-26 2014-07-02 中兴通讯股份有限公司 Method and device for cleaning application running in background
CN104298549A (en) * 2014-09-30 2015-01-21 北京金山安全软件有限公司 Method and device for cleaning application programs in mobile terminal and mobile terminal
CN104866069A (en) * 2015-06-12 2015-08-26 广东小天才科技有限公司 Method and device for automatically clearing background application programs
CN107133094A (en) * 2017-06-05 2017-09-05 努比亚技术有限公司 Application management method, mobile terminal and computer-readable recording medium
CN107807730A (en) * 2017-10-31 2018-03-16 广东欧珀移动通信有限公司 Using method for cleaning, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN107807730A (en) 2018-03-16
CN107807730B (en) 2019-12-03

Similar Documents

Publication Publication Date Title
WO2019062417A1 (en) Application cleaning method and apparatus, storage medium and electronic device
WO2019085754A1 (en) Application cleaning method and apparatus, and storage medium and electronic device
WO2019062414A1 (en) Method and apparatus for managing and controlling application program, storage medium, and electronic device
CN109947496B (en) Application program preloading method and device, storage medium and mobile terminal
WO2019062418A1 (en) Application cleaning method and apparatus, storage medium and electronic device
EP3502878B1 (en) Method for preloading application and terminal device
WO2019062342A9 (en) Background application cleaning method and apparatus, and storage medium and electronic device
WO2019062460A1 (en) Application control method and apparatus, storage medium and electronic device
CN107835311B (en) Application management method and device, storage medium and electronic equipment
CN107870810B (en) Application cleaning method and device, storage medium and electronic equipment
WO2019062405A1 (en) Application program processing method and apparatus, storage medium, and electronic device
JP2020537213A (en) Methods for reducing terminal power consumption, and terminals
US11422831B2 (en) Application cleaning method, storage medium and electronic device
WO2022161325A1 (en) Prompting method and electronic device
CN107943570B (en) Application management method and device, storage medium and electronic equipment
WO2019062419A1 (en) Application cleaning method and apparatus, storage medium and electronic device
CN107943571B (en) Background application control method and device, storage medium and electronic equipment
WO2019062341A1 (en) Background application cleaning method and apparatus, and storage medium and electronic device
WO2019062409A1 (en) Method for managing and controlling background application program, storage medium, and electronic device
CN107797832B (en) Application cleaning method and device, storage medium and electronic equipment
CN107748697B (en) Application closing method and device, storage medium and electronic equipment
WO2019062404A1 (en) Application program processing method and apparatus, storage medium, and electronic device
CN107870811B (en) Application cleaning method and device, storage medium and electronic equipment
CN107943535B (en) Application cleaning method and device, storage medium and electronic equipment
WO2020206690A1 (en) Application cleaning method and apparatus, storage medium and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18873385

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18873385

Country of ref document: EP

Kind code of ref document: A1