Electronic equipment control method and device, electronic equipment and storage medium

By calculating power consumption and adjusting the CPU frequency based on the application's load scenario and temperature threshold, the problem of temperature control for different applications in existing technologies is solved, achieving precise temperature control and performance maintenance.

CN120891900APending Publication Date: 2025-11-04VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511013892.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Existing technologies cannot personalize the temperature control of electronic devices according to the load scenarios and computing power requirements of different applications. This results in wasted power consumption for light-load applications and insufficient computing power for heavy-load applications, affecting user experience and device performance.

Method used

Based on the load scenarios and temperature thresholds of the applications running in the electronic device, the target temperature threshold for each application is determined, its power consumption under different load scenarios is calculated, and the frequency and runtime of the central processing unit are adjusted to achieve precise temperature control and avoid performance impact.

Benefits of technology

This allows for the regulation of electronic device temperature without impacting performance, thereby improving user experience and extending device lifespan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120891900A_ABST
    Figure CN120891900A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic equipment control method and device, electronic equipment and a storage medium, and belongs to the technical field of electronic equipment. The method comprises the steps of determining a target temperature threshold value of each application program in a corresponding load scene according to load scenes corresponding to N application programs running in the electronic equipment and temperature threshold values in different load scenes; for each application program, determining first power consumption required by the application program for running the first running time in the corresponding load scene according to the corresponding target temperature threshold value; determining second power consumption corresponding to the heat margin of the electronic equipment according to the first power consumption corresponding to each application program; according to the second power consumption, the first power consumption of each application program, a first frequency point applied by each application program and first running time of each application program under the first frequency point, determining a target frequency point of the central processing unit and target running time under the target frequency point; and controlling the electronic equipment to operate according to the target frequency point and the target operation time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic equipment technology, and specifically relates to a control method, device, electronic equipment, and storage medium for an electronic device. Background Technology

[0002] As the number and functions of applications in electronic devices increase, the devices will generate heat during application operation. If the temperature of the electronic device is too high, it will affect the user experience and the lifespan of the electronic device itself.

[0003] Currently, when an electronic device is detected to be overheating, the operating strategy of the hardware resources of the applications running on the device is usually changed. Specifically, based on temperature control parameters, the operating frequency of each application on the central processing unit (CPU) is uniformly reduced, thereby regulating the temperature of the electronic device.

[0004] However, different applications or application loads vary. The temperature control strategies described above result in wasted power for lightly loaded applications and insufficient computing power for heavily loaded functional modules, leading to frame drops and stuttering. Therefore, existing temperature control solutions affect the performance of electronic devices. Summary of the Invention

[0005] The purpose of this application is to provide a control method, device, electronic device, and storage medium for an electronic device that can achieve temperature regulation of the electronic device while avoiding any impact on its performance.

[0006] In a first aspect, embodiments of this application provide a control method for an electronic device, the method comprising:

[0007] Based on the load scenarios corresponding to the N applications running in the electronic device, and the temperature thresholds under different load scenarios, determine the target temperature threshold for each application under the corresponding load scenario, where N is a positive integer;

[0008] For each application, determine the first power consumption required for the application to run for a first time under the load scenario corresponding to the application, according to the target temperature threshold corresponding to the application; the first running time is the running time requested by the application.

[0009] Based on the first power consumption corresponding to each application, determine the second power consumption corresponding to the thermal margin of the electronic device;

[0010] Based on the second power consumption, the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the corresponding first frequency point, the target frequency point of the central processing unit of the electronic device and the target running time at the target frequency point are determined.

[0011] The electronic device is controlled to operate based on the target frequency and the target running time.

[0012] Secondly, embodiments of this application provide a control device for an electronic device, the device comprising:

[0013] The first determining module is used to determine the target temperature threshold of each application in the corresponding load scenario based on the load scenarios corresponding to the N applications running in the electronic device and the temperature thresholds under different load scenarios, where N is a positive integer;

[0014] The second determining module is used to determine, for each application, the first power consumption required for the application to run for a first running time under the load scenario corresponding to the application according to the target temperature threshold corresponding to the application, wherein the first running time is the running time requested by the application;

[0015] The third determining module is used to determine the second power consumption corresponding to the thermal margin of the electronic device based on the first power consumption corresponding to each application.

[0016] The fourth determining module is used to determine the target frequency point of the central processing unit of the electronic device and the target running time at the target frequency point based on the second power consumption, the first power consumption corresponding to each application, the first frequency point applied for by each application, and the first running time of each application at the corresponding first frequency point.

[0017] The operation module is used to control the operation of the electronic device according to the target frequency and the target running time.

[0018] Thirdly, embodiments of this application provide an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can run on the processor, and the programs or instructions, when executed by the processor, implement the method as described in the first aspect.

[0019] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the method described in the first aspect.

[0020] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0021] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.

[0022] In this embodiment, the temperature of the electronic device is controlled by adjusting the target frequency and target running time of each application based on the load scenarios corresponding to the N applications running on the electronic device, the target temperature thresholds corresponding to the N applications under the load scenarios, the first frequency points applied for by the N applications based on their own computing power, and the first running time of each application at the first frequency point. This achieves the temperature control of the electronic device. Compared with the prior art, which controls the temperature of the electronic device by uniformly reducing the running frequency of each application in the central processing unit according to temperature control parameters, the temperature control scheme of this embodiment can provide the electronic device with target frequency points and target running times at target frequency points in a targeted manner according to the computing power required by different applications. This achieves the temperature control effect of the electronic device while avoiding the impact on the performance of the electronic device. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the control process of an electronic device provided in some embodiments of this application;

[0024] Figure 2 This is a schematic diagram of the control process of an electronic device provided in some embodiments of this application;

[0025] Figure 3 This is a flowchart illustrating a control method for an electronic device provided in some embodiments of this application;

[0026] Figure 4 These are schematic diagrams illustrating the structure of a control device for an electronic device, as shown in some embodiments of this application;

[0027] Figure 5 These are schematic diagrams illustrating the structure of an electronic device according to some embodiments of this application;

[0028] Figure 6 These are schematic diagrams illustrating the hardware structure of an electronic device according to some embodiments of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0030] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or N objects. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0031] Before introducing the technical solutions of the embodiments of this application, the background technology of the embodiments of this application will be introduced first:

[0032] Currently, when an electronic device is detected to be overheating, the operating strategy of the hardware resources of the applications running on the device is usually modified. For example, the CPU allocates a certain amount of resources to run the code of various applications, say 80% of its own resources. When an overheating electronic device is detected, the CPU can reduce its operating capacity, say to 50% of its original capacity. In this way, the resources used to run application code still occupy 80%, but the amount of code actually executed by the application per unit time is reduced to 50%, thus regulating the temperature of the electronic device.

[0033] The aforementioned strategies for regulating the temperature of electronic devices may affect the normal operation of resource-intensive applications if the CPU's operating capacity is reduced. For example, for audio and video playback applications, audio and video can be played normally when the CPU is running at 80% resource. However, if the CPU's operating capacity is reduced from 80% to 50%, the use of instant messaging applications will not be affected, but audio and video playback applications may experience stuttering when playing audio and video.

[0034] Furthermore, the above solutions lack specificity for temperature control of electronic devices. For example, large network data traffic causes electronic devices to heat up, but limiting CPU resources does not solve the problem. The network continues to receive data, but the CPU may drop packets because it cannot process the data in time. As a result, the power consumption of the network module remains high, and the overall control effect is weak.

[0035] In summary, existing methods that directly limit CPU resources without considering applications and scenarios negatively impact user experience and electronic device performance. To address these issues, this application provides a control method, apparatus, electronic device, and storage medium for an electronic device. Based on the load scenarios corresponding to N applications running on the electronic device, the target temperature thresholds for each application under the load scenarios, the first frequency points requested by each application based on its own computing power, and the first running time of each application at the first frequency point, the target frequency point and target running time at the target frequency point are adjusted for each application. This achieves temperature control of the electronic device. Compared to existing technologies that uniformly reduce the operating frequency of each application on the central processing unit based on temperature control parameters, the temperature control scheme of this application can provide targeted target frequency points and target running times at the target frequency points for different applications based on their required computing power. This achieves temperature control while avoiding impacting the performance of the electronic device.

[0036] The technical solutions of this application can be applied to scenarios where the temperature of an electronic device is controlled when the temperature is too high. For example, when a user is text chatting with a friend using an instant messaging application, the phone's temperature continues to rise, and the user wants to lower the phone's temperature without affecting their chat. Similarly, when a user is video calling with a friend using an instant messaging application while charging their phone, the phone's temperature continues to rise, and the user wants to adjust the phone's temperature to lower it without affecting their video call and charging.

[0037] The control method for the electronic device provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0038] Figure 1This is a flowchart illustrating a control method for an electronic device provided in an embodiment of this application. The subject executing the control method for the electronic device can be an electronic device, which can be, but is not limited to, a personal computer (PC), a smartphone, a tablet computer, or a personal digital assistant (PDA).

[0039] like Figure 1 As shown, the control method for the electronic device provided in this application embodiment may include steps 110-150.

[0040] Step 110: Based on the load scenarios corresponding to the N applications running in the electronic device and the temperature thresholds under different load scenarios, determine the target temperature threshold for each application under its corresponding load scenario.

[0041] The N applications running on the electronic device can be the sum of applications running in the foreground and applications running in the background. Here, N is a positive integer.

[0042] Each application has a corresponding load scenario, which can be the current load scenario of the application. For an application, its load scenario can be divided into light load, medium load, and heavy load scenarios. An application's load scenario can be determined based on the application itself and its usage scenarios.

[0043] Specifically, scenarios such as text chatting using instant messaging applications, sending text messages using SMS applications, and browsing news using news applications can be considered light-load scenarios; scenarios such as video calls using instant messaging applications, watching videos using video applications, playing music using music playback applications, navigating using navigation applications, and charging using charging applications are considered medium-load scenarios; and scenarios such as playing games using game applications, live streaming using short video applications, and recording video using camera applications are considered heavy-load scenarios. The specific load scenario of a particular application can be determined based on the application's current environment. The method for determining the load scenario of an application will be described in detail in subsequent embodiments.

[0044] For an application, its target temperature threshold can be the highest temperature the application can reach under its corresponding load scenario. Different load scenarios can correspond to different temperature thresholds, which can be determined based on user surveys, such as user complaints about overheating. For example, for a light load scenario, if the actual temperature reaches 40℃, users will experience overheating and file complaints; therefore, the temperature threshold for a light load scenario can be set to 40℃. For a medium load scenario, if the actual temperature reaches 43℃, users will experience overheating and file complaints; therefore, the temperature threshold for a medium load scenario can be set to 43℃. For a heavy load scenario, if the actual temperature reaches 46℃, users will experience overheating and file complaints; therefore, the temperature threshold for a heavy load scenario can be set to 46℃.

[0045] The temperature thresholds for different load scenarios can also be based on the temperature at which continued use of the application under that load scenario would cause problems such as lag. For example, if the temperature of the electronic device continues to rise while the user is using an instant messaging application for text chat, and lag begins to occur when the temperature reaches 38°C, then the temperature threshold for that load scenario can be determined to be 38°C. Whether the specific temperature thresholds for different load scenarios are determined based on user surveys or on the temperature at which continued use of the application under that load scenario would cause problems such as lag, can be set according to user needs and is not limited in this embodiment.

[0046] In some embodiments of this application, in order to improve the accuracy of determining the application's load scenario, the method described above may further include the following steps before step 110:

[0047] Obtain the application identifiers of N applications running on the electronic device;

[0048] For each application, the corresponding load scenario is determined based on the application's application identifier and application scenario.

[0049] In this application, the application identifier for any of the N applications can be an identifier that uniquely represents the application, such as the name of the application's data packet or the application's encoding, etc., which is not limited in this embodiment.

[0050] In some embodiments of this application, the application identifiers of N applications running on the electronic device can be obtained. Specifically, the application identifiers of applications running in the foreground and applications running in the background can be obtained. Then, for each application, the load scenario of the application can be determined based on the application identifier and the application scenario.

[0051] In one example, when a user is using instant messaging application A to chat with a friend via text, and the application running on the electronic device is detected to be instant messaging application A, and the application scenario of instant messaging application A is text chatting, then it can be determined that the load scenario of instant messaging application A is a light load scenario.

[0052] In another example, when a user is making a video call with a friend using instant messaging application A, and the application running on the electronic device is detected to be instant messaging application A, and the application scenario of instant messaging application A is video calling, then it can be determined that the load scenario of instant messaging application A is a medium load scenario.

[0053] In the embodiments of this application, for each application, the load scenario of the application is determined by combining the application identifier of the application and the application scenario of the application. Compared with relying solely on the application identifier or the application scenario of the application to determine the load scenario of the application, the scheme in the embodiments of this application improves the accuracy of determining the load scenario of the application.

[0054] Step 120: For each application, determine the first power consumption required for the application to run for the first time under the corresponding load scenario, based on the target temperature threshold corresponding to the application.

[0055] For each application, the first power consumption can be the power consumption required for the application to run for the first time under its corresponding load scenario according to its corresponding target temperature threshold.

[0056] The initial runtime of an application can be the runtime that the application requests.

[0057] In some embodiments of this application, in order to accurately obtain the first power consumption required for the application to run for a first time under a load scenario, step 120 may specifically include:

[0058] The weight and surface area of ​​the electronic device are obtained, as well as the ambient temperature of the environment in which the electronic device is located after each application has run for a first time according to the corresponding target temperature threshold.

[0059] For each application, based on the application's target temperature threshold, ambient temperature, the weight of the electronic device, and the surface area of ​​the electronic device, determine the first power consumption required for the application to run for a first time under the corresponding load scenario according to the application's target temperature threshold.

[0060] For each application, the ambient temperature can be the temperature of the environment in which the electronic device is located after the application has run for a first time according to its corresponding target temperature threshold.

[0061] The aforementioned ambient temperature can be obtained based on an ambient temperature curve. Specifically, the electronic device can pre-obtain the ambient temperature at multiple time points in the environment where the electronic device is located through a temperature sensor, and then, based on the multiple time points and the corresponding ambient temperatures, fit the aforementioned ambient temperature curve to obtain the ambient temperature curve. Furthermore, the ambient temperature of the environment in which the electronic device is located after the first operating time can be obtained based on this ambient temperature curve.

[0062] In some embodiments of this application, the ambient temperature, weight, and surface area of ​​the electronic device after the first running time can be obtained. Then, for each application, the first power consumption required for the application to run for the first running time under the load scenario corresponding to the application, according to the target temperature threshold of the application, the ambient temperature, the weight of the electronic device, and the surface area of ​​the electronic device, can be obtained according to the following formula (1):

[0063]

[0064] When calculating the first power consumption required for each application to run for the first time under the corresponding load scenario, for the above formula (1), for each application, T s For the target temperature threshold of the application, T a Let be the ambient temperature after the electronic device has run for a first time according to the target temperature threshold, h be the heat transfer coefficient of the electronic device, S be the surface area of ​​the electronic device, m be the weight of the electronic device, C be the specific heat capacity of the electronic device, t be the first running time of the application, and P be the first power consumption of the application.

[0065] In the embodiments of this application, for each application, based on the application's target temperature threshold, ambient temperature, weight of the electronic device, and surface area of ​​the electronic device, the first power consumption required for the application to run for a first time under the corresponding load scenario can be accurately obtained according to the above temperature rise formula.

[0066] Step 130: Determine the second power consumption corresponding to the thermal margin of the electronic device based on the first power consumption corresponding to each application.

[0067] The second power consumption can be the power consumption corresponding to the remaining heat of the electronic device after the application has been running for a first period of time.

[0068] It should be noted that since the initial running time of each application is not significantly different, the remaining heat of the electronic device after each application has run for the first time is also not significantly different. For example, if the initial running time of application B is 5 seconds and the initial running time of application C is 6 seconds, the remaining heat of the electronic device after application B has run for 5 seconds is not significantly different from the remaining heat of the electronic device after application C has run for 6 seconds. Therefore, the second power consumption corresponding to the heat reserve of the electronic device can be directly determined using the initial power consumption of each application.

[0069] In some embodiments of this application, in order to accurately determine the second power consumption corresponding to the thermal margin of the electronic device, step 130 may specifically include:

[0070] Get the current temperature for each application;

[0071] For each application, based on the application's current temperature, determine the third power consumption required for the application to run for the first time under the load scenario corresponding to the application level at the current temperature;

[0072] Sum the first power consumption for each application to obtain the first total power consumption;

[0073] The second total power consumption is obtained by summing the third power consumption corresponding to each application.

[0074] Based on the first total power consumption and the second total power consumption, determine the second power consumption corresponding to the thermal margin of the electronic device.

[0075] For each application, the corresponding third power consumption can be the power consumption required for the application to run for the first time under its corresponding load scenario at the current temperature.

[0076] The first total power consumption can be the total power consumption obtained by summing the first power consumption corresponding to each application.

[0077] The second total power consumption can be the total power consumption obtained by summing the third power consumption corresponding to each application.

[0078] In some embodiments of this application, the current temperature of each application can be obtained, and then for each application, according to the current temperature of the application, the third power consumption required for the application to run for a first running time under its corresponding load scenario can be determined according to the above formula (1).

[0079] It should be noted that when calculating the second power consumption required for each application to run for the first time under its corresponding load scenario at its current temperature, in the above formula (1), for each application, T s T represents the current temperature of the application. a The ambient temperature of the electronic device is given by the application after running for the first time at the current temperature, h is the heat transfer coefficient of the electronic device, S is the surface area of ​​the electronic device, m is the weight of the electronic device, C is the specific heat capacity of the electronic device, t is the first running time of the application, and P is the third power consumption of the application.

[0080] Based on the first and third power consumption of each application, the first power consumption of each application can be summed to obtain the first total power consumption. Then, the third power consumption of each application can be summed to obtain the second total power consumption. Then, based on the first and second total power consumption, the second power consumption ΔP corresponding to the thermal margin of the electronic device can be obtained according to the following formula (2):

[0081] ΔP=P max -P 当前 (2)

[0082] In the above formula (2), P max For the first total power consumption, P 当前 This is the second highest total power consumption.

[0083] In the embodiments of this application, for each application, based on the current temperature of the application, the third power consumption required for the application to run for a first running time under the load scenario corresponding to the application at the current temperature is determined. Then, the first power consumption corresponding to each application is summed to obtain the first total power consumption, and the third power consumption corresponding to each application is summed to obtain the second total power consumption. Then, based on the first total power consumption and the second total power consumption, the second power consumption corresponding to the thermal margin of the electronic device can be accurately determined.

[0084] Step 140: Based on the second power consumption, the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point, determine the target frequency point and the target running time of the central processing unit of the electronic device.

[0085] For each application, its corresponding first frequency point can be the frequency point applied for by the application to run on the central processing unit. The first frequency point of an application can be obtained by the application based on its own computing power. The specific process of an application obtaining its corresponding frequency point based on its own computing power is existing technology and will not be elaborated on in this step.

[0086] The target frequency can be the operating frequency determined by the central processing unit based on the second power consumption, the first frequency requested by each application, and the first running time of each application at the first frequency.

[0087] The target runtime can be the runtime at the target frequency determined by the central processing unit based on the second power consumption, the first frequency point requested by each application, and the first runtime of each application at the first frequency point.

[0088] In some embodiments of this application, to improve the flexibility in determining the target frequency of the central processing unit and the target runtime at the target frequency, step 140 may specifically include:

[0089] When N=1, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined based on the second power consumption, the first power consumption of the application, the first frequency point requested by the application, and the first running time of the application at the first frequency point.

[0090] When N≥2, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined based on the second power consumption, the sum of the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

[0091] In some embodiments of this application, when N=1, i.e. when only one application requests a frequency point, the target frequency point and the target running time of the central processing unit of the electronic device can be determined based on the second power consumption and the first power consumption of the application, as well as the first frequency point requested by the application and the first running time of the application at the first frequency point.

[0092] When N≥2, i.e. when multiple applications request frequency points, the target frequency point and target running time of the central processing unit of the electronic device can be determined based on the second power consumption, the sum of the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

[0093] In the embodiments of this application, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined according to the number of applications applying for the target frequency, thereby improving the flexibility of determining the target frequency and the target running time at the target frequency.

[0094] In some embodiments of this application, when N=1, determining the target frequency of the electronic device's central processing unit and the target runtime at the target frequency based on the second power consumption, the first power consumption of the application, the first frequency point requested by the application, and the first runtime of the application at the first frequency point may specifically include:

[0095] When the first power consumption is less than or equal to the second power consumption, the first frequency point requested by the application is determined as the target frequency point of the central processing unit of the electronic device, and the first running time under the first frequency point requested by the application is determined as the target running time of the central processing unit of the electronic device.

[0096] If the first power consumption is greater than the second power consumption, the second frequency point supported by the central processing unit and the second running time at the second frequency point are determined based on the second power consumption.

[0097] The second frequency point is determined as the target frequency point of the central processing unit of the electronic device, and the second running time is determined as the target running time of the central processing unit of the electronic device.

[0098] The second frequency point can be the frequency point that the central processing unit can support, determined based on the second power consumption.

[0099] The second runtime can be the runtime at the frequency points that the central processing unit can support, determined based on the second power consumption.

[0100] In some embodiments of this application, when N=1, that is, when only one application requests a frequency point, if the first frequency point requested by the application and the first power consumption required for the first running time at the first frequency point are less than or equal to the second power consumption, that is, if the second power consumption can satisfy the first frequency point requested by the application and the first running time at the first frequency point, the first frequency point requested by the application can be determined as the target frequency point of the central processing unit of the electronic device, and the first running time at the first frequency point requested by the application can be determined as the target running time of the central processing unit of the electronic device.

[0101] Continuing with the example above, when a user is text chatting with a friend using an instant messaging application, the CPU is providing 55% of its operating frequency to the application. The phone's temperature continues to rise. If the instant messaging application requests to reduce the CPU's resources for running the application to 50% for a duration of 5 seconds (i.e., the first frequency is 50% and the first running time is 5 seconds), and calculations show that the power consumption required for the requested frequency and running time is less than the second power consumption, then the CPU's frequency can be adjusted from 55% to 50%, and the CPU will run at 50% for 5 seconds to maintain the instant messaging application's normal operation. Furthermore, by reducing the CPU's frequency from 55% to 50%, the phone's temperature is lowered. Thus, the phone's temperature is reduced while maintaining the instant messaging application's performance.

[0102] When N=1, meaning only one application requests a frequency point, and the first power consumption is greater than the second power consumption (i.e., the second power consumption cannot satisfy the application's request for the first frequency point and the first running time at the first frequency point), the second frequency point and the second running time that the central processing unit (CPU) can support at that second power consumption can be determined first. Then, the second frequency point is determined as the target frequency point of the CPU of the electronic device, and the second running time is determined as the target running time of the CPU of the electronic device. In other words, when the second power consumption cannot satisfy the application's request for the first frequency point and the first running time at the first frequency point, the CPU can provide running resources to the application according to its maximum available power consumption.

[0103] Continuing with the example above, when a user is text chatting with a friend using an instant messaging application, the CPU is providing 55% of its operating frequency to the application. The phone's temperature continues to rise. If the instant messaging application requests to reduce the CPU's resources for running the application to 50% for 5 seconds (i.e., first frequency 50%, first running time 5 seconds), calculations show that the power consumption required for the requested frequency and running time exceeds the second power consumption. Furthermore, calculations show that the second power consumption can support a frequency of 48% for 5 seconds (i.e., second frequency 48%, second running time 5 seconds). Therefore, the CPU's frequency can be adjusted from 55% to 48%, and the CPU will run at 48% for 5 seconds to maximize the normal operation of the instant messaging application. Furthermore, by reducing the CPU's frequency from 55% to 48%, the phone's temperature is lowered. Thus, the goal is to maintain the instant messaging application's performance while simultaneously reducing the phone's temperature.

[0104] In some embodiments of this application, the determination of the second frequency point that the central processing unit can support under the second power consumption and the second running time under the second frequency point can be made in the following way: Substituting the second power consumption into the following formula (3), the second frequency point F that the second power consumption can support can be determined:

[0105] Second power consumption = static power consumption + dynamic power consumption (3) Dynamic power consumption = C·V 2 ·F

[0106] In the above formula (3), static power consumption is the basic power consumption of the central processing unit in the idle state, which is usually a fixed value and can be obtained through testing; dynamic power consumption is the additional power consumption generated by the central processing unit under load, such as for dynamic adjustment such as frequency point increase, which is usually related to the load of the electronic device; C is the load factor, which represents the load situation, and its value is usually between 0 and 1; V is the voltage value of the central processing unit under load scenario; F is the second frequency point.

[0107] Then, substituting the second power consumption into formula (1) above, we can obtain the second operating time t at the second frequency point supported by the second power consumption. When substituting the second power consumption into formula (1) above, T in formula (1) s For the target temperature threshold of the application, T a The ambient temperature after the electronic device has been running for a first time according to the target temperature threshold.

[0108] It should be noted that if the second running time is greater than or equal to the first running time, the central processing unit can be run directly according to the first running time. However, if the second running time is less than the first running time, that is, if it can run for 4 seconds at 48% frequency as determined in the above example, it can be processed in the manner mentioned in the subsequent embodiments, which will not be described in detail here.

[0109] In the embodiments of this application, when only one application requests a frequency point, if the second power consumption can meet the first frequency point and first running time requested by the application, the frequency can be increased according to the first frequency point and first running time requested by the application. If the second power consumption cannot meet the first frequency point and first running time requested by the application, the frequency can be increased according to the maximum power consumption that the second power consumption can provide. In this way, the target frequency point and target running time of the central processing unit are determined in different ways according to the relationship between the first power consumption and the second power consumption, which further improves the flexibility of determining the target frequency point and target running time of the central processing unit.

[0110] In some embodiments of this application, to further improve the flexibility of the target frequency and target runtime of the central processing unit (CPU), when N≥2, determining the target frequency and target runtime of the CPU of the electronic device based on the second power consumption, the sum of the first power consumption corresponding to each application, the first frequency applied for by each application, and the first runtime of each application at the first frequency may specifically include:

[0111] If the sum of the first power consumption corresponding to each application is less than or equal to the second power consumption, the first frequency point requested by each application is determined as the target frequency point of the central processing unit of the electronic device, and the first running time under the first frequency point requested by each application is determined as the target running time of the central processing unit of the electronic device.

[0112] If the sum of the first power consumption of each application is greater than the second power consumption, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined according to the priority of each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

[0113] In some embodiments of this application, when N≥2, that is, when multiple applications apply for frequency points, if the sum of the first frequency point applied for by each application and the first power consumption required for the first running time at its corresponding first frequency point is less than or equal to the second power consumption, that is, when the second power consumption can satisfy the first frequency point applied for by each application and the first running time at the first frequency point, the first frequency point applied for by each application can be determined as the target frequency point of the central processing unit of the electronic device, and the first running time at the first frequency point applied for by the application can be determined as the target running time of the central processing unit of the electronic device. In other words, corresponding running resources can be provided to each application according to the first frequency point and the first running time applied for by each application.

[0114] Continuing with the second example above, while a user is making a video call with a friend using an instant messaging application, they are also charging their phone. At this time, the CPU provides 60% of its frequency for the instant messaging application and 30% for charging. The phone's temperature continues to rise. If it is detected that the instant messaging application requests to reduce the CPU resources provided for running the instant messaging application to 55% for 5 seconds and the resources for charging to 25% for 10 seconds, then the first frequency for the instant messaging application is 55% and the first running time is 5 seconds, while the first frequency for charging is 25% and the first running time is 10 seconds. Calculations show that the sum of the power consumption required by the frequency and runtime requested by the instant messaging application and the power consumption required by the charging application is less than the second power consumption. Therefore, the frequency allocated to the instant messaging application by the CPU can be adjusted from 60% to 55%, and the CPU can run the instant messaging application at 55% frequency for 5 seconds. The frequency allocated to charging by the CPU can be adjusted from 30% to 25%, and the CPU can run the charging application at 25% frequency for 10 seconds to maintain the normal operation of the instant messaging application and charging. Furthermore, by adjusting the frequency allocated to the instant messaging application from 60% to 55% and the frequency allocated to charging from 30% to 25%, the temperature of the phone can be reduced. Thus, the phone's temperature is reduced while maintaining the performance of the instant messaging application and charging.

[0115] When N≥2, i.e., when multiple applications request frequency points, and when the first power consumption is greater than the second power consumption (i.e., the second power consumption cannot satisfy the first frequency point requested by each application and the first running time at the first frequency point), the target frequency point and target running time of the electronic device's central processing unit can be determined based on the priority of each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point. Specifically, this can be done by prioritizing the frequency point and running time requested by applications with higher priority.

[0116] It should be noted that the priority of each application can be set by the user according to their needs, or it can be determined according to the running status of each application. For example, the priority of an application running in the foreground is higher than that of an application running in the background. Alternatively, the priority of each application can be determined according to the frequency of the user's use of each application. The specific method for determining the priority of each application can be selected by the user according to their needs, and is not limited in this embodiment.

[0117] In the embodiments of this application, when there are multiple applications requesting frequency points, if the sum of the first power consumption of each application is less than or equal to the second power consumption, the frequency point and running time of each application can be provided to each application according to the first frequency point and the first running time requested by each application. If the sum of the first power consumption of each application is greater than the second power consumption, the target frequency point and the target running time of the central processing unit of the electronic device can be determined according to the priority of each application, the first frequency point requested by each application and the first running time of each application at the first frequency point. This further improves the flexibility of the target frequency point and the target running time of the central processing unit.

[0118] In some embodiments of this application, step 140 may further include:

[0119] If the first application's first runtime at the required first frequency point is greater than a window period, the first frequency point required by the first application is determined as the target frequency point of the central processing unit within the window period, and the window period is determined as the target runtime of the central processing unit at the target frequency point.

[0120] The first application can be any one of the applications.

[0121] The window period can be the runtime allocated by the central processing unit (CPU) to the first application. This window period can be the interval at which the first application requests frequency and runtime, or it can be the interval during which the CPU actively queries the first application for the required frequency and runtime. For example, if the first application requests frequency and runtime every 3 seconds, the window period is 3 seconds. Or, if the CPU queries the first application for the required frequency and runtime every 3.5 seconds, the window period is 3.5 seconds.

[0122] In some embodiments of this application, if the first running time of the first application at the required first frequency point is greater than a window period, that is, the first running time requested by the first application is greater than a window period, then the first frequency point required by the first application can be determined as the target frequency point of the central processing unit within the window period, and the window period can be determined as the target running time of the central processing unit at the target frequency point.

[0123] In one example, a user is text chatting with a friend using an instant messaging application. The CPU is currently providing 55% of its clock speed to the application. The phone's temperature is rising. If the CPU detects a request from the instant messaging application to reduce its resources to 50% for 5 seconds, and that the application requests clock speed from the CPU every 4 seconds (i.e., the initial clock speed is 50%, the initial runtime is 5 seconds, and the window period is 4 seconds), then if the initial runtime is longer than the window period, the CPU can provide the instant messaging application with 50% of its resources for 4 seconds at 50% clock speed.

[0124] After running for 4 seconds, the process returns to steps 110-140 above. That is, the load scenario of the instant messaging application is reacquired. Then, based on the load scenario of the instant messaging application and the temperature thresholds for different pre-set load scenarios, the target temperature threshold of the instant messaging application under the load scenario is determined. Then, the first power consumption required for the instant messaging application to run for a first running time under the load scenario corresponding to its target temperature threshold is determined. Based on the first power consumption of the instant messaging application, the second power consumption corresponding to the thermal margin of the electronic device is determined. Then, based on the second power consumption, the first power consumption of the instant messaging application, the first frequency point applied for by the instant messaging application, and the first running time under the first frequency point, the target frequency point of the central processing unit of the electronic device and the target running time under the target frequency point are determined.

[0125] In the embodiments of this application, if the first running time of the first application at the required first frequency point is greater than a window period, the first frequency point required by the first application can be determined as the target frequency point of the central processing unit within the window period, and the window period can be determined as the target running time of the central processing unit at the target frequency point. Thus, if the first running time of the first application at the required first frequency point is greater than a window period, the frequency of the first application can be increased according to the frequency point applied for by the first application within the window period, thereby reducing the temperature of the electronic device while ensuring the performance of the first application as much as possible.

[0126] Step 150: Control the operation of electronic equipment according to the target frequency and target running time.

[0127] In some embodiments of this application, after determining the target frequency and target running time of the electronic device, the electronic device can be controlled to operate according to the target frequency and target running time in order to regulate the temperature of the electronic device.

[0128] In some embodiments of this application, actual tests show that the solutions provided by the embodiments of this application improve performance response time by 20%-50% in scenarios such as application switching and application startup, without a significant increase in heat generation.

[0129]

[0130]

[0131] Table 2

[0132]

[0133] Table 3

[0134]

[0135] Table 1 above shows the performance of the solutions in this application embodiment and the prior art in scenarios such as application switching and application launch. Table 2 shows the temperature performance of the solutions in this application embodiment and the prior art in the scenario of launching from a small window panel as shown in Table 1. Table 3 shows the temperature performance of the solutions in this application embodiment and the prior art in the scenario of switching recent tasks as shown in Table 1. As can be seen from Tables 1, 2, and 3, for the scenarios of launching from a small window panel and switching recent tasks, the solutions in this application embodiment and the prior art do not show significant changes in temperature. However, in terms of performance, the solutions in this application embodiment have a significant improvement over the prior art solutions. Therefore, the solutions in this application embodiment improve performance response time by 20%-50% in scenarios such as application switching and application launch without a significant increase in heat generation.

[0136] To better understand the solutions of the embodiments of this application, the detailed process of temperature control of the solutions of the embodiments of this application will be described in detail through the following embodiments.

[0137] Figure 2 This is a flowchart illustrating the control method for an electronic device provided in an embodiment of this application, as shown below. Figure 2 As shown, the control method for the electronic device may include steps 201-212.

[0138] Step 201: Obtain the load scenarios corresponding to the N applications running on the electronic device.

[0139] In step 201, the load scenario corresponding to each application can be determined according to the method for determining the load scenario corresponding to each application in the above embodiments, which will not be repeated here.

[0140] Step 202: Determine the computing power required for each application based on the load scenario corresponding to each application.

[0141] In step 202, calculating the required computing power for each application based on its corresponding load scenario is existing technology and will not be elaborated here.

[0142] Step 203: Based on the computing power required by each application, determine the first frequency point and first running time requested by each application.

[0143] In step 203, the first frequency point and first running time applied for by each application can be determined based on the computing power of each application.

[0144] Step 204: Central Processing Unit Arbitration Frequency.

[0145] In step 204, different temperature control parameters are used for different load scenarios, and different frequency thresholds are used for different parameters. For example, for users using instant messaging applications to chat via text, the corresponding frequency threshold can be 50%, and for charging scenarios, the corresponding frequency threshold can be 55%.

[0146] The central processing unit (CPU) can request frequency points from each application based on the first frequency point requested by each application and the frequency point threshold corresponding to the load scenario of each application. This process is called CPU arbitration frequency point.

[0147] It should be noted that since the central processing unit (CPU) has multiple cores, the CPU arbitrates the frequency points for each core individually. The CPU will allocate cores based on the first frequency point requested by each application. In other words, the CPU will select which core to provide running resources for each application based on the first frequency point requested by each application.

[0148] Step 205: Determine whether the arbitration frequency meets the computing power of each application. If it does, proceed to step 206; otherwise, proceed to step 207.

[0149] Step 206: Adjust the frequency of the central processing unit to the computing power requested by the application.

[0150] In steps 205-206, for each application, based on the frequency requested by the application, the frequency that the central processing unit (CPU) can provide corresponding to the frequency requested by the application is determined based on the thermal temperature control parameters of the electronic device. If the frequency determined based on the thermal temperature control parameters is greater than or equal to the frequency requested by the application, that is, the arbitration frequency meets the computing power of the application, then the selected core can be used to adjust the frequency of the core to the computing power requested by the application. For example, if the CPU has 3 cores, namely core 1, core 2 and core 3, application A requests computing power a and application B requests computing power b, the CPU determines that core 1 will provide computing power for application A and core 2 will provide computing power for application B based on the computing power requested by application A and application B. Then the frequency of core 1 can be adjusted to computing power a and the frequency of core 2 can be adjusted to computing power b.

[0151] In the existing technology, if the frequency point determined based on the thermal temperature control parameters is less than the frequency point requested by the application, that is, if the arbitration frequency point does not meet the computing power of the application, then the computing power is provided to the application according to the maximum frequency point that the thermal temperature control parameters can provide.

[0152] However, in the scheme of this application embodiment, if the frequency point determined based on the Thermal temperature control parameter is less than the frequency point requested by the application, that is, if the arbitration frequency point does not meet the computing power of the application, then the computing power is provided to the application according to the maximum frequency point that the Thermal temperature control parameter can provide.

[0153] Step 207: Based on the load scenarios corresponding to the N applications running in the electronic device and the temperature thresholds under different load scenarios, determine the target temperature threshold for each application under its corresponding load scenario.

[0154] Step 208: For each application, determine the first power consumption required for the application to run for a first time under the application's load scenario, based on the application's target temperature threshold.

[0155] Step 209: Determine the second power consumption corresponding to the thermal margin of the electronic device based on the first power consumption corresponding to each application.

[0156] Steps 207-209 above are the same as steps 110-130 in the above embodiment, and will not be repeated here.

[0157] Step 210: Determine whether the second power consumption can meet the first power consumption of N applications. If yes, proceed to step 206; otherwise, proceed to step 211.

[0158] In step 210, it can be determined whether the second power consumption can meet the first power consumption of N applications. If it can, the target frequency of the central processing unit of the electronic device is determined as the first frequency of each application, and the target running time is determined as the first running time of each application. That is, the frequency of the central processing unit is adjusted to the computing power requested by the application.

[0159] Specifically, as in the above embodiments, when N=1, and when the first power consumption is less than or equal to the second power consumption, the first frequency point requested by the application is determined as the target frequency point of the central processing unit of the electronic device, and the first running time under the first frequency point requested by the application is determined as the target running time of the central processing unit of the electronic device.

[0160] When N≥2, and the sum of the first power consumption corresponding to each application is less than or equal to the second power consumption, the first frequency point requested by each application is determined as the target frequency point of the central processing unit of the electronic device, and the first running time under the first frequency point requested by each application is determined as the target running time of the central processing unit of the electronic device.

[0161] Step 211: Based on the second power consumption, the first power consumption corresponding to each application, the first frequency point applied for by each application, and the first running time of each application at the first frequency point, determine the target frequency point and the target running time of the central processing unit of the electronic device.

[0162] In step 211, the target frequency of the electronic device's central processing unit and the target runtime at the target frequency can be determined based on the number of applications.

[0163] Specifically, as in the above embodiment, when N=1, and the first power consumption is greater than the second power consumption, the second frequency point supported by the central processing unit and the second running time at the second frequency point are determined based on the second power consumption; then the second frequency point is determined as the target frequency point of the central processing unit of the electronic device, and the second running time is determined as the target running time of the central processing unit of the electronic device.

[0164] When N≥2, and the sum of the first power consumption corresponding to each application is greater than the second power consumption, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined according to the priority of each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

[0165] Step 212: Control the operation of electronic equipment according to the target frequency and target running time.

[0166] Step 121 above is the same as step 150 in the above embodiment, and will not be repeated here.

[0167] The solution in this application breaks with existing temperature control strategies, allowing users to experience peak performance even under controlled temperature conditions. Existing solutions cannot exceed the frequency limit after frequency throttling, and the high frequencies supported by the CPU are limited by heat dissipation under temperature control. However, the solution in this application can run at higher frequencies when needed, showcasing CPU performance without increasing heat generation, and can be reasonably controlled according to actual needs.

[0168] In some embodiments of this application, the process of implementing the above embodiments using the content architecture of an electronic device is as follows: Figure 3 As shown.

[0169] Figure 3 This diagram illustrates a method for controlling an electronic device based on its architecture. The specific process is as follows:

[0170] Step 301: The application layer detects the load scenarios corresponding to N applications and sends the first frequency point and first running time required by the N applications, as well as the load scenarios, to the middle layer.

[0171] Step 302: The intermediate layer obtains the target temperature threshold for each application under the corresponding load scenario from the scenario database based on the received load scenarios corresponding to the N applications running in the electronic device.

[0172] In some embodiments of this application, temperature thresholds for different load scenarios are pre-stored in the scenario database.

[0173] Step 303: The intermediate layer obtains the current temperature of each application from the sensor.

[0174] Step 304: The intermediate layer determines the second power consumption corresponding to the thermal margin of the electronic device based on the current temperature and target temperature threshold of each application, and sends it to the dynamic engine.

[0175] In step 304, for each application, the intermediate layer can first determine the first power consumption required for the application to run for a first time under the corresponding load scenario according to the target temperature threshold of the application. Then, based on the current temperature of each application, the third power consumption required for each application to run for a first time under the corresponding load scenario according to the current temperature can be determined. Then, based on the first power consumption and the third power consumption of each application, the second power consumption corresponding to the thermal margin of the electronic device can be determined.

[0176] Specifically, the process of determining the first power consumption required for the application to run for a first time under the corresponding load scenario according to the target temperature threshold of the application, and the third power consumption required for each application to run for a first time under the corresponding load scenario according to the current temperature of each application, and determining the second power consumption corresponding to the thermal margin of the electronic device based on the first power consumption and the third power consumption of each application, can be referred to the above embodiment, and will not be repeated here.

[0177] The aforementioned dynamic engine can be the central processing unit of an electronic device.

[0178] Step 305: The intermediate layer determines the target frequency of the central processing unit of the electronic device and the target running time at the target frequency based on the second power consumption, the first power consumption corresponding to each application, the first frequency point applied for by each application, and the first running time of each application at the corresponding first frequency point.

[0179] In some embodiments of this application, step 305 is consistent with step 140 in the above embodiments, and will not be described again here.

[0180] After completing step 305, the intermediate layer can send the target frequency of the central processing unit of the determined electronic device and the target runtime at the target frequency to the execution layer of the central processing unit, so that the execution layer can adjust the frequency of the central processing unit to the target frequency and the runtime to the target runtime.

[0181] The control method for an electronic device provided in this application can be executed by a control device for the electronic device. This application uses the example of a control device for an electronic device executing the control method to illustrate the control device for the electronic device provided in this application.

[0182] Figure 4 This is a schematic diagram illustrating the structure of a control device for an electronic device according to an exemplary embodiment. For example... Figure 4 As shown, the control device 400 of the electronic device may include:

[0183] The first determining module 410 is used to determine the target temperature threshold of each application in the corresponding load scenario based on the load scenarios corresponding to the N applications running in the electronic device and the temperature thresholds under different load scenarios, where N is a positive integer;

[0184] The second determining module 420 is used to determine, for each application, the first power consumption required for the application to run for a first time under the load scenario corresponding to the application according to the target temperature threshold corresponding to the application, wherein the first running time is the running time requested by the application;

[0185] The third determining module 430 is used to determine the second power consumption corresponding to the thermal margin of the electronic device based on the first power consumption corresponding to each application.

[0186] The fourth determining module 440 is used to determine the target frequency point of the central processing unit of the electronic device and the target running time at the target frequency point based on the second power consumption, the first power consumption corresponding to each application, the first frequency point applied for by each application, and the first running time of each application at the corresponding first frequency point.

[0187] The operation module 450 is used to control the operation of the electronic device according to the target frequency and the target running time.

[0188] In the embodiments of this application, the target frequency and target running time of each application are adjusted according to the load scenarios of N applications running on the electronic device, the target temperature thresholds corresponding to the N applications under the load scenarios, the first frequency points applied for by the N applications based on their own computing power, and the first running time of each application at the first frequency point. This achieves temperature control of the electronic device. In this way, compared with the prior art, which controls the temperature of the electronic device by uniformly reducing the running frequency of each application in the central processing unit according to temperature control parameters, the temperature control scheme of this application can provide the electronic device with a target frequency point and a target running time at the target frequency point in a targeted manner according to the computing power required by different applications. This achieves the effect of temperature control of the electronic device while avoiding the impact on the performance of the electronic device.

[0189] In some embodiments of this application, the second determining module 420 is specifically used for:

[0190] The weight and surface area of ​​the electronic device are obtained, as well as the ambient temperature of the environment in which the electronic device is located after each application runs for the first running time according to the corresponding target temperature threshold;

[0191] For each application, based on the target temperature threshold of the application, the ambient temperature, the weight of the electronic device, and the surface area of ​​the electronic device, a first power consumption required for the application to run for a first time under the load scenario corresponding to the application, according to the target temperature threshold of the application.

[0192] In some embodiments of this application, the third determining module 430 is specifically used for:

[0193] Get the current temperature for each application;

[0194] For each application, based on the application's current temperature, determine the third power consumption required for the application to run for the first running time under the load scenario corresponding to the application at the current temperature;

[0195] Sum the first power consumption for each application to obtain the first total power consumption;

[0196] The second total power consumption is obtained by summing the third power consumption corresponding to each application.

[0197] Based on the first total power consumption and the second total power consumption, the second power consumption corresponding to the thermal margin of the electronic device is determined.

[0198] In some embodiments of this application, the fourth determining module 440 is specifically used for:

[0199] When N=1, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined based on the second power consumption, the first power consumption of the application, the first frequency point requested by the application, and the first running time of the application at the first frequency point.

[0200] When N≥2, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined based on the second power consumption, the sum of the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

[0201] In some embodiments of this application, when N=1, the fourth determining module 440 is specifically used for:

[0202] When the first power consumption is less than or equal to the second power consumption, the first frequency point requested by the application is determined as the target frequency point of the central processing unit of the electronic device, and the first running time under the first frequency point requested by the application is determined as the target running time of the central processing unit of the electronic device.

[0203] If the first power consumption is greater than the second power consumption, the second frequency point supported by the central processing unit and the second running time at the second frequency point are determined based on the second power consumption.

[0204] The second frequency point is determined as the target frequency point of the central processing unit of the electronic device, and the second running time is determined as the target running time of the central processing unit of the electronic device.

[0205] In some embodiments of this application, when N≥2, the fourth determining module 440 is specifically used for:

[0206] If the sum of the first power consumption corresponding to each application is less than or equal to the second power consumption, the first frequency point requested by each application is determined as the target frequency point of the central processing unit of the electronic device, and the first running time under the first frequency point requested by each application is determined as the target running time of the central processing unit of the electronic device.

[0207] If the sum of the first power consumption of each application is greater than the second power consumption, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined based on the priority of each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

[0208] In some embodiments of this application, the fourth determining module 440 is specifically used for:

[0209] If the first application's first running time at the required first frequency point is greater than a window period, the first frequency point required by the first application is determined as the target frequency point of the central processing unit within the window period, and the window period is determined as the target running time of the central processing unit at the target frequency point, wherein the first application is any one of the applications.

[0210] The control device for the electronic device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.

[0211] The control device for the electronic device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0212] The control device for the electronic device provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0213] Optionally, such as Figure 5 As shown, this application embodiment also provides an electronic device 500, including a processor 501 and a memory 502. The memory 502 stores a program or instructions that can run on the processor 501. When the program or instructions are executed by the processor 501, they implement the various steps of the control method embodiment of the above-mentioned electronic device and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0214] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0215] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0216] The electronic device 600 includes, but is not limited to, components such as: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, and processor 610.

[0217] Those skilled in the art will understand that the electronic device 600 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 610 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 6 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0218] The processor 610 is configured to: determine the target temperature threshold for each application in its corresponding load scenario based on the load scenarios corresponding to N applications running in the electronic device and the temperature thresholds under different load scenarios, where N is a positive integer; for each application, determine the first power consumption required for the application to run for a first running time in its corresponding load scenario according to the target temperature threshold, where the first running time is the running time requested by the application; determine the second power consumption corresponding to the thermal margin of the electronic device based on the first power consumption for each application; determine the target frequency of the central processing unit of the electronic device and the target running time at the target frequency based on the second power consumption, the first power consumption for each application, the first frequency point requested by each application, and the first running time of each application at the corresponding first frequency point; and control the operation of the electronic device based on the target frequency and the target running time.

[0219] Thus, based on the load scenarios of N applications running on the electronic device, the target temperature thresholds corresponding to the N applications under the load scenarios, the first frequency points applied for by the N applications according to their own computing power, and the first running time of each application at the first frequency point, the target frequency point and the target running time at the target frequency point of each application are adjusted to achieve temperature control of the electronic device. In this way, compared with the prior art, which regulates the temperature of the electronic device by uniformly reducing the running frequency point of each application in the central processing unit according to the temperature control parameters, the temperature control scheme of this application embodiment can provide the electronic device with a target frequency point and a target running time at the target frequency point in a targeted manner according to the computing power required by different applications. While achieving the temperature control effect of the electronic device, it avoids affecting the performance of the electronic device.

[0220] Optionally, the processor 610 is further configured to obtain the weight and surface area of ​​the electronic device, and the ambient temperature of the environment in which the electronic device is located after each application runs for the first running time according to the corresponding target temperature threshold; for each application, based on the target temperature threshold of the application, the ambient temperature, the weight of the electronic device, and the surface area of ​​the electronic device, determine the first power consumption required for the application to run for the first running time according to the target temperature threshold corresponding to the application under the load scenario corresponding to the application.

[0221] Thus, for each application, based on the application's target temperature threshold, ambient temperature, the weight of the electronic device, and the surface area of ​​the electronic device, the first power consumption required for the application to run for the first time under its corresponding load scenario can be accurately obtained according to the temperature rise formula described above.

[0222] Optionally, the processor 610 is further configured to acquire the current temperature of each application; for each application, based on the current temperature of the application, determine the third power consumption required for the application to run for the first running time under the load scenario corresponding to the application at the current temperature; sum the first power consumption corresponding to each application to obtain a first total power consumption; sum the third power consumption corresponding to each application to obtain a second total power consumption; and determine the second power consumption corresponding to the thermal margin of the electronic device based on the first total power consumption and the second total power consumption.

[0223] Thus, for each application, based on the application's current temperature, the third power consumption required for the application to run for a first time under its corresponding load scenario at the current temperature is determined. Then, the first power consumption corresponding to each application is summed to obtain the first total power consumption, and the third power consumption corresponding to each application is summed to obtain the second total power consumption. Based on the first total power consumption and the second total power consumption, the second power consumption corresponding to the thermal margin of the electronic device can be accurately determined.

[0224] Optionally, the processor 610 is further configured to, when N=1, determine the target frequency of the central processing unit of the electronic device and the target running time at the target frequency based on the second power consumption, the first power consumption of the application, the first frequency point requested by the application, and the first running time of the application at the first frequency point; and when N≥2, determine the target frequency of the central processing unit of the electronic device and the target running time at the target frequency based on the second power consumption, the sum of the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

[0225] Thus, by determining the target frequency and target runtime of the central processing unit (CPU) of an electronic device based on the number of applications requesting the frequency, the flexibility in determining the CPU's target frequency and target runtime is improved.

[0226] Optionally, the processor 610 is further configured to, when N=1 and the first power consumption is less than or equal to the second power consumption, determine the first frequency point requested by the application as the target frequency point of the central processing unit of the electronic device, and determine the first running time under the first frequency point requested by the application as the target running time of the central processing unit of the electronic device; when the first power consumption is greater than the second power consumption, determine the second frequency point supported by the central processing unit and the second running time under the second frequency point based on the second power consumption; determine the second frequency point as the target frequency point of the central processing unit of the electronic device, and determine the second running time as the target running time of the central processing unit of the electronic device.

[0227] Thus, when only one application requests a frequency point, if the second power consumption can meet the application's requested first frequency point and first running time, the frequency can be increased according to the application's requested first frequency point and first running time. If the second power consumption cannot meet the application's requested first frequency point and first running time, the application can be increased according to the maximum power consumption that the second power consumption can provide. In this way, based on the relationship between the first power consumption and the second power consumption, the target frequency point and target running time of the central processing unit can be determined in different ways, further improving the flexibility of determining the target frequency point and target running time of the central processing unit.

[0228] Optionally, the processor 610 is further configured to, when N≥2, determine the first frequency point requested by each application as the target frequency point of the central processing unit of the electronic device, and determine the first running time under the first frequency point requested by each application as the target running time of the central processing unit of the electronic device, when the sum of the first power consumption corresponding to each application is less than or equal to the second power consumption; and when the sum of the first power consumption corresponding to each application is greater than the second power consumption, determine the target frequency point of the central processing unit of the electronic device and the target running time under the target frequency point according to the priority of each application, the first frequency point requested by each application, and the first running time of each application under the first frequency point.

[0229] Thus, when multiple applications apply for frequency points, if the sum of the first power consumption of each application is less than or equal to the second power consumption, frequency points and running times can be provided to each application according to the first frequency point and the first running time applied for by each application. If the sum of the first power consumption of each application is greater than the second power consumption, the target frequency point and the target running time of the central processing unit of the electronic device can be determined according to the priority of each application, the first frequency point applied for by each application and the first running time of each application at the first frequency point. This further improves the flexibility of the target frequency point and the target running time of the central processing unit.

[0230] Optionally, the processor 610 is further configured to, if the first application's first running time at the required first frequency point is greater than a window period, determine the first frequency point required by the first application as the target frequency point of the central processing unit within the window period, and determine the window period as the target running time of the central processing unit at the target frequency point, wherein the first application is any one of the applications.

[0231] Thus, if the first application's first running time at the required first frequency point is greater than a window period, the first frequency point required by the first application can be determined as the target frequency point of the central processing unit within the window period, and the window period can be determined as the target running time of the central processing unit at the target frequency point. In this way, if the first application's first running time at the required first frequency point is greater than a window period, the frequency of the first application can be increased according to the frequency point applied for by the first application within the window period, thereby reducing the temperature of the electronic device while ensuring the performance of the first application as much as possible.

[0232] It should be understood that, in this embodiment, the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042. The GPU 6041 processes image data of still images or videos obtained by an image capture device (such as a color camera) in video capture mode or image capture mode. The display unit 606 may include a display panel 6061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0233] The memory 609 can be used to store software programs and various data. The memory 609 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 609 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 609 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0234] Processor 610 may include one or more processing units; optionally, processor 610 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 610.

[0235] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the control method embodiments of the above-described electronic device and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0236] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0237] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the control method embodiment of the above-mentioned electronic device, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0238] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0239] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the control method embodiment of the electronic device described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0240] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0241] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0242] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A control method for an electronic device, characterized in that, The method includes: Based on the load scenarios corresponding to the N applications running in the electronic device, and the temperature thresholds under different load scenarios, determine the target temperature threshold for each application under the corresponding load scenario, where N is a positive integer; For each application, determine the first power consumption required for the application to run for a first time under the load scenario corresponding to the application, according to the target temperature threshold corresponding to the application; the first running time is the running time requested by the application. Based on the first power consumption corresponding to each application, determine the second power consumption corresponding to the thermal margin of the electronic device; Based on the second power consumption, the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the corresponding first frequency point, the target frequency point of the central processing unit of the electronic device and the target running time at the target frequency point are determined. The electronic device is controlled to operate based on the target frequency and the target running time.

2. The method according to claim 1, characterized in that, For each application, determining the first power consumption required for the application to run for a first time under the corresponding load scenario according to the target temperature threshold of the application includes: The weight and surface area of ​​the electronic device are obtained, as well as the ambient temperature of the environment in which the electronic device is located after each application runs for the first running time according to the corresponding target temperature threshold; For each application, based on the target temperature threshold of the application, the ambient temperature, the weight of the electronic device, and the surface area of ​​the electronic device, a first power consumption required for the application to run for a first time under the load scenario corresponding to the application, according to the target temperature threshold of the application.

3. The method according to claim 1, characterized in that, The step of determining the second power consumption corresponding to the thermal margin of the electronic device based on the first power consumption corresponding to each application includes: Get the current temperature for each application; For each application, based on the application's current temperature, determine the third power consumption required for the application to run for the first running time under the load scenario corresponding to the application at the current temperature; Sum the first power consumption for each application to obtain the first total power consumption; The second total power consumption is obtained by summing the third power consumption corresponding to each application. Based on the first total power consumption and the second total power consumption, the second power consumption corresponding to the thermal margin of the electronic device is determined.

4. The method according to claim 1, characterized in that, The step of determining the target frequency of the central processing unit of the electronic device and the target running time at the target frequency based on the second power consumption, the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the corresponding first frequency point includes: When N=1, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined based on the second power consumption, the first power consumption of the application, the first frequency point requested by the application, and the first running time of the application at the first frequency point. When N≥2, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined based on the second power consumption, the sum of the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

5. The method according to claim 4, characterized in that, When N=1, determining the target frequency of the electronic device's central processing unit and the target runtime at the target frequency based on the second power consumption, the first power consumption of the application, the first frequency point requested by the application, and the first runtime of the application at the first frequency point includes: When the first power consumption is less than or equal to the second power consumption, the first frequency point requested by the application is determined as the target frequency point of the central processing unit of the electronic device, and the first running time under the first frequency point requested by the application is determined as the target running time of the central processing unit of the electronic device. If the first power consumption is greater than the second power consumption, the second frequency point supported by the central processing unit and the second running time at the second frequency point are determined based on the second power consumption. The second frequency point is determined as the target frequency point of the central processing unit of the electronic device, and the second running time is determined as the target running time of the central processing unit of the electronic device.

6. The method according to claim 4, characterized in that, When N≥2, determining the target frequency of the electronic device's central processing unit and the target running time at the target frequency based on the second power consumption, the sum of the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point includes: If the sum of the first power consumption corresponding to each application is less than or equal to the second power consumption, the first frequency point requested by each application is determined as the target frequency point of the central processing unit of the electronic device, and the first running time under the first frequency point requested by each application is determined as the target running time of the central processing unit of the electronic device. If the sum of the first power consumption of each application is greater than the second power consumption, the target frequency of the central processing unit of the electronic device and the target running time at the target frequency are determined based on the priority of each application, the first frequency point requested by each application, and the first running time of each application at the first frequency point.

7. The method according to claim 1, characterized in that, The step of determining the target frequency of the central processing unit of the electronic device and the target running time at the target frequency based on the second power consumption, the first power consumption corresponding to each application, the first frequency point requested by each application, and the first running time of each application at the corresponding first frequency point includes: If the first application's first running time at the required first frequency point is greater than a window period, the first frequency point required by the first application is determined as the target frequency point of the central processing unit within the window period, and the window period is determined as the target running time of the central processing unit at the target frequency point, wherein the first application is any one of the applications.

8. A control device for an electronic device, characterized in that, The device includes: The first determining module is used to determine the target temperature threshold of each application in the corresponding load scenario based on the load scenarios corresponding to the N applications running in the electronic device and the temperature thresholds under different load scenarios, where N is a positive integer; The second determining module is used to determine, for each application, the first power consumption required for the application to run for a first running time under the load scenario corresponding to the application according to the target temperature threshold corresponding to the application, wherein the first running time is the running time requested by the application; The third determining module is used to determine the second power consumption corresponding to the thermal margin of the electronic device based on the first power consumption corresponding to each application. The fourth determining module is used to determine the target frequency point of the central processing unit of the electronic device and the target running time at the target frequency point based on the second power consumption, the first power consumption corresponding to each application, the first frequency point applied for by each application, and the first running time of each application at the corresponding first frequency point. The operation module is used to control the operation of the electronic device according to the target frequency and the target running time.

9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the control method of the electronic device as claimed in any one of claims 1-7.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the control method for the electronic device as described in any one of claims 1-7.