[go: up one dir, main page]

CN107807730B - Application cleaning method and device, storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN107807730B
CN107807730B CN201711050187.6A CN201711050187A CN107807730B CN 107807730 B CN107807730 B CN 107807730B CN 201711050187 A CN201711050187 A CN 201711050187A CN 107807730 B CN107807730 B CN 107807730B
Authority
CN
China
Prior art keywords
ridge regression
application
feature set
error
ridge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711050187.6A
Other languages
Chinese (zh)
Other versions
CN107807730A (en
Inventor
曾元清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711050187.6A priority Critical patent/CN107807730B/en
Publication of CN107807730A publication Critical patent/CN107807730A/en
Priority to PCT/CN2018/110632 priority patent/WO2019085754A1/en
Application granted granted Critical
Publication of CN107807730B publication Critical patent/CN107807730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Image Analysis (AREA)

Abstract

本申请实施例公开了一种应用清理方法、装置、存储介质及电子设备,其中,本申请实施例获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗。

The embodiments of the present application disclose an application cleaning method, device, storage medium and electronic device, wherein the embodiments of the present application obtain multidimensional features of an application to obtain a training feature set of the application; train a ridge regression model according to the training feature set of the application to obtain a trained ridge regression model; obtain multidimensional features of the application to obtain a prediction feature set of the application; predict whether the application is cleanable according to the prediction feature set and the trained ridge regression model; so as to clean up cleanable applications; this scheme can realize automatic cleaning of applications, improve the running fluency of electronic devices, and reduce power consumption.

Description

应用清理方法、装置、存储介质及电子设备Application cleaning method, device, storage medium and electronic device

技术领域technical field

本申请涉及通信技术领域,具体涉及一种应用清理方法、装置、存储介质及电子设备。The present application relates to the field of 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 at the same time, wherein one application runs in the foreground and other applications run in the background. If the applications running in the background are not cleaned up for a long time, the available memory of the electronic device will become smaller, and the utilization rate of the central processing unit (CPU) will be too high, which will cause the electronic device to run slowly, freeze, and consume power. Too fast and so on. Therefore, it is necessary to provide a method to solve the above problems.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本申请实施例提供了一种应用清理方法、装置、存储介质及电子设备,能够提高电子设备的运行流畅度,降低功耗。In view of this, embodiments of the present application provide an application cleaning method, device, storage medium, and electronic device, which can improve the running smoothness of the electronic device and reduce power consumption.

第一方面,本申请实施例了提供了的一种应用清理方法,包括:In the first aspect, an application cleaning method provided by the embodiment of the present application includes:

获取应用的多维特征,得到所述应用的训练特征集合;Obtain the multi-dimensional features of the application, and obtain the training feature set of the application;

根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;The ridge regression model is trained according to the training feature set of the application, and the trained ridge regression model is obtained;

获取所述应用的多维特征,得到所述应用的预测特征集合;Obtain the multi-dimensional features of the application, and obtain the predicted feature set of the application;

根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。Based on the predicted feature set and the trained ridge regression model, predict whether the application is cleanable.

第二方面,本申请实施例了提供了的一种应用清理装置,包括:In the second aspect, the embodiment of the present application provides an application cleaning device, including:

训练特征获取单元,用于获取应用的多维特征,得到所述应用的训练特征集合;a training feature acquisition unit, used for acquiring multi-dimensional features of an application, and obtaining a training feature set of the application;

训练单元,用于根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;A training unit, used for training the ridge regression model according to the training feature set of the application, to obtain the trained ridge regression model;

预测特征获取单元,用于获取所述应用的多维特征,得到所述应用的预测特征集合;a predictive feature acquisition unit, configured to acquire multidimensional features of the application, and obtain a predictive feature set of the application;

预测单元,用于根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。A prediction unit, configured to predict whether the application can be cleaned 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 stores a computer program thereon, and when the computer program runs on a computer, the computer causes the computer to execute the application cleaning method provided by 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, the memory has a computer program, and the processor is configured to execute the application provided by any embodiment of the present application by invoking the computer program. cleanup method.

本申请实施例获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗。The embodiment of the present application acquires the multi-dimensional features of the application, and obtains the training feature set of the application; trains the ridge regression model according to the training feature set of the application, and obtains the trained ridge regression model; acquires the multi-dimensional features of the application, and obtains the prediction feature set of the application ; According to the predicted feature set and the trained ridge regression model, predict whether the application can be cleaned; in order to clean the application that can be cleaned; this solution can realize the automatic cleaning of the application, improve the running smoothness of the electronic device, and reduce the power consumption .

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.

图1为本申请实施例提供的应用清理方法的应用场景示意图。FIG. 1 is a schematic diagram of an application scenario of an application cleaning method provided by an embodiment of the present application.

图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 provided by an embodiment of the present application.

图5是本申请实施例提供的应用清理装置的另一结构示意图。FIG. 5 is another schematic structural diagram of the application cleaning device provided by the embodiment of the present application.

图6是本申请实施例提供的电子设备的一个结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

图7是本申请实施例提供的电子设备的另一结构示意图。FIG. 7 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

请参照图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Please refer to the drawings, wherein the same component symbols represent the same components, and the principles of the present application are exemplified by being implemented in a suitable computing environment. The following description is based on illustrated specific embodiments of the present application and should not be construed as limiting other specific embodiments of the present application not detailed herein.

在以下的说明中,本申请的具体实施例将参考由一部或多部计算机所执行的步骤及符号来说明,除非另有述明。因此,这些步骤及操作将有数次提到由计算机执行,本文所指的计算机执行包括了由代表了以一结构化型式中的数据的电子信号的计算机处理单元的操作。此操作转换该数据或将其维持在该计算机的内存系统中的位置处,其可重新配置或另外以本领域测试人员所熟知的方式来改变该计算机的运作。该数据所维持的数据结构为该内存的实体位置,其具有由该数据格式所定义的特定特性。但是,本申请原理以上述文字来说明,其并不代表为一种限制,本领域测试人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。In the following description, specific embodiments of the present application will be described with reference to steps and symbols performed by one or more computers, unless otherwise stated. Accordingly, the steps and operations will be referred to several times as being performed by a computer, which reference herein includes operations performed by a computer processing unit of electronic signals representing data in a structured format. This operation transforms or maintains the data at a location in the computer's memory system, which can be reconfigured or otherwise alter the operation of the computer in a manner well known to testers in the art. The data structures maintained by the data are physical locations of the memory that have specific characteristics defined by the data format. However, the principles of the present application are described by the above text, which is not meant to be a limitation, and testers in the art will understand that various steps and operations described below can also be implemented in hardware.

本文所使用的术语“模块”可看做为在该运算系统上执行的软件对象。本文所述的不同组件、模块、引擎及服务可看做为在该运算系统上的实施对象。而本文所述的装置及方法可以以软件的方式进行实施,当然也可在硬件上进行实施,均在本申请保护范围之内。As used herein, the term "module" can be thought of as a software object that executes on the computing system. The various components, modules, engines, and services described herein may be considered objects of implementation on the computing system. The apparatus and method described herein can be implemented in software, and certainly can also be implemented in hardware, which are all within the protection scope of the present application.

本申请中的术语“第一”、“第二”和“第三”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是某些实施例还包括没有列出的步骤或模块,或某些实施例还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。The terms "first," "second," and "third," etc. in this application are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or modules is not limited to the listed steps or modules, but some embodiments also include unlisted steps or modules, or some embodiments Other steps or modules inherent to these processes, methods, products or devices are also included.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

本申请实施例提供一种应用清理方法,该应用清理方法的执行主体可以是本申请实施例提供的后台应用清理装置,或者集成了该应用清理装置的电子设备,其中该应用清理装置可以采用硬件或者软件的方式实现。其中,电子设备可以是智能手机、平板电脑、掌上电脑、笔记本电脑、或者台式电脑等设备。The embodiment of the present application provides an application cleaning method, and the execution body of the application cleaning method may be the background application cleaning device provided by the embodiment of the present application, or an electronic device integrating the application cleaning device, wherein the application cleaning device may adopt hardware or software implementation. The electronic device may be a smart phone, a tablet computer, a palmtop computer, a notebook computer, or a desktop computer and other devices.

请参阅图1,图1为本申请实施例提供的应用清理方法的应用场景示意图,以应用清理装置集成在电子设备中为例,电子设备可以获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理。此外,电子设备还可以可清理的应用进行清理。Please refer to FIG. 1. FIG. 1 is a schematic diagram of an application scenario of an application cleaning method provided by an embodiment of the present application. Taking the integration of an application cleaning device in an electronic device as an example, the electronic device can acquire multi-dimensional features of applications and obtain training feature sets of applications; Train the ridge regression model according to the training feature set of the application to obtain the trained ridge regression model; obtain the multi-dimensional features of the application to obtain the prediction feature set of the application; according to the prediction feature set and the trained ridge regression model, predict whether the application is feasible clean up. In addition, electronic devices can be cleaned with a cleanable app.

具体地,例如图1所示,以判断后台运行的应用程序a(如邮箱应用、游戏应用等)是否可以清理为例,可以在历史时间段内,采集应用a的多维特征(例如应用a在后台运行的时长、应用a运行的时间信息等),得到应用a的特征集合,根据特征集合(例如应用a在后台运行的时长、应用a运行的时间信息等)对岭回归模型进行训练,得到训练后的岭回归模型;根据预测时间(如t)采集应用对应的多维特征(例如在t时刻应用a在后台运行的时长、应用a运行的时间信息等),得到应用a的预测特征集合;根据预测特征集合和训练后的岭回归模型预测应用a是否可清理。此外,当预测应用a可清理时,电子设备对应用a进行清理。Specifically, for example, as shown in FIG. 1 , taking the judgment of whether an application a (such as a mailbox application, a game application, etc.) running in the background can be cleaned up as an example, the multi-dimensional features of the application a (for example, the application a in the The duration of background running, the running time information of application a, etc.), the feature set of application a is obtained, and the ridge regression model is trained according to the feature set (such as the duration of application a running in the background, the running time information of application a, etc.), and the obtained Ridge regression model after training; collect multi-dimensional features corresponding to the application according to the prediction time (such as t) (for example, the duration of application a running in the background at time t, the time information of application a running, etc.), and obtain the prediction feature set of application a; Predict whether application a is cleanable based on the predicted feature set and the trained ridge regression model. In addition, when the application a is predicted to be cleanable, the electronic device cleans the application a.

请参阅图2,图2为本申请实施例提供的应用清理方法的流程示意图。本申请实施例提供的应用清理方法的具体流程可以如下:Please refer to FIG. 2 , which is a schematic flowchart of an application cleaning method provided by 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 multi-dimensional features of the application, and obtain a training feature set of the application.

本申请实施例所提及的应用,可以是电子设备上安装的任何一个应用,例如办公应用、通信应用、游戏应用、购物应用等。其中,应用可以包括前台运行的应用,即前台应用,也可以包括后台运行的应用,即后台应用。The application mentioned in the embodiments of this application may be any application installed on an electronic device, such as an office application, a communication application, a game application, a shopping application, and the like. The applications may include applications running in the foreground, ie, foreground applications, or applications running in the background, ie, background applications.

在一实施例中,可以接收应用清理请求,根据应用清理请求确定待清理的应用,然后,获取应用的多维特征,得到应用的训练特征集合。In one embodiment, an application cleaning request may be received, an application to be cleaned is determined according to the application cleaning request, and then multi-dimensional features of the application are acquired to obtain a training feature set of the application.

具体地,可以从特征数据库中获取应用的多维特征,其中,多维特征可以为历史时间采集到的多维特征,也即历史多维特征。特征数据库中存储有应用在历史时间的多种特征。Specifically, the multi-dimensional features of the application can be obtained from the feature database, where the multi-dimensional features can be multi-dimensional features collected in historical time, that is, historical multi-dimensional features. A variety of features applied in historical time are stored in the feature database.

其中,训练特征集合可以包括应用的多维特征,即应用的多个特征。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 on each dimension correspond to a type of feature information representing the application, that is, the multi-dimensional feature information is composed of multiple features. The multiple features may include feature information related to the application itself, such as: the duration of the application being switched to the background; the duration of the screen off of the electronic device when the application was switched to the background; the number of times the application entered the foreground; the time the application was in the foreground; the application was in the background time, the way the application enters the background, such as being switched by the home key (home key), switched by the return key, switched by other applications, etc.; application types, including primary (commonly used applications), secondary (other applications) )Wait.

该多维特征信息还可以包括应用所在的电子设备的相关特征信息,例如:电子设备的灭屏时间、亮屏时间、当前电量,电子设备的无线网络连接状态,电子设备是否在充电状态等。The multi-dimensional feature information may also include feature information about the electronic device where the application is located, such as: screen-off time, screen-on time, current battery level, wireless network connection status of the electronic device, whether the electronic device is in a charging state, etc.

其中,应用的训练样本包括应用的多维特征。该多维特征可以是在历史时间段内,按照预设频率采集的多个特征。历史时间段,例如可以是过去7天、10天;预设频率,例如可以是每10分钟采集一次、每半小时采集一次。可以理解的是,一次采集的应用的多维特征数据构成一个训练特征集合。The applied training samples include applied multi-dimensional features. The multi-dimensional features may be multiple features collected at a preset frequency within a historical time period. The historical time period can be, for example, the past 7 days or 10 days; the preset frequency, for example, can be collected once every 10 minutes or once every half an hour. It can be understood that the multi-dimensional feature data of the application collected at one time constitutes a training feature set.

在一实施例中,为便于应用清理,可以将应用的多维特征信息中,未用数值直接表示的特征信息用具体的数值量化出来,例如针对电子设备的无线网连接状态这个特征信息,可以用数值1表示正常的状态,用数值0表示异常的状态(反之亦可);再例如,针对电子设备是否在充电状态这个特征信息,可以用数值1表示充电状态,用数值0表示未充电状态(反之亦可)。In one embodiment, in order to facilitate application cleaning, the feature information that is not directly represented by numerical values in the multi-dimensional feature information of the application can be quantified with specific numerical values. A value of 1 indicates a normal state, and a value of 0 indicates an abnormal state (and vice versa). For another example, for the characteristic information of whether an electronic device is in a charged state, a value of 1 can be used to indicate a charged state, and a value of 0 is used to indicate an uncharged state ( vice versa).

202、根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型。202. Train the ridge regression model according to the applied training feature set to obtain a trained ridge regression model.

其中,岭回归模型可以一种机器学习算法,岭回归(ridge regression,Tikhonovregularization)算法又称为脊回归是一种专用于共线性数据分析的有偏估计回归方法,实质上是一种改良的最小二乘估计法,通过放弃最小二乘法的无偏性,以损失部分信息、降低精度为代价获得回归系数更为符合实际、更可靠的回归方法,对病态数据的拟合要强于最小二乘法。Among them, the ridge regression model can be a machine learning algorithm, and the ridge regression (Tikhonovregularization) algorithm, also known as the ridge regression, is a biased estimation regression method dedicated to the analysis of collinear data. The square estimation method, by giving up the unbiasedness of the least squares method, obtains the regression coefficients at the expense of losing some information and reducing the accuracy, which is more practical and reliable.

本申请实施例中,可以利用岭回归模型来预测应用是否可清理,其中,岭回归模型的输出包括可清理、或不可清理。在利用岭回归模型预测应用是否可清理时,需要利用已有的特征信息对模型进行训练,提升预测的准确性。In this embodiment of the present application, a ridge regression model can be used to predict whether an application can be cleaned up, 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, it is necessary to use the existing feature information to train the model to improve the accuracy of the prediction.

在一实施例中,对岭回归模型训练的过程就是求解岭回归模型的岭回归参数的过程,比如,可以先计算出岭回归模型所需的岭回归参数,然后,基于该岭回归参数对岭回归模型进行设置。比如,步骤“根据应用的训练样本对岭回归模型进行训练,得到训练后的述岭回归模型”,可以包括:In one embodiment, the process of training the ridge regression model is the process of solving the ridge regression parameters of the ridge regression model. Set up the regression model. For example, the step "train the ridge regression model according to the applied training samples, and obtain the described ridge regression model after training", which may include:

建立岭回归模型的误差判断函数;Establish the error judgment function of the ridge regression model;

根据训练特征集合和误差判断函数获取岭回归模型的目标岭回归参数,目标岭回归参数包括岭参数和回归参数;Obtain the target ridge regression parameters of the ridge regression model according to the training feature set and the error judgment function, and the target ridge regression parameters include ridge parameters and regression parameters;

根据目标岭回归参数和岭回归模型得到训练后的岭回归模型。The trained ridge regression model is obtained according to the target ridge regression parameters and the ridge regression model.

其中,岭回归参数可以包括岭参数和回归参数,岭回归(Ridge Regression)是在平方误差的基础上增加正则项,通过确定λ的值可以使得在方差和偏差之间达到平衡:随着λ的增大,模型方差减小而偏差增大。岭参数可以正则化参数λ,该回归参数可以为待求解的岭回归模型的模型参数w。Among them, the ridge regression parameters can include ridge parameters and regression parameters. Ridge regression (Ridge Regression) is to add a regular term on the basis of the squared error. By determining the value of λ, a balance between variance and bias can be achieved: as λ increases increases, the model variance decreases and the bias increases. The ridge parameter can normalize the parameter λ, and the regression parameter 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 the loss function of the ridge regression model, which is used to calculate the error between the output value of the ridge regression model on the sample and the real value.

在一实施例中,岭回归模型的误差判断函数可以包括如下函数:In one embodiment, the error judgment function of the ridge regression model may include the following functions:

其中,λ为岭参数,即正则化参数,x为样本的特征,w为岭回归模型的回归参数,n为特征的维度。Among them, λ is the ridge parameter, that is, the regularization parameter, x is the feature of the sample, w is the regression parameter of the ridge regression model, and n is the dimension of the feature.

在一实施例中,可以对岭回归模型的误差判断函数进行变形,得到回归参数获取函数,然后,基于回归参数获取函数来获取岭回归参数。比如,可以对误差判断函数进行求导,以得到回归参数获取函数,然后,基于该回归参数获取函数和训练特征集合获取岭回归参数。In one 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 parameters are acquired based on the regression parameter acquisition function. For example, the error judgment function can be derived to obtain the regression parameter acquisition function, and then the ridge regression parameters can be obtained based on the regression parameter acquisition function and the training feature set.

例如,岭回归模型的误差判断函数可以包括如下函数:For example, the error judgment function of the ridge regression model can include the following functions:

可以对误差判断函数进行求导,得到函数:The error judgment function can be derived to get the function:

2XT(Y-XW)-2λW,X为特征x的矩阵或向量,XT为X的转置,Y为y的矩阵或向量;2X T (Y-XW)-2λW, X is the matrix or vector of feature x, X T is the transpose of X, and Y is the matrix or vector of y;

然后,令2XT(Y-XW)-2λW等零,可以得到如下的回归参数计算公式:Then, let 2X T (Y-XW)-2λW equal to zero, the following regression parameter calculation formula can be obtained:

其中,为待求解的回归参数。in, are the regression parameters to be solved.

在得到回归参数计算公式后,便可以基于该公式和训练特征集合来计算回归参数最终得到岭参数λ以及相应的回归参数 After the regression parameter calculation formula is obtained, the regression parameter can be calculated based on the formula and the training feature set Finally, the ridge parameter λ and the corresponding regression parameter are obtained

在一实施例中,为了提升预测准确性,可以计算出多组岭回归参数,然后,选取最合适的岭回归参数。比如,步骤“根据训练特征集合和误差判断函数获取岭回归模型的目标岭回归参数”,可以包括:In one 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 may be selected. For example, the step "obtaining the target ridge regression parameters of the ridge regression model according to the training feature set and the error judgment function" may include:

根据误差判断函数获取多组岭回归参数,岭回归参数包括:岭参数和回归参数;Obtain multiple sets of ridge regression parameters according to the error judgment function, and the ridge regression parameters include: ridge parameters and regression parameters;

根据训练特征集合、岭回归参数和误差判断函数,获取在岭回归参数下训练特征集合对于岭回归模型的误差,得到每组岭回归参数对应的误差;According to the training feature set, the ridge regression parameters and the error judgment function, the error of the training feature set for the ridge regression model under the ridge regression parameters is obtained, and the error corresponding to each group of ridge regression parameters is obtained;

根据每组岭回归参数对应的误差,从多组岭回归参数中选取相应的目标岭回归参数;According to the error corresponding to each set of ridge regression parameters, select the corresponding target ridge regression parameter from multiple sets of ridge regression parameters;

根据目标岭回归参数和岭回归模型得到训练后的岭回归模型。The trained ridge regression model is obtained according to the target ridge regression parameters and the ridge regression model.

其中,岭回归参数对应的误差为该岭回归参数下的岭回归模型,输入训练样本集合得出的预测值与真实值之间的误差。Among them, 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 obtained from the input training sample set and the actual value.

比如,可以获取岭回归参数其中,m可以为大于2的正整数,可以根据实际需求设定,比如,20、30、40……。For example, the ridge regression parameters can be obtained Among them, m can be a positive integer greater than 2, and can be set according to actual needs, for example, 20, 30, 40 . . .

然后,根据训练特征集合、岭回归参数以及误差判断函数,获取在该组回归参数下训练特征集合对于岭回归模型的误差Fk,得到每组岭回归参数对应的误差如F1、F2……Fk……Fm。基于每组岭回归参数对应的误差F从岭回归参数选取相应的目标岭回归参数 Then, according to the training feature set, ridge regression parameters and the error judgment function to obtain the regression parameters in this group The error Fk of the training feature set for the ridge regression model is obtained, and the corresponding errors of each group of ridge regression parameters, such as F1, F2...Fk...Fm, are obtained. Based on the error F corresponding to each set of ridge regression parameters from the ridge regression parameters Select the corresponding target ridge regression parameters

在一实施例中,可以对岭回归模型的误差判断函数进行变形,得到回归参数获取函数,然后,基于回归参数获取函数以及多个预设岭参数λ来获取回归参数得到多组岭回归参数比如,可以对误差判断函数进行求导,以得到回归参数获取函数,然后,基于该回归参数获取函数和训练特征集合获取岭回归参数。In one embodiment, the error judgment function of the ridge regression model can be deformed to obtain a regression parameter acquisition function, and then the regression parameters are acquired based on the regression parameter acquisition function and a plurality of preset ridge parameters λ. Get multiple sets of ridge regression parameters For example, the error judgment function can be derived to obtain the regression parameter acquisition function, and then the ridge regression parameters can be obtained based on the regression parameter acquisition function and the training feature set.

例如,岭回归模型的误差判断函数可以包括如下函数:For example, the error judgment function of the ridge regression model can include the following functions:

可以对误差判断函数进行求导,得到函数:The error judgment function can be derived to get the function:

2XT(Y-XW)-2λW,X为特征x的矩阵或向量,XT为X的转置,Y为y的矩阵或向量;2X T (Y-XW)-2λW, X is the matrix or vector of feature x, X T is the transpose of X, and Y is the matrix or vector of y;

然后,令2XT(Y-XW)-2λW等零,可以得到如下的回归参数计算公式:Then, let 2X T (Y-XW)-2λW equal to zero, the following regression parameter calculation formula can be obtained:

其中,为待求解的回归参数。in, are the regression parameters to be solved.

在得到回归参数计算公式后,便可以基于该公式和多个预设岭参数λ来计算回归参数最终得到岭参数λ以及相应的回归参数 After the regression parameter calculation formula is obtained, the regression parameters can be calculated based on the formula and multiple preset ridge parameters λ Finally, the ridge parameter λ and the corresponding regression parameter are obtained

例如,初始化岭参数λ的值为1,利用公式计算求得λ=1对应的值;λ加1,重复利用公式求得λ=2对应的值;λ再加1,重复利用公式求得λ=3对应的值……直到求得λ=m对应的值,比如m=20。此时,便可以得到m组如20组不同的值,进而得到m组如20组 For example, to initialize the ridge parameter λ to a value of 1, use the formula Calculated to obtain the corresponding λ=1 value; add 1 to λ and reuse the formula Find the corresponding to λ=2 value; add 1 to λ and reuse the formula Find λ=3 corresponding to Value...until the corresponding λ=m is obtained value, such as m=20. At this point, m groups such as 20 different groups can be obtained. value, and then get m groups such as 20 groups

在一实施例中,为了能够准确性地和快速地获取训练特征集合对于岭回归模型的误差,可以将训练特征集合划分成多个子训练特征集合,获取各子训练特征集合在岭回归参数下对于岭回归模型的误差f,然后,基于各子训练特征集合在岭回归参数下对于岭回归模型的误差得到整个训练特征集合在岭回归参数下对于岭回归模型的误差F。In one embodiment, in order to accurately and quickly obtain the error of the training feature set for the ridge regression model, the training feature set can be divided into multiple sub-training feature sets, and each sub-training feature set is obtained under the ridge regression parameters. Then, based on the error f of each sub-training feature set under the ridge regression parameters for the ridge regression model, the error F of the entire training feature set under the ridge regression parameters for the ridge regression model is obtained.

比如,步骤“根据训练特征集合、岭回归参数和误差判断函数,获取在岭回归参数下训练特征集合对于岭回归模型的误差”,可以包括:For example, the step "acquiring the error of the training feature set for the ridge regression model under the ridge regression parameters according to the training feature set, the ridge regression parameters and the error judgment function" may include:

将训练特征集合划分成多个子训练特征集合;Divide the training feature set into multiple sub-training feature sets;

根据子训练特征集合、岭回归参数以及误差判断函数,获取在岭回归参数下子训练集合对于岭回归模型的子误差,得到每个子训练特征集合对应的子误差;According to the sub-training feature set, the ridge regression parameters and the error judgment function, obtain the sub-error of the sub-training set for the ridge regression model under the ridge regression parameter, and obtain the sub-error corresponding to each sub-training feature set;

每个子训练特征集合对应的子误差,获取在岭回归参数下训练特征集合对于岭回归模型的误差。The sub-error corresponding to each sub-training feature set is obtained, and the error of the training feature set for the ridge regression model under the ridge regression parameters is obtained.

其中,子训练特征集合划分数量可以根据实际需求设定,比如10个、20个等等。在一实施例中,为提升误差获取的准确度,子训练特征集合包含的特征数量相等,也即将训练特征集合等分成多个子训练特征集合。The number of sub-training feature sets divided can be set according to actual needs, such as 10, 20, and so on. In one embodiment, in order to improve the accuracy of error acquisition, the sub-training feature sets include the same number of features, that is, the training feature set is divided into multiple sub-training feature sets equally.

例如,可以将训练特征集合D划分成M个子训练特征集合,得到子训练特征集合D1、D2……DM;其中,M为大于1的正整数。然后,根据误差判断函数以及岭回归参数,计算每个子训练特征集合在岭回归参数下对于岭回归模型的子误差,如D1在岭回归参数下对于岭回归模型的子误差f11、D2在岭回归参数下对于岭回归模型的子误差f12、……DM在岭回归参数下对于岭回归模型的子误差f1M,基于每个子训练特征集合在该在岭回归参数下对于岭回归模型的子误差,即f11、f12……f1M获取训练特征D在岭回归参数下对于岭回归模型的误差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; where M is a positive integer greater than 1. Then, according to the error judgment function and the ridge regression parameters, calculate the sub-error of each sub-training feature set for the ridge regression model under the ridge regression parameters, such as D1 in the ridge regression parameters The following sub-errors f11, D2 for the ridge regression model are in the ridge regression parameters For the sub-error f12 of the ridge regression model, ... DM is in the ridge regression parameter Below the sub-error f1M for the ridge regression model, based on each sub-training feature set in the ridge regression parameter The following sub-errors for the ridge regression model, that is, f11, f12...f1M to obtain the training feature D in the ridge regression parameters Below is the error F1 for the ridge regression model.

接着,根据误差判断函数以及下一组岭回归参数,计算每个子训练特征集合在岭回归参数下对于下一组岭回归模型的子误差,如D1在岭回归参数 下对于岭回归模型的子误差f21、D2在岭回归参数下对于岭回归模型的子误差f22、……DM在岭回归参数下对于岭回归模型的子误差f2M,基于每个子训练特征集合在该在岭回归参数下对于岭回归模型的子误差,即f21、f22……f2M获取训练特征D在岭回归参数 下对于岭回归模型的误差F2。Next, according to the error judgment function and the next set of ridge regression parameters, calculate the sub-errors of each sub-training feature set for the next set of ridge regression models under the ridge regression parameters, such as D1 in the ridge regression parameters The following sub-errors f21, D2 for the ridge regression model are in the ridge regression parameters For the sub-error f22 of the ridge regression model, ... DM is in the ridge regression parameter Below the sub-error f2M for the ridge regression model, based on each sub-training feature set in the ridge regression parameters For the sub-error of the ridge regression model, that is, f21, f22... f2M obtains the training feature D in the ridge regression parameter Below is the error F2 for the ridge regression model.

依次类推,可以计算出训练特征集合在m组岭回归参数对于岭回归模型的误差,得到误差F1、F2……Fm。By analogy, the error of the training feature set in the m groups of ridge regression parameters for the ridge regression model can be calculated, and the errors F1, F2, ... Fm can be obtained.

本申请实施例在得到每个子训练特征集合对应的子误差后,便可以基于子误差获取整个训练特征集合对于岭回归模型的误差,该获取方式可以有多种。比如,在一实施例中,为了提升误差的准确性,可以计算子误差的平均值,然后,基于平均值获取整个训练特征集合对于岭回归模型的误差。比如,步骤“根据每个子训练特征集合对应的子误差,获取在岭回归参数下训练特征集合对于岭回归模型的误差”,可以包括:In this embodiment of the present application, after the sub-errors corresponding to each sub-training feature set are obtained, the errors of the entire training feature set with respect to the ridge regression model can be obtained based on the sub-errors, and the obtaining methods can be various. For example, in an embodiment, in order to improve the accuracy of the errors, the average value of the sub-errors may be calculated, and then, based on the average value, the errors of the entire training feature set for the ridge regression model are obtained. For example, the step "According to the sub-error corresponding to each sub-training feature set, obtain the error of the training feature set for the ridge regression model under the ridge regression parameters", which may include:

根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;According to the sub-error corresponding to each sub-training feature set, obtain the average error of the sub-training feature set;

根据平均误差获取在岭回归参数下训练特征集合对于岭回归模型的误差。According to the average error, the error of the training feature set for the ridge regression model under the ridge regression parameters is obtained.

在一实施例中,可以将该平均误差作为在岭回归参数下训练特征集合对于岭回归模型的误差。In one embodiment, the average error can be used as the error of the ridge regression model trained on the feature set under the ridge regression parameters.

比如,以岭回归参数为为例,在计算出各子下对于岭回归模型的子误差f11、D2在岭回归参数下对于岭回归模型的子误差f12、……DM在岭回归参数下对于岭回归模型的子误差f1M,基于每个子训练特征集合在该在岭回归参数下对于岭回归模型的子误差,即f11、f12……f1M后,可以计算平均误差f’=(f11+f12+……+f1M)/M;该f’即为训练特征D在岭回归参数下对于岭回归模型的误差F1。For example, taking the ridge regression parameters as For example, after calculating the sub-errors f11 and D2 of the ridge regression model under each sub-section, the ridge regression parameters For the sub-error f12 of the ridge regression model, ... DM is in the ridge regression parameter Below the sub-error f1M for the ridge regression model, based on each sub-training feature set in the ridge regression parameter For the sub-errors of the ridge regression model, that is, after 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 Below is the error F1 for the ridge regression model.

在一实施例中,为了提升参数准确性以及预测精确性,可以在得到每组岭回归参数对应的误差后,可以选取误差最小对应的岭回归参数作为岭回归模型的目标岭回归参数,即最终参数。In one embodiment, in order to improve parameter accuracy and prediction accuracy, after obtaining the error corresponding to each group of ridge regression parameters, the ridge regression parameter corresponding to the smallest error can be selected as the target ridge regression parameter of the ridge regression model, that is, the final ridge regression parameter. parameter.

比如,在得到每组岭回归参数对应的误差如F1、F2……Fk……Fm后,假设Fk最小,此时,可以选取Fk对应的岭回归参数作为岭回归模型的目标岭回归参数。For example, after obtaining the error corresponding to each set of ridge regression parameters, such as F1, F2...Fk...Fm, assuming that Fk is the smallest, at this time, the ridge regression parameter corresponding to Fk can be selected As the target ridge regression parameter of the ridge regression model.

根据上述描述,下面将以岭回归参数为20组、子训练特征集合数量为10来介绍目标岭回归参数的选取过程,也即岭回归模型的训练过程,如下:According to the above description, the following will introduce the selection process of the target ridge regression parameters, that is, the training process of the ridge regression model, with the ridge regression parameters as 20 groups and the number of sub-training feature sets as 10, as follows:

(1)、建立岭回归的误差判断函数为:(1), the error judgment function of establishing ridge regression is:

对进行求导,结果为:Derivative for , the result is:

2XT(Y-XW)-2λW2X T (Y-XW)-2λW

令其值为0可求得w的值为:Set its value to 0 to obtain the value of w:

(2)、初始化λ的值为1,按照(3)步骤中的公式计算求得相应的值。(2), initialize the value of λ to 1, follow the steps in (3) The formula calculates the corresponding value.

(3)、λ加1,重复(2)步骤求得20组不同的值;(3), add 1 to λ, repeat step (2) to obtain 20 different groups of value;

(4)、将特征集合分为10等分,选(3)步骤中的一个数值,下面的误差判断公式分别计算10等分的各个子特征集合对于岭回归的不同误差值,得到10个不同的误差值:(4), Divide the feature set into 10 equal parts, select (3) in step A value of , the following error judgment formula calculates the different error values of each sub-feature set of 10 equal parts for ridge regression, and obtains 10 different error values:

然后计算将10等分各子特征集合对于岭回归的误差值的平均误差值,并将平均误差值作为特征集合在选取的和λ下对岭回归的误差;Then calculate the average error value of the error values of ridge regression by dividing each sub-feature set into 10 equal parts, and use the average error value as the feature set in the selected and the error of ridge regression under λ;

(5)、重复(4)步骤,分别计算出特征集合在20组不同的值下对于岭回归的特征误差;(5), repeat step (4), respectively calculate the feature set in 20 different groups The feature error for ridge regression under the value of ;

(6)、从(5)中求得的20组特征误差取最小值对应的和λ值,该和λ值即为岭回归拟合得到岭回归参数,即岭回归模型最终选用的参数。(6), the 20 groups of characteristic errors obtained from (5) take the minimum value corresponding to the and λ values, the and λ values are the ridge regression parameters obtained by ridge regression fitting, that is, the parameters finally selected by the ridge regression model.

通过上述步骤(1)-(6)可以计算出每个应用对应的岭回归参数。Through the above steps (1)-(6), the ridge regression parameters corresponding to each application can be calculated.

203、获取应用的多维特征,得到应用的预测特征集合。203. Acquire the multi-dimensional features of the application, and obtain the prediction feature set of the application.

比如,可以根据预测时间采集应用的多维特征作为预测样本。For example, multi-dimensional features of the application can be collected as prediction samples according to the prediction time.

其中,预测时间可以根据需求设定,如可以为当前时间等。The forecast time can be set according to requirements, such as the current time.

比如,可以在预测时间点采集应用的多维特征作为预测样本。For example, the multi-dimensional features of the application can be collected as prediction samples at the prediction time point.

本申请实施例中,步骤201和203中采集的多维特征是相同类型特征,例如:应用切入到后台的时长;应用切入到后台期间,电子设备的灭屏时长;应用进入前台的次数;应用处于前台的时间;应用进入后台的方式。In the embodiment of the present application, the multi-dimensional features collected in steps 201 and 203 are of the same type, such as: the duration of the application being switched to the background; the duration of the screen-off of the electronic device during the time the application was switched to the background; the number of times the application entered the foreground; Time in the foreground; how the app goes into the background.

204、根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理。204. 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, it is determined that the application can be cleaned, and so on.

由上可知,本申请实施例获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗和节省了资源。As can be seen from the above, the embodiment of the present application obtains the multi-dimensional features of the application, and obtains the training feature set of the application; the ridge regression model is trained according to the training feature set of the application, and the trained ridge regression model is obtained; the multi-dimensional features of the application are obtained, and the application is obtained. According to the predicted feature set and the trained ridge regression model, it is predicted whether the application can be cleaned; in order to clean up the cleanable applications; this solution can realize the automatic cleaning of the application and improve the running smoothness of the electronic equipment. Reduced power consumption and conserved resources.

进一步地,由于特征集合中,包括了反映用户使用应用的行为习惯的多个特征信息,因此本申请实施例可以使得对对应应用的清理更加个性化和智能化。Further, since the feature set includes a plurality of feature information reflecting the user's behavior habit of using the application, the embodiment of the present application can make the cleaning of the corresponding application more personalized and intelligent.

进一步地,基于岭回归模型来实现应用清理预测,可以提升用户行为预测的准确性,进而提高清理的准确度。此外,本申请实施例在对模型训练时还可以计算出多组岭回归参数,并采用特征误差选取误差最下的岭回归参数,以作为岭回归模型的最终参数,可以进一步地提升岭回归模型对应用清理预测的准确性。Further, implementing application cleaning prediction based on the ridge regression model can improve the accuracy of user behavior prediction, thereby improving the accuracy of cleaning. In addition, the embodiments of the present application can also calculate multiple sets of ridge regression parameters when training the model, and use the feature error to select the ridge regression parameter with the lowest error as the final parameter of the ridge regression model, which can further improve the ridge regression model The accuracy of the applied cleanup predictions.

下面将在上述实施例描述的方法基础上,对本申请的清理方法做进一步介绍。参考图3,该应用清理方法可以包括:The cleaning method of the present application will be further introduced below on the basis of the methods described in the above embodiments. Referring to Figure 3, the application cleaning method may include:

301、获取应用的多维特征,得到应用的训练特征集合。301. Acquire multi-dimensional features of the application, and obtain a training feature set of the application.

比如,从特征数据库中获取应用的多维特征,其中,多维特征可以为历史时间采集到的多维特征,也即历史多维特征。特征数据库中存储有应用在历史时间的多种特征。For example, the multi-dimensional features of the application are obtained from the feature database, wherein the multi-dimensional features may be multi-dimensional features collected in historical time, that is, historical multi-dimensional features. A variety of features applied in historical time are stored in the feature database.

其中,训练特征集合可以包括应用的多维特征,即应用的多个特征。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 on each dimension correspond to a type of feature information representing the application, that is, the multi-dimensional feature information is composed of multiple features. The multiple features may include feature information related to the application itself, such as: the duration of the application being switched to the background; the duration of the screen off of the electronic device when the application was switched to the background; the number of times the application entered the foreground; the time the application was in the foreground; the application was in the background time, the way the application enters the background, such as being switched by the home key (home key), switched by the return key, switched by other applications, etc.; application types, including primary (commonly used applications), secondary (other applications) )Wait.

该多维特征信息还可以包括应用所在的电子设备的相关特征信息,例如:电子设备的灭屏时间、亮屏时间、当前电量,电子设备的无线网络连接状态,电子设备是否在充电状态等。The multi-dimensional feature information may also include feature information about the electronic device where the application is located, such as: screen-off time, screen-on time, current battery level, wireless network connection status of the electronic device, whether the electronic device is in a charging state, etc.

一个具体的训练特征集合可如下所示,包括多个维度(30个维度)的特征信息,需要说明的是,如下所示的特征信息仅为举例,实际中,一个训练特征集合所包含的特征信息的数量,可以多于如下所示信息的数量,也可以少于如下所示信息的数量,所取的具体特征信息也可以与如下所示特征信息不同,此处不作具体限定。A specific training feature set can 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, the features included in a training feature set The quantity of information can be more than or less than the quantity of information shown below, and the specific feature information taken can also be different from the feature information shown below, which is not specifically limited here.

APP上一次切入后台到现在的时长;The last time the APP was switched to the background until now;

APP上一次切入后台到现在的期间中,累计屏幕关闭时间长度;During the period from the last time the APP was switched to the background to the present, the cumulative screen off time length;

APP一天里(按每天统计)进入前台的次数;The number of times the APP enters the front desk in a day (by daily statistics);

APP一天里(休息日按工作日、休息日分开统计)进入前台的次数,比如若当前预测时间为工作日,则该特征使用数值为工作日统计到的平均每个工作日在前台使用次数;The number of times the APP enters the front desk in a day (rest days are counted separately by working days and rest days). For example, if the current forecast time is a working day, the value used for this feature is the average number of times the APP is used at the front desk on a working day;

APP一天中(按每天统计)处于前台的时间;The time that the APP is in the foreground in a day (by daily statistics);

该后台APP紧跟当前前台APP后被打开次数,不分工作日休息日统计所得;The number of times the background APP is opened after the current foreground APP, regardless of working days and rest days;

该后台APP紧跟当前前台APP后被打开次数,分工作日休息日统计;The number of times the background APP is opened after the current front-end APP is counted by working days and rest days;

目标APP被切换的方式,分为被home键切换、被recent键切换、被其他APP切换;The way the target APP is switched is divided into switching by the home button, switching by the recent button, and switching by other APPs;

目标APP一级类型(常用应用);Target APP first-level type (commonly used applications);

目标APP二级类型(其他应用);Target APP secondary type (other applications);

手机屏幕灭屏时间;Mobile phone screen off time;

手机屏幕亮屏时间;The screen time of the mobile phone;

当前屏幕亮灭状态;The current screen is on and off;

当前的电量;current power;

当前wifi状态;current wifi status;

App上一次切入后台到现在的时长;The duration of the last time the app was switched to the background;

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 a day is divided into 6 time segments, each segment is 4 hours, and the current forecast time point is 8:30 in the morning, it is in segment 3, then this feature indicates that the target app is used every day from 8:00 to 12:00. the length of time used;

当前前台APP进入后台到目标APP进入前台按每天统计的平均间隔时间;The average interval time from the current foreground APP entering the background to the target APP entering the foreground according to the daily statistics;

当前前台APP进入后台到目标APP进入前台期间按每天统计的平均屏幕熄灭时间;The average screen off time according to the daily statistics during the period from the current foreground APP entering the background to the target APP entering the foreground;

目标APP在后台停留时间直方图第一个bin(0-5分钟对应的次数占比);The first bin of the histogram of the target APP staying time in the background (the proportion of times corresponding to 0-5 minutes);

目标APP在后台停留时间直方图第一个bin(5-10分钟对应的次数占比);The first bin of the histogram of the target APP staying time in the background (the proportion of times corresponding to 5-10 minutes);

目标APP在后台停留时间直方图第一个bin(10-15分钟对应的次数占比);The first bin of the histogram of the target APP staying time in the background (the proportion of times corresponding to 10-15 minutes);

目标APP在后台停留时间直方图第一个bin(15-20分钟对应的次数占比);The first bin of the histogram of the target APP staying time in the background (the proportion of times corresponding to 15-20 minutes);

目标APP在后台停留时间直方图第一个bin(15-20分钟对应的次数占比);The first bin of the histogram of the target APP staying time in the background (the proportion of times corresponding to 15-20 minutes);

目标APP在后台停留时间直方图第一个bin(25-30分钟对应的次数占比);The first bin of the histogram of the target APP staying time in the background (the proportion of times corresponding to 25-30 minutes);

目标APP在后台停留时间直方图第一个bin(30分钟以后对应的次数占比);The first bin of the histogram of the target APP's stay time in the background (the proportion of the corresponding times after 30 minutes);

当前是否有在充电。Is it currently charging.

302、建立岭回归模型的误差判断函数,根据误差判断函数获取相应的回归参数获取函数。302. Establish an error judgment function of the ridge regression model, and obtain a corresponding regression parameter obtaining function according to the error judgment function.

其中,岭回归模型可以一种机器学习算法,岭回归(ridge regression,Tikhonovregularization)算法又称为脊回归是一种专用于共线性数据分析的有偏估计回归方法,实质上是一种改良的最小二乘估计法,通过放弃最小二乘法的无偏性,以损失部分信息、降低精度为代价获得回归系数更为符合实际、更可靠的回归方法,对病态数据的拟合要强于最小二乘法。Among them, the ridge regression model can be a machine learning algorithm, and the ridge regression (Tikhonovregularization) algorithm, also known as the ridge regression, is a biased estimation regression method dedicated to the analysis of collinear data. The square estimation method, by giving up the unbiasedness of the least squares method, obtains the regression coefficients at the expense of losing some information and reducing the accuracy, which is more practical and reliable.

比如,岭回归模型的误差判断函数可以包括如下函数:For example, the error judgment function of the ridge regression model can include the following functions:

其中,λ为岭参数,即正则化参数,x为样本的特征,w为岭回归模型的回归参数,n为特征的维度。Among them, λ is the ridge parameter, that is, the regularization parameter, x is the feature 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 get the function:

2XT(Y-XW)-2λW,X为特征x的矩阵或向量,XT为X的转置,Y为y的矩阵或向量;2X T (Y-XW)-2λW, X is the matrix or vector of feature x, X T is the transpose of X, and Y is the matrix or vector of y;

然后,令2XT(Y-XW)-2λW等零,可以得到如下的回归参数计算公式:Then, let 2X T (Y-XW)-2λW equal to zero, the following regression parameter calculation formula can be obtained:

其中,为待求解的回归参数。in, are the regression parameters to be solved.

303、根据多个预设岭参数以及回归参数获取函数,获取相应的多个回归参数,得到多组岭回归参数。303. Obtain a plurality of corresponding regression parameters according to a plurality of preset ridge parameters and a regression parameter obtaining function, and obtain a plurality of sets of ridge regression parameters.

其中,岭回归参数包括岭参数λ以及相应的回归参数 Among them, the ridge regression parameters include the ridge parameter λ and the corresponding regression parameters

例如,初始化岭参数λ的值为1,利用公式计算求得λ=1对应的值;λ加1,重复利用公式求得λ=2对应的值;λ再加1,重复利用公式求得λ=3对应的值……直到求得λ=m对应的值,比如m=20。此时,便可以得到m组如20组不同的值,进而得到m组如20组 For example, to initialize the ridge parameter λ to a value of 1, use the formula Calculated to obtain the corresponding λ=1 value; add 1 to λ and reuse the formula Find the corresponding to λ=2 value; add 1 to λ and reuse the formula Find λ=3 corresponding to Value...until the corresponding λ=m is obtained value, such as m=20. At this point, m groups such as 20 different groups can be obtained. value, and then get m groups such as 20 groups

304、将训练特征集合划分成多个子训练特征集合。304. Divide the training feature set into multiple sub-training feature sets.

其中,子训练特征集合划分数量可以根据实际需求设定,比如10个、20个等等。在一实施例中,为提升误差获取的准确度,子训练特征集合包含的特征数量相等,也即将训练特征集合等分成多个子训练特征集合。The number of sub-training feature sets divided can be set according to actual needs, such as 10, 20, and so on. In one embodiment, in order to improve the accuracy of error acquisition, the sub-training feature sets include the same number of features, that is, the training feature set is divided into multiple sub-training feature sets equally.

305、根据子训练特征集合、岭回归参数以及误差判断函数,获取在岭回归参数下子训练集合对于岭回归模型的子误差。305. Obtain, according to the sub-training feature set, the ridge regression parameter, and the error judgment function, the sub-error of the sub-training set for the ridge regression model under the ridge regression parameter.

例如,可以将训练特征集合D划分成M个子训练特征集合,得到子训练特征集合D1、D2……DM;其中,M为大于1的正整数。然后,根据误差判断函数以及岭回归参数,计算每个子训练特征集合在岭回归参数下对于岭回归模型的子误差,如D1在岭回归参数下对于岭回归模型的子误差f11、D2在岭回归参数下对于岭回归模型的子误差f12、……DM在岭回归参数下对于岭回归模型的子误差f1M,得到每个子训练特征集合在该在岭回归参数下对于岭回归模型的子误差,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; where M is a positive integer greater than 1. Then, according to the error judgment function and the ridge regression parameters, calculate the sub-error of each sub-training feature set for the ridge regression model under the ridge regression parameters, such as D1 in the ridge regression parameters The following sub-errors f11, D2 for the ridge regression model are in the ridge regression parameters For the sub-error f12 of the ridge regression model, ... DM is in the ridge regression parameter Next, for the sub-error f1M of the ridge regression model, get each sub-training feature set in the ridge regression parameter For the sub-errors of the ridge regression model, f11, f12...f1M.

306、根据在岭回归参数下每个子训练集合对于岭回归模型的子误差,获取在岭回归参数下训练特征集合对于岭回归模型的误差,重复步骤305和306得到每组岭回归参数下训练特征对于岭回归模型的误差。306. According to the sub-error of each sub-training set under the ridge regression parameter for the ridge regression model, obtain the error of the training feature set under the ridge regression parameter for the ridge regression model, and repeat steps 305 and 306 to obtain the training features under each group of ridge regression parameters Error for ridge regression model.

比如,根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;根据平均误差获取在岭回归参数下训练特征集合对于岭回归模型的误差。For example, the average error of the 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 parameters is obtained according to the average error.

在一实施例中,可以将该平均误差作为在岭回归参数下训练特征集合对于岭回归模型的误差。In one embodiment, the average error can be used as the error of the ridge regression model trained on the feature set under the ridge regression parameters.

比如,以岭回归参数为为例,在计算出各子下对于岭回归模型的子误差f11、D2在岭回归参数下对于岭回归模型的子误差f12、……DM在岭回归参数下对于岭回归模型的子误差f1M,基于每个子训练特征集合在该在岭回归参数下对于岭回归模型的子误差,即f11、f12……f1M后,可以计算平均误差f’=(f11+f12+……+f1M)/M;该f’即为训练特征D在岭回归参数下对于岭回归模型的误差F1。For example, taking the ridge regression parameters as For example, after calculating the sub-errors f11 and D2 of the ridge regression model under each sub-section, the ridge regression parameters For the sub-error f12 of the ridge regression model, ... DM is in the ridge regression parameter Below the sub-error f1M for the ridge regression model, based on each sub-training feature set in the ridge regression parameter For the sub-errors of the ridge regression model, that is, after 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 Below is the error F1 for the ridge regression model.

接着重复步骤305和306可以计算出每组岭回归参数下训练特征集合对于岭回归模型的误差;如岭回归参数分别对应的误差F1、F2……Fk……Fm。Then repeat steps 305 and 306 to calculate the error of the training feature set under each group of ridge regression parameters for the ridge regression model; for example, the ridge regression parameters The corresponding errors F1, F2...Fk...Fm respectively.

307、选取误差最小对应的岭回归参数作为岭回归模型的目标岭回归参数。307. Select the ridge regression parameter corresponding to the smallest error as the target ridge regression parameter of the ridge regression model.

比如,在得到每组岭回归参数对应的误差如F1、F2……Fk……Fm后,假设Fk最小,此时,可以选取Fk对应的岭回归参数作为岭回归模型的目标岭回归参数。For example, after obtaining the error corresponding to each set of ridge regression parameters, such as F1, F2...Fk...Fm, assuming that Fk is the smallest, at this time, the ridge regression parameter corresponding to Fk can be selected As the target ridge regression parameter of the ridge regression model.

在一实施例中,重复上述步骤301-307可以得到每个应用对应的岭回归参数。In one embodiment, the above steps 301-307 are repeated to obtain the ridge regression parameters corresponding to each application.

308、根据目标岭回归参数对岭回归模型中相应参数更新,得到训练后的岭回归模型。308. Update corresponding parameters in the ridge regression model according to the target ridge regression parameters to obtain a trained ridge regression model.

比如,对岭回归模型中回归参数w的值进行更新。For example, update the value of the regression parameter w in the ridge regression model.

在一实施例中,重复上述步骤301-308可以得到每个应用对应的训练后岭回归模型In one embodiment, repeating the above steps 301-308 can obtain the post-training ridge regression model corresponding to each application

309、获取应用的多维特征,得到应用的预测特征集合。309. Acquire multi-dimensional features of the application, and obtain a prediction feature set of the application.

其中,预测时间可以根据需求设定,如可以为当前时间等。The forecast time can be set according to requirements, such as the current time.

比如,可以在预测时间点采集应用的多维特征作为预测样本。For example, the multi-dimensional features of the application can be collected as prediction samples at the prediction time point.

本申请实施例中,该步骤采集的多维特征与步骤301中获取的特征是相同类型特征,也即预测特征集合与训练特征集合所包含的特征类型相同,例如均包括:应用切入到后台的时长;应用切入到后台期间,电子设备的灭屏时长;应用进入前台的次数;应用处于前台的时间;应用进入后台的方式。In this embodiment of the present application, the multi-dimensional features collected in this step are of the same type as the features acquired in step 301, that is, the feature types included in the prediction feature set and the training feature set are the same, for example, both include: the duration of the application cutting into the background ; When the application is switched to the background, the screen-off time of the electronic device; the number of times the application enters the foreground; the time the application is in the foreground; 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, it is determined that the application can be cleaned, and so on.

在一个具体的例子中,可以通过上述步骤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; As shown in Table 1, it is determined that the application A1 and the application A3 running in the background can be cleaned up, while the state of the application A2 running in the background remains unchanged.

应用application 预测结果forecast result 应用A1Application A1 可清理cleanable 应用A2Application A2 不可清理Not cleanable 应用A3Apply A3 可清理cleanable

表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 training feature set of the application; the ridge regression model is trained according to the training feature set of the application, and the trained ridge regression model is obtained; the multi-dimensional features of the application are obtained, and the application is obtained. According to the predicted feature set and the trained ridge regression model, it is predicted whether the application can be cleaned; in order to clean up the cleanable applications; this solution can realize the automatic cleaning of the application and improve the running smoothness of the electronic equipment. Reduced power consumption and conserved resources.

进一步地,由于特征集合中,包括了反映用户使用应用的行为习惯的多个特征信息,因此本申请实施例可以使得对对应应用的清理更加个性化和智能化。Further, since the feature set includes a plurality of feature information reflecting the user's behavior habit of using the application, the embodiment of the present application can make the cleaning of the corresponding application more personalized and intelligent.

进一步地,基于岭回归模型来实现应用清理预测,可以提升用户行为预测的准确性,进而提高清理的准确度。此外,本申请实施例在对模型训练时还可以计算出多组岭回归参数,并采用特征误差选取误差最下的岭回归参数,以作为岭回归模型的最终参数,可以进一步地提升岭回归模型对应用清理预测的准确性。Further, implementing application cleaning prediction based on the ridge regression model can improve the accuracy of user behavior prediction, thereby improving the accuracy of cleaning. In addition, the embodiments of the present application can also calculate multiple sets of ridge regression parameters when training the model, and use the feature error to select the ridge regression parameter with the lowest error as the final parameter of the ridge regression model, which can further improve the ridge regression model The accuracy of the applied cleanup predictions.

在一实施例中还提供了一种应用清理装置。请参阅图4,图4为本申请实施例提供的应用清理装置的结构示意图。其中该应用清理装置应用于电子设备,该应用清理装置包括训练特征获取单元401、训练单元402、预测特征获取单元403、和预测单元404,如下:In one embodiment, an application cleaning device is also provided. Please refer to FIG. 4 , which is a schematic structural diagram of an application cleaning device provided by an embodiment of the present application. The application cleaning device is applied to electronic equipment, 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 acquisition unit 401 is used to obtain the multi-dimensional features of the application, and obtain the training feature set of the application;

训练单元402,用于根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;The training unit 402 is used for training the ridge regression model according to the training feature set of the application to obtain the trained ridge regression model;

预测特征获取单元403,用于获取所述应用的多维特征,得到所述应用的预测特征集合;A predictive feature acquisition unit 403, configured to acquire multi-dimensional features of the application, and obtain a predictive feature set of the application;

预测单元404,用于根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。The prediction unit 404 is configured to predict whether the application can be cleaned according to the predicted feature set and the trained ridge regression model.

在一实施例中,参考图5,其中,训练单元402,包括:In one embodiment, referring to FIG. 5, the training unit 402 includes:

建立子单元4021,用于建立所述岭回归模型的误差判断函数;Establishing subunit 4021, for establishing the error judgment function of the ridge regression model;

参数获取子单元4022,用于根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;A parameter obtaining subunit 4022, configured to obtain 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;

训练子单元4023,用于根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型。The training subunit 4023 is configured to obtain a trained ridge regression model according to the target ridge regression parameter and the ridge regression model.

在一实施例中,参数获取子单元4022,可以用于:In one embodiment, the parameter acquisition subunit 4022 can be used to:

根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtain multiple sets of ridge regression parameters according to the error judgment function, 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 group of ridge regression parameters is obtained ;

根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。According to the error corresponding to each group of ridge regression parameters, the corresponding target ridge regression parameter is selected from the multiple groups of ridge regression parameters.

在一实施例中,参数获取子单元4022,可以具体用于:In one embodiment, the parameter acquisition subunit 4022 can be specifically used for:

根据所述误差判断函数获取相应的回归参数获取函数;Obtain a corresponding regression parameter obtaining function according to the error judgment function;

根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter obtaining function, a regression parameter corresponding to each preset ridge parameter is obtained, and multiple sets of ridge regression parameters are obtained.

在一实施例中,参数获取子单元4022,可以具体用于:In one embodiment, the parameter acquisition subunit 4022 can be specifically used for:

将所述训练特征集合划分成多个子训练特征集合;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, obtain the sub-error of the sub-training set for the ridge regression model under the ridge regression parameter, and obtain the corresponding sub-training feature set for each sub-training feature set. Descriptor error;

根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。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.

在一实施例中,参数获取子单元4022,可以具体用于:In one embodiment, the parameter acquisition subunit 4022 can be specifically used for:

根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;According to the sub-error corresponding to each sub-training feature set, obtain the average error of the 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.

在一实施例中,参数获取子单元4022,可以具体用于:In one embodiment, the parameter acquisition subunit 4022 can be specifically used for:

从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the errors corresponding to each set of ridge regression parameters;

从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。The ridge regression parameter corresponding to the minimum error is selected from the multiple sets of ridge regression parameters as the target ridge regression parameter.

其中,应用清理装置中各单元执行的步骤可以参考上述方法实施例描述的方法步骤。该应用清理装置可以集成在电子设备中,如手机、平板电脑等。For the steps performed by each unit in the application cleaning device, reference may be made to the method steps described in the foregoing method embodiments. The application cleaning device can be integrated in electronic devices, such as mobile phones, tablet computers, and the like.

具体实施时,以上各个单元可以作为独立的实体实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单位的具体实施可参见前面的实施例,在此不再赘述。During specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined, implemented as the same or several entities, the specific implementation of the above units can refer to the previous embodiments, which will not be repeated here.

由上可知,本实施例应用清理装置可以由训练特征获取单元401获取应用的多维特征,得到应用的训练特征集合;由训练单元402根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;由预测特征获取单元403获取应用的多维特征,得到应用的预测特征集合;由预测单元404根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗和节省了资源。As can be seen from the above, the application cleaning device in this embodiment can obtain the multi-dimensional features of the application by the training feature obtaining unit 401, and obtain the training feature set of the application; the training unit 402 trains the ridge regression model according to the training feature set of the application, and obtains The multi-dimensional feature of the application is obtained by the predictive feature acquisition unit 403, and the predictive feature set of the application is obtained; the prediction unit 404 predicts whether the application can be cleaned according to the predictive feature set and the trained ridge regression model; The application is cleaned up; the solution can realize the automatic cleaning of the application, improve the running smoothness of the electronic device, reduce the power consumption and save the resources.

本申请实施例还提供一种电子设备。请参阅图6,电子设备500包括处理器501以及存储器502。其中,处理器501与存储器502电性连接。The embodiments of the present application also provide 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 the control center of the electronic device 500, using various interfaces and lines to connect various parts of the entire electronic device, by running or loading the computer program stored in the memory 502, and calling the data stored in the memory 502, Various functions of the electronic device 500 are performed and data is processed, so as to monitor the electronic device 500 as a whole.

所述存储器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 the computer programs and modules stored in the memory 502 . The memory 502 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, a computer program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of electronic equipment, etc. Additionally, memory 502 may include high-speed random access memory, and may 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 may also include a memory controller to provide processor 501 access to memory 502 .

在本申请实施例中,电子设备500中的处理器501会按照如下的步骤,将一个或一个以上的计算机程序的进程对应的指令加载到存储器502中,并由处理器501运行存储在存储器502中的计算机程序,从而实现各种功能,如下:In this embodiment of the present application, the processor 501 in the electronic device 500 loads the instructions corresponding to the processes of one or more computer programs into the memory 502 according to the following steps, and is executed by the processor 501 and stored in the memory 502 The computer program in , so as to realize various functions, as follows:

获取应用的多维特征,得到应用的训练特征集合;Obtain the multi-dimensional features of the application, and obtain the training feature set of the application;

根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;The ridge regression model is trained according to the training feature set of the application, and the trained ridge regression model is obtained;

获取所述应用的多维特征,得到所述应用的预测特征集合;Obtain the multi-dimensional features of the application, and obtain the predicted feature set of the application;

根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清。According to the predicted feature set and the trained ridge regression model, it is predicted whether the application is clear.

在某些实施方式中,在根据所述应用的训练样本对岭回归模型进行训练,得到训练后的述岭回归模型时,处理器501可以具体执行以下步骤:In some embodiments, when the ridge regression model is trained according to the training samples of the application and the trained ridge regression model is obtained, the processor 501 may specifically perform the following steps:

建立所述岭回归模型的误差判断函数;establishing an error judgment function of the ridge regression model;

根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;Obtain the target ridge regression parameter of the ridge regression model 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;

根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型。A trained ridge regression model is obtained according to the target ridge regression parameters and the ridge regression model.

在某些实施方式中,在根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数时,处理器501可以具体执行以下步骤:In some embodiments, when acquiring the target ridge regression parameters 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:

根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtain multiple sets of ridge regression parameters according to the error judgment function, 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 group of ridge regression parameters is obtained ;

根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。According to the error corresponding to each group of ridge regression parameters, the corresponding target ridge regression parameter is selected from the multiple groups of ridge regression parameters.

在某些实施方式中,在根据所述误差判断函数获取多组岭回归参数时,处理器501可以具体执行以下步骤:In some embodiments, when acquiring multiple sets of ridge regression parameters according to the error judgment function, the processor 501 may specifically perform the following steps:

根据所述误差判断函数获取相应的回归参数获取函数;Obtain a corresponding regression parameter obtaining function according to the error judgment function;

根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter obtaining function, a regression parameter corresponding to each preset ridge parameter is obtained, and multiple sets of ridge regression parameters are obtained.

在某些实施方式中,在根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差时,处理器501可以具体执行以下步骤:In some embodiments, when obtaining the error of the training feature set with respect 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, The processor 501 may specifically perform the following steps:

将所述训练特征集合划分成多个子训练特征集合;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, obtain the sub-error of the sub-training set for the ridge regression model under the ridge regression parameter, and obtain the corresponding sub-training feature set for each sub-training feature set. Descriptor error;

根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。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.

在某些实施方式中,在根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差时,处理器501可以具体执行以下步骤:In some embodiments, when obtaining the error of the training feature set with respect to the ridge regression model under the ridge regression parameter according to the sub-error corresponding to each sub-training feature set, the processor 501 may specifically perform the following steps :

根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;According to the sub-error corresponding to each sub-training feature set, obtain the average error of the 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.

在某些实施方式中,在根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数时,处理器501可以具体执行以下步骤:In some embodiments, when selecting a corresponding target ridge regression parameter from the multiple groups of ridge regression parameters according to the error corresponding to each group of ridge regression parameters, the processor 501 may specifically perform the following steps:

从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the errors corresponding to each set of ridge regression parameters;

从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。The ridge regression parameter corresponding to the minimum error is selected from the multiple sets of ridge regression parameters as the target ridge regression parameter.

由上述可知,本申请实施例的电子设备,获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理;以便对可清理的应用进行清理;该方案可以实现应用的自动清理,提高了电子设备的运行流畅度,降低了功耗。It can be seen from the above that the electronic device of the embodiment of the present application obtains the multi-dimensional features of the application, and obtains the training feature set of the application; trains the ridge regression model according to the training feature set of the application, and obtains the trained ridge regression model; obtains the multi-dimensional feature of the application. According to the predicted feature set and the trained ridge regression model, it is predicted whether the application can be cleaned; in order to clean the cleanable applications; this solution can realize the automatic cleaning of the application and improve the performance of the electronic device. Runs smoothly and reduces power consumption.

请一并参阅图7,在某些实施方式中,电子设备500还可以包括:显示器503、射频电路504、音频电路505以及电源506。其中,其中,显示器503、射频电路504、音频电路505以及电源506分别与处理器501电性连接。Please also refer to FIG. 7 , 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 supply 506 . Among them, the display 503 , the radio frequency circuit 504 , the audio circuit 505 and the power supply 506 are respectively electrically connected to the processor 501 .

所述显示器503可以用于显示由用户输入的信息或提供给用户的信息以及各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示器503可以包括显示面板,在某些实施方式中,可以采用液晶显示器(Liquid CrystalDisplay,LCD)、或者有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板。The display 503 can be used to display information input by the user or information provided to the user and various graphical user interfaces, which can be composed of graphics, text, icons, videos, and any combination thereof. The display 503 may include a display panel, and in some embodiments, the display panel may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).

所述射频电路504可以用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 504 can be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.

所述音频电路505可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。The audio circuit 505 can be used to provide an audio interface between a user and an electronic device through a speaker and a microphone.

所述电源506可以用于给电子设备500的各个部件供电。在一些实施例中,电源506可以通过电源管理系统与处理器501逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 506 may be used to power various components of the electronic device 500 . In some embodiments, the power supply 506 may be logically connected to the processor 501 through a power management system, so as to implement functions such as managing charging, discharging, and power consumption 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, which will not be repeated here.

本申请实施例还提供一种存储介质,所述存储介质存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述任一实施例中的应用清理方法,比如:获取应用的多维特征,得到应用的训练特征集合;根据应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;获取应用的多维特征,得到应用的预测特征集合;根据预测特征集合以及训练后的岭回归模型,预测应用是否可清理。Embodiments of the present application further provide a storage medium, where a computer program is stored in the storage medium, and when the computer program is run on a computer, the computer is made to execute the application cleaning method in any of the foregoing embodiments, such as: obtaining The multi-dimensional features of the application are obtained, and the training feature set of the application is obtained; the ridge regression model is trained according to the training feature set of the application, and the trained ridge regression model is obtained; the multi-dimensional features of the application are obtained, and the prediction feature set of the application is obtained; according to the prediction feature set And the trained ridge regression model to predict whether the application is cleanable or not.

在本申请实施例中,存储介质可以是磁碟、光盘、只读存储器(Read Only Memory,ROM,)、或者随机存取记忆体(Random Access Memory,RAM)等。In this embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a read only memory (Read Only Memory, ROM,), or a random access memory (Random Access Memory, RAM), or the like.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

需要说明的是,对本申请实施例的应用清理方法而言,本领域普通测试人员可以理解实现本申请实施例的应用清理方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如应用清理方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器、随机存取记忆体等。It should be noted that, for the application cleaning method of the embodiment of the present application, ordinary testers in the art can understand that all or part of the process of implementing the application cleaning method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program , the computer program can be stored in a computer-readable storage medium, such as stored in the memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process can include processes such as applying a cleaning method. Example flow. 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 thereof may be integrated into one processing chip, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can 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 cleaning method, device, storage medium, and electronic device provided by the embodiments of the present application have been described in detail above. The principles and implementations of the present application are described with specific examples. The descriptions of the above embodiments are only It is used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there will be changes in the specific embodiments and application scope. In summary, this specification The content should not be construed as a limitation on this application.

Claims (12)

1.一种应用清理方法,其特征在于,包括:1. an application cleaning method, is characterized in that, comprises: 获取应用的多维特征,得到所述应用的训练特征集合;Obtain the multi-dimensional features of the application, and obtain the training feature set of the application; 根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;具体包括:建立所述岭回归模型的误差判断函数;根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;根据所述目标岭回归参数和所述岭回归模型得到训练后的岭回归模型;The ridge regression model is trained according to the training feature set of the application, and the trained ridge regression model is obtained; it specifically includes: establishing an error judgment function of the ridge regression model; obtaining according to the training feature set and the error judgment function The target ridge regression parameter of the ridge regression model, the target ridge regression parameter includes a ridge parameter and a regression parameter; obtain a trained ridge regression model according to the target ridge regression parameter and the ridge regression model; 获取所述应用的多维特征,得到所述应用的预测特征集合;Obtain the multi-dimensional features of the application, and obtain the predicted feature set of the application; 根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理。Based on the predicted feature set and the trained ridge regression model, predict whether the application is cleanable. 2.如权利要求1所述的应用清理方法,其特征在于,根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,包括:2. The application cleaning method as claimed in claim 1, wherein the target ridge regression parameters of the ridge regression model are obtained according to the training feature set and the error judgment function, comprising: 根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtain multiple sets of ridge regression parameters according to the error judgment function, 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 group of ridge regression parameters is obtained ; 根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。According to the error corresponding to each group of ridge regression parameters, the corresponding target ridge regression parameter is selected from the multiple groups of ridge regression parameters. 3.如权利要求2所述的应用清理方法,其特征在于,根据所述误差判断函数获取多组岭回归参数,包括:3. application cleaning method as claimed in claim 2, is characterized in that, obtains multiple groups of ridge regression parameters according to described error judgment function, comprises: 根据所述误差判断函数获取相应的回归参数获取函数;Obtain a corresponding regression parameter obtaining function according to the error judgment function; 根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter obtaining function, a regression parameter corresponding to each preset ridge parameter is obtained, and multiple sets of ridge regression parameters are obtained. 4.如权利要求2所述的应用清理方法,其特征在于,根据所述训练特征集合、所述岭回归参数和所述误差判断函数,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,包括:4. The application cleaning method according to claim 2, wherein, according to the training feature set, the ridge regression parameter and the error judgment function, it is obtained that the training feature set under the ridge regression parameter is for The error of the ridge regression model, including: 将所述训练特征集合划分成多个子训练特征集合;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, obtain the sub-error of the sub-training set for the ridge regression model under the ridge regression parameter, and obtain the corresponding sub-training feature set for each sub-training feature set. Descriptor error; 根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。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. 5.如权利要求4所述的应用清理方法,其特征在于,根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差,包括:5. The application cleaning method according to claim 4, wherein, according to the corresponding sub-error of each sub-training feature set, the error of the training feature set for the ridge regression model under the ridge regression parameter is obtained, include: 根据每个子训练特征集合对应的子误差,获取子训练特征集合的平均误差;According to the sub-error corresponding to each sub-training feature set, obtain the average error of the 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. 6.如权利要求2所述的应用清理方法,其特征在于,根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数,包括:6. application cleaning method as claimed in claim 2 is characterized in that, according to the error corresponding to each group of ridge regression parameters, from described multiple groups of ridge regression parameters, select corresponding target ridge regression parameters, comprising: 从每组岭回归参数对应的误差中确定最小误差;Determine the minimum error from the errors corresponding to each set of ridge regression parameters; 从所述多组岭回归参数中选取所述最小误差对应的岭回归参数作为目标岭回归参数。The ridge regression parameter corresponding to the minimum error is selected from the multiple sets of ridge regression parameters as the target ridge regression parameter. 7.一种应用清理装置,其特征在于,包括:7. An application cleaning device, characterized in that, comprising: 训练特征获取单元,用于获取应用的多维特征,得到所述应用的训练特征集合;a training feature acquisition unit, used for acquiring multi-dimensional features of an application, and obtaining a training feature set of the application; 训练单元,用于根据所述应用的训练特征集合对岭回归模型进行训练,得到训练后的岭回归模型;A training unit, used for training the ridge regression model according to the training feature set of the application, to obtain the trained ridge regression model; 预测特征获取单元,用于获取所述应用的多维特征,得到所述应用的预测特征集合;a predictive feature acquisition unit, configured to acquire multidimensional features of the application, and obtain a predictive feature set of the application; 预测单元,用于根据所述预测特征集合以及所述训练后的岭回归模型,预测所述应用是否可清理;a prediction unit, configured to predict whether the application can be cleaned according to the predicted feature set and the trained ridge regression model; 其中,所述训练单元,包括:Wherein, the training unit includes: 建立子单元,用于建立所述岭回归模型的误差判断函数;establishing a subunit for establishing an error judgment function of the ridge regression model; 参数获取子单元,用于根据所述训练特征集合和所述误差判断函数获取所述岭回归模型的目标岭回归参数,所述目标岭回归参数包括岭参数和回归参数;a parameter obtaining subunit, configured to obtain 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 training subunit, configured to obtain a trained ridge regression model according to the target ridge regression parameters and the ridge regression model. 8.如权利要求7所述的应用清理装置,其特征在于,所述参数获取子单元,用于:8. The application cleaning device according to claim 7, wherein the parameter acquisition subunit is used for: 根据所述误差判断函数获取多组岭回归参数,所述岭回归参数包括:岭参数和回归参数;Obtain multiple sets of ridge regression parameters according to the error judgment function, 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 group of ridge regression parameters is obtained ; 根据每组岭回归参数对应的误差,从所述多组岭回归参数中选取相应的目标岭回归参数。According to the error corresponding to each group of ridge regression parameters, the corresponding target ridge regression parameter is selected from the multiple groups of ridge regression parameters. 9.如权利要求8所述的应用清理装置,其特征在于,所述参数获取子单元,具体用于:9. The application cleaning device according to claim 8, wherein the parameter acquisition subunit is specifically used for: 根据所述误差判断函数获取相应的回归参数获取函数;Obtain a corresponding regression parameter obtaining function according to the error judgment function; 根据多个预设岭参数以及所述回归参数获取函数,获取每个预设岭参数对应的回归参数,得到多组岭回归参数。According to a plurality of preset ridge parameters and the regression parameter obtaining function, a regression parameter corresponding to each preset ridge parameter is obtained, and multiple sets of ridge regression parameters are obtained. 10.如权利要求8所述的应用清理装置,其特征在于,所述参数获取子单元,具体用于:10. The application cleaning device according to claim 8, wherein the parameter acquisition subunit is specifically used for: 将所述训练特征集合划分成多个子训练特征集合;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, obtain the sub-error of the sub-training set for the ridge regression model under the ridge regression parameter, and obtain the corresponding sub-training feature set for each sub-training feature set. Descriptor error; 根据每个子训练特征集合对应的子误差,获取在所述岭回归参数下所述训练特征集合对于所述岭回归模型的误差。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. 11.一种存储介质,其上存储有计算机程序,其特征在于,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1至6任一项所述的应用清理方法。11. A storage medium on which a computer program is stored, characterized in that, when the computer program runs on a computer, the computer is caused to execute the application cleaning method according to any one of claims 1 to 6. 12.一种电子设备,包括处理器和存储器,所述存储器有计算机程序,其特征在于,所述处理器通过调用所述计算机程序,用于执行如权利要求1至6任一项所述的应用清理方法。12. An electronic device comprising a processor and a memory, wherein the memory has a computer program, wherein the processor is used to execute the computer program according to any one of claims 1 to 6 by invoking the computer program. Apply the cleanup method.
CN201711050187.6A 2017-10-31 2017-10-31 Application cleaning method and device, storage medium and electronic equipment Active CN107807730B (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN107807730A CN107807730A (en) 2018-03-16
CN107807730B true CN107807730B (en) 2019-12-03

Family

ID=61583133

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107807730B (en) * 2017-10-31 2019-12-03 Oppo广东移动通信有限公司 Application cleaning method and 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, device, storage medium and electronic device
CN113705107B (en) * 2021-09-01 2023-09-08 桂林电子科技大学 A power consumption analysis method based on mean ridge regression
US12361082B2 (en) 2023-10-27 2025-07-15 Sap Se Protecting cloud systems using request scores

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763503A (en) * 2009-12-30 2010-06-30 中国科学院计算技术研究所 Face recognition method of attitude robust
CN104159294A (en) * 2014-08-01 2014-11-19 西南科技大学 A cloud positioning platform based on Bluetooth 4.0 technology
CN104899474A (en) * 2015-06-09 2015-09-09 大连三生科技发展有限公司 Method and system for rectifying MB-seq methylation level based on ridge regression
CN106709295A (en) * 2016-12-08 2017-05-24 湖南文理学院 Intelligent terminal program permission control method based on finger screen-touching information analysis

Family Cites Families (6)

* 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
CN104298549B (en) * 2014-09-30 2018-03-30 北京金山安全软件有限公司 Method and device for cleaning application programs in mobile terminal and mobile terminal
US9910481B2 (en) * 2015-02-13 2018-03-06 Intel Corporation Performing power management in a multicore processor
CN104866069A (en) * 2015-06-12 2015-08-26 广东小天才科技有限公司 Method and device for automatically cleaning background application program
CN107133094B (en) * 2017-06-05 2021-11-02 努比亚技术有限公司 Application management method, mobile terminal and computer readable storage medium
CN107807730B (en) * 2017-10-31 2019-12-03 Oppo广东移动通信有限公司 Application cleaning method and device, storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763503A (en) * 2009-12-30 2010-06-30 中国科学院计算技术研究所 Face recognition method of attitude robust
CN104159294A (en) * 2014-08-01 2014-11-19 西南科技大学 A cloud positioning platform based on Bluetooth 4.0 technology
CN104899474A (en) * 2015-06-09 2015-09-09 大连三生科技发展有限公司 Method and system for rectifying MB-seq methylation level based on ridge regression
CN106709295A (en) * 2016-12-08 2017-05-24 湖南文理学院 Intelligent terminal program permission control method based on finger screen-touching information analysis

Also Published As

Publication number Publication date
CN107807730A (en) 2018-03-16
WO2019085754A1 (en) 2019-05-09

Similar Documents

Publication Publication Date Title
CN108337358B (en) Application cleaning method and device, storage medium and electronic equipment
CN107807730B (en) Application cleaning method and device, storage medium and electronic equipment
CN107678845B (en) Application program control method and device, storage medium and electronic equipment
CN107704070B (en) Application cleaning method and device, storage medium and electronic equipment
CN107678803B (en) Application control method, device, storage medium and electronic device
CN107678531B (en) Application cleaning method, device, storage medium and electronic device
WO2020133418A1 (en) Application icon display method and apparatus, and storage medium and electronic device
CN107402809A (en) Application program management and control method, device, storage medium and electronic device
CN107894827B (en) Application cleaning method and device, storage medium and electronic equipment
CN107870810B (en) Application cleaning method, device, storage medium and electronic device
CN107943570B (en) Application management method and device, storage medium and electronic equipment
CN107943582B (en) Feature processing method, device, storage medium and electronic device
CN107748697B (en) Application closing method, device, storage medium and electronic device
CN107608778B (en) Application program control method and device, storage medium and electronic equipment
CN107943534A (en) Method for closing, device, storage medium and the electronic equipment of background application
CN107870809B (en) Application closing method and device, storage medium and electronic equipment
DE112018006292T5 (en) BATTERY CONDITION ESTIMATE
CN107643925A (en) Background application cleaning method, device, storage medium and electronic equipment
CN107704289A (en) Application cleaning method, device, storage medium and electronic device
CN107943571B (en) Background application control method and device, storage medium and electronic equipment
CN107797832B (en) Application cleaning method and device, storage medium and electronic equipment
CN107861769B (en) Application cleaning method and device, storage medium and electronic equipment
CN107943537B (en) Application cleaning method and device, storage medium and electronic equipment
CN107870811B (en) Application cleaning method and device, storage medium and electronic equipment
CN107943535B (en) Application cleaning method, device, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant