Method, device, server and storage medium for reducing power consumption
The Bayesian optimization method is used to automatically adjust terminal equipment parameters, which solves the problem of high power consumption in the existing technology, reduces the power consumption of the entire machine while meeting performance requirements, and ensures normal business operation.
Patent Information
- Application Number
- CN202310438057.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2043-04-14
AI Technical Summary
It is difficult for the existing technology to effectively reduce the power consumption of the whole machine while meeting the performance requirements of the terminal equipment. It relies on manual experience to set parameters, which has great limitations and cannot adapt to various practical application scenarios, resulting in high power consumption.
The Bayesian optimization method is used to automatically adjust the parameter values of the terminal equipment. By obtaining the screen frame rate and loading the optimized parameter value when it matches the business requirements, it ensures that the power consumption is reduced. At the same time, when the performance requirements are not met, it switches to the parameter value set by experience. Ensure the normal operation of business.
Without relying on manual experience, it realizes automatic adjustment of terminal equipment parameters, reduces the power consumption of the entire machine, prevents service frame drops, and ensures user experience.
Smart Images

Figure CN117130460B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of terminal equipment, and in particular to a method, equipment, server and storage medium for reducing power consumption. Background Art
[0002] Power consumption is an important factor in evaluating and selecting terminal devices such as mobile phones and tablets. Currently, in order to reduce the overall power consumption of terminal devices while meeting performance requirements, the parameters required for the operation of terminal devices are usually manually set by staff before leaving the factory.
[0003] However, the parameters that are manually set based on experience have great limitations and cannot adapt well to various practical application scenarios, resulting in high power consumption of terminal devices. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a method, device, server and storage medium for reducing power consumption, aiming to reduce the power consumption of the whole device as much as possible while ensuring that the terminal device meets the performance requirements.
[0005] In a first aspect, the present application provides a method for reducing power consumption. The method comprises: when a terminal device is in a powered-on state, loading a first parameter value suitable for the current state determined based on a Bayesian optimization method; wherein the power consumption value generated when the terminal device is running based on the first parameter value is less than the power consumption value generated when the terminal device is running based on the second parameter value; and the second parameter value is set based on experience.
[0006] Since the first parameter value is determined based on the Bayesian optimization method, the automatic adjustment of the parameters required for the operation of the terminal device is achieved without relying on manual experience. Since the power consumption value generated when running based on the first parameter value is lower than the power consumption value generated when running based on the second parameter value (set based on experience), the method for reducing power consumption provided by the present application can reduce the power consumption of the entire device as much as possible while ensuring that the terminal device meets the performance requirements.
[0007] According to the first aspect, loading a first parameter value suitable for the current state determined based on a Bayesian optimization method includes: obtaining a current first frame rate of the screen of the terminal device; obtaining a second frame rate required by a service currently corresponding to the terminal device; and when the first frame rate matches the second frame rate, loading a first parameter value suitable for the current state determined based on a Bayesian optimization method.
[0008] Among them, the first frame rate is, for example, the current frame rate of the terminal device mentioned in the following embodiments, and the second frame rate is, for example, the frame rate that the terminal device must meet when processing services in the following embodiments.
[0009] In addition, the matching of the first frame rate with the second frame rate mentioned above may specifically be to determine whether the first frame rate is greater than or equal to, that is, not less than, the second frame rate. For example, when the second frame rate is 30fps, the first frame rate needs to be ≥30fps.
[0010] For example, the frame rate requirement of the terminal device may be relaxed to a certain extent, such as setting a limit value that the current frame rate is allowed to be lower than the target frame rate, such as 0.1fps. That is, when the second frame rate is 30fps, the first frame rate needs to be ≥29.9fps.
[0011] According to the first aspect, or any implementation of the first aspect above, the method further includes: when the first frame rate does not match the second frame rate, loading the second parameter value, and when the terminal device performs a service based on the second parameter value, the frame rate of the screen of the terminal device can meet the frame rate required by any service. In this way, when the first parameter value cannot meet the current service requirement, the second parameter value that can always meet the service requirement is directly loaded to perform the operation, thereby ensuring that the service of the terminal device can be carried out normally.
[0012] According to the first aspect, or any implementation of the first aspect above, the first parameter value is determined by the server; loading the first parameter value suitable for the current state determined based on the Bayesian optimization method includes: obtaining the first parameter value from the server; when the first parameter value is obtained from the server, loading the first parameter value. In this way, the first parameter value is determined by the server, and the terminal device only needs to receive the first parameter value provided by the server, and the power consumption of the terminal device will not be increased.
[0013] According to the first aspect, or any implementation of the first aspect above, the method further includes: loading the second parameter value when the first parameter value is not obtained from the server. In this way, it is ensured that the terminal device can operate normally.
[0014] According to the first aspect, or any implementation of the first aspect above, the first parameter value is determined by the terminal device; loading the first parameter value suitable for the current state determined based on the Bayesian optimization method includes: searching for the first parameter value directly from the storage path of the terminal device, and loading the first parameter value after finding the first parameter value. In this way, the terminal device determines the first parameter value corresponding to the lower power consumption value by itself, thereby ensuring that when the terminal device cannot interact with the server, the parameter value can be adjusted by itself according to business needs to reduce the power consumption of the terminal device.
[0015] According to the first aspect, or any implementation of the first aspect above, after loading the first parameter value suitable for the current state determined based on the Bayesian optimization method, the method also includes: in the process of the terminal device executing the service based on the first parameter value, periodically obtaining the current first frame rate of the screen of the terminal device; when the first frame rate matches the second frame rate required by the service currently corresponding to the terminal device, based on the first parameter value, continue to execute the service; when the first frame rate does not match the second frame rate, adjust the first parameter value to the second parameter value. In this way, when the terminal device meets the performance requirements, such as power requirements, the first parameter value is loaded to execute the service, and when the performance requirements are not met, the second parameter value is loaded to execute the service, thereby reducing the power consumption of the terminal device while preventing the problem of frame drops in the executed service, thereby ensuring the user experience.
[0016] According to the first aspect, or any implementation of the first aspect above, the first parameter value includes a parameter value corresponding to the number of CPU cores, a parameter value corresponding to the CPU frequency, a parameter value corresponding to the DDR frequency, and a parameter value corresponding to migrate. In this way, automatic adjustment of parameters with high power consumption values caused by the software part is achieved, so that when the terminal device runs based on the adjusted first parameter value, it can effectively reduce power consumption.
[0017] According to the first aspect, or any implementation of the first aspect above, the service currently executed by the terminal device is a shooting service; loading a first parameter value suitable for the current state determined based on the Bayesian optimization method includes: determining a shooting mode corresponding to the shooting service; determining all scenes that the shooting mode may include, the scenes include a first scene and a second scene, the scene currently being operated by the terminal device is the first scene, and the second scene is not operating; loading the first parameter value required for the first scene and the second scene to operate simultaneously. In this way, only the shooting mode is considered, and user needs can be responded to quickly.
[0018] According to the first aspect, or any implementation of the first aspect above, the method further includes: only loading the first parameter value required for the first scene operation. In this way, both the shooting mode and the scene of the current operation of the shooting mode are considered, so that the loaded first parameter value is more suitable for actual use, and the power consumption of the terminal device is further reduced while ensuring that the terminal device meets the performance requirements.
[0019] In a second aspect, the present application provides a terminal device. The terminal device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the terminal device executes instructions of the method in the first aspect or any possible implementation of the first aspect.
[0020] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0021] In a third aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0022] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0023] In a fourth aspect, the present application provides a computer program, comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0024] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0025] In a fifth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal.
[0026] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0027] In a sixth aspect, the present application provides a server. The server is used to determine a first parameter value suitable for a terminal device based on a Bayesian optimization method, and send the first parameter value to the terminal device; wherein the power consumption value generated when the terminal device runs based on the first parameter value is less than the power consumption value generated when the terminal device runs based on the second parameter value; and the second parameter value is set based on experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of a scenario for exemplarily illustrating a method for reducing power consumption provided in an embodiment of the present application;
[0029] Figure 2 A schematic diagram of a scenario for exemplarily illustrating a method for reducing power consumption provided in an embodiment of the present application;
[0030] Figure 3 A schematic diagram of the hardware structure of a terminal device is shown as an example;
[0031] Figure 4 A schematic diagram of the software structure of a terminal device is shown as an example;
[0032] Figure 5 A schematic diagram showing shooting modes and scenes included in a camera application shown as an example;
[0033] Figure 6 The flowchart of the method for reducing power consumption provided by the embodiment of the present application is intended to be exemplified in the case where there is no scene recognition;
[0034] Figure 7 A schematic diagram of an exemplary user interface;
[0035] Figure 8 The flowchart of the method for reducing power consumption provided by the embodiment of the present application is shown as an example in the case of scene recognition;
[0036] Fig. 9 A schematic diagram of determining BO parameter values for an exemplary parameter optimization module;
[0037] Fig.10 The figure is a schematic diagram for comparing the power consumption value of the related technology and the power consumption value determined based on the method for reducing power consumption provided in the embodiment of the present application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0040] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0041] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0042] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0043] In order to better understand the technical solutions provided by the embodiments of the present application, the current problems in the scenarios targeted by the technical solutions provided by the embodiments of the present application are first described below.
[0044] Specifically, with the development of mobile terminal technology and Internet technology, various terminal devices, such as mobile phones, tablets, smart watches, etc., have occupied an important position in people's daily life and work. At present, there are many factors that affect users' choice of terminal devices and their evaluation of the quality of terminal devices, and one of the important factors is power consumption.
[0045] Understandably, the sources of power consumption are mainly divided into two parts: hardware and software. Among them, the power consumption of hardware is closely related to the preparation materials and technology, and is not easy to change. The power consumption of software can be further reduced by adjusting the parameters of the terminal equipment.
[0046] Therefore, in order to reduce the power consumption of the terminal equipment while meeting the performance requirements, before the terminal equipment leaves the factory, the staff will determine a set of parameters that can reduce power consumption based on experience, and set the parameters determined by experience as the parameters required for the terminal equipment to operate.
[0047] Referring to Table 1, it is exemplarily shown that after the worker sets parameters for the terminal device based on experience, the power consumption corresponding to the parameter objects involved in some functional modules in the terminal device.
[0048] Table 1 Software and hardware power consumption
[0049]
[0050]
[0051] From Table 1, we can find that except for MX, CX, GFX, etc., which need to improve the hardware parameters, the corresponding power consumption of CPU, DDR, etc., which can be improved by software parameters, is also high. Obviously, this kind of manual setting of parameters based on experience has great limitations and cannot adapt well to various actual application scenarios, resulting in high power consumption of terminal devices. For example, terminal devices are still prone to heat up during use, and there will be freezes, flashbacks, fast power consumption, and poor battery life.
[0052] In view of this, an embodiment of the present application provides a method for reducing power consumption. In this method, when the terminal device is set to be in the power-on state, a first parameter value determined based on the Bayesian optimization method and suitable for the current state is loaded to process the service, rather than loading a second parameter value manually set by experience to process the service. Because the power consumption value generated by the terminal device when running based on the first parameter value is less than the power consumption value generated when running based on the second parameter value. Therefore, without relying on manual experience, automatic adjustment of the parameters required for the operation of the terminal device is achieved, so that the terminal device can reduce the power consumption of the entire machine as much as possible while meeting the performance requirements.
[0053] Exemplarily, the first parameter value is, for example, the BO parameter value determined by the parameter optimization module based on the Bayesian optimization method, that is, the parameter value with the lowest corresponding power consumption value. The second parameter value is, for example, the default parameter value set by the staff based on experience, as described below.
[0054] Specifically, in the method for reducing power consumption provided in an embodiment of the present application, when the terminal device loads a first parameter value suitable for the current state determined based on a Bayesian optimization method, the current first frame rate of the screen of the terminal device and the second frame rate of the service requirements currently corresponding to the terminal device can be obtained first, and then it is determined whether the first frequency matches the second frequency.
[0055] Accordingly, when the first frame rate matches the second frame rate, the first parameter value suitable for the current state determined based on the Bayesian optimization method is loaded; otherwise, when the first frame rate does not match the second frame rate, the second parameter value is loaded.
[0056] Understandably, since the second parameter value set based on experience usually has a large space, when the terminal device executes a service based on the second parameter value, the frame rate of the screen of the terminal device can meet the frame rate required by any service.
[0057] Exemplarily, the first frame rate is the current frame rate of the terminal device mentioned below, and the second frame rate is the required frame rate that needs to be met.
[0058] For example, in some implementations, the matching of the first frame rate with the second frame rate may specifically be to determine whether the first frame rate is greater than or equal to, that is, not less than, the second frame rate. For example, when the second frame rate is 30fps, the first frame rate needs to be ≥30fps.
[0059] For example, the frame rate requirement of the terminal device may be relaxed to a certain extent, such as setting a limit value that the current frame rate is allowed to be lower than the target frame rate, such as 0.1fps. That is, when the second frame rate is 30fps, the first frame rate needs to be ≥29.9fps.
[0060] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0061] The above-mentioned determination of whether the first frame rate matches the second frame rate is as described in step S106 and step S206 in the following embodiment to determine whether the current frame rate meets the required frame rate. For details on determining whether the first frame rate matches the second frame rate, please refer to the part of step S106 and step S206, which will not be repeated here.
[0062] In addition, the terminal device executing the service mentioned above, for example, is the terminal device starting a service using a certain application, such as starting a camera application to perform a shooting service as described below.
[0063] Exemplarily, based on the method for reducing power consumption provided in the embodiment of the present application, in some implementations, a functional module for determining the parameter with the lowest power consumption (hereinafter referred to as a parameter optimization module) can be integrated into a server (such as Figure 1 In the parameter server in the example, the parameter server predetermines the corresponding parameter values for different applications in different scenarios and modes. Figure 1 As shown, the parameter optimization module in the parameter server can determine the specific parameter values corresponding to parameters 1, 2, 3 and 4 respectively when an application installed in the mobile phone terminal device works in scene 1, scene 2 and scene 3 based on the method for reducing power consumption provided in the embodiment of the present application.
[0064] Continue to see Figure 1For scenario 1, the parameter value corresponding to parameter 1 is, for example, a1, the parameter value corresponding to parameter 2 is, for example, b1, the parameter value corresponding to parameter 3 is, for example, c1, and the parameter value corresponding to parameter 4 is, for example, d1. For scenario 2, the parameter value corresponding to parameter 1 is, for example, a2, the parameter value corresponding to parameter 2 is, for example, b2, the parameter value corresponding to parameter 3 is, for example, c2, and the parameter value corresponding to parameter 4 is, for example, d2. For scenario 3, the parameter value corresponding to parameter 1 is, for example, a3, the parameter value corresponding to parameter 2 is, for example, b3, the parameter value corresponding to parameter 3 is, for example, c3, and the parameter value corresponding to parameter 4 is, for example, d3.
[0065] Wherein, a1, a2, a3 can be different parameter values or the same parameter value. Correspondingly, b1, b2, b3 can be different parameter values or the same parameter value. Correspondingly, c1, c2, c3 can be different parameter values or the same parameter value. Correspondingly, d1, d2, d3 can be different parameter values or the same parameter value.
[0066] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0067] Continue to see Figure 1 , exemplarily, the parameter optimization module in the parameter server determines based on the method for reducing power consumption provided in the embodiment of the present application Figure 1 After the parameter values corresponding to scene 1, scene 2 and scene 3 are obtained, the parameter values corresponding to each scene can be sent to the mobile phone. Accordingly, when the mobile phone uses the corresponding application, it can load the parameter values suitable for the scene and mode of the current application. For example, when working in scene 1, the parameter value a1 corresponding to parameter 1, the parameter value b1 corresponding to parameter 2, the parameter value c1 corresponding to parameter 3, and the parameter value d1 corresponding to parameter 4 can be used.
[0068] Therefore, through the parameter optimization module in the parameter server based on the method for reducing power consumption provided by the embodiment of the present application, the parameter values that enable the terminal device to have the lowest power consumption while meeting the performance requirements when the application works in different scenarios and modes are determined, rather than relying on manual and experience-based determination, thereby ensuring that the determined parameter values are more reasonable and can better reduce labor costs.
[0069] Exemplarily, based on the method for reducing power consumption provided in the embodiment of the present application, in another implementation, a parameter server may be set to interact with a terminal device (such as a mobile phone) so as to update parameter values according to the actual usage of the mobile phone.
[0070] For example, assume that the parameter server is based on Figure 1In the manner shown, the parameter values corresponding to scene 1, scene 2 and scene 3 are respectively sent to the mobile phone. After the mobile phone works based on the parameter values corresponding to these scenes, the actual corresponding power consumption when working in the corresponding scene based on the corresponding parameter values can be fed back to the parameter server, such as Figure 2 shown.
[0071] Accordingly, after the parameter server receives the power consumption of different parameter values corresponding to different scenarios fed back by the mobile phone, it can optimize the parameter value again based on the method for reducing power consumption provided in the embodiment of the present application. For example, the parameter value corresponding to parameter 1 in scenario 1 is adjusted from a1 to a1'; the parameter value corresponding to parameter 2 is adjusted from b1 to b1'; the parameter value corresponding to parameter 3 is adjusted from c1 to c1'; the parameter value corresponding to parameter 4 is adjusted from d1 to d1'. For another example, the parameter value corresponding to parameter 1 in scenario 2 is adjusted from a2 to a2'; the parameter value corresponding to parameter 2 is adjusted from b2 to b2'; the parameter value corresponding to parameter 3 is adjusted from c2 to c2'; the parameter value corresponding to parameter 4 is adjusted from d2 to d2'. For another example, the parameter value corresponding to parameter 1 in scenario 3 is adjusted from a3 to a3'; the parameter value corresponding to parameter 2 is adjusted from b3 to b3'; the parameter value corresponding to parameter 3 is adjusted from c3 to c3'; the parameter value corresponding to parameter 4 is adjusted from d3 to d3'.
[0072] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0073] In addition, it should be noted that in actual applications, the parameter server can exchange data with multiple terminal devices. Therefore, for the parameter values corresponding to the same scene and mode, the parameter server may receive power consumption data fed back by multiple terminal devices. Therefore, when adjusting the parameter values corresponding to these scenes and modes, the parameter server can make optimized selections based on the data fed back by the same type of terminal devices. In this way, while reducing the number of parameter server processing times, it can also ensure that the adjusted parameter values are applicable to multiple terminal devices.
[0074] Continue to see Figure 2 , exemplarily, the parameter optimization module in the parameter server is based on the method for reducing power consumption provided in the embodiment of the present application, Figure 1 The parameter values corresponding to the scenes 1, 2 and 3 shown in the figure are adjusted to Figure 2After the parameter values corresponding to the scenes 1, 2, and 3 are respectively shown, the adjusted parameter values corresponding to each scene can be resent to the mobile phone. Accordingly, when the mobile phone uses the corresponding application, it can load the parameter values newly pushed by the parameter server that are suitable for the scene and mode of the current application. For example, when working in scene 1, the parameter value a1' corresponding to parameter 1, the parameter value b1' corresponding to parameter 2, the parameter value c1' corresponding to parameter 3, and the parameter value d1' corresponding to parameter 4 can be used.
[0075] Therefore, in Figure 1 On the basis of the implementation shown, by setting the parameter server and the terminal device to interact, the parameter server can adjust the parameter values corresponding to different scenarios and modes according to the actual power consumption generated by the terminal device in different scenarios and modes using the parameter values set by the parameter server. In this way, as the memory, processing resources, power, etc. of the terminal device change during use, the required parameter values can also change dynamically when the terminal device works in different scenarios and modes, so as to better meet the actual use needs.
[0076] In addition, it should be noted that in order to reduce the impact of the interaction between the mobile phone and the parameter server on the power consumption of the mobile phone, in some implementations, the mobile phone can be set to interact with the parameter server for data when the mobile phone is in an idle state, such as when no application is currently running.
[0077] Exemplarily, in other implementations, the mobile phone may be configured to perform data exchange with the parameter server when the mobile phone is in a charging state.
[0078] Exemplarily, in other implementations, the mobile phone may be set to perform data exchange with the parameter server during a fixed time period, such as from 00:00 to 06:00.
[0079] Exemplarily, in other implementations, the parameter server can also be set to push the ideal power consumption of the parameter value in the corresponding scenario when pushing the corresponding parameter value to the mobile phone. Accordingly, when the mobile phone uses the parameter value and works in the scenario, if the corresponding power consumption is not much different from the ideal power consumption, in order to reduce the power consumption caused by the interaction between the mobile phone and the parameter server, it is not necessary to interact with the parameter server. On the contrary, when the power consumption is significantly different, specifically greater than the ideal power consumption, the mobile phone is set to interact with the parameter server for data.
[0080] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0081] Exemplarily, based on the method for reducing power consumption provided in the embodiment of the present application, in another implementation, the parameter optimization module can be integrated into the terminal device. That is, when different applications are in different scenarios and modes, the corresponding parameter values are determined by the terminal device itself.
[0082] As a result, there is no need to deploy additional parameter servers, reducing implementation costs.
[0083] In addition, since the parameter value is determined by the terminal device itself, it can better fit the actual usage of the terminal device and achieve individualization.
[0084] Exemplarily, based on the method for reducing power consumption provided in the embodiment of the present application, in another implementation manner, the parameter optimization module may be integrated into the terminal device and the parameter server respectively.
[0085] Therefore, when the terminal device can interact with the parameter server, the parameter server implements the setting of the parameter value, thereby reducing the power consumption consumed by the terminal device to determine the parameter value. When the terminal device cannot interact with the parameter server, the terminal device determines the parameter value by itself, so that the terminal device can load the appropriate parameter value and work in different scenarios and modes.
[0086] It should be understood that the above four methods of reducing power consumption based on the embodiments of the present application, and the ways of adjusting parameter values of the terminal device when working in different scenarios and modes, are only examples listed for a better understanding of the technical solution of the present embodiment, and are not the only limitation to the methods of reducing power consumption provided in the embodiments of the present application.
[0087] In order to better understand the technical solution provided by the embodiments of the present application, before describing the technical solution of the embodiments of the present application, the hardware structure and software architecture of the terminal device to which the embodiments of the present application are applicable are first described in conjunction with the accompanying drawings.
[0088] The terminal device to which the embodiment of the present application is applicable may be, for example, the mobile phone, tablet, smart watch, etc. listed above, which are not listed one by one here, and the present embodiment does not limit this. For the sake of convenience, the present embodiment is described by taking a mobile phone as an example.
[0089] See also Figure 3The mobile phone 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0090] The audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, an earphone jack 170D, etc., which are not listed here one by one and are not limited in this application.
[0091] Among them, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not listed here one by one and the present application does not impose any limitation on this.
[0092] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0093] The controller may be the nerve center and command center of the mobile phone 100. In practical applications, the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0094] The processor 110 may also be provided with a memory for storing instructions and data. In some implementations, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0095] The processor 110 may further include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0096] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0097] Continue to see Figure 3 , exemplarily, the wireless communication function of the mobile phone 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0098] Among them, antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization rate of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other implementations, the antenna can be used in combination with a tuning switch.
[0099] Continue to see Figure 3, exemplarily, the mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some implementations, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some implementations, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0100] The modem processor may include a modulator and a demodulator. In some implementations, the modem processor may be an independent device. In other implementations, the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
[0101] Continue to see Figure 3 Exemplarily, the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0102] Specifically, in the technical solution provided in the embodiment of the present application, the mobile phone 100 can interact with the parameter server mentioned in the above embodiment through the mobile communication module 150 or the wireless communication module 160. For example, the mobile phone 100 can receive the parameter value set by the parameter server for each scene and mode through the mobile communication module 150, and send the power consumption of the mobile phone 100 working at the corresponding parameter value to the parameter server.
[0103] Continue to see Figure 3 Exemplarily, the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external memory card.
[0104] Continue to see Figure 3 Exemplarily, the internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the mobile phone 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0105] Specifically, in the technical solution provided in the embodiment of the present application, the parameter values of different scenes and modes corresponding to different applications installed in the mobile phone 100 can be stored in the memory storage 121. In this way, when the mobile phone runs the corresponding application to the corresponding scene and mode, the corresponding parameter value can be read from the internal memory 121, so that the mobile phone 100 works based on the parameter value. Since the parameter value is the optimal parameter value suitable for the current scene and mode determined based on the method for reducing power consumption provided in the embodiment of the present application, the mobile phone 100 can reduce the power consumption of the whole machine as much as possible under the premise of meeting the performance requirements.
[0106] This is the end of the introduction to the hardware structure of the mobile phone 100. It is understandable that the structure shown in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include Figure 3More or fewer components may be shown, or some components may be combined or separated, or the components may be arranged differently. Figure 3 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0107] To better understand Figure 3 The software structure of the mobile phone 100 is shown, and the software structure of the mobile phone 100 is described below. Before describing the software structure of the mobile phone 100, the architecture that can be adopted by the software system of the mobile phone 100 is first described.
[0108] Specifically, in actual applications, the software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
[0109] In addition, it is understandable that the software systems used by the current mainstream terminal devices include but are not limited to Windows systems, Android systems and iOS systems. For ease of explanation, the present application embodiment takes the layered Android system as an example to exemplify the software structure of the mobile phone 100.
[0110] In addition, the subsequent solutions for reducing power consumption provided in the embodiments of the present application are also applicable to other systems in specific implementations.
[0111] See also Figure 4 , which is a software structure block diagram of the mobile phone 100 according to an embodiment of the present application.
[0112] like Figure 4 As shown, the layered architecture of the mobile phone 100 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some implementations, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.
[0113] The application layer may include a series of application packages. Figure 4 As shown, the application package may include parameter optimization, settings, Wi-Fi and other applications, which are not listed here one by one and are not limited in this application.
[0114] Specifically in this embodiment, the parameter optimization application can provide a user portal for the user to enable the automatic parameter adjustment function. This embodiment does not limit the interface, options, etc. included in the parameter optimization application.
[0115] Understandably, when the parameter value is determined by the parameter server, after the automatic parameter adjustment function is turned on, the terminal device can send a parameter value acquisition request to the parameter server to obtain the parameter values required for different applications working in different scenarios and modes from the parameter server.
[0116] In addition, it can be seen from the above description that for the scenario where the parameter value is determined by the parameter server, the terminal device needs to interact with the parameter server through the mobile communication module 150 or the wireless communication module 160. Therefore, in order to ensure that the terminal device can receive the parameter value sent by the parameter server, when the automatic parameter adjustment function is turned on, it is necessary to ensure that the terminal device has turned on the cellular network or wireless network. Taking turning on the wireless network as an example, in one implementation method, WIFI can be turned on through the WIFI application and join the corresponding WIFI network. In another implementation method, WIFI can also be turned on and the corresponding WIFI network can be joined by setting the entrance for turning on the WIFI function provided by the application.
[0117] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0118] In addition, it is also understandable that when the parameter value can be determined by the terminal device itself, after the automatic parameter adjustment function is turned on, the terminal device can directly determine the parameter values required for different applications to work in different scenarios and modes.
[0119] In this way, when the terminal device starts different applications and works in different scenarios and modes, the appropriate parameter values can be loaded, so that the power consumption of the entire terminal device can be reduced as much as possible while meeting the performance requirements.
[0120] In addition, it should be noted that in some implementations, the user entrance provided by the parameter optimization function can also be integrated into the setting interface corresponding to the setting application; or into the interface corresponding to a certain option in the setting interface. The specific implementation method is not limited in this embodiment.
[0121] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0122] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. Figure 4As shown, the application framework layer may include functions such as content provider, resource manager, window manager, etc., which are not listed here one by one and are not limited in this application.
[0123] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0124] The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, parameter files corresponding to the application, etc., which are not listed here one by one and are not limited by this application.
[0125] It can be understood that the parameter file mentioned above is a file that records the parameter values corresponding to the parameters involved in each scene and mode.
[0126] The resource manager provides various resources for the application, such as localized strings, icons, images, layout files, video files, etc., which are not listed here one by one and are not limited in this application.
[0127] From the above description, it can be seen that the terminal device can also determine the parameter value by itself. For this implementation, a parameter optimization module needs to be integrated in the terminal device. In this way, the parameter optimization module located in the application framework layer of the terminal device can adjust the parameter values corresponding to the application scenarios and modes involved in various applications by adopting a set parameter optimization method, such as the Bayesian optimization method. For the specific implementation details of determining the parameter value based on the Bayesian optimization method, please refer to the following description, which will not be repeated here.
[0128] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0129] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
[0130] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0131] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0132] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0133] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0134] The media library supports the playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0135] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0136] It can be understood that the 2D graphics engine mentioned above is a drawing engine for 2D drawing.
[0137] In addition, it is understandable that the kernel layer in the Android system is a layer between hardware and software. The kernel layer at least includes display driver, sensor driver, WIFI driver, etc.
[0138] This concludes the introduction to the software structure of the mobile phone 100. It can be understood that: Figure 4 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.
[0139] In order to better understand the technical solution provided by the embodiments of the present application, taking the camera application as an example, the method for reducing power consumption provided by the embodiments of the present application is described in detail, and the selection of parameter values for various scenes and modes involved in the camera application is explained.
[0140] Specifically, in order to improve the user's shooting experience, the camera application currently installed in the terminal device can support multiple shooting modes. Figure 5 As shown, after the user opens the camera application installed in the terminal device, the displayed shooting interface will display shooting modes for the user to choose, such as portrait mode, normal video mode, movie mode, large aperture mode, night scene mode, multi-lens video mode, micro-movie mode, photo mode, etc., which are not listed one by one here and this application does not impose any restrictions on this.
[0141] Furthermore, each shooting mode can be divided into a front mode using a front camera and a rear mode using a rear camera. For example, the above-mentioned shooting modes can be divided into a front shooting mode and a rear shooting mode.
[0142] Furthermore, for each shooting mode, different scenes may be included. For example, the scene may include whether there is a human body, whether there is a face, whether there is a smile on the face, whether there are different races, etc. These are not listed here one by one, and this application does not limit this.
[0143] It is understandable that the above scene recognition is implemented by calling the corresponding algorithm. For example, for scene recognition with or without a human body, the human body detection (HumanDetection) algorithm needs to be called; for scene recognition with or without a face, the face detection (FaceDetection) algorithm needs to be further called when a human body is recognized; for scene recognition of whether a face is smiling, the smile detection (SmileDetection) algorithm needs to be further called when a face is recognized; for scene recognition of different races, the race detection (RaceDetection) algorithm needs to be further called when a face is recognized.
[0144] Continue to see Figure 5 Taking portrait mode as an example, its corresponding scenes may include scenes with or without human bodies based on a human body detection algorithm, scenes with or without faces based on a face detection algorithm, scenes with or without faces based on a smile detection algorithm, and scenes with or without smiles on faces based on a smile detection algorithm.
[0145] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0146] For the camera application, in actual use, when any shooting mode is selected for shooting, certain algorithms will be turned on, which involves some scene recognition. For example, in the process of recording in normal video mode, the camera application will always call the human body detection algorithm. Accordingly, when a human body is detected, the face detection algorithm will be further called. Accordingly, when a face is detected, the race detection algorithm, smile detection algorithm, skin beautification algorithm, etc. will be further called. Due to the different calls to different algorithms and the different number of calls to algorithms, the power consumption of the terminal device will also be different. From the above description, it can be seen that the staff currently sets the corresponding parameter values for each algorithm based on experience. The parameter space is very large, about 10 16 , which results in the power consumption of terminal devices remaining high.
[0147] Specifically in this embodiment, when the parameter automatic adjustment function is turned on, the parameter values corresponding to each shooting mode in the camera application and the parameter values corresponding to the scenes involved in each shooting mode are determined based on the Bayesian optimization algorithm. In this way, when the user opens the camera application and selects a shooting mode, the terminal device can load the corresponding parameter values, so that when the terminal device uses the currently selected shooting mode to shoot, the power consumption is the lowest while meeting the performance requirements corresponding to the shooting model, such as frame rate.
[0148] In the following, in conjunction with the accompanying drawings, the method for reducing power consumption provided in the embodiment of the present application is specifically described by taking adjusting the parameter values corresponding to the camera application as an example.
[0149] See also Figure 6 , exemplarily illustrates an implementation process of adjusting parameter values corresponding to a camera application based on a method for reducing power consumption provided in an embodiment of the present application without scene recognition.
[0150] It should be noted that the so-called situation without scene recognition specifically refers to the situation where only the shooting mode is considered. That is, the parameter values set for different shooting modes do not consider the situation of different scenes, and all scenes involved in the shooting mode are enabled by default, that is, the corresponding detection algorithms are all called.
[0151] See also Figure 6 , the implementation process of this embodiment specifically includes:
[0152] S101, in response to an operation behavior of opening a camera application, starting the camera application and displaying available shooting modes.
[0153] See also Figure 7 In (1), for example, when a user clicks on a camera application icon displayed in the interface 10a of a terminal device (taking a mobile phone as an example), the mobile phone will start the camera application in response to the operation.
[0154] See also Figure 7 In (2), illustratively, when the camera application is started, the mobile phone will switch from interface 10a to interface 10b.
[0155] Continue to see Figure 7 In (2), for example, in interface 10b, some shooting modes can be displayed for user selection, such as large aperture mode, night scene mode, photo mode, portrait mode, normal video mode, movie mode, etc., and a "more" option entrance can also be displayed.
[0156] For example, when the user clicks on the "More" option entrance, a pop-up window may be displayed to display other shooting modes that are not displayed, such as micro-movie mode, multi-lens recording mode, skin beautification mode, etc., which are not listed one by one here and this application does not impose any restrictions on this.
[0157] S102: Whether to enable the automatic parameter adjustment function.
[0158] It can be seen from the above description that the user can turn on or off the automatic parameter adjustment function through the function entry provided by the parameter optimization application, or through the function entry integrated in the setting application. Therefore, in one implementation, in order to be able to know whether the automatic parameter adjustment function is currently turned on when using the application installed in the terminal device. A global variable can be defined, that is, a variable that can be accessed by all applications in the terminal device that support the automatic parameter adjustment function (later represented by bypass), and it is agreed that when bypass = the first value, such as 1 or true, it indicates that the terminal device has turned on the automatic parameter adjustment function. When bypass = the second value, such as 0 or false, it indicates that the terminal device has not turned on the automatic parameter adjustment function.
[0159] Furthermore, it can be agreed that when the terminal device turns on the parameter automatic adjustment function, the parameter value corresponding to the application currently running is determined based on the Bayesian optimization method (hereinafter referred to as: BO parameter value). Conversely, when the terminal device does not turn on the parameter automatic adjustment function, the terminal device is set to load the parameter value pre-set by the staff based on experience (hereinafter referred to as: default parameter value).
[0160] It should be understood that the method for reducing power consumption provided in the embodiment of the present application needs to reduce the power consumption of the terminal device while meeting the performance requirements. Therefore, before determining that the terminal device has enabled the automatic parameter adjustment function and loading the BO parameter value suitable for the current, it can be determined whether the terminal device currently meets the performance, such as the frame rate requirements.
[0161] Exemplarily, after the terminal device enters the shooting mode, the frame rate required to be met may be, for example, 30fps, or 60fps, etc., which are not listed here and are not limited in this application.
[0162] Taking the frame rate that needs to be met as 60fps as an example, if the current frame rate of the terminal device is not less than 60fps, it is determined that the current terminal device meets the frame rate requirement. Otherwise, it does not meet the frame rate requirement.
[0163] For example, the frame rate requirement of the terminal device can be relaxed to a certain extent, such as setting a limit that the current frame rate is allowed to be lower than the target frame rate, such as 0.1fps. At this time, if the required frame rate is 60fps and the current device frame rate is 59.9fps, it can be considered that the current device meets the frame rate requirement.
[0164] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0165] This embodiment takes the camera application as an example, and illustratively, if it is determined that the terminal device does not enable the parameter automatic adjustment function, step S103 is executed. Otherwise, if it is determined that the terminal device enables the parameter automatic adjustment function, step S104 is executed.
[0166] For example, in other implementations, in order to achieve user customization, an entry for setting different applications to enable the automatic parameter adjustment function can be provided. For example, an entry for enabling the automatic parameter adjustment function is set for the camera application and the video application. In this case, a variable indicating whether the parameter adjustment function is enabled can be written into a file of the corresponding application, for example, and is only accessed when the application is started.
[0167] Accordingly, when the user only turns on the parameter automatic adjustment function corresponding to the camera application, when the camera application is started, the processing can be performed according to steps S101 to S110. After the video application is started, the default parameter values are directly loaded.
[0168] S103, loading default parameter values.
[0169] That is, load the parameter values in the existing solution that are set by the staff based on experience.
[0170] S104: Whether to exit the camera application.
[0171] Specifically, in order to further reduce the power consumption of the terminal device, when the camera application is started and it is determined that the terminal device has turned on the parameter automatic adjustment function, it can be further monitored whether the camera application is exited (closed).
[0172] Accordingly, when exiting the camera application, the process for implementing the parameter automatic adjustment function is terminated (destroyed), that is, step S105 is executed.
[0173] S105, ending the process of implementing the parameter automatic adjustment function.
[0174] Exemplarily, in the case where the BO parameter value is determined by the parameter server, after determining that the camera application is closed, the terminal device may destroy the process that interacts with the parameter server to obtain the BO parameter value.
[0175] For example, in the case where the BO parameter value is determined by the terminal device itself, after determining that the camera application is closed, the terminal device can destroy the process that determines the BO parameter value based on the Bayesian optimization method. Figure 4 In the process, the process corresponding to the parameter optimization module of the application framework layer is destroyed.
[0176] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0177] S106: Whether the frame rate meets the requirement.
[0178] Understandably, since the default parameter values are usually set over a wide range, such as 10 16 Therefore, after the terminal device loads the default parameter value, the frame rate of the terminal device can meet the requirement. Therefore, in this embodiment, it can be set to execute step S108 when it is determined that the current frame rate meets the required frame rate. On the contrary, when it is determined that the current frame rate does not meet the required frame rate, step S107 is executed.
[0179] S107, loading default parameter values.
[0180] Continue to see Figure 6 For example, when the terminal device turns on the automatic adjustment function of the frame rate parameters, but the current frame rate does not meet the required frame rate, after setting the terminal device to load the default parameter value, the terminal device can be further set to perform the service based on the default parameter value, and periodically determine whether the terminal device exits the camera application, that is, execute step S104.
[0181] For example, the timing of periodically executing step S104 can be set according to the frame rate that the current service needs to meet. For example, for a scene where the frame rate that needs to be met is 30fps, step S104 can be executed every 40ms.
[0182] For another example, for a scene that needs to meet a frame rate of 60 fps, step S104 may be performed once every 25 ms.
[0183] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0184] In this way, when the current frame rate does not meet the required frame rate, the parameter value corresponding to the target shooting mode is set back to the default parameter value, so that the terminal device can always meet the frame rate requirement and prevent the frame dropping problem of the shot content.
[0185] S108: In response to a selection operation on any shooting mode, the shooting mode is switched to the selected target shooting mode.
[0186] Still Figure 7 Taking the optional shooting modes shown in (2) as an example, illustratively, when the user selects the "portrait" option, the mobile phone responds to the operation and the shooting mode will switch to the portrait mode (target shooting mode).
[0187] S109: Whether it is necessary to reset the BO parameter value.
[0188] Exemplarily, after determining the target shooting mode, the terminal device may check whether the parameter value corresponding to the target shooting mode is the BO parameter value at the current moment.
[0189] Accordingly, if the parameter value corresponding to the target shooting mode is already the BO parameter value mentioned above, it is determined that the BO parameter does not need to be reset at present. Conversely, if the parameter value currently loaded by the terminal device is not the BO parameter value suitable for the target shooting mode, it is determined that the BO parameter value needs to be reset at present.
[0190] Continue to see Figure 6 For example, after determining that the BO parameters do not need to be reset currently, it is also possible to periodically determine whether the terminal device exits the camera application, that is, execute step S104.
[0191] Continue to see Figure 6 , exemplarily, after determining that the BO parameters need to be reset currently, step S110 can be executed.
[0192] S110, loading the BO parameter value corresponding to the target shooting mode at the current moment.
[0193] From the above description, it can be known that the parameter server can determine the BO parameter value based on the Bayesian optimization method and send the BO parameter value to the terminal device. The terminal device can also determine the BO parameter value based on the Bayesian optimization method. This embodiment does not limit the source of the BO parameter value.
[0194] It should be understood that the above description is only an example listed for a better understanding of the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, it can be set according to business needs, and this application does not limit it.
[0195] In addition, it should be noted that for the case without scene recognition, after the camera application is started and the shooting mode is determined, all scenes included in the currently selected shooting mode can be further determined. After all the scenes are determined, regardless of whether these scenes are in operation, the first parameter value required for all scenes to operate simultaneously is directly loaded, that is, the BO parameter value mentioned above.
[0196] Take the example that the currently determined shooting mode includes the first scene (such as a face detection scene based on a face detection algorithm) and the second scene (a smile detection scene based on a smile detection algorithm). Assume that the scene currently being operated by the terminal device is the first scene, and the second scene is not being operated. In the absence of scene recognition, the terminal device will directly load the first parameter value required for the first scene and the second scene to operate simultaneously, rather than only loading the first parameter value required for the first scene currently being operated.
[0197] Therefore, in the method for reducing power consumption provided in this embodiment, while meeting performance requirements, the terminal device can make the power consumption of the terminal device in the target shooting mode as low as possible by loading the parameter server / terminal device itself and determining the BO parameter value suitable for the current shooting mode based on the Bayesian optimization method.
[0198] In addition, by periodically detecting whether the terminal device meets the performance requirements and setting the terminal device to promptly switch the parameter value corresponding to the target shooting mode to the default parameter value mentioned above when the performance requirements are not met, the terminal device can meet the performance requirements again, thereby preventing frame drops in the captured content and ensuring the shooting effect.
[0199] See also Figure 8 , exemplarily illustrates an implementation process of adjusting parameter values corresponding to camera applications based on a method for reducing power consumption provided in an embodiment of the present application in the case of scene recognition.
[0200] It should be noted that the so-called scene recognition specifically refers to further considering the scene currently involved in different shooting modes. That is, after the corresponding scene is detected, the corresponding detection algorithm is called in the current scene, and the detection algorithm not involved is not called.
[0201] See also Figure 8 , the implementation process of this embodiment specifically includes:
[0202] S201, in response to an operation behavior of opening a camera application, starting the camera application and displaying available shooting modes S202, whether to enable a parameter automatic adjustment function.
[0203] S203, loading default parameter values.
[0204] S204: Whether to exit the camera application.
[0205] S205, ending the process of implementing the parameter automatic adjustment function.
[0206] S206: Whether the frame rate meets the requirement.
[0207] S207, loading default parameter values.
[0208] S208: In response to a selection operation on any shooting mode, switching the shooting mode to the selected target shooting mode.
[0209] Understandably, in the case of scene recognition, when the user uses the camera application, the terminal device also needs to detect whether the parameter automatic adjustment function is currently turned on, monitor whether the camera application is exited, and determine whether the current frame rate meets the requirements. Therefore, the specific implementation details of steps S201 to S208 can be found in the part of steps S101 to S108 in the above embodiment, and will not be repeated here.
[0210] S209, determining the target shooting mode and the scene involved at the current moment.
[0211] Continue to see Figure 8 , exemplarily, specifically in the case of scene recognition, after determining the target shooting mode, it is necessary to further consider the scene involved in the target shooting mode at the current moment, that is, execute step S209.
[0212] It can be seen from the above description that the scene corresponds to the detection algorithm, so the scene involved in the target shooting mode at the current moment can be determined by detecting the currently called detection method.
[0213] S210: Whether it is necessary to reset the BO parameter value.
[0214] For example, the specific implementation details of step S210 in this embodiment can be found in the part of step S109 in the above embodiment, which will not be repeated here.
[0215] S211, loading the BO parameter value corresponding to the target shooting mode at the current moment.
[0216] Taking the determined scene as a human body detection scene as an example, in the case of scene recognition, the terminal device loads the BO parameter values suitable for the current moment, and only needs to load the BO parameter values required for the operation of the human body detection algorithm. For the BO parameter values required for the operation of the face detection algorithm called after the human body is detected; and the BO parameter values required for the operation of the smile detection algorithm, skin beautification algorithm, ethnicity detection algorithm, etc. called after the face is detected, there is no need to load. Subsequently, after periodically executing step S204 and determining that step 206 can be executed, it is possible to continue to determine whether the frame rate at the current moment meets the required frame rate, and then decide to execute step S207 or step S208 based on the judgment result, thereby ensuring that in the process of using the camera application, while reducing power consumption, the parameter values loaded by the terminal device can always meet the required frame rate.
[0217] Accordingly, when determining the scenes involved in the target shooting mode and adding a face detection scene, compared with the last judgment that only the BO parameter values required for the operation of the human body detection algorithm are loaded, step S210 will determine that the BO parameter values required for the operation of the face detection algorithm also need to be loaded.
[0218] Accordingly, in step S211, the BO parameter values required for the operation of both the human body detection algorithm and the face detection algorithm will be reloaded.
[0219] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0220] In fact, for the case of scene recognition, after the camera application is started and the shooting mode is determined, all scenes included in the currently selected shooting mode can be further determined. After determining all the scenes included, it is necessary to further consider whether these scenes are in operation. Finally, only the first parameter value required for the currently operating scene is loaded, that is, the BO parameter value mentioned above.
[0221] Still taking the example that the currently determined shooting mode includes the first scene (such as a face detection scene implemented based on a face detection algorithm) and the second scene (a smile detection scene implemented based on a smile detection algorithm). Assume that the scene currently being operated by the terminal device is the first scene, and the second scene is not being operated. In the case of scene recognition, the terminal device only loads the first parameter value required for the first scene currently being operated.
[0222] Therefore, in the method for reducing power consumption provided in this embodiment, while meeting performance requirements, the terminal device loads the BO parameter values suitable for the scene currently involved in the target shooting mode determined by the parameter server / terminal device itself based on the Bayesian optimization method. This enables the terminal device in the target shooting mode to only load the BO parameter values required for running the detection algorithm to realize the current scene recognition, without loading the BO parameter values required for the detection algorithm not currently involved, thereby further reducing the power consumption of the terminal device.
[0223] Regarding the above embodiments, the parameter optimization module located in the parameter server or terminal device determines the process of BO parameter values that need to be loaded when different applications work in different modes and scenarios based on the Bayesian optimization method. Fig.10 As shown, specifically including:
[0224] S301, determining the parameters to be adjusted and the value ranges corresponding to the parameters.
[0225] It can be seen from Table 1 above that the method of reducing the power consumption of the terminal device by adjusting the parameter value is mainly applicable to the case where the power consumption source is the software part. In addition, it can be seen from Table 1 that the power consumption of the terminal device related to the CPU and the DDR has a greater impact. Therefore, this embodiment takes the four parameter values of CPU core number, CPU frequency, DDR frequency, and task migration (migrate) as an example based on the Bayesian optimization method. That is, the first parameter value mentioned above includes the parameter value corresponding to the number of CPU cores, the parameter value corresponding to the CPU frequency, the parameter value corresponding to the DDR frequency, and the parameter value corresponding to migrate.
[0226] It should be understood that the above description is only an example for better understanding the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, the parameters corresponding to the power consumption generated by the software part can be adjusted based on the method provided in the embodiment of this application.
[0227] As shown in Table 1, CPUs can be divided into CPUB, CPUL, and CPUM. Taking an 8-core CPU as an example, there is 1 CPUB, 4 CPULs, and 3 CPUMs.
[0228] Based on the number of cores that the types of CPU cores may include, the values of different types of CPU cores may be as shown in Table 2.
[0229] Table 2 CPU core values
[0230]
[0231] Regarding the value of the parameter CPU frequency (unit: KHz / kilohertz), specifically, one frequency point is selected from the frequency points corresponding to each CPU core as the minimum value min, and another frequency point is selected as the maximum value max, and max>min.
[0232] Exemplarily, for CPUB, there are usually 20 selectable frequency points, namely: 836500, 980200, 1034000, 1163200, 1293100, 1410500, 1500200, 1608100, 1712000, 1825300, 1934600, 2043400, 2145200, 2276500, 2412300, 2524300, 2600000, 2700000, 2801200, and 2981300.
[0233] Based on this, in one implementation, in a scenario where one CPU large core is required, the frequency value range of the CPU large core may be, for example, [836500, 980200]. That is, the minimum selected from the above 20 optional frequency points is 836500, and the maximum selected is 980200. Subsequently, the policy parameter value corresponding to CPUB may be any frequency value in the interval [836500, 980200].
[0234] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0235] Exemplarily, for CPUM, there are usually 17 selectable frequency points, namely: 612500, 732000, 875600, 982300, 1156200, 1213200, 1364500, 1486000, 1597800, 1634200, 1780000, 1880000, 1990000, 2100000, 2223400, 2360000, and 2406500.
[0236] Based on this, in one implementation, in a scenario where two CPU cores need to be used, the frequency value range of one CPUM can be, for example, [1213200, 2360000]. That is, the minimum selected from the above 17 optional frequency points is 1213200, and the maximum selected is 2360000. Subsequently, the policy parameter value corresponding to this CPUM can be any frequency value in the interval [1213200, 2360000].
[0237] The frequency value range of another CPUM can be the same as that of the above CPUM, that is, [1213200, 2360000]. It can also be different from the frequency value range of the above CPUM, for example, it can be [1780000, 2406500]. That is, the min selected from the above 17 optional frequency points is 1780000, and the max selected is 2406500. Subsequently, the policy parameter value corresponding to this CPUM can be any frequency value in the interval [1780000, 2406500].
[0238] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0239] Exemplarily, for CPUL, there are usually 15 selectable frequency points, namely: 336100, 400000, 523400, 656300, 776300, 856100, 990800, 1098600, 1167800, 1245200, 1307800, 1487400, 1578200, 1607400, and 1764200.
[0240] Based on this, in one implementation, in a scenario where one CPU small core is required, the frequency value range of the CPU small core may be, for example, [990800, 1245200]. That is, the minimum selected from the above 20 optional frequency points is 990800, and the maximum selected is 1245200. Subsequently, the policy parameter value corresponding to CPUL may be any frequency value in the interval [990800, 1245200].
[0241] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0242] Regarding the value of the parameter DDR (the unit is KHz / kilohertz), specifically, one frequency point is selected from the corresponding frequency points as the minimum value min, and another frequency point is selected as the maximum value max, and max>min.
[0243] For example, for DDR, there are usually about 10 frequency points that can be selected, taking 9 frequency bands as an example, which are: 575900, 764800, 1560000, 1749900, 255900, 2747300, 3217800, 3709400, 4202000. That is, one can select one of the above 9 frequency points, such as 764800 as the min, and select another frequency point, such as 2747300 as the max, and then obtain the frequency value range of DDR [764800, 2747300].
[0244] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0245] In addition, it should be noted that for the value range of CPU frequency and the value range of DDR frequency, different terminal devices or different generations of products of the same terminal device may have different selectable frequency points. The selectable frequency points corresponding to CPUB, CPUM and CPUL given above, as well as the selectable frequency points for DDR, are only examples.
[0246] Regarding migrate, it is specifically used to migrate tasks between different CPU cores. Therefore, for each CPU core, the migrate parameter has two values, namely down_migrate for downward migration and up_migrate for upward migration. Among them, down_migrate and up_migrate are both percentages. For down_migrate, it means that when the task exceeds the percentage corresponding to down_migrate in this CPU core, the task has a certain probability of migrating downward; for up_migrate, it means that when the task exceeds the percentage corresponding to up_migrate in this CPU core, the task has a certain probability of migrating upward.
[0247] That is to say, for the value of the migrate parameter of each CPU core, one value can be selected from the percentage interval [0, 100] as the value down_migrate for downward migration, and another value up_migrate for upward migration can be selected.
[0248] S302: Select a set of policy parameter values corresponding to the parameters from a value range.
[0249] Specifically, after setting corresponding values / value ranges for the four parameters of CPU core number, CPU frequency, DDR frequency, and migrate, in one implementation, a specific value can be selected from the value / value range corresponding to each parameter to obtain a set of parameter values corresponding to the four parameters (referred to as: policy parameter values in this implementation).
[0250] Exemplarily, in another implementation, the determined policy parameter values may also be a set of specific parameter values currently determined by staff based on experience.
[0251] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0252] S303, write the parameters and the corresponding policy parameter values into the xml file corresponding to the terminal device.
[0253] Still taking the determination scenario of the BO parameters corresponding to the camera application as an example, the corresponding xml file mentioned above is the xml file corresponding to the camera application (hereinafter the xml file corresponding to the camera application is referred to as the camera power consumption configuration file). That is, the four parameters of CPU core number, CPU frequency, DDR frequency, and migrate, as well as the policy parameter values corresponding to the four parameters, will be written into the xml file of the camera power consumption configuration file.
[0254] From the above description, it can be known that for camera applications, when the cameras called are different (front, rear), the corresponding modes and the scenes included in the modes are also different. Therefore, in some implementations, the labels corresponding to different cameras can be set separately (hereinafter referred to as: first-level labels). Then, in the first-level labels indicating different cameras, the labels corresponding to the above-mentioned without scene recognition and with scene recognition are set separately (hereinafter referred to as: second-level labels). Then, in different second-level labels, the labels of the scenes to be included in the mode are set as needed (hereinafter referred to as: third-level labels). Then, in each third-level label, the labels corresponding to the 4 parameters listed above are set (hereinafter referred to as: fourth-level labels). In this way, the corresponding policy parameter values of each parameter determined by the above method in each mode and scene can be written into the corresponding labels in the xml file of the camera power consumption configuration file.
[0255] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0256] S304, after the terminal device loads the policy parameter value corresponding to each parameter in the xml file, counting the power consumption value of the terminal device.
[0257] Taking the camera application as an example, in the case of no scene recognition, when the user opens the camera application and selects the portrait mode corresponding to the rear camera as the target shooting mode, the user can find the four parameters of CPU core number, CPU frequency, DDR frequency, and migrate under the corresponding tag in the camera power consumption profile xml file, and then obtain the policy parameter values corresponding to the four parameters of CPU core number, CPU frequency, DDR frequency, and migrate.
[0258] Accordingly, after the terminal device loads the policy parameter values corresponding to the four parameters, the power consumption value of the terminal device can be counted during the process of shooting in the portrait mode.
[0259] Exemplarily, the power consumption value may be counted by a functional module in the terminal device that specifically counts power consumption values, and then sent to a parameter optimization module, such as a parameter optimization module in a parameter server, or a parameter optimization module set in the terminal device.
[0260] S305: Whether the power consumption value is not greater than a preset power consumption threshold.
[0261] Understandably, for different modes and scenarios, since the policy parameters set therein are different, the corresponding power consumption thresholds may also be different, that is, a power consumption threshold is set for each mode and scenario. In this way, when determining the BO parameter value of a certain mode or scenario based on the Bayesian optimization method, the power consumption value corresponding to the policy parameter value determined each time can be compared with the pre-determined power consumption threshold.
[0262] Accordingly, if after multiple iterations, the power consumption value gradually converges to be less than or equal to the corresponding power consumption threshold, the policy parameter value corresponding to the power consumption value that meets the convergence requirement (not greater than the preset power consumption threshold) can be determined as the BO parameter value determined based on the Bayesian optimization method. On the contrary, if the convergence requirement is not met, the iteration operation continues, that is, returning to step S302, and re-executing the processing of steps S302 to S305.
[0263] S306: Determine the policy parameter value as the BO parameter value.
[0264] Therefore, for different terminal devices, different applications, and different modes and scenarios, based on the Bayesian optimization method, iterative processing is performed according to the operations of steps S301 to S306, so that the BO parameter values (optimal parameter values) suitable for different terminal devices, different applications, different modes, and different scenarios can be quickly and accurately determined, so that the terminal device can achieve the lowest power consumption while meeting the performance requirements.
[0265] Understandably, the camera power consumption configuration file, which is an xml file, is a file that exists by default in the terminal device. Currently, the default parameter values set by the staff based on their experience are recorded in the camera power consumption configuration file, which is an xml file. In order to facilitate the terminal device to quickly load the default parameter values, or the optimal parameter values, i.e., the BO parameter values mentioned above, according to judgment when the automatic parameter adjustment function is turned on, in this embodiment, the BO parameter values trained by the Bayesian optimization method may not be written into the camera power consumption configuration file, which is an xml file, but a new xml file is created (hereinafter referred to as the optimal parameter value configuration file), and the BO parameter values corresponding to each mode and scene of the camera application are written into the optimal parameter value configuration file.
[0266] In this way, after the BO parameter values required for all camera application usages are obtained through training using the Bayesian optimization method, taking scene recognition as an example, the optimal parameter value configuration file will contain BO parameter values for many different modes and scenes. For example, scenes with faces in ordinary video recordings, scenes with no faces in ordinary photos, scenes with faces and smiles in portrait mode, and so on. The BO parameter values corresponding to all these possible scenes are placed in the optimal parameter value configuration file. When a user uses a terminal device, such as the camera application in a mobile phone, when the camera application is opened, the BO parameter values in the optimal parameter value configuration file will be read into the memory. In this way, when a user uses the camera application to take photos or videos, the mobile phone will first determine which mode and scene it is.
[0267] For example, if the mobile phone determines that it is a face scene in normal recording mode, the BO parameter value corresponding to the current mode and scene in the optimal parameter value configuration file that has been read into the memory will be set to the mobile phone, so that the mobile phone can run according to the currently set set of BO parameter values, thereby achieving the purpose of using BO parameter values in different scenes and modes, and thus the power consumption is also the lowest.
[0268] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0269] In addition, the parameter optimization module for determining the BO parameter value based on the Bayesian optimization method in the embodiment of the present application may specifically include an agent model part and an acquisition function part.
[0270] Exemplarily, the proxy model may include Gaussian Processes (GP), Gaussian Mixture Model (GMM), Probability Random Forests (PRF), Tree-structured Parzen Estimators (TPE), etc., which are not listed here one by one and the present application does not limit this.
[0271] Exemplarily, the acquisition function may include expected improvement (EI), probability of improvement (PI), lower confidence bound (LCB), upper confidence bound (UCB), etc., which are not listed here one by one and the present application does not limit this.
[0272] Taking the Gaussian process as the proxy model and the expected increment as the acquisition function as an example, the following formula is required to determine the BO parameter value based on the Bayesian optimization method:
[0273] p(f * |X * , X, f) = N(f * |μ * ,∑ * ) (1)
[0274] Specifically, the right side of the equal sign in formula (1) is a Gaussian distribution. Here, Σ represents the co-matrix composed of variances (because a batch of data is usually processed together, it is no longer the variance of a single number σ 2 , but the covariance Σ of a batch of numbers); N(f * |μ * ,∑ * ) represents a state with mean μ * , the covariance matrix is ∑ * Gaussian distribution.
[0275] In formula (1), X, f, and f on the left side of the equal sign * and X * The function distribution p of the above equation is the Gaussian distribution on the right. Where X is the strategy parameter value determined above; f is the power consumption value corresponding to X; X * is the optimal parameter value that needs to be determined, that is, the BO parameter value mentioned above; f * Yes X * The corresponding power consumption value (minimum power consumption value).
[0276]
[0277] Where μ is the average power consumption, f(x * ) is the optimal parameter value to be determined (corresponding to X in formula (1) * ) corresponding to the power consumption value (corresponding to f in formula (1) * ), ζ is an infinitesimal quantity, is the power consumption variance (covariance, corresponding to Σ in formula (1)).
[0278] In formula (2), It can be viewed as a cumulative distribution function, It can be regarded as the probability density function of the standard normal distribution N(0,1).
[0279] In addition, it should be noted that in the formulas involved in this embodiment, all parameters carrying "*" represent data that need to be determined (predicted) based on the Bayesian optimization method.
[0280] Based on the proxy model part and the acquisition function part described above, when the parameter optimization module determines the BO parameter value based on the Bayesian optimization method, it specifically links the input and output (such as the strategy parameter values determined in steps S301 to S304 and the power consumption values obtained) through the proxy model, and then uses the acquisition function to determine the strategy parameter values that need to be input for the next iterative operation.
[0281] That is to say, in the process of determining the BO parameter value, the parameter optimization module may include: ① randomly initializing n observation points to obtain an initialization data set, such as the value range corresponding to the parameters that need to be adjusted as described in the above embodiment; ② randomly selecting a set of policy parameter values corresponding to the parameters in the initialization data set, and using the proxy model (hereinafter represented as g(x)) to estimate the function distribution f(x), that is, the estimated power consumption value; ③ determining the policy parameter values that need to be input for the next iterative operation through the acquisition function; ④ adding the determined policy parameter values to the initialization data set to better estimate the function distribution f(x); ⑤ when the convergence conditions are not met, looping through the above ②, ③ and ④ until the convergence conditions are met.
[0282] From the above description, it can be seen that in this embodiment, the parameter optimization module needs to determine the BO parameter value corresponding to the minimum power consumption value. Therefore, its mathematical form can be expressed as the following formula (3):
[0283]
[0284] Among them, f(x) is the minimum power consumption value, x *is the BO parameter value to be determined corresponding to f(x), X is the initialization data set mentioned above, and x is the strategy parameter value selected from the initial data set.
[0285] It is understandable that the aforementioned initialization data set includes not only the policy parameter values available for selection, but also the power consumption values corresponding to the parameter values, so as to facilitate determination of whether the iteration result meets the convergence condition.
[0286] In addition, regarding the specific implementation details of determining the BO parameter values based on the Bayesian optimization method based on the above-listed proxy models and acquisition functions, please refer to the specific literature of each proxy model and acquisition function, which will not be repeated here.
[0287] To illustrate in detail the beneficial effects of the method for reducing power consumption provided in the embodiment of the present application, the method is described below by comparing it with related technologies.
[0288] See also Fig.10 , where the horizontal axis represents the number of iterations; the vertical axis represents the power consumption value corresponding to each set of policy parameter values; each small dot represents the power consumption value corresponding to the terminal device when working based on a set of policy parameter values after setting a set of policy parameter values; the dotted line, namely the Baseline in the figure, is the power consumption value corresponding to the default parameter value set by the staff based on experience; the curve represents the sliding average calculated when the sliding window size is 120, that is, the power consumption values of every 120 parameters are averaged; × represents the optimal solution obtained by the current iteration (that is, the lowest power consumption value); the line where × is located represents the curve where the optimal solution is determined based on the Bayesian optimization method.
[0289] Continue to see Fig.10 For example, if the iteration is performed for the first time, the optimal solution in the initial case is BO_1 in the figure. Accordingly, during the iteration process, if it is found that BO_2 is less than BO_1, BO_2 is called the new optimal solution. If the power consumption values of two adjacent iterations have been decreasing, the iteration can be continued until the power consumption value is not greater than the preset power consumption threshold, or the difference corresponding to the adjacent power consumption values meets the set requirements, then the iteration can be terminated and the parameter value corresponding to the power consumption value is determined as the BO parameter value. Fig.10 In the example, starting from BO_13, the power consumption value output by subsequent iterations is also BO_13. In this case, it can be determined that the lowest power consumption value is obtained. Accordingly, the parameter value corresponding to BO_13 is the BO parameter value.
[0290] from Fig.10It can be seen that based on the method for reducing power consumption provided in the embodiment of the present application, most of the power consumption values corresponding to the determined BO parameter values are lower than the power consumption values corresponding to the default parameter values determined by the staff based on experience. As shown in the figure, the power consumption values on the lines including BO_2 to BO_13 and after BO_13 are lower than the power consumption values corresponding to the default parameter values determined by the staff based on experience.
[0291] After screening, under the condition of strictly meeting the frame rate requirements of the terminal device, in the method for reducing power consumption provided in the embodiment of the present application, the power consumption value corresponding to the BO parameter value determined by the parameter optimization module based on the Bayesian optimization method is about 70mA lower than the power consumption value corresponding to the default parameter value determined by the staff based on experience.
[0292] Therefore, based on the method for reducing power consumption provided in the embodiment of the present application, it is possible to automatically adjust the parameters required for the operation of the terminal device without relying on human experience, so that the terminal device can reduce the power consumption of the entire device as much as possible while meeting the performance requirements.
[0293] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.
[0294] In addition, it can also be understood that in order to implement the above functions, the terminal device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.
[0295] In addition, it should be noted that the method for reducing power consumption provided by the above embodiments implemented by the terminal device in the actual application scenario can also be performed by a chip system included in the terminal device, wherein the chip system may include a processor. The chip system can be coupled to a memory so that when the chip system is running, the computer program stored in the memory is called to implement the steps performed by the above terminal device. The processor in the chip system can be an application processor or a processor other than an application processor.
[0296] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a terminal device, the terminal device executes the above-mentioned related method steps to implement the method of reducing power consumption in the above-mentioned embodiment.
[0297] In addition, an embodiment of the present application also provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the above-mentioned related steps to implement the method for reducing power consumption in the above-mentioned embodiment.
[0298] In addition, an embodiment of the present application also provides a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the above-mentioned related method steps to implement the method of reducing power consumption in the above-mentioned embodiment, so as to control the receiving pin to receive the signal, so as to control the sending pin to send the signal.
[0299] In addition, it can be seen from the above description that the terminal device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0300] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for reducing power consumption, characterized in that: include: When the terminal device is in a powered-on state, a first parameter value suitable for the current state determined based on the Bayesian optimization method is loaded, wherein the first parameter value includes a parameter value corresponding to the number of CPU cores, a parameter value corresponding to the CPU frequency, a parameter value corresponding to the DDR frequency, and a parameter value corresponding to migrate; The loading of the first parameter value suitable for the current state determined based on the Bayesian optimization method includes: obtaining a current first frame rate of the screen of the terminal device, obtaining a second frame rate required by a service currently corresponding to the terminal device, and when the first frame rate matches the second frame rate, loading the first parameter value suitable for the current state determined based on the Bayesian optimization method; The power consumption value generated when the terminal device is operated based on the first parameter value is less than the power consumption value generated when the terminal device is operated based on the second parameter value; The second parameter value is set based on experience; Wherein, when the service currently executed by the terminal device is a photographing service, the loading of a first parameter value suitable for the current state determined based on the Bayesian optimization method includes: Determining a shooting mode corresponding to the shooting service; Determine all scenes that the shooting mode may include, the scenes include a first scene and a second scene, the scene currently being operated by the terminal device is the first scene, and the second scene is not being operated; The first parameter value required for the first scene and the second scene to operate simultaneously is loaded.
2. The method according to claim 1, characterized in that The method further comprises: When the first frame rate does not match the second frame rate, the second parameter value is loaded, and when the terminal device executes a service based on the second parameter value, the frame rate of the screen of the terminal device can meet the frame rate required by any service.
3. The method according to claim 1, characterized in that The first parameter value is determined by the server; The loading of a first parameter value suitable for the current state determined based on a Bayesian optimization method includes: Obtaining the first parameter value from the server; When the first parameter value is obtained from the server, the first parameter value is loaded.
4. The method according to claim 3, characterized in that The method further comprises: When the first parameter value is not obtained from the server, the second parameter value is loaded.
5. The method according to claim 1, characterized in that The first parameter value is determined by the terminal device; The loading of a first parameter value suitable for the current state determined based on a Bayesian optimization method includes: The first parameter value is directly searched from the storage path of the terminal device, and after the first parameter value is searched, the first parameter value is loaded.
6. The method according to any one of claims 1 to 5, characterized in that: After the first parameter value suitable for the current state determined based on the Bayesian optimization method is loaded, the method further includes: In a process in which the terminal device executes a service based on the first parameter value, periodically acquiring a current first frame rate of a screen of the terminal device; When the first frame rate matches a second frame rate required by a service currently corresponding to the terminal device, continuing to execute the service based on the first parameter value; When the first frame rate does not match the second frame rate, the first parameter value is adjusted to the second parameter value.
7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Only the first parameter value required for the first scenario operation is loaded.
8. A terminal device, characterized in that: The terminal device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the terminal device executes the method for reducing power consumption as described in any one of claims 1 to 7.
9. A server, characterized in that: The server is used to determine a first parameter value suitable for the terminal device based on a Bayesian optimization method, and send the first parameter value to the terminal device, where the first parameter value includes a parameter value corresponding to the number of CPU cores, a parameter value corresponding to the CPU frequency, a parameter value corresponding to the DDR frequency, and a parameter value corresponding to migrate; The server is used to determine a first parameter value suitable for the terminal device based on a Bayesian optimization method, including: obtaining a current first frame rate of the screen of the terminal device, obtaining a second frame rate required by a service currently corresponding to the terminal device, and when the first frame rate matches the second frame rate, loading a first parameter value suitable for the current state determined based on the Bayesian optimization method; The power consumption value generated when the terminal device is operated based on the first parameter value is less than the power consumption value generated when the terminal device is operated based on the second parameter value; The second parameter value is set based on experience; Wherein, when the service currently executed by the terminal device is a photographing service, the loading of a first parameter value suitable for the current state determined based on the Bayesian optimization method includes: Determining a shooting mode corresponding to the shooting service; Determine all scenes that the shooting mode may include, the scenes include a first scene and a second scene, the scene currently being operated by the terminal device is the first scene, and the second scene is not being operated; The first parameter value required for the first scene and the second scene to operate simultaneously is loaded.
10. A computer-readable storage medium, characterized in that: It comprises a computer program, and when the computer program is executed on a terminal device, the terminal device executes the method for reducing power consumption as claimed in any one of claims 1 to 7.
