Power consumption control method of electronic equipment and electronic equipment
By obtaining the power consumption relationship corresponding to the first mode in the electronic device, priority is given to ensuring the power consumption proportion of the memory, the problem of limited memory bandwidth in electronic devices under low power or non-standard power supply is solved, and the operation speed of applications with high memory dependence is improved.
Patent Information
- Application Number
- CN202510401091.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-18
AI Technical Summary
When electronic devices are not connected to standard power, the power consumption of the processing system is limited, affecting the memory bandwidth and processing speed, resulting in poor user experience.
By determining the application set currently running in the electronic device, obtaining the first power consumption relationship corresponding to the first mode, managing the operating power consumption of the target hardware unit, so that the power consumption proportion of the target memory is greater than that of the non-first mode in the first mode, giving priority to ensuring the power consumption limit of the memory, and improving the application speed with high memory dependence.
Under limited power conditions, the operation speed of applications with high memory dependence is improved, ensuring that electronic devices can still operate efficiently under low power or non-standard power supply conditions.
Smart Images

Figure CN120335588A_ABST
Abstract
Description
Technical Field
[0001] This application relates to power supply configuration technology, and more specifically, to a method for controlling the power consumption of an electronic device and an electronic device. Background Art
[0002] When some processing systems are running a certain type of application, the bottleneck restricting the processing speed lies not in the computing power of the processor, but in the bandwidth of the memory corresponding to the processor.
[0003] When the electronic device is not connected to a standard power supply, due to the limitation of the discharge capacity of the device battery, the total power consumption of the processing system will be restricted, which in turn affects the corresponding memory bandwidth and processing speed, resulting in a poor user experience. Summary of the Invention
[0004] In view of this, this application provides the following technical solutions:
[0005] The first aspect of this application provides a method for controlling the power consumption of an electronic device, and the method includes:
[0006] Determine the set of applications currently running on the electronic device;
[0007] If the electronic device is in the first mode and the set of applications includes a target application, obtain the first power consumption relationship corresponding to the first mode;
[0008] Manage the operating power consumption of the target hardware unit according to the first power consumption relationship, where the target hardware unit includes a target processor and a target memory related to the operation of the target application;
[0009] Among them, the power consumption ratio of the target memory to the target hardware unit in the first power consumption relationship is greater than the power consumption ratio of the target memory to the target hardware unit in a non-first mode.
[0010] In a possible implementation manner, the first power consumption relationship is a first power consumption table, and managing the operating power consumption of the target hardware unit according to the first power consumption relationship includes:
[0011] Obtain the pre-stored first power consumption table matching the first mode, where the first power consumption table records the power consumption limits of the target processor and the power consumption limits of the target memory corresponding to the total power consumption of the target hardware unit in different ranges, and different modes correspond to different first power consumption tables;
[0012] Based on the total power consumption of the target hardware unit currently provided by the electronic device and the first power consumption table, determine the power consumption limits of the target processor and the power consumption limits of the target memory;
[0013] Power the target processor and the target memory based on the power consumption limit of the target processor and the power consumption limit of the target memory.
[0014] In a possible implementation, the first power consumption relationship characterizes a power consumption adjustment relationship. Managing the operating power consumption of the target hardware unit according to the first power consumption relationship includes:
[0015] Determine a corresponding power consumption adjustment relationship based on the total power consumption of the target hardware unit currently provided by the electronic device;
[0016] Determine the power consumption limit of the target processor and the power consumption limit of the target memory based on the power consumption adjustment relationship and the total power consumption of the target hardware unit;
[0017] Power the target processor and the target memory based on the power consumption limit of the target processor and the power consumption limit of the target memory.
[0018] In a possible implementation, when the electronic device does not have an external power supply with a set range of supply voltages or is in the first scenario mode, determine that the electronic device is in the first mode.
[0019] In a possible implementation, if the electronic device has a preset power supply, determine that the electronic device is in the first mode.
[0020] In a possible implementation, there are multiple first power consumption relationships corresponding to the first mode. If the electronic device has a preset power supply, managing the operating power consumption of the target hardware unit according to the first power consumption relationship includes:
[0021] Determine the supply voltage of the preset power supply possessed by the electronic device;
[0022] Based on the supply voltage, determine a target first power consumption relationship that matches the supply voltage from the multiple first power consumption relationships corresponding to the first mode preset in the electronic device. Based on the target first power consumption relationship, the power consumption limit of the target processor and the power consumption limit of the target memory corresponding to different total power consumptions of the target hardware unit can be determined;
[0023] Determine the power consumption limit of the target processor and the power consumption limit of the target memory based on the total power consumption of the target hardware unit currently provided by the electronic device and the first power consumption relationship;
[0024] Power the target processor and the target memory based on the power consumption limit of the target processor and the power consumption limit of the target memory.
[0025] In a possible implementation, if the electronic device has an external power supply with a set range of supply voltages but is in a scenario mode with restricted power consumption, it is determined that the electronic device is in the first scenario mode;
[0026] Wherein the scenario mode with restricted power consumption is used to make the heat dissipation noise of the electronic device lower than a set threshold.
[0027] In a possible implementation, the total power consumption of the target hardware units currently provided by the electronic device has different numerical ranges, and the corresponding first power consumption relationships for different numerical ranges of the total power consumption are different. After managing the operating power consumption of the target hardware units according to the first power consumption relationship, it further includes:
[0028] If the total power consumption of the target hardware units provided by the electronic device changes and this change crosses different numerical ranges, re-obtain the first power consumption relationship corresponding to the numerical range in which the total power consumption of the target hardware units currently provided by the electronic device is located, and manage the operating power consumption of the target hardware units based on the newly determined first power consumption relationship.
[0029] In a possible implementation, the target application is an application related to a model.
[0030] A second aspect of the present application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0031] The memory is used to store a computer program;
[0032] The processor is used to execute the computer program to implement the following:
[0033] Determine the set of applications currently running on the electronic device;
[0034] If the electronic device is in the first mode and the set of applications includes a target application, obtain the first power consumption relationship corresponding to the first mode;
[0035] Manage the operating power consumption of the target hardware units according to the first power consumption relationship, where the target hardware units include a target processor and a target memory related to the operation of the target application;
[0036] Wherein, in the first power consumption relationship, the power consumption ratio of the target memory to the target hardware units is greater than the power consumption ratio of the target memory to the target hardware units in a non-first mode. Description of the Drawings
[0037] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained according to the provided accompanying drawings.
[0038] Figure 1 Flow chart of a power consumption control method for an electronic device disclosed in an embodiment of the present application;
[0039] Figure 2 Flow chart of managing the operating power consumption of a target hardware unit disclosed in an embodiment of the present application;
[0040] Figure 3 Flow chart of managing the operating power consumption of another target hardware unit disclosed in an embodiment of the present application;
[0041] Figure 4 Flow chart of managing the operating power consumption of yet another target hardware unit disclosed in an embodiment of the present application;
[0042] Figure 5 Structural schematic diagram of a power consumption control device for an electronic device disclosed in an embodiment of the present application;
[0043] Figure 6 Structural schematic diagram of an electronic device disclosed in an embodiment of the present application. Detailed implementation manners
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0045] The embodiments of the present application can be applied to electronic devices. The present application does not limit the product form of the electronic device, which may include but is not limited to smart phones, tablet computers, wearable devices, personal computers (PCs), netbooks, etc., and can be selected according to application requirements.
[0046] Figure 1 Flow chart of a power consumption control method for an electronic device disclosed in an embodiment of the present application. Refer to Figure 1 As shown, the control method for the power consumption of the electronic device may include:
[0047] Step 101: Determine the set of applications currently running on the electronic device.
[0048] Those skilled in the art know that different types of applications have different degrees of dependence on the computing resources of the processor and the corresponding storage resources of the processor during operation. When the device leaves the factory, the type, model of its processor, and the corresponding memory (internal memory) configuration are fixed and basically will not change anymore. Therefore, the upper limit of support that the processor and the corresponding memory can provide for application operation is also fixed. For some web applications, game applications, etc., the main factor affecting their operation is the computing power of the processor. For some model-based applications, the bottleneck restricting their processing speed is often not the computing power of the processor, but the bandwidth of the processor's corresponding memory. Model-based applications include, but are not limited to, language models, speech recognition models, image processing models, etc.
[0049] This application proposes a power consumption control method for an electronic device, which can further improve the operation speed of applications with a relatively high memory dependence on the processor. The solution first determines the set of applications currently running on the electronic device, and then determines whether there is an application with a relatively high memory dependence on the processor as one of the judgment bases for executing power consumption control in the solution of this application.
[0050] Step 102: If the electronic device is in the first mode and the application set includes a target application, obtain the first power consumption relationship corresponding to the first mode.
[0051] Among them, when the electronic device does not have an external power supply with a set range of supply voltages or is in the first scenario mode, it is determined that the electronic device is in the first mode. The electronic device not having an external power supply with a set range of supply voltages includes two cases. One is that the electronic device is not connected to any power supply and the electrical energy required for its operation is completely provided by the internal battery of the device; the other is that the electronic device is connected to a power supply, but the supply voltage of this power supply is not within the set range. Regarding this part of the content, it will be introduced in detail in the embodiments later and will not be elaborated here.
[0052] In this application, the electronic device being in the first mode is another judgment basis for executing power consumption control. When the electronic device is in the first mode and the application set includes a target application, power consumption control is executed. The target application is the application with a relatively high dependence on the memory resources of the processor described in the foregoing embodiment content. The power consumption control needs to first obtain the first power consumption relationship corresponding to the first mode.
[0053] The first power consumption relationship is preset in the electronic device. To adapt to different operating conditions or different application operation requirements of the electronic device, multiple power consumption relationships can be preset in the electronic device. These power consumption relationships have a mapping relationship with different types of applications or operating conditions. The first power consumption relationship is the power consumption relationship corresponding to the first mode.
[0054] Based on the first power consumption relationship, the maximum limit value of the available power consumption of a certain processor and its memory, that is, the power consumption limit value, can be determined. Among them, the power consumption limit value of the processor is a value that the processor cannot exceed during operation, and the power consumption limit value of the memory is a value that the memory cannot exceed during operation.
[0055] Step 103: Manage the operating power consumption of the target hardware unit according to the first power consumption relationship. The target hardware unit includes a target processor and a target memory related to the operation of the target application.
[0056] Among them, being related to the operation of the target application means that the operation of the target application depends on the computing power of the target processor and the storage space of the target memory.
[0057] In this application, the power consumption ratio of the target memory to the target hardware unit in the first power consumption relationship is greater than the power consumption ratio of the target memory to the target hardware unit in the non-first mode. That is, when the maximum available power consumption of the target hardware unit is determined, in the first mode, based on the first power consumption relationship, the target memory can be allocated a larger power consumption limit value. Thus, by managing the operating power consumption of the target hardware unit based on the first power consumption relationship, the target application with a relatively high dependence on the memory resources of the processor during operation can have a faster processing speed.
[0058] The power consumption control method of the electronic device in this embodiment can manage the circular power consumption of the target hardware unit according to the first power consumption relationship when the electronic device is in the first mode and the target application is currently running, so that the proportion of the power consumption limit value that the target memory can be allocated is larger than that in the non-first mode, thereby further improving the running speed of the target application with a relatively high dependence on the memory resources of the processor during the running process.
[0059] When some model applications are installed on the electronic device, they will be installed in the graphics card system. Subsequently, when these model applications are running, the graphics card processor and graphics card memory of the graphics card system will provide corresponding resources. For the sake of easy understanding, in the following, the target processor will be taken as the graphics card processor and the target memory will be taken as the video memory for relevant introduction.
[0060] Figure 2 This is a flowchart for managing the operating power consumption of the target hardware unit disclosed in the embodiment of this application. Combined with Figure 2As shown, in one implementation, the first power consumption relationship is a first power consumption table. Managing the operating power consumption of the target hardware unit according to the first power consumption relationship may include:
[0061] Step 201: Obtain a pre-stored first power consumption table that matches the first mode. The first power consumption table records the power consumption limits of the target processor and the power consumption limits of the target memory corresponding to the total power consumption of the target hardware unit in different ranges. Different modes correspond to different first power consumption tables.
[0062] That is, multiple power consumption tables are pre-stored in the electronic device. These power consumption tables correspond to different modes. When the electronic device is in a certain mode, the corresponding power consumption table will be called, and the operating power consumption of the target hardware unit will be managed based on the called power consumption table. Taking the target hardware unit as the graphics card system, the target processor as the GPU, and the target memory as the video memory VRAM as an example, Table 1 is the power consumption table for the first mode, and Table 2 is the power consumption table for non-first mode. Comparing Table 1 and Table 2, it can be seen that when the total power consumption limit of the graphics card system is 100, the power consumption limit of the GPU is 80, and the power consumption limit of the video memory is 20; when the total power consumption limit of the graphics card system is other values lower than 100, in the first mode (corresponding to Table 1), the power consumption limit of the GPU decreases correspondingly as the total power consumption limit decreases, while the power consumption limit of the video memory remains unchanged at 20; in the non-first mode (corresponding to Table 2), the power consumption limits of the GPU and the video memory both decrease correspondingly as the total power consumption limit decreases. Therefore, the power consumption ratio of the video memory to the graphics card system in the first mode is greater than the power consumption ratio of the video memory to the graphics card system in the non-first mode. Or rather, the power consumption limit ratio of the target memory to the target hardware unit in the first power consumption relationship is greater than the power consumption limit ratio of the target memory to the target hardware unit in the non-first mode.
[0063] Table 1
[0064]
[0065] Table 2
[0066] TGP GPUTDP VRAMTDP 100 80 20 80 65 15 60 50 10 40 35 5
[0067] Step 202: Determine the power consumption limits of the target processor and the power consumption limits of the target memory based on the total power consumption of the target hardware unit currently provided by the electronic device and the first power consumption table.
[0068] Combined with Table 1, when the total power consumption provided by the electronic device to the graphics card system is determined, the corresponding level can be found from the first power consumption table, and the power consumption limit of the GPU (corresponding to the target processor) and the power consumption limit of the video memory (corresponding to the target memory) corresponding to this level can be determined.
[0069] Step 203: Power the target processor and the target memory based on the target processor power consumption limit and the target memory power consumption limit.
[0070] After determining the power consumption limits of the target processor and the target memory, the target processor and the target memory can be powered based on the power consumption limits of both, so that the operating power consumption of the target processor during operation does not exceed the power consumption limit of the target processor, and the operating power consumption of the target memory does not exceed the power consumption limit of the target memory.
[0071] Figure 3 This is a flowchart for managing the operating power consumption of another target hardware unit disclosed in the embodiments of the present application. Combined with Figure 3 As shown, in another implementation, the first power consumption relationship represents a power consumption adjustment relationship. Managing the operating power consumption of the target hardware unit according to the first power consumption relationship may include:
[0072] Step 301: Determine the corresponding power consumption adjustment relationship based on the total power consumption of the target hardware unit currently provided by the electronic device.
[0073] In this implementation, there is no directly stored power consumption table inside the electronic device. Instead, the power consumption adjustment relationships corresponding to different modes are recorded. The power consumption adjustment relationships record the ways to adjust the power consumption limits. For example, there is only one power consumption table stored in the electronic device. The power consumption limits recorded in this power consumption table are the default power consumption limits used. At the same time, the power consumption adjustment relationships corresponding to different modes, such as calculation formulas, are recorded in the device. When the device is in a certain mode, the corresponding calculation formula can be called to calculate and determine the power consumption limit in this mode. For example, in the default power consumption table, regardless of what level the total power consumption limit is, the proportion of the power consumption limit of the graphics card relative to the total power consumption limit of the graphics card system is always 20%; in the first mode, in the first level (total power consumption limit is 100), the power consumption limit of the graphics card = total power consumption limit * 20%, in the second level (total power consumption limit is 80), the power consumption limit of the graphics card = total power consumption limit * 30%, in the third level (total power consumption limit is 60), the power consumption limit of the graphics card = total power consumption limit * 40%, in the fourth level (total power consumption limit is 40), the power consumption limit of the graphics card = total power consumption limit * 50%.
[0074] Step 302: Determine the target processor power consumption limit and the target memory power consumption limit based on the power consumption adjustment relationship and the total power consumption of the target hardware unit.
[0075] As in the previous example, after determining the power consumption limit of the graphics card according to the calculation formula of the power consumption limit of the graphics card, the remaining allocable power consumption is used as the GPU power consumption limit. For example, in the second level (the total power consumption limit is 80), the power consumption limit of the graphics card = total power consumption limit * 30% = 80 * 30% = 24, then the power consumption limit of the GPU is 80 - 24 = 56.
[0076] Step 303: Power the target processor and the target memory based on the target processor power consumption limit and the target memory power consumption limit.
[0077] After determining the power consumption limits of the target processor and the target memory, the target processor and the target memory can be powered based on their power consumption limits.
[0078] The above content introduces different implementations of managing the operating power consumption of the target hardware unit according to the first power consumption relationship, but it does not constitute a fixed limit on managing the operating power consumption of the target hardware unit. In actual applications, other methods can also be used, such as function calculation methods, further combined with other content, etc. for power consumption management.
[0079] As previously introduced, when the electronic device does not have an external power supply with a set range of supply voltages or is in the first scenario mode, it is determined that the electronic device is in the first mode.
[0080] Specifically, regarding the situation where the electronic device does not have a set range of supply voltages, if the electronic device has a preset power supply, it is determined that the electronic device is in the first mode. The preset power supply includes, but is not limited to, a solar power supply (solar battery), a power supply provided by a display, etc.
[0081] If the electronic device is not connected to any power supply, its operation depends only on its own battery for power supply, that is, the preset power supply is its own battery. It is considered that the electronic device does not have the ability to support a high-power operation state for a long time, so the total power consumption limit of the target hardware unit will be reduced. At this time, if the power consumption of the target hardware unit is managed according to the default power relationship, the power consumption limit of the target memory will also decrease accordingly, but this will inevitably reduce the running speed of the target application that has a relatively high dependence on memory. Therefore, in this first mode, a corresponding first power consumption relationship needs to be obtained to ensure that the power consumption limit of the target memory does not decrease or decreases as little as possible, and to ensure the running speed of the target application as much as possible.
[0082] When the electronic device has a preset power supply, although there is external power supply, these power supplies are not equivalent to the power supply provided by the adapter of the electronic device. For example, solar power and the power provided by the display through the Type-C interface often have a relatively small supply voltage, and the solar power supply is affected by light and has an unstable supply voltage. It will also be considered that the sub-device is not capable of supporting a high-power operating state for a long time, thereby reducing the total power consumption limit of the target hardware unit. That is, when the electronic device has a preset power supply with a relatively small supply voltage, it will also be considered to be in the first mode, obtain the first power consumption relationship, and manage the operating power consumption of the target hardware unit based on the first power consumption relationship to ensure that the operating speed of the target application is not affected or is less affected.
[0083] In some implementations, if there are multiple first power consumption relationships corresponding to the first mode, other content needs to be further combined to determine which first power consumption relationship to select. Taking the electronic device having different types of preset power supplies as an example, since the numerical values and / or stabilities of the supply voltages of different types of preset power supplies are different, multiple first power consumption tables are further divided according to the different types of preset power supplies connected to the electronic device. When the electronic device is in the first mode, the corresponding first power consumption table is determined based on the type of the currently connected preset power supply.
[0084] Figure 4 This is another flowchart for managing the operating power consumption of the target hardware unit disclosed in the embodiments of the present application. Combining Figure 4 with the foregoing content, if there are multiple first power consumption relationships corresponding to the first mode, and if the electronic device has a preset power supply, managing the operating power consumption of the target hardware unit according to the first power consumption relationship may include:
[0085] Step 401: Determine the supply voltage of the preset power supply possessed by the electronic device.
[0086] Step 402: Based on the supply voltage, determine the target first power consumption relationship that matches the supply voltage from the multiple first power consumption relationships corresponding to the first mode preset in the electronic device. Based on the target first power consumption relationship, the power consumption limits of the target processor and the target memory corresponding to different total power consumptions of the target hardware unit can be determined.
[0087] Step 403: Determine the target processor power consumption limit and the target memory power consumption limit based on the total power consumption of the target hardware unit currently provided by the electronic device and the first power consumption relationship.
[0088] Step 404: Supply power to the target processor and the target memory based on the target processor power consumption limit and the target memory power consumption limit.
[0089] In this implementation, the determination of the first power consumption relationship includes, in addition to the first mode, the supply voltage of the preset power supply connected to the electronic device. This implementation divides the first power consumption relationship in more detail and enriches the basis content for determining the target first power consumption relationship (the first mode and the supply voltage of the preset power supply), making the power consumption management based on the target first power consumption relationship more accurate and ensuring the efficient operation of the target application.
[0090] For the case where the electronic device is in the first scenario mode, if the electronic device has an external power supply with a set range of supply voltages but is in a scenario mode with restricted power consumption, it is determined that the electronic device is in the first scenario mode.
[0091] The scenario mode with restricted power consumption is used to make the heat dissipation noise of the electronic device lower than the set threshold. For example, when the electronic device is running at night or in a relatively quiet environment, it may automatically adjust or be triggered by the user to enter the silent mode. In the silent mode, in order to avoid the noise caused by the high-power operation of the internal heat dissipation fan of the device, the power consumption of the device operation will be restricted, and thus the device is considered to be in the first mode.
[0092] In one implementation, the total power consumption limit of the target hardware unit currently provided by the electronic device has different numerical ranges, and the first power consumption relationships corresponding to different numerical ranges of the total power consumption are different. After managing the operating power consumption of the target hardware unit according to the first power consumption relationship, it may further include: if the total power consumption of the target hardware unit provided by the electronic device changes and this change crosses different numerical ranges, re-obtain the first power consumption relationship corresponding to the numerical range where the total power consumption of the target hardware unit currently provided by the electronic device is located, and manage the operating power consumption of the target hardware unit based on the newly determined first power consumption relationship.
[0093] In Table 1, the total power consumption limits of the graphics card system have different grades, that is, the electronic device will only allocate several different grades of total power consumption limits to the graphics card system (a total of four grades: 100, 80, 60, and 40 in Table 1). Taken together, in this implementation, the total power consumption limit allocated by the electronic device to the target hardware unit can be any value from 40 to 100. This range can be divided into several intervals, and the power consumption limits corresponding to different range intervals are different, as shown in Table 3.
[0094] Table 3
[0095] TGP GPUTDP VRAMTDP 80-100 60 20 60-80 40 20 40-60 20 20
[0096] Combined with Table 3, when the total power consumption of the target hardware unit changes from 98 to 85, this change is within the same numerical range of 80 - 100, and the corresponding power consumption limit does not change; when the total power consumption of the target hardware unit changes from 85 to 70, this change spans different numerical ranges, from the range of 80 - 100 to the range of 60 - 80. Since the power consumption limit has changed, it is necessary to re-obtain the first power consumption relationship corresponding to the numerical range where the total power consumption of the target hardware unit currently provided by the electronic device is located, and manage the operating power consumption of the target hardware unit based on the newly determined first power consumption relationship to ensure that the target application can always be supported by the target memory with a large bandwidth and has a high operating speed.
[0097] For the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0098] In the above embodiments disclosed in this application, the method is described in detail. The method of this application can be implemented by means of devices in various forms. Therefore, this application also discloses a device, and specific embodiments are given below for detailed description.
[0099] Figure 5 It is a schematic structural diagram of a power consumption control device of an electronic device disclosed in an embodiment of this application. Refer to Figure 5 As shown, the power consumption control device 50 of the electronic device may include:
[0100] An application determination module 501, configured to determine the set of applications currently running on the electronic device.
[0101] A relationship obtaining module 502, configured to, if the electronic device is in the first mode and the application set includes a target application, obtain a first power consumption relationship corresponding to the first mode.
[0102] A power consumption management module 503, configured to manage the operating power consumption of the target hardware unit according to the first power consumption relationship, where the target hardware unit includes a target processor and a target memory related to the operation of the target application.
[0103] Wherein, the power consumption ratio of the target memory to the target hardware unit in the first power consumption relationship is greater than the power consumption ratio of the target memory to the target hardware unit in the non-first mode.
[0104] When the power consumption control device of the electronic device in this embodiment is in the first mode and the target application is currently running, it can manage the power consumption of the target hardware unit according to the first power consumption relationship, so that the proportion of the power consumption limit that the target memory can be allocated is larger than that in the non-first mode, thereby further improving the running speed of the target application with a relatively high dependence on the memory resources of the processor during operation.
[0105] In one implementation, the first power consumption relationship is a first power consumption table. Specifically, the power consumption management module can be used to: obtain the pre-stored first power consumption table that matches the first mode. The first power consumption table records the power consumption limits of the target processor and the power consumption limits of the target memory corresponding to the total power consumption of the target hardware unit in different ranges. Different modes correspond to different first power consumption tables; determine the power consumption limits of the target processor and the target memory based on the total power consumption of the target hardware unit currently provided by the electronic device and the first power consumption table; supply power to the target processor and the target memory based on the power consumption limits of the target processor and the target memory.
[0106] In one implementation, the first power consumption relationship represents a power consumption adjustment relationship. Specifically, the power consumption management module can be used to: determine the corresponding power consumption adjustment relationship based on the total power consumption of the target hardware unit currently provided by the electronic device; determine the power consumption limits of the target processor and the target memory based on the power consumption adjustment relationship and the total power consumption of the target hardware unit; supply power to the target processor and the target memory based on the power consumption limits of the target processor and the target memory.
[0107] In one implementation, when the electronic device does not have an external power supply with a set range of supply voltages or is in the first scenario mode, it is determined that the electronic device is in the first mode.
[0108] In one implementation, if the electronic device has a preset power supply, it is determined that the electronic device is in the first mode.
[0109] In one implementation, there are multiple first power consumption relationships corresponding to the first mode. If the electronic device has a preset power supply, the power consumption management module can specifically be used to: determine the supply voltage of the preset power supply of the electronic device; based on the supply voltage, determine, from the multiple first power consumption relationships corresponding to the first mode preset in the electronic device, a target first power consumption relationship that matches the supply voltage, and based on the target first power consumption relationship, determine the power consumption limit values of the target processor and the target memory corresponding to the total power consumption of different target hardware units; determine the power consumption limit values of the target processor and the target memory based on the total power consumption of the target hardware units currently provided by the electronic device and the first power consumption relationship; and supply power to the target processor and the target memory based on the power consumption limit values of the target processor and the target memory.
[0110] In one implementation, if the electronic device has an external power supply with a set range of supply voltages but is in a scenario mode with power consumption restrictions, it is determined that the electronic device is in the first scenario mode; wherein the scenario mode with power consumption restrictions is used to make the heat dissipation noise of the electronic device lower than a set threshold.
[0111] In one implementation, the total power consumption of the target hardware units currently provided by the electronic device has different numerical ranges, and the first power consumption relationships corresponding to different numerical ranges of the total power consumption are different. The relationship obtaining module can also be used to: if the total power consumption of the target hardware units provided by the electronic device changes and the change crosses different numerical ranges, re-obtain the first power consumption relationship corresponding to the numerical range in which the total power consumption of the target hardware units currently provided by the electronic device is located, and manage the operating power consumption of the target hardware units based on the newly determined first power consumption relationship.
[0112] For the specific implementation of the power consumption control device of the above-mentioned electronic device and each module included therein, as well as other possible implementations, reference can be made to the content introduction in the corresponding part of the method embodiment, which will not be repeated here.
[0113] The power consumption control device of any one of the above-mentioned electronic devices in the above-mentioned embodiments includes a processor and a memory. The application determination module, relationship obtaining module, power consumption management module, etc. in the above-mentioned embodiments are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to implement corresponding functions.
[0114] The processor includes a kernel, and the kernel retrieves the corresponding program modules from the memory. One or more kernels can be set, and the processing of return visit data is realized by adjusting the kernel parameters.
[0115] The memory may include non-permanent memory in the form of computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0116] In an exemplary embodiment, a computer-readable storage medium is also provided, which can be directly loaded into the internal memory of a computer and contains software code. After being loaded and executed by the computer, the computer program can implement the steps shown in any embodiment of the power consumption control method of the above-mentioned electronic device.
[0117] In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into the internal memory of a computer and contains software code. After being loaded and executed by the computer, the computer program can implement the steps shown in any embodiment of the power consumption control method of the above-mentioned electronic device.
[0118] Furthermore, an embodiment of the present application provides an electronic device. Figure 6 It is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application. Refer to Figure 6 As shown, the electronic device 60 includes at least one processor 601, at least one memory 602 connected to the processor, and a bus 603; wherein, the processor and the memory complete communication with each other through the bus; the processor is used to call program instructions in the memory to execute: determining a set of applications currently running on the electronic device; if the electronic device is in a first mode and the set of applications includes a target application, obtaining a first power consumption relationship corresponding to the first mode; managing the operating power consumption of a target hardware unit according to the first power consumption relationship, where the target hardware unit includes a target processor and a target memory related to the operation of the target application; wherein, the power consumption ratio of the target memory to the target hardware unit in the first power consumption relationship is greater than the power consumption ratio of the target memory to the target hardware unit in a non-first mode.
[0119] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0120] It should also be noted that, in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
[0121] The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be implemented directly in hardware, in a software module executed by a processor, or in a combination thereof. The software module may be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well known in the technical field.
[0122] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A power consumption control method for an electronic device, the method comprising: Determine the set of applications currently running on the electronic device; If the electronic device is in a first mode and the set of applications includes a target application, obtain a first power consumption relationship corresponding to the first mode; Manage the operating power consumption of the target hardware unit according to the first power consumption relationship, where the target hardware unit includes a target processor and a target memory related to the operation of the target application; Wherein, the power consumption ratio of the target memory to the target hardware unit in the first power consumption relationship is greater than the power consumption ratio of the target memory to the target hardware unit in a non-first mode.
2. The power consumption control method for an electronic device according to claim 1, wherein the first power consumption relationship is a first power consumption table, and managing the operating power consumption of the target hardware unit according to the first power consumption relationship includes: Obtain a pre-stored first power consumption table matching the first mode, where the first power consumption table records the power consumption limits of the target processor and the power consumption limits of the target memory corresponding to the total power consumption of the target hardware unit in different ranges, and different modes correspond to different first power consumption tables; Determine the power consumption limit of the target processor and the power consumption limit of the target memory based on the total power consumption of the target hardware unit currently provided by the electronic device and the first power consumption table; Supply power to the target processor and the target memory based on the power consumption limit of the target processor and the power consumption limit of the target memory.
3. The power consumption control method for an electronic device according to claim 1, wherein the first power consumption relationship represents a power consumption adjustment relationship, and managing the operating power consumption of the target hardware unit according to the first power consumption relationship includes: Determine the corresponding power consumption adjustment relationship based on the total power consumption of the target hardware unit currently provided by the electronic device; Determine the power consumption limit of the target processor and the power consumption limit of the target memory based on the power consumption adjustment relationship and the total power consumption of the target hardware unit; Supply power to the target processor and the target memory based on the power consumption limit of the target processor and the power consumption limit of the target memory.
4. The power consumption control method for an electronic device according to claim 1, in the case where the electronic device does not have an external power supply with a set range of supply voltages or is in a first scenario mode, determine that the electronic device is in the first mode.
5. The power consumption control method of the electronic device according to claim 1, wherein, If the electronic device has a preset power supply, determine that the electronic device is in the first mode.
6. The power consumption control method for an electronic device according to claim 5, wherein there are multiple first power consumption relationships corresponding to the first mode. If the electronic device has a preset power supply, managing the operating power consumption of the target hardware unit according to the first power consumption relationship includes: Determine the supply voltage of the preset power supply possessed by the electronic device; Based on the supply voltage, determine a target first power consumption relationship that matches the supply voltage from the multiple first power consumption relationships corresponding to the first mode preset in the electronic device. Based on the target first power consumption relationship, the power consumption limits of the target processor and the power consumption limits of the target memory corresponding to different total power consumptions of the target hardware unit can be determined; Determine the target processor power consumption limit and the target memory power consumption limit based on the total power consumption of the target hardware units currently provided by the electronic device and the first power consumption relationship; Power the target processor and the target memory based on the target processor power consumption limit and the target memory power consumption limit.
7. The power consumption control method of the electronic device according to claim 4, if the electronic device has an external power supply with a set range of supply voltages but is in a scenario mode of power consumption limitation, determine that the electronic device is in the first scenario mode; Wherein the scenario mode of power consumption limitation is used to make the heat dissipation noise of the electronic device lower than a set threshold.
8. The power consumption control method of the electronic device according to claim 1, the total power consumption of the target hardware units currently provided by the electronic device has different numerical ranges, and the first power consumption relationships corresponding to different numerical ranges of the total power consumption are different. After managing the operating power consumption of the target hardware units according to the first power consumption relationship, it further includes: If the total power consumption of the target hardware units provided by the electronic device changes and the change crosses different numerical ranges, re-obtain the first power consumption relationship corresponding to the numerical range where the total power consumption of the target hardware units currently provided by the electronic device is located, and manage the operating power consumption of the target hardware units based on the newly determined first power consumption relationship.
9. The power consumption control method of the electronic device according to claim 1, wherein, The target application is an application related to a model.
10. An electronic device, including at least one processor and a memory connected to the processor, wherein: The memory is used to store a computer program; The processor is used to execute the computer program to achieve the following: Determine the set of applications currently running on the electronic device; If the electronic device is in the first mode and the set of applications includes a target application, obtain the first power consumption relationship corresponding to the first mode; Manage the operating power consumption of the target hardware units according to the first power consumption relationship, and the target hardware units include a target processor and a target memory related to the operation of the target application; Wherein, the power consumption ratio of the target memory to the target hardware units in the first power consumption relationship is greater than the power consumption ratio of the target memory to the target hardware units in the non-first mode.