Power consumption management method for processing unit, apparatus, system and storage medium

By acquiring the environmental parameters of the processing unit and adjusting the operating electrical parameters to match the current environment, the problem of excessive power consumption of the processing unit under different environments is solved, achieving low power consumption and efficient task execution, and extending the standby time of the device.

WO2026050881A1PCT designated stage Publication Date: 2026-03-12VERISILICON MICROELECTRONICS (SHANGHAI) CO LTD +4
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

In existing technologies, the processing unit consumes a lot of power during device operation, resulting in insufficient device endurance. In particular, the power consumption is mismatched when the power supply environment and temperature change, which affects the long-term operation of the device.

Method used

By acquiring environmental parameters of the processing unit, such as temperature, power supply voltage, and power level, the target electrical parameter values ​​are determined based on a preset correspondence. The operating electrical parameters of the processing unit, such as operating frequency and voltage, are adjusted to match the current environment, reduce power consumption, and power is cut off when there is no task to reduce power consumption.

Benefits of technology

It effectively reduces the power consumption of the processing unit in different environments, extends the standby time of the device, improves the device's battery life, and ensures that the processing unit can quickly respond to the needs of new tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024116431_12032026_PF_FP_ABST
    Figure CN2024116431_12032026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of neural networks. Provided are a power consumption management method for a processing unit, an apparatus, a system and a storage medium. The power consumption management method is applied to a control unit of an electronic device, the electronic device further comprising a processing unit, and the control unit being connected to the processing unit. The method comprises: acquiring a parameter value of an environment parameter of a working environment where the processing unit is located; on the basis of the parameter value of the environmental parameter and a preset correspondence relationship, determining a target electrical parameter value of a preset working electrical parameter, the preset correspondence relationship comprising a correspondence relationship between different parameter values of the environmental parameter and different target electrical parameter values of the preset working electrical parameter, the different target electrical parameter values of the preset working electrical parameter being electrical parameter values that enable the power consumption of the processing unit to reach a preset requirement under the different parameter values of the environmental parameter; and controlling the preset working electrical parameter of the processing unit, so as to use the target electrical parameter value to execute a current task. The described method can reduce the power consumption of processing units in electronic devices.
Need to check novelty before this filing date? Find Prior Art

Description

Power consumption management method, device, system and storage medium of processing unit TECHNICAL FIELD

[0001] The present application relates to the technical field of neural networks, in particular, a power consumption management method, device, system and storage medium of a processing unit are provided. BACKGROUND

[0002] Processing units are widely used in various devices, and as the requirements for standby time and running time of the devices increase, the power consumption requirements of the processing units also increase. For example, some devices powered by batteries need to reduce the power consumption of the processing units to improve the endurance of the devices.

[0003] Currently, the way to manage the low power consumption of the processing unit is single, and usually only when the device is powered off will the processing unit be powered off, and during the device startup period, the processing unit is always in a powered state and waits for subsequent tasks at the rated working frequency of the processing unit. This way makes the processing unit still have a large power consumption during the device running period.

[0004] SUMMARY

[0005] Therefore, the present application aims to provide a power consumption management method, device, system and storage medium of a processing unit to reduce the power consumption of the processing unit.

[0006] In a first aspect, an embodiment of the present application provides a power consumption management method of a processing unit, applied to a control unit of an electronic device, the electronic device further comprising a processing unit, the control unit and the processing unit being connected, the power consumption management method of the processing unit comprising: obtaining a parameter value of an environmental parameter of a working environment of the processing unit; determining a target electric parameter value of a preset working electric parameter based on the parameter value of the environmental parameter and a preset corresponding relationship; the preset corresponding relationship comprises a corresponding relationship between different parameter values of the environmental parameter and different target electric parameter values of the preset working electric parameter; the different target electric parameter values of the preset working electric parameter are electric parameter values that make the power consumption of the processing unit meet a preset requirement under different parameter values of the environmental parameter; and controlling the processing unit to execute a current task at the target electric parameter value of the preset working electric parameter.

[0007] [Rule 91 correction 06.06.2025] Different working environments have different effects on the running efficiency of the processing unit, which in turn affects the power consumption of the processing unit when performing the same task. In the embodiment of the application, the environment parameter can be obtained, and the corresponding preset working electrical parameter target value is configured for the processing unit according to the environment parameter. Different target values of the preset working electrical parameter are electrical parameter values that make the power consumption of the processing unit reach the preset requirement under different parameter values of the environment parameter. Thus, the processing unit can perform tasks in different environments while the working electrical parameter used can make the processing unit have high working efficiency in the current environment, reducing the power consumption of the processing unit when performing the current task.

[0008] In an embodiment, the environment parameter includes the current temperature of the working environment in which the processing unit is located; the preset correspondence includes a correspondence between different temperature ranges of the current temperature and different electrical parameter values of the preset working electrical parameter; and determining the target electrical parameter value of the preset working electrical parameter based on the parameter value of the environment parameter and the preset correspondence includes: determining a target temperature range in which the temperature value of the current temperature in the parameter value of the environment parameter is located; and determining the target electrical parameter value of the preset working electrical parameter corresponding to the target temperature range based on the preset correspondence.

[0009] The current temperature of the working environment in which the processing unit is located has a great influence on the power consumption of the processing unit. The higher the temperature, the higher the power consumption of the processing unit under the same electrical parameter value of the working electrical parameter. In the case of fixed heat dissipation performance, the increase in power consumption may even cause the chip temperature of the processing unit to rise, and even may cause a crash. In the embodiment of the application, corresponding target electrical parameter values are set for different temperature ranges, so that the processing unit can have lower power consumption in different temperature environments, and the temperature of the processing unit rises more slowly, so that the processing unit can be in a low-power working state for a long time.

[0010] In an embodiment, the electronic device further includes a power supply for supplying power to the processing unit, and the control unit, the processing unit and the power supply control are connected to each other; the environment parameter includes the current power supply voltage for supplying power to the processing unit; the preset correspondence includes a correspondence between different power supply voltage ranges of the power supply and different electrical parameter values of the preset working electrical parameter; and determining the target electrical parameter value of the preset working electrical parameter based on the parameter value of the environment parameter and the preset correspondence includes: determining a target voltage range in which the voltage value of the current power supply voltage in the parameter value of the environment parameter is located; and determining the target electrical parameter value of the preset working electrical parameter corresponding to the target voltage range based on the preset correspondence.

[0011] The working environment of the processing unit includes a power supply environment, and the power supply environment includes a current power supply voltage for powering the processing unit. If the current power supply voltage is insufficient to support the processing unit to stably operate at a high voltage or a high working frequency, the processing unit will have excessive power consumption if it is kept operating at the high voltage or the high working frequency. Therefore, in the embodiments of the present application, different target voltage ranges can be set. After the current power supply voltage is determined, the target voltage range in which the processing unit is located is determined according to the current power supply voltage, and the corresponding target electrical parameter value is determined. In this way, the processing unit can execute tasks at working electrical parameter values that conform to the current power supply environment, thereby reducing additional power consumption.

[0012] In an embodiment, the electronic device further includes a power supply for powering the processing unit, and the control unit, the processing unit and the power supply control are connected to each other. The environment parameter includes a current power supply amount for powering the processing unit. The preset corresponding relationship includes a corresponding relationship between different power amount ranges of the current power supply amount and different electrical parameter values of the preset working electrical parameter. The target electrical parameter value of the preset working electrical parameter is determined based on the parameter value of the environment parameter and the preset corresponding relationship, including: determining a target power amount range in which the current power supply amount is located in the parameter value of the environment parameter; and determining the target electrical parameter value of the preset working electrical parameter corresponding to the target power amount range based on the preset corresponding relationship.

[0013] The power supply environment of the processing unit further includes a current power supply amount for powering the processing unit. If the processing unit still works at a high power consumption in the case that the current power supply amount is insufficient, the power amount may be quickly consumed, and the power supply may not be able to continuously provide a stable power supply voltage, thereby causing the processing unit to crash. Therefore, in the embodiments of the present application, different target power amount ranges can be set. After the current power supply amount is determined, the target power amount range in which the processing unit is located is determined according to the current power supply amount, and the corresponding target electrical parameter value is determined. In this way, the processing unit can execute tasks at working electrical parameter values that conform to the current power supply environment, thereby reducing additional power consumption.

[0014] In an embodiment, the electronic device further includes a power supply for powering the processing unit, and the control unit, the processing unit and the power supply control are connected to each other. After the preset working electrical parameter of the processing unit is controlled to execute the current task at the target electrical parameter value, the method further includes: starting timing in response to the processing unit completing the current task; and if the processing unit does not receive a new task in the case that the timing duration reaches a preset duration, controlling the power supply to stop powering the processing unit.

[0015] Compared with the way of waiting for a new task at a rated working frequency or the way of still supplying power to the processing unit when the processing unit does not execute a task, in the embodiment of the application, after the processing unit completes a task, timing is performed, and when the timing reaches a preset time length and a new task is still not received, it is highly probable that the processing unit temporarily does not need to execute a new task, and therefore the processing unit is powered off, so that the processing unit does not generate power consumption, thereby effectively reducing the power consumption of the electronic device caused by the processing unit.

[0016] In an embodiment, after the timing is started, the method further includes: configuring a preset working electrical parameter of the processing unit as a minimum electrical parameter value allowed when the processing unit is in a working state, the preset working electrical parameter including a working electrical parameter related to power consumption of the processing unit.

[0017] The working electrical parameter of the processing unit affects the working performance of the processing unit, wherein the preset working electrical parameter includes a working electrical parameter related to power consumption of the processing unit, and reducing the electrical parameter value of the preset working electrical parameter can reduce the working performance of the processing unit, thereby reducing the power consumption of the processing unit. In the embodiment of the application, during the waiting for a new task without reaching the preset time length, since the processing unit does not execute work, even if the electrical parameter value of the preset working electrical parameter is reduced, it is not easy to produce a negative effect, and therefore the preset working electrical parameter can be configured as the minimum electrical parameter value allowed when the processing unit is in a working state, so as to reduce the power consumption. At the same time, since the processing unit is still in a working state and has not been powered off and is in a working state, this enables the processing unit to quickly respond to the demand for executing a new task.

[0018] In an embodiment, the preset working electrical parameter includes at least one of a working frequency and a working voltage of the processing unit.

[0019] In the embodiment of the application, the main working electrical parameters affecting the power consumption of the processing unit are the working frequency and the working voltage, and at least one of the two is configured as the preset working electrical parameter and is adjusted, so that after the electrical parameter value of the working electrical parameter is adjusted, the power consumption of the processing unit can be effectively reduced.

[0020] In an embodiment, after the timing is started, the method further includes: controlling the processing unit to enter a standby state in a powered state; and the working frequency of the processing unit in the standby state is 0.

[0021] In the embodiment of the application, during the waiting for a new task after the timing is started, the processing unit is enabled to enter a standby state, and the working frequency in the standby state is 0, and at this time, the power consumption of the processing unit can be reduced.

[0022] In an embodiment, the power consumption management method of the processing unit further includes: in response to the demand for allocating a new task to the processing unit, when the processing unit is in a powered-off state, controlling the power supply to supply power to the processing unit.

[0023] Compared with the mode that the processing unit is powered by the clock after the device is started, in the embodiment of the application, the processing unit is powered in response to the requirement of assigning a new task on the premise that the processing unit has the requirement of executing a task, so that the new task can be normally executed by the processing unit, and the processing unit is in a power-off state at other times. This mode can effectively reduce the power consumption of the processing unit during the period when no task is executed.

[0024] In an embodiment, after the timing is started in response to the processing unit completing the current task, the method further includes: if the processing unit receives a new task before the timing duration reaches the preset duration, stopping the timing; reacquiring the parameter value of the environmental parameter; re-determining the target electric parameter value of the preset working electric parameter according to the reacquired parameter value of the environmental parameter; and controlling the processing unit to execute the new task based on the re-determined target electric parameter value.

[0025] In the embodiment of the application, the parameter value of the environmental parameter is re-determined and the new target electric parameter value is re-determined each time a new task is executed, and the processing unit is executed with the target electric parameter value re-determined according to the parameter value of the current environmental parameter. Therefore, the processing unit can execute a task with the target electric parameter value corresponding to the parameter value of the current environmental parameter after the working environment is changed, and the problem of excessive power consumption caused by the mismatch between the electric parameter value of the working electric parameter and the environmental change is effectively reduced.

[0026] In a second aspect, the embodiment of the application provides a processing unit power consumption management device applied to a control unit of an electronic device, the electronic device further including a processing unit, and the control unit and the processing unit are connected; the processing unit power consumption management device includes an acquisition module and a control module; the control module is configured to acquire the parameter value of the environmental parameter of the working environment of the processing unit; the control module is configured to determine the target electric parameter value of the preset working electric parameter based on the parameter value of the environmental parameter and a preset corresponding relationship; the preset corresponding relationship includes the corresponding relationship between different parameter values of the environmental parameter and different target electric parameter values of the preset working electric parameter; the different target electric parameter values of the preset working electric parameter are electric parameter values that make the power consumption of the processing unit meet the preset requirement under different parameter values of the environmental parameter; and the control module is configured to control the processing unit to execute a current task with the preset working electric parameter and the target electric parameter value.

[0027] In a third aspect, an electronic device is provided, comprising: a control unit configured to perform the power consumption management method of the processing unit according to any one of the first aspect; a processing unit connected to the control unit; an environment monitoring unit configured to monitor a working environment of the processing unit to obtain an environment parameter; the environment monitoring unit is also connected to the control unit, and is further configured to provide the environment parameter to the control unit, so that the control unit performs the power consumption management method of the processing unit according to any one of the first aspect; and a power supply connected to the control unit and the processing unit respectively, and configured to supply or cut off power for the processing unit in response to the control of the control unit.

[0028] In a fourth aspect, a readable storage medium is provided, and the readable storage medium stores a program, when the program is run on a processing unit, the processing unit performs the power consumption management method of the processing unit according to any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0030] Fig. 1 is a flow chart of the power consumption management method of the processing unit provided by an embodiment of the present application;

[0031] Fig. 2 is a supplementary flow chart of the power consumption management method of the processing unit provided by an embodiment of the present application;

[0032] Fig. 3 is a full flow chart of the power consumption management method of the processing unit provided by an embodiment of the present application;

[0033] Fig. 4 is a schematic diagram of the power consumption management device of the processing unit provided by an embodiment of the present application

[0034] Fig. 5 is a schematic diagram of the electronic device provided by an embodiment of the present application.

[0035] Fig. 1 is a flow chart of the power consumption management method of the processing unit provided by an embodiment of the present application; DETAILED DESCRIPTION

[0036] In order to make the purposes, technical solutions, and advantages of the embodiments of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.

[0037] First, the embodiments of the present application provide a power consumption management method of a processing unit, which can be applied to a control unit of an electronic device, the electronic device further comprising a processing unit and a power supply for supplying power to the processing unit, wherein the processing unit can be a NPU (Neural-Network Processing Units), a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a DPU (Display Processing Unit), or a VPU (Video Processing Unit), and the control unit can be a CPU (Central Processing Unit), an MCU (Microcontroller Unit), or the like.

[0038] In the embodiments of the present application, the control unit is connected with the NPU and the power supply, respectively, and the control unit can adjust the power consumption of the NPU at different times by controlling the working of the NPU and controlling the power supply to supply power or cut off power to the NPU.

[0039] Please refer to FIG. 1, which is a flowchart of a power consumption management method of a processing unit provided by an embodiment of the present application. The power consumption management method of the processing unit comprises the following steps:

[0040] S110, obtaining a parameter value of an environmental parameter of a working environment in which the processing unit is located.

[0041] The working environment in which the processing unit is located has a certain influence on the power consumption of the processing unit. Configuring a corresponding working electrical parameter value for the processing unit in different working environments helps to make the power consumption of the processing unit not too large on the premise that the processing unit can work normally and complete tasks. The working electrical parameter refers to the electrical parameter when the processing unit works, for example, working frequency, working voltage, working current, power, and the like.

[0042] In the embodiments of the present application, the working environment in which the processing unit is located includes but is not limited to the external environment, such as temperature, humidity, and the like, and can also include the power supply environment of the processing unit, for example, the power supply capability.

[0043] In the embodiments of the present application, the electronic device is provided with an environment detection unit, which includes special devices or circuits for detection, such as temperature sensors, humidity sensors, and the like, and the power supply circuit is provided with corresponding detection circuits to detect the power supply voltage, current, power, and the like. The control unit is connected to the environment detection unit to receive the parameter values of the detected environment parameters.

[0044] In S120, the target parameter value of the preset working parameter is determined based on the parameter value of the environment parameter and the preset corresponding relationship.

[0045] In the embodiments of the present application, the preset working parameter includes a working parameter related to the power consumption of the processing unit. For example, the preset working parameter can include the working frequency of the processing unit, and the higher the working frequency of the processing unit, the higher the power consumption. In addition, the preset working parameter can also include the working voltage, for example, the processing unit includes a high working voltage state and a low working voltage state, and the power consumption in the high working voltage state is higher, wherein the voltage values of the high working voltage state and the low voltage state of different processing units are different, which can be referred to in the prior art, and will not be expanded here.

[0046] In the embodiments, the preset corresponding relationship includes the corresponding relationship between different parameter values of the environment parameter and different target parameter values of the preset working parameter. The different target parameter values of the preset working parameter are the parameter values that make the power consumption of the processing unit meet the preset requirements under different parameter values of the environment parameter.

[0047] The preset requirements can be specifically configured according to the performance of the processing unit, the requirements of the executed task, and the like, which will not be expanded here. The purpose of the embodiments is to configure the parameter values that can meet the preset requirements for different parameter values of the same environment parameter. For example, the working frequency corresponding to the temperature of 20 degrees Celsius is 100%, and the working frequency corresponding to the temperature of 50 degrees Celsius is 50%, and so on. For different humidity, power supply environment and other environment parameters, similar configurations can be performed, and not only the working frequency can be adjusted, but also the working voltage or other preset working parameters can be adjusted. In this way, the preset corresponding relationship can be configured.

[0048] For each type of environment parameter, a corresponding relationship can be set respectively, for example, in an embodiment of the present application, the environment parameter includes the current temperature of the working environment of the processing unit, and the preset corresponding relationship includes the corresponding relationship between different temperature ranges of the current temperature and different parameter values of the preset working parameter.

[0049] In this embodiment, the temperature range in which the optimal working temperature of the processing unit is located can correspond to the maximum value of the preset working electrical parameter of the processing unit. For example, the optimal temperature of a certain processing unit is 15 degrees Celsius, and the temperature range in which 15 degrees Celsius is located can correspond to the maximum value of the preset working electrical parameter. For example, the preset working electrical parameter is the working frequency or the working voltage, and the divided temperature range includes a temperature range below 20 degrees Celsius, and the working frequency corresponding to the temperature range is 100% or the highest working voltage.

[0050] Conversely, the processing unit has a maximum working temperature, and long-term work at high temperature may cause a crash. In order to keep the processing unit working for a long time at high temperature, the temperature needs to be raised more slowly or the temperature needs to be lowered, and lowering the working frequency and the working voltage can reduce power consumption, so that the temperature rises more slowly, and even in the case of good heat dissipation, the temperature may be lowered, so that the NPU can be kept in working state for a long time.

[0051] Therefore, in this embodiment, the temperature range in which the highest working temperature allowed by the processing unit is located can correspond to the minimum value of the preset working electrical parameter of the processing unit. For example, it is assumed that the processing unit can work at a maximum temperature of 80 degrees Celsius, the minimum working frequency is 20%, or the minimum working voltage is 0.2 times the maximum working voltage, the preset working electrical parameter is the working frequency or the working voltage, and the divided temperature range includes a temperature range of 70 to 80 degrees Celsius, and the working frequency corresponding to the temperature range is 20% or 0.2 times the maximum working voltage. Other temperature ranges can be obtained by experimental tests, and the above are only examples and should not be considered as limitations of the present application. In the embodiments of the present application, if there are multiple preset working electrical parameters, one or more of them can be adjusted, which is not limited herein.

[0052] Similarly, in this embodiment, based on the parameter value of the environmental parameter and the preset correspondence relationship, the target electrical parameter value of the preset working electrical parameter is determined, which can include: determining the target temperature range in which the temperature value of the current temperature in the parameter value of the environmental parameter falls; determining the target electrical parameter value of the preset working electrical parameter corresponding to the target temperature range based on the preset correspondence relationship.

[0053] In this embodiment, it can be determined that the value of the current temperature in the obtained environmental parameter falls into the target temperature range, and then the target electrical parameter value of the corresponding preset working electrical parameter is determined based on the target temperature range, and the processing unit is adjusted with the determined target parameter value. Therefore, the working electrical parameter value of the processing unit can be matched with the current environment, so that the neural network processing can complete the task with high efficiency while reducing the power consumption of executing the task.

[0054] For ease of understanding, an example is provided for illustration, which should not be considered as a limitation of the present application.

[0055] In this example, there are 6 target temperature ranges, which are less than or equal to 20℃, greater than 20℃ less than or equal to 40℃, greater than 40℃ less than or equal to 60℃, greater than 60℃ less than or equal to 70℃, greater than 70℃ less than or equal to 80℃, and greater than 80℃.

[0056] The target temperature range less than 20℃ corresponds to 100% working frequency state and maximum voltage state; the target temperature range greater than 20℃ less than or equal to 40℃ corresponds to 70% working frequency state or 70% maximum voltage state; the target temperature range greater than 40℃ less than or equal to 60℃ corresponds to 50% working frequency state or 50% maximum voltage state; the target temperature range greater than 60℃ less than or equal to 70℃ corresponds to 30% working frequency state or 30% maximum voltage state; the target temperature range greater than 70℃ less than or equal to 80℃ corresponds to 20% working frequency state or 20% maximum voltage state; and the target temperature range greater than 80℃ corresponds to 0% working frequency and 0 working voltage.

[0057] Similarly, the working environment also includes a power supply environment, the processing unit is powered by the power supply, and the voltage of the power supply can be affected by various reasons, so that the voltage of the power supply cannot meet the demand of the processing unit, such as a lower voltage, which can make the processing unit perform some additional tasks to normally complete the work, thereby affecting power consumption.

[0058] Therefore, in the embodiments of the present application, the environmental parameter includes the current power supply voltage for powering the processing unit; and the preset corresponding relationship includes the corresponding relationship between different power supply voltage ranges of the power supply and different electrical parameter values of the preset working electrical parameter.

[0059] Similarly to the current temperature, in this embodiment, the maximum power supply voltage and the minimum power supply voltage required by the processing unit can be used to divide multiple power supply voltage ranges, and the target voltage range below the minimum power supply voltage corresponds to 0% working frequency and working voltage, that is, the processing unit stops working. The maximum power supply voltage and the minimum power supply voltage are divided into multiple power supply voltage ranges, each power supply voltage range corresponds to a different working frequency, and the working voltage corresponding to each power supply voltage range can be the minimum voltage of the range. If the power supply voltage provided by the power supply can be greater than the power supply voltage required by the processing unit, it can correspond to 100% working frequency and working voltage.

[0060] For some electronic devices, the power supply is a battery, and the battery has a certain amount of power. When the power is too low, it can not provide a working environment that meets the demand of the processing unit. Therefore, in the embodiments of the present application, the environmental parameter can also include the current power supply power for powering the processing unit. Similarly, the preset corresponding relationship includes the corresponding relationship between different power supply voltage powers of the power supply and different electrical parameter values of the preset working electrical parameter.

[0061] And, based on the parameter value of the environmental parameter and the preset correspondence relationship, determining the target parameter value of the preset working electrical parameter can include: determining a target power range in which the current power supply power is located in the parameter value of the environmental parameter; and determining the target parameter value of the preset working electrical parameter corresponding to the target power range based on the preset correspondence relationship.

[0062] Similarly, in this embodiment, the corresponding target parameter value of the preset working electrical parameter can also be configured for different power supply power ranges. For example, when the power supply power is greater than 50%, the corresponding working frequency is 100%, and the working voltage is the highest value; when the power supply power is less than or equal to 50% and greater than 20%, the corresponding working frequency can be 50%, and the corresponding working voltage can be 50% of the maximum working voltage; and when the power supply power is less than or equal to 20%, the working frequency and the working voltage are the minimum values in the working state.

[0063] In some embodiments, if multiple environmental parameters change, the corresponding parameter values can be determined respectively, and the lowest parameter value can be determined as the target parameter value of the configuration processing unit.

[0064] The above are examples. Since the types of processing units in actual scenarios are different, the types of electronic devices are different, and the actual work contents are different, the electrical parameter values of the processing units reaching the preset requirements of the preset working electrical parameters in different working environments are different, and therefore, the above parameter values and the number of divided ranges should not be considered as limitations of the present application.

[0065] S130, controlling the preset working electrical parameter of the processing unit to execute the current task at the target electrical parameter value.

[0066] In this embodiment, after the target electrical parameter value is determined, the preset working electrical parameter is controlled to execute the current task at the target electrical parameter value, so that the power consumption of the processing unit reaches the preset requirement, thereby avoiding excessive power consumption of the processing unit.

[0067] Please refer to FIG. 2, which is a supplementary flowchart of the power consumption management method of the processing unit provided in an embodiment of the present application. In an embodiment of the present application, before the processing unit executes a task, the following process can also be performed:

[0068] S140, in response to the processing unit completing the current task, starting timing.

[0069] In this embodiment, the control unit can be configured with a program of a timer, and the timer can perform timing.

[0070] In an embodiment of the present application, the control unit can monitor the operation of the processing unit, determine whether the processing unit is executing a task, and start a timer to time when the execution of the current task is completed. In other embodiments, the processing unit can send a signal to the control unit to indicate the control unit to start the timer to time after the processing unit completes the current task. The above are only examples and should not be construed as a limitation of the present application.

[0071] In some embodiments, the preset operating parameter of the processing unit can be configured as a minimum operating parameter value allowed for the processing unit in the operating state after the timing is started.

[0072] The operating state refers to a state in which the processing unit can execute a task, and different tasks have different requirements for the processing unit. For example, some tasks require the processing unit to be in a high operating frequency so that the processing unit can execute the task in a short time.

[0073] Since the processing unit has completed the current task, the timing is waiting for a new task. At this time, the timing reduces the operating parameter value of the operating parameter of the processing unit and does not affect the normal operation of the processing unit. Therefore, in an embodiment of the present application, the preset operating parameter of the processing unit can be configured as a minimum operating parameter value allowed for the processing unit in the operating state, so as to reduce the power consumption of the processing unit during the waiting for the new task. At the same time, since the processing unit remains in the operating state, the processing unit can quickly adjust the operating parameter value of the operating parameter after the new task arrives, so as to execute the new task in time.

[0074] In an embodiment of the present application, since the operating frequency and the operating voltage have a greater impact on the power consumption of the processing unit, the preset operating parameter can include at least one of the operating frequency and the operating voltage, so that the power consumption can be significantly reduced after the operating parameter is adjusted.

[0075] In other embodiments of the present application, the processing unit can be controlled to enter a standby state in the power supply state after the timing is started. In the standby state, the operating frequency of the processing unit is 0, and the NPU internal clock can be turned off to make the internal frequency 0. At this time, the NPU is completely inoperative and enters a deep sleep mode, which can also effectively reduce the power consumption.

[0076] Compared with configuring the operating parameter as the minimum operating parameter value in the operating state, the power consumption of the standby state is lower, but the response speed of the standby state is slower. Whether the preset operating parameter is configured as the minimum operating parameter value allowed for the processing unit in the operating state or the processing unit enters the standby state, both belong to a low-power mode, and one of them can be configured according to the response speed or the power consumption demand of the executed task, which is not limited herein.

[0077] S150, if the time length reaches the preset time length and the processing unit does not receive a new task, the power supply is controlled to stop supplying power to the processing unit.

[0078] In this embodiment, if the time length reaches the preset time length and the processing unit does not receive a new task, it can be represented that the processing unit has been in a state of no task for a long time. At this time, the power supply can be controlled to stop supplying power to the neural network processor, that is, to be powered off. It can be understood that in the power supply state, even if no task is executed, the processing unit still needs to generate a certain power consumption to maintain itself in a standby or hibernation state or the like with low power consumption. After being powered off, the processing unit will no longer generate any power consumption. At the same time, since the processing unit has no new task, the power consumption caused by the neural network can be reduced without affecting the normal work of the electronic device.

[0079] In this embodiment, the preset time length can be determined according to the actual working scene of the processing unit. For example, in some scenes, the processing unit needs to process a large number of different tasks, and it processes different tasks more frequently. Therefore, a longer preset time length can be configured to reduce the possibility of frequent power-off of the processing unit. In addition, in the scene where the processing unit needs to execute fewer tasks, since the frequency of executing tasks is small, a shorter preset time length can be configured to make it power off in time after completing the task to reduce power consumption. In this embodiment, the specific value of the preset time length is not limited.

[0080] In some embodiments, after the processing unit starts timing in response to completing the current task, the power consumption management method of the processing unit can further include: if the processing unit receives a new task before the time length reaches the preset time length, stopping timing; reacquiring the parameter value of the environmental parameter; re-determining the target electrical parameter value of the preset working electrical parameter according to the reacquired parameter value of the environmental parameter; and controlling the processing unit to execute the new task based on the re-determined target electrical parameter value.

[0081] After the processing unit completes a task, the working environment of the processing unit can change. For example, for a mobile device, the temperature change can make the power consumption of the processing unit in the current environment be at a high level. Therefore, in this embodiment, after the processing unit receives a new task, a new target electrical parameter value can be determined according to the environmental parameter, and the new task can be executed based on the re-determined target electrical parameter value, so as to avoid that the power consumption of executing the new task is too high or the efficiency of executing the new task is low, thereby making the overall power consumption of the processing unit be at a low level.

[0082] In an embodiment of the present application, when the processing unit is in the powered-off state, the power supply can be controlled to supply power to the processing unit in response to the demand for allocating a new task to the processing unit.

[0083] As mentioned above, the power supply to the processing unit is stopped after the time length reaches the preset time length, so that the processing unit enters the power-off state. In some electronic devices, the processing unit may not be started at the same time as the electronic device is started, and the starting of the processing unit needs to be controlled separately. The processing unit is in the power-off state before the processing unit is started. During the running of the electronic device, the processing unit needs to perform a new task. At this time, the processing unit needs to be started. Therefore, the power supply to the processing unit can be controlled in response to the demand for the processing unit to allocate a new task.

[0084] In an embodiment of the present application, the new task can be allocated to the processing unit by the control unit. The control unit has the demand for the processing unit to allocate a new task. Therefore, before the processing unit needs to be allocated, the control unit can first control the power supply to supply power to the processing unit, and then the control unit can further assign the task to the processing unit.

[0085] In other embodiments, other units in the electronic device can also have the demand for the processing unit to allocate a new task. For example, the GPU needs to perform a certain task through the processing unit. In this embodiment, other units except the control unit can first send a notification message to the control unit to indicate that the task is to be allocated to the processing unit before the task is allocated to the processing unit. After receiving the notification message, the control unit can control the power supply to supply power to the processing unit, and send a response to the other unit that sent the notification message to indicate that the processing unit has been powered on after the power supply successfully supplies power to the processing unit. The other unit can further allocate the task to the processing unit after receiving the response from the control unit indicating that the processing unit has been powered on.

[0086] In an embodiment, the other unit can send a notification message to the control unit to indicate that the task is to be allocated to the processing unit before sending a new task to the processing unit each time, and allocate the new task to the processing unit after receiving the response indicating that the processing unit has been powered on.

[0087] In other embodiments, the other unit can also send a notification message to the control unit to indicate that the task is to be allocated to the processing unit before allocating a new task to the processing unit when the processing unit is powered off, and allocate the new task to the processing unit after receiving the response indicating that the processing unit has been powered on. In the case where the processing unit is not powered off, the new task is directly allocated to the processing unit. In this embodiment, the control unit can notify the other unit that the processing unit has been powered off after controlling the power supply to stop supplying power to the processing unit.

[0088] The above is only an example, and the specific mode can be configured according to the actual connection mode and control mode in the electronic device, which is not limited herein.

[0089] For the convenience of understanding, an example is provided herein to illustrate the method of the present application, which should not be a limitation of the present application. Please refer to FIG. 3, which is a schematic diagram of the whole process of the power consumption management method of the processing unit provided by an embodiment of the present application. In this example, the processing unit is an NPU, and the power consumption management method of the processing unit can include:

[0090] Firstly, the processing unit is in a power-off state, and S301 can be performed to power the NPU in response to the demand for allocating a new task to the NPU. After powering, S302-S304 are sequentially performed, S302: obtaining a parameter value of an environmental parameter; S303: determining a target parameter value based on the parameter value of the environmental parameter and a preset corresponding relationship; and S304: controlling a preset working parameter of the NPU to execute a current task at the target parameter value.

[0091] S305, until the current task is executed. Then S306 and S307 are simultaneously performed, S306: making the NPU enter a standby state; and S307: starting timing.

[0092] If a new task is received before the timing duration reaches a preset duration, S301-S307 are re-executed, and if no new task is received, S308: no new task is received, and the NPU is powered off.

[0093] The specific content of each step can be referred to the foregoing, which is not expanded herein.

[0094] Based on the same inventive concept, an embodiment of the present application further provides a power consumption management device of a processing unit, which is applied to a control unit of an electronic device, the electronic device further includes a processing unit, a power supply for powering the processing unit, and the control unit, the processing unit and the power supply control are connected to each other.

[0095] Please refer to FIG. 4, which is a schematic diagram of the power consumption management device of the processing unit provided by an embodiment of the present application. The power consumption management device of the processing unit includes an obtaining module 440 and a control module 430.

[0096] The obtaining module 440 is configured to obtain a parameter value of an environmental parameter of a working environment in which the processing unit is located.

[0097] The control module 430 is configured to determine a target parameter value of a preset working parameter based on the parameter value of the environmental parameter and a preset corresponding relationship, the preset corresponding relationship includes a corresponding relationship between different parameter values of the environmental parameter and different target parameter values of the preset working parameter, and the different target parameter values of the preset working parameter are parameter values that make the power consumption of the processing unit reach a preset requirement under different parameter values of the environmental parameter; and the control module 430 is configured to control the preset working parameter of the processing unit to execute the current task at the target parameter value.

[0098] The environmental parameter comprises a current temperature of a working environment of the processing unit; and the preset correspondence relationship comprises a correspondence relationship between different temperature ranges of the current temperature and different electric parameter values of the preset working electric parameter. The control module 430 is specifically configured to determine a target temperature range in which a temperature value of the current temperature in the parameter value of the environmental parameter is located; and determine a target electric parameter value of the preset working electric parameter corresponding to the target temperature range based on the preset correspondence relationship.

[0099] The environmental parameter comprises a current power supply voltage for supplying power to the processing unit; the preset correspondence relationship comprises a correspondence relationship between different power supply voltage ranges of the power supply and different electric parameter values of the preset working electric parameter; and the control module 430 is specifically configured to determine a target voltage range in which a voltage value of the current power supply voltage in the parameter value of the environmental parameter is located; and determine a target electric parameter value of the preset working electric parameter corresponding to the target voltage range based on the preset correspondence relationship.

[0100] The environmental parameter comprises a current power supply voltage for supplying power to the processing unit; the preset correspondence relationship comprises a correspondence relationship between different power supply voltage ranges of the power supply and different electric parameter values of the preset working electric parameter; and the control module 430 is specifically configured to determine a target voltage range in which a voltage value of the current power supply voltage in the parameter value of the environmental parameter is located; and determine a target electric parameter value of the preset working electric parameter corresponding to the target voltage range based on the preset correspondence relationship.

[0101] The power consumption management device of the processing unit further comprises a timer module 410 and a power-on and power-off module 420.

[0102] The timer module 410 is configured to start timing in response to the processing unit completing a current task; and the timer module 410 is further configured with a preset time length. If the processing unit does not receive a new task when the timing time length reaches the preset time length, the power-on and power-off module 420 stops supplying power to the processing unit.

[0103] The control module 430 is configured to configure the preset working electric parameter of the processing unit as a minimum electric parameter value allowed when the processing unit is in a working state, and the preset working electric parameter comprises a working electric parameter related to power consumption of the processing unit.

[0104] The preset working electric parameter configured by the control module 430 comprises at least one of a working frequency and a working voltage of the processing unit.

[0105] The control module 430 can also be configured to control the processing unit to enter a standby state in a power supply state after the timing starts; and the working frequency of the processing unit in the standby state is 0.

[0106] The power-on / off module 420 is further configured to control the power supply to supply power to the processing unit in response to a requirement of allocating a new task to the processing unit when the processing unit is in the power-off state.

[0107] The timer module 410 is further configured to stop the timing when the processing unit receives the new task before the timing duration reaches the preset duration after starting the timing. The environment module 440 is further configured to reacquire the parameter value of the environment parameter. The control module 420 is further configured to re-determine the target power parameter value of the preset working power parameter according to the reacquired parameter value of the environment parameter, and control the processing unit to execute the new task based on the re-determined target power parameter value.

[0108] It can be understood that the function implemented by the power consumption management apparatus of the processing unit is similar to the power consumption management method of the processing unit, and details can be referred to the foregoing content, which will not be repeated here.

[0109] Based on the same inventive concept, the embodiment of the present application further provides an electronic device. Please refer to FIG. 5, which is a schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device 500 comprises a control unit 510, a processing unit 520 and a power supply 530. The control unit 510 is in control connection with the processing unit 520 and the power supply 230. The power supply 530 is connected with the processing unit 520 and configured to supply power to the processing unit 520.

[0110] The control unit 510 can be a CPU, an MCU or other devices with control function, configured to execute the power consumption management method of the processing unit provided by the foregoing embodiments of the present application. The processing unit can be an NPU, a GPU, an ISP, a DPU, a VPU or the like. The content of the power consumption management method of the processing unit can be referred to the foregoing content, which will not be repeated here.

[0111] In an embodiment of the present application, the electronic device 500 can further comprise an environment monitoring unit 540. The environment monitoring unit 540 is configured to monitor the working environment of the processing unit 520 to obtain an environment parameter. The environment monitoring unit 540 is further connected with the control unit 510 and configured to provide the environment parameter to the control unit 510, so that the control unit executes the foregoing power consumption management method of the processing unit requiring the environment parameter.

[0112] The technical features of the above embodiments can be freely combined without conflict, and the embodiments obtained by combination are covered by the protection scope of the present application.

[0113] The above description is merely a specific implementation of the application. One of ordinary skill in the art should appreciate that the application can be implemented in other specific forms without departing from the spirit or essential characteristics of the application. Accordingly, the disclosure of the application is intended for use in all fair and equivalent ways so that those skilled in the art, and with the limited purpose of meeting the patent law requirements, can realize or carry out other and various implementations of the application with the concept and technical solutions of the application. Therefore, the scope of the protection of the application is not limited by the specific implementation described above, but defined by the scope of protection of the claims.

[0114] It should be noted that, in this text, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices that include a series of elements not only include those elements, but also include other elements not explicitly listed, or include elements inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or device that includes the element.

Claims

1. A method of power management of a processing unit, characterized by, A control unit applied to an electronic device, the electronic device further comprising a processing unit, the control unit and the processing unit being connected, and a power consumption management method of the processing unit comprising: obtaining a parameter value of an environment parameter of a working environment of the processing unit; determining a target electric parameter value of a preset working electric parameter based on the parameter value of the environment parameter and a preset corresponding relationship, the preset corresponding relationship comprising a corresponding relationship between different parameter values of the environment parameter and different target electric parameter values of the preset working electric parameter, the different target electric parameter values of the preset working electric parameter being electric parameter values that make the power consumption of the processing unit reach a preset requirement under different parameter values of the environment parameter; controlling the preset working electric parameter of the processing unit to execute a current task at the target electric parameter value.

2. The power consumption management method of a processing unit according to claim 1, wherein, The environment parameter comprises a current temperature of the working environment of the processing unit, and the preset corresponding relationship comprises a corresponding relationship between different temperature ranges of the current temperature and different electric parameter values of the preset working electric parameter. The determining of the target electric parameter value of the preset working electric parameter based on the parameter value of the environment parameter and the preset corresponding relationship comprises: determining a target temperature range in which a temperature value of the current temperature in the parameter value of the environment parameter is located; determining the target electric parameter value of the preset working electric parameter corresponding to the target temperature range based on the preset corresponding relationship.

3. The power management method of a processing unit according to claim 1, wherein, The electronic device further comprises a power supply for supplying power to the processing unit, and the control unit, the processing unit and the power supply control are connected with each other. The environment parameter comprises a current power supply voltage for supplying power to the processing unit, and the preset corresponding relationship comprises a corresponding relationship between different power supply voltage ranges of the power supply and different electric parameter values of the preset working electric parameter. The determining of the target electric parameter value of the preset working electric parameter based on the parameter value of the environment parameter and the preset corresponding relationship comprises: determining a target voltage range in which a voltage value of the current power supply voltage in the parameter value of the environment parameter is located; determining the target electric parameter value of the preset working electric parameter corresponding to the target voltage range based on the preset corresponding relationship.

4. The power management method of a processing unit according to claim 1, wherein, The electronic device further comprises a power supply for supplying power to the processing unit, and the control unit, the processing unit and the power supply control are connected with each other; the environment parameter comprises a current power supply voltage for supplying power to the processing unit; and the preset corresponding relationship comprises a corresponding relationship between different power supply voltage ranges of the power supply and different electric parameter values of the preset working electric parameter. The determining of the target electric parameter value of the preset working electric parameter based on the parameter value of the environment parameter and the preset corresponding relationship comprises: determining a target voltage range in which a voltage value of the current power supply voltage in the parameter value of the environment parameter is located; determining the target electric parameter value of the preset working electric parameter corresponding to the target voltage range based on the preset corresponding relationship.

5. The method of power management of a processing unit according to any of claims 1-4, characterized in that, The electronic device further comprises a power supply for supplying power to the processing unit, and the control unit, the processing unit and the power supply control are connected with each other. After the controlling of the preset working electric parameter of the processing unit to execute the current task at the target electric parameter value, the method further comprises: start timing in response to the processing unit completing a current task; if the processing unit does not receive a new task when the timing duration reaches a preset duration, control the power supply to stop supplying power to the processing unit.

6. The power management method of a processing unit according to claim 5, wherein, After the timing is started, the method further includes: configuring a preset working electrical parameter of the processing unit as a minimum electrical parameter value allowed when the processing unit is in a working state, the preset working electrical parameter including a working electrical parameter related to power consumption of the processing unit.

7. The power management method of a processing unit according to claim 6, wherein, The preset working electrical parameter includes at least one of a working frequency and a working voltage of the processing unit.

8. The power management method of a processing unit according to claim 5, wherein, After the timing is started, the method further includes: control the processing unit to enter a standby state in a power supply state; the working frequency of the processing unit in the standby state is 0.

9. The power management method of a processing unit according to claim 5, wherein, The power consumption management method of the processing unit further includes: in response to the need to allocate a new task to the processing unit when the processing unit is in a power-off state, control the power supply to supply power to the processing unit.

10. The power management method of a processing unit according to claim 5, wherein, After the timing is started in response to the processing unit completing a current task, the method further includes: if the processing unit receives a new task before the timing duration reaches the preset duration, stop timing; reacquire the parameter value of the environmental parameter; redetermine the target electrical parameter value of the preset working electrical parameter according to the reacquired parameter value of the environmental parameter; control the processing unit to execute the new task based on the redetermined target electrical parameter value.

11. A power management apparatus of a processing unit, characterized by, A control unit applied to an electronic device, the electronic device further includes a processing unit, the control unit and the processing unit are connected; The power consumption management device of the processing unit includes an acquisition module and a control module. The control module is used to acquire the parameter value of the environmental parameter of the working environment of the processing unit. The control module is used to determine the target electrical parameter value of the preset working electrical parameter based on the parameter value of the environmental parameter and a preset corresponding relationship; the preset corresponding relationship includes the corresponding relationship between different parameter values of the environmental parameter and different target electrical parameter values of the preset working electrical parameter; the different target electrical parameter values of the preset working electrical parameter are the electrical parameter values that make the power consumption of the processing unit meet the preset requirements under different parameter values of the environmental parameter; control the preset working electrical parameter of the processing unit to execute a current task with the target electrical parameter value.

12. An electronic device, comprising: including: a control unit, used to execute the power consumption management method of the processing unit according to any one of claims 1-10; a processing unit, connected with the control unit; an environmental monitoring unit, used to monitor the working environment of the processing unit to obtain an environmental parameter; the environmental monitoring unit is also connected with the control unit and is also used to provide the environmental parameter for the control unit, so that the control unit executes the power consumption management method of the processing unit according to any one of claims 1-10; a power supply, connected with the control unit and the processing unit respectively, used to supply or cut off power to the processing unit in response to the control of the control unit.

13. A readable storage medium, characterized by, The readable storage medium stores a program, and when the computer program runs on the processor, the processor executes the power consumption management method of the processing unit as claimed in any one of claims 1-10.

Citation Information

Patent Citations

  • Method for adjusting power consumption, electronic device and computer readable storage medium

    CN108710429A

  • Control method of electronic equipment

    CN111142640A

  • Control system and method, chip and electronic equipment

    CN115357111A

  • Power consumption control method and device for GPU, electronic equipment and storage medium

    CN116225202A

  • Equipment control method and device, medium, equipment and chip

    CN117348710A