Power consumption distribution method and terminal

By recording the relationship between temperature and total power consumption in the terminal, allocating budget power consumption based on the load volume of the previous cycle, and adjusting the power consumption of the core cluster according to the frequency energy efficiency ratio, the unreasonable power consumption allocation in the prior art is solved. The problem has achieved reasonable power consumption allocation and performance improvement of the core cluster.

CN119248464AActive Publication Date: 2025-01-03HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410225649.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-28
Publication Date
2025-01-03
Estimated Expiration
2044-02-28

AI Technical Summary

Technical Problem

The power consumption allocation in the prior art in the terminal is unreasonable, resulting in poor frequency energy efficiency ratio of the core cluster and the inability to effectively balance the performance and power consumption of the core cluster.

Method used

By recording the correspondence between the temperature and total power consumption of the core cluster, the budget power consumption is allocated based on the load volume of the previous cycle, and the budget power consumption is adjusted according to the frequency energy efficiency ratio of the core cluster to ensure that the sum of the frequency energy efficiency ratio reaches or exceeds the frequency energy efficiency ratio. Preset value to reasonably allocate total power consumption.

Benefits of technology

The reasonable allocation of power consumption of the core cluster is achieved, the working state of the core cluster is improved, the frequency point energy efficiency ratio is within a reasonable range, and the overall performance and efficiency of the terminal are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248464A_ABST
    Figure CN119248464A_ABST
Patent Text Reader

Abstract

The invention provides a power consumption distribution method and a terminal. In the method, the terminal determines a total power consumption that a processor can consume in a current period based on a temperature. Total power consumption is distributed based on the actual load capacity of the N core clusters in the processor in the last period, and the budget power consumption of the N core clusters in the current period is obtained. Under the condition that the sum of the frequency point energy efficiency ratios of the N core clusters is smaller than a preset energy efficiency ratio, the terminal adjusts the budget power consumption of part or all of the core clusters to obtain the required power consumption of the N core clusters in the current period; the sum of the frequency point energy efficiency ratios determined through the N required power consumption is greater than or equal to the preset energy efficiency ratio, so that the working performance of the N core clusters is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminals, and in particular to a power consumption allocation method and a terminal. Background Art

[0002] The total power consumption that the terminal's processor can consume in different cycles can vary with factors such as temperature. When the processor includes at least one core cluster, the terminal needs to allocate the total power consumption to each core cluster based on the load of each core cluster in the previous cycle to obtain the power consumption that each core cluster can consume in the current cycle. The power consumption allocated to a core cluster can affect the frequency of the core cluster in the current cycle. Generally speaking, the greater the power consumption of a core cluster in the current cycle, the higher the frequency that the core cluster can operate at. Among them, the frequency can be used to describe the operating frequency of the core cluster. A higher frequency means that the core cluster can handle more tasks, so that the core cluster can have a larger load in the current cycle.

[0003] The load of the core cluster in the current cycle will affect the power consumption allocated to the core cluster in the future. The terminal needs to reasonably allocate power consumption to each cluster according to the tasks processed by the core cluster (such as load) to balance the performance and power consumption of the core cluster. Summary of the invention

[0004] The present application provides a power consumption allocation method and a terminal, and the terminal can more reasonably allocate the total power consumption of the processor to each core cluster based on the energy efficiency ratio of each core cluster in the processor.

[0005] In a first aspect, the present application provides a power consumption allocation method, which is applied to a terminal including a processor, wherein the processor includes N core clusters, and the method includes: the terminal having a first temperature determines the total power consumption that the processor can consume in a first cycle; the corresponding relationship between the temperature and the total power consumption is recorded in the terminal; the terminal allocates the total power consumption based on the actual load of the N core clusters in the second cycle to obtain the budget power consumption of the N core clusters in the first cycle; the second cycle is the previous cycle of the first cycle; N is an integer greater than 1; the terminal determines the maximum frequency of each of the N core clusters under the budget power consumption, and then determines the frequency energy efficiency ratio of each core cluster based on the maximum frequency of the N core clusters; the corresponding relationship between the maximum frequency and the frequency energy efficiency ratio of a core cluster is recorded in the terminal; when the sum of the frequency energy efficiency ratios of the N core clusters is less than the preset energy efficiency ratio, the terminal adjusts the budget power consumption of some or all of the core clusters to obtain the required power consumption of the N core clusters in the first cycle; the sum of the frequency energy efficiency ratios determined by the N required power consumptions is greater than or equal to the preset energy efficiency ratio.

[0006] In the above embodiment, the first temperature is the temperature measured by the terminal before entering the first cycle. The first cycle may be the current cycle involved in the following embodiment, the kth cycle. The second cycle may be the previous cycle involved in the following embodiment, the k-1th cycle.

[0007] When the sum of the frequency point energy efficiency ratios of the N core clusters is less than the preset energy efficiency ratio, it means that the allocation of the total power consumption is unreasonable at this time. The terminal adjusts the budget power consumption of the core clusters to achieve a sum of the frequency point energy efficiency ratios greater than or equal to the preset energy efficiency ratio, so that the final power consumption (demand power consumption) allocated to the N core clusters is reasonable.

[0008] In combination with the first aspect, in some embodiments, the method also includes: when the sum of the frequency point energy efficiency ratios of the N core clusters is greater than or equal to the preset energy efficiency ratio, the terminal uses the budgeted power consumption of the N core clusters in the first period as the required power consumption of the N core clusters in the first period.

[0009] In the above embodiment, when the sum of the frequency energy efficiency ratios is greater than or equal to the preset energy efficiency ratio, it indicates that the allocation of the total power consumption is reasonable.

[0010] In combination with the first aspect, in some embodiments, the terminal adjusts the budget power consumption of some or all core clusters to obtain the required power consumption of N core clusters in the first period, specifically including: the terminal adjusts the maximum frequency points of X target core clusters to obtain X adjusted maximum frequency points; X is an integer less than or equal to N; the maximum frequency point of a target core cluster is obtained based on the budget power consumption of the target core cluster divided by a first parameter, and the first parameter is equal to the number of cores in the target core cluster multiplied by the duration of the first period; the terminal adjusts the budget power consumption of X target core clusters based on the X adjusted maximum frequency points respectively; the terminal uses the adjusted budget power consumption of the X target core clusters as the required power consumption of the X target core clusters in the first period, and uses the budget power consumption of NX non-target core clusters as the required power consumption of NX non-target core clusters in the first period.

[0011] In the above embodiment, when the sum of the frequency point energy efficiency ratios of the N core clusters is less than the preset energy efficiency ratio, it means that the allocation of the total power consumption at this time is unreasonable. The terminal adjusts the budget power consumption of the core cluster to achieve a sum of the frequency point energy efficiency ratios greater than or equal to the preset energy efficiency ratio, so that the final power consumption (required power consumption) allocated to the N core clusters is reasonable.

[0012] In combination with the first aspect, in some embodiments, the terminal adjusts the budget power consumption of some or all core clusters to obtain the required power consumption of N core clusters in the first period, specifically including: the terminal adjusts the maximum frequency points of X target core clusters to obtain X adjusted maximum frequency points; X is an integer less than or equal to N; the maximum frequency point of a target core cluster is obtained based on the budget power consumption of the target core cluster divided by a first parameter, and the first parameter is equal to the number of cores in the target core cluster multiplied by the duration of the first period; the terminal reallocates the total power consumption through the X adjusted maximum frequency points and the maximum frequency points of NX non-target core clusters, and adjusts the budget power consumption of N core clusters in the first period; the terminal uses the adjusted budget power consumption of N core clusters as the required power consumption of N core clusters in the first period.

[0013] In the above embodiment, when the sum of the frequency point energy efficiency ratios of the N core clusters is less than the preset energy efficiency ratio, it means that the allocation of the total power consumption at this time is unreasonable. The terminal adjusts the budget power consumption of the core cluster to achieve a sum of the frequency point energy efficiency ratios greater than or equal to the preset energy efficiency ratio, so that the final power consumption (required power consumption) allocated to the N core clusters is reasonable.

[0014] In combination with the first aspect, in some embodiments, the target core cluster includes a core cluster whose maximum frequency among the N core clusters is greater than a first preset frequency, and / or a core cluster whose maximum frequency among the N core clusters is less than a second preset frequency, and the terminal adjusts the maximum frequency of the X target core clusters, specifically including: the terminal lowers the maximum frequency of the target core cluster whose maximum frequency is greater than the first preset frequency, and / or, in addition to the lowering, the terminal also increases the maximum frequency of the target core cluster whose maximum frequency is less than the second preset frequency.

[0015] In the above embodiment, the frequency-point energy efficiency ratio of the core cluster measures how much performance can be achieved within the unit power consumption of the core cluster. If the frequency-point energy efficiency ratio of the core cluster is within a reasonable range, the working state of the core cluster is better, but it is not the higher the better, nor the lower the better. A bad but high energy efficiency means that the frequency of the core cluster is too large, resulting in the core cluster being able to run more tasks but with low efficiency. A bad but low energy efficiency means that the frequency of the core cluster is too small, resulting in the core cluster running fewer tasks and low efficiency. Therefore, it is necessary to lower the maximum frequency corresponding to the core cluster with a higher energy efficiency ratio so that the energy efficiency ratio of the core cluster can be improved. The maximum frequency corresponding to the core cluster with a lower energy efficiency ratio is increased so that the energy efficiency ratio of the core cluster can be improved.

[0016] In combination with the first aspect, in some embodiments, the terminal allocates the total power consumption based on the actual load of the N core clusters in the second period, and obtains the budgeted power consumption of the N core clusters in the first period, specifically including: the terminal determines the performance frequency of each core cluster based on the actual load of the N core clusters; the correspondence between the actual load and performance frequency of a core cluster is recorded in the terminal; the terminal allocates the total power consumption based on the performance frequency of the N core clusters, and obtains the budgeted power consumption of the N core clusters in the first period; the budgeted power consumption allocated to a core cluster divided by the total power consumption is equal to the performance frequency of the one core cluster divided by the sum of the performance frequencies of the N core clusters.

[0017] In combination with the first aspect, in some embodiments, after obtaining the required power consumption of N core clusters in the first period, the method also includes: when the task on the first core cluster changes, the terminal determines the predicted demand frequency of the first core cluster based on the budgeted load required to complete the task; when the predicted demand frequency is less than or equal to the maximum frequency of the first core cluster, the terminal uses the predicted demand frequency as a demand frequency of the first core cluster in the first period.

[0018] In combination with the first aspect, in some embodiments, the method also includes: when the predicted demand frequency is greater than the maximum frequency of the first core cluster, the terminal determines the overflow power consumption on the first core cluster when adopting the predicted demand frequency; the terminal determines a demand frequency of the first core cluster in the first cycle based on the overflow power consumption, the predicted demand frequency and the total remaining power consumption on the first core cluster; wherein the overflow power consumption on the first core cluster is equal to the power consumption required to adopt the predicted demand frequency during the remaining time of the first cycle minus the power consumption required to adopt the maximum frequency during the remaining time; the total remaining power consumption on the first core cluster is equal to the power consumption required to adopt the maximum frequency during the used time of the first cycle minus the power consumption consumed during the used time.

[0019] In combination with the first aspect, in some embodiments, the terminal determines a demand frequency of the first core cluster in the first period based on the overflow power consumption, the predicted demand frequency and the total remaining power consumption on the first core cluster, specifically including: when it is determined that the total remaining power consumption can offset the overflow power consumption, the terminal uses the predicted demand frequency as a demand frequency of the first core cluster in the first period; when it is determined that the total remaining power consumption cannot offset the overflow power consumption, the terminal uses the maximum frequency of the first core cluster as a demand frequency of the first core cluster in the first period.

[0020] In the above embodiment, when the demand frequency is greater than the maximum frequency, the power consumption equivalent to the additional power consumption of the demand frequency is boosted by the remaining power consumption of the demand frequency already adopted in the current cycle. However, whether boosting is possible needs to be judged. Boosting is only supported when the total remaining power consumption can offset the overflow power consumption, so that the power consumption usage will not exceed the limit while increasing the frequency.

[0021] In combination with the first aspect, in some embodiments, the total remaining power consumption can offset the overflow power consumption, specifically including: the total remaining power consumption is greater than the overflow power consumption, or the total remaining power consumption minus the overflow power consumption is greater than a preset power consumption value.

[0022] In the above embodiment, the limitation that the total remaining power consumption minus the overflow power consumption is greater than the preset power consumption value can better ensure that the additional power consumption generated when using a required frequency greater than the maximum frequency is less than the total remaining power consumption when boosting is performed.

[0023] In a second aspect, an embodiment of the present application provides a terminal, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the terminal to execute the method implemented in the first aspect.

[0024] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a terminal, causes the terminal to execute the method implemented in the first aspect.

[0025] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to a terminal. The chip system includes one or more processors, and the processor is used to call computer instructions so that the terminal executes the method implemented in the first aspect.

[0026] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a terminal, enables the terminal to execute the method implemented in the first aspect.

[0027] It is understandable that the terminal provided in the second aspect, the computer storage medium provided in the third aspect, the chip system provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, other beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A comparison chart showing the impact of three power consumption allocation methods on frequency points is shown;

[0029] Figure 2 A schematic diagram is shown when allocating power consumption to a core cluster;

[0030] Figure 3 Another schematic diagram when allocating power consumption to a core cluster is shown;

[0031] Figure 4A and Figure 4B A schematic diagram is shown for determining the demand frequency point;

[0032] Figure 5 is a software system block diagram of a terminal in an embodiment of the present application;

[0033] Figure 6 An exemplary module interaction diagram involved in implementing the power consumption allocation method is shown;

[0034] Figure 7 An exemplary flow chart for adjusting budgeted power consumption is shown;

[0035] Figure 8 An exemplary flow chart for adjusting budgeted power consumption is shown;

[0036] Fig. 9 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application. DETAILED DESCRIPTION

[0037] In one approach, if Figure 1 As shown in (1), affected by the terminal temperature control strategy, when the temperature rises to a certain threshold, the power consumption of each core cluster will be set to a fixed power consumption. And implement the frequency limiting strategy 1: limit the frequency of each core cluster in a period T (for example, T = 50ms) to the frequency corresponding to the fixed power consumption. When the temperature does not drop, the limited frequency of the core cluster remains unchanged in each period. The fixed power consumption will not be too high and the limited frequency will not be too high. Its purpose is to limit the speed at which the core cluster processes tasks, reduce the heat generated by the core cluster due to processing tasks, and then control the terminal temperature.

[0038] Here, the temperature of the terminal includes the temperature of the rear case of the terminal, which can be measured by a temperature sensor of the terminal.

[0039] However, the temperature control strategy only considers the impact of temperature on the power consumption and frequency of the core cluster, but does not consider the actual load of each core cluster during operation, and does not reasonably allocate power consumption. When the core cluster is assigned a task with a large load, but the frequency is limited, the core cluster cannot complete the task well, causing the terminal to become hot and stuck.

[0040] It should be noted that a core cluster in a processor may include at least one core. Generally, a small core in a processor may be divided into a core cluster, a medium core may be divided into a core cluster, and a large core may be divided into a core cluster.

[0041] In another scheme, if Figure 1 As shown in (2), the terminal can use intelligent power allocation (IPA) technology to allocate power consumption and adjust frequency according to a period (e.g., T = 50ms). The process includes: allocating the budget power consumption of each core cluster in the current period based on the actual load of each core cluster in the previous period. And implement frequency limiting strategy 2: adjust the frequency of each core cluster in the current period to the required frequency, which does not exceed the maximum frequency corresponding to the budget power consumption. Among them, the required frequency is determined based on the budget load of the core cluster in the current period. If the required frequency determined based on the budget load of the current period is greater than the maximum frequency, the maximum frequency is used as the required frequency of the core cluster. The budget load represents the load required to run these tasks in the current period estimated before the core cluster runs the task. It can be used to describe the task volume. The larger the load, the larger the task volume. The predicted required frequency represents a frequency that can complete the task before the core cluster runs the task. The maximum frequency point indicates the operating frequency when the core cluster runs all the time in a cycle and uses up all the budgeted power consumption, which can be understood as the core cluster is fully loaded under the budgeted power consumption in a cycle. The detailed process of determining the maximum frequency point based on the budgeted power consumption can refer to the description of step S104 below, which will not be repeated here.

[0042] It should be noted that the correspondence between the budgeted load and the predicted demand frequency is recorded in the terminal.

[0043] The process of using IPA to allocate power consumption to each core cluster can be referred to Figure 2 Description.

[0044] like Figure 2 As shown, a processor including N core clusters is used as an example for explanation. N is an integer greater than or equal to 1. First, the terminal determines the performance frequency of the i-th core cluster in the current cycle based on the actual load of the i-th core cluster in the previous cycle. As i changes from 1 to N, the terminal can determine the performance frequency of each of the N core clusters. Among them, the actual load of the cluster represents the actual load used when the core cluster runs a task. The correspondence between the actual load and the performance frequency is recorded in the terminal.

[0045] Continue to refer Figure 2The terminal obtains the total power consumption that can be consumed by N core clusters in the current cycle through the temperature control center (thermal) according to the current temperature. Then the total power consumption is allocated according to the N performance frequency points to obtain the budget power consumption of each of the N core clusters in the current cycle. The budget power consumption allocated to a core cluster divided by the total power consumption is equal to the performance frequency point of the core cluster divided by the sum of the performance frequencies of the N core clusters.

[0046] However, this solution only considers the actual load of the previous cycle when allocating total power consumption. This will result in a core cluster with a larger actual load in the previous cycle being more likely to be allocated more budget power consumption in the current cycle. More budget power consumption means that the core cluster can run at a higher frequency (demand frequency) in the current cycle, and can attract more tasks in the current cycle, generating a larger actual load, and more budget power consumption is allocated in the next cycle. Repeatedly, under the condition of a certain total power consumption, some core clusters are allocated more and more budget power consumption, while other core clusters are allocated less and less budget power consumption. The power consumption allocation has reached two extremes: "a lot" or "a little", resulting in the demand frequency of each core cluster also reaching two extremes: "very high" or "very low". In practice, it is found that both very high demand frequency and very low demand frequency will make the frequency energy efficiency ratio of the core cluster in a bad range. The frequency energy efficiency ratio of the core cluster measures how much performance the core cluster can achieve within the unit power consumption. It can also be understood that if the frequency-point energy efficiency ratio of the core cluster is within a reasonable range, the working state of the core cluster is better. The higher the sum of the frequency-point energy efficiency ratios of N core clusters, the better the working state of the CPU.

[0047] In order to solve the problem of poor frequency energy efficiency ratio caused by unreasonable allocation of total power consumption, a power consumption allocation method is provided. In this method, the terminal can improve the above-mentioned IPA to achieve a more reasonable allocation of total power consumption. The process of allocating power consumption to each core cluster in this method can refer to Figure 3 Description.

[0048] like Figure 3 As shown, a processor including N core clusters is used as an example for explanation. N is an integer greater than or equal to 1. Compared with the aforementioned IPA, the terminal still first determines the performance frequency of the i-th core cluster in the current cycle based on the actual load of the i-th core cluster in the previous cycle. When i changes from 1 to N, the terminal can determine the performance frequency of each of the N core clusters. Then, the terminal obtains the total power consumption that can be consumed by the N core clusters in the current cycle according to the current temperature through the temperature control center (thermal). Then, the total power consumption is allocated according to the N performance frequencies to obtain the budgeted power consumption of the N core clusters in the current cycle, and the budgeted power consumption of the N core clusters in the current cycle is obtained.

[0049] Compared with the above Figure 2 The IPA shown in Figure 3 The difference is that after obtaining the budget power consumption of N clusters in the current cycle, the terminal will also determine whether the budget power consumption is reasonable based on the frequency energy efficiency ratio. If it is unreasonable, the budget power consumption of some or all core clusters will be adjusted to obtain the required power consumption of N core clusters in the current cycle (also referred to as the adjusted budget power consumption). This adjustment process can be repeated. The condition for ending the cycle can be: the sum of the frequency energy efficiency ratios determined by the N required power consumptions is greater than or equal to the preset energy efficiency ratio.

[0050] Among them, the process of judging whether the budgeted power consumption is reasonable includes: first, the terminal determines the maximum frequency of each of the N core clusters under the budgeted power consumption. Here, the power consumption allocated to a core cluster (including the budgeted power consumption or the required power consumption) can determine the maximum frequency of a core cluster. The terminal then determines the frequency energy efficiency ratio of each core cluster based on the maximum frequency of the N core clusters. Then, the terminal determines the sum of the frequency energy efficiency ratios of the N core clusters. When the sum of the frequency energy efficiency ratios is greater than or equal to the preset energy efficiency ratio, the terminal determines that the budgeted power consumption is reasonable. When the sum of the frequency energy efficiency ratios is less than the preset energy efficiency ratio, the terminal determines that the budgeted power consumption allocated to the N core clusters is unreasonable. It should be noted that the correspondence between the maximum frequency of a core cluster and the frequency energy efficiency ratio is recorded in the terminal.

[0051] When it is determined that the budget power consumption allocated to the N core clusters is unreasonable, the terminal may adjust the budget power consumption once in the following ways, including but not limited to the following two ways of adjusting power consumption.

[0052] Power consumption adjustment method 1: First, the terminal adjusts the maximum frequency points of the X target core clusters to obtain X adjusted maximum frequency points. Then, the budget power consumption of the X target core clusters is adjusted based on the X adjusted maximum frequency points. Then, the terminal uses the adjusted budget power consumption of the X target core clusters as the required power consumption of the X target core clusters in the current cycle, and uses the budget power consumption of the NX non-target core clusters as the required power consumption of the NX non-target core clusters in the current cycle. X is an integer less than or equal to N. For the detailed process of power consumption adjustment method 1, please refer to the following description. Figure 7 The description of is not repeated here.

[0053] In some possible cases, the target core cluster may include a core cluster whose maximum frequency is greater than preset frequency 1 among the N core clusters, and / or a core cluster whose maximum frequency is less than preset frequency 2 among the N core clusters. The terminal adjusts the maximum frequency of the X target core clusters, including: the terminal lowers the maximum frequency of the target core cluster whose maximum frequency is greater than preset frequency 1, and / or the terminal also increases the maximum frequency of the target core cluster whose maximum frequency is less than preset frequency 2.

[0054] In some other possible cases, the target core cluster may further include the highest maximum frequency point and / or the lowest maximum frequency point among the N core clusters. The terminal adjusts the maximum frequency points of the X target core clusters, including: the terminal lowers the highest maximum frequency point, and / or the terminal also increases the lowest maximum frequency point.

[0055] Power consumption adjustment method 2: First, the terminal adjusts the maximum frequency points of the X target core clusters to obtain X adjusted maximum frequency points. The terminal then reallocates the total power consumption through the X adjusted maximum frequency points and the maximum frequency points of the NX non-target core clusters to obtain the adjusted budget power consumption of the N core clusters in the current cycle. Then, the terminal uses the adjusted budget power consumption of the N core clusters as the required power consumption of the N core clusters in the current cycle. For the detailed process of power consumption adjustment method 2, please refer to the following Figure 8 The description of is not repeated here.

[0056] Subsequently, the terminal determines the demand frequency of each core cluster in the current period based on the required power consumption of the N core clusters in the current period.

[0057] In some possible cases, the terminal may implement the aforementioned frequency limiting strategy 2 to determine the required frequency point of each core cluster in the current cycle. For the relevant content of frequency limiting strategy 2, please refer to the aforementioned description, which will not be repeated here.

[0058] However, if Figure 1 As shown in (2), in frequency limiting strategy 2, there is only one demand frequency point in a cycle. The demand frequency point is determined based on the budget load required by all tasks in a cycle, taking into account the average level of all tasks on the core cluster in a cycle. The demand frequency point is strictly controlled to be less than the maximum frequency point. Although the demand frequency point is always set to be less than or equal to the maximum frequency point, it will not exceed and cause the core cluster to over-power consumption in the current cycle, but this single demand frequency point cannot adapt to the performance requirements of the core cluster. The reason for not being able to adapt to the performance requirements is that the tasks on the core cluster may change within a cycle, and there may be some tasks that require a large load. The large load can only be met when the demand frequency point is greater than the maximum frequency point. There may also be some tasks that require a small load, and a smaller frequency point can meet the tasks with a small load.

[0059] In other possible cases, such as Figure 1 As shown in (3), in order to better adapt to the performance requirements of the core cluster in a cycle (for example, T = 50ms), multiple frequency adjustments can be performed in a cycle. The frequency adjustment timing includes: when a task on the core cluster changes in a cycle, a frequency adjustment is triggered.

[0060] In some possible cases, the first demand frequency point in a cycle may be the demand frequency point determined based on the aforementioned frequency limiting strategy 2. Subsequently, when a change in the task on the core cluster is detected, a frequency adjustment is triggered to determine a new demand frequency point.

[0061] The frequency modulation process includes: the terminal determines a predicted demand frequency point of the core cluster based on the budget load required to complete the task (the changed task). In some possible embodiments, the tasks on the core cluster can be measured by the number of threads, for example, one thread or multiple threads. The specific number of threads can be set according to actual needs, and the embodiments of the present application are not limited to this.

[0062] like Figure 4A (1) and Figure 4A As shown in (2), when the predicted demand frequency (eg, demandFreq1 and demandFreq2) is less than or equal to the maximum frequency of the core cluster, the terminal uses the predicted demand frequency as a demand frequency of the core cluster in the current period (eg, T=50ms).

[0063] When the predicted demand frequency (e.g., demandFreq3) is greater than the maximum frequency of the core cluster, then if the predicted demand frequency is adopted, the terminal will generate overflow power consumption in the remaining time of the current cycle. When it is determined that the total remaining power consumption of the current cycle cannot offset the overflow power consumption, the terminal uses the maximum frequency as a demand frequency of the core cluster in the current cycle (e.g., T=50ms). When it is determined that the total remaining power consumption of the current cycle can offset the overflow power consumption, the terminal uses the predicted demand frequency as a demand frequency of the core cluster in the current cycle (e.g., T=50ms).

[0064] like Figure 4B As shown in the figure, the overflow power consumption on the core cluster is equal to the power consumption required to adopt the predicted demand frequency point in the remaining time of the current cycle minus the power consumption required to adopt the maximum frequency point (maxFreq) in the remaining time. The total remaining power consumption on the core cluster is equal to the power consumption required to adopt the maximum frequency point in the used time of the current cycle minus the loss power consumption (consumed power consumption) of the used demand frequency point in the used time.

[0065] like Figure 4A As shown in (3), when the demand frequency (such as demandFreq3) is greater than the maximum frequency (maxFreq), the additional power consumption of the demand frequency is boosted by the remaining power consumption of the demand frequency (including demandFreq1 and demandFreq2) already used in the current cycle.

[0066] It should be noted that the additional power consumption of a demand frequency is equal to the loss power consumption of the demand frequency during the frequency duration minus the power consumption that can be consumed by the demand frequency. The power consumption that can be consumed by a demand frequency is equal to the frequency duration × the unit power consumption of the maximum frequency (maxFreq). The unit power consumption of the maximum frequency is equal to the demand power consumption of the current cycle divided by the cycle duration.

[0067] It should also be noted that the reason why the demand frequency point that has been adopted has residual power consumption (corresponding to the frequency point) is because the loss power consumption of the demand frequency point during the duration of the frequency point is less than the power consumption that can be consumed by the demand frequency point, resulting in residual power consumption.

[0068] Here, the power loss of a demand frequency point is equal to the unit power consumption of the frequency point × the frequency point operation time (less than or equal to the frequency point duration t1). The method of calculating the frequency point operation time of the demand frequency point A can refer to the following formula (1).

[0069] Frequency point operation time = frequency point historical operation time + (t1-core cluster idle time) Formula (1)

[0070] The core cluster in formula (1) represents the core cluster holding the demand frequency point A.

[0071] Figure 5 It is a software system block diagram of the terminal of an embodiment of the present application.

[0072] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: application layer, application framework layer, runtime, system library, and kernel layer.

[0073] The application layer can include a series of application packages.

[0074] like Figure 5 As shown, the application package may include applications (also referred to as apps) such as camera, calendar, and map.

[0075] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0076] The application framework layer may include a window manager, a content provider, and the like.

[0077] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0078] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the system.

[0079] The core library consists of two parts: one part is the function that the programming language (for example, Java language) needs to call, and the other part is the core library of the system.

[0080] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the programming files of the application layer and the application framework layer (for example, java files) as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0081] The system library can include multiple functional modules, such as surface manager and media libraries.

[0082] The kernel layer is the layer between hardware and software.

[0083] The modules involved in completing the aforementioned power consumption method are mainly located in the kernel layer of the system.

[0084] The core layer includes at least a data acquisition module, a power budget decision module and a frequency control module.

[0085] Among them, the acquisition module can be used to output the data required for power consumption allocation and required frequency determination, such as total power consumption, required power consumption, and total remaining power consumption.

[0086] The acquisition module includes a total power consumption acquisition module, a required power consumption allocation module, a margin calculation module and a temperature acquisition module.

[0087] The power consumption acquisition module can be used to determine the total power consumption involved above. The determination process can be: the total power consumption acquisition module calls the temperature acquisition module to obtain the temperature of the terminal. The temperature can be the temperature of the back shell of the terminal. The total power consumption corresponding to the temperature of the terminal is then determined based on the temperature and PB mapping table. Among them, the temperature and PB mapping table is based on thermal / performance decisions and PB (PowerBudget) decisions. The temperature and PB mapping table reflects the impact of temperature on power consumption. For example, controlling the terminal at a higher temperature can consume more total power consumption than at a lower temperature, but the specific increase in total power consumption is affected by the terminal's heat dissipation capacity and performance.

[0088] The demand power consumption allocation module is used to adopt the aforementioned power consumption allocation method to allocate the total power consumption to the N core clusters to obtain the demand power consumption of the N core clusters. When the demand power consumption allocation module determines the demand power consumption, it will call the energy efficiency ratio decision module involved below to determine the sum of the energy efficiency ratios of each core cluster, so as to determine whether it is necessary to continue to adjust the budget power consumption of the N core clusters based on the sum of the energy efficiency ratios.

[0089] The margin calculation module is used to count the total remaining power consumption of the frequency points that have been used by the core cluster in the current cycle.

[0090] The frequency control module is used to adjust the required frequency of each core cluster according to the required power consumption of each core cluster in the current cycle.

[0091] The frequency control module includes a demand frequency point control module, an energy efficiency ratio decision module and a performance breakthrough decision module.

[0092] Among them, the demand frequency control module is used to determine the demand frequency of the core cluster when it is detected that the task on the core cluster has changed (after the change). When the predicted demand frequency is greater than the maximum frequency of the core cluster, the demand frequency control module calls the performance breakthrough decision module to determine whether the total remaining power consumption can offset the overflow power consumption, and feeds the result back to the demand frequency control module. The demand frequency control module determines whether the demand frequency when the task is completed (after the change) is the predicted demand frequency or the maximum frequency based on the result.

[0093] about Figure 5 The interaction process between the modules involved in completing the power consumption allocation method can be referred to the following Figure 6 Description.

[0094] Figure 6 The modules involved include Figure 5 The total power consumption acquisition module, energy efficiency ratio decision module, demand power consumption allocation module, demand frequency point control module, margin calculation module and performance breakthrough decision module shown in the figure. The process of realizing power consumption allocation and frequency point calculation based on each module can refer to the following description of steps S101 to S110, step S111a and step S111b.

[0095] S101. The total power consumption acquisition module obtains the total power consumption of N core clusters in the kth cycle based on the temperature.

[0096] The temperature here usually refers to the temperature of the back shell of the terminal. There is usually a corresponding relationship between the temperature and the power budget. The corresponding relationship can be recorded in the PB (Power Budget) mapping table of the terminal.

[0097] Here, the kth cycle can be regarded as the current cycle of the terminal involved in the aforementioned content.

[0098] S102. The demand power consumption allocation module obtains the performance frequency points of the N core clusters in the k-1th cycle.

[0099] The k-1th cycle is the previous cycle of the kth cycle.

[0100] The performance frequency of one of the N core clusters in the k-1th cycle is the actual operating frequency of the core cluster after it runs. The performance frequency is affected by the actual load, and the corresponding relationship between the actual load and the performance frequency is recorded in the terminal. Generally speaking, the larger the actual load, the larger the performance frequency. For the description of the actual load, please refer to the above-mentioned related content, which will not be repeated here.

[0101] The demand power consumption allocation module determines the performance frequency point of each core cluster in the k-1th cycle according to the actual load of the N core clusters in the k-1th cycle.

[0102] S103. The demand power consumption allocation module allocates the total power consumption according to the N performance frequency points to obtain the budget power consumption of the N core clusters in the kth cycle.

[0103] The required power consumption allocation module can allocate the total power consumption in proportion to the N performance frequencies, which means that the budget power consumption allocated to one of the N core clusters divided by the total power consumption is equal to the performance frequency of the one core cluster divided by the sum of the performance frequencies of the N core clusters.

[0104] S104. The demand power consumption allocation module determines the maximum frequency points of each of the N core clusters under the budget power consumption.

[0105] The maximum frequency of a core cluster indicates the operating frequency when the core cluster runs continuously in the kth cycle and the budgeted power consumption of the core cluster is fully used up. If the core cluster runs continuously in the kth cycle and the operating frequency is always greater than the maximum frequency, the power consumption of the core cluster will be greater than the budgeted power consumption.

[0106] It should be noted here that a core cluster being running means that there are tasks being executed on the core cluster.

[0107] In some possible cases, the relationship 1 for determining the maximum frequency point of a core cluster through the budget power consumption of the core cluster can refer to the following formula (2).

[0108]

[0109] In formula (2), the number of cores is the number of cores included in the core cluster that is required to obtain the maximum frequency point. The cycle duration represents the duration of the kth cycle.

[0110] Subsequently, the required power consumption allocation module returns the N maximum frequency points to the energy efficiency ratio decision module, so that the energy efficiency ratio decision module can execute the following step S105 to determine the sum of the frequency point energy efficiency ratios of the N core clusters.

[0111] S105. The energy efficiency ratio decision module determines the frequency energy efficiency ratio of each core cluster according to the maximum frequency of each core cluster, and returns the sum of the frequency energy efficiency ratios corresponding to the N frequency energy efficiency ratios to the demand power consumption allocation module.

[0112] The sum of the frequency-point energy efficiency ratios in step S105 predicts the performance of the N core clusters under the budgeted power consumption.

[0113] When the sum of the frequency point energy efficiency ratios is greater than or equal to the preset energy efficiency ratio, it means that the performance of the N core clusters can be better based on the budget power consumption of the N core clusters that have been obtained. Therefore, the budget power consumption of the N core clusters can be used as the required power consumption of the N core clusters. For the content involved in this situation, please refer to the above description, which will not be repeated here.

[0114] When the sum of the frequency point energy efficiency ratios is less than the preset energy efficiency ratio, it indicates that the performance of the N core clusters is poor based on the budget power consumption of the N core clusters that have been obtained. The demand power consumption allocation module can execute the following step S106 to adjust the budget power consumption to obtain a budget power consumption (also referred to as demand power consumption) that makes the sum of the frequency point energy efficiency ratios greater than the preset energy efficiency ratio.

[0115] S106. When the sum of the frequency-point energy efficiency ratios is less than the preset energy efficiency ratio, the required power consumption allocation module adjusts the budgeted power consumption of part or all of the core clusters to obtain the required power consumption of the N core clusters.

[0116] In some possible cases, the aforementioned adjustment method 1 may be used to perform step S106. At this time, the process of adjusting the budget power consumption of part or all of the core clusters may refer to the following: Figure 7 Steps S201-S205 shown in FIG.

[0117] S201. Adjust the maximum frequency points of the X target core clusters to obtain the adjusted maximum frequency points.

[0118] In some possible cases, the target core cluster includes a core cluster whose maximum frequency is greater than preset frequency 1 among the N core clusters, and / or a core cluster whose maximum frequency is less than preset frequency 2 among the N core clusters.

[0119] Adjusting the maximum frequency points of the X target core clusters includes: lowering the maximum frequency point of the target core cluster whose maximum frequency point is greater than the preset frequency point 1 by 10%, that is, the maximum frequency point after lowering is equal to the maximum frequency point before lowering multiplied by 1-10%, and / or, increasing the maximum frequency point of the target core cluster whose maximum frequency point is less than the preset frequency point 2 by 10%, that is, the maximum frequency point after increasing is equal to the maximum frequency point before lowering multiplied by 1+10%.

[0120] In some other possible cases, the target core cluster may also be other contents. For example, the target core cluster may include the highest maximum frequency point among the N core clusters, and or the lowest maximum frequency point. At this time, the method of lowering and raising the maximum frequency point can refer to the above-mentioned related description, which will not be repeated here.

[0121] It should be noted that 10% here is just an example, and it can actually be other values, such as 15%, 5%, etc., and the embodiments of the present application are not limited to this.

[0122] S202. Update the frequency energy efficiency ratio using the X adjusted maximum frequency points and NX unadjusted maximum frequency points.

[0123] The updated frequency energy efficiency ratio is equal to the sum of the frequency energy efficiency ratios determined by the X adjusted maximum frequency points plus the sum of the frequency energy efficiency ratios determined by the NX unadjusted maximum frequency points.

[0124] S203: Whether the sum of the updated frequency point energy efficiency ratios is greater than or equal to the preset energy efficiency ratio.

[0125] If the updated sum of the frequency energy efficiency ratios is still less than the preset energy efficiency ratio, the aforementioned steps S201 and S202 are executed cyclically, the maximum frequency of the target core cluster is adjusted again, and the sum of the frequency energy efficiency ratios is updated. The loop ends until there is no target core cluster or the updated sum of the frequency energy efficiency ratios is greater than or equal to the preset energy efficiency ratio.

[0126] When the updated sum of the frequency-point energy efficiency ratios is greater than or equal to the preset energy efficiency ratio, the following steps S204 and S205 are performed.

[0127] S204. Adjust the budgeted power consumption of the X target core clusters in the kth cycle according to the adjusted maximum frequency points of the X target core clusters.

[0128] The budget power consumption of a target core cluster in the kth cycle can be determined based on the above formula (2) by using the adjusted maximum frequency point of the target core cluster. At this time, the unknown number in formula (2) is the budget power consumption of a target core cluster in the kth cycle, and the other parameters in formula (2) are all known numbers.

[0129] S205. Using the adjusted budget power consumption of the X target core clusters as the required power consumption of the X target core clusters in the kth cycle, and using the budget power consumption of the NX non-target core clusters as the required power consumption of the NX non-target core clusters in the kth cycle.

[0130] In some other possible cases, the aforementioned adjustment method 2 may be used to perform step S106. At this time, the process of adjusting the budget power consumption of part or all of the core clusters may refer to the following Figure 8 Steps S301-S305 shown in FIG.

[0131] S301. Adjust the maximum frequency points of the X target core clusters to obtain the adjusted maximum frequency points.

[0132] The content involved in step S301 is the same as that of the aforementioned step S201. Please refer to the aforementioned description of step S205, which will not be repeated here.

[0133] S302. Reallocate the total power consumption by using the X adjusted maximum frequency points and the maximum frequency points of the NX non-target core clusters, and adjust the budgeted power consumption of the N core clusters in the kth cycle.

[0134] The total power consumption is redistributed in proportion through the X adjusted maximum frequencies and the NX maximum frequencies of the non-target core clusters. This allocation process is similar to the aforementioned process of allocating the total power consumption in proportion based on the N performance frequencies, except that the N performance frequencies are replaced by the X adjusted maximum frequencies and the NX maximum frequencies of the non-target core clusters, which will not be described in detail here.

[0135] S303. Update the frequency-point energy efficiency ratios corresponding to the N core clusters respectively according to the budgeted power consumption (adjusted) of the N core clusters.

[0136] The contents involved in step S303 are similar to those involved in the aforementioned steps S104 and S105 , and the budgeted power consumption is updated to the adjusted budgeted power consumption, which will not be described in detail here.

[0137] S304: Whether the sum of the updated frequency point energy efficiency ratios is greater than or equal to the preset energy efficiency ratio.

[0138] If the updated sum of the frequency energy efficiency ratios is still less than the preset energy efficiency ratio, the aforementioned steps S301 to S303 are executed cyclically, the maximum frequency of the target core cluster is adjusted again, and the sum of the frequency energy efficiency ratios is updated. The loop ends until there is no target core cluster or the updated sum of the frequency energy efficiency ratios is greater than or equal to the preset energy efficiency ratio.

[0139] When the updated sum of the frequency point energy efficiency ratios is greater than or equal to the preset energy efficiency ratio, the following step S305 is performed.

[0140] S305 . Use the adjusted budget power consumption of the N core clusters as the required power consumption of the N core clusters in the kth cycle.

[0141] S107. In the kth cycle, the demand frequency control module detects that the tasks on core cluster 1 have changed.

[0142] In some possible cases, the tasks on the core cluster here can be measured by the number of threads, for example, one thread or multiple threads, and the specific number of threads can be set according to actual needs, which is not limited in the embodiments of the present application. At this time, a change in the task indicates a change in the number of threads.

[0143] When the task changes, a frequency adjustment is triggered. At this time, the demand frequency control module can execute step S108a to determine a predicted demand frequency of core cluster 1. And, the margin calculation module is called to execute the following step S108b to obtain the remaining power consumption to determine whether the predicted demand frequency is available in the subsequent step.

[0144] S108a. The demand frequency control module determines the predicted demand frequency of core cluster 1 based on the budgeted load required to complete the task.

[0145] Different budgeted loads may correspond to different predicted demand frequencies. The corresponding relationship between the budgeted loads and the demand frequencies is recorded in the terminal.

[0146] For the description of budgeted load and predicted demand frequency, please refer to the above content and will not be repeated here.

[0147] S108b. The demand frequency control module calls the margin calculation module to count the total remaining power consumption of the j frequency points used by the core cluster 1 in the kth period.

[0148] The total remaining power consumption on core cluster 1 is equal to the power consumption required when the maximum frequency point is used in the used time of the kth cycle minus the power consumption loss of the used required frequency point (j frequency points) in the used time. For the relevant content of determining the total remaining power consumption, please refer to the above related description, which will not be repeated here.

[0149] Here, the used time is the time from the start of the kth cycle to the time when the total remaining power consumption is counted this time.

[0150] S109. The demand frequency control module determines that the predicted demand frequency is greater than the maximum frequency corresponding to the required power consumption.

[0151] When step S109 is executed, the following steps S110 , S111 a , and S111 b are executed.

[0152] It should be noted here that step S109 is not necessarily executed, and the demand frequency control module can also be executed to determine that the predicted demand frequency is less than the maximum frequency corresponding to the required power consumption, and then determine the predicted demand frequency to be the j+1th demand frequency of core cluster 1 in the kth period.

[0153] S110. The demand frequency control module calls the performance breakthrough decision module to analyze the overflow power consumption on core cluster 1 when the predicted demand frequency is adopted, and analyzes whether the total remaining power consumption can offset the overflow power consumption.

[0154] The overflow power consumption on the core cluster 1 is equal to the power consumption required when the predicted demand frequency point is adopted in the remaining time of the kth cycle minus the power consumption required when the maximum frequency point is adopted in the remaining time.

[0155] The total remaining power consumption is equal to the power consumption required when the maximum frequency point is adopted during the used time of the kth cycle minus the loss power consumption (consumed power consumption) of the required frequency point used during the used time.

[0156] For more information about overflow power consumption and total remaining power consumption, please refer to the previous Figure 4B The description is not repeated here.

[0157] When the performance breakthrough decision module returns that the total remaining power consumption can offset the overflow power consumption, the following step S111a is executed.

[0158] When the performance breakthrough decision module returns that the total remaining power consumption can offset the overflow power consumption, the following step S111b is executed.

[0159] S111a. When the performance breakthrough decision module returns that the total remaining power consumption can offset the overflow power consumption, the demand frequency control module uses the predicted demand frequency as the j+1th demand frequency of core cluster 1 in the kth cycle.

[0160] S111b. When the performance breakthrough decision module returns that the total remaining power consumption can offset the overflow power consumption, the demand frequency control module uses the maximum frequency as the j+1th demand frequency of core cluster 1 in the kth cycle.

[0161] It should be noted that the above Figure 6 There is no particular order in which step S108a and step S108b are executed.

[0162] It should also be noted that the correspondence between the maximum frequency point and the frequency energy efficiency ratio of a core cluster is recorded in the terminal. In some possible cases, the frequency energy efficiency ratios corresponding to different maximum frequencies are obtained through measurement, and the measurement results are affected by the CPU model and the temperature of the terminal. When the CPU model and the temperature of the terminal are determined, the frequency energy efficiency ratio corresponding to a maximum frequency point can be determined based on the correspondence relationship.

[0163] The following first introduces an exemplary terminal provided in an embodiment of the present application.

[0164] Fig. 9 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application.

[0165] The following embodiment is specifically described by taking a terminal as an example. It should be understood that a terminal may have more than Fig. 9 More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Fig. 9 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0166] The terminal may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194 and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0167] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal. In other embodiments of the present application, the terminal may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0168] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0169] The controller can be the nerve center and command center of the terminal. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0170] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0171] The wireless communication function of the terminal can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0172] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0173] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the terminal.

[0174] The wireless communication module 160 can provide wireless communication solutions applied on the terminal, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), etc.

[0175] The terminal implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0176] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0177] The terminal can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.

[0178] The sensor module 180 can be used to measure data at the terminal.

[0179] Among them, the temperature sensor 180J is used to detect the temperature. In some embodiments, the terminal uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal heats the battery 142 to avoid abnormal shutdown of the terminal due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0180] Buttons 190 include a power button, a volume button, and the like.

[0181] Motor 191 can generate vibration prompts.

[0182] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0183] The SIM card interface 195 is used to connect a SIM card.

[0184] In the embodiment of the present application, the processor 110 can call the computer instructions stored in the internal memory 121 to enable the terminal to execute the method in the embodiment of the present application.

[0185] The present application also provides a chip system, which includes at least one processor, and is used to implement the functions involved in the method executed by the terminal in any of the above embodiments.

[0186] In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0187] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0188] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0189] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separated from the processor, which is not limited in the embodiment of the present application.

[0190] Exemplarily, the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip or can be set separately on different chips. The embodiments of the present application do not specifically limit the type of memory and the setting method of the memory and the processor.

[0191] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0192] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which enables a computer to execute the method executed by a terminal in any of the above embodiments when the computer program is executed.

[0193] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the terminal in any of the above embodiments.

[0194] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0195] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0196] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0197] The terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0198] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0199] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A power consumption allocation method, characterized in that: Applied to a terminal including a processor, wherein the processor includes N core clusters, the method includes: The terminal having a first temperature determines the total power consumption that the processor can consume in a first period; the corresponding relationship between the temperature and the total power consumption is recorded in the terminal; The terminal allocates the total power consumption based on the actual load of the N core clusters in the second cycle to obtain the budget power consumption of the N core clusters in the first cycle; the second cycle is the cycle before the first cycle; N is an integer greater than 1; The terminal determines the maximum frequency of each of the N core clusters under the budgeted power consumption, and then determines the frequency energy efficiency ratio of each core cluster based on the maximum frequency of the N core clusters; the correspondence between the maximum frequency of a core cluster and the frequency energy efficiency ratio is recorded in the terminal; When the sum of the frequency point energy efficiency ratios of the N core clusters is less than the preset energy efficiency ratio, the terminal adjusts the budget power consumption of part or all of the core clusters to obtain the required power consumption of the N core clusters in the first period; the sum of the frequency point energy efficiency ratios determined by the N required power consumptions is greater than or equal to the preset energy efficiency ratio.

2. The method according to claim 1, characterized in that The method further comprises: When the sum of the frequency-point energy efficiency ratios of the N core clusters is greater than or equal to the preset energy efficiency ratio, the terminal uses the budgeted power consumption of the N core clusters in the first period as the required power consumption of the N core clusters in the first period.

3. The method according to claim 1 or 2, characterized in that: The terminal adjusts the budget power consumption of part or all of the core clusters to obtain the required power consumption of the N core clusters in the first period, specifically including: The terminal adjusts the maximum frequency points of X target core clusters to obtain X adjusted maximum frequency points; X is an integer less than or equal to N; the maximum frequency point of a target core cluster is obtained based on the budget power consumption of the target core cluster divided by a first parameter, and the first parameter is equal to the number of cores of the target core cluster multiplied by the duration of the first cycle; The terminal adjusts the budget power consumption of the X target core clusters based on the X adjusted maximum frequency points respectively; The terminal uses the adjusted budget power consumption of the X target core clusters as the required power consumption of the X target core clusters in the first cycle, and uses the budget power consumption of the NX non-target core clusters as the required power consumption of the NX non-target core clusters in the first cycle.

4. The method according to claim 1 or 2, characterized in that: The terminal adjusts the budget power consumption of part or all of the core clusters to obtain the required power consumption of the N core clusters in the first period, specifically including: The terminal adjusts the maximum frequency points of X target core clusters to obtain X adjusted maximum frequency points; X is an integer less than or equal to N; the maximum frequency point of a target core cluster is obtained based on the budget power consumption of the target core cluster divided by a first parameter, and the first parameter is equal to the number of cores of the target core cluster multiplied by the duration of the first cycle; The terminal reallocates total power consumption by using the X adjusted maximum frequencies and the maximum frequencies of NX non-target core clusters, and adjusts the budgeted power consumption of the N core clusters in the first period; The terminal uses the adjusted budget power consumption of the N core clusters as the required power consumption of the N core clusters in the first period.

5. The method according to claim 3 or 4, characterized in that: The target core cluster includes a core cluster whose maximum frequency point among the N core clusters is greater than a first preset frequency point, and / or a core cluster whose maximum frequency point among the N core clusters is less than a second preset frequency point, and the terminal adjusts the maximum frequency points of the X target core clusters, specifically including: The terminal lowers the maximum frequency of the target core cluster whose maximum frequency is greater than the first preset frequency, and / or, in addition to the lowering, the terminal also raises the maximum frequency of the target core cluster whose maximum frequency is less than the second preset frequency.

6. The method according to any one of claims 3 to 5, characterized in that: The terminal allocates the total power consumption based on the actual load of the N core clusters in the second cycle to obtain the budgeted power consumption of the N core clusters in the first cycle, specifically including: The terminal determines the performance frequency of each core cluster based on the actual load of the N core clusters respectively; the corresponding relationship between the actual load of a core cluster and the performance frequency is recorded in the terminal; The terminal allocates the total power consumption based on the performance frequencies of the N core clusters to obtain the budgeted power consumption of the N core clusters in the first period; the budgeted power consumption allocated to one core cluster divided by the total power consumption is equal to the performance frequency of the one core cluster divided by the sum of the performance frequencies of the N core clusters.

7. The method according to any one of claims 1 to 6, characterized in that After obtaining the required power consumption of the N core clusters in the first cycle, the method further includes: When a task on the first core cluster changes, the terminal determines a predicted demand frequency point of the first core cluster based on a budgeted load required to complete the task; When the predicted demand frequency is less than or equal to the maximum frequency of the first core cluster, the terminal uses the predicted demand frequency as a demand frequency of the first core cluster in the first period.

8. The method according to claim 7, characterized in that The method further comprises: When the predicted demand frequency is greater than the maximum frequency of the first core cluster, the terminal determines overflow power consumption on the first core cluster when the predicted demand frequency is adopted; The terminal determines a demand frequency of the first core cluster in the first period based on the overflow power consumption, the predicted demand frequency and the total remaining power consumption on the first core cluster; wherein the overflow power consumption on the first core cluster is equal to the power consumption required to adopt the predicted demand frequency during the remaining time of the first period minus the power consumption required to adopt the maximum frequency during the remaining time; the total remaining power consumption on the first core cluster is equal to the power consumption required to adopt the maximum frequency during the used time of the first period minus the power consumption consumed during the used time.

9. The method according to claim 8, characterized in that The terminal determines a demand frequency point of the first core cluster in the first period based on the overflow power consumption, the predicted demand frequency point, and the total remaining power consumption of the first core cluster, specifically including: In a case where it is determined that the total remaining power consumption can offset the overflow power consumption, the terminal uses the predicted demand frequency point as a demand frequency point of the first core cluster in the first period; When it is determined that the total remaining power consumption cannot offset the overflow power consumption, the terminal uses the maximum frequency point of the first core cluster as a required frequency point of the first core cluster in the first period.

10. The method according to claim 9, characterized in that The total remaining power consumption can offset the overflow power consumption, specifically including: The total remaining power consumption is greater than the overflow power consumption, or the total remaining power consumption minus the overflow power consumption is greater than a preset power consumption value.

11. A terminal, characterized in that: include: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the terminal to execute the method as described in any one of claims 1-10.

12. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on a terminal, the terminal is caused to execute the method according to any one of claims 1 to 10.

13. A chip system, the chip system is applied to a terminal, characterized in that: The chip system includes one or more processors, and the processor is used to call computer instructions so that the terminal executes the method as described in any one of claims 1-10.

Citation Information

Patent Citations

  • Method and device for determining power consumption limit

    CN114730207A

  • Power budget allocation method and related equipment

    CN116997878A

  • Temperature control method and device, terminal equipment and storage medium

    CN117590880A

  • Optimal Performance and Power Management With Two Dependent Actuators

    US20100057404A1

  • Optimizing power consumption by dynamic workload adjustment

    US20110213508A1