CN107608778B - Application program control method and device, storage medium and electronic equipment - Google Patents

Application program control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN107608778B
CN107608778B CN201710919446.8A CN201710919446A CN107608778B CN 107608778 B CN107608778 B CN 107608778B CN 201710919446 A CN201710919446 A CN 201710919446A CN 107608778 B CN107608778 B CN 107608778B
Authority
CN
China
Prior art keywords
preset
application program
observation
probability
preset application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710919446.8A
Other languages
Chinese (zh)
Other versions
CN107608778A (en
Inventor
曾元清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710919446.8A priority Critical patent/CN107608778B/en
Publication of CN107608778A publication Critical patent/CN107608778A/en
Application granted granted Critical
Publication of CN107608778B publication Critical patent/CN107608778B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The application discloses an application program control method and device, a storage medium and electronic equipment. The application program management and control method comprises the following steps: the method comprises the steps of obtaining characteristic information of a plurality of preset application programs, generating a training sample according to the characteristic information, generating a hidden Markov model according to the training sample, predicting by using the hidden Markov model to generate a prediction result, and managing and controlling the background application programs according to the prediction result, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point. According to the embodiment of the application, the training sample is generated by collecting the use record of the application program, and whether the application can be cleaned is predicted by using the hidden Markov model, so that the accuracy of predicting the preset application program is improved, and the intelligence and the accuracy of managing and controlling the application program entering a background are improved.

Description

Application program control method and device, storage medium and electronic equipment
Technical Field
The application relates to the technical field of mobile communication, in particular to the technical field of mobile equipment, and specifically relates to an application program control method and device, a storage medium and electronic equipment.
Background
With the development of electronic technology, people usually install many applications on electronic devices. When a user opens multiple application programs in the electronic device, if the user returns to a desktop of the electronic device or stays at an application interface of a certain application program or controls a screen of the electronic device, the multiple application programs opened by the user still run in a background of the electronic device. However, the application running in the background can severely occupy the memory of the electronic device, and the power consumption of the electronic device is increased, and the running smoothness of the electronic device is reduced.
Disclosure of Invention
The embodiment of the application provides an application program control method and device, a storage medium and an electronic device, and can improve the intelligence and accuracy of control of an application program.
The embodiment of the application provides an application program management and control method, which is applied to electronic equipment, and comprises the following steps:
acquiring characteristic information of a plurality of preset application programs;
generating a training sample according to the feature information, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point;
generating a hidden Markov model according to the training sample;
when a background application program exists in the plurality of preset application programs, the hidden Markov model predicts according to the current characteristic information of the background application program and the training sample to generate a prediction result, and manages and controls the background application program according to the prediction result.
An embodiment of the present application further provides an application management and control apparatus, where the apparatus includes:
the acquisition module is used for acquiring the characteristic information of a plurality of preset application programs;
the first generating module is used for generating a training sample according to the characteristic information, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point;
the second generation module is used for generating a hidden Markov model according to the training sample;
and the control module is used for predicting according to the current characteristic information of the background application program and the training sample by the hidden Markov model to generate a prediction result when the background application program is detected to exist in the plurality of preset application programs, and controlling the background application program according to the prediction result.
An embodiment of the present application also provides a storage medium, on which a computer program is stored, which, when running on a computer, causes the computer to execute the application program management and control method as described above.
An embodiment of the present application further provides an electronic device, which includes a memory and a processor, and is characterized in that the processor is configured to execute the application management and control method described above by calling a computer program stored in the memory.
According to the method and the device, a training sample is generated by obtaining characteristic information of a plurality of preset application programs and according to the characteristic information, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point, a hidden Markov model is generated according to the training sample, the hidden Markov model is used for prediction to generate a prediction result, and the background application programs are controlled according to the prediction result. According to the embodiment of the application, the training sample is generated by collecting the use record of the application program, and whether the application can be cleaned is predicted by using the hidden Markov model, so that the accuracy of predicting the preset application program is improved, and the intelligence and the accuracy of managing and controlling the application program entering a background are improved.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a system diagram of an application management and control apparatus according to an embodiment of the present disclosure.
Fig. 2 is a schematic view of an application scenario of an application management and control apparatus according to an embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating an application management and control method according to an embodiment of the present disclosure.
Fig. 4 is another flowchart illustrating an application management and control method according to an embodiment of the present disclosure.
Fig. 5 is a schematic flowchart of an application management and control method according to an embodiment of the present disclosure.
Fig. 6 is a schematic structural diagram of an application management and control apparatus according to an embodiment of the present disclosure.
Fig. 7 is another schematic structural diagram of an application management and control apparatus according to an embodiment of the present disclosure.
Fig. 8 is a schematic structural diagram of an application management and control apparatus according to an embodiment of the present disclosure.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 10 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. In addition, for convenience of description, only a part of structures related to the present application, not all of the structures, is shown in the drawings. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first" and "second", etc. in this application are used to distinguish between different objects and not to describe a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to the listed steps or modules but may alternatively include other steps or modules not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In the prior art, when a background application is managed and controlled, part of the background application is generally cleaned directly according to the memory occupation condition of the electronic device and the priority of each application, so as to release the memory. However, some applications are important to the user, or some applications need to be used again by the user in a short time, and if the applications are cleaned up when cleaning up the applications later, the process of reloading the applications by the electronic device is required when the user uses the applications again, which consumes a lot of time and memory resources. The electronic device may be a smart phone, a tablet computer, a desktop computer, a notebook computer, or a palm computer.
Referring to fig. 1, fig. 1 is a system schematic diagram of an application management and control apparatus according to an embodiment of the present disclosure. The application program management and control device is mainly used for: the method comprises the steps of collecting usage records of application programs commonly used by a user in advance to count characteristic information of a preset application program, and generating a training sample according to the characteristic information of the preset application program; and training the training samples to generate a hidden Markov model, predicting by using the hidden Markov model to generate a prediction result, and managing and controlling the background application program according to the prediction result, such as closing or freezing.
Specifically, please refer to fig. 2, and fig. 2 is a schematic view illustrating an application scenario of an application management and control apparatus according to an embodiment of the present application. For example, when receiving a management and control request, the application management and control device detects that the applications running in the background of the electronic device include a preset application a, a preset application b, and a preset application c; then, inputting a plurality of continuous observation values into a hidden markov model, respectively obtaining a prediction probability a ' that a preset application program a is to be used, a prediction probability b ' that a preset application program b is to be used, and a prediction probability c ' that a preset application program c is to be used, and managing and controlling the preset application program a, the preset application program b, and the preset application program c which run in the background according to the size relationship between the probabilities a ', the probabilities b ', and the probabilities c ' and a preset threshold, for example, closing the preset application program a of which the probability a ' is smaller than the preset threshold, so that the application program which runs in the background is adjusted to the preset application program b and the preset application program c.
The execution main body of the application management and control method provided by the embodiment of the present application may be an application management and control device provided by the embodiment of the present application, or an electronic device (such as a palm computer, a tablet computer, a smart phone, etc.) integrated with the application management and control device, and the application management and control device may be implemented in a hardware or software manner.
Referring to fig. 3 to 5, fig. 3 to 5 are schematic flow charts of an application management and control method according to an embodiment of the present disclosure. The method is applied to the electronic equipment and comprises the following steps:
step 101, obtaining characteristic information of a plurality of preset application programs.
The predetermined application may be any application installed in the electronic device, such as a communication application, a multimedia application, a game application, an information application, a shopping application, a navigation application, a tool application, a social contact application, or a photographing application.
The preset applications may be all applications installed in the electronic device, or may be part of applications, and when the preset applications are part of applications, the preset applications may be a plurality of applications frequently used in the near term, and the specific number may be determined according to actual requirements.
The method includes the steps that in the process of using the electronic equipment, usage records of preset application programs in the electronic equipment can be collected according to preset frequency, usage records of all application programs in the electronic equipment can also be collected according to the preset frequency, and feature information of a plurality of preset application programs is obtained from the usage records. Wherein the characteristic information of a plurality of preset application programs recorded in the historical period of the electronic equipment can be acquired from the usage record. For example, the historical period of time may be within the past 15 days. The preset frequency may be every 10 minutes.
The obtained feature information of the plurality of preset applications may include feature information related to the preset applications, such as an application type, an application name, a timestamp of entering the foreground, a timestamp of entering the background, an operating duration of the foreground, a time of day in the foreground, an operating duration of the background, a number of times of entering the background in a day, a last time of use of the foreground, or a manner of entering the background (e.g., being switched by a start key (i.e., a HOME key), being switched by a return key, or being switched by other APPs), and the like. The acquired feature information of the plurality of preset applications may also include feature information related to the electronic device when the preset applications are used, such as screen-off (i.e., screen-off) time, screen-on time, remaining power, network status, or charging status of the electronic device.
The above examples of the characteristic information do not limit the present application.
For example, as shown in table 1, table 1 shows characteristic information set in advance in the electronic device.
TABLE 1
Serial number Characteristic information
1 Application type
2 Application name
3 Time stamp of entering foreground
4 Timestamp entry into background
5 Duration of operation at foreground
6 Time of day in foreground
7 Run time in the background
8 Number of background entries in a day
9 Last time of use in foreground
10 Mode of entering background
11 Screen-off (i.e. blanking) time of electronic equipment
12 Bright screen time of electronic device
13 Remaining capacity of electronic device
14 Network status of electronic device
15 Charging state of electronic device
…… ……
For example, as shown in table 2, the usage record of the application is shown in table 2.
TABLE 2
Application name Time stamp of entering foreground Is used in the foreground for a long time
Presetting an application program a t1 T1
Presetting an application program c t2 T2
Presetting an application program b t3 T3
Presetting an application program d t4 T4
Presetting an application program f t5 T5
Presetting an application program g t6 T6
…… …… ……
Step 102, generating a training sample according to the feature information, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point.
The time of day may be divided into a plurality of training time points, and the training time points and the state information of the plurality of preset applications corresponding to each training time point may be recorded according to the feature information of the plurality of preset applications as a sample to be input, so as to generate a training sample.
For example, the training time points may be numbered by 10 minutes, 24 × 60 — 1440 minutes a day, and 1440/10 — 144 training time points a day.
For example, as shown in fig. 3, table 3 records the training time point corresponding to the application used (entered into the foreground) in table 2 and the application being used at the training time point.
TABLE 3
Application name Training time point Status information
Presetting an application program a 129 Front desk
Presetting an application program a 130 Front desk
Preset applicationProcedure c 131 Front desk
Presetting an application program b 132 Front desk
Presetting an application program b 133 Front desk
Presetting an application program d 134 Front desk
Presetting an application program f 135 Front desk
Presetting an application program g 136 Front desk
…… …… ……
In the generated training samples, in order to collect richer samples, state information of each preset application program corresponding to each training time point of a plurality of training time points can be collected. For example, the plurality of preset applications may be set to 10 applications that are frequently called or used, such as preset application a, preset application b, preset application c, preset application d, and preset applicationThe application state set Q may be represented by a program f, a preset application g, a preset application h, a preset application i, a preset application j, and a preset application k, which may be represented by an application state set Q for convenience of recording, for example, Q ═ Q { (Q {, for example1,q2,...,q10For example, if the training time points t include 144 training time points, training samples shown in table 4 are generated according to the feature information of the preset application programs, where the training samples include 144 training time points and state information of 10 preset application programs corresponding to each training time point. According to the use state of the application program, the state information of the preset application program can include a foreground, a background and a closing state, namely the foreground indicates that the preset application program runs in the foreground of the system, the background indicates that the preset application program runs in the background of the system to wait for being called or used, and the closing indicates that the preset application program is in the closing state.
TABLE 4
And 103, generating a hidden Markov model according to the training sample.
Wherein the Hidden Markov Model (HMM) is a probabilistic Model about time sequence, and is used to describe a Hidden sequence and a corresponding observable sequence, the Hidden sequence is called a state sequence, and the observable sequence is called an observed sequence. The hidden markov model may be determined from an initial probability distribution, a state transition probability distribution, and an observation probability distribution.
In some embodiments, as shown in fig. 4, step 103 may be implemented by steps 1031 to 1034, specifically:
and step 1031, acquiring the state sets and observation sets of the plurality of preset application programs according to the training samples.
In some embodiments, the training samples may be processed based on a first preset formula, and a state set of the plurality of preset applications is obtained, where the first preset formula is:
Q={q1,q2,...,qn},
wherein n represents the number of states and Q represents the set of states of the plurality of preset applications;
processing the training sample based on a second preset formula to obtain an observation set of the plurality of preset application programs, wherein the second preset formula is as follows:
V={v1,v2,...,vm},
wherein m represents the number of observations in the observation sequence, and V represents the observation set of the plurality of preset applications.
Wherein, Q can be set as all possible state sets, and V is set as the observation set of all observation sequences.
Wherein the set of states Q is represented as Q ═ { Q ═ Q1,q2,...,qnN is a state number, where each hidden state element can be represented by qtWhere t is 1,2, …, n.
Wherein the observation set V is represented by V ═ { V ═ V1,v2,...,vmM is the value range of observed value in observed sequence, wherein each observable element can use vtWhere t is 1,2, …, m.
For example, the preset applications may be set to 10 applications that are frequently called or used, such as preset application a, preset application b, preset application c, preset application d, preset application f, preset application g, preset application h, preset application i, preset application j, and preset application k, and may be represented by an application state set Q, such as Q ═ { Q ═ for recording convenience1,q2,...,q10}。
For example, the observation set V is an observable sequence, and each observable sequence is composed of an application currently in the foreground and a training time point corresponding to the current time. For example, the application program is presetThe number of sequences is 10, and the training time point value is [1, 2.., 144 ],]then, the range m of the observed values in the observation sequence is expressed as m 10 × 144 — 1440, for example, the observation set V is expressed as V ═ { V ═ 14401,v2,...,v1440}。
Step 1032, generating state transition probabilities among the preset application programs according to the training samples to obtain a state transition probability set.
For example, the state transition probability set may be represented by a state transition probability matrix a, where the state transition probability matrix a is represented as:
A=[aij]n×nthe state transition probability matrix A is used for recording the probability of jumping among all the preset application program states, wherein n represents the number of the states, aijRepresenting the state transition probability.
Wherein, aij=P(it+1=qj|it=qi) And representing the state transition probability of the state transition from i to j, wherein i represents the preset application program which is called or used last time, and j represents the preset application program which is called or used next time, wherein the preset application program i and the preset application program j are the preset application programs which are called in sequence at adjacent training time points. Namely, aijAnd the state transition probability that the preset application program called or used last time is known as i and the preset application program called or used next time is known as j is represented.
Wherein the state transition probability a can be calculated according to the sample parameters in the training sampleij
For example, when n is 10, the state transition probability set is represented as a ═ aij]10×10
In some embodiments, the generating, according to the training sample, the state transition probabilities among the plurality of preset applications to obtain a state transition probability set includes:
(1) acquiring a first number of times that a first preset application program and a second preset application program are used in sequence and a second number of times that the first preset application program is used according to the training sample;
(2) and generating state transition probability of the first preset application program jumping to the second preset application program according to the first times and the second times, and traversing the plurality of preset application programs to obtain an observation probability set.
In some embodiments, the first time and the second time may be processed based on a third preset formula, and a state transition probability of the first preset application program jumping to the second preset application program is generated, where the third preset formula is:
wherein N (i, j) represents a first number of times that a first preset application program i and a second preset application program j are used in sequence, N (i) represents a second number of times that the first preset application program i is used, and aijRepresenting a state transition probability of the first preset application program i jumping to the second preset application program j, i ═ qt,j=qt+1,qtIndicating the preset application to be used at time t, qt+1Represents a preset application program used at the time t + 1;
traversing the plurality of preset applications based on a fourth preset formula to obtain an observation probability set, wherein the fourth preset formula is as follows:
A=[aij]n×n
the state transition probability set A is used for recording the probability of jumping among all preset application program states, wherein n represents the number of the states, and aijRepresenting the state transition probability.
For example, the state transition probability may be expressed asWhere N (i, j) denotes the prior use of the predetermined application qiThen uses the preset application program qjNumber of times of (1), N (i)Expressed as using a preset application qiThe number of times. That is, a first number N (i, j) of times that a first preset application program i and a second preset application program j are used in sequence, and a second number N (i) of times that the first preset application program i is used may be obtained according to the training sample; and generating a state transition probability a for the first preset application program i to jump to the second preset application program j according to the ratio of the first time number N (i, j) to the second time number N (i)ijAnd traversing all the preset applications to obtain an observation probability set A ═ a corresponding to all the preset applicationsij]n×n
And 1033, generating observation probabilities of the plurality of preset application programs corresponding to each training time point according to the training samples to obtain an observation probability set.
For example, the observation probability set may be represented by an observation probability matrix B, where the observation probability matrix B is represented as:
B=[bjk]n×mthe observation probability matrix B is configured to record observation probabilities of the plurality of preset application programs corresponding to all the training time points, where n denotes a state number, and m denotes a value range of an observation value in the observation sequence. bjkRepresenting the probability of observation.
Wherein b isjkAnd representing the observation probability of generating an observation value k from the state j, wherein j represents the preset application program called or used at the current training time point, and k represents the combination value of the preset application program called or used last time and the corresponding training time point, namely k represents the observation value observed at the last training time point.
In some embodiments, the generating, according to the training sample, the observation probabilities of the plurality of preset applications corresponding to each training time point to obtain an observation probability set includes:
(1) according to the training sample, acquiring a third number of times that a first preset application program and a second preset application program are used in sequence at adjacent training time points, wherein the adjacent training time points comprise a first training time point and a second training time point, and acquiring a fourth number of times that the second preset application program is used at the second training time point;
(2) and generating an observed probability of the first preset application program at the first training time point when the second preset application program is used at a second training time point according to the third time and the fourth time, wherein the first preset application program is observed at the first training time point to traverse the plurality of preset application programs corresponding to each training time point to obtain an observation probability set.
In some embodiments, the processing according to the third time and the fourth time may be performed based on a fifth preset formula, to generate an observed probability that the first preset application is observed at the first training time point when the second preset application is used at a second training time point, where the fifth preset formula is:
wherein N (k, j) represents a third number of times that the first preset application program and the second preset application program j are used in sequence at adjacent training time points, N (j) represents a fourth number of times that the second preset application program j is used at the second training time point, N (j), bjkRepresenting an observation probability of the second predetermined application j producing an observation value k at the first training time point when the second predetermined application j is used at the second training time point, k ═ vt,j=qt+1,vtRepresenting observation of an observation value, q, at the t-th training time point that the first preset application is usedt+1Represents a preset application program used at the t +1 th training time point;
traversing the plurality of preset application programs corresponding to each training time point based on a sixth preset formula to obtain an observation probability set, wherein the sixth preset formula is as follows:
B=[bjk]n×m
wherein the observation probability set B is used to record all trainingObservation probabilities of the plurality of preset applications corresponding to a point in time, n representing a number of states, m representing a number of observations in an observation sequence, bjkRepresenting the probability of observation.
For example, the probability of observation may be expressed asWhere N (k, j) represents the number of times observation of observation k was first followed by the use of preset application j at the next training time point, and N (j) represents the number of times preset application j was used. That is, according to the training sample, a third time N (k, j) that the first preset application program and the second preset application program j are sequentially used at adjacent training time points may be obtained, where the adjacent training time points include a first training time point and a second training time point, and the fourth time N (j) that the second preset application program j is used at the second training time point is obtained; according to the third number of times N (k, j) and the fourth number of times N (j), generating an observed probability of the first preset application program observed at the first training time point when the second preset application program j is used at a second training time point, and traversing the plurality of preset application programs corresponding to each training time point to obtain an observed probability set. If the observed value of the first preset application at the first training time point can be represented by an observation value k, then according to the third number of times N (k, j) and the fourth number of times N (j), an observation probability that the second preset application j produces the observation value k at the first training time point when the second preset application j is used at the second training time point is generated, and the plurality of preset applications corresponding to each training time point are traversed to obtain an observation probability set B ═ of the plurality of preset applications corresponding to each training time pointjk]n×m
And 1034, generating a hidden Markov model according to the state set, the observation set, the state transition probability set and the observation probability set.
For example, from the state set Q, the observation set V, the state transition probability set a, and the observation probability set B, model parameters [ Q, V, a, B ] are constructed, and a hidden markov model, which may be denoted λ ═ Q, V, a, B, is generated based on the model parameters [ Q, V, a, B ].
And 104, when a background application program exists in the plurality of preset application programs, predicting by the hidden Markov model according to the current characteristic information of the background application program and the training sample to generate a prediction result, and managing and controlling the background application program according to the prediction result.
The logistic regression model can be trained on the electronic equipment, data to be trained can also be sent to the server, the logistic regression model is trained in the server, and the server sends a prediction result output after training to the electronic equipment, so that the electronic equipment controls the background application according to the prediction result.
In some embodiments, as shown in fig. 5, the step 104 may be implemented by steps 1041 to 1044, specifically:
step 1041, when it is detected that the background application program exists in the preset application program, the hidden markov model outputs the prediction probability that the background application program is about to be used according to the current feature information of the background application program and the training sample.
In some embodiments, when detecting that the background application exists in the preset application, the hidden markov model outputs a predicted probability that the background application will be used based on a seventh preset formula for current feature information of the background application and the training samples, wherein the seventh preset formula is:
where N represents the number of observations, N represents the number of states, [ k ]1,k2,...,kN]Represents N successive observations, [ j ]1,j2,...,jN-1]Represents the sum of N-1 consecutive observations [ k1,k2,...,kN-1]Corresponding to the preset application program, j, being used at the next adjacent training time pointNRepresenting observation of observation k with the Nth training time pointNCorresponding to the predetermined application program, P (j), being used at the next adjacent training time pointN|k1,k2,...,kN,j1,j2,...,jN-1) Representing a preset application jNThe prediction probability to be used.
Wherein the content of the first and second substances,may represent the product of the state transition probability and the observation probability for each observation corresponding to the background application being predicted,it can be represented as the sum of the products of the state transition probability and the observation probability of each preset application program in the state set corresponding to each observation value.
When the background application program of the preset application program is detected to exist, the current training time point is obtained according to the current characteristic information of the background application program, and N continuous observation values [ k ] which are before the current training time point and comprise the current training time point are obtained from the training sample according to the current training time point1,k2,...,kN]Wherein k isNRepresenting an observation composed of a preset application that is used or invoked and a corresponding training time point. The N successive observations [ k ]1,k2,...,kN]Input to a model based on said model parameters [ Q, V, A, B]And in the hidden Markov model generation step, outputting the prediction probability of the use of the background application program from the hidden Markov model.
Wherein the prediction probability can be expressed as:
and 1042, judging whether the prediction probability is smaller than a preset threshold value.
The preset threshold may be set by a manufacturer before the electronic device leaves a factory, or may be set by a user when the electronic device is used. For example, the preset threshold is set to 0.5.
And 1043, when the prediction probability is smaller than a preset threshold value, and a preset result is generated, that the background application program is not to be used, cleaning the background application program.
For example, the preset threshold is set to 0.5, when the prediction probability is less than 0.5, it is indicated that the probability that the background application is to be used is low, and the corresponding generated preset result is that the background application is not to be used at the next training time point, the background application is cleaned, so as to eliminate the consumption of the background application on the electric quantity of the device, and reduce the operation burden of the system.
Step 1044 of reserving the background application program when the prediction probability is greater than or equal to a preset threshold and a preset result is that the background application program is about to be used.
For example, the preset threshold is set to 0.5, when the prediction probability is greater than or equal to 0.5, it indicates that the probability that the background application is to be used is not low, and if the preset result is correspondingly generated that the background application is to be used at the next training time point, the background application is retained, so as to ensure that the background application can respond quickly when being used at the next training time point.
In some embodiments, when the predicted probability is greater than or equal to a preset threshold, further obtaining current device state information of the electronic device, such as that the device state information includes a current power amount, whether the electronic device is currently in a charging state, and the like, and when the current power amount is less than a preset power amount, such as that the preset power amount is 10%, although the probability that the background application is about to be used is not low, in order to extend the device endurance time, the background application is cleaned, and the electronic device re-evaluates whether the cleaned application needs to be reloaded until the cleaned application is actually called. For example, when the current electric quantity is less than the preset electric quantity and the electronic device is currently in the charging state, although the current electric quantity is low, the background application program may be retained due to the supplement of the charging electric quantity.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
According to the method and the device, a training sample is generated by obtaining characteristic information of a plurality of preset application programs and according to the characteristic information, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point, a hidden Markov model is generated according to the training sample, the hidden Markov model is used for prediction to generate a prediction result, and the background application programs are controlled according to the prediction result. According to the embodiment of the application, the training sample is generated by collecting the use record of the application program, and whether the application can be cleaned is predicted by using the hidden Markov model, so that the accuracy of predicting the preset application program is improved, and the intelligence and the accuracy of managing and controlling the application program entering a background are improved.
An application management and control device is further provided in the embodiment of the present application, as shown in fig. 6 to 8, and fig. 6 to 8 are schematic structural diagrams of an application management and control device provided in the embodiment of the present application. The application managing apparatus 30 includes an acquiring module 31, a first generating module 32, a second generating module 33, and a managing module 34.
The obtaining module 31 is configured to obtain feature information of a plurality of preset application programs.
The first generating module 32 is configured to generate a training sample according to the feature information, where the training sample includes a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point.
The second generating module 33 is configured to generate a hidden markov model according to the training sample.
In some embodiments, as shown in fig. 7, the second generation module 33 further includes a first obtaining sub-module 331, a first generation sub-module 332, a second generation sub-module 333, and a third generation sub-module 334.
The first obtaining sub-module 331 is configured to obtain a state set and an observation set of the multiple preset applications according to the training sample.
In some embodiments, the first obtaining sub-module 311 is configured to:
processing the training sample based on a first preset formula to obtain a state set of the plurality of preset application programs, wherein the first preset formula is as follows:
Q={q1,q2,...,qn},
wherein n represents the number of states and Q represents the set of states of the plurality of preset applications;
processing the training sample based on a second preset formula to obtain an observation set of the plurality of preset application programs, wherein the second preset formula is as follows:
V={v1,v2,...,vm},
wherein m represents the number of observations in the observation sequence, and V represents the observation set of the plurality of preset applications.
The first generating submodule 332 is configured to generate, according to the training sample, the state transition probabilities among the multiple preset application programs to obtain a state transition probability set.
In some embodiments, the first generation submodule 332 further includes a first obtaining unit 3321 and a first generating unit 3322.
The first obtaining unit 3321 is configured to obtain, according to the training sample, a first number of times that a first preset application and a second preset application are used in sequence, and a second number of times that the first preset application is used.
The first generating unit 3322 is configured to generate a state transition probability that the first preset application program jumps to the second preset application program according to the first number and the second number, and traverse the plurality of preset application programs to obtain an observation probability set.
In some embodiments, the first generating unit 3322 is configured to:
processing the first time and the second time based on a third preset formula to generate a state transition probability of the first preset application program jumping to the second preset application program, wherein the third preset formula is as follows:
wherein N (i, j) represents a first number of times that a first preset application program i and a second preset application program j are used in sequence, N (i) represents a second number of times that the first preset application program i is used, and aijRepresenting a state transition probability of the first preset application program i jumping to the second preset application program j, i ═ qt,j=qt+1,qtIndicating the preset application to be used at time t, qt+1Represents a preset application program used at the time t + 1;
traversing the plurality of preset applications based on a fourth preset formula to obtain an observation probability set, wherein the fourth preset formula is as follows:
A=[aij]n×n
the state transition probability set A is used for recording the probability of jumping among all preset application program states, wherein n represents the number of the states, and aijRepresenting the state transition probability.
The second generating submodule 333 is configured to generate, according to the training sample, the observation probabilities of the multiple preset application programs corresponding to each training time point, so as to obtain an observation probability set.
In some embodiments, the second generation sub-module 333 further includes a second obtaining unit 3331 and a second generating unit 3332.
The second obtaining unit 3331 is configured to obtain, according to the training sample, a third number of times that the first preset application and the second preset application are used sequentially at adjacent training time points, where the adjacent training time points include a first training time point and a second training time point, and obtain a fourth number of times that the second preset application is used at the second training time point;
the second generating unit 3332 is configured to generate, according to the third number and the fourth number, an observed probability that the first preset application is observed at the first training time point when the second preset application is used at the second training time point, and traverse the plurality of preset applications corresponding to each training time point to obtain an observation probability set.
In some embodiments, the second generating unit 3332 is configured to:
processing the third number and the fourth number according to a fifth preset formula to generate an observed probability of the first preset application program being observed at the first training time point when the second preset application program is used at the second training time point, wherein the fifth preset formula is:
wherein N (k, j) represents a third number of times that the first preset application program and the second preset application program j are used in sequence at adjacent training time points, N (j) represents a fourth number of times that the second preset application program j is used at the second training time point, N (j), bjkRepresenting an observation probability of the second predetermined application j producing an observation value k at the first training time point when the second predetermined application j is used at the second training time point, k ═ vt,j=qt+1,vtRepresenting observation of an observation value, q, at the t-th training time point that the first preset application is usedt+1Represents a preset application program used at the t +1 th training time point;
traversing the plurality of preset application programs corresponding to each training time point based on a sixth preset formula to obtain an observation probability set, wherein the sixth preset formula is as follows:
B=[bjk]n×m
the observation probability set B is used for recording the observation probabilities of the plurality of preset application programs corresponding to all the training time points, n represents the state number, m represents the observation number in the observation sequence, B represents the observation number in the observation sequencejkRepresenting the probability of observation.
The third generating submodule 334 is configured to generate a hidden markov model according to the state set, the observation set, the state transition probability set, and the observation probability set.
The management and control module 34 is configured to, when it is detected that a background application exists in the plurality of preset applications, perform prediction by the hidden markov model according to the current feature information of the background application and the training sample to generate a prediction result, and manage and control the background application according to the prediction result.
In some embodiments, as shown in fig. 8, the management module 34 further includes an output sub-module 341, a determination sub-module 342, and a management sub-module 343.
The output sub-module 341 is configured to, when it is detected that the preset application program has a background application program, output, by the hidden markov model, the prediction probability that the background application program is to be used according to the current feature information of the background application program and the training sample.
In some embodiments, the output submodule 341 is configured to:
when detecting that a background application program exists in the preset application program, the hidden markov model outputs a prediction probability that the background application program is about to be used based on current feature information of the background application program and the training sample by a seventh preset formula, wherein the seventh preset formula is as follows:
where N represents the number of observations, N represents the number of states, [ k ]1,k2,...,kN]Represents N successive observations, [ j ]1,j2,...,jN-1]Represents the sum of N-1 consecutive observations [ k1,k2,...,kN-1]Corresponding to the preset application program, j, being used at the next adjacent training time pointNRepresenting observation of observation k with the Nth training time pointNCorresponding to the predetermined application program, P (j), being used at the next adjacent training time pointN|k1,k2,...,kN,j1,j2,...,jN-1) Representing a preset application jNThe prediction probability to be used.
The determining sub-module 342 is configured to determine whether the prediction probability is smaller than a preset threshold.
The management and control sub-module 343 is configured to, when the prediction probability is smaller than a preset threshold, generate a preset result that the background application is about to be unused, and clean the background application; or
And when the prediction probability is greater than or equal to a preset threshold value, and a generated preset result is that the background application program is about to be used, the background application program is reserved.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
According to the embodiment of the application, the characteristic information of a plurality of preset applications is acquired through the acquisition module 31, the first generation module 32 generates the training samples according to the characteristic information, the training samples comprise a plurality of training time points and state information of the plurality of preset applications corresponding to each training time point, the second generation module 33 generates the hidden Markov model according to the training samples, and the control module 34 utilizes the hidden Markov model to predict to generate a prediction result and control the background applications according to the prediction result. According to the embodiment of the application, the application program management and control device 30 collects the use records of the application programs to generate the training samples, and the hidden Markov model is used for predicting whether the application can be cleaned or not, so that the accuracy of predicting the preset application programs is improved, and the intelligence and the accuracy of managing and controlling the application programs entering the background are improved.
The embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, where the processor calls the computer program stored in the memory to execute the application management and control method according to any embodiment of the present application.
The electronic equipment can be equipment such as a smart phone, a tablet computer and a palm computer. As shown in fig. 9, an electronic device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored on the memory and executable on the processor. The processor 401 is electrically connected to the memory 402. Those skilled in the art will appreciate that the electronic device configurations shown in the figures do not constitute limitations of the electronic device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The processor 401 is a control center of the electronic device 400, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or loading an application program stored in the memory 402 and calling data stored in the memory 402, thereby integrally monitoring the electronic device.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402, so as to implement various functions:
acquiring characteristic information of a plurality of preset application programs;
generating a training sample according to the feature information, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point;
generating a hidden Markov model according to the training sample;
when a background application program exists in the plurality of preset application programs, the hidden Markov model predicts according to the current characteristic information of the background application program and the training sample to generate a prediction result, and manages and controls the background application program according to the prediction result.
In some embodiments, processor 401 is configured to generate a hidden markov model based on the training samples, including:
acquiring state sets and observation sets of the preset application programs according to the training samples;
generating state transition probabilities among the plurality of preset application programs according to the training samples to obtain a state transition probability set;
generating observation probabilities of the plurality of preset application programs corresponding to each training time point according to the training samples to obtain an observation probability set;
and generating a hidden Markov model according to the state set, the observation set, the state transition probability set and the observation probability set.
In some embodiments, the processor 401 is configured to generate the state transition probabilities among the preset applications according to the training sample to obtain a state transition probability set, including:
acquiring a first number of times that a first preset application program and a second preset application program are used in sequence and a second number of times that the first preset application program is used according to the training sample;
according to the first times and the second times, generating a state transition probability of the first preset application program jumping to the second preset application program, and traversing the plurality of preset application programs to obtain an observation probability set;
generating observation probabilities of the plurality of preset application programs corresponding to each training time point according to the training samples to obtain an observation probability set, including:
according to the training sample, acquiring a third number of times that a first preset application program and a second preset application program are used in sequence at adjacent training time points, wherein the adjacent training time points comprise a first training time point and a second training time point, and acquiring a fourth number of times that the second preset application program is used at the second training time point;
and according to the third times and the fourth times, generating an observed probability of the first preset application program at the first training time point when the second preset application program is used at the second training time point, and traversing the plurality of preset application programs corresponding to each training time point to obtain an observation probability set.
In some embodiments, the processor 401 is configured to obtain the state set and the observation set of the plurality of preset applications according to the training sample, including:
processing the training sample based on a first preset formula to obtain a state set of the plurality of preset application programs, wherein the first preset formula is as follows:
Q={q1,q2,...,qn},
wherein n represents the number of states and Q represents the set of states of the plurality of preset applications;
processing the training sample based on a second preset formula to obtain an observation set of the plurality of preset application programs, wherein the second preset formula is as follows:
V={v1,v2,...,vm},
wherein m represents the number of observations in the observation sequence, and V represents the observation set of the plurality of preset applications.
In some embodiments, the processor 401 is configured to generate a state transition probability that the first preset application jumps to the second preset application according to the first number and the second number, and traverse the plurality of preset applications to obtain an observation probability set, including:
processing the first time and the second time based on a third preset formula to generate a state transition probability of the first preset application program jumping to the second preset application program, wherein the third preset formula is as follows:
wherein N (i, j) represents a first number of times that a first preset application program i and a second preset application program j are used in sequence, N (i) represents a second number of times that the first preset application program i is used, and aijRepresenting a state transition probability of the first preset application program i jumping to the second preset application program j, i ═ qt,j=qt+1,qtIndicating the preset application to be used at time t, qt+1Represents a preset application program used at the time t + 1;
traversing the plurality of preset applications based on a fourth preset formula to obtain an observation probability set, wherein the fourth preset formula is as follows:
A=[aij]n×n
the state transition probability set A is used for recording the probability of jumping among all preset application program states, wherein n represents the number of the states, and aijRepresenting the state transition probability.
In some embodiments, the processor 401 is configured to generate, according to the third number and the fourth number, an observed probability that the first preset application is observed at the first training time point when the second preset application is used at a second training time point, and traverse the plurality of preset applications corresponding to each training time point to obtain an observed probability set, including:
processing the third number and the fourth number according to a fifth preset formula to generate an observed probability of the first preset application program being observed at the first training time point when the second preset application program is used at the second training time point, wherein the fifth preset formula is:
wherein N (k, j) represents a third number of times that the first preset application program and the second preset application program j are used in sequence at adjacent training time points, N (j) represents a fourth number of times that the second preset application program j is used at the second training time point, N (j), bjkRepresenting an observation probability of the second predetermined application j producing an observation value k at the first training time point when the second predetermined application j is used at the second training time point, k ═ vt,j=qt+1,vtRepresenting observation of an observation value, q, at the t-th training time point that the first preset application is usedt+1Represents a preset application program used at the t +1 th training time point;
traversing the plurality of preset application programs corresponding to each training time point based on a sixth preset formula to obtain an observation probability set, wherein the sixth preset formula is as follows:
B=[bjk]n×m
the observation probability set B is used for recording the observation probabilities of the plurality of preset application programs corresponding to all the training time points, n represents the state number, m represents the observation number in the observation sequence, B represents the observation number in the observation sequencejkRepresenting the probability of observation.
In some embodiments, the processor 401 is configured to, when it is detected that a background application exists in the preset application, perform prediction by using the hidden markov model according to the current feature information of the background application and the training samples to generate a prediction result, and manage and control the background application according to the prediction result, including:
when detecting that the preset application program has a background application program, the hidden Markov model outputs the prediction probability of the background application program to be used according to the current characteristic information of the background application program and the training sample;
judging whether the prediction probability is smaller than a preset threshold value or not;
when the prediction probability is smaller than a preset threshold value, and a generated preset result is that the background application program is about to be unused, cleaning the background application program; or
And when the prediction probability is greater than or equal to a preset threshold value, and a generated preset result is that the background application program is about to be used, the background application program is reserved.
In some embodiments, the processor 401 is configured to, when it is detected that the preset application is a background application, output, by the hidden markov model, a predicted probability that the background application will be used according to the current feature information of the background application and the training samples, including:
when detecting that a background application program exists in the preset application program, the hidden markov model outputs a prediction probability that the background application program is about to be used based on current feature information of the background application program and the training sample by a seventh preset formula, wherein the seventh preset formula is as follows:
where N represents the number of observations, N represents the number of states, [ k ]1,k2,...,kN]Represents N successive observations, [ j ]1,j2,...,jN-1]Represents the sum of N-1 consecutive observations [ k1,k2,...,kN-1]Corresponding to the preset application program, j, being used at the next adjacent training time pointNRepresenting observation of observation k with the Nth training time pointNCorresponding to the predetermined application program, P (j), being used at the next adjacent training time pointN|k1,k2,...,kN,j1,j2,...,jN-1) Representing a preset application jNThe prediction probability to be used.
In some embodiments, as shown in fig. 10, electronic device 400 further comprises: a display 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the display 403, the rf circuit 404, the audio circuit 405, the input unit 406, and the power source 407. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 10 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The display screen 403 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. When the display screen 403 is a touch display screen, it may also be used as a part of an input unit to implement an input function.
The rf circuit 404 may be used for transceiving rf signals to establish wireless communication with a network device or other electronic devices via wireless communication, and for transceiving signals with the network device or other electronic devices.
The audio circuit 405 may be used to provide an audio interface between the user and the electronic device through a speaker, microphone.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 407 is used to power the various components of the electronic device 400. In some embodiments, the power supply 107 may be logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption management are implemented through the power management system.
Although not shown in fig. 10, the electronic device 400 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In this embodiment, the application management and control apparatus and the application management and control method in the above embodiments belong to the same concept, and any one of the methods provided in the embodiments of the application management and control method may be run on the application management and control apparatus, and a specific implementation process thereof is described in detail in the embodiments of the application management and control method, and is not described herein again.
An embodiment of the present application further provides a storage medium, where a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the application management and control method in any one of the above embodiments.
It should be noted that, for the application management and control method described in this application, persons skilled in the art may understand that all or part of the processes for implementing the application management and control method described in this application may be implemented by controlling related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and during the execution, the processes of the embodiment of the application management and control method may be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the application management and control device in the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The application program management and control method, the application program management and control device, the storage medium and the electronic device provided by the embodiment of the application are introduced in detail, a specific example is applied in the description to explain the principle and the implementation manner of the application, and the description of the embodiment is only used for helping to understand the technical scheme and the core idea of the application; those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications or substitutions do not depart from the spirit and scope of the present disclosure as defined by the appended claims.

Claims (14)

1. An application program management and control method is applied to electronic equipment, and is characterized by comprising the following steps:
acquiring characteristic information of a plurality of preset application programs;
generating a training sample according to the feature information, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point;
generating a hidden Markov model according to the training sample;
when detecting that a background application program exists in the preset application program, the hidden markov model outputs a prediction probability that the background application program is about to be used based on current feature information of the background application program and the training sample by a seventh preset formula, wherein the seventh preset formula is as follows:
where N represents the number of observations, N represents the number of states, [ k ]1,k2,...,kN]Represents N successive observations, [ j ]1,j2,...,jN-1]Represents the sum of N-1 consecutive observations [ k1,k2,...,kN-1]Corresponding to the preset application program, j, being used at the next adjacent training time pointNRepresenting observation of observation k with the Nth training time pointNCorresponding to the predetermined application program, P (j), being used at the next adjacent training time pointN|k1,k2,...,kN,j1,j2,...,jN-1) Representing a preset application jNA predicted probability to be used;
judging whether the prediction probability is smaller than a preset threshold value or not;
when the prediction probability is smaller than a preset threshold value, and a generated preset result is that the background application program is about to be unused, cleaning the background application program; or
And when the prediction probability is greater than or equal to a preset threshold value, and a generated preset result is that the background application program is about to be used, the background application program is reserved.
2. The application governance method of claim 1, wherein generating a hidden markov model from the training samples comprises:
acquiring state sets and observation sets of the preset application programs according to the training samples;
generating state transition probabilities among the plurality of preset application programs according to the training samples to obtain a state transition probability set;
generating observation probabilities of the plurality of preset application programs corresponding to each training time point according to the training samples to obtain an observation probability set;
and generating a hidden Markov model according to the state set, the observation set, the state transition probability set and the observation probability set.
3. The method for managing and controlling application programs according to claim 2, wherein the generating the state transition probabilities among the plurality of preset application programs according to the training samples to obtain a state transition probability set comprises:
acquiring a first number of times that a first preset application program and a second preset application program are used in sequence and a second number of times that the first preset application program is used according to the training sample;
according to the first times and the second times, generating a state transition probability of the first preset application program jumping to the second preset application program, and traversing the plurality of preset application programs to obtain an observation probability set;
generating observation probabilities of the plurality of preset application programs corresponding to each training time point according to the training samples to obtain an observation probability set, including:
according to the training sample, acquiring a third number of times that a first preset application program and a second preset application program are used in sequence at adjacent training time points, wherein the adjacent training time points comprise a first training time point and a second training time point, and acquiring a fourth number of times that the second preset application program is used at the second training time point;
and according to the third times and the fourth times, generating an observed probability of the first preset application program at the first training time point when the second preset application program is used at the second training time point, and traversing the plurality of preset application programs corresponding to each training time point to obtain an observation probability set.
4. The method for managing and controlling applications according to claim 3, wherein the obtaining the state set and the observation set of the plurality of preset applications according to the training samples comprises:
processing the training sample based on a first preset formula to obtain a state set of the plurality of preset application programs, wherein the first preset formula is as follows:
Q={q1,q2,...,qn},
wherein n represents the number of states and Q represents the set of states of the plurality of preset applications;
processing the training sample based on a second preset formula to obtain an observation set of the plurality of preset application programs, wherein the second preset formula is as follows:
V={v1,v2,...,vm},
wherein m represents the number of observations in the observation sequence, and V represents the observation set of the plurality of preset applications.
5. The method for managing and controlling the application programs according to claim 4, wherein the generating the state transition probability of the first preset application program jumping to the second preset application program according to the first number and the second number, and traversing the plurality of preset application programs to obtain the observation probability set comprises:
processing the first time and the second time based on a third preset formula to generate a state transition probability of the first preset application program jumping to the second preset application program, wherein the third preset formula is as follows:
wherein N (i, j) represents a first number of times that a first preset application program i and a second preset application program j are used in sequence, N (i) represents a second number of times that the first preset application program i is used, and aijRepresenting a state transition probability of the first preset application program i jumping to the second preset application program j, i ═ qt,j=qt+1,qtIndicating the preset application to be used at time t, qt+1Represents a preset application program used at the time t + 1;
traversing the plurality of preset applications based on a fourth preset formula to obtain an observation probability set, wherein the fourth preset formula is as follows:
A=[aij]n×n
the state transition probability set A is used for recording the probability of jumping among all preset application program states, wherein n represents the number of the states, and aijRepresenting the state transition probability.
6. The method for managing and controlling the applications according to claim 5, wherein the generating, according to the third number and the fourth number, the observed probability that the first preset application is observed at the first training time point when the second preset application is used at the second training time point, and traversing the plurality of preset applications corresponding to each training time point to obtain the observation probability set includes:
processing the third number and the fourth number according to a fifth preset formula to generate an observed probability of the first preset application program being observed at the first training time point when the second preset application program is used at the second training time point, wherein the fifth preset formula is:
wherein N (k, j) represents a third number of times that the first preset application program and the second preset application program j are used in sequence at adjacent training time points, N (j) represents a fourth number of times that the second preset application program j is used at the second training time point, N (j), bjkRepresenting an observation probability of the second predetermined application j producing an observation value k at the first training time point when the second predetermined application j is used at the second training time point, k ═ vt,j=qt+1,vtRepresenting observation of an observation value, q, at the t-th training time point that the first preset application is usedt+1Represents a preset application program used at the t +1 th training time point;
traversing the plurality of preset application programs corresponding to each training time point based on a sixth preset formula to obtain an observation probability set, wherein the sixth preset formula is as follows:
B=[bjk]n×m
the observation probability set B is used for recording the observation probabilities of the plurality of preset application programs corresponding to all the training time points, n represents the state number, m represents the observation number in the observation sequence, B represents the observation number in the observation sequencejkRepresenting the probability of observation.
7. An application management and control apparatus, comprising:
the acquisition module is used for acquiring the characteristic information of a plurality of preset application programs;
the first generating module is used for generating a training sample according to the characteristic information, wherein the training sample comprises a plurality of training time points and state information of the plurality of preset application programs corresponding to each training time point;
the second generation module is used for generating a hidden Markov model according to the training sample;
the hidden Markov model is used for predicting according to current characteristic information of the background application program and the training sample to generate a prediction result when the background application program is detected to exist in the plurality of preset application programs, and managing and controlling the background application program according to the prediction result;
the management and control module comprises:
an output sub-module, configured to, when it is detected that a background application exists in the preset application, output, by the hidden markov model, a prediction probability that the background application is to be used based on a seventh preset formula for current feature information of the background application and the training sample, where the seventh preset formula is:
where N represents the number of observations, N represents the number of states, [ k ]1,k2,...,kN]Represents N successive observations, [ j ]1,j2,...,jN-1]Represents the sum of N-1 consecutive observations [ k1,k2,...,kN-1]Corresponding to the preset application program, j, being used at the next adjacent training time pointNRepresenting observation of observation k with the Nth training time pointNCorresponding to the predetermined application program, P (j), being used at the next adjacent training time pointN|k1,k2,...,kN,j1,j2,...,jN-1) Representing a preset application jNA predicted probability to be used;
the judgment submodule is used for judging whether the prediction probability is smaller than a preset threshold value or not;
the management and control sub-module is used for cleaning the background application program when the prediction probability is smaller than a preset threshold value and a generated preset result is that the background application program is about to be unused; or
And when the prediction probability is greater than or equal to a preset threshold value, and a generated preset result is that the background application program is about to be used, the background application program is reserved.
8. The application management and control apparatus of claim 7, wherein the second generation module comprises:
the first obtaining submodule is used for obtaining a state set and an observation set of the plurality of preset application programs according to the training sample;
the first generation submodule is used for generating state transition probabilities among the plurality of preset application programs according to the training sample so as to obtain a state transition probability set;
the second generation submodule is used for generating observation probabilities of the plurality of preset application programs corresponding to each training time point according to the training samples so as to obtain an observation probability set;
and the third generation submodule is used for generating a hidden Markov model according to the state set, the observation set, the state transition probability set and the observation probability set.
9. The application management and control apparatus according to claim 8, wherein the first generation submodule includes:
the training device comprises a first obtaining unit, a second obtaining unit and a control unit, wherein the first obtaining unit is used for obtaining a first time number of a first preset application program and a second time number of a second preset application program which are used in sequence according to the training sample;
a first generating unit, configured to generate a state transition probability that the first preset application program jumps to the second preset application program according to the first number and the second number, and traverse the plurality of preset application programs to obtain an observation probability set;
the second generation submodule includes:
a second obtaining unit, configured to obtain, according to the training sample, a third number of times that a first preset application program and a second preset application program are used sequentially at adjacent training time points, where the adjacent training time points include a first training time point and a second training time point, and obtain a fourth number of times that the second preset application program is used at the second training time point;
a second generating unit, configured to generate, according to the third number and the fourth number, an observed probability that the first preset application is observed at the first training time point when the second preset application is used at a second training time point, and traverse the plurality of preset applications corresponding to each training time point to obtain an observation probability set.
10. The application management and control apparatus according to claim 9, wherein the first obtaining sub-module is configured to:
processing the training sample based on a first preset formula to obtain a state set of the plurality of preset application programs, wherein the first preset formula is as follows:
Q={q1,q2,...,qn},
wherein n represents the number of states and Q represents the set of states of the plurality of preset applications;
processing the training sample based on a second preset formula to obtain an observation set of the plurality of preset application programs, wherein the second preset formula is as follows:
V={v1,v2,...,vm},
wherein m represents the number of observations in the observation sequence, and V represents the observation set of the plurality of preset applications.
11. The application management and control apparatus according to claim 10, wherein the first generation unit is configured to:
processing the first time and the second time based on a third preset formula to generate a state transition probability of the first preset application program jumping to the second preset application program, wherein the third preset formula is as follows:
wherein N (i, j) represents a first number of times that a first preset application program i and a second preset application program j are used in sequence, N (i) represents a second number of times that the first preset application program i is used, and aijRepresenting a state transition probability of the first preset application program i jumping to the second preset application program j, i ═ qt,j=qt+1,qtIndicating the preset application to be used at time t, qt+1Represents a preset application program used at the time t + 1;
traversing the plurality of preset applications based on a fourth preset formula to obtain an observation probability set, wherein the fourth preset formula is as follows:
A=[aij]n×n
the state transition probability set A is used for recording the probability of jumping among all preset application program states, wherein n represents the number of the states, and aijRepresenting the state transition probability.
12. The application management and control apparatus according to claim 11, wherein the second generation unit is configured to:
processing the third number and the fourth number according to a fifth preset formula to generate an observed probability of the first preset application program being observed at the first training time point when the second preset application program is used at the second training time point, wherein the fifth preset formula is:
wherein N (k, j) represents a third number of times that the first preset application program and the second preset application program j are used in sequence at adjacent training time points, N (j) represents a fourth number of times that the second preset application program j is used at the second training time point, N (j), bjkRepresenting an observation probability of the second predetermined application j producing an observation value k at the first training time point when the second predetermined application j is used at the second training time point, k ═ vt,j=qt+1,vtRepresenting observation of an observation value, q, at the t-th training time point that the first preset application is usedt+1Represents a preset application program used at the t +1 th training time point;
traversing the plurality of preset application programs corresponding to each training time point based on a sixth preset formula to obtain an observation probability set, wherein the sixth preset formula is as follows:
B=[bjk]n×m
the observation probability set B is used for recording the observation probabilities of the plurality of preset application programs corresponding to all the training time points, n represents the state number, m represents the observation number in the observation sequence, B represents the observation number in the observation sequencejkRepresenting the probability of observation.
13. A storage medium on which a computer program is stored, characterized by causing a computer to execute an application program management method according to any one of claims 1 to 6 when the computer program runs on the computer.
14. An electronic device comprising a memory and a processor, wherein the processor is configured to execute the application management method according to any one of claims 1 to 6 by calling a computer program stored in the memory.
CN201710919446.8A 2017-09-30 2017-09-30 Application program control method and device, storage medium and electronic equipment Active CN107608778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710919446.8A CN107608778B (en) 2017-09-30 2017-09-30 Application program control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710919446.8A CN107608778B (en) 2017-09-30 2017-09-30 Application program control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107608778A CN107608778A (en) 2018-01-19
CN107608778B true CN107608778B (en) 2020-01-14

Family

ID=61067806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710919446.8A Active CN107608778B (en) 2017-09-30 2017-09-30 Application program control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107608778B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110086835B (en) * 2018-01-24 2021-08-03 腾讯科技(深圳)有限公司 Application program control method, terminal, server and system
CN108762836B (en) * 2018-05-21 2022-04-19 Oppo广东移动通信有限公司 Management method and device for preloaded application, storage medium and intelligent terminal
CN108762838B (en) * 2018-05-21 2022-01-28 Oppo广东移动通信有限公司 Application program preloading method and device, storage medium and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699606A (en) * 2015-03-06 2015-06-10 国网四川省电力公司电力科学研究院 Method for predicting state of software system based on hidden Markov model
CN106339322A (en) * 2016-09-13 2017-01-18 哈尔滨工程大学 Method for software behavior prediction based on HMM-ACO
CN107133094A (en) * 2017-06-05 2017-09-05 努比亚技术有限公司 Application management method, mobile terminal and computer-readable recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699606A (en) * 2015-03-06 2015-06-10 国网四川省电力公司电力科学研究院 Method for predicting state of software system based on hidden Markov model
CN106339322A (en) * 2016-09-13 2017-01-18 哈尔滨工程大学 Method for software behavior prediction based on HMM-ACO
CN107133094A (en) * 2017-06-05 2017-09-05 努比亚技术有限公司 Application management method, mobile terminal and computer-readable recording medium

Also Published As

Publication number Publication date
CN107608778A (en) 2018-01-19

Similar Documents

Publication Publication Date Title
EP3567479B1 (en) Method for establishing application prediction model, storage medium, and terminal
CN107608778B (en) Application program control method and device, storage medium and electronic equipment
CN107835311B (en) Application management method and device, storage medium and electronic equipment
CN107885545B (en) Application management method and device, storage medium and electronic equipment
CN107678803B (en) Application control method and device, storage medium and electronic equipment
CN105740078B (en) Memory management method, device and terminal
CN107678800B (en) Background application cleaning method and device, storage medium and electronic equipment
CN108337358B (en) Application cleaning method and device, storage medium and electronic equipment
EP3502878B1 (en) Method for preloading application and terminal device
CN107943534B (en) Background application program closing method and device, storage medium and electronic equipment
CN107832132B (en) Application control method and device, storage medium and electronic equipment
CN108804231B (en) Memory optimization method and device, readable storage medium and mobile terminal
WO2019085749A1 (en) Application program control method and apparatus, medium, and electronic device
EP3502881A1 (en) Method for preloading application, storage medium, and terminal device
EP3502880A1 (en) Method for preloading application, storage medium, and terminal device
CN108038050B (en) Performance adjusting method and device, storage medium and electronic equipment
CN107741867B (en) Application program management method and device, storage medium and electronic equipment
CN108234758B (en) Application display method and device, storage medium and electronic equipment
CN107748697B (en) Application closing method and device, storage medium and electronic equipment
CN107943570B (en) Application management method and device, storage medium and electronic equipment
CN107870811B (en) Application cleaning method and device, storage medium and electronic equipment
CN110832918A (en) User position identification method and device, storage medium and electronic equipment
CN107943535B (en) Application cleaning method and device, storage medium and electronic equipment
CN107870810B (en) Application cleaning method and device, storage medium and electronic equipment
CN107870809B (en) Application closing method and device, storage medium and electronic equipment

Legal Events

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

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

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

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

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

GR01 Patent grant
GR01 Patent grant