CN117130460A - Method, device, server and storage medium for reducing power consumption - Google Patents

Method, device, server and storage medium for reducing power consumption Download PDF

Info

Publication number
CN117130460A
CN117130460A CN202310438057.9A CN202310438057A CN117130460A CN 117130460 A CN117130460 A CN 117130460A CN 202310438057 A CN202310438057 A CN 202310438057A CN 117130460 A CN117130460 A CN 117130460A
Authority
CN
China
Prior art keywords
parameter value
parameter
power consumption
frame rate
terminal equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310438057.9A
Other languages
Chinese (zh)
Inventor
伍德亮
唐巍
彭奕
董云鹏
李壮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310438057.9A priority Critical patent/CN117130460A/en
Publication of CN117130460A publication Critical patent/CN117130460A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a method, equipment, a server and a storage medium for reducing power consumption. When terminal equipment is in a starting-up state, loading a first parameter value which is determined based on a Bayesian optimization method and is suitable for the current state; the terminal equipment generates a power consumption value based on the first parameter value when running and is smaller than a power consumption value based on the second parameter value when running; the second parameter value is empirically set. The first parameter value is determined based on the Bayesian optimization method, so that the automatic adjustment of parameters required by the operation of the terminal equipment is realized under the condition of not depending on manual experience, and the power consumption of the whole machine can be reduced as much as possible on the premise that the terminal equipment meets the performance requirement.

Description

Method, device, server and storage medium for reducing power consumption
Technical Field
The present application relates to the field of terminal devices, and in particular, to a method, an apparatus, a server, and a storage medium for reducing power consumption.
Background
An important factor in the evaluation of terminal devices such as cell phones, tablets, etc., and user selection is power consumption. Currently, in order to reduce overall power consumption of a terminal device under the condition of meeting performance requirements, parameters required for the operation of the terminal device are manually set by a worker before leaving a factory.
However, depending on manual setting, parameters manually set by experience have large limitations, and cannot be well adapted to various practical application scenes, so that the power consumption of the terminal equipment is still high.
Disclosure of Invention
In order to solve the technical problems, the application provides a method, equipment, a server and a storage medium for reducing power consumption, aiming at reducing the power consumption of the whole machine as much as possible on the premise that terminal equipment meets the performance requirement.
In a first aspect, the present application provides a method of reducing power consumption. The method comprises the following steps: loading a first parameter value which is determined to be suitable for the current state based on a Bayesian optimization method when the terminal equipment is in a starting-up state; the terminal equipment generates a power consumption value based on the first parameter value when running and is smaller than a power consumption value based on the second parameter value when running; the second parameter value is empirically set.
Since the first parameter value is determined based on a Bayesian optimization method, the automatic adjustment of parameters required by the operation of the terminal equipment is realized without depending on manual experience. Because the power consumption value generated during operation based on the first parameter value is lower than the power consumption value generated during operation based on the second parameter value (set empirically), the method for reducing the power consumption can reduce the power consumption of the whole machine as much as possible on the premise that the terminal equipment meets the performance requirement.
According to a first aspect, loading a first parameter value for a current state determined based on a bayesian optimization method, comprises: acquiring a current first frame rate of a screen of terminal equipment; acquiring a second frame rate of a service requirement currently corresponding to the terminal equipment; when the first frame rate is matched with the second frame rate, loading a first parameter value which is determined to be suitable for the current state based on a Bayesian optimization method.
The first frame rate is, for example, the current frame rate of the terminal device in the following embodiment, and the second frame rate is, for example, the frame rate to be satisfied when the terminal device processes the service in the following embodiment.
In addition, the above-mentioned matching of the first frame rate and 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, in the case where the second frame rate is 30fps, the first frame rate needs to be ≡30fps.
For example, there may be some relaxation in the frame rate requirements of the terminal device, such as setting a limit value for the current frame rate to be allowed to be below the target frame rate, such as 0.1fps. That is, in the case where the second frame rate is 30fps, the first frame rate needs to be equal to or greater than 29.9fps.
According to the first aspect, or any implementation manner of the first aspect, the method further includes: when the first frame rate is not matched with the second frame rate, the second parameter value is loaded, and when the terminal equipment executes the service based on the second parameter value, the frame rate of the screen of the terminal equipment can meet the frame rate of any service requirement. Therefore, when the first parameter value can not meet the current service requirement, the second parameter value which can always meet the service requirement is directly loaded for operation, so that the service of the terminal equipment can be normally performed.
According to a first aspect, or any implementation of the first aspect above, the first parameter value is determined by the server; loading a first parameter value suitable for the current state, which is determined based on a Bayesian optimization method, comprises the following steps: obtaining a first parameter value from a server; the first parameter value is loaded upon acquisition from the server. In this way, the server determines the first parameter value, and the terminal device only needs to receive the first parameter value provided by the server, so that the power consumption of the terminal device is not increased additionally.
According to the first aspect, or any implementation manner of the first aspect, the method further includes: the second parameter value is loaded when the first parameter value is not acquired from the server. Thus, the terminal equipment can work normally.
According to a first aspect, or any implementation of the first aspect above, the first parameter value is determined by the terminal device; loading a first parameter value suitable for the current state, which is determined based on a Bayesian optimization method, comprises the following steps: and directly searching a first parameter value from a storage path of the terminal equipment, and loading the first parameter value after searching the first parameter value. In this way, the terminal equipment determines the first parameter value with a lower corresponding power consumption value by itself, so that when the terminal equipment cannot interact with the server, the adjustment of the parameter value can be automatically realized according to service requirements, and the power consumption of the terminal equipment is reduced.
According to the first aspect, or any implementation manner of the first aspect, after loading the first parameter value determined based on the bayesian optimization method and suitable for the current state, the method further includes: the method comprises the steps of periodically obtaining a current first frame rate of a screen of terminal equipment in a process of executing a service by the terminal equipment based on a first parameter value; when the first frame rate is matched with the second frame rate of the service requirement currently corresponding to the terminal equipment, continuing to execute the service based on the first parameter value; and when the first frame rate is not matched with the second frame rate, adjusting the first parameter value to be a second parameter value. In this way, when the terminal equipment meets the performance requirement, such as the power requirement, the first parameter value is loaded to execute the service, and when the performance requirement is not met, the second parameter value is loaded to execute the service, so that the power consumption of the terminal equipment is reduced, the problem that the executed service falls off frames is prevented, and the user experience is ensured.
According to a first aspect, or any implementation manner of the first aspect, the first parameter value includes a parameter value corresponding to a CPU core number, a parameter value corresponding to a CPU frequency, a parameter value corresponding to a DDR frequency, and a parameter value corresponding to a scale. Therefore, the automatic adjustment of the parameter with high power consumption value caused by the software part is realized, so that the power consumption can be effectively reduced when the terminal equipment operates based on the adjusted first parameter value.
According to the first aspect, or any implementation manner of the first aspect, a service currently executed by the terminal device is a shooting service; loading a first parameter value suitable for the current state, which is determined based on a Bayesian optimization method, comprises the following steps: determining a shooting mode corresponding to shooting business; determining all scenes which can be included in the shooting mode, wherein the scenes comprise a first scene and a second scene, the scene which is currently operated by the terminal equipment is the first scene, and the second scene is not operated; and loading a first parameter value required by simultaneous operation of the first scene and the second scene. In this way, only the shooting mode is considered, and the user's demand can be responded quickly.
According to the first aspect, or any implementation manner of the first aspect, the method further includes: only the first parameter values required for the first scene job are loaded. Therefore, the shooting mode is considered, and the scene of the current operation of the shooting mode is considered, so that the loaded first parameter value is more suitable for the actual use condition, and the power consumption of the terminal equipment is further reduced under the condition that the terminal equipment meets the performance requirement.
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 coupled; the memory stores program instructions that, when executed by the processor, cause the terminal device to perform the instructions of the first aspect or of the method in any possible implementation of the first aspect.
Any implementation manner of the second aspect and the second aspect corresponds to any implementation manner of the first aspect and the first aspect, respectively. The technical effects corresponding to the second aspect and any implementation manner of the second aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a third aspect, the application provides a computer readable medium storing a computer program comprising instructions for performing the method of the first aspect or any possible implementation of the first aspect.
Any implementation manner of the third aspect and any implementation manner of the third aspect corresponds to any implementation manner of the first aspect and any implementation manner of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation manner of the third aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a fourth aspect, the present application provides a computer program comprising instructions for performing the method of the first aspect or any possible implementation of the first aspect.
Any implementation manner of the fourth aspect and any implementation manner of the fourth aspect corresponds to any implementation manner of the first aspect and any implementation manner of the first aspect, respectively. Technical effects corresponding to any implementation manner of the fourth aspect may be referred to the technical effects corresponding to any implementation manner of the first aspect, and are not described herein.
In a fifth aspect, the present application provides a chip comprising processing circuitry, transceiver pins. Wherein the transceiver pin and the processing circuit communicate with each other via an internal connection path, the processing circuit performing the method of the first aspect or any one of the possible implementation manners of the first aspect to control the receiving pin to receive signals and to control the transmitting pin to transmit signals.
Any implementation manner of the fifth aspect and any implementation manner of the fifth aspect corresponds to any implementation manner of the first aspect and any implementation manner of the first aspect, respectively. Technical effects corresponding to any implementation manner of the fifth aspect may be referred to the technical effects corresponding to any implementation manner of the first aspect, and are not described herein.
In a sixth aspect, the present application provides a server. The server is used for determining a first parameter value suitable for the terminal equipment based on a Bayesian optimization method and sending the first parameter value to the terminal equipment; the terminal equipment generates a power consumption value based on the first parameter value when running and is smaller than a power consumption value based on the second parameter value when running; the second parameter value is empirically set.
Drawings
Fig. 1 is a schematic view of a scenario illustrating an implementation of a method for reducing power consumption according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating a scenario in which a method for reducing power consumption provided by an embodiment of the present application is implemented;
fig. 3 is a schematic diagram of a hardware structure of an exemplary terminal device;
fig. 4 is a schematic diagram of a software architecture of an exemplary terminal device;
FIG. 5 is a schematic diagram of a shooting mode and scene comprised by an exemplary illustrated camera application;
FIG. 6 is a flow chart illustrating a method for reducing power consumption according to an embodiment of the present application without scene recognition;
FIG. 7 is a schematic diagram of an exemplary user interface;
FIG. 8 is a flow chart illustrating a method for reducing power consumption according to an embodiment of the present application in the case of scene recognition;
FIG. 9 is a schematic diagram of an exemplary illustrated parameter optimization module determining BO parameter values;
fig. 10 is a schematic diagram illustrating comparison of a power consumption value of the related art with a power consumption value determined based on a method for reducing power consumption provided by an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims of embodiments of the application, are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first target object and the second target object, etc., are used to distinguish between different target objects, and are not used to describe a particular order of target objects.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment of the present application is not to be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, the plurality of processing units refers to two or more processing units; the plurality of systems means two or more systems.
In order to better understand the technical scheme provided by the embodiment of the present application, the following describes the existing problems in the scenario aimed at by the technical scheme provided by the embodiment of the present application.
In particular, with the development of mobile terminal technology and internet technology, various terminal devices such as mobile phones, tablets, smartwatches, etc. have taken an important place in the daily life and work of people. Currently, there are many factors that affect the user's selection of terminal devices and the evaluation of the quality of the terminal devices, one of which is the power consumption.
It is understood that the source of power consumption is largely divided into two parts, hardware and software. The power consumption in hardware has a great relation with the preparation materials and technology, and is not easy to change. The power consumption in the aspect of software can be further reduced by adjusting parameters of the terminal equipment.
Therefore, in order to reduce the power consumption of the terminal device in the case of meeting the performance requirement, before the terminal device leaves the factory, a set of parameters capable of reducing the power consumption is determined empirically by a worker, and the empirically determined parameters are set as parameters required for the operation of the terminal device.
Referring to table 1, it is exemplarily shown that after the parameters are arbitrarily set for the terminal device according to experience by the work, the power consumption corresponding to the parameter objects related to part of the function modules in the terminal device.
Table 1 software, hardware consumption table
It can be seen from table 1 that the power consumption corresponding to the parameters in the hardware is high by eliminating MX, CX, GFX and the like, and the power consumption corresponding to the parameters in the software by improving CPU, DDR and the like is also high. Obviously, the parameters which are manually set by virtue of experience are dependent on manpower, so that the limitation is larger, the method cannot be well suitable for various practical application scenes, the power consumption of the terminal equipment is still high, for example, the terminal equipment is still easy to heat and scald in the use process, and the conditions of clamping, flashing and backing, high power consumption and poor endurance can exist.
In view of this, the embodiment of the application provides a method for reducing power consumption. In the method, when the terminal equipment is set to be in a starting-up state, a first parameter value processing service which is determined based on a Bayesian optimization method and is suitable for the current state is loaded, and a second parameter value processing service which is manually set by experience is not loaded. Since the power consumption value generated by the terminal device when operating on the basis of the first parameter value is smaller than the power consumption value generated when operating on the basis of the second parameter value. Therefore, under the condition of not depending on manual experience, the automatic adjustment of parameters required by the operation of the terminal equipment is realized, so that the power consumption of the whole machine can be reduced as much as possible on the premise that the terminal equipment meets the performance requirement.
Illustratively, a first parameter value, such as the one identified below by the parameter optimization module based on a bayesian optimization method, is the BO parameter value that corresponds to the lowest power consumption value. The second parameter value is, for example, a default parameter value empirically set by a worker as described below.
Specifically, in the method for reducing power consumption provided by the embodiment of the present application, when the terminal device loads the first parameter value which is determined to be suitable for the current state based on the bayesian optimization method, the current first frame rate of the screen of the terminal device and the second frame rate of the service requirement corresponding to the terminal device are acquired, and then whether the first frequency is matched with the second frequency is determined.
Correspondingly, when the first frame rate is matched with the second frame rate, loading a first parameter value which is determined to be suitable for the current state based on a Bayesian optimization method; otherwise, when the first frame rate does not match the second frame rate, the second parameter value is loaded.
It is understood that since the empirically set second parameter value is generally large in space, the frame rate of the screen of the terminal device can be made to meet the frame rate of any service requirement when the terminal device performs a service based on the second parameter value.
The first frame rate, hereinafter referred to as the current frame rate of the terminal device, and the second frame rate, hereinafter referred to as the required frame rate, are exemplary.
In some implementations, the first frame rate and the second frame rate are matched, specifically, whether the first frame rate is greater than or equal to, that is, not less than, the second frame rate is determined. For example, in the case where the second frame rate is 30fps, the first frame rate needs to be ≡30fps.
For example, there may be some relaxation in the frame rate requirements of the terminal device, such as setting a limit value for the current frame rate to be allowed to be below the target frame rate, such as 0.1fps. That is, in the case where the second frame rate is 30fps, the first frame rate needs to be equal to or greater than 29.9fps.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
The above-mentioned determination as to whether the first frame rate matches the second frame rate is performed as described in step S106 and step S206 in the following embodiments. For details of determining whether the first frame rate matches the second frame rate, reference may be made to the portions of step S106 and step S206, which are not described here.
In addition, the terminal device performs a service, for example, a service performed by using an application is started for the terminal device. The camera application is started as described below, and a shooting service is performed.
For example, according to the method for reducing power consumption provided by the embodiment of the present application, in some implementations, a functional module (hereinafter referred to as a parameter optimization module) for determining a parameter with the lowest power consumption may be integrated in a server (such as a parameter server in fig. 1), and corresponding parameter values when different applications are in different scenes and modes are predetermined by the parameter server. For example, as shown in fig. 1, based on the method for reducing power consumption provided by the embodiment of the present application, the parameter optimization module in the parameter server may determine specific parameter values corresponding to parameter 1, parameter 2, parameter 3 and parameter 4 respectively when a certain application installed in the terminal device, such as a mobile phone, works in scene 1, scene 2 and scene 3.
With continued reference to fig. 1, for scene 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 scene 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 scene 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.
The parameter values a1, a2, a3 may be different or the same. Accordingly, b1, b2, b3 may be different parameter values or the same parameter value. Accordingly, c1, c2, and c3 may be different parameter values or the same parameter value. Accordingly, d1, d2, d3 may be different parameter values or the same parameter value.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
With continued reference to fig. 1, an exemplary parameter optimization module in a parameter server determines the values of parameters corresponding to each of the scenario 1, scenario 2, and scenario 3 shown in fig. 1 according to the method for reducing power consumption provided by the embodiment of the present application, and then sends the values of parameters corresponding to each scenario to a mobile phone. Correspondingly, when the mobile phone uses the corresponding application, the mobile phone can load the parameter values suitable for the scene and the mode where the current application is located. For example, when the device is operated in the scene 1, the parameter value a1 corresponding to the parameter 1, the parameter value b1 corresponding to the parameter 2, the parameter value c1 corresponding to the parameter 3, and the parameter value d1 corresponding to the parameter 4 can be used.
Therefore, by the method for reducing the power consumption provided by the embodiment of the application, the parameter value of the lowest power consumption of the whole machine is determined by the parameter optimization module in the parameter server under the condition that the terminal equipment meets the performance requirement when the application works in different scenes and modes, instead of relying on manual determination, the determined parameter value is more reasonable by virtue of experience, and the labor cost can be reduced better.
In another implementation manner, the method for reducing power consumption provided by the embodiment of the application can also set the parameter server to interact with the terminal device (such as a mobile phone) so as to update the parameter value according to the actual use condition of the mobile phone.
For example, assume that the parameter server issues the parameter values corresponding to scenario 1, scenario 2, and scenario 3 to the mobile phone according to the manner shown in fig. 1. After the mobile phone works based on the parameter values corresponding to the scenes, the actual corresponding power consumption can be fed back to the parameter server when the mobile phone works based on the corresponding parameter values in the corresponding scenes, as shown in fig. 2.
Correspondingly, after the parameter server receives the power consumption of different parameter values corresponding to different scenes fed back by the mobile phone, the parameter value optimization can be performed again based on the power consumption reduction method provided by the embodiment of the application. If the parameter value corresponding to the parameter 1 in the scene 1 is adjusted from a1 to a1'; adjusting the parameter value corresponding to the parameter 2 from b1 to b1'; adjusting the parameter value corresponding to the parameter 3 from c1 to c1'; and adjusting the parameter value corresponding to the parameter 4 from d1 to d1'. For example, the parameter value corresponding to the parameter 1 in the scene 2 is adjusted from a2 to a2'; adjusting the parameter value corresponding to the parameter 2 from b2 to b2'; adjusting the parameter value corresponding to the parameter 3 from c2 to c2'; and adjusting the parameter value corresponding to the parameter 4 from d2 to d2'. Also for example, the parameter value corresponding to parameter 1 in scene 3 is adjusted from a3 to a3'; adjusting the parameter value corresponding to the parameter 2 from b3 to b3'; adjusting the parameter value corresponding to the parameter 3 from c3 to c3'; and adjusting the parameter value corresponding to the parameter 4 from d3 to d3'.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
In addition, it should be noted that, in practical application, the parameter server may perform data interaction with a plurality of terminal devices, so for the parameter values corresponding to the same scene and mode, the parameter server may receive the power consumption data fed back by the plurality of terminal devices. Therefore, when the parameter server adjusts the parameter values corresponding to the scenes and the modes, the parameter server can perform optimization selection based on the data fed back by the terminal equipment of the same type, and under the condition of reducing the processing times of the parameter server, the adjusted parameter values can be ensured to be applicable to a plurality of terminal equipment.
With continued reference to fig. 2, an exemplary method for reducing power consumption provided by the embodiment of the present application for a parameter optimization module in a parameter server adjusts the parameter values corresponding to each of the scene 1, the scene 2, and the scene 3 shown in fig. 1 to the parameter values corresponding to each of the scene 1, the scene 2, and the scene 3 shown in fig. 2, and then resends the adjusted parameter values corresponding to each of the scenes to the mobile phone. Correspondingly, when the mobile phone uses the corresponding application, the parameter values which are newly pushed by the parameter server and are suitable for the scene and the mode where the current application is located can be loaded. For example, when operating in scene 1, a parameter value a1 'corresponding to parameter 1, a parameter value b1' corresponding to parameter 2, a parameter value c1 'corresponding to parameter 3, and a parameter value d1' corresponding to parameter 4 may be used.
Therefore, on the basis of the implementation mode shown in fig. 1, the parameter server and the terminal equipment are set to interact, so that the parameter server can adjust the parameter values corresponding to different scenes and modes according to the actual power consumption generated by the parameter values set by the parameter server under the different scenes and modes of the terminal equipment. In this way, along with the changes of memory, processing resources, electric quantity and the like in the using process of the terminal equipment, the required parameter values can also be dynamically changed when the terminal equipment works in different scenes and modes, so that the actual using requirements are better met.
In addition, it should be noted that, in order to reduce the influence 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 may be set to perform data interaction with the parameter server when the mobile phone is in an idle state, for example, when no application program is currently running.
In other implementations, the mobile phone may be set to interact with the parameter server when the mobile phone is in a charging state.
For example, in other implementations, the mobile phone may be further configured to perform data interaction with the parameter server during a fixed period of time, such as a period of 00:00 to 06:00.
For example, in other implementations, the parameter server may be further configured to push the corresponding parameter value to the mobile phone together with the ideal power consumption of the parameter value in the corresponding scenario. Accordingly, when the mobile phone uses the parameter value and works in the scene, if the corresponding power consumption is not greatly different from the ideal power consumption, the mobile phone can not interact with the parameter server in order to reduce the power consumption caused by interaction between the mobile phone and the parameter server. On the contrary, when the power consumption difference is larger, particularly larger than the ideal power consumption, the mobile phone and the parameter server are set for data interaction.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
In an exemplary embodiment, the method for reducing power consumption according to the embodiment of the present application may integrate the parameter optimization module into the terminal device in another implementation manner. I.e. when different applications are in different scenes, modes, the corresponding parameter values are determined by the terminal device itself.
Therefore, an additional deployment parameter server is not needed, and the implementation cost is reduced.
In addition, the parameter value is determined by the terminal equipment, so that the actual use condition of the terminal equipment can be better fitted, and the situation of different people can be realized.
In an exemplary embodiment, the method for reducing power consumption according to the embodiment of the present application may further include integrating the parameter optimization module in the terminal device and the parameter server, respectively.
In this way, the parameter server sets the parameter values in the case that the terminal device can interact with the parameter server, so that the power consumption required by the terminal device to determine the parameter values is reduced. Under the condition that the terminal equipment cannot interact with the parameter server, the terminal equipment determines the parameter value, so that the terminal equipment can load the proper parameter value and work in different scenes and modes.
It should be understood that, the above four methods for reducing power consumption according to the embodiments of the present application, the ways of adjusting the parameter values when the terminal device operates in different scenes and modes, are merely examples listed for better understanding the technical solutions of the present embodiment, and are not the only limitation of the methods for reducing power consumption according to the embodiments of the present application.
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, a hardware structure and a software architecture of a terminal device to which the embodiments of the present application are applicable are first described with reference to the accompanying drawings.
The terminal device to which the embodiment of the present application is applicable may be, for example, a mobile phone, a tablet, a smart watch, etc. which are listed above, and this embodiment is not limited thereto. For convenience of explanation, this embodiment will be described with reference to a mobile phone.
Referring to fig. 3, the mobile phone 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, among others.
Wherein the audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, etc., which are not specifically recited herein, the present application is not limited thereto.
The sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not further illustrated herein, but the present application is not limited thereto.
The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural center or a command center of the mobile phone 100. In practical application, the controller can generate operation control signals according to the instruction operation codes and the time sequence signals to complete instruction fetching and instruction execution control.
A memory may also be provided in the processor 110 for storing instructions and data. In some implementations, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The processor 110 may also include one or more interfaces, among other things. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
It should be understood that the connection relationship between the modules illustrated in the embodiment of the present application is only illustrative, and is not limited to the structure of the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may also use different interfacing manners, or a combination of multiple interfacing manners, as in the above embodiments.
With continued reference to fig. 3, exemplary wireless communication functions of the handset 100 may be implemented by an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a modem processor, a baseband processor, and the like.
Wherein the antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the handset 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other implementations, the antenna may be used in conjunction with a tuning switch.
With continued reference to fig. 3, the exemplary mobile communication module 150 may provide a solution for wireless communications, including 2G/3G/4G/5G, as applied to the handset 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some implementations, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some implementations, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include, among other things, a modulator and demodulator. In some implementations, the modem processor may be a stand-alone device. In other implementations, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
With continued reference to fig. 3, the exemplary wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the handset 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In particular, in the technical solution provided in the embodiment of the present application, the mobile phone 100 may interact with the parameter server described in the above embodiment through the mobile communication module 150 or the wireless communication module 160. For example, the mobile phone 100 may receive parameter values set by the parameter server for each scene, mode, and transmit power consumption of the mobile phone 100 operating at the corresponding parameter values to the parameter server through the mobile communication module 150.
With continued reference to FIG. 3, an exemplary external memory interface 120 may be used to interface with an external memory card, such as a Micro SD card, to extend the memory capabilities of the handset 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
With continued reference to fig. 3, by way of example, the internal memory 121 may be used to store computer executable program code that includes instructions. The processor 110 executes various functional applications of the cellular phone 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the handset 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
In particular, in the technical solution provided in the embodiment of the present application, parameter values of different scenes and modes corresponding to different applications installed in the mobile phone 100 may be stored in the memory 121. Thus, when the mobile phone runs the corresponding application to the corresponding scene or 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. Because the parameter value is the optimal parameter value which is determined based on the method for reducing power consumption and is suitable for the current scene and mode, the mobile phone 100 can reduce the power consumption of the whole machine as much as possible on the premise of meeting the performance requirement.
The hardware structure of the mobile phone 100 is described herein. It should be understood that the structure illustrated in the embodiments of the present application is not limited to the specific embodiment of the mobile phone 100. In other embodiments of the application, the handset 100 may include more or fewer components than shown in fig. 3, or certain components may be combined, certain components may be split, or different arrangements of components may be provided. The various components shown in fig. 3 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.
In order to better understand the software structure of the mobile phone 100 shown in fig. 3, the following describes the software structure of the mobile phone 100. Before explaining the software structure of the mobile phone 100, an architecture that the software system of the mobile phone 100 can employ will be first described.
Specifically, in practical 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.
Furthermore, it is understood that software systems currently used by mainstream terminal devices include, but are not limited to, windows systems, android systems, and iOS systems. For convenience of explanation, the embodiment of the present application takes an Android system with a layered architecture as an example, and illustrates a software structure of the mobile phone 100.
In addition, the scheme for reducing power consumption provided in the embodiment of the application is applicable to other systems in specific implementation.
Referring to fig. 4, a software architecture diagram of a mobile phone 100 according to an embodiment of the present application is shown.
As shown in fig. 4, the layered architecture of the handset 100 divides the software into several layers, each with a clear role and division. The layers communicate with each other through a software interface. In some implementations, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages, among other things. As shown in FIG. 4, the application package may include parameter optimization, setup, wi-Fi, etc. applications, which are not explicitly recited herein, and the application is not limited in this regard.
In particular, in this embodiment, the parameter optimization application may provide a user portal for a user to open the parameter automatic adjustment function. The present embodiment is not limited with respect to interfaces, options, etc. included in the parameter optimization application.
It is understood that, in the case where the parameter value is determined by the parameter server, after the parameter automatic adjustment function is started, the terminal device may send a parameter value acquisition request to the parameter server to acquire, from the parameter server, the parameter value required for different applications to operate in different scenes and modes.
Furthermore, as is apparent from the above description, for a scenario in which a parameter value is determined by a parameter server, a terminal device needs to perform data interaction 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 issued by the parameter server, it is necessary to ensure that the terminal device turns on the cellular network or the wireless network in the case of turning on the parameter automatic adjustment function. Taking the example of starting the wireless network, in one implementation, the WIFI may be started through the WIFI application, and the corresponding WIFI network is added. In another implementation manner, the WIFI may also be started by setting an entry provided by the application for starting the WIFI function, and joining a corresponding WIFI network.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
In addition, it is also understandable that, in the case where the parameter value can be determined by the terminal device itself, after the parameter automatic adjustment function is turned on, the terminal device can directly determine the parameter value required when different applications operate in different scenes and modes.
Therefore, when the terminal equipment starts different applications and works in different scenes and modes, proper parameter values can be loaded, so that the power consumption of the whole machine can be reduced as much as possible under the condition that the terminal equipment meets the performance requirement.
In addition, it should be noted that, in some implementations, the user entry provided by the parameter optimization function may also be integrated into the setting interface corresponding to the setting application; or setting an interface corresponding to a certain option in the interfaces, and the specific implementation manner is not limited in this embodiment.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Wherein the application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. As shown in FIG. 4, the application framework layer may include functions of a content provider, a resource manager, a window manager, etc., which are not to be construed as limiting the application.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, application program corresponding parameter files, etc., which are not listed here, but the present application is not limited thereto.
It can be understood that the above-mentioned parameter file is a file in which parameter values corresponding to parameters involved in each scene and mode are recorded.
The resource manager provides various resources to the application program, such as localization strings, icons, pictures, layout files, video files, etc., which are not listed here, and the application is not limited in this regard.
From the above description, it is clear that the terminal device may also determine the parameter value itself, and for this implementation, the parameter optimization module needs to be integrated in the terminal device. In this way, the parameter optimization module located in the application program framework layer in the terminal device can adjust the parameter values corresponding to the application scenes and modes related to various applications by adopting a set parameter optimization method, such as a Bayesian optimization method. Details of the specific implementation of determining the parameter values based on the bayesian optimization method are described below, and are not described here again.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Android run time includes a core library and virtual machines. Android run is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional (3D) graphics processing Libraries (e.g., openGL ES), two-dimensional (2D) graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video formats for playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
It will be appreciated that the 2D graphics engine described above is a drawing engine for 2D drawing.
Furthermore, it can be appreciated that the kernel layer in the Android system is a layer between hardware and software. The kernel layer at least comprises a display driver, a sensor driver, a WIFI driver and the like.
As to the software structure of the mobile phone 100, it will be understood that the layers and the components included in the layers in the software structure shown in fig. 4 do not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the handset 100 may include more or fewer layers than shown, and more or fewer components may be included in each layer, as the application is not limited.
In order to better understand the technical scheme provided by the embodiment of the application, taking the camera application as an example, the method for reducing the power consumption provided by the embodiment of the application is described in detail, and the selection of parameter values of each scene and mode related to the camera application is described.
In particular, in order to enhance the user photographing experience, a camera application installed in a terminal device may support multiple photographing modes. As shown in fig. 5, after a user opens a camera application installed in the terminal device, a shooting mode selected by the user, such as a portrait mode, a normal video mode, a movie mode, a large aperture mode, a night view mode, a multi-mirror video mode, a micro-movie mode, a photo mode, etc., is displayed in a displayed shooting interface, which is not limited herein.
Further, for each shooting mode, a front mode using a front camera and a rear mode using a rear camera may be further divided. For example, the photographing models listed above can be classified into a front photographing mode and a rear photographing mode.
Further, for each shooting mode, a different scene may also be included. By way of example, the scenes may include, for example, whether a person is present, whether a face is present, whether a smile is present, and whether different kinds of scenes are present, which are not to be construed as limiting the application.
It is understood that the above-mentioned scene recognition is implemented, in particular, by invoking a corresponding algorithm. For example, for scene recognition with or without human body, a human body detection (HumanDetection) algorithm needs to be invoked; for scene recognition of whether a human face exists, a face detection (FaceDetection) algorithm is further called under the condition that a human body exists; if the face is identified to be smiling, a smiling detection (smile detection) algorithm is required to be further called; for scene recognition of different people, a people detection (rate detection) algorithm needs to be further invoked when faces are recognized.
With continued reference to fig. 5, taking a portrait mode as an example, the corresponding scenes may include, for example, a scene with or without a human body implemented based on a human body detection algorithm, a scene with or without a human face implemented based on a human face detection algorithm, a scene whether a smile exists on a human face implemented based on a smile detection algorithm, and the like.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
For camera application, in actual use, when any shooting mode is selected to shoot, a certain algorithm is started, namely partial scene recognition is involved. For example, during the selection of a normal video mode video, the camera application may always invoke a human detection algorithm. Accordingly, when a human body is detected, a face detection algorithm is further invoked. Accordingly, when the face is detected, a race detection algorithm, a smile detection algorithm, a skin beautifying algorithm and the like are further invoked. The power consumption for the terminal device will also be different due to the different algorithms called and the number of algorithms called. From the above description, it can be seen that the operator sets the corresponding parameter value for each algorithm by experience, and the parameter space is very large, about 10 16 Thus resulting in still higher power consumption of the terminal device.
In particular, in this embodiment, when the parameter automatic adjustment function is turned on, based on a bayesian optimization algorithm, a parameter value corresponding to each shooting mode in the camera application and a parameter value corresponding to a scene related to each shooting mode are determined. Therefore, when a user opens a camera application and selects a shooting mode, the terminal equipment can load the corresponding parameter value, so that when the terminal equipment shoots by using the shooting mode selected currently, the power consumption is the lowest under the condition of meeting the performance requirements such as the frame rate corresponding to the shooting mode.
The method for reducing power consumption provided by the embodiment of the application is specifically described by taking adjusting parameter values corresponding to camera applications as an example.
Referring to fig. 6, an implementation flow of adjusting a parameter value corresponding to a camera application based on the method for reducing power consumption provided by the embodiment of the present application under the condition of no scene recognition is illustrated.
The case of no scene recognition specifically refers to a case where only the shooting mode is considered. That is, parameter values set for different shooting modes are set, and all scenes related to the shooting mode are opened by default without considering the conditions of different scenes, namely, the corresponding detection algorithm is called.
Referring to fig. 6, the implementation flow of the present embodiment specifically includes:
s101, in response to the operation behavior of opening the camera application, starting the camera application, and displaying an alternative shooting mode.
Referring to fig. 7 (1), for example, when the user clicks on the camera application icon displayed in the terminal device (for example, a mobile phone) interface 10a, the mobile phone will start the camera application in response to the operation behavior.
Referring to fig. 7 (2), illustratively, after the camera application is started, the handset will switch from interface 10a to interface 10b.
With continued reference to fig. 7 (2), in the interface 10b, for example, a partial photographing mode for user selection, such as a large aperture mode, a night view mode, a photographing mode, a portrait mode, a normal video mode, a movie mode, etc., may be displayed, and a "more" option entry may be displayed.
For example, after the user clicks the "more" option entry, other shooting modes, which are not shown, such as a micro-movie mode, a multi-mirror video mode, a skin-beautifying mode, etc., may be displayed in a popup frame, which is not limited in this application.
S102, whether to start the parameter automatic adjusting function or not.
From the above description, the user can optimize the function portal provided by the application through the parameters, or set the function portal integrated in the application, and turn on or off the parameter automatic adjustment function. In one implementation, it is therefore known whether the parameter automatic adjustment function is currently activated or not in order to be able to use the application installed in the terminal device. A global variable may be defined, i.e. a variable (denoted by bypass in the following) accessible to all applications supporting the parameter automatic adjustment function in the terminal device, and it is agreed that when bypass=a first value, such as 1 or true, the terminal device is identified that the parameter automatic adjustment function is started. When bypass=a second value, such as 0 or false, it is identified that the terminal device does not turn on the parameter auto-adjustment function.
Furthermore, it may be further agreed that, in the case that the terminal device starts the parameter automatic adjustment function, a parameter value (hereinafter referred to as a BO parameter value) corresponding to the application running at the current time determined based on the bayesian optimization method is loaded. Otherwise, under the condition that the terminal equipment does not start the parameter automatic adjusting function, the terminal equipment loading staff is set to preset parameter values (shown as default parameter values in the follow-up process) by experience.
It should be understood that, the method for reducing power consumption provided by the embodiment of the present application needs to reduce power consumption of the terminal device under the condition of meeting the performance requirement. Therefore, before determining that the terminal device starts the parameter automatic adjusting function and loading the appropriate current BO parameter value, whether the terminal device currently meets the performance, such as the frame rate requirement, can be judged.
The frame rate required to be satisfied after the terminal device enters the photographing mode may be, for example, 30fps, 60fps, or the like, which is not illustrated herein, and the present application is not limited thereto.
Taking 60fps as an example of the frame rate to be satisfied, determining that the current terminal device satisfies the frame rate requirement when the current frame rate of the terminal device is not less than 60 fps. Otherwise, the frame rate requirement is not satisfied.
For example, there may be some relaxation in the frame rate requirements of the terminal device, such as setting a limit value for the current frame rate to be allowed to be below the target frame rate, such as 0.1fps. At this time, if the frame rate that the requirement satisfies is 60fps and the current device frame rate is 59.9fps, the current device can be considered to satisfy the frame rate requirement.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Taking the camera application as an example, the present embodiment exemplarily executes step S103 in the case where it is determined that the terminal device does not turn on the parameter automatic adjustment function. Otherwise, in the case of determining that the terminal device turns on the parameter automatic adjustment function, step S104 is performed.
For example, in other implementations, to enable user customization, an entry may be provided to set different application opening parameter auto-adjustment functions, respectively. For example, an entry for an opening parameter automatic adjustment function is set for the camera application and the video application, respectively. For this case, a variable indicating whether to start the parameter adjustment function may be written in a file of the corresponding application, for example, and accessed only when the application is started.
Accordingly, in the case where the user turns on only the parameter automatic adjustment function corresponding to the camera application, when the camera application is started, the processing may be performed according to steps S101 to S110. And the video application is directly loaded with default parameter values after being started.
S103, loading default parameter values.
I.e. loading the parameter values set empirically by the staff in the existing solution.
S104, whether to exit the camera application.
Specifically, in order to further reduce the power consumption of the terminal device, in the case where the camera application is started and it is determined that the terminal device has turned on the parameter automatic adjustment function, whether to exit (turn off) the camera application may be further monitored.
Accordingly, upon exiting the camera application, the process for realizing the parameter automatic adjustment function is ended (destroyed), i.e., step S105 is performed.
S105, ending the process of realizing the parameter automatic adjustment function.
For example, in the case where the BO parameter value is determined by the parameter server, the terminal device may destroy the process of interacting with the parameter server to obtain the BO parameter value after determining that the camera application is turned off.
For example, in the case where the BO parameter value is determined by the terminal device itself, the terminal device may destroy the process of determining the BO parameter value based on the bayesian optimization method after determining that the camera application is turned off. As shown in fig. 4, the process corresponding to the parameter optimization module of the application framework layer is destroyed.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
S106, whether the frame rate meets the requirement.
It will be appreciated that since default parameter values are typically set to a large range, as described above for 10 16 Therefore, after the terminal equipment loads the default parameter value, the frame rate of the terminal equipment can be enabled to meet the requirement. Thus, in the present embodiment, it may be set that step S108 is performed when it is determined that the current frame rate satisfies the required frame rate. On the contrary, when it is determined that the current frame rate does not satisfy the required frame rate, step S107 is performed.
S107, loading default parameter values.
With continued reference to fig. 6, in an exemplary case where the terminal device has an automatic adjustment function for the opening rate parameter, but the current frame rate does not meet the required frame rate, after the terminal device is set to load the default parameter value, the process of executing the service by the terminal device based on the default parameter value may be further set, and whether the terminal device exits the camera application is periodically determined, that is, step S104 is executed.
For example, regarding the timing of periodically performing step S104, the frame rate setting may be set according to the current traffic needs to be satisfied. For example, for a scene with a frame rate of 30fps that needs to be met, step S104 may be performed once every 40 ms.
Also for example, for a scene requiring a frame rate of 60fps to be satisfied, step S104 may be performed every 25 ms.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
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 equipment can always meet the frame rate requirement, and the problem of frame dropping of shot content is prevented.
S108, switching the shooting mode to a selected target shooting mode in response to a selected operation of any shooting mode.
Still taking the alternative shooting mode shown in fig. 7 (2) as an example, the mobile phone will switch to the portrait mode (target shooting mode) in response to the operation behavior when the user selects the option of "portrait".
S109, whether the BO parameter value needs to be reset.
For example, 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 time.
Accordingly, if the parameter value corresponding to the target shooting mode is already the above-mentioned BO parameter value, it is determined that the BO parameter does not need to be reset at present. Otherwise, if the currently loaded parameter value of the terminal device is not the BO parameter value suitable for the target shooting mode, determining that the BO parameter value needs to be reset currently.
With continued reference to fig. 6, for example, after determining that the BO parameter does not need to be reset currently, it may also be periodically determined whether the terminal device exits the camera application, i.e., step S104 is performed.
With continued reference to fig. 6, illustratively, after determining that the BO parameters are currently required to be reset, step S110 may be performed.
S110, loading BO parameter values corresponding to the target shooting mode at the current time.
As can be seen from the above description, the parameter server may determine the BO parameter value based on a 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. The present embodiment does not limit the source of the BO parameter values.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment. In practical application, the setting can be performed according to the service requirement, and the application is not limited.
In addition, in the case of no scene recognition, after the camera application is started and the shooting mode is determined, all scenes included in the currently selected shooting mode may be further determined, and after all included scenes are determined, the first parameter value required for all scenes to be simultaneously operated, that is, the BO parameter value, may be directly loaded regardless of whether the scenes are being operated.
Taking as an example that the currently determined shooting mode includes a first scene (e.g., a face detection scene implemented based on a face detection algorithm) and a second scene (e.g., a smile detection scene implemented based on a smile detection algorithm). Assume that a scene in which the terminal device is currently operating is a first scene, and that the second scene is not operating. Without scene recognition, the terminal device would directly load the first parameter values required for simultaneous jobs of the first scene and the second scene, instead of only the first parameter values required for the first scene currently being worked.
Therefore, in the method for reducing power consumption provided in this embodiment, under the condition that performance requirements are met, the terminal device loads the BO parameter value which is determined based on the bayesian optimization method and is suitable for the current shooting mode by the parameter server/terminal device, so that the power consumption of the terminal device in the target shooting mode can be as low as possible.
In addition, whether the terminal equipment meets the performance requirement is periodically detected, and when the terminal equipment does not meet the performance requirement, the parameter value corresponding to the target shooting mode is set and switched into the default parameter value in time, so that the terminal equipment can meet the performance requirement again, the problem of frame dropping of shot content is prevented, and the shooting effect is ensured.
Referring to fig. 8, an implementation flow of adjusting a parameter value corresponding to a camera application based on the method for reducing power consumption provided by the embodiment of the present application in the case of scene recognition is illustrated.
The case of scene recognition specifically refers to a case where, for different shooting modes, the scene to which the shooting mode is currently related is further considered. 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.
Referring to fig. 8, the implementation flow of the present embodiment specifically includes:
s201, in response to the operation behavior of opening the camera application, starting the camera application, displaying an alternative shooting mode S202, and whether to start the parameter automatic adjustment function.
S203, loading default parameter values.
S204, whether to exit the camera application.
S205, ending the process of realizing the parameter automatic adjustment function.
S206, whether the frame rate meets the requirement.
S207, loading default parameter values.
S208, in response to the selected operation of any shooting mode, the shooting mode is switched to the selected target shooting mode.
It is understood that 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 exits, and determine whether the current frame rate meets the requirement. Therefore, for details of the implementation of step S201 to step S208, reference may be made to the portions of step S101 to step S108 in the above embodiments, and the details are not repeated here.
S209, determining a target shooting mode and a scene related to the current moment.
With continued reference to fig. 8, for example, in particular, in the case where there is scene recognition, after determining the target shooting mode, it is necessary to further consider the scene to which the target shooting mode relates at the current time, that is, to perform step S209.
As can be seen from the above description, the scene corresponds to the detection algorithm, so that the scene involved in the target shooting mode at the current moment can be determined by detecting the currently called detection method.
S210, whether the BO parameter value needs to be reset.
For example, for details of the implementation of step S210 in this embodiment, reference may be made to the portion of step S109 in the above embodiment, which is not described herein.
S211, loading BO parameter values corresponding to the target shooting mode at the current time.
Taking the determined scene as a human body detection scene as an example, under the condition of scene identification, the terminal equipment loads the BO parameter value suitable for the current moment, and only loads the BO parameter value required by the operation of a human body detection algorithm. For the BO parameter value required by the operation of the invoked face detection algorithm after the human body is detected; and after the face is detected, the BO parameter values required by the running of the smile detection algorithm, the skin care algorithm, the race detection algorithm and the like are called, and are not required to be loaded. Subsequently, after the step S204 is periodically executed and the step 206 is determined to be executable, it may be continuously determined whether the frame rate at the current moment meets the required frame rate, and then the step S207 or the step S208 is determined to be executed according to the determination result, so that in the process of using the camera application, the parameter value loaded by the terminal device can always meet the required frame rate while reducing the power consumption.
Accordingly, when determining the scene related to the target shooting mode and adding the face detection scene, step S210 will determine that the BO parameter value required for the operation of the face detection algorithm needs to be loaded as compared with the BO parameter value required for the operation of the human detection algorithm when judging that only the loading rate is suitable for the operation of the human detection algorithm last time.
Accordingly, in step S211, BO parameter values required for the operation of the human detection algorithm and the human face detection algorithm can be simultaneously reloaded.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
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 all the included scenes are determined, whether the scenes are working or not is further considered, and finally only the first parameter value required by the currently working scene, namely the BO parameter value, is loaded.
Still taking as an example that the currently determined shooting mode includes a first scene (e.g., a face detection scene implemented based on a face detection algorithm) and a second scene (e.g., a smile detection scene implemented based on a smile detection algorithm). Assume that a scene in which the terminal device is currently operating is a first scene, and that the second scene is not operating. In the case of scene recognition, the terminal device only loads the first parameter values required for the first scene currently being worked.
Therefore, in the method for reducing power consumption provided in this embodiment, under the condition that performance requirements are met, the terminal device loads the BO parameter value, which is determined based on the bayesian optimization method and is suitable for the scene currently related to the target shooting mode, of the terminal device in the target shooting mode, and only the BO parameter value required by running the detection algorithm for realizing current scene identification is loaded, and the BO parameter value required by the detection algorithm not currently related is not required, so that power consumption of the terminal device is further reduced.
As described in the above embodiments, the process of determining, by the parameter optimization module located in the parameter server or the terminal device, the BO parameter values to be loaded when different applications operate in different modes and scenes based on the bayesian optimization method may specifically include, as shown in fig. 10:
s301, determining parameters to be adjusted and a value range corresponding to the parameters.
As can be seen from table 1, the method of reducing the power consumption of the terminal device by adjusting the parameter value is mainly applicable to the case that the power consumption source is a software part. Further, as is clear from table 1, the power consumption of the terminal device is greatly affected by the CPU and DDR. Therefore, in this embodiment, the parameter values to be adjusted are taken as 4 parameter values, i.e. the CPU core number, the CPU frequency, the DDR frequency, and the task migration (scale), based on the bayesian optimization method. That is, 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 the scale.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment. In practical application, parameters corresponding to power consumption generated by the software part can be adjusted based on the method provided by the embodiment of the application.
As can be seen from table 1, CPUs can be classified into CPUB, CPUL and CPUM. Taking an 8-core CPU as an example, where CPUB is 1, CPUL is 4, and CPUM is 3.
The values of different types of CPU cores may be as shown in table 2, based on the number of cores that the types of CPU cores may include.
Table 2 values of CPU cores
Regarding the value of the parameter of CPU frequency (the unit is KHz/kilohertz), specifically, one frequency point is selected from the frequency points corresponding to each CPU core as a minimum value min, the other frequency point is selected as a maximum value max, and max > min.
For example, for CPUB, there are typically 20 frequency points that can be selected, respectively: 836500, 980200, 1034000, 1163200, 1293100, 1410500, 1500200, 1608100, 1712000, 1825300, 1934600, 2043400, 2145200, 2276500, 2412300, 2524300, 2600000, 2700000, 2801200, 2981300.
Based on this, in one implementation, in a scenario where 1 CPU big core is required to be used, the frequency range of the CPU big core may be [836500, 980200]. That is, min selected from the 20 selectable frequency points is 836500, and max selected is 980200. Subsequently, the policy parameter value corresponding to the CPUB may be any frequency value in the interval [836500, 980200].
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
For example, for CPUM, there are typically 17 frequency points that can be selected, respectively: 612500, 732000, 875600, 982300, 1156200, 1213200, 1364500, 1486000, 1597800, 1634200, 1780000, 1880000, 1990000, 2100000, 2223400, 2360000, 2406500.
Based on this, in one implementation, in a scenario where 2 CPU cores are required, the range of frequency values for one of the CPUM's may be, for example, [1213200, 2360000]. That is, min selected from the 17 selectable frequency points is 1213200, and max selected is 2360000. Subsequently, the policy parameter value corresponding to the CPUM may be any frequency value in the interval [1213200, 2360000].
The frequency range of the other CPUM may be the same as the frequency range of the CPUM described above, i.e., [1213200, 2360000]. The frequency range may be different from the frequency range of the CPUM, and may be [1780000, 2406500]. That is, min selected from the 17 selectable frequency points is 1780000, and max selected is 2406500. Subsequently, the policy parameter value corresponding to the CPUM may be any frequency value in the interval [1780000, 2406500].
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
For example, for CPUL, there are typically 15 frequency points that can be selected, respectively: 336100, 400000, 523400, 656300, 776300, 856100, 990800, 1098600, 1167800, 1245200, 1307800, 1487400, 1578200, 1607400, 1764200.
Based on this, in one implementation, in a scenario where 1 CPU corelet is required to be used, the range of values of the frequency of the CPU corelet may be, for example, [990800, 1245200]. That is, min selected from the 20 selectable frequency points is 990800, and max selected is 1245200. Subsequently, the policy parameter value corresponding to CPUL may be any frequency value in the interval of [990800, 1245200].
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Regarding the value of the DDR (unit is KHz/kilohertz) parameter, specifically, one frequency point is selected from the corresponding frequency points to be used as a minimum value min, the other frequency point is selected to be used as a maximum value max, and max > min.
For DDR, there are typically about 10 frequency points that can be selected, for example, 9 frequency bands, which are respectively: 575900, 764800, 1560000, 1749900, 255900, 2747300, 3217800, 3709400, 4202000. That is, one frequency point, for example, 764800, may be selected as min, and the other frequency point, for example, 2747300, may be selected as max, thereby obtaining the frequency range [764800, 2747300] of DDR.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
In addition, it should be further noted that, for the value range of the CPU frequency and the value range of the DDR frequency, there are different terminal devices, or different products of the same terminal device, where the available frequency points to be selected are different, and the above-mentioned available frequency points corresponding to the CPUB, CPUM, and CPUL and the available frequency point to be selected of the DDR are only an example.
Regarding the migrate, it is specifically used to migrate tasks between different CPU cores. Therefore, for each CPU core, the parameter of the minimum has two values, namely, a down_minimum value and an up_minimum value. Wherein, down_scale and up_scale are both percentages. For the down_scale, the task is migrated downwards with a certain probability after the task exceeds the corresponding percentage of the down_scale in the CPU core; for up_scale, it means that there is a certain probability that the task migrates upward after the task exceeds the corresponding percentage of up_scale in this CPU core.
That is, for each value of the scale parameter of the CPU core, one value down_scale may be selected from the percentage interval of [0, 100] as the down-shift value up_scale, and the other value up_scale may be selected as the up-shift value.
S302, selecting a strategy parameter value corresponding to a group of parameters from the value range.
Specifically, after setting corresponding values/value ranges for the 4 parameters, i.e., the CPU core number, the CPU frequency, the DDR frequency, and the size, in one implementation, a specific value may be selected from the value/value ranges corresponding to each parameter, so as to obtain a set of parameter values corresponding to the 4 parameters (in this embodiment, referred to as "policy parameter values").
For example, in another implementation, the determined policy parameter values may also be a specific set of parameter values that are currently empirically determined by a worker.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
S303, writing the parameters and the corresponding strategy parameter values into the xml file corresponding to the terminal equipment.
Taking still the determined scene of the BO parameters corresponding to the camera application as an example, the corresponding xml file is the xml file corresponding to the camera application (the xml file corresponding to the camera application is called as a camera power consumption configuration file in the following). That is, the 4 parameters of the CPU core number, the CPU frequency, the DDR frequency, the size, and the policy parameter values corresponding to the 4 parameters are written into the xml file of the camera power consumption configuration file.
As can be seen from the above description, for camera applications, when the called cameras are different (front-end, rear-end), the modes can be corresponding, and the scenes included in the modes are different. Therefore, in some implementations, labels (hereinafter referred to as first-level labels) corresponding to different cameras may be respectively set. Then, in the first-level labels indicating different cameras, labels (hereinafter referred to as second-level labels) corresponding to the above-mentioned no-scene recognition and scene recognition are respectively set. Then, in the different secondary labels, the labels of the scenes to be included in the mode (hereinafter referred to as three-level labels) are set as required. Then, in each three-level tag, tags corresponding to the above listed 4 parameters (hereinafter referred to as four-level tags) are set. In this way, the corresponding policy parameter value of each parameter determined in the above manner under each mode and scene can be written into the corresponding tag in the xml file, which is the camera power consumption configuration file.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
S304, after the terminal equipment loads the strategy parameter values corresponding to the parameters in the xml file, the power consumption value of the terminal equipment is counted.
Still taking the camera application as an example, for the situation without scene recognition, when a user opens the camera application and selects a portrait mode corresponding to the rear camera as a target shooting mode, 4 parameters of CPU core number, CPU frequency, DDR frequency and migrate can be found out from the corresponding tag in the xml file, namely the camera power consumption configuration file, so as to obtain policy parameter values corresponding to the 4 parameters of CPU core number, CPU frequency, DDR frequency and migrate.
Accordingly, after the terminal equipment loads the strategy parameter values corresponding to the 4 parameters, the power consumption value of the terminal equipment can be counted in the process of shooting by adopting the portrait mode.
The power consumption value may be counted by a functional module in the terminal device, which counts the power consumption value exclusively, and then sent to the parameter optimization module. Such as a parameter optimization module in a parameter server or a parameter optimization module set in a terminal device.
S305, whether the power consumption value is not larger than a preset power consumption threshold.
It will be appreciated that, for different modes and scenarios, the corresponding power consumption thresholds may also be different, i.e. one power consumption threshold is set for each mode and scenario, since the policy parameters set therein may be different. In this way, when the BO parameter values of a certain mode and scene are determined based on the bayesian optimization method, the power consumption value corresponding to each determined strategy parameter value can be compared with the preset power consumption threshold.
Correspondingly, if the power consumption value gradually converges to be smaller than or equal to the corresponding power consumption threshold value after multiple iterative operations, the strategy parameter value corresponding to the power consumption value meeting the convergence requirement (not greater than the preset power consumption threshold value) can be determined as the BO parameter value determined based on the Bayesian optimization method. Otherwise, if the convergence requirement is not satisfied, the iterative operation is continued, that is, the process returns to step S302, and the processes from step S302 to step S305 are re-executed.
S306, determining the strategy parameter value as the BO parameter value.
Therefore, for different terminal equipment, different applications, different modes and scenes, based on the Bayesian optimization method, iterative processing is performed according to the operations from the step S301 to the step S306, so that BO parameter values (optimal parameter values) suitable for different terminal equipment, different applications, different modes and different scenes can be rapidly and accurately determined, and the power consumption of the terminal equipment is minimized under the condition that the terminal equipment meets the performance requirements.
It is understood that the xml file, which is the camera power consumption configuration file, is a default file existing in the terminal device, and currently, default parameter values set empirically for a worker are recorded in the xml file, which is the camera power consumption configuration file. In order to facilitate the terminal device to quickly load default parameter values or optimal parameter values, that is, the above-mentioned BO parameter values, under the condition of starting the parameter automatic adjustment function, in this embodiment, the BO parameter values obtained by training through a bayesian optimization method may not be written into an xml file, that is, the above-mentioned camera power consumption configuration file, but rather, an xml file (the xml file is referred to as an optimal parameter value configuration file in the following) may be created again, and the corresponding BO parameter values under each mode and scene of the camera application are written into the optimal parameter value configuration file.
In this way, after the BO parameter values required by the camera for applying all the use cases are obtained through training by the bayesian optimization method, taking the scene recognition as an example, the optimal parameter value configuration file contains the BO parameter values of a plurality of different scenes in different modes. Such as a scene with a face in a common video, a scene without a face in a common photographing, a scene with a face and smiling in a portrait mode, and the like. The BO parameter values corresponding to all possible scenarios are placed in the optimal parameter value profile. When a user uses a terminal device, such as a camera application in a mobile phone, the BO parameter values in the optimal parameter value configuration file are read into the memory when the camera application is opened. Thus, when the user uses the camera application to take a picture or record a video, the mobile phone will first judge which mode and which scene.
If the mobile phone judges that the mobile phone has a face scene in a common video mode, the BO parameter values corresponding to the current mode and the scene in the optimal parameter value configuration file read into the memory are set into the mobile phone, so that the mobile phone operates according to the set of currently set BO parameter values, the purpose that the BO parameter values are used in different modes of different scenes is achieved, and therefore power consumption is lowest.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
In addition, the parameter optimization module for determining the BO parameter value based on the Bayesian optimization method in the embodiment of the application specifically can comprise a proxy model part and an acquisition function part.
By way of example, the proxy model may include a gaussian process (Gaussian Processes, GP), a gaussian mixture model (Gaussian Mixture Model, GMM), a probabilistic random forest (Probability Random Forests, PRF), tree structure estimation (Tree-structured Parzen Estimators, TPE), etc., which are not further listed here, and the application is not limited in this regard.
By way of example, the acquisition functions may include expected deltas (Expected Improvement, EI), probability deltas (Probability of Improvement, PI), lower confidence boundaries (Lower Confidence Bound, LCB), upper confidence boundaries (Upper Confidence Bound, UCB), etc., which are not explicitly recited herein, and the application is not limited in this regard.
Taking a Gaussian process as a proxy model, taking an expected increment as an example of an acquisition function, and determining BO parameter values based on a Bayesian optimization method, the following formula is needed to be related:
p(f * |X * ,X,f)=N(f ** ,∑ * ) (1)
Specifically, the right side of the equal sign in equation (1) is a gaussian distribution. Where Σ represents the covariance matrix of the variances (variance σ is no longer a number because typically a batch of data is processed together) 2 But a covariance Σ of the number of batches); n (f) ** ,∑ * ) Represents a compliance mean value of mu * Covariance matrix is Σ * Is a gaussian distribution of (c).
X, f on the left side of the equal sign in formula (1) * And X * The function distribution p of (2) is formed, i.e. a gaussian distribution on the right. Wherein X is the determined policy parameter value described above; f is the power consumption value corresponding to X; x is X * Is the optimal parameter value to be determined, namely the above-mentioned BO parameter value; f (f) * Is X * The corresponding power consumption value (lowest power consumption value).
Wherein μ is the average power consumption, f (x * ) For the optimal parameter value to be determined (corresponding to X in formula (1) * ) Corresponding power consumption value (corresponding to f in formula (1) * ) ζ is an infinitesimal amount,the power consumption variance (covariance) corresponds to Σ in the formula (1).
In the formula (2) of the present invention,it can be seen as a cumulative distribution function,consider the probability density function of a standard N (0, 1) ethernet distribution.
In addition, it should be noted that, in the formulas related to the present embodiment, all the parameters carrying "×" represent the (predicted) data that needs to be determined based on the bayesian optimization method.
Based on the above-described proxy model part and the acquisition function part, the parameter optimization module, when determining the BO parameter value based on the bayesian optimization method, specifically, links the input and output (such as the policy parameter value determined in step S301 to step S304 and the obtained power consumption value) through the proxy model, and then determines the policy parameter value to be input in the next iteration operation by using the acquisition function.
That is, the parameter optimization module in determining the BO parameter value may include: (1) randomly initializing n observation points to obtain an initialized data set, wherein the value range corresponds to the determined parameter to be adjusted in the embodiment; (2) randomly selecting a group of strategy parameter values corresponding to parameters from the initialized data set, and estimating function distribution f (x), namely an estimated power consumption value, by using a proxy model (subsequently expressed as g (x); (3) determining a strategy parameter value which needs to be input in the next iteration operation through an acquisition function; (4) adding the determined policy parameter values to the initialization data set to better estimate the function distribution f (x); (5) when the convergence condition is not satisfied, the above (2), (3) and (4) are cyclically executed until the convergence condition is satisfied.
As can be seen from the above description, in this embodiment, all the parameter optimization module needs to do is determine the BO parameter value corresponding to the minimum power consumption value. Thus, its mathematical form can be expressed as the following equation (3):
wherein f (x) is the minimum power consumption value, x * For the BO parameter value to be determined corresponding to f (X), X is the above-mentioned initialization data set, and X is the strategy selected from the initialization data setParameter values.
It is understood that, for the initialization data set, the power consumption value corresponding to the parameter value is included in addition to the optional policy parameter value, so as to facilitate determining whether the iteration result meets the convergence condition.
In addition, for specific implementation details of determining the BO parameter values based on the above listed proxy model and the collection function and based on the bayesian optimization method, reference may be made to specific documents of each proxy model and the collection function, which are not repeated herein.
In order to describe the beneficial effects of the method for reducing power consumption provided by the embodiment of the present application in detail, the following description is made by comparing with the related art.
Referring to fig. 10, wherein the abscissa indicates the number of iterations; the ordinate represents the power consumption value corresponding to each group of strategy parameter values; after each small dot represents a set of strategy parameter values, the terminal equipment works based on the corresponding power consumption values of the strategy parameter values; the dotted line, namely Baseline in the figure, is a power consumption value corresponding to a default parameter value set by a worker through experience; the curve shows that the sliding window size is 120, and the calculated sliding average value, namely, the power consumption value of every 120 parameters is taken as an average value; x represents the optimal solution (i.e., lowest power consumption value) obtained by the current iteration; the line where x is located represents a curve where the determined optimal solution is located based on a bayesian optimization method.
With continued reference to FIG. 10, by way of example, if an iteration is first performed, the optimal solution in the initial case is BO_1 in the graph. Accordingly, if bo_2 is found to be less than bo_1 during the iteration, bo_2 is referred to as the new optimal solution. If the power consumption values of two adjacent iteration processes always show a decreasing trend, iteration can be performed until the power consumption value is not greater than a preset power consumption threshold value, or the difference value corresponding to the adjacent power consumption value meets a set requirement, iteration can be ended, and the parameter value corresponding to the power consumption value is determined to be the BO parameter value. As shown in fig. 10, from the position of bo_13, the power consumption value outputted in the subsequent iteration is also bo_13, and in this case, the lowest power consumption value can be determined and obtained, and accordingly, the parameter value corresponding to bo_13 is the BO parameter value.
As can be seen from fig. 10, according to the method for reducing power consumption provided by the embodiment of the present application, the determined power consumption value corresponding to the BO parameter value is mostly lower than the power consumption value corresponding to the default parameter value determined empirically by the staff. The power consumption values on the lines including bo_2 to bo_13, and bo_13 as shown in the drawing are lower than the power consumption values corresponding to the default parameter values empirically determined by the worker.
Through screening, in the method for reducing power consumption provided by the embodiment of the application under the condition of strictly meeting the frame rate requirement of the terminal equipment, 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 through experience.
Therefore, based on the method for reducing power consumption provided by the embodiment of the application, the automatic adjustment of parameters required by the operation of the terminal equipment can be realized under the condition of not depending on manual experience, so that the power consumption of the whole machine is reduced as much as possible on the premise that the terminal equipment meets the performance requirement.
It should be understood that the above description is only an example for better understanding of the technical solution of the present embodiment, and is not the only limitation of the present embodiment.
Furthermore, it is to be understood that the terminal device, in order to implement the above-described functions, comprises corresponding hardware and/or software modules for performing the respective functions. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In addition, it should be noted that, in an actual application scenario, the method for reducing power consumption provided in the foregoing embodiments implemented by the terminal device may also be performed by a chip system included in the terminal device, where the chip system may include a processor. The chip system may be coupled to a memory such that the chip system, when running, invokes a computer program stored in the memory, implementing the steps performed by the terminal device. The processor in the chip system can be an application processor or a non-application processor.
In addition, an embodiment of the present application further provides a computer readable storage medium, where computer instructions are stored, which when executed on a terminal device, cause the terminal device to execute the related method steps to implement the method for reducing power consumption in the foregoing embodiment.
In addition, the embodiment of the application also provides a computer program product, which when being run on the terminal equipment, causes the terminal equipment to execute the related steps so as to realize the method for reducing the power consumption in the embodiment.
In addition, embodiments of the present application also provide a chip (which may also be a component or module) that may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the related method steps to implement the method for reducing power consumption in the above embodiment, so as to control the receiving pin to receive signals, and control the transmitting pin to transmit signals.
In addition, as can be seen from the above description, the terminal device, the computer-readable storage medium, the computer program product or the chip provided by the embodiments of the present application are used to execute the corresponding methods provided above, so that the advantages achieved by the method can refer to the advantages in the corresponding methods provided above, and are not repeated herein.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (13)

1. A method of reducing power consumption, comprising:
loading a first parameter value which is determined to be suitable for the current state based on a Bayesian optimization method when the terminal equipment is in a starting-up state;
the terminal equipment generates a power consumption value based on the first parameter value when running and is smaller than a power consumption value based on the second parameter value when running;
The second parameter value is empirically set.
2. The method of claim 1, wherein loading the first parameter value for the current state determined based on a bayesian optimization method comprises:
acquiring a current first frame rate of a screen of the terminal equipment;
acquiring a second frame rate of a service requirement currently corresponding to the terminal equipment;
and loading a first parameter value which is determined to be suitable for the current state based on a Bayesian optimization method when the first frame rate is matched with the second frame rate.
3. The method according to claim 2, wherein the method further comprises:
and when the first frame rate is not matched with the second frame rate, loading the second parameter value, and when the terminal equipment executes the service based on the second parameter value, enabling the frame rate of the screen of the terminal equipment to meet the frame rate of any service requirement.
4. The method of claim 1, wherein the first parameter value is determined by a server;
the loading of the first parameter value suitable for the current state, which is determined based on a Bayesian optimization method, comprises the following steps:
obtaining the first parameter value from the server;
the first parameter value is loaded upon acquisition of the first parameter value from the server.
5. The method according to claim 4, wherein the method further comprises:
the second parameter value is loaded when the first parameter value is not acquired from the server.
6. The method according to claim 1, characterized in that the first parameter value is determined by the terminal device;
the loading of the first parameter value suitable for the current state, which is determined based on a Bayesian optimization method, comprises the following steps:
and directly searching the first parameter value from a storage path of the terminal equipment, and loading the first parameter value after searching the first parameter value.
7. The method according to any one of claims 1 to 6, wherein after said loading of the first parameter value adapted to the current state determined based on a bayesian optimization method, the method further comprises:
a process of executing a service at the terminal equipment based on the first parameter value, and periodically acquiring a current first frame rate of a screen of the terminal equipment;
when the first frame rate is matched with a second frame rate of a service requirement currently corresponding to the terminal equipment, continuing to execute the service based on the first parameter value;
and when the first frame rate is not matched with the second frame rate, adjusting the first parameter value to the second parameter value.
8. The method of any of claims 1 to 6, wherein the first parameter value comprises a parameter value corresponding to a CPU core number, a parameter value corresponding to a CPU frequency, a parameter value corresponding to a DDR frequency, and a parameter value corresponding to a mask.
9. The method according to any one of claims 1 to 6, wherein the service currently executed by the terminal device is a shooting service;
the loading of the first parameter value suitable for the current state, which is determined based on a Bayesian optimization method, comprises the following steps:
determining a shooting mode corresponding to the shooting service;
determining all scenes which can be included in the shooting mode, wherein the scenes comprise a first scene and a second scene, the scene currently being operated by the terminal equipment is the first scene, and the second scene is not operated;
and loading a first parameter value required by simultaneous operation of the first scene and the second scene.
10. The method according to claim 9, wherein the method further comprises:
only the first parameter values required for the first scene job are loaded.
11. A terminal device, characterized in that the terminal device comprises: a memory and a processor, the memory and the processor coupled; the memory stores program instructions that, when executed by the processor, cause the terminal device to perform the method of reducing power consumption of any of claims 1 to 10.
12. The server is used for determining a first parameter value suitable for the terminal equipment based on a Bayesian optimization method, and sending the first parameter value to the terminal equipment;
the terminal equipment generates a power consumption value based on the first parameter value when running and is smaller than a power consumption value based on the second parameter value when running;
the second parameter value is empirically set.
13. A computer readable storage medium comprising a computer program which, when run on a terminal device, causes the terminal device to perform the method of reducing power consumption according to any of claims 1 to 10.
CN202310438057.9A 2023-04-14 2023-04-14 Method, device, server and storage medium for reducing power consumption Pending CN117130460A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310438057.9A CN117130460A (en) 2023-04-14 2023-04-14 Method, device, server and storage medium for reducing power consumption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310438057.9A CN117130460A (en) 2023-04-14 2023-04-14 Method, device, server and storage medium for reducing power consumption

Publications (1)

Publication Number Publication Date
CN117130460A true CN117130460A (en) 2023-11-28

Family

ID=88860579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310438057.9A Pending CN117130460A (en) 2023-04-14 2023-04-14 Method, device, server and storage medium for reducing power consumption

Country Status (1)

Country Link
CN (1) CN117130460A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221654A (en) * 2020-01-06 2020-06-02 北京小米移动软件有限公司 Method and device for adjusting working frequency of scheduler and storage medium
CN113032367A (en) * 2021-03-24 2021-06-25 安徽大学 Dynamic load scene-oriented cross-layer configuration parameter collaborative tuning method and system for big data system
CN115718536A (en) * 2023-01-09 2023-02-28 苏州浪潮智能科技有限公司 Frequency modulation method and device, electronic equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221654A (en) * 2020-01-06 2020-06-02 北京小米移动软件有限公司 Method and device for adjusting working frequency of scheduler and storage medium
CN113032367A (en) * 2021-03-24 2021-06-25 安徽大学 Dynamic load scene-oriented cross-layer configuration parameter collaborative tuning method and system for big data system
CN115718536A (en) * 2023-01-09 2023-02-28 苏州浪潮智能科技有限公司 Frequency modulation method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN111813536B (en) Task processing method, device, terminal and computer readable storage medium
CN113553130B (en) Method for executing drawing operation by application and electronic equipment
CN114168065B (en) Method and device for adjusting memory configuration parameters
CN115292052B (en) Memory recycling method, electronic device and computer readable storage medium
WO2020042112A1 (en) Terminal and method for evaluating and testing ai task supporting capability of terminal
EP4181498A1 (en) Photographing method and electronic device
CN117130773A (en) Resource allocation method, device and equipment
CN116315667B (en) Data transmission method, device, equipment and storage medium
CN116048933A (en) Fluency detection method
CN116700601B (en) Memory optimization method, equipment and storage medium
CN115729684B (en) Input/output request processing method and electronic equipment
CN114461589B (en) Method for reading compressed file, file system and electronic equipment
CN114077529B (en) Log uploading method and device, electronic equipment and computer readable storage medium
CN117130460A (en) Method, device, server and storage medium for reducing power consumption
CN117726929A (en) Image processing method and device
CN116662150B (en) Application starting time-consuming detection method and related device
CN117221713B (en) Parameter loading method and electronic equipment
CN116688494B (en) Method and electronic device for generating game prediction frame
CN117097883B (en) Frame loss fault cause determining method, electronic equipment and storage medium
CN115706753B (en) Application management method and device, electronic equipment and storage medium
WO2024046010A1 (en) Interface display method, and device and system
WO2024087840A1 (en) Resource management and control method and apparatus, chip, electronic device, and medium
WO2024045841A1 (en) Storage method and apparatus, and electronic device
CN115994007A (en) Animation effect display method and electronic equipment
CN117950846A (en) Resource scheduling method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination