(19)
(11)EP 3 706 043 A1

(12)EUROPEAN PATENT APPLICATION
published in accordance with Art. 153(4) EPC

(43)Date of publication:
09.09.2020 Bulletin 2020/37

(21)Application number: 18873772.0

(22)Date of filing:  16.10.2018
(51)International Patent Classification (IPC): 
G06K 9/62(2006.01)
(86)International application number:
PCT/CN2018/110519
(87)International publication number:
WO 2019/085750 (09.05.2019 Gazette  2019/19)
(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR
Designated Extension States:
BA ME
Designated Validation States:
KH MA MD TN

(30)Priority: 31.10.2017 CN 201711047050

(71)Applicant: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.
Wusha, Chang'an Dongguan, Guangdong 523860 (CN)

(72)Inventor:
  • LIANG, Kun
    Dongguan Guangdong 523860 (CN)

(74)Representative: Mewburn Ellis LLP 
Aurora Building Counterslip
Bristol BS1 6BX
Bristol BS1 6BX (GB)

  


(54)APPLICATION PROGRAM CONTROL METHOD AND APPARATUS, MEDIUM, AND ELECTRONIC DEVICE


(57) A method and device for managing and controlling an application, a medium, and an electronic device are provided. The method includes the following. Historical feature information xi is obtained. A first training model is generated based on a back propagation (BP) neural network algorithm. A second training model is generated based on a non-linear support vector machine algorithm. Upon detecting that the application is switched to background, current feature information s associated with the application is taken into the first training model and the second training model for calculation. Whether the application needs to be closed is determined.




Description

CROSS-REFERENCE TO RELATED APPLICATION(S)



[0001] This application claims priority to Chinese Patent Application No. 201711047050.5, filed on October 31, 2017, and entitled "METHOD AND DEVICE FOR MANAGING AND CONTROLLING APPLICATION, MEDIUM, AND ELECTRONIC DEVICE", the entire disclosure of which is hereby incorporated by reference.

TECHNICAL FIELD



[0002] This disclosure relates to the field of electronic terminals, and more particularly to a method and device for managing and controlling an application, a medium, and an electronic device.

BACKGROUND



[0003] Multiple applications in terminals may be used every day. Generally, if an application switched to background of the terminal is not cleaned up in time, runinng of the application in the background still occupies valuable system memory resources and increases system power consumption. To this end, it is urgent to provide a method and device for managing and controlling an application, a medium, and an electronic device.

SUMMARY



[0004] Technical problems: according to embodiments, a method and device for managing and controlling an application, a medium, and an electronic device are provided, which can intelligently close an application.

[0005] Technical solutions are as follows.

[0006] According to embodiments, a method for managing and controlling an application is provided. The method is applicable to an electronic device. A sample vector set associated with the application is obtained, where the sample vector set contains a plurality of sample vectors, and each of the plurality of sample vectors includes multi-dimensional historical feature information xi associated with the application. A first training model is generated by performing calculation on the sample vector set based on a back propagation (BP) neural network algorithm, and a second training model is generated based on a non-linear support vector machine algorithm. Upon detecting that the application is switched to background, first closing probability is obtained by taking current feature information s associated with the application into the first training model for calculation. When the first closing probability is within a hesitation interval, second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. When the second closing probability is greater than a judgment value, close the application.

[0007] According to embodiments, a device for managing and controlling an application is provided. The device includes an obtaining module, a generating module, and a calculating module. The obtaining module is configured to obtain a sample vector set associated with the application, where the sample vector set contains a plurality of sample vectors, and each of the plurality of sample vectors includes multi-dimensional historical feature information xi associated with the application. The generating module is configured to generate a first training model by performing calculation on the sample vector set based on a BP neural network algorithm, and generate a second training model based on a non-linear support vector machine algorithm. The calculating module is configured to obtain first closing probability by taking current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to background, obtain second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within a hesitation interval, and close the application when the second closing probability is greater than a judgment value.

[0008] According to embodiments, a medium is provided. The medium is configured to store a plurality of instructions. The instructions are, when executed by a processor, operable with the processor to execute the above method for managing and controlling an application.

[0009] According to embodiments, an electronic device is provided. The electronic device includes a processor and a memory. The electronic device is electrically coupled to the memory. The memory is configured to store instructions and data. The instructions, when executed by the processor, are operable with the processor to execute the following operations. A sample vector set associated with an application is obtained, where the sample vector set contains a plurality of sample vectors, and each of the plurality of sample vectors includes multi-dimensional historical feature information xi associated with the application. A first training model is generated by performing calculation on the sample vector set based on a BP neural network algorithm, and a second training model is generated based on a non-linear support vector machine algorithm. Upon detecting that the application is switched to background, first closing probability is obtained by taking current feature information s associated with the application into the first training model for calculation. When the first closing probability is within a hesitation interval, second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. When the second closing probability is greater than a judgment value, close the application.

[0010] Advantageous effects: according to embodiments, a method and device for managing and controlling an application, a medium, and an electronic device are provided, which can intelligently close an application.

BRIEF DESCRIPTION OF THE DRAWINGS



[0011] To illustrate technical solutions embodied by embodiments of the disclosure more clearly, the following briefly introduces accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description merely illustrate some embodiments of the disclosure. Those of ordinary skill in the art may also obtain other drawings based on these accompanying drawings without creative efforts.

FIG. 1 is a schematic diagram illustrating a device for managing and controlling an application according to embodiments.

FIG. 2 is a schematic diagram illustrating an application scenario of a device for managing and controlling an application according to embodiments.

FIG. 3 is a schematic flow chart illustrating a method for managing and controlling an application according to embodiments.

FIG. 4 is a schematic flow chart illustrating a method for managing and controlling an application according to other embodiments.

FIG. 5 is a schematic structural diagram illustrating a device according to embodiments.

FIG. 6 is a schematic structural diagram illustrating a device according to other embodiments.

FIG. 7 is a schematic structural diagram illustrating an electronic device according to embodiments.

FIG. 8 is a schematic structural diagram illustrating an electronic device according to other embodiments.


DETAILED DESCRIPTION



[0012] Hereinafter, technical solutions embodied by the embodiments of the disclosure will be described in a clear and comprehensive manner with reference to the accompanying drawings intended for the embodiments. It is evident that the embodiments described herein constitute merely some rather than all of the embodiments of the disclosure, and that those of ordinary skill in the art will be able to derive other embodiments based on these embodiments without making creative efforts, which all such derived embodiments shall all fall in the protection scope of the disclosure.

[0013] According to embodiments, a method for managing and controlling an application is provided. The method is applicable to an electronic device and includes the following. A sample vector set associated with the application is obtained, where the sample vector set contains a plurality of sample vectors, and each of the plurality of sample vectors includes multi-dimensional historical feature information xi associated with the application. A first training model is generated by performing calculation on the sample vector set based on a back propagation (BP) neural network algorithm. A second training model is generated based on a non-linear support vector machine algorithm. Upon detecting that the application is switched to background, first closing probability is obtained by taking current feature information s associated with the application into the first training model for calculation. When the first closing probability is within a hesitation interval, second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. When the second closing probability is greater than a judgment value, close the application.

[0014] In some embodiments, the first training model is generated by performing calculation on the sample vector set based on the BP neural network algorithm as follows. A network structure is defined. The first training model is obtained by taking the sample vector set into the network structure for calculation.

[0015] In some embodiments, the network structure is defined as follows. An input layer is set, where the input layer includes N nodes, and the number of nodes of the input layer is the same as the number of dimensions of the historical feature information xi. A hidden layer is set, where the hidden layer includes M nodes. A classification layer is set, where the classification layer is based on a softmax function, where the softmax function is:

where p is predicted probability, Zk is a median value, C is the number of predictied result categories, and eZj is a jth median value. An output layer is set, where the output layer includes two nodes. An activation function is set, where the activation function is based on a sigmoid function, where the sigmoid function is:

where f(x) has a range of 0 to 1. A batch size is set, where the batch size is A. A learning rate is set, where the learning rate is B.

[0016] In some embodiments, the first training model is obtained by taking the sample vector set into the network structure for calculation as follows. An output value of the input layer is obtained by inputting the sample vector set into the input layer for calculation. An output value of the hidden layer is obtained by inputting the output value of the input layer into the hidden layer. Predicted probability [p1 p2]T is obtained by inputting the output value of the hidden layer into the classification layer for calculation, where p1 represents predicted closing probability and p2 represents predicted retention probability. A predicted result y is obtained by inputting the predicted probability into the output layer for calculation, where y=[1 0]T when p1 is greater than p2, and y=[0 1]T when p1 is smaller than or equal to p2. The first training model is obtained by modifying the network structure according to the predicted result y.

[0017] In some embodiments, the second training model is generated based on the non-linear support vector machine algorithm as follows. For each of the sample vectors of the sample vector set, a labeling result yi for the sample vector is generated by labeling the sample vector. The second training model is obtained by defining a Gaussian kernel function.

[0018] In some embodiments, when the second closing probability is smaller than the judgment value, retain the application.

[0019] In some embodiments, the method further includes the following. When the first closing probability is beyond the hesitation interval, whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval is determined.

[0020] In some embodiments, upon determining that the first closing probability is smaller than the minimum value of the hesitation interval, retain the application. Upon determining that the first closing probability is greater than the maximum value of the hesitation interval, close the application.

[0021] In some embodiments, the first closing probability is obtained by taking the current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to the background, the second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within the hesitation interval, and close the application when the second closing probability is greater than the judgment value as follows. The current feature information s associated with the application is collected. The first closing probability is obtained by taking the current feature information s into the first training model for calculation. Whether the first closing probability is within the hesitation interval is determined. The second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. Whether the second closing probability is greater than the judgment value is determined. Whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval is determined.

[0022] According to embodiments, a device for managing and controlling an application is provided. The device includes an obtaining module, a generating module, and a calculating module. The obtaining module is configured to obtain a sample vector set associated with the application, where the sample vector set contains a plurality of sample vectors, and each of the plurality of sample vectors includes multi-dimensional historical feature information xi associated with the application. The generating module is configured to generate a first training model by performing calculation on the sample vector set based on a BP neural network algorithm, and generate a second training model based on a non-linear support vector machine algorithm. The calculating module is configured to obtain first closing probability by taking current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to background, obtain second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within a hesitation interval, and close the application when the second closing probability is greater than a judgment value.

[0023] According to embodiments, a medium is provided. The medium is configured to store a plurality of instructions. The instructions are, when executed by a processor, operable with the processor to execute the above method for managing and controlling an application

[0024] According to embodiments, an electronic device is provided. The electronic device includes a processor and a memory. The electronic device is electrically coupled to the memory. The memory is configured to store instructions and data. The instructions, when executed by the processor, are operable with the processor to execute the following operations. A sample vector set associated with an application is obtained, where the sample vector set contains a plurality of sample vectors, and each of the plurality of sample vectors includes multi-dimensional historical feature information xi associated with the application. A first training model is generated by performing calculation on the sample vector set based on a BP neural network algorithm, and a second training model is generated based on a non-linear support vector machine algorithm. Upon detecting that the application is switched to background, first closing probability is obtained by taking current feature information s associated with the application into the first training model for calculation. When the first closing probability is within a hesitation interval, second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. When the second closing probability is greater than a judgment value, close the application.

[0025] In some embodiments, the instructions operable with the processor to generate the first training model by performing calculation on the sample vector set based on the BP neural network algorithm are operable with the processor to: define a network structure; and obtain the first training model by taking the sample vector set into the network structure for calculation.

[0026] In some embodiments, the instructions operable with the processor to define the network structure are operable with the processor to: set an input layer, where the input layer includes N nodes, and the number of nodes of the input layer is the same as the number of dimensions of the historical feature information xi; set a hidden layer, where the hidden layer includes M nodes; set a classification layer, where the classification layer is based on a softmax function, where the softmax function is:

where p is predicted probability, Zk is a median value, C is the number of predictied result categories, and eZj is a jth median value; set an output layer, where the output layer includes two nodes; set an activation function, where the activation function is based on a sigmoid function, where the sigmoid function is:

where f(x) has a range of 0 to 1; set a batch size, where the batch size is A; and set a learning rate, where the learning rate is B.

[0027] In some embodiments, the instructions operable with the processor to obtain the first training model by taking the sample vector set into the network structure for calculation are operable with the processor to: obtain an output value of the input layer by inputting the sample vector set into the input layer for calculation; obtain an output value of the hidden layer by inputting the output value of the input layer into the hidden layer; obtain predicted probability [p1 p2]T by inputting the output value of the hidden layer into the classification layer for calculation, where p1 represents predicted closing probability and p2 represents predicted retention probability; obtain a predicted result y by inputting the predicted probability into the output layer for calculation, where y=[1 0]T when p1 is greater than p2, and y=[0 1]T when p1 is smaller than or equal to p2; and obtain the first training model by modifying the network structure according to the predicted result y.

[0028] In some embodiments, the instructions operable with the processor to generate the second training model based on the non-linear support vector machine algorithm are operable with the processor to: for each of the sample vectors of the sample vector set, generate a labeling result yi for the sample vector by labeling the sample vector; and obtain the second training model by defining a Gaussian kernel function.

[0029] In some embodiments, when the second closing probability is smaller than the judgment value, retain the application.

[0030] In some embodiments, the instructions are further operable with the processor to determine whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval, when the first closing probability is beyond the hesitation interval.

[0031] In some embodiments, upon determining that the first closing probability is smaller than the minimum value of the hesitation interval, retain the application. Upon determining that the first closing probability is greater than the maximum value of the hesitation interval, close the application.

[0032] In some embodiments, the instructions operable with the processor to obtain the first closing probability by taking the current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to the background, obtain the second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within the hesitation interval, and close the application when the second closing probability is greater than the judgment value are operable with the processor to: collect the current feature information s associated with the application; obtain the first closing probability by taking the current feature information s into the first training model for calculation; determine whether the first closing probability is within the hesitation interval; obtain the second closing probability by taking the current feature information s associated with the application into the second training model for calculation; determine whether the second closing probability is greater than the judgment value; and determine whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval.

[0033] The method for managing and controlling an application provided by embodiments of the disclosure may be applicable to an electronic device. The electronic device may be a smart mobile electronic device such as a smart bracelet, a smart phone, a tablet based on Apple® or Android® systems, a laptop based on Windows or Linux® systems, or the like. It should be noted that, the application may be any application such as a chat application, a video application, a playback application, a shopping application, a bicycle-sharing application, a mobile banking application, or the like.

[0034] FIG. 1 is a schematic diagram illustrating a device for managing and controlling an application according to embodiments. The device is configured to obtain historical feature information xi associated with the application from a database, and obtain training models by taking the historical feature information xi into algorithms for calculation. The device is further configured to take current feature information s associated with the application into the training models for calculation, and determine whether the application can be closed based on calculation results, so as to manage and control the application, such as closing or freezing the application.

[0035] FIG. 2 is a schematic diagram illustrating an application scenario of a method for managing and controlling an application according to embodiments. In one embodiment, historical feature information xi associated with the application is obtained from a database, and then training models are obtained by taking the historical feature information xi into algorithms for calculation. Further, upon detecting that the application is switched to the background of the electronic device, the device for managing and controlling an application takes current feature information s associated with the application into the training models for calculation, and determines whether the application can be closed based on calculation results. As an example, historical feature information xi associated with APP a is obtained from the database and then the training models are obtain by taking the historical feature information xi into algorithms for calculation. Upon detecting that APP a is switched to the background of the electronic device, the device for managing and controlling an application takes current feature information s associated with APP a into the training models for calculation, and closes APP a upon determining that APP a can be closed based on calculation results. As another example, upon detecting that APP b is switched to the background of the electronic device, the device for managing and controlling an application takes current feature information s associated with APP b into training models for calculation, retain APP b upon determining that APP b needs to be retained based on calculation results.

[0036] According to embodiments of the disclosure, a method for managing and controlling an application is provided. An execution body of the method may be a device for managing and controlling an application of the embodiments of the disclosure or an electronic device integrated with the device for managing and controlling an application. The device for managing and controlling an application may be implemented by means of hardware or software.

[0037] FIG. 3 is a schematic flow chart illustrating a method for managing and controlling an application according to embodiments. As illustrated in FIG. 3, the method according to the embodiments is applicable to an electronic device and includes the following.

[0038] At block S 11, a sample vector set associated with the application is obtained, where the sample vector set contains multiple sample vectors, and each of the multiple sample vectors includes multi-dimensional historical feature information xi associated with the application.

[0039] The sample vector set associated with the application may be obtained from a sample database, where each sample vector of the sample vector set includes multi-dimensional historical feature information xi associated with the application.

[0040] For the multi-dimensional historical feature information associated with the application, reference may be made to feature information of respective dimensions listed in Table 1.
Table 1
DimensionFeature information
1 Time length between a time point at which the application was recently switched to the background and a current time point
2 Accumulated duration of a screen-off state during a period between a time point at which the application was recently switched to the background and the current time point
3 a screen state (i.e., a screen-on state or a screen-off state) at the current time point
4 Ratio of the number of time lengths falling within a range of 0-5 minutes to the number of all time lengths in a histogram associated with duration that the application is in the background
5 Ratio of the number of time lengths falling within a range of 5-10 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
6 Ratio of the number of time lengths falling within a range of 10-15 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
7 Ratio of the number of time lengths falling within a range of 15-20 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
8 Ratio of the number of time lengths falling within a range of 20-25 minutes to the number of all time lengths in the histogram
  associated with duration that the application is in the background
9 Ratio of the number of time lengths falling within a range of 25-30 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
10 Ratio of the number of time lengths falling within a range of more than 30 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background


[0041] It should be noted that, the 10-dimensional feature information illustrated in Table 1 is merely an exemplary embodiment of the disclosure, and the multi-dimensional historical feature information of the disclosure includes, but is not limited to, the above 10-dimensional historical feature information illustrated in Table 1. The multi-dimensional historical feature information may include one of, at least two of, or all of the dimensions listed in Table 1, or may further include feature information of other dimensions (e.g., a charging connection state (i.e., not being charged or being charged) at the current time point, current remaining electric quantity, a WiFi connection state at the current time point, or the like), and which is not limited.

[0042] In some embodiments, the multi-dimensional historical feature information is embodied as 6-dimensional historical feature information. The 6-dimensional historical feature information is as follows. A: duration that the application resides in the background. B: a screen state (1: screen-on, 0: screen-off). C: number of times the application is used in a week. D: accumulated duration that the application is used in the week. E: a WiFi connection state (1: connected, 0: disconnected). F: a charging connection state (1: being charged, 0: not being charged).

[0043] At block S12, a first training model is generated by performing calculation on the sample vector set based on a BP neural network algorithm, and a second training model is generated based on a non-linear support vector machine algorithm.

[0044] FIG. 4 is a schematic flow chart illustrating a method for managing and controlling an application according to embodiments. As illustrated in FIG. 4, the operations at block S12 includes operations at block S121 and operations at block S122. At block S121, the first training model is generated by performing calculation on the sample vector set based on the BP neural network algorithm. At block S122, the second training model is generated based on the non-linear support vector machine algorithm. It should be noted that, the order of execution of the operations at block S121 and the operations at block S122 is not limited according to embodiments of the disclosure.

[0045] In some embodiments, the operations at block S121 include the following. At block S1211, a network structure is defined. At block S1212, the first training model is obtained by taking the sample vector set into the network structure for calculation.

[0046] In some embodiments, at block S1211, the network structure is defined as follows.

[0047] At block S1211a, an input layer is set, where the input layer includes N nodes, and the number of nodes of the input layer is the same as the number of dimensions of the historical feature information xi.

[0048] In some embodiments, to simplify the calculation, the number of dimensions of the historical feature information xi is set to be less than 10, and the number of nodes of the input layer is set to be less than 10. For example, the historical feature information xi is 6-dimensional historical feature information, and the input layer includes 6 nodes.

[0049] At block S1211b, a hidden layer is set, where the hidden layer includes M nodes.

[0050] In some embodiments, the hidden layer includes multiple hidden sublayers. To simplify the calculation, the number of nodes of each of the hidden sublayers is set to be less than 10. For example, the hidden layer includes a first hidden sublayer, a second hidden sublayer, and a third hidden sublayer. The first hidden sublayer includes 10 nodes, the second hidden sublayer includes 5 nodes, and the third hidden sublayer includes 5 nodes.

[0051] At block S 1211c, a classification layer is set, where the classification layer is based on a softmax function, where the softmax function is:

where p is predicted probability, Zk is a median value, C is the number of predictied result categories, and eZj is a jth median value.

[0052] At block S 1211d, an output layer is set, where the output layer includes 2 nodes.

[0053] At block S 1211e, an activation function is set, where the activation function is based on a sigmoid function, where the sigmoid function is:

where f(x) has a range of 0 to 1.

[0054] At block S 1211f, a batch size is set, where the batch size is A;

[0055] The batch size can be flexibly adjusted according to actual application scenarios. In some embodiments, the batch size is in a range of 50-200. For example, the batch size is 128.

[0056] At block S 1211g, a learning rate is set, where the learning rate is B.

[0057] The learning rate can be flexibly adjusted according to actual application scenarios. In some embodiments, the learning rate is in a range of 0.1-1.5. For example, the learning rate is 0.9.

[0058] It should be noted that, the order of execution of the operations at block S 1211a, the operations at block S 1211b, the operations at block S1211c, the operations at block S 1211d, the operations at block S 1211e, the operations at block S 1211f, and the operations at block S 1211g can be flexibly adjusted, which is not limited according to embodiments of the disclosure.

[0059] In some embodiments, at block S 1212, the first training model is obtained by taking the sample vector set into the network structure for calculation as follows.

[0060] At block S 1212a, an output value of the input layer is obtained by inputting the sample vector set into the input layer for calculation.

[0061] At block S 1212b, an output value of the hidden layer is obtained by inputting the output value of the input layer into the hidden layer.

[0062] The output value of the input layer is an input value of the hidden layer. In some embodiments, the hidden layer includes multiple hidden sublayers. The output value of the input layer is an input value of a first hidden sublayer, an output value of the first hidden sublayer is an input value of a second hidden sublayer, an output value of the second hidden sublayer is an input value of a third hidden sublayer, and so forth.

[0063] At block S 1212c, predicted probability [p1 p2]T is obtained by inputting the output value of the hidden layer into the classification layer for calculation, where p1 represents predicted closing probability and p2 represents predicted retention probability.

[0064] The output value of the hidden layer is an input value of the classification layer. In some embodiments, the hidden layer includes multiple hidden sublayers. An output value of the last hidden sublayer is the input value of the classification layer.

[0065] At block S 1212d, a predicted result y is obtained by inputting the predicted probability into the output layer for calculation, where y=[1 0]T when p1 is greater than p2, and y=[0 1]T when p1 is smaller than or equal to p2.

[0066] An output value of the classification layer is an input value of the output layer.

[0067] At block S 1212e, the first training model is obtained by modifying the network structure according to the predicted result y.

[0068] In some embodiments, the operations at block S122 include the following. At block S1221, for each of the sample vectors of the sample vector set, a labeling result yi for the sample vector is generated by labeling the sample vector. At block S1222, the second training model is obtained by defining a Gaussian kernel function.

[0069] In some embodiments, at block S1221, for each of the sample vectors of the sample vector set, the labeling result yi for the sample vector is generated by labeling the sample vector as follows. For each of the sample vectors of the sample vector set, the sample vector is labelled. Each sample vector is taken into the non-linear support vector machine algorithm to obtain a labeling result yi, and accordingly a sample-vector result set T = {(x1, y1), (x2, y2),..., (xm, ym)} is obtained. Input the sample vectors xi ∈ Rn, yi ∈ {+1, -1}, i = 1,2,3,...,n, Rn represents an input space corresponding to the sample vector, n represents the number of dimensions of the input space, and yi represents a labeling result corresponding to the input sample vector.

[0070] In some embodiments, at block S1222, the second training model is obtained by defining the Gaussian kernel function as follows. In an implementation, the kernal function is the Gaussian kernel function

where K (x, xi) is an Euclidean distance (i.e., Euclidean metric) from any point x to a center xi in a space, and σ is a width parameter of the Gaussian kernel function.

[0071] In some embodiments, the second training model is obtained by defining the Gaussian kernel function as follows. The Gaussian kernel function is defined. The second training model is obtained by defining a model function and a classification decision function according to the Gaussian kernel function. The model function is:

The classification decision function is:

where f(x) is a classification decision value, ai is a Lagrange factor, b is a bias coefficient. When f(x)=1, it means that the application needs to be closed. When f(x)=-1, it means that the application needs to be retained.

[0072] In some embodiments, by defining the Gaussian kernel function and defining the model function and the classification decision function according to the Gaussian kernel function, the second training model is obtained as follows. The Gaussian kernel function is defined. The model function and the classification decision function are defined according to the Gaussian kernel function. An objective optimization function is defined according to the model function and the classification decision function. The second training model is obtained by obtaining an optimal solution of the objective optimization function according to a sequential minimal optimization algorithm. The objective optimization function is:

where the objective optimization function is used to obtain a minimum value for parameters (a1, a2,..., ai), ai corresponds to a training sample (xi, yi), and the total number of variables is equal to capacity m of the training samples.

[0073] In some embodiments, the optimal solution is recorded as

the second training model is:

where g(x) is an output value of the second training model, and the output value is second closing probability.

[0074] At block S13, upon detecting that the application is switched to background, first closing probability is obtained by taking current feature information s associated with the application into the first training model for calculation. When the first closing probability is within a hesitation interval (i.e., a predetermined interval), second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. When the second closing probability is greater than a judgment value (i.e., a predetermined value), close the application.

[0075] In some embodiments, as illustrated in FIG. 4, the operations at block S13 include the following.

[0076] At block S131, the current feature information s associated with the application is collected.

[0077] The number of dimensions of the collected current feature information s associated with the application is the same as the number of dimensions of the collected historical feature information xi associated with the application.

[0078] At block S132, the first closing probability is obtained by taking the current feature information s into the first training model for calculation.

[0079] Probability [p1' p2']T determined in the classification layer can be obtained by taking the current feature information s into the first training model for calculation, where p1' is the first closing probability and p2' is first retention probability.

[0080] At block S133, whether the first closing probability is within the hesitation interval is determined.

[0081] The hesitation interval is in a range of 0.4-0.6 for example, the minimum value of the hesitation interval is 0.4, and the maximum value of the hesitation interval is 0.6. In some embodiments, when the first closing probability is within the hesitation interval, proceed to operations at block S134 and operations at block S135. When the first closing probability is beyond the hesitation interval, proceed to operations at block S136.

[0082] At block S134, the second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation.

[0083] The current feature information s is taken into the formula

to calculate the second closing probability g(s).

[0084] At block S135, whether the second closing probability is greater than the judgment value is determined.

[0085] It should be noted that, the judgment value may be set to be 0. When g(s) > 0, close the application; when g(s) < 0, retain the application.

[0086] At block S136, whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval is determined.

[0087] When the first closing probability is smaller than the minimum value of the hesitation interval, retain the application. When the first closing probability is greater than the maximum value of the hesitation interval, close the application.

[0088] According to the method for managing and controlling an application of embodiments of the disclosure, the historical feature information xi is obtained. The first training model is generated based on the BP neural network algorithm, and the second training model is generated based on the non-linear support vector machine algorithm. Upon detecting that the application is switched to the background, the first closing probability is obtained by taking the current feature information s associated with the application into the first training model for calculation. When the first closing probability is within the hesitation interval, the second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. Then, whether the application needs to be closed can be determined. In this way, it is possible to intelligently close the application.

[0089] FIG. 5 is a schematic structural diagram illustrating a device for managing and controlling an application according to embodiments. As illustrated in FIG. 5, a device 30 includes an obtaining module 31, a generating module 32, and a calculating module 33.

[0090] It should be noted that, the application may be any application such as a chat application, a video application, a playback application, a shopping application, a bicycle-sharing application, a mobile banking application, or the like.

[0091] The obtaining module 31 is configured to obtain a sample vector set associated with an application, where the sample vector set contains multiple sample vectors, and each of the multiple sample vectors includes multi-dimensional historical feature information xi associated with the application.

[0092] The sample vector set associated with the application may be obtained from a sample database, where each sample vector of the sample vector set includes multi-dimensional historical feature information xi associated with the application.

[0093] FIG. 6 is a schematic structural diagram illustrating a device for managing and controlling an application according to embodiments. As illustrated in FIG. 6, the device 30 further includes a detecting module 34. The detecting module 34 is configured to detect whether the application is switched to the background. The device 30 further includes a storage module 35. The storage module 35 is configured to store historical feature information xi associated with the application.

[0094] For the multi-dimensional historical feature information associated with the application, reference may be made to feature information of respective dimensions listed in Table 2.
Table 2
DimensionFeature information
1 Time length between a time point at which the application was recently switched to the background and a current time point
2 Accumulated duration of a screen-off state during a period between a time point at which the application was recently switched to the background and the current time point
3 a screen state (i.e., a screen-on state or a screen-off state) at the current time point
4 Ratio of the number of time lengths falling within a range of 0-5 minutes to the number of all time lengths in a histogram associated with duration that the application is in the background
5 Ratio of the number of time lengths falling within a range of 5-10 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
6 Ratio of the number of time lengths falling within a range of 10-15 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
7 Ratio of the number of time lengths falling within a range of 15-20 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
8 Ratio of the number of time lengths falling within a range of 20-25 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
9 Ratio of the number of time lengths falling within a range of 25-30 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
10 Ratio of the number of time lengths falling within a range of more than 30 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background


[0095] It should be noted that, the 10-dimensional feature information illustrated in Table 2 is merely an exemplary embodiment of the disclosure, and the multi-dimensional historical feature information of the disclosure includes, but is not limited to, the above 10-dimensional historical feature information illustrated in Table 1. The multi-dimensional historical feature information may include one of, at least two of, or all of the dimensions listed in Table 1, or may further include feature information of other dimensions (e.g., a charging connection state (i.e., not being charged or being charged) at the current time point, current remaining electric quantity, a WiFi connection state at the current time point, or the like), and which is not limited.

[0096] In some embodiments, the multi-dimensional historical feature information is embodied as 6-dimensional historical feature information. The 6-dimensional historical feature information is as follows. A: duration that the application resides in the background. B: a screen state (1: screen-on, 0: screen-off). C: number of times the application is used in a week. D: accumulated duration that the application is used in the week. E: a WiFi connection state (1: connected, 0: disconnected). F: a charging connection state (1: being charged, 0: not being charged).

[0097] The generating module 32 is configured to generate a first training model by performing calculation on the sample vector set based on a BP neural network algorithm, and generate a second training model based on a non-linear support vector machine algorithm.

[0098] The generating module 32 includes a first generating module 321 and a second generating module 322. The first generating module 321 is configured to generate the first training model by performing calculation on the sample vector set based on the BP neural network algorithm. The second generating module 322 is configured to generate the second training model based on the non-linear support vector machine algorithm.

[0099] As illustrated in FIG. 6, the first generating module 321 includes a defining module 3211 and a first solving module 3212. The defining module 3211 is configured to define a network structure. In some embodiments, the defining module 3211 includes an input-layer defining module 3211a, a hidden-layer defining module 3211b, a classification-layer defining module 3211c, an output-layer defining module 3211d, an activation-function defining module 3211e, a batch-size defining module 3211f, and a learning-rate defining module 3211g.

[0100] The input-layer defining module 3211a is configured to set an input layer, where the input layer includes N nodes, and the number of nodes of the input layer is the same as the number of dimensions of the historical feature information xi.

[0101] In some embodiments, to simplify the calculation, the number of dimensions of the historical feature information xi is set to be less than 10, and the number of nodes of the input layer is set to be less than 10. For example, the historical feature information xi is 6-dimensional historical feature information, and the input layer includes 6 nodes.

[0102] The hidden-layer defining module 3211b is configured to set a hidden layer, where the hidden layer includes M nodes.

[0103] In some embodiments, the hidden layer includes multiple hidden sublayers. To simplify the calculation, the number of nodes of each of the hidden sublayers is set to be less than 10. For example, the hidden layer includes a first hidden sublayer, a second hidden sublayer, and a third hidden sublayer. The first hidden sublayer includes 10 nodes, the second hidden sublayer includes 5 nodes, and the third hidden sublayer includes 5 nodes.

[0104] The classification-layer defining module 3211c is configured to set a classification layer, where the classification layer is based on a softmax function, where the softmax function is:

where p is predicted probability, Zk is a median value, C is the number of predictied result categories, and eZj is a jth median value.

[0105] The output-layer defining module 3211d is configured to set an output layer, where the output layer includes two nodes.

[0106] The activation-function defining module 3211e is configured to set an activation function, where the activation function is based on a sigmoid function, where the sigmoid function is:

where f(x) has a range of 0 to 1.

[0107] The batch-size defining module 3211f is configured to set a batch size, where the batch size is A.

[0108] The batch size can be flexibly adjusted according to actual application scenarios. In some embodiments, the batch size is in a range of 50-200. For example, the batch size is 128.

[0109] The learning-rate defining module 3211g is configured to set a learning rate, where the learning rate is B.

[0110] The learning rate can be flexibly adjusted according to actual application scenarios. In some embodiments, the learning rate is in a range of 0.1-1.5. For example, the learning rate is 0.9.

[0111] It should be noted that, the order of execution of the operations of setting the input layer by the input-layer defining module 3211a, the operations of setting the hidden layer by the hidden-layer defining module 3211b, the operations of setting the classification layer by the classification-layer defining module 3211c, the operations of setting the output layer by the output-layer defining module 3211d, the operations of setting the activation function by the activation-function defining module 3211e, the operations of setting the batch size by the batch-size defining module 3211f, and the operations of setting the learning rate by the learning-rate defining module 3211g can be flexibly adjusted, which is not limited according to embodiments of the disclosure.

[0112] The first solving module 3212 is configured to obtain the first training model by taking the sample vector set into the network structure for calculation. In some embodiments, the first solving module 3212 includes a first solving sub-module 3212a, a second solving sub-module 3212b, a third solving sub-module 3212c, a fourth solving sub-module 3212d, and a modifying module 3212e.

[0113] The first solving sub-module 3212a is configured to obtain an output value of the input layer by inputting the sample vector set into the input layer for calculation.

[0114] The second solving sub-module 3212b is configured to obtain an output value of the hidden layer by inputting the output value of the input layer into the hidden layer.

[0115] The output value of the input layer is an input value of the hidden layer. In some embodiments, the hidden layer includes multiple hidden sublayers. The output value of the input layer is an input value of a first hidden sublayer, an output value of the first hidden sublayer is an input value of a second hidden sublayer, an output value of the second hidden sublayer is an input value of a third hidden sublayer, and so forth.

[0116] The third solving sub-module 3212c is configured to obtain predicted probability [p1 p2]T by inputting the output value of the hidden layer into the classification layer for calculation.

[0117] The output value of the hidden layer is an input value of the classification layer.

[0118] The fourth solving sub-module 3212d is configured to obtain a predicted result y by inputting the predicted probability into the output layer for calculation, where y=[1 0]T when p1, is greater than p2, and y=[0 1]T when p1 is smaller than or equal to p2.

[0119] An output value of the classification layer is an input value of the output layer.

[0120] The modifying module 3212e is configured to obtain the first training model by modifying the network structure according to the predicted result y.

[0121] The second generating module 322 includes a training module 3221 and a second solving module 3222.

[0122] The training module 3221 is configured to generate, for each of the sample vectors of the sample vector set, a labeling result yi for the sample vector by labeling the sample vector.

[0123] In some embodiments, for each of the sample vectors of the sample vector set, the sample vector is labelled. Each sample vector is taken into the non-linear support vector machine algorithm to obtain a labeling result yi, and accordingly a sample-vector result set T = {(x1, y1), (x2, y2),...,(xm, ym)} is obtained. Input the sample vectors xiRn, yi ∈ {+1, -1}, i = 1,2,3,..., n, Rn represents an input space corresponding to the sample vector, n represents the number of dimensions of the input space, and yi represents a labeling result corresponding to the input sample vector.

[0124] The second solving module 3222 is configured to obtain the second training model by defining a Gaussian kernel function.

[0125] In some embodiments, the kernel function is the Gaussian kernel function

where K (x, xi) is an Euclidean distance from any point x to a center xi in a space, and σ is a width parameter of the Gaussian kernel function.

[0126] In some embodiments, the second solving module 3222 is configured to: define the Gaussian kernel function; and obtain the second training model by defining a model function and a classification decision function according to the Gaussian kernel function. The model function is:

The classification decision function is:

where f(x) is a classification decision value, ai is a Lagrange factor, b is a bias coefficient. When f(x)=1, it means that the application needs to be closed. When f(x)=1, it means that the application needs to be retained.

[0127] In some embodiments, the second solving module 3222 is configured to: define the Gaussian kernel function; define the model function and the classification decision function according to the Gaussian kernel function; define an objective optimization function according to the model function and the classification decision function; and obtain the second training model by obtaining an optimal solution of the objective optimization function according to a sequential minimal optimization algorithm. The objective optimization function is:

where the objective optimization function is used to obtain a minimum value for parameters (a1, a2,..., ai), ai corresponds to a training sample (xi, yi), and the total number of variables is equal to capacity m of the training samples.

[0128] In some embodiments, the optimal solution is recorded as

the second training model is:

where g(x) is an output value of the second training model, and the output value is second closing probability.

[0129] The calculating module 33 is configured to: obtain first closing probability by taking current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to background; obtain second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within a hesitation interval; and close the application when the second closing probability is greater than a judgment value.

[0130] In some embodiments, as illustrated in FIG. 6, the calculating module 33 includes a collecting module 330, a first calculating module 331, and a second calculating module 332.

[0131] The collecting module 330 is configured to collect the current feature information s associated with the application upon detecting that the application is switched to the background.

[0132] The number of dimensions of the collected current feature information s associated with the application is the same as the number of dimensions of the collected historical feature information xi associated with the application.

[0133] The first calculating module 331 is configured to obtain the first closing probability by taking the current feature information s into the first training model for calculation upon detecting that the application is switched to the background.

[0134] Probability [p1' p2']T determined in the classification layer can be obtained by taking the current feature information s into the first training model for calculation, where p1' is the first closing probability and p2' is first retention probability.

[0135] The calculating module 33 further includes a first judging module 333. The first judging module 333 is configured to determine whether the first closing probability is within the hesitation interval.

[0136] The hesitation interval is in a range of 0.4-0.6 for example, the minimum value of the hesitation interval is 0.4, and the maximum value of the hesitation interval is 0.6.

[0137] The second calculating module 332 is configured to obtain the second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within the hesitation interval.

[0138] The current feature information s is taken into the formula

to calculate the second closing probability g(s).

[0139] The calculating module 33 further includes a second judging module 334. The second judging module 334 is configured to determine whether the second closing probability is greater than the judgment value.

[0140] It should be noted that, the judgment value may be set to be 0. When g(s) > 0, close the application; when g(s) < 0, retain the application.

[0141] The calculating module 33 further includes a third judging module 335. The third judging module 335 is configured to determine whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval.

[0142] When the first closing probability is smaller than the minimum value of the hesitation interval, retain the application. When the first closing probability is greater than the maximum value of the hesitation interval, close the application.

[0143] In some embodiments, the collecting module 331 is further configured to periodically collect the current feature information s according to a predetermined collecting time and store the current feature information s into the storage module 35. In some embodiments, the collecting module 331 is further configured to collect the current feature information s corresponding to a time point at which the application is detected to be swiched to the background, and input the current feature information s to the calculating module 33, and the calculating module 33 takes the current feature information into the training models for calculation.

[0144] The device 30 further includes a closing module 36. The closing module 36 is configured to close the application upon determining that the application needs to be closed.

[0145] According to the device for managing and controlling an application of embodiments of the disclosure, the historical feature information xi is obtained. The first training model is generated based on the BP neural network algorithm. The second training model is generated based on the non-linear support vector machine algorithm. Upon detecting that the application is switched to the background, the first closing probability is obtained by taking the current feature information s associated with the application into the first training model. When the first closing probability is within the hesitation interval, the second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. Then, whether the application needs to be closed can be determined. In this way, it is possible to intelligently close the application.

[0146] FIG. 7 is a schematic structural diagram illustrating an electronic device according to embodiments. As illustrated in FIG. 7, an electronic device 500 includes a processor 501 and a memory 502. The processor 501 is electrically coupled with the memory 502.

[0147] The processor 501 is a control center of the electronic device 500. The processor 501 is configured to connect various parts of the entire electronic device 500 through various interfaces and lines. The processor 501 is configured to execute various functions of the electronic device and process data by running or loading programs stored in the memory 502 and invoking data stored in the memory 502, thereby monitoring the entire electronic device 500.

[0148] In the embodiment, the processor 501 of the electronic device 500 is configured to load instructions corresponding to processes of one or more programs into the memory 502 according to the following operations, and to run programs stored in the memory 502, thereby implementing various functions. A sample vector set associated with an application is obtain, where the sample vector set contains multiple sample vectors, and each of the multiple sample vectors includes multi-dimensional historical feature information xi associated with the application. A first training model is generated by performing calculation on the sample vector set based on a BP neural network algorithm. A second training model is generated based on a non-linear support vector machine algorithm. Upon detecting that the application is switched to background, first closing probability is obtained by taking current feature information s associated with the application into the first training model for calculation. When the first closing probability is within a hesitation interval, second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. When the second closing probability is greater than a judgment value, close the application.

[0149] It should be noted that, the application may be any application such as a chat application, a video application, a playback application, a shopping application, a bicycle-sharing application, a mobile banking application, or the like.

[0150] The sample vector set associated with the application may be obtained from a sample database, where each sample vector of the sample vector set includes multi-dimensional historical feature information xi associated with the application.

[0151] For the multi-dimensional historical feature information associated with the application, reference may be made to feature information of respective dimensions listed in Table 3.
Table 3
DimensionFeature information
1 Time length between a time point at which the application was recently switched to the background and a current time point
2 Accumulated duration of a screen-off state during a period between a time point at which the application was recently switched to the background and the current time point
3 a screen state (i.e., a screen-on state or a screen-off state) at the current time point
4 Ratio of the number of time lengths falling within a range of 0-5 minutes to the number of all time lengths in a histogram associated with duration that the application is in the background
5 Ratio of the number of time lengths falling within a range of 5-10 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
6 Ratio of the number of time lengths falling within a range of 10-15 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
7 Ratio of the number of time lengths falling within a range of 15-20 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
8 Ratio of the number of time lengths falling within a range of 20-25 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
9 Ratio of the number of time lengths falling within a range of 25-30 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background
10 Ratio of the number of time lengths falling within a range of more than 30 minutes to the number of all time lengths in the histogram associated with duration that the application is in the background


[0152] It should be noted that, the 10-dimensional feature information illustrated in Table 3 is merely an exemplary embodiment of the disclosure, and the multi-dimensional historical feature information of the disclosure includes, but is not limited to, the above 10-dimensional historical feature information illustrated in Table 1. The multi-dimensional historical feature information may include one of, at least two of, or all of the dimensions listed in Table 1, or may further include feature information of other dimensions (e.g., a charging connection state (i.e., not being charged or being charged) at the current time point, current remaining electric quantity, a WiFi connection state at the current time point, or the like), and which is not limited.

[0153] In some embodiments, the multi-dimensional historical feature information is embodied as 6-dimensional historical feature information. The 6-dimensional historical feature information is as follows. A: duration that the application resides in the background. B: a screen state (1: screen-on, 0: screen-off). C: number of times the application is used in a week. D: accumulated duration that the application is used in the week. E: a WiFi connection state (1: connected, 0: disconnected). F: a charging connection state (1: being charged, 0: not being charged).

[0154] In some embodiments, the instructions operable with the processor 501 to generate the first training model by performing calculation on the sample vector set based on the BP neural network algorithm are operable with the processor 501 to: define a network structure; and obtain the first training model by taking the sample vector set into the network structure for calculation.

[0155] The instructions operable with the processor 501 to define the network structure are operable with the processor 501 to carry out following actions.

[0156] An input layer is set, where the input layer includes N nodes, and the number of nodes of the input layer is the same as the number of dimensions of the historical feature information xi.

[0157] In some embodiments, to simplify the calculation, the number of dimensions of the historical feature information xi is set to be less than 10, and the number of nodes of the input layer is set to be less than 10. For example, the historical feature information xi is 6-dimensional historical feature information, and the input layer includes 6 nodes.

[0158] A hidden layer is set, where the hidden layer includes M nodes.

[0159] In some embodiments, the hidden layer includes multiple hidden sublayers. To simplify the calculation, the number of nodes of each of the hidden sublayers is set to be less than 10. For example, the hidden layer includes a first hidden sublayer, a second hidden sublayer, and a third hidden sublayer. The first hidden sublayer includes 10 nodes, the second hidden sublayer includes 5 nodes, and the third hidden sublayer includes 5 nodes.

[0160] A classification layer is set, where the classification layer is based on a softmax function, where the softmax function is:

where p is predicted probability, Zk is a median value, C is the number of predictied result categories, and eZj is a jth median value;

[0161] An output layer is set, where the output layer includes two nodes.

[0162] An activation function is set, where the activation function is based on a sigmoid function, where the sigmoid function is:

where f(x) has a range of 0 to 1.

[0163] A batch size is set, where the batch size is A.

[0164] The batch size can be flexibly adjusted according to actual application scenarios. In some embodiments, the batch size is in a range of 50-200. For example, the batch size is 128.

[0165] A learning rate is set, where the learning rate is B.

[0166] The learning rate can be flexibly adjusted according to actual application scenarios. In some embodiments, the learning rate is in a range of 0.1-1.5. For example, the learning rate is 0.9.

[0167] It should be noted that, the order of execution of the operations of setting the input layer, the operations of setting the hidden layer, the operations of setting the classification layer, the operations of setting the output layer, the operations of setting the activation function, the operations of setting the batch size, and the operations of setting the learning rate can be flexibly adjusted, which is not limited according to embodiments of the disclosure.

[0168] The instructions operable with the processor 501 to obtain the first training model by taking the sample vector set into the network structure for calculation are operable with the processor 501 to carry out following actions.

[0169] An output value of the input layer is obtained by inputting the sample vector set into the input layer for calculation.

[0170] An output value of the hidden layer is obtained by inputting the output value of the input layer into the hidden layer.

[0171] The output value of the input layer is an input value of the hidden layer. In some embodiments, the hidden layer includes multiple hidden sublayers. The output value of the input layer is an input value of a first hidden sublayer, an output value of the first hidden sublayer is an input value of a second hidden sublayer, an output value of the second hidden sublayer is an input value of a third hidden sublayer, and so forth.

[0172] Predicted probability [p1 p2]T is obtained by inputting the output value of the hidden layer into the classification layer for calculation.

[0173] The output value of the hidden layer is an input value of the classification layer. In some embodiments, the hidden layer includes multiple hidden sublayers. An output value of the last hidden sublayer is the input value of the classification layer.

[0174] A predicted result y is obtained by inputting the predicted probability into the output layer for calculation, where y=[1 0]T when p1, is greater than p2, and y=[0 1]T when p1, is smaller than or equal to p2.

[0175] An output value of the classification layer is an input value of the output layer.

[0176] The first training model is obtained by modifying the network structure according to the predicted result y.

[0177] In some embodiments, the instructions operable with the processor 501 to generate the second training model based on the non-linear support vector machine algorithm are operable with the processor 501 to: for each of the sample vectors of the sample vector set, generate a labeling result yi for the sample vector by labeling the sample vector; and obtain the second training model by defining a Gaussian kernel function.

[0178] In some embodiments, for each of the sample vectors of the sample vector set, the sample vector is labelled. Each sample vector is taken into the non-linear support vector machine algorithm to obtain a labeling result yi, and accordingly a sample-vector result set T = {(x1, y1),(x2, y2),...,(xm, ym)} is obtained. Input the sample vectors xiRn, yi ∈ {+1, -1}, i = 1,2,3,..., n , Rn represents an input space corresponding to the sample vector, n represents the number of dimensions of the input space, and yi represents a labeling result corresponding to the input sample vector.

[0179] In some embodiments, the kernel function is the Gaussian kernel function

where K (x, xi) is an Euclidean distance from any point x to a center xi in a space, and σ is a width parameter of the Gaussian kernel function.

[0180] In some embodiments, the instructions operable with the processor 501 to obtain the second training model by defining the Gaussian kernel function are operable with the processor 501 to carry out following actions. The Gaussian kernel function is defined. The second training model is obtained by defining a model function and a classification decision function according to the Gaussian kernel function. The model function is:

The classification decision function is:

where f(x) is a classification decision value, ai is a Lagrange factor, b is a bias coefficient. When f(x)=1, it means that the application needs to be closed. When f(x)=-1, it means that the application needs to be retained.

[0181] In some embodiments, the instructions operable with the processor 501 to obtain the second training model by defining the Gaussian kernel function and defining the model function and the classification decision function according to the Gaussian kernel function are operable with the processor 501 to carry out following actions. The Gaussian kernel function is defined. The model function and the classification decision function are defined according to the Gaussian kernel function. An objective optimization function is defined according to the model function and the classification decision function. The second training model is obtained by obtaining an optimal solution of the objective optimization function according to a sequential minimal optimization algorithm. The objective optimization function is:

where the objective optimization function is used to obtain a minimum value for parameters (a1, a2,..., ai), ai corresponds to a training sample (xi, y¡), and the total number of variables is equal to capacity m of the training samples.

[0182] In some embodiments, the optimal solution is recorded as

the second training model is:

where g(x) is an output value of the second training model, and the output value is second closing probability.

[0183] In some embodiments, upon detecting that the application is switched to the background, the instructions operable with the processor 501 to take the current feature information s associated with the application into training models for calculation are operable with the processor 501 to carry out following actions.

[0184] The current feature information s associated with the application is collected.

[0185] The number of dimensions of the collected current feature information s associated with the application is the same as the number of dimensions of the collected historical feature information xi associated with the application.

[0186] The first closing probability is obtained by taking the current feature information s into the first training model for calculation.

[0187] Probability [p1' p2']T determined in the classification layer can be obtained by taking the current feature information s into the first training model for calculation, where p1' is the first closing probability and p2' is first retention probability.

[0188] Whether the first closing probability is within the hesitation interval is determined.

[0189] The hesitation interval is in a range of 0.4-0.6 for example, the minimum value of the hesitation interval is 0.4, and the maximum value of the hesitation interval is 0.6.

[0190] When the first closing probability is within the hesitation interval, the second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation.

[0191] The current feature information s is taken into the formula

to calculate the second closing probability g(s).

[0192] Whether the second closing probability is greater than the judgment value is determined.

[0193] It should be noted that, the judgment value may be set to be 0. When g(s) > 0, close the application; when g(s) < 0, retain the application.

[0194] Whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval is determined.

[0195] When the first closing probability is smaller than the minimum value of the hesitation interval, retain the application. When the first closing probability is greater than the maximum value of the hesitation interval, close the application.

[0196] The memory 502 is configured to store programs and data. The programs stored in the memory 502 include instructions that are executable by the processor. The programs can form various functional modules. The processor 501 executes various functional applications and data processing by running the programs stored in the memory 502.

[0197] FIG. 8 is a schematic structural diagram illustrating an electronic device according to other embodiments. In some embodiments, as illustrated in FIG. 8, 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.

[0198] The radio frequency circuit 503 is configured to transmit and receive (i.e., transceive) radio frequency signals, and communicate with a server or other electronic devices through a wireless communication network.

[0199] The display screen 504 is configured to display information entered by a user or information provided for the user as well as various graphical user interfaces of the terminal. These graphical user interfaces may be composed of images, text, icons, videos, and any combination thereof.

[0200] The control circuit 505 is electrically coupled with the display screen 504 and is configured to control the display screen 504 to display information.

[0201] The input unit 506 is configured to receive inputted numbers, character information, or user characteristic information (e.g., fingerprints), and to generate keyboard-based, mouse-based, joystick-based, optical, or trackball signal inputs, and other signal inputs related to user settings and function control.

[0202] The audio circuit 507 is configured to provide an audio interface between a user and the terminal through a speaker or a microphone.

[0203] The sensor 508 is configured to collect external environment information. The sensor 508 may include one or more of sensors such as an ambient light sensor, an acceleration sensor, and a gyroscope.

[0204] The power supply 509 is configured for supply power of various components of the electronic device 500. In some embodiments, the power supply 509 may be logically coupled with the processor 501 via a power management system to enable management of charging, discharging, and power consumption through the power management system.

[0205] Although not illustrated in FIG. 8, the electronic device 500 may further include a camera, a Bluetooth module, and the like, and the disclosure will not elaborate herein.

[0206] According to the electronic device of embodiments of the disclosure, the historical feature information xi is obtained. The first training model is generated based on the BP neural network algorithm, and the second training model is generated based on the non-linear support vector machine algorithm. Upon detecting that the application is switched to the background, the first closing probability is obtained by taking the current feature information s associated with the application into the first training model for calculation. When the first closing probability is within the hesitation interval, the second closing probability is obtained by taking the current feature information s associated with the application into the second training model for calculation. Then, whether the application needs to be closed can be determined. In this way, it is possible to intelligently close the application.

[0207] According to embodiments of the disclosure, a medium is further provided. The medium is configured to store multiple instructions which, when executed by a processor, are operable with the processor to execute any of the foregoing methods for managing and controlling an application.

[0208] Considering that the method and device for managing and controlling an application, the medium, and the electronic device provided by embodiments of the disclosure belong to a same concept, for details of specific implementation of the medium, reference may be made to the related descriptions in the foregoing embodiments, and it will not be described in further detail herein.

[0209] Those of ordinary skill in the art may understand that implementing all or part of the operations in the foregoing method embodiments may be accomplished through programs to instruct the relevant hardware to complete, and the programs may be stored in a computer readable storage medium. The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like.

[0210] While the the method and device for managing and controlling an application, the medium, and the electronic device have been described in detail above with reference to the exemplary embodiments, the scope of the disclosure is not limited thereto. As will occur to those skilled in the art, the disclosure is susceptible to various modifications and changes without departing from the spirit and principle of the disclosure. Therefore, the scope of the disclosure should be determined by the scope of the claims.


Claims

1. A method for managing and controlling an application, the method being applicable to an electronic device and comprising:

obtaining a sample vector set associated with the application, the sample vector set containing a plurality of sample vectors, and each of the plurality of sample vectors comprising multi-dimensional historical feature information xi associated with the application;

generating a first training model by performing calculation on the sample vector set based on a back propagation, BP, neural network algorithm, and generating a second training model based on a non-linear support vector machine algorithm;

obtaining first closing probability by taking current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to background;

obtaining second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within a hesitation interval; and

closing the application when the second closing probability is greater than a judgment value.


 
2. The method for managing and controlling an application of claim 1, wherein generating the first training model by performing calculation on the sample vector set based on the BP neural network algorithm comprises:

defining a network structure; and

obtaining the first training model by taking the sample vector set into the network structure for calculation.


 
3. The method for managing and controlling an application of claim 2, wherein defining the network structure comprises:

setting an input layer, wherein the input layer comprises N nodes, and the number of nodes of the input layer is the same as the number of dimensions of the historical feature information xi;

setting a hidden layer, wherein the hidden layer comprises M nodes;

setting a classification layer, wherein the classification layer is based on a softmax function, wherein the softmax function is:

wherein p is predicted probability, Zk is a median value, C is the

number of predictied result categories, and eZj is a jth median value;

setting an output layer, wherein the output layer comprises two nodes;

setting an activation function, wherein the activation function is based on a sigmoid function, wherein the sigmoid function is:

wherein f(x) has a range of 0 to 1;

setting a batch size, wherein the batch size is A; and

setting a learning rate, wherein the learning rate is B.


 
4. The method for managing and controlling an application of claim 3, wherein obtaining the first training model by taking the sample vector set into the network structure for calculation comprises:

obtaining an output value of the input layer by inputting the sample vector set into the input layer for calculation;

obtaining an output value of the hidden layer by inputting the output value of the input layer into the hidden layer;

obtaining predicted probability [p1 p2]T by inputting the output value of the hidden layer into the classification layer for calculation, wherein p1, represents predicted closing probability and p2 represents predicted retention probability;

obtaining a predicted result y by inputting the predicted probability into the output layer for calculation, wherein y=[1 0]T when p1, is greater than p2, and y=[0 1]T when p1, is smaller than or equal to p2; and

obtaining the first training model by modifying the network structure according to the predicted result y.


 
5. The method for managing and controlling an application of claim 1, wherein generating the second training model based on the non-linear support vector machine algorithm comprises:

for each of the sample vectors of the sample vector set, generating a labeling result yi, for the sample vector by labeling the sample vector; and

obtaining the second training model by defining a Gaussian kernel function.


 
6. The method for managing and controlling an application of claim 1, wherein the application is retained when the second closing probability is smaller than the judgment value.
 
7. The method for managing and controlling an application of claim 1, further comprising:
determining whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval, when the first closing probability is beyond the hesitation interval.
 
8. The method for managing and controlling an application of claim 7, further comprising:

retaining the application, upon determining that the first closing probability is smaller than the minimum value of the hesitation interval; and

closing the application, upon determining that the first closing probability is greater than the maximum value of the hesitation interval.


 
9. The method for managing and controlling an application of claim 1, wherein obtaining the first closing probability by taking the current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to the background, obtaining the second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within the hesitation interval, and closing the application when the second closing probability is greater than the judgment value comprise:

collecting the current feature information s associated with the application;

obtaining the first closing probability by taking the current feature information s into the first training model for calculation;

determining whether the first closing probability is within the hesitation interval;

obtaining the second closing probability by taking the current feature information s associated with the application into the second training model for calculation;

determining whether the second closing probability is greater than the judgment value; and

determining whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval.


 
10. A device for managing and controlling an application, comprising:

an obtaining module, configured to obtain a sample vector set associated with the application, the sample vector set containing a plurality of sample vectors, and each of the plurality of sample vectors comprising multi-dimensional historical feature information xi associated with the application;

a generating module, configured to generate a first training model by performing calculation on the sample vector set based on a back propagation, BP, neural network algorithm, and generate a second training model based on a non-linear support vector machine algorithm; and

a calculating module, configured to obtain first closing probability by taking current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to background, obtain second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within a hesitation interval, and close the application when the second closing probability is greater than a judgment value.


 
11. A medium, configured to store a plurality of instructions which, when executed by a processor, are operable with the processor to execute the method for managing and controlling an application of any of claims 1 to 9.
 
12. An electronic device, comprising a memory and a processor and electrically coupled to the memory configured to store instructions and data;
the instructions, when executed by the processor, being operable with the processor to:

obtain a sample vector set associated with an application, the sample vector set containing a plurality of sample vectors, and each of the plurality of sample vectors comprising multi-dimensional historical feature information xi associated with the application;

generate a first training model by performing calculation on the sample vector set based on a back propagation, BP, neural network algorithm, and generate a second training model based on a non-linear support vector machine algorithm;

obtain first closing probability by taking current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to background;

obtain second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within a hesitation interval; and

close the application when the second closing probability is greater than a judgment value.


 
13. The electronic device of claim 12, wherein the instructions operable with the processor to generate the first training model by performing calculation on the sample vector set based on the BP neural network algorithm are operable with the processor to:

define a network structure; and

obtain the first training model by taking the sample vector set into the network structure for calculation.


 
14. The electronic device of claim 13, wherein the instructions operable with the processor to define the network structure are operable with the processor to:

set an input layer, wherein the input layer comprises N nodes, and the number of nodes of the input layer is the same as the number of dimensions of the historical feature information xi;

set a hidden layer, wherein the hidden layer comprises M nodes;

set a classification layer, wherein the classification layer is based on a softmax function, wherein the softmax function is:

wherein p is predicted probability, Zk is a median value, C is the

number of predictied result categories, and eZj is a jth median value;

set an output layer, wherein the output layer comprises two nodes;

set an activation function, wherein the activation function is based on a sigmoid function, wherein the sigmoid function is:

wherein f(x) has a range of 0 to 1;

set a batch size, wherein the batch size is A; and

set a learning rate, wherein the learning rate is B.


 
15. The electronic device of claim 14, wherein the instructions operable with the processor to obtain the first training model by taking the sample vector set into the network structure for calculation are operable with the processor to:

obtain an output value of the input layer by inputting the sample vector set into the input layer for calculation;

obtain an output value of the hidden layer by inputting the output value of the input layer into the hidden layer;

obtain predicted probability [p1 p2]T by inputting the output value of the hidden layer into the classification layer for calculation, wherein p1 represents predicted closing probability and p2 represents predicted retention probability;

obtain a predicted result y by inputting the predicted probability into the output layer for calculation, wherein y=[1 0]T when p1 is greater than p2, and y=[0 1]T when p1 is smaller than or equal to p2; and

obtain the first training model by modifying the network structure according to the predicted result y.


 
16. The electronic device of claim 12, wherein the instructions operable with the processor to generate the second training model based on the non-linear support vector machine algorithm are operable with the processor to:

for each of the sample vectors of the sample vector set, generate a labeling result yi for the sample vector by labeling the sample vector; and

obtain the second training model by defining a Gaussian kernel function.


 
17. The electronic device of claim 12, wherein the application is retained when the second closing probability is smaller than the judgment value.
 
18. The electronic device of claim 12, wherein the instructions are further operable with the processor to:
determine whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval, when the first closing probability is beyond the hesitation interval.
 
19. The electronic device of claim 18, wherein the instructions are further operable with the processor to:

retain the application, upon determining that the first closing probability is smaller than the minimum value of the hesitation interval; and

close the application, upon determining that the first closing probability is greater than the maximum value of the hesitation interval.


 
20. The electronic device of claim 12, wherein the instructions operable with the processor to obtain the first closing probability by taking the current feature information s associated with the application into the first training model for calculation upon detecting that the application is switched to the background, obtain the second closing probability by taking the current feature information s associated with the application into the second training model for calculation when the first closing probability is within the hesitation interval, and close the application when the second closing probability is greater than the judgment value are operable with the processor to:

collect the current feature information s associated with the application;

obtain the first closing probability by taking the current feature information s into the first training model for calculation;

determine whether the first closing probability is within the hesitation interval;

obtain the second closing probability by taking the current feature information s associated with the application into the second training model for calculation;

determine whether the second closing probability is greater than the judgment value; and

determine whether the first closing probability is smaller than a minimum value of the hesitation interval or greater than a maximum value of the hesitation interval.


 




Drawing






















Search report










Cited references

REFERENCES CITED IN THE DESCRIPTION



This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

Patent documents cited in the description