Application program running method, device, terminal device and storage medium

By analyzing the operating data of the terminal device and the power consumption contribution ratio of the application, and adjusting the background refresh frequency, the power consumption problem caused by high-frequency background refresh is solved, and the equipment power optimization and stability improvement is achieved.

CN113918337BActive Publication Date: 2024-11-08SHENZHEN PING AN SMART HEALTHCARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111200365.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-14
Publication Date
2024-11-08
Estimated Expiration
2041-10-14

AI Technical Summary

Technical Problem

When the terminal device interacts with data between the application and the background server, high-frequency background refreshes will cause the device to consume quickly, affect battery life, and may cause the device to force the application to close.

Method used

By obtaining the operating data of the terminal device and the power consumption contribution ratio of the application, a power fluctuation curve is generated, and the background refresh frequency is adjusted using the refresh frequency prediction model to optimize the operation process of the application and extend the power usage time of the device.

Benefits of technology

Effectively optimizes the power consumption of the equipment, extends the battery life, and avoids forced shutdown of applications due to low battery, improving the operating stability of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113918337B_ABST
    Figure CN113918337B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an application running method, device, terminal device and storage medium, which are applied to the field of data analysis technology. The method includes: obtaining the first running data of the terminal device and the second running data of each target application, determining the power consumption contribution ratio of each target application to the terminal device in the first time period according to the first running data and the second running data, obtaining the power data in the first time period to generate a power fluctuation curve, when the power fluctuation curve meets the preset fluctuation condition, inputting the power consumption contribution ratio into the refresh frequency prediction model to obtain the first background refresh frequency of each target application, determining the target background refresh frequency according to the first background refresh frequency, and running each target application according to the target background refresh frequency of each target application. By adopting this application, the power of the device can be optimized. The present application involves blockchain technology, such as the target background refresh frequency can be written into the blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data analysis technology, and in particular to an application running method, apparatus, terminal device and storage medium. Background Art

[0002] At present, when a terminal device interacts with the corresponding background server through an application, the device power will be continuously consumed. When the background refresh frequency of data interaction is too high, the device power will be consumed faster, which may affect the battery life of the terminal device. Or if the background refresh frequency is still high when the device power is too low, it may cause the terminal device to directly force the application to close. Therefore, how to combine the background refresh frequency to optimize the application running process and achieve the purpose of optimizing the device power has become an urgent problem to be solved. Summary of the invention

[0003] The embodiments of the present application provide an application running method, apparatus, terminal device and storage medium, which can be combined with the background refresh frequency to optimize the application running process, thereby achieving the purpose of optimizing the power of the device.

[0004] In one aspect, an embodiment of the present application provides a method for running an application program, the method comprising:

[0005] Acquire first operation data of a terminal device within a first time period and second operation data of each target application included in the terminal device within the first time period;

[0006] Determine, according to the first operation data and the second operation data, the proportion of power consumption contributed by each target application to the terminal device during the first time period;

[0007] Acquire power data within the first time period, and generate a power fluctuation curve according to the power data; the power data includes the power at each time point of multiple time points within the first time period;

[0008] When the power fluctuation curve meets the preset fluctuation condition, the power consumption contribution ratio is input into the refresh frequency prediction model to obtain the first background refresh frequency of each target application;

[0009] The target background refresh frequency of each target application is determined according to the first background refresh frequency of each target application, and each target application is run according to the target background refresh frequency of each target application.

[0010] In a possible implementation, determining, according to the first operation data and the second operation data, a proportion of power consumption contribution of each target application to the terminal device during the first time period includes:

[0011] determining a target power consumption parameter according to the first operating data;

[0012] Determining the power consumption of each target application within the first time period according to the target power consumption parameter and the second operation data;

[0013] The proportion of power consumption contributed by each target application to the terminal device during the first time period is determined according to the power consumption of each target application during the first time period.

[0014] In a possible implementation manner, the target power consumption parameter includes a first power consumption parameter and a second power consumption parameter; and determining the target power consumption parameter according to the first operating data includes:

[0015] Determine, according to the first operation data, a first power consumption and a used network traffic value of the terminal device in the first sub-time period; the first sub-time period refers to a time period in the first time period when the data type of the terminal device is a network data type;

[0016] determining the power consumption per unit network traffic according to the first power consumption and the used network traffic value as the first power consumption parameter;

[0017] Determine, according to the first operation data, a second power consumption and a used mobile traffic value of the terminal device in the second sub-time period; the second sub-time period refers to a time period in the first time period when the data type of the terminal device is a mobile data type;

[0018] The power consumption per unit mobile traffic is determined according to the second power consumption and the used mobile traffic value to serve as the second power consumption parameter.

[0019] In a possible implementation manner, determining the power consumption of each target application in the first time period according to the target power consumption parameter and the second operation data includes:

[0020] Determine network traffic usage data and mobile traffic usage data of each target application within the first time period according to the second operation data of each target application;

[0021] Determine a first power consumption of each target application based on the network traffic usage data of each target application and the first power consumption parameter;

[0022] Determine the second power consumption of each target application based on the mobile traffic usage data of each target application and the second power consumption parameter;

[0023] The power consumption of each target application in the first time period is determined respectively according to the first power consumption of each target application and the second power consumption of each target application.

[0024] In a possible implementation, determining the target background refresh frequency of each target application according to the background refresh frequency adapted by each target application includes:

[0025] Acquire a second background refresh frequency of each target application within a second time period;

[0026] Calculating a frequency difference between a first background refresh frequency of each target application and a second background refresh frequency of the target application;

[0027] The target background refresh frequency of each target application is determined based on the frequency difference.

[0028] In a possible implementation, determining the target background refresh frequency of each target application based on the frequency difference includes:

[0029] If the frequency difference is greater than or equal to the frequency difference threshold, determining the first background refresh frequency of each target application as the target background refresh frequency of each target application;

[0030] If the frequency difference is less than the frequency difference threshold, the second background refresh frequency of each target application is determined as the target background refresh frequency of each target application.

[0031] In a possible implementation manner, determining the target background refresh frequency of each target application according to the first background refresh frequency of each target application includes:

[0032] Acquire attribute information of each target application;

[0033] Determining the frequency determination priority of each target application according to the attribute information of each target application;

[0034] Determine the priority of the frequency to obtain a refresh frequency determination order for each target application;

[0035] The target background refresh frequencies of the target applications are determined in sequence according to the refresh frequency determination order of the target applications and according to the first background refresh frequencies of the target applications.

[0036] In one aspect, an embodiment of the present application provides an application program running device, the device comprising:

[0037] An acquisition module, configured to acquire first operation data of a terminal device within a first time period and second operation data of each target application program included in the terminal device within the first time period;

[0038] a determination module, configured to determine a contribution ratio of each target application to power consumption of the terminal device during the first time period according to the first operation data and the second operation data;

[0039] The acquisition module is further used to acquire the power data within the first time period;

[0040] An electric quantity fluctuation curve generating module, configured to generate an electric quantity fluctuation curve according to the electric quantity data; the electric quantity data includes the electric quantity at each time point of a plurality of time points within the first time period;

[0041] A refresh frequency prediction module, configured to input the power consumption contribution ratio into a refresh frequency prediction model to obtain a first background refresh frequency of each target application when the power fluctuation curve meets a preset fluctuation condition;

[0042] The determination module is further used to determine the target background refresh frequency of each target application according to the first background refresh frequency of each target application, and run each target application according to the target background refresh frequency of each target application.

[0043] On the one hand, an embodiment of the present application provides a terminal device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute some or all of the steps in the above method.

[0044] On the one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program includes program instructions, which, when executed by a processor, are used to execute some or all of the steps in the above method.

[0045] In the embodiment of the present application, the first operation data of the terminal device in the first time period and the second operation data of each target application included in the first time period can be obtained, and the power consumption contribution ratio of each target application to the terminal device in the first time period can be determined according to the first operation data and the second operation data, and the power data in the first time period is obtained and a power fluctuation curve is generated. When the power fluctuation curve meets the preset fluctuation condition, the power consumption contribution ratio is input into the refresh frequency prediction model to obtain the first background refresh frequency of each target application, and the target background refresh frequency is determined according to the first background refresh frequency, and each target application is run according to the target background refresh frequency of each target application. By implementing the method proposed in the embodiment of the present application, the first background refresh frequency adapted to the target application can be determined by the power consumption contribution ratio, and then the optimal target background refresh frequency can be determined, and the target application can be adjusted to the target background refresh frequency to run, so that the operation process of the target application can be optimized when it is running, and the terminal device can be put in a better power consumption state through the target background refresh frequency, so as to achieve the optimization of the device power. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 A flowchart of a method for running an application program provided in an embodiment of the present application;

[0048] Figure 2 A flowchart of a method for running an application program provided in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of the structure of an application program running device provided in an embodiment of the present application;

[0050] Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0052] The application running method proposed in the embodiment of the present application is implemented in a terminal device, which can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc. Optionally, it can also be implemented in a server, which can be an independent server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms, but is not limited to this. The present application relates to blockchain technology, and the terminal device can write the data involved, such as the target background refresh frequency of the target application, or the attribute information of the target application, into the blockchain, so that the terminal device can obtain the required information on the blockchain, such as the target background refresh frequency of the target application.

[0053] In some embodiments, the terminal device can execute the application running method according to actual business needs to achieve device power optimization. The technical solution of the present application can be applied to any background refresh frequency determination scenario. For example, the terminal device can obtain the first operation data and the second operation data of the first time period, and determine the target power consumption parameter, and then determine the power consumption contribution ratio of each target application, generate the power data of the first time period to generate a power fluctuation curve, and when the predicted fluctuation conditions are met, predict each target application based on the power consumption contribution ratio to obtain an adapted first background refresh frequency, and then determine the optimal target background refresh frequency. The background refresh frequency of each target application during operation can be adjusted to the corresponding target background refresh frequency, and the background refresh frequency can be adjusted to achieve operation process optimization and device power optimization.

[0054] It is understandable that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, it is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0055] Based on the above description, the present application embodiment proposes a method for running an application program, which can be executed by the terminal device mentioned above. Figure 1 As shown, the process of the application program running method in the embodiment of the present application may include the following:

[0056] S101, acquiring first operation data of a terminal device within a first time period and second operation data of each target application program included in the terminal device within the first time period.

[0057] The target application may refer to an application that has been run in a first time period and has generated second operation data. The first time period may be any time period specified by the user to which the terminal device belongs, such as XX hours:XX minutes-XX hours:XX minutes; or it may be that when the terminal device is monitored to meet the refresh frequency adjustment condition set by the user, the first operation data and the second operation data within the specified time length (such as X hours) before the moment indicated by the monitoring node at this time are obtained as the first operation data and the second operation data in the first time period, and the refresh frequency adjustment condition may be any condition set by the user; illustratively, it may be when the load of the terminal device is detected to be greater than or equal to the load threshold, for example, when the CPU (Central Processing Unit) load of the terminal device is monitored to be greater than or equal to the CPU load threshold, the CPU load threshold may be set by relevant business personnel based on experience.

[0058] In some embodiments, the first operation data of the terminal device in the first time period may include the data type used by the terminal device during operation in the first time period, the corresponding used traffic value when using each data type, and the corresponding power consumption when using each data type; wherein the used data type may include a mobile data type and / or a network data type, and accordingly, when the terminal device is set to a mobile data type, the corresponding used traffic is mobile traffic, and when the terminal device is set to a network data type, the corresponding used traffic is network traffic. Optionally, the first operation data may also include power data of the terminal device in the first time period.

[0059] In some embodiments, the second operation data of each target application in the first time period may include the flow usage data corresponding to each target application when the terminal device uses each data type in the first time period. For example, when the terminal device is set to the mobile data type in the first time period, the flow usage data corresponding to each target application in this stage is the mobile flow usage data, and correspondingly, when the terminal device is set to the network data type in the first time period, the network usage data corresponding to each target application in this stage is the network flow usage data.

[0060] S102: Determine, according to the first operation data and the second operation data, a proportion of power consumption contributed by each target application to the terminal device in a first time period.

[0061] In a possible implementation, the terminal device may determine the power consumption of each target application in the first time period based on the first operation data and the second operation data, and obtain the total power consumption of the terminal device in the first time period, and determine the power consumption contribution ratio of each target application to the terminal device in the first time period based on the total power consumption and the power consumption of each target application. Specifically, the terminal device may determine the power consumption contribution ratio of each target application to the terminal device in the first time period based on the total power consumption and the power consumption of each target application, and the ratio of the power consumption of each target application to the total power consumption may be determined as the power consumption contribution ratio of each target application. Optionally, the first operation data may include the total power consumption of the terminal device in the first time period, that is, the terminal device may obtain the total power consumption in the first time period from the first operation data, or may obtain the total power consumption in the first time period from other related device operation data in the terminal device.

[0062] S103: Acquire power data within a first time period, and generate a power fluctuation curve according to the power data.

[0063] The power data includes the power at each time point in multiple time points within the first time period.

[0064] In some embodiments, the terminal device can generate a power fluctuation curve based on the power at each time point in the power data, and the power fluctuation curve characterizes the change in power within the first time period. Optionally, the terminal device can also obtain device status data within the first time period, and identify the terminal device status within the first time period, such as charging status or uncharging status, for the power fluctuation curve based on the device status data; the device status data includes the device status at each time point in multiple time periods within the first time period. Among them, the first operation data may include the power data and / or device status data of the terminal device within the first time period, that is, the terminal device can obtain the power data and / or device status data from the first operation data, or it can obtain the power data and / or device status data from other related device operation data in the terminal device.

[0065] S104: When the power fluctuation curve meets the preset fluctuation condition, the power consumption contribution ratio is input into the refresh frequency prediction model to obtain the first background refresh frequency of each target application.

[0066] The background refresh frequency may refer to the frequency at which the terminal device interacts with the background server corresponding to the target application when the target application is running. The background refresh frequency is positively correlated with the corresponding generated traffic and the device power consumed, that is, the greater the background refresh frequency, the more corresponding traffic is generated and the higher the device power consumed. Conversely, the smaller the background refresh frequency, the less corresponding traffic is generated and the lower the device power consumed.

[0067] In one possible implementation, if the background refresh frequency of each target application is high, the power consumption of each target application is also high, which may cause abnormal changes in the device power of the terminal device, that is, the preset fluctuation condition can be understood as a curve fluctuation abnormal judgment condition, such as the power fluctuation curve may show a too fast power decline trend, or the power rise trend is too slow during the device charging stage; and it will also have a greater impact on the load of the terminal device, which may cause the terminal device's device power to change unstably, such as the situation where the terminal device is in an uncharged state (or charging state) when the power decreases at the first moment and rises at the second moment, that is, the power fluctuation curve may show an unstable fluctuation trend. Therefore, the preset fluctuation condition can be that the power decline trend is higher than the first threshold, and / or the power rise trend is lower than the second threshold, and / or the power fluctuation curve has abnormal fluctuations (that is, there are both power rise and fall situations in the uncharged state (or charging state)); the first threshold and the second threshold can be set by relevant business personnel or users according to experience. In addition, if the terminal device detects that the power fluctuation curve meets the preset fluctuation conditions, it will re-determine the optimal target background refresh frequency for each target application, and run the target application at this time or the next time it runs the target application, so that the expected state of the device power is in a better consumption state and operating state, and the expected power fluctuation curve of the terminal device is in a more normal fluctuation state, thereby optimizing the device power, battery and load.

[0068] In one possible implementation, the terminal device will re-determine the optimal target background refresh frequency for each target application, that is, the terminal device may input the power consumption contribution ratio into the refresh frequency prediction model to obtain the first background refresh frequency of each target application, and then determine the target background refresh frequency of each target application. Among them, the terminal device inputs the power consumption contribution ratio into the refresh frequency prediction model to obtain the first background refresh frequency of each target application, that is, the power consumption contribution ratio of each target application is input into the preset refresh frequency prediction model (optionally, the actual background refresh frequency of each target application when running in the first time period can also be input), and the first background refresh frequency of each target application is output respectively. The first background refresh frequency can be understood as the background refresh frequency adapted to the terminal device. The refresh frequency prediction model can be obtained by training the refresh frequency prediction model to be trained based on the sample power consumption contribution ratio (which can also include the sample background refresh frequency). The refresh frequency prediction model can be deployed in the terminal device, or the identification information corresponding to the interface of the refresh frequency prediction model can be stored in the terminal device. The terminal device can generate a corresponding call request according to the identification information corresponding to the interface of the refresh frequency prediction model to call the interface of the refresh frequency prediction model, and realize calling the refresh frequency prediction model to predict the power consumption contribution ratio, thereby obtaining the first background refresh frequency.

[0069] S105 . Determine a target background refresh frequency of each target application according to the first background refresh frequency of each target application, and run each target application according to the target background refresh frequency of each target application.

[0070] In some embodiments, the terminal device may run each target application according to the first background refresh frequency predicted by each target application when it is detected that each target application is running. Alternatively, the terminal device may first determine the target background refresh frequency of each target application according to the first background refresh frequency of each target application, and run each target application according to the target background refresh frequency of each target application when it is detected that each target application is running, that is, when it is detected that each target application is running, the actual background refresh frequency of each target application at this time (that is, the actual background refresh frequency when running in the first time period) is obtained, and according to the target background refresh frequency of each target application, the actual background refresh frequency is adjusted to the target background refresh frequency, so as to run each target application according to the target background refresh frequency. In this way, the battery loss of the terminal device can be reduced and the power consumption rate of the device can be reduced, thereby optimizing the power of the device.

[0071] In one possible implementation, the terminal device determines the target background refresh frequency of each target application based on the first background refresh frequency of each target application by obtaining the second background refresh frequency of each target application in the second time period of the terminal device, calculating the frequency difference between the first background refresh frequency of each target application and the second background refresh frequency of the target application, and determining the target background refresh frequency of each target application based on the frequency difference. The second time period can be any time period, such as the first time period, or a specified time period after the first time period, that is, the second time period can be the same as or different from the first time period, and the second background refresh frequency of each target application in the second time period can be understood as the actual background refresh frequency of each target application at runtime.

[0072] In some embodiments, the terminal device determines the target background refresh frequency of each target application based on the frequency difference value. Specifically, if the frequency difference value is greater than or equal to the frequency difference threshold, the first background refresh frequency of each target application is determined as the target background refresh frequency of each target application. If the frequency difference value is less than the frequency difference threshold, the second background refresh frequency of each target application is determined as the target background refresh frequency of each target application. The frequency difference threshold value can be set by relevant business personnel or users according to experience.

[0073] In an embodiment of the present application, the terminal device can obtain the first operation data of the terminal device in a first time period and the second operation data of each target application included in the terminal device in the first time period, determine the power consumption contribution ratio of each target application to the terminal device in the first time period according to the first operation data and the second operation data, obtain the power data in the first time period, and generate a power fluctuation curve according to the power data. When the power fluctuation curve meets the preset fluctuation condition, the power consumption contribution ratio is input into the refresh frequency prediction model to obtain the first background refresh frequency of each target application, determine the target background refresh frequency of each target application according to the first background refresh frequency of each target application, and run each target application according to the target background refresh frequency of each target application. By implementing the method proposed in the embodiment of the present application, the first background refresh frequency adapted by the target application can be determined by the power consumption contribution ratio, and then the optimal target background refresh frequency can be determined, and the target application can be adjusted to the target background refresh frequency to run, so that the operation process of the target application can be optimized when it is running, and the terminal device can be put in a better power consumption state through the target background refresh frequency, so as to achieve the optimization of the device power.

[0074] See also Figure 2 , Figure 2The present invention provides a flowchart of a method for running an application program, which can be executed by the terminal device mentioned above. Figure 2 As shown, the process of the application program running method in the embodiment of the present application may include the following:

[0075] S201, obtaining first operation data of a terminal device in a first time period and second operation data of each target application included in the terminal device in the first time period. The specific implementation of step S201 can refer to the relevant description of step S101, which will not be repeated here.

[0076] S202: Determine a target power consumption parameter according to the first operating data.

[0077] The target power consumption parameter can be used to determine the power consumption of each target application. Since the first operation data may include the mobile data type and the network data type used by the terminal device during operation, the target power consumption parameter may include a first power consumption parameter and a second power consumption parameter, wherein the first power consumption parameter may be a power consumption parameter corresponding to the network data type, and the second power consumption parameter may be a power consumption parameter corresponding to the mobile data type.

[0078] Therefore, in one possible implementation, the terminal device determines the target power consumption parameter based on the first operating data, specifically by determining the first power consumption and the used network traffic value of the terminal device in a first sub-time period according to the first operating data, and determining the power consumption per unit of network traffic according to the first power consumption and the used network traffic value as the first power consumption parameter, and the first sub-time period may refer to a time period in which the data type of the terminal device is a network data type in the first time period; and determining the second power consumption and the used mobile traffic value of the terminal device in a second sub-time period according to the first operating data, and determining the power consumption per unit of mobile traffic according to the second power consumption and the used mobile traffic value as the second power consumption parameter, and the second sub-time period refers to a time period in which the data type of the terminal device is a mobile data type in the first time period.

[0079] In some embodiments, the terminal device determines the power consumption per unit of network traffic based on the first power consumption and the used network traffic value, and specifically may use the ratio of the first power consumption to the used network traffic value as the power consumption per unit of network traffic; and the terminal device determines the power consumption per unit of mobile traffic based on the second power consumption and the used mobile traffic value, and specifically may use the ratio of the second power consumption to the used mobile traffic value as the power consumption per unit of mobile traffic.

[0080] S203: Determine the power consumption of each target application program in the first time period according to the target power consumption parameter and the second operation data.

[0081] In some embodiments, the terminal device may determine the power consumption of each target application in the first time period according to the first power consumption parameter and the second power consumption parameter in the target power consumption parameter and the second operation data of each target application.

[0082] Therefore, in a possible implementation, the terminal device determines the power consumption of each target application in the first time period according to the target power consumption parameter and the second operation data, specifically, the network traffic usage data and mobile traffic usage data of each target application in the first time period are determined according to the second operation data of each target application, the first power consumption of each target application is determined based on the network traffic usage data and the first power consumption parameter of each target application, and the second power consumption of each target application is determined based on the mobile traffic usage data and the second power consumption parameter of each target application, and the power consumption of each target application in the first time period is determined according to the first power consumption and the second power consumption of each target application. Among them, the first power consumption can represent the power consumed when data interaction is performed through the target application and using network data in the first time period; the second power consumption can represent the power consumed when data interaction is performed through the target application and using mobile data in the first time period; the power consumption of each target application in the first time period can represent the total power consumed when data interaction is performed through the target application in the first time period.

[0083] In some embodiments, the terminal device determines the first power consumption of each target application based on the network traffic usage data and the first power consumption parameter of each target application by taking the product of the network traffic usage data of each target application and the first power consumption parameter as the first power consumption of each target application. And the terminal device determines the second power consumption of each target application based on the mobile traffic usage data and the second power consumption parameter of each target application by taking the product of the mobile traffic usage data of each target application and the second power consumption parameter as the second power consumption of each target application. The terminal device determines the power consumption of each target application in the first time period based on the first power consumption and the second power consumption of each target application by taking the sum of the first power consumption and the second power consumption of each target application as the power consumption of each target application in the first time period.

[0084] S204: Determine a proportion of power consumption contributed by each target application to the terminal device in the first time period according to the power consumption of each target application in the first time period.

[0085] In some embodiments, the terminal device may obtain the total power consumption in the first time period, and determine the ratio of the power consumption of each target application in the first time period to the total power consumption in the first time period as the power consumption contribution ratio of each target application to the terminal device in the first time period. Optionally, the power consumption contribution ratio of each target application may also be integrated with the actual running time of each target application in the first time period (that is, the actual power consumption time of the target application in the first time period), and / or the first time period, and / or the ratio of the actual running time to the first time period, and / or the power consumption of each target application in the first time period, and / or the total power consumption in the first time period, etc.

[0086] S205: Acquire power data within a first time period, and generate a power fluctuation curve according to the power data.

[0087] S206: When the power fluctuation curve meets the preset fluctuation condition, the power consumption contribution ratio is input into the refresh frequency prediction model to obtain the first background refresh frequency of each target application. The specific implementation of steps S205-S206 can refer to the relevant description of steps S103-S104, which will not be repeated here.

[0088] S207: Determine a target background refresh frequency of each target application according to the first background refresh frequency of each target application, and run each target application according to the target background refresh frequency of each target application.

[0089] In some embodiments, each target application may have a frequency determination priority, and the frequency determination priority may characterize the order of determining the target background refresh frequency of each target application. For example, when obtaining the second background refresh frequency, when the first background refresh frequency indicates a lower refresh frequency compared to the second background refresh frequency (actual background refresh frequency), the target background refresh frequency is determined starting from the target application with a smaller frequency determination priority; when the first background refresh frequency indicates an increased refresh frequency compared to the second background refresh frequency (actual background refresh frequency), the target background refresh frequency is determined starting from the target application with a larger frequency determination priority. The frequency determination priority may also indicate the importance of each target application. The greater the importance, the greater the priority, and the greater the data interaction requirements of the user to the target application. Since the greater the background refresh frequency, the faster the data interaction, on the contrary, the smaller the background refresh frequency, the slower the data interaction, so when the refresh frequency is increased, it is determined starting from the target application with a larger importance, and when the refresh frequency is reduced, it is determined starting from the target application with a smaller importance. The frequency determination priority of the target application may be specified by the relevant business personnel or the user to whom it belongs, or it may be determined by the terminal device according to the attribute information of each target application. The determination according to the attribute information of each target application is taken as an example later.

[0090] In a possible implementation, the terminal device determines the target background refresh frequency of each target application according to the first background refresh frequency of each target application, which can be specifically obtained by obtaining the attribute information of each target application, determining the frequency determination priority of each target application according to the attribute information of each target application, obtaining the refresh frequency determination order of each target application according to the frequency determination priority, determining the refresh according to the refresh frequency of each application, and determining the target background refresh frequency of each target application once according to the first background refresh frequency of each application. Wherein, the attribute information may include the type of target application, and / or the data interaction type with the background server, and / or the data interaction mode with the background server, the type of the target application may include the system application type, the social application type, the game application type, etc., the data interaction type may include the upload data type, the reception data type, the mixed data type (including the upload data type and the reception data type at the same time), etc., and the data interaction mode may include automatic real-time data interaction, data interaction after receiving instructions, timed data interaction, etc. A correspondence table of attribute information and frequency determination priority can be pre-constructed, the terminal device can obtain the attribute information of each target application, and query the frequency determination priority of each target application from the correspondence table according to the attribute information of each target application.

[0091] In one possible implementation, the terminal device determines the refresh frequency order of each target application based on the frequency determination priority, which can be specifically achieved by obtaining the second background refresh frequency of each target application (which can be understood as the actual background refresh frequency during runtime), and determining the refresh frequency order of each target application based on the first background refresh frequency and the second background refresh frequency of each target application and the frequency determination priority.

[0092] Specifically, the terminal device obtains a refresh frequency determination order for each target application based on the first background refresh frequency and the second background refresh frequency of each target application and the frequency determination priority. Specifically, (1) if the first background refresh frequency of each target application is greater than the second background refresh frequency, it indicates that the terminal device is instructed to increase the background refresh frequency of each target application during operation. Therefore, each target application is sorted in descending order according to the frequency determination priority of each target application to obtain the above refresh frequency determination order; or (2) if the first background refresh frequency of each target application is less than the second background refresh frequency, it indicates that the terminal device is instructed to reduce the background refresh frequency of each target application during operation. Therefore, each target application is sorted in ascending order according to the frequency determination priority of each target application to obtain the above refresh frequency determination order. Refresh frequency determination order; or, (3) if the first background refresh frequency of the first application set in each target application is greater than the second background refresh frequency, it indicates that the terminal device is instructed to increase the background refresh frequency of each first application in the first application set when it is running, so each first application is sorted in descending order according to the frequency determination priority of each first application to obtain a first determination order, and if the first background refresh frequency of the second application set in each target application is less than the second background refresh frequency, it indicates that the terminal device is instructed to reduce the background refresh frequency of each second application in the second application set when it is running, so each second application is sorted in descending order according to the frequency determination priority of each second application to obtain a second determination order, and the first determination order and the second determination order are used as the above-mentioned refresh frequency determination order. In addition, if there is a target application whose first background refresh frequency is equal to the second background refresh frequency, it indicates that the background refresh frequency of the target application when it is running is not adjusted, that is, the target background refresh frequency is the first background refresh frequency.

[0093] In one possible implementation, the terminal device determines the target background refresh frequency of each target application in order according to the refresh frequency of each target application and determines the target background refresh frequency of each target application in sequence according to the first background refresh frequency of each application. Specifically, the first background refresh frequency and the second background refresh frequency of each target application are input into a difference prediction model to obtain the expected refresh frequency difference and for all target applications. The expected refresh frequency difference can indicate that the optimal operating state of the device can be achieved after adjusting the background refresh frequency by the difference. The difference prediction model can be obtained by training the difference prediction model to be trained based on the sample first background refresh frequency, the sample second background refresh frequency and the sample refresh frequency difference.

[0094] Therefore, in some embodiments, based on the above (1) and (2), according to the refresh frequency determination order of each target application, the first background refresh frequency of the target application is determined as the target background refresh frequency in turn, and the sum of the frequency differences between the first background refresh frequency of at least one target application with a determined target background refresh frequency and the corresponding second background refresh frequency is calculated to obtain the sum of the actual refresh frequency differences, until the sum of the actual refresh frequency differences is greater than or equal to the expected refresh frequency difference for the first time. If there are still target applications whose target background refresh frequencies have not been determined, the second background refresh frequency of the target application is determined as the target background refresh frequency. Based on the above (3), according to the first determination order of the first application set and the second determination order of the second application set, the first background refresh frequency of the first application is determined as The target background refresh frequency and the second background refresh frequency of the second application are determined as the target background refresh frequency, and the sum of the frequency differences between the first background refresh frequency of at least one first application that has determined the target background refresh frequency and the corresponding second background refresh frequency is calculated, and the sum of the frequency differences between the first background refresh frequency of at least one second application that has determined the target background refresh frequency and the corresponding second background refresh frequency is calculated, and the sum of the above-mentioned two frequency differences is used as the sum of the actual refresh frequency differences, and the above-mentioned two frequency difference sums offset each other until the sum of the actual refresh frequency differences is greater than or equal to the expected refresh frequency difference for the first time. If there are still first applications and / or second applications whose target background refresh frequencies have not been determined, the second background refresh frequency of the first application and / or the second application is determined as the target background refresh frequency.

[0095] For example, based on the above (1) and (2), assume that the order of determining the refresh frequency is program 3, program 4, program 5, program 2, and program 1, and determine the first background refresh frequency of program 3 as the target background refresh frequency in turn, and calculate the frequency difference between the first background refresh frequency of program 3 and the corresponding second background refresh frequency at this time. If the frequency difference is less than the expected refresh frequency difference, determine the first background refresh frequency of program 4 as the target background refresh frequency, and calculate the sum of the frequency differences between the first background refresh frequencies of programs 3 and 4 and the corresponding second background refresh frequencies at this time. If the sum of the frequency differences is less than the expected refresh frequency difference, determine the first background refresh frequency of program 5 as the target background refresh frequency, and calculate the sum of the frequency differences between the first background refresh frequencies of programs 3, 4, and 5 and the corresponding second background refresh frequencies at this time. If the sum of the frequency differences is greater than or equal to the expected refresh frequency difference, determine the second background refresh frequencies of programs 2 and 1 as the target background refresh frequency.

[0096] For another example, based on the above (3), let the first determination order be program 3, program 4, and program 5, and the second determination order be program 2, program 1, and program 6. The first background refresh frequency of program 3 is determined as the target background refresh frequency in turn, and the frequency difference between the first background refresh frequency of program 3 and the corresponding second background refresh frequency is calculated at this time. The first background refresh frequency of program 2 is determined as the target background refresh frequency, and the frequency difference between the first background refresh frequency of program 2 and the corresponding second background refresh frequency is calculated at this time. If the sum of the two frequency differences is less than the expected refresh frequency difference, the first background refresh frequency of program 4 is determined as the target background refresh frequency, and the sum of the frequency differences between the first background refresh frequencies of program 3 and program 4 and the corresponding second background refresh frequencies is calculated at this time. The first background refresh frequency of program 1 is determined as the target background refresh frequency, and the sum of the frequency differences between the first background refresh frequencies of program 2 and program 1 and the corresponding second background refresh frequencies is calculated at this time. If the sum of the two frequency differences is greater than or equal to the expected refresh frequency difference, the second background refresh frequencies of program 5 and program 6 are determined as the target background refresh frequency.

[0097] In an embodiment of the present application, the terminal device can obtain first operating data of the terminal device within a first time period and second operating data of each target application included in the terminal device within the first time period, determine a first power consumption parameter and a second power consumption parameter according to the first operating data, determine the first power consumption of each target application according to the second operating data and the first power consumption parameter of each target application, determine the second power consumption of each target application according to the second operating data and the second power consumption parameter of each target application, determine the power consumption contribution ratio of each target application to the terminal device within the first time period according to the first power consumption and the second power consumption, obtain power data within the first time period, and generate a power fluctuation curve according to the power data, when the power fluctuation curve meets the preset fluctuation condition, input the power consumption contribution ratio into the refresh frequency prediction model, obtain the first background refresh frequency of each target application, determine the target background refresh frequency of each target application according to the first background refresh frequency of each target application, and run each target application according to the target background refresh frequency of each target application. By implementing the method proposed in the embodiment of the present application, the first background refresh frequency adapted to the target application can be determined by the power consumption contribution ratio, and then the optimal target background refresh frequency can be determined, and the target application can be adjusted to run at the target background refresh frequency. When the target application is running, its running process can be optimized, and the target background refresh frequency can be used to put the terminal device in a better power consumption state, thereby optimizing the power of the device.

[0098] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of an application running device provided by this application. It should be noted that: Figure 3 The application program running device shown is used to execute the application Figure 1 and Figure 2 For the convenience of explanation, only the part related to the embodiment of the present application is shown, and the specific technical details are not disclosed. Figure 1 and Figure 2 The application program running device 300 may include: an acquisition module 301, a determination module 302, a power fluctuation curve generation module 303, and a refresh frequency prediction module 304. Among them:

[0099] An acquisition module 301 is used to acquire first operation data of a terminal device in a first time period and second operation data of each target application included in the terminal device in the first time period;

[0100] A determination module 302, configured to determine a contribution ratio of each target application to power consumption of the terminal device during the first time period according to the first operation data and the second operation data;

[0101] The acquisition module 301 is further used to acquire the power data within the first time period;

[0102] The power fluctuation curve generating module 303 is used to generate a power fluctuation curve according to the power data; the power data includes the power at each time point of multiple time points in the first time period;

[0103] A refresh frequency prediction module 304 is used to input the power consumption contribution ratio into a refresh frequency prediction model to obtain the first background refresh frequency of each target application when the power fluctuation curve meets a preset fluctuation condition;

[0104] The determination module 302 is further configured to determine a target background refresh frequency of each target application according to the first background refresh frequency of each target application, and to run each target application according to the target background refresh frequency of each target application.

[0105] In a possible implementation manner, when the determination module 302 is used to determine the power consumption contribution ratio of each target application to the terminal device in the first time period according to the first operation data and the second operation data, it is specifically used to:

[0106] determining a target power consumption parameter according to the first operating data;

[0107] determining the power consumption of each target application within the first time period according to the target power consumption parameter and the second operation data;

[0108] The proportion of power consumption contributed by each target application to the terminal device during the first time period is determined according to the power consumption of each target application during the first time period.

[0109] In a possible implementation manner, the target power consumption parameter includes a first power consumption parameter and a second power consumption parameter; when the determination module 302 is used to determine the target power consumption parameter according to the first operation data, it is specifically used to:

[0110] Determine, according to the first operation data, a first power consumption and a used network traffic value of the terminal device in the first sub-time period; the first sub-time period refers to a time period in the first time period when the data type of the terminal device is a network data type;

[0111] determining the power consumption per unit network traffic according to the first power consumption and the used network traffic value as the first power consumption parameter;

[0112] Determine, according to the first operation data, a second power consumption and a used mobile traffic value of the terminal device in the second sub-time period; the second sub-time period refers to a time period in the first time period when the data type of the terminal device is a mobile data type;

[0113] The power consumption per unit mobile traffic is determined according to the second power consumption and the used mobile traffic value to serve as the second power consumption parameter.

[0114] In a possible implementation manner, when the determination module 302 is used to determine the power consumption of each target application in the first time period according to the target power consumption parameter and the second operation data, it is specifically used to:

[0115] Determine network traffic usage data and mobile traffic usage data of each target application within the first time period according to the second operation data of each target application;

[0116] Determine a first power consumption of each target application based on the network traffic usage data of each target application and the first power consumption parameter;

[0117] Determine the second power consumption of each target application based on the mobile traffic usage data of each target application and the second power consumption parameter;

[0118] The power consumption of each target application in the first time period is determined respectively according to the first power consumption of each target application and the second power consumption of each target application.

[0119] In a possible implementation manner, when the determination module 302 is used to determine the target background refresh frequency of each target application according to the background refresh frequency adapted by each target application, it is specifically used to:

[0120] Acquire a second background refresh frequency of each target application within a second time period;

[0121] Calculating a frequency difference between a first background refresh frequency of each target application and a second background refresh frequency of the target application;

[0122] The target background refresh frequency of each target application is determined based on the frequency difference.

[0123] In a possible implementation manner, when the determination module 302 is used to determine the target background refresh frequency of each target application based on the frequency difference, it is specifically used to:

[0124] If the frequency difference is greater than or equal to the frequency difference threshold, determining the first background refresh frequency of each target application as the target background refresh frequency of each target application;

[0125] If the frequency difference is less than the frequency difference threshold, the second background refresh frequency of each target application is determined as the target background refresh frequency of each target application.

[0126] In a possible implementation manner, when the determination module 302 is used to determine the target background refresh frequency of each target application according to the first background refresh frequency of each target application, it is specifically used to:

[0127] Acquire attribute information of each target application;

[0128] Determining the frequency determination priority of each target application according to the attribute information of each target application;

[0129] Determine the priority of the frequency to obtain a refresh frequency determination order for each target application;

[0130] The target background refresh frequencies of the target applications are determined in sequence according to the refresh frequency determination order of the target applications and according to the first background refresh frequencies of the target applications.

[0131] In the embodiment of the present application, the acquisition module acquires the first operation data of the terminal device in the first time period and the second operation data of each target application included in the terminal device in the first time period; the determination module determines the power consumption contribution ratio of each target application to the terminal device in the first time period according to the first operation data and the second operation data; the acquisition module acquires the power data in the first time period; the power fluctuation curve generation module generates the power fluctuation curve according to the power data; the refresh frequency prediction module inputs the power consumption contribution ratio into the refresh frequency prediction model when the power fluctuation curve meets the preset fluctuation condition, and obtains the first background refresh frequency of each target application; the determination module determines the target background refresh frequency of each target application according to the first background refresh frequency of each target application, and runs each target application according to the target background refresh frequency of each target application. By implementing the device proposed in the embodiment of the present application, the first background refresh frequency adapted to the target application can be determined by the power consumption contribution ratio, and then the optimal target background refresh frequency is determined, and the target application is adjusted to the target background refresh frequency to run, which can optimize the operation process of the target application when it is running, and the terminal device can be put in a better power consumption state through the target background refresh frequency, thereby optimizing the power of the device.

[0132] Each functional module in each embodiment of the present application can be integrated into one module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules, which is not limited in the present application.

[0133] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 4 As shown, the terminal device 400 includes: at least one processor 401 and a memory 402. Optionally, the terminal device may further include a network interface. The processor 401, the memory 402 and the network interface may exchange data, the network interface is controlled by the processor 401 to send and receive messages, the memory 402 is used to store a computer program, the computer program includes program instructions, and the processor 401 is used to execute the program instructions stored in the memory 402. The processor 401 is configured to call the program instructions to execute the above method.

[0134] The memory 402 may include a volatile memory, such as a random-access memory (RAM); the memory 402 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the memory 402 may also include a combination of the above-mentioned types of memory.

[0135] The processor 401 may be a central processing unit (CPU). In one embodiment, the processor 401 may also be a graphics processing unit (GPU). The processor 401 may also be a combination of a CPU and a GPU.

[0136] In a possible implementation, the memory 402 is used to store program instructions, and the processor 401 may call the program instructions to perform the following steps:

[0137] Acquire first operation data of a terminal device within a first time period and second operation data of each target application included in the terminal device within the first time period;

[0138] Determine, according to the first operation data and the second operation data, a proportion of power consumption contributed by each target application to the terminal device during the first time period;

[0139] Acquire power data within the first time period, and generate a power fluctuation curve according to the power data; the power data includes the power at each time point of multiple time points within the first time period;

[0140] When the power fluctuation curve meets the preset fluctuation condition, the power consumption contribution ratio is input into the refresh frequency prediction model to obtain the first background refresh frequency of each target application;

[0141] The target background refresh frequency of each target application is determined according to the first background refresh frequency of each target application, and each target application is run according to the target background refresh frequency of each target application.

[0142] In a possible implementation manner, when the processor 401 is used to determine the proportion of power consumption contribution of each target application to the terminal device in the first time period according to the first operation data and the second operation data, it is specifically used to:

[0143] determining a target power consumption parameter according to the first operating data;

[0144] determining the power consumption of each target application within the first time period according to the target power consumption parameter and the second operation data;

[0145] The proportion of power consumption contributed by each target application to the terminal device during the first time period is determined according to the power consumption of each target application during the first time period.

[0146] In a possible implementation manner, the target power consumption parameter includes a first power consumption parameter and a second power consumption parameter; when the processor 401 is used to determine the target power consumption parameter according to the first operating data, it is specifically used to:

[0147] Determine, according to the first operation data, a first power consumption and a used network traffic value of the terminal device in the first sub-time period; the first sub-time period refers to a time period in the first time period when the data type of the terminal device is a network data type;

[0148] determining the power consumption per unit network traffic according to the first power consumption and the used network traffic value as the first power consumption parameter;

[0149] Determine, according to the first operation data, a second power consumption and a used mobile traffic value of the terminal device in the second sub-time period; the second sub-time period refers to a time period in the first time period when the data type of the terminal device is a mobile data type;

[0150] The power consumption per unit mobile traffic is determined according to the second power consumption and the used mobile traffic value to serve as the second power consumption parameter.

[0151] In a possible implementation manner, when the processor 401 is used to determine the power consumption of each target application in the first time period according to the target power consumption parameter and the second operation data, it is specifically used to:

[0152] Determine network traffic usage data and mobile traffic usage data of each target application within the first time period according to the second operation data of each target application;

[0153] Determine a first power consumption of each target application based on the network traffic usage data of each target application and the first power consumption parameter;

[0154] Determine the second power consumption of each target application based on the mobile traffic usage data of each target application and the second power consumption parameter;

[0155] The power consumption of each target application in the first time period is determined respectively according to the first power consumption of each target application and the second power consumption of each target application.

[0156] In a possible implementation manner, when the processor 401 is used to determine the target background refresh frequency of each target application according to the background refresh frequency adapted by each target application, it is specifically used to:

[0157] Acquire a second background refresh frequency of each target application within a second time period;

[0158] Calculating a frequency difference between a first background refresh frequency of each target application and a second background refresh frequency of the target application;

[0159] The target background refresh frequency of each target application is determined based on the frequency difference.

[0160] In a possible implementation manner, when the processor 401 is used to determine the target background refresh frequency of each target application based on the frequency difference, it is specifically used to:

[0161] If the frequency difference is greater than or equal to the frequency difference threshold, determining the first background refresh frequency of each target application as the target background refresh frequency of each target application;

[0162] If the frequency difference is less than the frequency difference threshold, the second background refresh frequency of each target application is determined as the target background refresh frequency of each target application.

[0163] In a possible implementation manner, when the processor 401 is used to determine the target background refresh frequency of each target application according to the first background refresh frequency of each target application, it is specifically used to:

[0164] Acquire attribute information of each target application;

[0165] Determining the frequency determination priority of each target application according to the attribute information of each target application;

[0166] Determine the priority of the frequency to obtain a refresh frequency determination order for each target application;

[0167] The target background refresh frequencies of the target applications are determined in sequence according to the refresh frequency determination order of the target applications and according to the first background refresh frequencies of the target applications.

[0168] In a specific implementation, the device, processor 401, memory 402, etc. described in the embodiments of the present application can execute the implementation method described in the above method embodiments, and can also execute the implementation method described in the embodiments of the present application, which will not be repeated here.

[0169] A computer (readable) storage medium is also provided in an embodiment of the present application, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor can execute some or all of the steps performed in the above method embodiment. Optionally, the computer storage medium may be volatile or non-volatile. The computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of blockchain nodes, etc.

[0170] Among them, the blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0171] An embodiment of the present application provides a computer program product, which may include a computer program. When the computer program is executed by a processor, it can implement some or all of the steps in the above method, which are not described in detail here.

[0172] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0173] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer storage medium, which can be a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0174] The above disclosure is only part of the embodiments of the present application, which certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiments and equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for running an application, characterized in that: The method comprises: Acquire first operation data of a terminal device within a first time period and second operation data of each target application included in the terminal device within the first time period; determining a target power consumption parameter according to the first operating data; determining the power consumption of each target application within the first time period according to the target power consumption parameter and the second operation data; Determining a proportion of power consumption contributed by each target application to the terminal device during the first time period according to the power consumption of each target application during the first time period; Acquire power data within the first time period, and generate a power fluctuation curve according to the power data; the power data includes the power at each time point of multiple time points within the first time period; When the power fluctuation curve meets the preset fluctuation condition, the power consumption contribution ratio is input into the refresh frequency prediction model to obtain the first background refresh frequency of each target application; Determine the target background refresh frequency of each target application according to the first background refresh frequency of each target application, and run each target application according to the target background refresh frequency of each target application; wherein the target background refresh frequency is determined as follows: Acquire the attribute information of each target application; determine the frequency determination priority of each target application according to the attribute information of each target application, and obtain the refresh frequency determination order of each target application according to the frequency determination priority; determine the target background refresh frequency of each target application in sequence according to the refresh frequency determination order of each target application and according to the first background refresh frequency of each target application; or, Obtain a second background refresh frequency of each target application in a second time period; calculate a frequency difference between a first background refresh frequency of each target application and a second background refresh frequency of the target application; and determine a target background refresh frequency of each target application based on the frequency difference.

2. The method according to claim 1, characterized in that The target power consumption parameter includes a first power consumption parameter and a second power consumption parameter; and determining the target power consumption parameter according to the first operating data includes: Determine, according to the first operation data, a first power consumption and a used network traffic value of the terminal device in a first sub-time period; the first sub-time period refers to a time period in the first time period when the data type of the terminal device is a network data type; determining the power consumption per unit network traffic according to the first power consumption and the used network traffic value as the first power consumption parameter; Determine, according to the first operation data, a second power consumption and a used mobile traffic value of the terminal device in a second sub-time period; the second sub-time period refers to a time period in the first time period when the data type of the terminal device is a mobile data type; The power consumption per unit mobile traffic is determined according to the second power consumption and the used mobile traffic value to serve as the second power consumption parameter.

3. The method according to claim 2, characterized in that The determining the power consumption of each target application within the first time period according to the target power consumption parameter and the second operation data includes: Determine network traffic usage data and mobile traffic usage data of each target application within the first time period according to the second operation data of each target application; Determine a first power consumption of each target application based on the network traffic usage data of each target application and the first power consumption parameter; Determine the second power consumption of each target application based on the mobile traffic usage data of each target application and the second power consumption parameter; The power consumption of each target application in the first time period is determined respectively according to the first power consumption of each target application and the second power consumption of each target application.

4. The method according to claim 1, characterized in that The determining the target background refresh frequency of each target application based on the frequency difference includes: If the frequency difference is greater than or equal to the frequency difference threshold, determining the first background refresh frequency of each target application as the target background refresh frequency of each target application; If the frequency difference is less than the frequency difference threshold, the second background refresh frequency of each target application is determined as the target background refresh frequency of each target application.

5. An application program running device, characterized in that: The device comprises: An acquisition module, configured to acquire first operation data of a terminal device within a first time period and second operation data of each target application program included in the terminal device within the first time period; a determination module, configured to determine a target power consumption parameter according to the first operation data; determine the power consumption of each target application in the first time period according to the target power consumption parameter and the second operation data; and determine the power consumption contribution ratio of each target application to the terminal device in the first time period according to the power consumption of each target application in the first time period; The acquisition module is further used to acquire the power data within the first time period; An electric quantity fluctuation curve generating module, configured to generate an electric quantity fluctuation curve according to the electric quantity data; the electric quantity data includes the electric quantity at each time point of a plurality of time points within the first time period; A refresh frequency prediction module, configured to input the power consumption contribution ratio into a refresh frequency prediction model to obtain a first background refresh frequency of each target application when the power fluctuation curve meets a preset fluctuation condition; The determination module is further used to determine the target background refresh frequency of each target application according to the first background refresh frequency of each target application, and run each target application according to the target background refresh frequency of each target application; wherein the target background refresh frequency is determined as follows: Acquire the attribute information of each target application; determine the frequency determination priority of each target application according to the attribute information of each target application, and obtain the refresh frequency determination order of each target application according to the frequency determination priority; determine the target background refresh frequency of each target application in sequence according to the refresh frequency determination order of each target application and according to the first background refresh frequency of each target application; or, Obtain a second background refresh frequency of each target application in a second time period; calculate a frequency difference between a first background refresh frequency of each target application and a second background refresh frequency of the target application; and determine a target background refresh frequency of each target application based on the frequency difference.

6. A terminal device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is enabled to perform the method according to any one of claims 1 to 4.