Application running method, apparatus, electronic device and storage medium
A method of controlling an electronic apparatus for running at least one application is provided. The method includes obtaining feature data corresponding to a plurality of running applications, wherein the feature data comprises current system state data and running state data corresponding to the at least one application, identifying a target abnormal application based on the feature data corresponding to the plurality of the running applications, obtaining interactive data corresponding to a plurality of call actions of the target abnormal application within a preset duration, identifying a target abnormal call action based on the interactive data corresponding to the plurality of the call actions, and performing call restriction on the target abnormal call action based on monitoring the target abnormal call action.
1 . A method of controlling an electronic apparatus for running at least one application, the method comprising:
obtaining, by the electronic apparatus, feature data corresponding to a plurality of running applications running in the electronic apparatus, wherein the feature data comprises current system state data and running state data corresponding to the at least one application;
identifying, by the electronic apparatus, a target abnormal application based on the feature data corresponding to the plurality of running applications;
obtaining, by the electronic apparatus, interactive data corresponding to a plurality of call actions of the target abnormal application within a preset duration, the interactive data including a number of calls of each of the plurality of call actions within the preset duration;
identifying, by the electronic apparatus, a target abnormal call action based on the number of calls of each of the plurality of call actions within the preset duration; and
performing, by the electronic apparatus, call restriction on the target abnormal call action based on monitoring the target abnormal call action.
2 . The method of claim 1 , wherein, the identifying of the target abnormal application based on the feature data corresponding to the plurality of running applications comprises:
identifying target applications from among the plurality of running applications based on the running state data corresponding to the plurality of running applications; and
identifying the target abnormal application from among the target applications based on feature data corresponding to the target applications.
3 . The method of claim 2 ,
wherein, the running state data corresponding to the at least one application comprises a central processing unit (CPU) occupancy rate when the at least one application is running; and
wherein the identifying of the target applications from among the plurality of running applications based on the running state data corresponding to the plurality of running applications comprises:
selecting top N applications of highest CPU occupancy rate from among the plurality of running applications, wherein the N is a preset positive integer; and
identifying the top N applications of highest CPU occupancy rate as the target applications.
4 . The method of claim 2 , wherein, the identifying of the target abnormal application from among the target applications based on the feature data corresponding to the target applications comprises:
obtaining a corresponding decision result of each target application through a decision tree model based on the feature data corresponding to each target application; and
identifying the target abnormal application from among the target applications based on the decision results.
5 . The method of claim 4 , wherein, after the identifying of the target abnormal call action based on the interactive data corresponding to the plurality of call actions, further comprises:
obtaining a label indicating whether the decision result is correct; and
updating the decision tree model based on the label and the feature data corresponding to the target abnormal application.
6 . The method of claim 1 ,
wherein, after the identifying of the target abnormal application based on the feature data corresponding to the plurality of running applications, the method further comprises:
displaying a first notification information, wherein the first notification information indicates existence of the target abnormal application and prompts a user an optimization function for the target abnormal application is able to be opened; and
executing a first operation based on receiving an opening instruction for the optimization function, and
wherein the first operation comprises:
obtaining the interactive data corresponding to the plurality of call actions of the target abnormal application within the preset duration;
identifying the target abnormal call action based on the interactive data corresponding to the plurality of call actions; and
performing the call restriction on the target abnormal call action based on monitoring the target abnormal call action.
7 . The method of claim 6 , further comprising:
displaying second notification information during a process of the first operation, wherein the second notification information prompts the user the optimization function for the target abnormal application is able to be closed; and
stopping executing the first operation based on receiving a closing instruction for the optimization function.
8 . The method of claim 1 ,
wherein, each call action is one of a first type of call action or a second type of call action,
wherein the first type of call action is calling to any one function in a system service by any one thread in the target abnormal application, the second type of call action is calling to any one function in another application by any one thread in the target abnormal application, and
wherein the identifying the target abnormal call action based on the interactive data corresponding to the plurality of call actions comprises:
screening the first type of call actions from among the plurality of call actions,
identifying the first type of call action with the greatest number of calls as a target call action, and
identifying the target abnormal call action based on the number of calls of the target call action within the preset duration.
9 . The method of claim 8 , wherein, the identifying of the target abnormal call action based on the number of calls of the target call action within the preset duration comprises:
obtaining an abnormal probability of the target call action through a Gaussian mixture clustering model based on the number of calls of the target call action within the preset duration; and
identifying the target call action as the target abnormal call action based on the abnormal probability being higher than a preset threshold.
10 . The method of claim 1 , wherein, the performing of the call restriction on the target abnormal call action based on monitoring the target abnormal call action comprises:
suspending execution of the target abnormal call action based on monitoring the target abnormal call action; and
releasing the suspension of the target abnormal call action after preset suspension time has elapsed.
11 . The method of claim 10 , further comprising:
during a process of performing the call restriction on the target abnormal call action, adjusting a preset suspension time several times through a reinforcement learning model based on power consumption data and performance data corresponding to the target abnormal application, to achieve an optimal suspension time.
12 . An electronic apparatus for running at least one application, the electronic apparatus comprising:
memory storing one or more computer programs; and
one or more processors communicatively coupled to the memory,
wherein the one or more computer programs include computer-executable instructions that, when executed by the one or more processors individually or collectively, cause the electronic apparatus to:
obtain feature data corresponding to a plurality of running applications running in the electronic apparatus, wherein the feature data comprises current system state data and running state data corresponding to the at least one application,
identify a target abnormal application based on the feature data corresponding to the plurality of running applications,
obtain interactive data corresponding to a plurality of call actions of the target abnormal application within a preset duration, the interactive data including a number of calls of each of the plurality of call actions within the preset duration,
identify a target abnormal call action based on the number of calls of each of the plurality of call actions within the preset duration, and
perform call restriction on the target abnormal call action based on monitoring the target abnormal call action.
13 . The electronic apparatus of claim 12 , wherein the one or more computer programs further include computer-executable instructions that, when executed by the one or more processors individually or collectively, cause the electronic apparatus to:
identify target applications from among the plurality of running applications based on the running state data corresponding to the plurality of running applications, and
identify the target abnormal application from among the target applications based on feature data corresponding to the target applications.
14 . The electronic apparatus of claim 13 ,
wherein the running state data corresponding to the application comprises a central processing unit (CPU) occupancy rate when the at least one application is running, and
wherein the one or more computer programs further include computer-executable instructions that, when executed by the one or more processors individually or collectively, cause the electronic apparatus to:
select top N applications of highest CPU occupancy rate from among the plurality of running applications, wherein the N is a preset positive integer, and
identify the top N applications of highest CPU occupancy rate as the target applications.
15 . The electronic apparatus of claim 13 , wherein the one or more computer programs further include computer-executable instructions that, when executed by the one or more processors individually or collectively, cause the electronic apparatus to:
obtain a corresponding decision result of each target application through a decision tree model based on the feature data corresponding to each target application, and
identify the target abnormal application from among the target applications based on the decision results.
16 . The electronic apparatus of claim 15 , wherein the one or more computer programs further include computer-executable instructions that, when executed by the one or more processors individually or collectively, cause the electronic apparatus to:
obtain a label indicating whether the decision result is correct, and
update the decision tree model based on the label and the feature data corresponding to the target abnormal application.
17 . The electronic apparatus of claim 12 ,
wherein the one or more computer programs further include computer-executable instructions that, when executed by the one or more processors individually or collectively, cause the electronic apparatus to:
display a first notification information, wherein the first notification information indicates existence of the target abnormal application and prompts a user an optimization function for the target abnormal application is able to be opened, and
execute a first operation based on receiving an opening instruction for the optimization function, and
wherein the first operation comprises:
obtaining the interactive data corresponding to the plurality of call actions of the target abnormal application within the preset duration,
identifying the target abnormal call action based on the interactive data corresponding to the plurality of call actions, and
performing the call restriction on the target abnormal call action based on monitoring the target abnormal call action.
18 . The electronic apparatus of claim 17 , wherein the one or more computer programs further include computer-executable instructions that, when executed by the one or more processors individually or collectively, cause the electronic apparatus to:
display second notification information during a process of the first operation, wherein the second notification information prompts the user the optimization function for the target abnormal application is able to be closed, and
stop executing the first operation based on receiving a closing instruction for the optimization function.
19 . One or more non-transitory computer-readable storage media storing computer-executable instructions that, when executed by one or more processors individually or collectively, cause an electronic apparatus to perform operations, the operations comprising:
obtaining feature data corresponding to a plurality of running applications running in the electronic apparatus, wherein the feature data comprises current system state data and running state data corresponding to at least one application;
identifying a target abnormal application based on the feature data corresponding to the plurality of running applications;
obtaining interactive data corresponding to a plurality of call actions of the target abnormal application within a preset duration, the interactive data including a number of calls of each of the plurality of call actions within the preset duration;
identifying a target abnormal call action based on the number of calls of each of the plurality of call actions within the preset duration; and
performing call restriction on the target abnormal call action based on monitoring the target abnormal call action.
20 . The one or more non-transitory computer-readable storage media of claim 19 , wherein, the identifying of the target abnormal application based on the feature data corresponding to the plurality of running applications comprises:
identifying target applications from among the plurality of running applications based on the running state data corresponding to the plurality of running applications; and
identifying the target abnormal application from among the target applications based on feature data corresponding to the target applications.