技术领域technical field
本申请涉及电子设备终端领域,具体涉及一种应用程序管控方法、装置、介质及电子设备。The present application relates to the field of electronic equipment terminals, in particular to an application program management and control method, device, medium and electronic equipment.
背景技术Background technique
终端用户每天会使用大量应用,通常一个应用被推到后台后,如果及时不清理会占用宝贵的系统内存资源,并且会影响系统功耗。因此,有必要提供一种应用程序管控方法、装置、介质及电子设备。End users use a large number of applications every day. Usually, after an application is pushed to the background, if it is not cleaned up in time, it will occupy valuable system memory resources and affect system power consumption. Therefore, it is necessary to provide an application control method, device, medium and electronic equipment.
发明内容Contents of the invention
本申请实施例提供一种应用程序管控方法、装置、介质及电子设备,以智能关闭应用程序。Embodiments of the present application provide an application program management and control method, device, medium, and electronic device to intelligently close application programs.
本申请实施例提供一种应用程序管控方法,应用于电子设备,所述应用程序管控方法包括以下步骤:An embodiment of the present application provides an application program management and control method, which is applied to an electronic device, and the application program management and control method includes the following steps:
获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi;Acquiring the application program sample vector set, wherein the sample vectors in the sample vector set include historical characteristic information xi of multiple dimensions of the application program;
采用反向传播(Back Propagation,BP)神经网络算法对样本向量集进行计算,生成训练模型;Use the back propagation (Back Propagation, BP) neural network algorithm to calculate the sample vector set and generate a training model;
当应用程序进入后台,将所述应用程序的当前特征信息s输入所述训练模型进行计算;以及When the application program enters the background, input the current feature information s of the application program into the training model for calculation; and
判断所述应用程序是否需要关闭。Determine whether the application needs to be closed.
本申请实施例还提供一种应用程序管控方法装置,所述装置包括:The embodiment of the present application also provides an application program management and control method device, the device includes:
获取模块,用于获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi;An acquisition module, configured to acquire the application program sample vector set, wherein the sample vectors in the sample vector set include historical characteristic information xi of multiple dimensions of the application program;
生成模块,用于采用BP神经网络算法对样本向量集进行计算,生成训练模型;Generate module, be used for adopting BP neural network algorithm to calculate sample vector set, generate training model;
计算模块,用于当应用程序进入后台,将所述应用程序的当前特征信息s输入所述训练模型进行计算;以及A calculation module, configured to input the current feature information s of the application into the training model for calculation when the application enters the background; and
判断模块,用于判断所述应用程序是否需要关闭。A judging module, configured to judge whether the application program needs to be closed.
本申请实施例还提供一种介质,所述介质中存储有多条指令,所述指令适于由处理器加载以执行上述的应用程序管控方法。An embodiment of the present application further provides a medium, wherein a plurality of instructions are stored in the medium, and the instructions are adapted to be loaded by a processor to execute the above-mentioned application program management method.
本申请实施例还提供一种电子设备,所述电子设备包括处理器和存储器,所述电子设备与所述存储器电性连接,所述存储器用于存储指令和数据,所述处理器用于执行以下步骤:An embodiment of the present application also provides an electronic device, the electronic device includes a processor and a memory, the electronic device is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to perform the following step:
获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi;Acquiring the application program sample vector set, wherein the sample vectors in the sample vector set include historical characteristic information xi of multiple dimensions of the application program;
采用BP神经网络算法对样本向量集进行计算,生成训练模型;The BP neural network algorithm is used to calculate the sample vector set to generate a training model;
当应用程序进入后台,将所述应用程序的当前特征信息s输入所述训练模型进行计算;以及When the application program enters the background, input the current feature information s of the application program into the training model for calculation; and
判断所述应用程序是否需要关闭。Determine whether the application needs to be closed.
本申请所提供的应用程序管控方法、装置、介质及电子设备,通过获取历史特征信息xi,采用BP神经网络算法生成训练模型,当检测应用程序进入后台时,从而将应用程序的当前特征信息s带入训练模型,进而判断所述应用程序是否需要关闭,智能关闭应用程序。The application program management and control method, device, medium and electronic equipment provided in this application obtain historical feature information xi and use the BP neural network algorithm to generate a training model. When the application program enters the background, the current feature information of the application program s into the training model, and then judge whether the application program needs to be closed, and intelligently close the application program.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本申请实施例提供的应用程序管控装置的一种系统示意图。FIG. 1 is a schematic diagram of a system of an application management and control device provided in an embodiment of the present application.
图2为本申请实施例提供的应用程序管控装置的应用场景示意图。FIG. 2 is a schematic diagram of an application scenario of the application program management and control device provided by the embodiment of the present application.
图3为本申请实施例提供的应用程序管控方法的一种流程示意图。FIG. 3 is a schematic flowchart of an application program management and control method provided by an embodiment of the present application.
图4为本申请实施例提供的应用程序管控方法的另一种流程示意图。FIG. 4 is another schematic flowchart of the application program management and control method provided by the embodiment of the present application.
图5为本申请实施例提供的装置的一种结构示意图。Fig. 5 is a schematic structural diagram of the device provided by the embodiment of the present application.
图6为本申请实施例提供的装置的另一种结构示意图。FIG. 6 is another schematic structural diagram of the device provided by the embodiment of the present application.
图7为本申请实施例提供的电子设备的一种结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图8为本申请实施例提供的电子设备的另一种结构示意图。FIG. 8 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施例specific embodiment
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Apparently, the described embodiments are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.
在本申请的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”、“顺时针”、“逆时针”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本申请的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", " Orientation indicated by rear, left, right, vertical, horizontal, top, bottom, inside, outside, clockwise, counterclockwise, etc. The positional relationship is based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the application and simplifying the description, and does not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, Therefore, it should not be construed as limiting the application. In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of said features. In the description of the present application, "plurality" means two or more, unless otherwise specifically defined.
在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接或可以相互通讯;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本申请中的具体含义。In the description of this application, it should be noted that unless otherwise specified and limited, the terms "installation", "connection", and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection. Connected, or integrally connected; it can be mechanically connected, or electrically connected, or can communicate with each other; it can be directly connected, or indirectly connected through an intermediary, and it can be the internal communication of two components or the interaction of two components relation. Those of ordinary skill in the art can understand the specific meanings of the above terms in this application according to specific situations.
在本申请中,除非另有明确的规定和限定,第一特征在第二特征之“上”或之“下”可以包括第一和第二特征直接接触,也可以包括第一和第二特征不是直接接触而是通过它们之间的另外的特征接触。而且,第一特征在第二特征“之上”、“上方”和“上面”包括第一特征在第二特征正上方和斜上方,或仅仅表示第一特征水平高度高于第二特征。第一特征在第二特征“之下”、“下方”和“下面”包括第一特征在第二特征正下方和斜下方,或仅仅表示第一特征水平高度小于第二特征。In this application, unless otherwise expressly specified and limited, a first feature being "on" or "under" a second feature may include direct contact between the first and second features, and may also include the first and second features Not in direct contact but through another characteristic contact between them. Moreover, "above", "above" and "above" the first feature on the second feature include that the first feature is directly above and obliquely above the second feature, or simply means that the first feature is horizontally higher than the second feature. "Below", "beneath" and "under" the first feature to the second feature include that the first feature is directly below and obliquely below the second feature, or simply means that the first feature has a lower level than the second feature.
下文的公开提供了许多不同的实施例或例子用来实现本申请的不同结构。为了简化本申请的公开,下文中对特定例子的部件和设置进行描述。当然,它们仅仅为示例,并且目的不在于限制本申请。此外,本申请可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施例和/或设置之间的关系。此外,本申请提供了的各种特定的工艺和材料的例子,但是本领域普通技术人员可以意识到其他工艺的应用和/或其他材料的使用。The following disclosure provides many different embodiments or examples for implementing different structures of the present application. To simplify the disclosure of the present application, components and arrangements of specific examples are described below. Of course, they are examples only and are not intended to limit the application. Furthermore, the present application may repeat reference numerals and/or reference letters in various instances, such repetition is for simplicity and clarity and does not in itself indicate a relationship between the various embodiments and/or arrangements discussed. In addition, various specific process and material examples are provided herein, but one of ordinary skill in the art may recognize the use of other processes and/or the use of other materials.
请参照附图中的图式,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所示例的本申请的具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。Referring to the drawings in the accompanying drawings, where the same reference numerals represent the same components, the principles of the present application are illustrated by implementing them in a suitable computing environment. The following description is based on illustrated specific embodiments of the present application, which should not be construed as limiting other specific embodiments of the present application not described in detail herein.
本申请原理以上述文字来说明,其并不代表为一种限制,本领域技术人员将可了解到以下所述的多种步骤及操作亦可实施在硬件当中。本申请的原理使用许多其它泛用性或特定目的运算、通信环境或组态来进行操作。The principle of the present application is described with the above text, which is not meant to be a limitation. Those skilled in the art will understand that the various steps and operations described below can also be implemented in hardware. The principles of the present application operate with numerous other general purpose or special purpose computing, communication environments or configurations.
本申请提供的应用程序管控方法,主要应用于电子设备,如:手环、智能手机、基于苹果系统或安卓系统的平板电脑、或基于Windows或Linux系统的笔记本电脑等智能移动电子设备。需要说明的是,所述应用程序可以为聊天应用程序、视频应用程序、音乐应用程序、购物应用程序、共享单车应用程序或手机银行应用程序等。The application control method provided by this application is mainly applied to electronic devices, such as smart mobile electronic devices such as wristbands, smart phones, tablet computers based on Apple system or Android system, or notebook computers based on Windows or Linux system. It should be noted that the application program may be a chat application program, a video application program, a music application program, a shopping application program, a shared bicycle application program, or a mobile banking application program.
请参阅图1,图1为本申请实施例提供的应用程序管控装置的系统示意图。所述应用程序管控装置主要用于:从数据库中获取应用程序的历史特征信息xi,然后,将历史特征信息xi通过算法进行计算,得到训练模型,其次,将应用程序的当前特征信息s输入训练模型进行计算,通过计算结果判断应用程序是否可关闭,以对预设应用程序进行管控,例如关闭、或者冻结等。Please refer to FIG. 1 . FIG. 1 is a system schematic diagram of an application program management and control device provided in an embodiment of the present application. The application program management and control device is mainly used to: acquire the historical characteristic informationxi of the application program from the database, and then calculate the historical characteristic informationxi through an algorithm to obtain a training model, and secondly, obtain the current characteristic information s of the application program Input the training model for calculation, and judge whether the application can be closed based on the calculation result, so as to control the preset application, such as closing or freezing.
具体的,请参阅图2,图2为本申请实施例提供的应用程序管控方法的应用场景示意图。在一种实施例中,从数据库中获取应用程序的历史特征信息xi,然后,将历史特征信息xi通过算法进行计算,得到训练模型,其次,当应用程序管控装置在检测到应用程序进入电子设备的后台时,将应用程序的当前特征信息s输入训练模型进行计算,通过计算结果判断应用程序是否可关闭。比如,从数据库中获取应用程序a的历史特征信息xi,然后,将历史特征信息xi通过算法进行计算,得到训练模型,其次,当应用程序管控装置在检测到应用程序a进入电子设备的后台时,将应用程序的当前特征信息s输入训练模型进行计算,通过计算结果判断应用程序a可关闭,并将应用程序a关闭,当应用程序管控装置在检测到应用程序b进入电子设备的后台时,将应用程序b的当前特征信息s输入训练模型进行计算,通过计算结果判断应用程序b需要保留,并将应用程序b保留。Specifically, please refer to FIG. 2 . FIG. 2 is a schematic diagram of an application scenario of the application program management and control method provided by the embodiment of the present application. In one embodiment, the historical characteristic informationxi of the application is obtained from the database, and then the historical characteristic informationxi is calculated by an algorithm to obtain a training model. Secondly, when the application management and control device detects that the application has entered When the electronic device is in the background, input the current feature information s of the application program into the training model for calculation, and judge whether the application program can be closed based on the calculation result. For example, the historical feature informationxi of application program a is obtained from the database, and then the historical feature informationxi is calculated by an algorithm to obtain a training model. Secondly, when the application control device detects that application program a enters the electronic device In the background, the current feature information s of the application is input into the training model for calculation, and the calculation result is used to judge that the application a can be closed, and the application a is closed. When the application control device detects that the application b enters the background of the electronic device , the current feature information s of the application b is input into the training model for calculation, and the calculation result is used to determine that the application b needs to be retained, and the application b is retained.
本申请实施例提供一种应用程序管控方法,所述应用程序管控方法的执行主体可以是本发明实施例提供的应用程序管控装置,或者成了该应用程序管控装置的电子设备,其中该应用程序管控装置可以采用硬件或者软件的方式实现。An embodiment of the present application provides an application program management and control method. The execution subject of the application program management and control method may be the application program management and control device provided in the embodiment of the present invention, or an electronic device that becomes the application program management and control device, wherein the application program The management and control device may be implemented in the form of hardware or software.
请参阅图3,图3为本申请实施例提供的应用程序管控方法的流程示意图。本申请实施例提供的应用程序管控方法应用于电子设备,具体流程可以如下:Please refer to FIG. 3 . FIG. 3 is a schematic flowchart of an application program management and control method provided in an embodiment of the present application. The application management and control method provided in the embodiment of the present application is applied to electronic equipment, and the specific process may be as follows:
步骤S101,获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi。Step S101, acquiring the application program sample vector set, wherein the sample vectors in the sample vector set include historical characteristic informationxi of multiple dimensions of the application program.
其中,从样本数据库中获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi。Wherein, the application program sample vector set is acquired from a sample database, wherein the sample vectors in the sample vector set include historical characteristic informationxi of multiple dimensions of the application program.
其中,所述多个维度的特征信息可以参考表1。Wherein, the feature information of the multiple dimensions can refer to Table 1.
表1Table 1
需要说明的是,以上表1示出的10个维度的特征信息仅为本申请实施例中的一种,但是本申请并不局限于表1示出的10个维度的特征信息,也可以为其中之一、或者其中至少两个,或者全部,亦或者还可以包括其他维度的特征信息,例如,当前是否在充电、当前的电量或者当前是否连接WiFi等。It should be noted that the feature information of the 10 dimensions shown in Table 1 above is only one of the embodiments of the present application, but the present application is not limited to the feature information of the 10 dimensions shown in Table 1, and may also be One of them, or at least two of them, or all of them, or may also include feature information of other dimensions, for example, whether it is currently charging, the current power level, or whether it is currently connected to WiFi.
在一种实施例中,可以选取6个维度的历史特征信息:In one embodiment, six dimensions of historical feature information can be selected:
A、应用程序在后台驻留的时间;A. The time the application stays in the background;
B、屏幕是否为亮,例如,屏幕亮,记为1,屏幕熄灭,记为0;B. Whether the screen is bright, for example, if the screen is bright, it is recorded as 1, and if the screen is off, it is recorded as 0;
C、当周总使用次数统计;C. Statistics on the total usage times of the week;
D、当周总使用时间统计;D. Statistics on the total usage time of the week;
E、WiFi是否打开,例如,WiFi打开,记为1,WiFi关闭,记为0;以及E. Whether WiFi is turned on, for example, if WiFi is turned on, it is recorded as 1, and when WiFi is turned off, it is recorded as 0; and
F、当前是否在充电,例如,当前正在充电,记为1,当前未在充电,记为0。F. Whether it is currently charging, for example, if it is currently charging, it will be recorded as 1, and if it is not currently charging, it will be recorded as 0.
步骤S102,采用BP神经网络算法对样本向量集进行计算,生成训练模型。Step S102, using the BP neural network algorithm to calculate the sample vector set to generate a training model.
请参阅图4,图4为本申请实施例提供的应用程序管控方法的流程示意图。在一种实施例中,所述步骤S102可以包括:Please refer to FIG. 4 . FIG. 4 is a schematic flowchart of an application program management and control method provided in an embodiment of the present application. In an embodiment, the step S102 may include:
步骤S1021:定义网络结构;以及Step S1021: defining the network structure; and
步骤S1022:将样本向量集带入网络结构进行计算,得到训练模型。Step S1022: Bring the sample vector set into the network structure for calculation to obtain a training model.
在步骤S1021中,所述定义网络结构包括:In step S1021, the defining network structure includes:
步骤S1021a,设定输入层,所述输入层包括N个节点,所述输入层的节点数与所述历史特征信息xi的维数相同。Step S1021a, setting an input layer, the input layer includes N nodes, and the number of nodes in the input layer is the same as the dimension of the historical characteristic informationxi .
其中,所述历史特征信息xi的维数小于10个,所述输入层的节点数小于10个,以简化运算过程。Wherein, the dimension of the historical characteristic informationxi is less than 10, and the number of nodes in the input layer is less than 10, so as to simplify the operation process.
在一种实施例中,所述历史特征信息xi的维数为6维,所述输入层包括6个节点。In an embodiment, the dimensionality of the historical characteristic informationxi is 6 dimensions, and the input layer includes 6 nodes.
步骤S1021b,设定隐含层,所述隐含层包括M个节点。Step S1021b, setting a hidden layer, where the hidden layer includes M nodes.
其中,所述隐含层可以包括多个隐含分层。每一所述隐含分层的节点数小于10个,以简化运算过程。Wherein, the hidden layer may include multiple hidden layers. The number of nodes in each hidden layer is less than 10 to simplify the calculation process.
在一种实施例中,所述隐含层可以包括第一隐含分层,第二隐含分层和第三隐含分层。所述第一隐含分层包括10个节点,第二隐含分层包括5个节点,第三隐含分层包括5个节点。In an embodiment, the hidden layers may include a first hidden layer, a second hidden layer and a third hidden layer. The first hidden layer includes 10 nodes, the second hidden layer includes 5 nodes, and the third hidden layer includes 5 nodes.
步骤S1021c,设定分类层,所述分类层采用softmax函数,所述softmax函数为其中,p为预测概率值,ZK为中间值,C为预测结果的类别数,为第j个中间值。Step S1021c, setting a classification layer, the classification layer adopts a softmax function, and the softmax function is Among them, p is the predicted probability value, ZK is the intermediate value, C is the number of categories of the predicted results, is the jth intermediate value.
步骤S1021d,设定输出层,所述输出层包括2个节点。Step S1021d, setting an output layer, the output layer includes 2 nodes.
步骤S1021e,设定激活函数,所述激活函数采用sigmoid函数,所述sigmoid函数为其中,所述f(x)的范围为0到1。Step S1021e, setting an activation function, the activation function adopts a sigmoid function, and the sigmoid function is Wherein, the f(x) ranges from 0 to 1.
步骤S1021f,设定批量大小,所述批量大小为A。Step S1021f, set the batch size, the batch size is A.
其中,所述批量大小可以根据实际情况灵活调整。所述批量大小可以为50-200。Wherein, the batch size can be flexibly adjusted according to actual conditions. The batch size may be 50-200.
在一种实施例中,所述批量大小为128。In one embodiment, the batch size is 128.
步骤S1021g,设定学习率,所述学习率为B。Step S1021g, setting a learning rate, the learning rate is B.
其中,所述学习率可以根据实际情况灵活调整。所述学习率可以为0.1-1.5。Wherein, the learning rate can be flexibly adjusted according to actual conditions. The learning rate may be 0.1-1.5.
在一种实施例中,所述学习率为0.9。In one embodiment, the learning rate is 0.9.
需要说明的是,所述步骤S1021a、S1021b、S1021c、S1021d、S1021e、S1021f、S1021g的先后顺序可以灵活调整。It should be noted that the order of the steps S1021a, S1021b, S1021c, S1021d, S1021e, S1021f, S1021g can be flexibly adjusted.
在步骤S1022中,所述将样本向量集带入网络结构进行计算,得到训练模型的步骤可以包括:In step S1022, the step of bringing the sample vector set into the network structure for calculation and obtaining the training model may include:
步骤S1022a,在输入层输入所述样本向量集进行计算,得到输入层的输出值。Step S1022a, input the sample vector set in the input layer for calculation, and obtain the output value of the input layer.
步骤S1022b,在所述隐含层的输入所述输入层的输出值,得到所述隐含层的输出值。Step S1022b, inputting the output value of the input layer to the hidden layer to obtain the output value of the hidden layer.
其中,所述输入层的输出值为所述隐含层的输入值。Wherein, the output value of the input layer is the input value of the hidden layer.
在一种实施例中,所述隐含层可以包括多个隐含分层。所述输入层的输出值为第一隐含分层的输入值。所述第一隐含分层的输出值为第二隐含分层的输入值。所述第二隐含分层的输出值为所述第三隐含分层的输入值,依次类推。In an embodiment, the hidden layer may include multiple hidden layers. The output value of the input layer is the input value of the first hidden layer. The output value of the first hidden layer is the input value of the second hidden layer. The output value of the second hidden layer is the input value of the third hidden layer, and so on.
步骤S1022c,在所述分类层输入所述隐含层的输出值进行计算,得到所述预测概率值[p1 p2]T。Step S1022c, input the output value of the hidden layer into the classification layer for calculation, and obtain the predicted probability value [p1 p2 ]T .
其中,所述隐含层的输出值为所述分类层的输入值。Wherein, the output value of the hidden layer is the input value of the classification layer.
在一种实施例中,所述隐含层可以包括多个隐含分层。最后一个隐含分层的输出值为所述分类层的输入值。In an embodiment, the hidden layer may include multiple hidden layers. The output value of the last hidden layer is the input value of the classification layer.
步骤S1022d,将所述预测概率值带入输出层进行计算,得到预测结果值y,当p1大于p2时,y=[1 0]T,当p1小于等于p2时,y=[0 1]T。Step S1022d, bring the predicted probability value into the output layer for calculation, and obtain the predicted result value y, when p1 is greater than p2 , y=[1 0]T , when p1 is less than or equal to p2 , y=[ 0 1]T .
其中,所述分类层的输出值为所述输出层的输入值。Wherein, the output value of the classification layer is the input value of the output layer.
步骤S1022e,根据预测结果值y修正所述网络结构,得到训练模型。Step S1022e, correcting the network structure according to the predicted value y to obtain a training model.
步骤S103,当应用程序进入后台,将所述应用程序的当前特征信息s输入所述训练模型进行计算。Step S103, when the application program enters the background, input the current characteristic information s of the application program into the training model for calculation.
请参阅图4,在一种实施例中,所述步骤S103可以包括:Referring to FIG. 4, in an embodiment, the step S103 may include:
步骤S1031:采集所述应用程序的当前特征信息s。Step S1031: Collect the current characteristic information s of the application program.
其中,采集的所述应用程序的当前特征信息s的维度与采集的所述应用程序的历史特征信息xi的维度相同。Wherein, the dimension of the collected current characteristic information s of the application program is the same as the dimension of the collected historical characteristic informationxi of the application program.
步骤S1032:将当前特征信息s带入训练模型进行计算。Step S1032: Bring the current feature information s into the training model for calculation.
其中,将当前特征信息s输入所述训练模型进行计算得到分类层的预测概率值[p1’ p2’]T,当p1’大于p2’时,y=[1 0]T,当p1’小于等于p2’时,y=[0 1]T。Among them, the current feature information s is input into the training model for calculation to obtain the predicted probability value of the classification layer [p1 ' p2 ']T , when p1 ' is greater than p2 ', y=[1 0]T , when When p1 ' is less than or equal to p2 ', y=[0 1]T .
步骤S104,判断所述应用程序是否需要关闭。Step S104, judging whether the application needs to be closed.
需要说明的是,当y=[1 0]T,判定所述应用程序需要关闭;当y=[0 1]T,判定所述应用程序需要保留。It should be noted that when y=[1 0]T , it is determined that the application program needs to be closed; when y=[0 1]T , it is determined that the application program needs to be retained.
本申请所提供的应用程序管控方法,通过获取历史特征信息xi,采用BP神经网络算法生成训练模型,当检测应用程序进入后台时,从而将应用程序的当前特征信息s带入训练模型,进而判断所述应用程序是否需要关闭,智能关闭应用程序。The application management and control method provided in this application uses the BP neural network algorithm to generate a training model by obtaining historical feature information xi , and when the detection application enters the background, the current feature information s of the application is brought into the training model, and then Determine whether the application program needs to be closed, and intelligently close the application program.
请参阅图5,图5为本申请实施例提供的应用程序管控装置的结构示意图。所述装置30包括获取模块31,生成模块32、计算模块33和判断模块34。Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of an application management and control device provided in an embodiment of the present application. The device 30 includes an acquisition module 31 , a generation module 32 , a calculation module 33 and a judgment module 34 .
需要说明的是,所述应用程序可以为聊天应用程序、视频应用程序、音乐应用程序、购物应用程序、共享单车应用程序或手机银行应用程序等。It should be noted that the application program may be a chat application program, a video application program, a music application program, a shopping application program, a shared bicycle application program, or a mobile banking application program.
所述获取模块31用于获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi。The acquiring module 31 is configured to acquire the application program sample vector set, wherein the sample vectors in the sample vector set include historical characteristic informationxi of multiple dimensions of the application program.
其中,从样本数据库中获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi。Wherein, the application program sample vector set is acquired from a sample database, wherein the sample vectors in the sample vector set include historical characteristic informationxi of multiple dimensions of the application program.
请参阅图6,图6为本申请实施例提供的应用程序管控装置的结构示意图。所述装置30还包括检测模块35,用于检测所述应用程序进入后台。Please refer to FIG. 6 . FIG. 6 is a schematic structural diagram of an application management and control device provided in an embodiment of the present application. The device 30 also includes a detection module 35, configured to detect that the application program enters the background.
所述装置30还可以包括储存模块36。所述储存模块36用于储存应用程序的历史特征信息xi。The device 30 may also include a storage module 36 . The storage module 36 is used for storing the historical characteristic informationxi of the application program.
其中,所述多个维度的特征信息可以参考表2。Wherein, the feature information of the multiple dimensions can refer to Table 2.
表2Table 2
需要说明的是,以上表2示出的10个维度的特征信息仅为本申请实施例中的一种,但是本申请并不局限于表1示出的10个维度的特征信息,也可以为其中之一、或者其中至少两个,或者全部,亦或者还可以包括其他维度的特征信息,例如,当前是否在充电、当前的电量或者当前是否连接WiFi等。It should be noted that the feature information of the 10 dimensions shown in Table 2 above is only one of the embodiments of the present application, but the present application is not limited to the feature information of the 10 dimensions shown in Table 1, and may also be One of them, or at least two of them, or all of them, or may also include feature information of other dimensions, for example, whether it is currently charging, the current power level, or whether it is currently connected to WiFi.
在一种实施例中,可以选取6个维度的历史特征信息:In one embodiment, six dimensions of historical feature information can be selected:
A、应用程序在后台驻留的时间;A. The time the application stays in the background;
B、屏幕是否为亮,例如,屏幕亮,记为1,屏幕熄灭,记为0;B. Whether the screen is bright, for example, if the screen is bright, it is recorded as 1, and if the screen is off, it is recorded as 0;
C、当周总使用次数统计;C. Statistics on the total usage times of the week;
D、当周总使用时间统计;D. Statistics on the total usage time of the week;
E、WiFi是否打开,例如,WiFi打开,记为1,WiFi关闭,记为0;以及E. Whether WiFi is turned on, for example, if WiFi is turned on, it is recorded as 1, and when WiFi is turned off, it is recorded as 0; and
F、当前是否在充电,例如,当前正在充电,记为1,当前未在充电,记为0。F. Whether it is currently charging, for example, if it is currently charging, it will be recorded as 1, and if it is not currently charging, it will be recorded as 0.
所述生成模块32用于采用BP神经网络算法对样本向量集进行计算,生成训练模型。The generating module 32 is used to calculate the sample vector set by using the BP neural network algorithm to generate a training model.
所述生成模块32训练所述获取模块31获取的历史特征信息xi,在BP神经网络算法中输入所述历史特征信息xi。The generation module 32 trains the historical feature informationxi acquired by the acquisition module 31, and inputs the historical feature informationxi into the BP neural network algorithm.
请参阅图6,所述生成模块32包括定义模块321和求解模块322。Referring to FIG. 6 , the generation module 32 includes a definition module 321 and a solution module 322 .
所述定义模块321用于定义网络结构。The definition module 321 is used to define the network structure.
所述定义模块321可以包括输入层定义模块3211、隐含层定义模块3212、分类层定义模块3213、输出层定义模块3214、激活函数定义模块3215、批量大小定义模块3216和学习率定义模块3217。The definition module 321 may include an input layer definition module 3211 , a hidden layer definition module 3212 , a classification layer definition module 3213 , an output layer definition module 3214 , an activation function definition module 3215 , a batch size definition module 3216 and a learning rate definition module 3217 .
所述输入层定义模块3211用于设定输入层,所述输入层包括N个节点,所述输入层的节点数与所述历史特征信息xi的维数相同。The input layer definition module 3211 is used to set an input layer, the input layer includes N nodes, and the number of nodes in the input layer is the same as the dimension of the historical characteristic informationxi .
其中,所述历史特征信息xi的维数小于10个,所述输入层的节点数小于10个,以简化运算过程。Wherein, the dimension of the historical characteristic informationxi is less than 10, and the number of nodes in the input layer is less than 10, so as to simplify the operation process.
在一种实施例中,所述历史特征信息xi的维数为6维,所述输入层包括6个节点。In an embodiment, the dimensionality of the historical characteristic informationxi is 6 dimensions, and the input layer includes 6 nodes.
所述隐含层定义模块3212用于设定隐含层,所述隐含层包括M个节点。The hidden layer definition module 3212 is used to set a hidden layer, and the hidden layer includes M nodes.
其中,所述隐含层可以包括多个隐含分层。每一所述隐含分层的节点数小于10个,以简化运算过程。Wherein, the hidden layer may include multiple hidden layers. The number of nodes in each hidden layer is less than 10 to simplify the calculation process.
在一种实施例中,所述隐含层可以包括第一隐含分层,第二隐含分层和第三隐含分层。所述第一隐含分层包括10个节点,第二隐含分层包括5个节点,第三隐含分层包括5个节点。In an embodiment, the hidden layers may include a first hidden layer, a second hidden layer and a third hidden layer. The first hidden layer includes 10 nodes, the second hidden layer includes 5 nodes, and the third hidden layer includes 5 nodes.
所述分类层定义模块3213用于设定分类层,所述分类层采用softmax函数,所述softmax函数为其中,p为预测概率值,ZK为中间值,C为预测结果的类别数,为第j个中间值。The classification layer definition module 3213 is used to set the classification layer, the classification layer uses a softmax function, and the softmax function is Among them, p is the predicted probability value, ZK is the intermediate value, C is the number of categories of the predicted results, is the jth intermediate value.
所述输出层定义模块3214用于设定输出层,所述输出层包括2个节点。The output layer definition module 3214 is used to set an output layer, and the output layer includes 2 nodes.
所述激活函数定义模块3215用于设定激活函数,所述激活函数采用sigmoid函数,所述sigmoid函数为其中,所述f(x)的范围为0到1。The activation function definition module 3215 is used to set an activation function, the activation function adopts a sigmoid function, and the sigmoid function is Wherein, the f(x) ranges from 0 to 1.
所述批量大小定义模块3216用于设定批量大小,所述批量大小为A。The batch size definition module 3216 is used to set the batch size, and the batch size is A.
其中,所述批量大小可以根据实际情况灵活调整。所述批量大小可以为50-200。Wherein, the batch size can be flexibly adjusted according to actual conditions. The batch size may be 50-200.
在一种实施例中,所述批量大小为128。In one embodiment, the batch size is 128.
所述学习率定义模块3217用于设定学习率,所述学习率为B。The learning rate definition module 3217 is used to set a learning rate, and the learning rate is B.
其中,所述学习率可以根据实际情况灵活调整。所述学习率可以为0.1-1.5。Wherein, the learning rate can be flexibly adjusted according to actual conditions. The learning rate may be 0.1-1.5.
在一种实施例中,所述学习率为0.9。In one embodiment, the learning rate is 0.9.
需要说明的是,所述输入层定义模块3211设定输入层、所述隐含层定义模块3212设定隐含层、所述分类层定义模块3213设定分类层、所述输出层定义模块3214设定输出层、所述激活函数定义模块3215设定激活函数、所述批量大小定义模块3216设定批量大小和所述学习率定义模块3217设定学习率的先后顺序可以灵活调整。It should be noted that the input layer definition module 3211 sets the input layer, the hidden layer definition module 3212 sets the hidden layer, the classification layer definition module 3213 sets the classification layer, and the output layer definition module 3214 The sequence of setting the output layer, setting the activation function by the activation function definition module 3215 , setting the batch size by the batch size definition module 3216 and setting the learning rate by the learning rate definition module 3217 can be flexibly adjusted.
所述求解模块322用于将样本向量集带入网络结构进行计算,得到训练模型。The solution module 322 is used to bring the sample vector set into the network structure for calculation to obtain a training model.
所述求解模块322可以包括第一求解模块3221、第二求解模块3222、第三求解模块3223、第四求解模块3224和修正模块。The solution module 322 may include a first solution module 3221 , a second solution module 3222 , a third solution module 3223 , a fourth solution module 3224 and a correction module.
所述第一求解模块3221用于在输入层输入所述样本向量集进行计算,得到输入层的输出值。The first solving module 3221 is used to input the sample vector set at the input layer for calculation, and obtain the output value of the input layer.
所述第二求解模块3222用于在所述隐含层的输入所述输入层的输出值,得到所述隐含层的输出值。The second solution module 3222 is used to input the output value of the input layer to the hidden layer to obtain the output value of the hidden layer.
其中,所述输入层的输出值为所述隐含层的输入值。Wherein, the output value of the input layer is the input value of the hidden layer.
在一种实施例中,所述隐含层可以包括多个隐含分层。所述输入层的输出值为第一隐含分层的输入值。所述第一隐含分层的输出值为第二隐含分层的输入值。所述第二隐含分层的输出值为所述第三隐含分层的输入值,依次类推。In an embodiment, the hidden layer may include multiple hidden layers. The output value of the input layer is the input value of the first hidden layer. The output value of the first hidden layer is the input value of the second hidden layer. The output value of the second hidden layer is the input value of the third hidden layer, and so on.
所述第三求解模块3223用于在所述分类层输入所述隐含层的输出值进行计算,得到所述预测概率值[p1 p2]T。The third solving module 3223 is used to input the output value of the hidden layer into the classification layer for calculation, and obtain the predicted probability value [p1 p2 ]T .
其中,所述隐含层的输出值为所述分类层的输入值。Wherein, the output value of the hidden layer is the input value of the classification layer.
所述第四求解模块3224用于将所述预测概率值带入输出层进行计算,得到预测结果值y,当p1大于p2时,y=[1 0]T,当p1小于等于p2时,y=[0 1]T。The fourth solution module 3224 is used to bring the predicted probability value into the output layer for calculation to obtain the predicted result value y, when p1 is greater than p2 , y=[1 0]T , when p1 is less than or equal to p2 , y=[0 1]T .
其中,所述分类层的输出值为所述输出层的输入值。Wherein, the output value of the classification layer is the input value of the output layer.
所述修正模块3225用于根据预测结果值y修正所述网络结构,得到训练模型。The correction module 3225 is used to correct the network structure according to the prediction result value y to obtain a training model.
所述计算模块33用于当应用程序进入后台,将所述应用程序的当前特征信息s输入所述训练模型进行计算。The calculation module 33 is used for inputting the current feature information s of the application program into the training model for calculation when the application program enters the background.
请参阅图6,在一种实施例中,所述计算模块33可以包括采集模块331和运算模块332。Referring to FIG. 6 , in an embodiment, the calculation module 33 may include a collection module 331 and a calculation module 332 .
所述采集模块331用于采集所述应用程序的当前特征信息s。The collecting module 331 is used for collecting the current characteristic information s of the application program.
其中,采集的所述应用程序的当前特征信息s的维度与采集的所述应用程序的历史特征信息xi的维度相同。Wherein, the dimension of the collected current characteristic information s of the application program is the same as the dimension of the collected historical characteristic informationxi of the application program.
所述运算模块332用于当前特征信息s带入训练模型进行计算。The operation module 332 is used to bring the current feature information s into the training model for calculation.
其中,将当前特征信息s输入所述训练模型进行计算得到分类层的预测概率值[p1’ p2’]T,当p1’大于p2’时,y=[1 0]T,当p1’小于等于p2’时,y=[0 1]T。Among them, the current feature information s is input into the training model for calculation to obtain the predicted probability value of the classification layer [p1 ' p2 ']T , when p1 ' is greater than p2 ', y=[1 0]T , when When p1 ' is less than or equal to p2' , y=[0 1]T .
在一种实施例中,所述采集模块331用于根据预定采集时间定时采集当前特征信息s,并将当前特征信息s存入储存模块36,所述采集模块331还用于采集检测到应用程序进入后台的时间点对应的当前特征信息s,并将该当前特征信息s输入运算模块332用于带入训练模型进行计算。In one embodiment, the collection module 331 is used to regularly collect the current characteristic information s according to the predetermined collection time, and store the current characteristic information s in the storage module 36, and the collection module 331 is also used to collect the detected application program Enter the current feature information s corresponding to the time point of entering the background, and input the current feature information s into the operation module 332 to be brought into the training model for calculation.
所述判断模块34用于判断所述应用程序是否需要关闭。The judging module 34 is used for judging whether the application needs to be closed.
需要说明的是,当y=[1 0]T,判定所述应用程序需要关闭;当y=[0 1]T,判定所述应用程序需要保留。It should be noted that when y=[1 0]T , it is determined that the application program needs to be closed; when y=[0 1]T , it is determined that the application program needs to be retained.
所述装置30还可以包括关闭模块37,用于当判断应用程序需要关闭时,将所述应用程序关闭。The device 30 may further include a closing module 37, configured to close the application program when it is determined that the application program needs to be closed.
本申请所提供的用于应用程序管控方法的装置,通过获取历史特征信息xi,采用BP神经网络算法生成训练模型,当检测应用程序进入后台时,从而将应用程序的当前特征信息s带入训练模型,进而判断所述应用程序是否需要关闭,智能关闭应用程序。The device used in the application program management and control method provided by this application uses the BP neural network algorithm to generate a training model by acquiring historical feature information xi , and when the application program is detected to enter the background, the current feature information s of the application program is brought into the Train the model, and then judge whether the application program needs to be closed, and intelligently close the application program.
请参阅图7,图7为本申请实施例提供的电子设备的结构示意图。所述电子设备500包括:处理器501和存储器502。其中,处理器501与存储器502电性连接。Please refer to FIG. 7 . FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 500 includes: a processor 501 and a memory 502 . Wherein, the processor 501 is electrically connected with the memory 502 .
处理器501是电子设备500的控制中心,利用各种接口和线路连接整个电子设备500的各个部分,通过运行或加载存储在存储器502内的应用程序,以及调用存储在存储器502内的数据,执行电子设备的各种功能和处理数据,从而对电子设备500进行整体监控。The processor 501 is the control center of the electronic device 500. It uses various interfaces and lines to connect various parts of the entire electronic device 500. By running or loading the application program stored in the memory 502 and calling the data stored in the memory 502, the processor 501 executes Various functions and processing data of the electronic device, so as to monitor the electronic device 500 as a whole.
在本实施例中,电子设备500中的处理器501会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器502中,并由处理器501来运行存储在存储器502中的应用程序,从而实现各种功能:In this embodiment, the processor 501 in the electronic device 500 will follow the steps below to load the instructions corresponding to the process of one or more application programs into the memory 502, and the instructions stored in the memory 502 will be executed by the processor 501. in the application, so as to realize various functions:
获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi;Acquiring the application program sample vector set, wherein the sample vectors in the sample vector set include historical characteristic information xi of multiple dimensions of the application program;
采用神经网络算法对样本向量集进行计算,生成训练模型;The neural network algorithm is used to calculate the sample vector set to generate a training model;
当应用程序进入后台,将所述应用程序的当前特征信息s输入所述训练模型进行计算;以及When the application program enters the background, input the current feature information s of the application program into the training model for calculation; and
判断所述应用程序是否需要关闭。Determine whether the application needs to be closed.
需要说明的是,所述应用程序可以为聊天应用程序、视频应用程序、音乐应用程序、购物应用程序、共享单车应用程序或手机银行应用程序等。It should be noted that the application program may be a chat application program, a video application program, a music application program, a shopping application program, a shared bicycle application program, or a mobile banking application program.
其中,从样本数据库中获取所述应用程序样本向量集,其中该样本向量集中的样本向量包括所述应用程序多个维度的历史特征信息xi。Wherein, the application program sample vector set is acquired from a sample database, wherein the sample vectors in the sample vector set include historical characteristic informationxi of multiple dimensions of the application program.
其中,所述多个维度的特征信息可以参考表3。Wherein, the feature information of the multiple dimensions can refer to Table 3.
表3table 3
需要说明的是,以上表3示出的10个维度的特征信息仅为本申请实施例中的一种,但是本申请并不局限于表1示出的10个维度的特征信息,也可以为其中之一、或者其中至少两个,或者全部,亦或者还可以包括其他维度的特征信息,例如,当前是否在充电、当前的电量或者当前是否连接WiFi等。It should be noted that the feature information of the 10 dimensions shown in Table 3 above is only one of the embodiments of the present application, but the present application is not limited to the feature information of the 10 dimensions shown in Table 1, and may also be One of them, or at least two of them, or all of them, or may also include feature information of other dimensions, for example, whether it is currently charging, the current power level, or whether it is currently connected to WiFi.
在一种实施例中,可以选取6个维度的历史特征信息:In one embodiment, six dimensions of historical feature information can be selected:
A、应用程序在后台驻留的时间;A. The time the application stays in the background;
B、屏幕是否为亮,例如,屏幕亮,记为1,屏幕熄灭,记为0;B. Whether the screen is bright, for example, if the screen is bright, it is recorded as 1, and if the screen is off, it is recorded as 0;
C、当周总使用次数统计;C. Statistics on the total usage times of the week;
D、当周总使用时间统计;D. Statistics on the total usage time of the week;
E、WiFi是否打开,例如,WiFi打开,记为1,WiFi关闭,记为0;以及E. Whether WiFi is turned on, for example, if WiFi is turned on, it is recorded as 1, and when WiFi is turned off, it is recorded as 0; and
F、当前是否在充电,例如,当前正在充电,记为1,当前未在充电,记为0。F. Whether it is currently charging, for example, if it is currently charging, it will be recorded as 1, and if it is not currently charging, it will be recorded as 0.
在一种实施例中,所述处理器501采用BP神经网络算法对样本向量集进行计算,生成训练模型还包括:In one embodiment, the processor 501 uses the BP neural network algorithm to calculate the sample vector set, and generating the training model further includes:
定义网络结构;以及define the network structure; and
将样本向量集带入网络结构进行计算,得到训练模型。Bring the sample vector set into the network structure for calculation to obtain the training model.
其中,所述定义网络结构包括:Wherein, the defined network structure includes:
设定输入层,所述输入层包括N个节点,所述输入层的节点数与所述历史特征信息xi的维数相同;Setting an input layer, the input layer includes N nodes, and the number of nodes in the input layer is the same as the dimension of the historical feature information xi ;
其中,所述历史特征信息xi的维数小于10个,所述输入层的节点数小于10个,以简化运算过程。Wherein, the dimension of the historical characteristic informationxi is less than 10, and the number of nodes in the input layer is less than 10, so as to simplify the operation process.
在一种实施例中,所述历史特征信息xi的维数为6维,所述输入层包括6个节点。In an embodiment, the dimensionality of the historical characteristic informationxi is 6 dimensions, and the input layer includes 6 nodes.
设定隐含层,所述隐含层包括M个节点。A hidden layer is set, and the hidden layer includes M nodes.
其中,所述隐含层可以包括多个隐含分层。每一所述隐含分层的节点数小于10个,以简化运算过程。Wherein, the hidden layer may include multiple hidden layers. The number of nodes in each hidden layer is less than 10 to simplify the calculation process.
在一种实施例中,所述隐含层可以包括第一隐含分层,第二隐含分层和第三隐含分层。所述第一隐含分层包括10个节点,第二隐含分层包括5个节点,第三隐含分层包括5个节点。In an embodiment, the hidden layers may include a first hidden layer, a second hidden layer and a third hidden layer. The first hidden layer includes 10 nodes, the second hidden layer includes 5 nodes, and the third hidden layer includes 5 nodes.
设定分类层,所述分类层采用softmax函数,所述softmax函数为其中,p为预测概率值,ZK为中间值,C为预测结果的类别数,为第j个中间值。Set classification layer, described classification layer adopts softmax function, and described softmax function is Among them, p is the predicted probability value, ZK is the intermediate value, C is the number of categories of the predicted results, is the jth intermediate value.
设定输出层,所述输出层包括2个节点。An output layer is set, and the output layer includes 2 nodes.
设定激活函数,所述激活函数采用sigmoid函数,所述sigmoid函数为其中,所述f(x)的范围为0到1。Set activation function, described activation function adopts sigmoid function, described sigmoid function is Wherein, the f(x) ranges from 0 to 1.
设定批量大小,所述批量大小为A。Set the batch size, said batch size is A.
其中,所述批量大小可以根据实际情况灵活调整。所述批量大小可以为50-200。Wherein, the batch size can be flexibly adjusted according to actual conditions. The batch size may be 50-200.
在一种实施例中,所述批量大小为128。In one embodiment, the batch size is 128.
设定学习率,所述学习率为B。A learning rate is set, and the learning rate is B.
其中,所述学习率可以根据实际情况灵活调整。所述学习率可以为0.1-1.5。Wherein, the learning rate can be flexibly adjusted according to actual conditions. The learning rate may be 0.1-1.5.
在一种实施例中,所述学习率为0.9。In one embodiment, the learning rate is 0.9.
需要说明的是,所述设定输入层、设定隐含层、设定分类层、设定输出层、设定激活函数、设定批量大小、设定学习率的先后顺序可以灵活调整。It should be noted that the order of setting the input layer, setting the hidden layer, setting the classification layer, setting the output layer, setting the activation function, setting the batch size, and setting the learning rate can be flexibly adjusted.
所述将样本向量集带入网络结构进行计算,得到训练模型的步骤可以包括:The step of bringing the sample vector set into the network structure for calculation and obtaining the training model may include:
在输入层输入所述样本向量集进行计算,得到输入层的输出值。The sample vector set is input into the input layer for calculation, and an output value of the input layer is obtained.
在所述隐含层的输入所述输入层的输出值,得到所述隐含层的输出值。The output value of the input layer is input to the hidden layer to obtain the output value of the hidden layer.
其中,所述输入层的输出值为所述隐含层的输入值。Wherein, the output value of the input layer is the input value of the hidden layer.
在一种实施例中,所述隐含层可以包括多个隐含分层。所述输入层的输出值为第一隐含分层的输入值。所述第一隐含分层的输出值为第二隐含分层的输入值。所述第二隐含分层的输出值为所述第三隐含分层的输入值,依次类推。In an embodiment, the hidden layer may include multiple hidden layers. The output value of the input layer is the input value of the first hidden layer. The output value of the first hidden layer is the input value of the second hidden layer. The output value of the second hidden layer is the input value of the third hidden layer, and so on.
在所述分类层输入所述隐含层的输出值进行计算,得到所述预测概率值[p1 p2]T。The output value of the hidden layer is input to the classification layer for calculation, and the predicted probability value [p1 p2 ]T is obtained.
其中,所述隐含层的输出值为所述分类层的输入值。Wherein, the output value of the hidden layer is the input value of the classification layer.
在一种实施例中,所述隐含层可以包括多个隐含分层。最后一个隐含分层的输出值为所述分类层的输入值。In an embodiment, the hidden layer may include multiple hidden layers. The output value of the last hidden layer is the input value of the classification layer.
将所述预测概率值带入输出层进行计算,得到预测结果值y,当p1大于p2时,y=[10]T,当p1小于等于p2时,y=[0 1]T。Bring the predicted probability value into the output layer for calculation to obtain the predicted result value y, when p1 is greater than p2 , y=[10]T , when p1 is less than or equal to p2 , y=[0 1]T .
其中,所述分类层的输出值为所述输出层的输入值。Wherein, the output value of the classification layer is the input value of the output layer.
根据预测结果值y修正所述网络结构,得到训练模型。The network structure is corrected according to the predicted result value y to obtain a training model.
所述当应用程序进入后台,将所述应用程序的当前特征信息s输入所述训练模型进行计算的步骤包括:When the application program enters the background, the step of inputting the current feature information s of the application program into the training model for calculation includes:
采集所述应用程序的当前特征信息s。Collect the current characteristic information s of the application program.
其中,采集的所述应用程序的当前特征信息s的维度与采集的所述应用程序的历史特征信息xi的维度相同。Wherein, the dimension of the collected current characteristic information s of the application program is the same as the dimension of the collected historical characteristic informationxi of the application program.
将当前特征信息s带入训练模型进行计算。Bring the current feature information s into the training model for calculation.
其中,将当前特征信息s输入所述训练模型进行计算得到分类层的预测概率值[p1’ p2’]T,当p1’大于p2’时,y=[1 0]T,当p1’小于等于p2’时,y=[0 1]T。Among them, the current feature information s is input into the training model for calculation to obtain the predicted probability value of the classification layer [p1 ' p2 ']T , when p1 ' is greater than p2 ', y=[1 0]T , when When p1 ' is less than or equal to p2 ', y=[0 1]T .
在所述判断所述应用程序是否需要关闭的步骤中,当y=[1 0]T,判定所述应用程序需要关闭;当y=[0 1]T,判定所述应用程序需要保留。In the step of judging whether the application program needs to be closed, when y=[1 0]T , it is determined that the application program needs to be closed; when y=[0 1]T , it is determined that the application program needs to be retained.
存储器502可用于存储应用程序和数据。存储器502存储的程序中包含有可在处理器中执行的指令。所述程序可以组成各种功能模块。处理器501通过运行存储在存储器502的程序,从而执行各种功能应用以及数据处理。Memory 502 may be used to store applications and data. The programs stored in the memory 502 include instructions executable by the processor. The programs can be composed of various functional modules. The processor 501 executes various functional applications and data processing by executing programs stored in the memory 502 .
在一些实施例中,如图8所示,图8为本申请实施例提供的电子设备的结构示意图。所述电子设备500还包括:射频电路503、显示屏504、控制电路505、输入单元506、音频电路507、传感器508以及电源509。其中,处理器501分别与射频电路503、显示屏504、控制电路505、输入单元506、音频电路507、传感器508以及电源509电性连接。In some embodiments, as shown in FIG. 8 , FIG. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 500 further includes: a radio frequency circuit 503 , a display screen 504 , a control circuit 505 , an input unit 506 , an audio circuit 507 , a sensor 508 and a power supply 509 . Wherein, the processor 501 is electrically connected to the radio frequency circuit 503 , the display screen 504 , the control circuit 505 , the input unit 506 , the audio circuit 507 , the sensor 508 and the power supply 509 .
射频电路503用于收发射频信号,以通过无线通信网络与服务器或其他电子设备进行通信。The radio frequency circuit 503 is used to send and receive radio frequency signals to communicate with servers or other electronic devices through the wireless communication network.
显示屏504可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图像、文本、图标、视频和其任意组合来构成。The display screen 504 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal. These graphical user interfaces may be composed of images, texts, icons, videos and any combination thereof.
控制电路505与显示屏504电性连接,用于控制显示屏504显示信息。The control circuit 505 is electrically connected to the display screen 504 for controlling the display screen 504 to display information.
输入单元506可用于接收输入的数字、字符信息或用户特征信息(例如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The input unit 506 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
音频电路507可通过扬声器、传声器提供用户与终端之间的音频接口。The audio circuit 507 can provide an audio interface between the user and the terminal through a speaker or a microphone.
传感器508用于采集外部环境信息。传感器508可以包括环境亮度传感器、加速度传感器、陀螺仪等传感器中的一种或多种。The sensor 508 is used to collect external environment information. The sensor 508 may include one or more of sensors such as an ambient brightness sensor, an acceleration sensor, and a gyroscope.
电源509用于给电子设备500的各个部件供电。在一些实施例中,电源509可以通过电源管理系统与处理器501逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The power supply 509 is used to supply power to various components of the electronic device 500 . In some embodiments, the power supply 509 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.
尽管图8中未示出,电子设备500还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 8 , the electronic device 500 may also include a camera, a Bluetooth module, etc., which will not be repeated here.
本申请所提供的电子设备,通过获取历史特征信息xi,采用BP神经网络算法生成训练模型,当检测应用程序进入后台时,从而将应用程序的当前特征信息s带入训练模型,进而判断所述应用程序是否需要关闭,智能关闭应用程序。The electronic device provided by this application uses the BP neural network algorithm to generate a training model by acquiring historical feature information xi , and when the detection application program enters the background, the current feature information s of the application program is brought into the training model, and then judged. Whether the above application needs to be closed, intelligently close the application.
本发明实施例还提供一种介质,该介质中存储有多条指令,该指令适于由处理器加载以执行上述任一实施例所述的应用程序管控方法。An embodiment of the present invention also provides a medium, in which a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor to execute the application program management method described in any of the above-mentioned embodiments.
本发明实施例提供的应用程序管控方法、装置、介质及电子设备属于同一构思,其具体实现过程详见说明书全文,此处不再赘述。The application program management and control method, device, medium, and electronic device provided by the embodiments of the present invention belong to the same concept, and the specific implementation process thereof can be found in the full text of the specification, and will not be repeated here.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,RandomAccess Memory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read Only Memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), disk or CD, etc.
以上对本申请实施例提供的应用程序管控方法、装置、介质及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施例进行了阐述,以上实施例的说明只是用于帮助理解本申请。同时,对于本领域的技术人员,依据本申请的思想,在具体实施例及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The application program management and control method, device, medium and electronic equipment provided by the embodiment of the present application have been introduced in detail above. In this paper, specific examples are used to illustrate the principle and embodiment of the present application. The description of the above embodiment is only for helping understand this application. At the same time, for those skilled in the art, based on the idea of this application, there will be changes in the specific embodiments and application scope. In summary, the content of this specification should not be construed as limiting the application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711044959.5ACN107885544B (en) | 2017-10-31 | 2017-10-31 | Application program control method, device, medium and electronic equipment |
| PCT/CN2018/110518WO2019085749A1 (en) | 2017-10-31 | 2018-10-16 | Application program control method and apparatus, medium, and electronic device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711044959.5ACN107885544B (en) | 2017-10-31 | 2017-10-31 | Application program control method, device, medium and electronic equipment |
| Publication Number | Publication Date |
|---|---|
| CN107885544Atrue CN107885544A (en) | 2018-04-06 |
| CN107885544B CN107885544B (en) | 2020-04-10 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711044959.5AActiveCN107885544B (en) | 2017-10-31 | 2017-10-31 | Application program control method, device, medium and electronic equipment |
| Country | Link |
|---|---|
| CN (1) | CN107885544B (en) |
| WO (1) | WO2019085749A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109101326A (en)* | 2018-06-06 | 2018-12-28 | 三星电子(中国)研发中心 | A kind of background process management method and device |
| WO2019085749A1 (en)* | 2017-10-31 | 2019-05-09 | Oppo广东移动通信有限公司 | Application program control method and apparatus, medium, and electronic device |
| CN110275760A (en)* | 2019-06-27 | 2019-09-24 | 深圳市网心科技有限公司 | Process suspending method based on virtual host processor and its related equipment |
| CN110286961A (en)* | 2019-06-27 | 2019-09-27 | 深圳市网心科技有限公司 | Process suspension method based on physical host processor and related equipment |
| CN110286949A (en)* | 2019-06-27 | 2019-09-27 | 深圳市网心科技有限公司 | Process suspending method and related equipment based on reading and writing of physical host storage device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105389193A (en)* | 2015-12-25 | 2016-03-09 | 北京奇虎科技有限公司 | Accelerating processing method, device and system for application, and server |
| US20160217198A1 (en)* | 2015-01-26 | 2016-07-28 | Samsung Electronics Co., Ltd. | User management method and apparatus |
| CN106354836A (en)* | 2016-08-31 | 2017-01-25 | 南威软件股份有限公司 | Advertisement page prediction method and device |
| CN106648023A (en)* | 2016-10-02 | 2017-05-10 | 上海青橙实业有限公司 | Mobile terminal and power-saving method of mobile terminal based on neural network |
| CN107133094A (en)* | 2017-06-05 | 2017-09-05 | 努比亚技术有限公司 | Application management method, mobile terminal and computer-readable recording medium |
| CN107145215A (en)* | 2017-05-06 | 2017-09-08 | 维沃移动通信有限公司 | A kind of background application method for cleaning and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102306095B (en)* | 2011-07-21 | 2017-04-05 | 宇龙计算机通信科技(深圳)有限公司 | Application management method and terminal |
| US10572797B2 (en)* | 2015-10-27 | 2020-02-25 | Pusan National University Industry—University Cooperation Foundation | Apparatus and method for classifying home appliances based on power consumption using deep learning |
| CN106909447B (en)* | 2015-12-23 | 2019-11-15 | 北京金山安全软件有限公司 | Background application processing method and device and terminal |
| CN105718027B (en)* | 2016-01-20 | 2019-05-31 | 努比亚技术有限公司 | The management method and mobile terminal of background application |
| CN105808410B (en)* | 2016-03-29 | 2019-05-31 | 联想(北京)有限公司 | A kind of information processing method and electronic equipment |
| CN107608748B (en)* | 2017-09-30 | 2019-09-13 | Oppo广东移动通信有限公司 | Application program control method and device, storage medium and terminal equipment |
| CN107643948B (en)* | 2017-09-30 | 2020-06-02 | Oppo广东移动通信有限公司 | Application program control method, device, medium and electronic equipment |
| CN107885544B (en)* | 2017-10-31 | 2020-04-10 | Oppo广东移动通信有限公司 | Application program control method, device, medium and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160217198A1 (en)* | 2015-01-26 | 2016-07-28 | Samsung Electronics Co., Ltd. | User management method and apparatus |
| CN105389193A (en)* | 2015-12-25 | 2016-03-09 | 北京奇虎科技有限公司 | Accelerating processing method, device and system for application, and server |
| CN106354836A (en)* | 2016-08-31 | 2017-01-25 | 南威软件股份有限公司 | Advertisement page prediction method and device |
| CN106648023A (en)* | 2016-10-02 | 2017-05-10 | 上海青橙实业有限公司 | Mobile terminal and power-saving method of mobile terminal based on neural network |
| CN107145215A (en)* | 2017-05-06 | 2017-09-08 | 维沃移动通信有限公司 | A kind of background application method for cleaning and mobile terminal |
| CN107133094A (en)* | 2017-06-05 | 2017-09-05 | 努比亚技术有限公司 | Application management method, mobile terminal and computer-readable recording medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019085749A1 (en)* | 2017-10-31 | 2019-05-09 | Oppo广东移动通信有限公司 | Application program control method and apparatus, medium, and electronic device |
| CN109101326A (en)* | 2018-06-06 | 2018-12-28 | 三星电子(中国)研发中心 | A kind of background process management method and device |
| CN110275760A (en)* | 2019-06-27 | 2019-09-24 | 深圳市网心科技有限公司 | Process suspending method based on virtual host processor and its related equipment |
| CN110286961A (en)* | 2019-06-27 | 2019-09-27 | 深圳市网心科技有限公司 | Process suspension method based on physical host processor and related equipment |
| CN110286949A (en)* | 2019-06-27 | 2019-09-27 | 深圳市网心科技有限公司 | Process suspending method and related equipment based on reading and writing of physical host storage device |
| Publication number | Publication date |
|---|---|
| CN107885544B (en) | 2020-04-10 |
| WO2019085749A1 (en) | 2019-05-09 |
| Publication | Publication Date | Title |
|---|---|---|
| CN107608748B (en) | Application program control method and device, storage medium and terminal equipment | |
| CN107643948A (en) | Application program control method, device, medium and electronic equipment | |
| CN107463403B (en) | Process control method, device, storage medium and electronic device | |
| CN107885544A (en) | Application program management and control method, device, medium and electronic equipment | |
| CN105512685B (en) | Object identification method and device | |
| CN107678858B (en) | Application processing method and device, storage medium and electronic equipment | |
| CN111797288B (en) | Data screening method, device, storage medium and electronic device | |
| WO2019062413A1 (en) | Method and apparatus for managing and controlling application program, storage medium, and electronic device | |
| CN107844338B (en) | Application program control method, device, medium and electronic equipment | |
| WO2018214885A1 (en) | Radio frequency interference processing method and electronic device | |
| EP3671441A1 (en) | Application management method and apparatus, storage medium, and electronic device | |
| CN108663627A (en) | A kind of self-discharge of battery detection method and self-discharge of battery detection device | |
| CN107402808B (en) | Process management method, device, storage medium and electronic equipment | |
| CN107659717A (en) | State detection method, device and storage medium | |
| CN108984096A (en) | Touch operation method, device, storage medium and electronic device | |
| CN108111683A (en) | The control method of mobile terminal and its operating mode, device, storage medium | |
| CN113033761B (en) | Data processing method, device, computer equipment and storage medium | |
| CN107861770B (en) | Application program control method and device, storage medium and terminal equipment | |
| CN107943571A (en) | Background application management-control method, device, storage medium and electronic equipment | |
| CN107395872A (en) | Using startup method, apparatus, storage medium and electronic equipment | |
| CN114510417A (en) | Image rendering effect testing method and device, electronic equipment and storage medium | |
| CN113297128B (en) | Data processing method, device, computer equipment and storage medium | |
| CN108519849A (en) | Touch information processing method, device, storage medium and electronic equipment | |
| CN107870791A (en) | Application management method, device, storage medium and electronic device | |
| CN111797863A (en) | Model training method, data processing method, device, storage medium and device |
| 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 | Address after:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after:OPPO Guangdong Mobile Communications Co., Ltd. Address before:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before:Guangdong OPPO Mobile Communications Co., Ltd. | |
| CB02 | Change of applicant information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |