CN116804891A - Power consumption control method and device, electronic equipment and storage medium - Google Patents

Power consumption control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116804891A
CN116804891A CN202210270164.0A CN202210270164A CN116804891A CN 116804891 A CN116804891 A CN 116804891A CN 202210270164 A CN202210270164 A CN 202210270164A CN 116804891 A CN116804891 A CN 116804891A
Authority
CN
China
Prior art keywords
camera
target terminal
operation parameter
power consumption
target
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
CN202210270164.0A
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.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology 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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202210270164.0A priority Critical patent/CN116804891A/en
Publication of CN116804891A publication Critical patent/CN116804891A/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/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • 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

Abstract

The embodiment of the disclosure discloses a power consumption control method, a device, an electronic device and a storage medium, wherein the method comprises the following steps: when the camera application is detected to be started, determining a camera operation parameter set matched with the target terminal according to the performance level of the target terminal, wherein the camera operation parameter set comprises at least one operation parameter; controlling the camera application to run on the target terminal based on the camera running parameter set; wherein the camera applications have different power consumption when running on target terminals of different performance levels. The method and the device achieve the purpose of reducing the power consumption brought to the target terminal when the camera application runs.

Description

Power consumption control method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of information technology, and in particular, to a power consumption control method, a device, an electronic device and a storage medium.
Background
With the rapid development of network technology and mobile terminal technology, more and more camera-related applications that adapt to mobile terminals are emerging. Such as a video application, based on which a user can record video or take images through a camera. For example, an editing class application, based on which a user can complete self-photographing through a camera and edit a photographed image.
Therefore, the application program related to the camera becomes one of application programs that causes the battery power consumption of the mobile terminal to be faster. How to reduce the power consumption of camera-related applications is a technical problem to be solved.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, embodiments of the present disclosure provide a power consumption control method, apparatus, electronic device, and storage medium, which achieve the purpose of reducing power consumption caused by camera applications.
The embodiment of the disclosure provides a power consumption control method, which comprises the following steps:
when the camera application is detected to be started, determining a camera operation parameter set matched with the target terminal according to the performance level of the target terminal, wherein the camera operation parameter set comprises at least one operation parameter;
controlling the camera application to run on the target terminal based on the camera running parameter set;
wherein the camera applications have different power consumption when running on target terminals of different performance levels.
The embodiment of the disclosure also provides a power consumption control device, which comprises:
the first determining module is used for determining a camera operation parameter set matched with the target terminal according to the performance level of the target terminal when the camera application is detected to be started, wherein the camera operation parameter set comprises at least one operation parameter;
The control module is used for controlling the camera application to run on the target terminal based on the camera running parameter set;
wherein the camera applications have different power consumption when running on target terminals of different performance levels.
The embodiment of the disclosure also provides an electronic device, which comprises:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the power consumption control method as described above.
The disclosed embodiments also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the power consumption control method as described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has at least the following advantages: according to the power consumption control method provided by the embodiment of the disclosure, the operation parameters of the camera application are configured for the target terminal in a personalized manner according to the performance level of the target terminal, so that the power consumption of the camera application in operation can be reduced, and the power consumption of the target terminal is reduced.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of a power consumption control method in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a power consumption control method in an embodiment of the disclosure;
FIG. 3 is a schematic diagram of a power consumption control method in an embodiment of the disclosure;
FIG. 4 is a schematic diagram of a power consumption control device according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Typically, the power consumption is expressed as the current consumption at rated voltage, and the unit can be milliamp mA or microampere uA; and in particular to the current drawn on the terminal battery. The mobile terminal (for example, a smart phone) mainly has components such as WLAN, bluetooth, GPS (Global Positioning System, global satellite positioning system), display screen, CPU (Central Processing Unit ), sensor, camera, flash lamp, etc. as power consumption sources. The excessive power consumption can cause the problems of excessive power consumption, body heating and the like of the mobile phone.
Wherein the camera application is one of the components with higher power consumption. The use experience of a user when using a camera application is controlled by a variety of camera operating parameters, several of which have a significant impact on the use experience as well as power consumption are described below.
The camera frame rate is a camera operating parameter that means the number of image frames acquired per second by the camera. The highest camera frame rate supported by a typical terminal is 30 frames/second. The rendering frame rate is a parameter closely associated with the camera and represents the number of image frames drawn per second of the screen, i.e. for displaying the image captured by the camera. For special effect camera applications, complex processes such as face recognition, a graph repair algorithm, a sticker, a filter and the like are usually required to be performed on an original image frame acquired by a camera, and the partial processes are usually time-consuming and occupy a large amount of resources of a CPU (Central Processing Unit ) and a GPU (Graphic Processing Unit, graphics processor), so that it is more necessary to reduce power consumption related to the camera by a certain technical means for special effect camera applications.
Camera resolution is another camera operating parameter, meaning that the higher the resolution, the more complete the image detail remains, and the better the preview experience, but the corresponding increase in the number of pixels processed per frame results in more system resources being consumed.
Thus, when the camera application is running, the main power consumption is derived from the consumption of the CPU and GPU in the system camera and in the image processing process. In view of this, the embodiments of the present disclosure provide a power consumption control method, which aims to reduce power consumption caused by a camera application, and at the same time ensure a use experience when a user uses a camera (e.g., ensure smoothness when the camera application runs, sharpness of a shot picture, etc.).
Fig. 1 is a flowchart of a power consumption control method in an embodiment of the present disclosure. The method may be performed by a power consumption control device, which may be implemented in software and/or hardware, where the device may be configured in an electronic device, such as a mobile terminal, including, but not limited to, a smart phone, a palm top computer, a tablet computer, a wearable device with a display screen, a desktop computer, a notebook computer, an all-in-one machine, a smart home device, and the like.
As shown in fig. 1, the method specifically may include:
And 110, when the camera application is detected to be started, determining a camera operation parameter set adapted to the target terminal according to the performance level of the target terminal, wherein the camera operation parameter set comprises at least one operation parameter.
The target terminal in the embodiment of the disclosure has a shooting function. After the camera application is started, a preview interface appears on a display screen of the target terminal, and objects in the shooting range of the camera can be determined through the preview interface.
Optionally, the performance level of the target terminal may be determined by a model of the target terminal. The processing performance of the target terminal can be determined according to the model of the target terminal, the target terminal can be divided into different performance levels according to the processing performance, for example, the target terminal with higher processing performance corresponds to a first-level performance level, the target terminal with middle processing performance corresponds to a second-level performance level, and the target terminal with lower processing performance corresponds to a third-level performance level. It will be appreciated that the processing power of the CPU of the target terminal corresponding to the primary performance level is typically relatively high.
The performance level of the target terminal may be obtained by a setting logic each time the camera application start is detected; or the camera application start-up is detected for the first time, the performance level of the target terminal is stored after being acquired through the setting logic acquisition, and when the camera application start-up is detected again, the stored performance level is directly read and is not acquired through the setting logic. It will be appreciated that reading already stored data consumes less system resources than retrieving data by the set logic. Therefore, when the camera application is detected to start for the first time, the camera application is acquired in real time through the setting logic, after the performance level of the target terminal is acquired, the performance level is stored, when the camera application is detected to start again, the stored performance level is directly read, and the purpose of reducing the system resource consumption can be achieved without acquiring the stored performance level in real time through the setting logic. On the other hand, the performance level of the target terminal is a relatively stable data, which does not substantially change over a long period of time, even over the entire life cycle of the target terminal. Therefore, the performance level of the target terminal is obtained only once through the setting logic, and the method has strong executable performance.
In the special effect camera application (the special effect camera application refers to an application that performs some special effect processing on an image when the image is shot, for example, identifies a face, adjusts brightness, or adds a filter to perform further processing on the image), taking a camera frame rate as an example, since a large system resource is consumed in rendering the image or performing special effect processing on the image, even if a high camera frame rate, for example, 30fps is set in a target terminal with low processing performance, the rendering frame rate cannot reach 30fps, so that the waste of the camera frame rate is caused, and meanwhile, a high camera frame rate causes high power consumption. Based on the above, in the technical solution of the embodiment of the present disclosure, the camera operation parameters are set pertinently according to the performance level of the target terminal, so as to achieve the purpose of reducing power consumption without reducing the use experience of the user.
Wherein the camera operating parameter set includes at least one operating parameter. The operating parameters include, but are not limited to, camera frame rate, camera resolution, anti-shake parameters, auto-focus parameters, and the like. Each operating parameter corresponds to a preset value range or a set of selectable data, which is related to the performance level of the target terminal. For example, the predetermined range of values corresponding to the camera frame rate may be [15,20], and the set of selectable data corresponding to the camera resolution may be {1536×2048,1920×2560}, for example. The upper limit of the value of each operation parameter is the upper limit of the value which can be supported or competed by the target terminal, and can be understood as the upper limit of the processing performance of the target terminal; the lower limit of the value of each operation parameter indicates that the processing performance of the target terminal can be better played, and the value of the target terminal cannot be damaged for the use experience of a user. Taking the camera frame rate as an example, on a target terminal with low processing performance, since an algorithm, rendering task, and the like associated with the camera consume a large amount of system resources, even if the camera frame rate is set to 30fps, the rendering frame rate can only reach 20fps at the highest, and therefore the upper limit of the processing performance of the target terminal is 20fps. When the frame rate of the camera is set to be the upper limit of 20fps, the smoothness of images seen by a user is higher, but the target terminal generates heat and has serious power consumption; if the camera frame rate is set to the lower limit of 15fps, the smoothness is impaired (at the visual level, the user does not normally feel the impairment and thus has no influence on the user's experience), but the target terminal heat generation and power consumption can be greatly reduced.
For example, reference is made to a camera operation parameter set adapted to target terminals with different performance levels as shown in table 1 below, where a preset value range corresponding to an operation parameter may be stored together with the camera operation parameter set, as shown in table 1, or may be stored separately and independently from the camera operation parameter set.
Based on the following table 1, the determining a set of camera operation parameters adapted to the target terminal according to the performance level includes:
and determining a camera operation parameter set adapted to the target terminal based on a mapping relation between a preset performance level and the camera operation parameter set.
Table 1: camera operation parameter set adapted to target terminals of different performance levels
Step 120, controlling the camera application to run on the target terminal based on the camera running parameter set; wherein the camera applications have different power consumption when running on target terminals of different performance levels.
Specifically, the target value of the operation parameter may be determined according to a preset value range corresponding to the operation parameter in the camera operation parameter set. A specific value in the preset value range may be selected as the target value, for example, a maximum value in the preset value range is selected, a minimum value in the preset value range is selected, or an intermediate value in the preset value range is selected, etc.
Optionally, a specific value within the preset value range may be dynamically selected as the target value, for example, a notification is displayed to the user first in a pop-up window manner, the user determines which value to select based on the notification, and then a specific value is selected according to the user's selection.
Further, the specific value may be dynamically determined from a preset value range based on the current resource consumption condition of the target terminal as the target value of the operation parameter.
Illustratively, the controlling the camera application to run at the target terminal based on the camera running parameter set includes: determining a target value of the operation parameters in the camera operation parameter set according to the current resource consumption information of the target terminal; and controlling the camera application to run on the target terminal based on the target value.
The current resource consumption information of the target terminal includes, but is not limited to: the remaining capacity of the battery, the memory occupancy rate, the CPU occupancy rate and the like.
Further, the determining, according to the current resource consumption information of the target terminal, the target value of the operation parameter in the camera operation parameter set includes: acquiring the current residual electric quantity of the target terminal; and determining a target value of the operation parameter according to the residual electric quantity and a preset value range of the operation parameter, wherein the preset value range is related to the performance level of the target terminal, and the lower the residual electric quantity is, the lower the power consumption of the camera application when the target terminal operates based on the target value is.
When the residual electric quantity is relatively large, the operation parameter value which can obtain high fluency is selected as much as possible, and when the residual electric quantity is relatively low, the power consumption is reduced as much as possible, and the operation parameter value with relatively small power consumption is selected.
In one embodiment, the determining the target value of the operation parameter according to the remaining power and the preset value range of the operation parameter includes: when the residual electric quantity is lower than a preset degradation threshold value, determining a target value of the operation parameter as a minimum value in the preset value range; and when the residual electric quantity is higher than the preset degradation threshold value, determining the target value of the operation parameter as the maximum value in the preset value range.
Alternatively, the target value of the corresponding operation parameter may be determined according to a difference value that the remaining power is lower than a preset degradation threshold. For example, the performance level of the target terminal is one level, the current remaining power is 60%, the preset degradation threshold is 45%, the operation parameter corresponding to the preset degradation threshold 45% is the camera frame rate, the preset value range of the camera frame rate is [25,30], the difference value of the remaining power 60% higher than 45% is 15%, and at this time, the camera frame rate can be set to any value greater than 25 and less than 30, for example, 28; if the remaining power is 90%, the camera frame rate may be set to 29 or the like. In other words, when the remaining electric power is higher than the preset threshold value, the maximum value in the preset value range is not necessarily selected as the target value.
It should be noted that the preset degradation thresholds corresponding to different kinds of operation parameters are different, and the preset degradation threshold is determined based on the influence coefficient of the corresponding operation parameter on power consumption.
For example, reference is made to the types of operating parameters corresponding to different preset degradation thresholds as shown in table 2.
Table 2: the operation parameter types corresponding to different preset degradation thresholds
Kind of operating parameters Presetting a degradation threshold
Camera frame rate <45%
Camera resolution <30%
Anti-shake <20%
Automatic focusing <20%
…… ……
The meaning of the above table 2 is: when the remaining power is lower than 45% but higher than 30%, the camera frame rate is adjusted, and the camera frame rate can be adjusted to be the minimum value in the value range, or one of the values larger than the minimum value in the value range and smaller than the maximum value in the value range is determined as the target value of the camera frame rate according to the difference between the current remaining power and 45%. When the remaining power is lower than 30% but higher than 20%, the resolution of the camera is adjusted in a similar manner to the frame rate of the camera, and the description is omitted. And when the residual electric quantity is lower than 20%, adjusting the anti-shake parameter and the automatic focusing parameter.
According to the power consumption control method provided by the embodiment of the disclosure, in the use process of the camera application, the camera operation parameters are configured for the target terminal in a personalized manner according to the performance level of the target terminal, so that the purpose of reducing the power consumption of the camera in operation can be achieved, the power consumption of the target terminal is reduced, and the use experience of a user is ensured.
In summary, on the basis of the foregoing embodiment, referring to a flow chart of a power consumption control method as shown in fig. 2, the method specifically includes the following steps:
when the camera application is detected to be started for the first time, the performance level of the target terminal is acquired, and the performance level is stored, so that the camera application can be conveniently and directly read when the subsequent camera application is started again.
Determining a camera operation parameter set of the adaptive target terminal according to the performance level of the target terminal when the camera application is detected to be started each time; then obtaining the current residual electric quantity of the target terminal; determining a specific value, namely a target value, of each operation parameter according to the residual electric quantity; the control camera application is run based on the target value.
Further, the obtaining the current remaining power of the target terminal includes:
and periodically acquiring the current residual electric quantity of the target terminal according to a preset frequency. For example, collecting the current residual electric quantity every 60s, if the residual electric quantity is lower than a preset degradation threshold (for example, 45%), checking whether various types of parameters in a camera operation parameter set fall into a degradation interval one by one, and if so, dynamically reducing the value of the parameters; otherwise, if the residual electric quantity is higher than the preset degradation threshold value, the value of the corresponding parameter is adjusted upwards.
For example, referring to a flowchart for dynamically adjusting camera operation parameters as shown in fig. 3, when a camera application is detected to be started, the remaining power of the target terminal is detected every 60s, if the remaining power is lower than a preset degradation threshold, the parameters falling in the degradation interval are adjusted down, otherwise, the parameters not falling in the degradation interval are adjusted up. Wherein the camera frame callback represents the process of obtaining the image frame by the camera application adjusted parameters.
For example, if the detected residual electric quantity for the first time is 40% and is lower than the preset degradation threshold value by 45%, the parameter-camera frame rate corresponding to the preset degradation threshold value by 45% is adjusted to be a lower limit value in the value range; assuming that the target terminal is in a charging state during the period, when the detected residual power becomes 50% in the third time and is higher than the preset degradation threshold value by 45%, the camera frame rate which is adjusted down before is adjusted up, and the camera frame rate is restored to the upper limit value in the value range. By dynamically adjusting the camera operation parameters matched with the target terminal, the purpose of reducing power consumption can be achieved, the processing performance of the target terminal can be reasonably utilized, the phenomenon that the target terminal seriously heats is relieved, and the purpose of prolonging the service life of the target terminal is achieved; and the use experience of the user can be ensured.
Fig. 4 is a schematic structural diagram of a power consumption control device in an embodiment of the disclosure. The power consumption control device provided by the embodiment of the disclosure can be configured in a mobile terminal. As shown in fig. 4, the power consumption control apparatus specifically includes: a first determination module 410 and a control module 420.
Wherein, the first determining module 410 is configured to determine, when it is detected that the camera application is started, a camera operation parameter set adapted to the target terminal according to the performance level of the target terminal, where the camera operation parameter set includes at least one operation parameter; a control module 420, configured to control the camera application to run at the target terminal based on the camera running parameter set; wherein the camera applications have different power consumption when running on target terminals of different performance levels.
Optionally, the control module 420 includes:
a determining unit, configured to determine a target value of an operation parameter in the camera operation parameter set according to current resource consumption information of the target terminal; and the control unit is used for controlling the camera application to run on the target terminal based on the target value.
Optionally, the determining unit includes: an obtaining subunit, configured to obtain a current remaining power of the target terminal; and the determining subunit is used for determining a target value of the operation parameter according to the residual electric quantity and a preset value range of the operation parameter, wherein the preset value range is related to the performance level of the target terminal, and the lower the residual electric quantity is, the lower the power consumption of the camera application when the target terminal operates based on the target value is.
Optionally, the determining subunit is specifically configured to: when the residual electric quantity is lower than a preset degradation threshold value, determining a target value of the operation parameter as a minimum value in the preset value range; and when the residual electric quantity is higher than the preset degradation threshold value, determining the target value of the operation parameter as the maximum value in the preset value range.
Optionally, the preset degradation thresholds corresponding to different kinds of operation parameters are different, and the preset degradation thresholds are determined based on the influence coefficient of the corresponding operation parameters on power consumption.
Optionally, the acquiring subunit is specifically configured to: and periodically acquiring the current residual electric quantity of the target terminal according to a preset frequency.
Optionally, the operating parameters include at least one of:
camera frame rate, camera resolution, anti-shake parameters, and focus parameters.
Optionally, the first determining module 410 is specifically configured to: and determining a camera operation parameter set adapted to the target terminal based on a mapping relation between a preset performance level and the camera operation parameter set.
Optionally, the power consumption control device further includes: and the second determining module is used for determining the performance level of the target terminal when the camera application is detected to be started for the first time.
According to the power consumption control device provided by the embodiment of the disclosure, in the use process of the camera application, the camera operation parameters are configured for the target terminal in a personalized manner according to the performance level of the target terminal, so that the purpose of reducing the power consumption of the camera in operation can be achieved, the power consumption of the target terminal is reduced, and the use experience of a user is ensured. By dynamically adjusting the camera operation parameters matched with the target terminal, the purpose of reducing power consumption can be achieved, the processing performance of the target terminal can be reasonably utilized, the phenomenon that the target terminal seriously heats is relieved, and the purpose of prolonging the service life of the target terminal is achieved; and the use experience of the user can be ensured.
The power consumption control device provided by the embodiment of the present disclosure may perform steps in the power consumption control method provided by the embodiment of the present disclosure, and the performing steps and the beneficial effects are not described herein.
Fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the disclosure. Referring now in particular to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 500 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, and the like, and fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, an electronic device 500 may include a processing means (e.g., a central processor, a graphics processor, etc.) 501 that may perform various suitable actions and processes to implement methods of embodiments as described in the present disclosure, according to programs stored in a Read Only Memory (ROM) 502 or loaded from a storage 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program containing program code for performing the method shown in the flowchart, thereby implementing the power consumption control method as described above. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: when the camera application is detected to be started, determining a camera operation parameter set matched with the target terminal according to the performance level of the target terminal, wherein the camera operation parameter set comprises a value range of parameters; determining a target value of the parameter according to a value range of the parameter based on a preset rule; controlling the camera application to run on the target terminal based on the target value; wherein the lower the performance level of the target terminal, the lower the power consumption of the camera application when the target terminal is running based on the target value.
Alternatively, the electronic device may perform other steps described in the above embodiments when the above one or more programs are executed by the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, the present disclosure provides a power consumption control method including: when the camera application is detected to be started, determining a camera operation parameter set matched with the target terminal according to the performance level of the target terminal, wherein the camera operation parameter set comprises at least one operation parameter; controlling the camera application to run on the target terminal based on the camera running parameter set; wherein the camera applications have different power consumption when running on target terminals of different performance levels.
According to one or more embodiments of the present disclosure, in the power consumption control method provided in the present disclosure, optionally, the controlling, based on the camera operation parameter set, the camera application to operate at the target terminal includes: determining a target value of the operation parameters in the camera operation parameter set according to the current resource consumption information of the target terminal; and controlling the camera application to run on the target terminal based on the target value.
According to one or more embodiments of the present disclosure, in the power consumption control method provided by the present disclosure, optionally, the determining, according to current resource consumption information of the target terminal, a target value of an operation parameter in the camera operation parameter set includes: acquiring the current residual electric quantity of the target terminal; and determining a target value of the operation parameter according to the residual electric quantity and a preset value range of the operation parameter, wherein the preset value range is related to the performance level of the target terminal, and the lower the residual electric quantity is, the lower the power consumption of the camera application when the target terminal operates based on the target value is.
According to one or more embodiments of the present disclosure, in the power consumption control method provided by the present disclosure, optionally, the determining the target value of the operation parameter according to the remaining power and the preset value range of the operation parameter includes: when the residual electric quantity is lower than a preset degradation threshold value, determining a target value of the operation parameter as a minimum value in the preset value range; and when the residual electric quantity is higher than the preset degradation threshold value, determining the target value of the operation parameter as the maximum value in the preset value range.
According to one or more embodiments of the present disclosure, in the power consumption control method provided by the present disclosure, optionally, the preset degradation threshold corresponding to different kinds of operation parameters is different, and the preset degradation threshold is determined based on an influence coefficient of the corresponding operation parameter on power consumption.
According to one or more embodiments of the present disclosure, in the power consumption control method provided by the present disclosure, optionally, the obtaining the current remaining power of the target terminal includes: and periodically acquiring the current residual electric quantity of the target terminal according to a preset frequency.
In accordance with one or more embodiments of the present disclosure, in the power consumption control method provided by the present disclosure, optionally, the parameter includes at least one of: camera frame rate, camera resolution, anti-shake parameters, and focus parameters.
According to one or more embodiments of the present disclosure, in the power consumption control method provided by the present disclosure, optionally, the determining, according to the performance level, a set of camera operation parameters adapted to the target terminal includes: and determining a camera operation parameter set adapted to the target terminal based on a mapping relation between a preset performance level and the camera operation parameter set.
According to one or more embodiments of the present disclosure, in the power consumption control method provided by the present disclosure, optionally, the obtaining the current remaining power of the target terminal includes: and periodically acquiring the current residual electric quantity of the target terminal according to a preset frequency.
According to one or more embodiments of the present disclosure, in the power consumption control method provided in the present disclosure, optionally, further includes: the performance level of the target terminal is determined when a camera application start is first detected.
According to one or more embodiments of the present disclosure, the present disclosure provides a power consumption control apparatus including: the first determining module is used for determining a camera operation parameter set matched with the target terminal according to the performance level of the target terminal when the camera application is detected to be started, wherein the camera operation parameter set comprises at least one operation parameter; the control module is used for controlling the camera application to run on the target terminal based on the camera running parameter set; wherein the camera applications have different power consumption when running on target terminals of different performance levels.
According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement any of the power consumption control methods as provided by the present disclosure.
According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a power consumption control method as any one of the present disclosure provides.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (12)

1. A power consumption control method applied to a target terminal, the method comprising:
when the camera application is detected to be started, determining a camera operation parameter set matched with the target terminal according to the performance level of the target terminal, wherein the camera operation parameter set comprises at least one operation parameter;
Controlling the camera application to run on the target terminal based on the camera running parameter set;
wherein the camera applications have different power consumption when running on target terminals of different performance levels.
2. The method of claim 1, wherein the controlling the camera application to run at the target terminal based on the camera running parameter set comprises:
determining a target value of the operation parameters in the camera operation parameter set according to the current resource consumption information of the target terminal;
and controlling the camera application to run on the target terminal based on the target value.
3. The method according to claim 2, wherein said determining the target value of the operating parameter in the camera operating parameter set according to the current resource consumption information of the target terminal comprises:
acquiring the current residual electric quantity of the target terminal;
and determining a target value of the operation parameter according to the residual electric quantity and a preset value range of the operation parameter, wherein the preset value range is related to the performance level of the target terminal, and the lower the residual electric quantity is, the lower the power consumption of the camera application when the target terminal operates based on the target value is.
4. A method according to claim 3, wherein said determining the target value of the operation parameter according to the remaining power and the preset range of values of the operation parameter comprises:
when the residual electric quantity is lower than a preset degradation threshold value, determining a target value of the operation parameter as a minimum value in the preset value range;
and when the residual electric quantity is higher than the preset degradation threshold value, determining the target value of the operation parameter as the maximum value in the preset value range.
5. The method of claim 4, wherein the preset degradation thresholds corresponding to different types of operating parameters are different, the preset degradation thresholds being determined based on coefficients of influence of the corresponding operating parameters on power consumption.
6. The method of claim 3, wherein the obtaining the current remaining power of the target terminal includes:
and periodically acquiring the current residual electric quantity of the target terminal according to a preset frequency.
7. The method of any one of claims 1-6, wherein the operating parameters include at least one of:
camera frame rate, camera resolution, anti-shake parameters, and focus parameters.
8. The method according to any of claims 1-6, wherein said determining a set of camera operating parameters adapted to the target terminal according to the performance level comprises:
and determining a camera operation parameter set adapted to the target terminal based on a mapping relation between a preset performance level and the camera operation parameter set.
9. The method of any one of claims 1-6, further comprising:
and determining the performance level of the target terminal when the camera application is detected to be started for the first time.
10. A power consumption control apparatus integrated in a target terminal, comprising:
the first determining module is used for determining a camera operation parameter set matched with the target terminal according to the performance level of the target terminal when the camera application is detected to be started, wherein the camera operation parameter set comprises at least one operation parameter;
the control module is used for controlling the camera application to run on the target terminal based on the camera running parameter set;
wherein the camera applications have different power consumption when running on target terminals of different performance levels.
11. An electronic device, the electronic device comprising:
One or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-9.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-9.
CN202210270164.0A 2022-03-18 2022-03-18 Power consumption control method and device, electronic equipment and storage medium Pending CN116804891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210270164.0A CN116804891A (en) 2022-03-18 2022-03-18 Power consumption control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210270164.0A CN116804891A (en) 2022-03-18 2022-03-18 Power consumption control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116804891A true CN116804891A (en) 2023-09-26

Family

ID=88078466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210270164.0A Pending CN116804891A (en) 2022-03-18 2022-03-18 Power consumption control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116804891A (en)

Similar Documents

Publication Publication Date Title
US11611715B2 (en) System and method for event camera data processing
CN108322663B (en) Photographing method, device, terminal and storage medium
CN109040523B (en) Artifact eliminating method and device, storage medium and terminal
CN104917973B (en) Dynamic exposure method of adjustment and its electronic device
CN112083787B (en) Application program operation mode switching method and device, electronic equipment and storage medium
CN110349107B (en) Image enhancement method, device, electronic equipment and storage medium
CN110647702B (en) Picture preloading method and device, electronic equipment and readable medium
CN113962859B (en) Panorama generation method, device, equipment and medium
CN112637517A (en) Video processing method and device, electronic equipment and storage medium
CN112289279B (en) Screen brightness adjusting method and device, storage medium and electronic equipment
CN113535032A (en) Information display method and device, electronic equipment and storage medium
CN114257815A (en) Video transcoding method, device, server and medium
CN114650361B (en) Shooting mode determining method, shooting mode determining device, electronic equipment and storage medium
CN112235563B (en) Focusing test method and device, computer equipment and storage medium
CN116804891A (en) Power consumption control method and device, electronic equipment and storage medium
CN115145525A (en) Screen brightness adjustment model training method and device, storage medium and electronic equipment
CN111263079B (en) Image processing method, image processing device, storage medium and electronic equipment
CN114125485A (en) Image processing method, apparatus, device and medium
CN112104812A (en) Method and device for acquiring picture
CN112040121B (en) Focusing method and device, storage medium and terminal
CN116939130A (en) Video generation method and device, electronic equipment and storage medium
CN117061821A (en) Video processing method, device, medium and electronic equipment
CN114374798A (en) Scene recognition method and device, electronic equipment and computer-readable storage medium
CN116055876A (en) Video processing method and device, electronic equipment and storage medium
CN116996666A (en) Video jamming detection method, device, equipment and medium

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