Display power consumption optimization method and electronic device
By detecting the matching degree of the frame rate and refresh rate in the LTPS screen device and implementing a power consumption control strategy, the problem of increased power consumption in the device is solved, and the battery life and power consumption management efficiency is improved.
Patent Information
- Application Number
- CN202411132111.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-08-19
Smart Images

Figure CN118658424B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of display technology, and in particular relates to a method for optimizing display power consumption, an electronic device, a chip system, a computer-readable storage medium, and a computer program product. Background Art
[0002] At present, active-matrix organic light emitting diode (AMOLED) screens have become the mainstream screens used in electronic devices such as mobile phones and tablets. There are two common refresh technologies for AMOLED screens, namely low temperature polysilicon and oxide (LTPO) technology and low temperature polysilicon (LTPS) technology. The most obvious difference between them is power consumption. LTPO technology can adjust the screen refresh rate according to the changes in the screen content. For example, it can be increased to 120Hz during the sliding process, and it can be gradually reduced to 10Hz or even 1Hz after the sliding stops, thereby greatly reducing the power consumption of the screen and improving the battery life of the mobile phone. In contrast, LTPS technology uses a fixed refresh rate or a graded refresh rate to display the picture, generally at high levels such as 60Hz, 90Hz, and 120Hz, which consumes more power and is not conducive to the battery life of the mobile phone.
[0003] In the related art, in electronic devices using LTPS screens, since the adjustable range of the screen refresh rate of the LTPS screen is limited and the display frame rate of the foreground application is variable depending on the actual usage scenario of the electronic device, it is easy for the display frame rate of the foreground application to not match the screen refresh rate, causing the graphics synthesizer (surfaceflinger, SF) in the electronic device to perform unnecessary commit operations or unnecessary synthesis operations during the synthesis and display process, resulting in high power consumption and reduced battery life of the electronic device. Summary of the invention
[0004] The embodiments of the present application provide a method for optimizing display power consumption, an electronic device, a chip system, a computer-readable storage medium, and a computer program product, which can solve the problem that in an electronic device using an LTPS screen, since the adjustable range of the screen refresh rate of the LTPS screen is limited and the display frame rate of the foreground application is variable according to the actual usage scenario of the electronic device, it is easy for the display frame rate of the foreground application to not match the screen refresh rate, thereby causing the SF in the electronic device to perform unnecessary commit operations or unnecessary synthesis operations during the synthesis and display process, resulting in high power consumption and reduced battery life of the electronic device.
[0005] In a first aspect, an embodiment of the present application provides a method for optimizing display power consumption, comprising: when a change is detected in a foreground application displayed on an electronic device, determining a current display scene corresponding to the electronic device according to each changed foreground application, wherein the screen of the electronic device is an LTPS screen; when the current display scene is a power consumption control scene, detecting whether the degree of matching between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the power consumption control conditions; when the degree of matching between the current display frame rate of at least one foreground application and the current screen refresh rate meets the power consumption control conditions, determining the display power consumption control strategy corresponding to the electronic device according to the current screen refresh rate and the current display frame rate of each foreground application; and performing power consumption control on the display process of the electronic device according to the display power consumption control strategy to reduce the display power consumption of the electronic device.
[0006] In this way, when the foreground application displayed on the electronic device is switched, it is timely detected whether the current display scene is a power consumption control scene, and whether there is a mismatch between the display frame rate of the foreground application and the screen display frame rate; and when the current display scene is a power consumption control scene and there is a mismatch between the display frame rate of the foreground application and the screen display frame rate, the power consumption of the display process of the electronic device is controlled according to the current display frame rate of each foreground application and the current screen refresh rate, thereby reducing the display power consumption of the electronic device and improving the battery life of the electronic device.
[0007] In a possible implementation of the first aspect, the detecting whether the current display frame rate of each foreground application matches the current screen refresh rate corresponding to the electronic device includes:
[0008] Detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition;
[0009] When the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition, determining that the current display frame rate of the first foreground application and the current screen refresh rate do not match, wherein the first foreground application is any foreground application;
[0010] When the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition, detecting whether the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition;
[0011] When the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition, determining that the current display frame rate of the first foreground application and the current screen refresh rate do not match;
[0012] When the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the second power consumption control condition, it is determined that the current display frame rate of the first foreground application matches the current screen refresh rate.
[0013] In this way, the pre-configured power consumption control conditions are used to determine whether the current display frame rate of each foreground application matches the current screen refresh rate, so as to detect whether there is any power consumption waste at present, and different power consumption waste scenarios are distinguished through different power consumption control conditions, thereby further improving the reliability and accuracy of power consumption control, further reducing the power consumption of electronic devices, and improving the battery life of electronic devices.
[0014] Optionally, in another possible implementation of the first aspect, the detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition includes:
[0015] Get the current screen refresh rate and the current display frame rate of each foreground application;
[0016] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0017] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0018] In this way, when the screen refresh rate of the electronic device is much higher than the display frame rate of at least one foreground application, the SF will not synthesize the buffer corresponding to the foreground application after committing it during the synthesis and display process, resulting in unnecessary commit operations and waste of power. Therefore, it is possible to measure whether the current screen display frame rate is much higher than the current display frame rate of a foreground application based on the ratio between the current screen refresh rate and the current display frame rate of each foreground application and the set first threshold. That is, when the ratio between the current screen refresh rate and the current display frame rate of a foreground application is greater than the first threshold, it can be determined that the current screen refresh rate is much higher than the current display frame rate of the foreground application, that is, it meets the first power consumption control condition, so that the display process of the electronic device can be controlled for power consumption to eliminate or reduce the power consumption waste caused by unnecessary commit operations and improve the battery life of the electronic device.
[0019] Optionally, in another possible implementation of the first aspect, the detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition includes:
[0020] Count the number of commit operations of SF on the buffer corresponding to each foreground application and the number of synthesis of the image frames to be sent and displayed in the buffer corresponding to each foreground application within the preset detection time;
[0021] When the ratio of the number of synthesis times to the number of commit operations corresponding to the first foreground application is greater than or equal to the second threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0022] When the ratio of the number of synthesis times and the number of commit operations corresponding to the first foreground application is less than the second threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0023] In this way, when the screen refresh rate of the electronic device is much higher than the display frame rate of at least one foreground application, the SF will not synthesize the buffer corresponding to the foreground application after committing it during the synthesis and display process, resulting in unnecessary commit operations and waste of power. Therefore, whether the current screen display frame rate is much higher than the current display frame rate of a foreground application can be measured based on whether the number of commit operations performed by SF on the buffer corresponding to the foreground application within a period of time is aligned with the number of synthesis operations. When the ratio between the number of commit operations performed by SF on the buffer corresponding to a foreground application and the number of synthesis operations is greater than the second threshold, it is determined that the current screen refresh rate is much higher than the current display frame rate of the foreground application, that is, it meets the first power consumption control condition, and then the display process of the electronic device can be controlled for power consumption to eliminate or reduce the power consumption waste caused by unnecessary commit operations and improve the battery life of the electronic device.
[0024] Optionally, in another possible implementation of the first aspect, the detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition includes:
[0025] When at least one foreground application calls the hardware decoder, obtain the current screen refresh rate and the decoding frame rate of the hardware decoder;
[0026] When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0027] When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is less than the first threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0028] In this way, since the electronic device displays multiple foreground applications at the same time, and there is a foreground application displayed in a suspended display manner such as picture-in-picture, smart capsule, etc., the display frame rate of the foreground application in the suspended display will usually drop to a lower level, resulting in a screen refresh rate that is much higher than the display frame rate of the foreground application in the suspended display, and the foreground applications in the suspended display such as picture-in-picture, smart capsule, etc. usually call the hardware decoder, and the decoding frame rate of the hardware decoder is the display frame rate of the foreground application. Therefore, when there is a foreground application calling the hardware decoder, the decoding frame rate of the hardware decoder can be used as the display frame rate of the foreground application to reduce the convenience and reliability of the display frame rate acquisition of the foreground application. Further, when the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder called by a foreground application is greater than the first threshold, it can be determined that the current screen refresh rate is much higher than the current display frame rate of the foreground application, that is, it meets the first power consumption control condition, so that the display process of the electronic device can be controlled for power consumption to eliminate or reduce the power consumption waste caused by unnecessary commit operations and improve the battery life of the electronic device.
[0029] Optionally, in another possible implementation of the first aspect, the detecting whether the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition includes:
[0030] Get the current screen refresh rate and the current display frame rate of the first foreground application;
[0031] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold and greater than or equal to the second threshold, counting the number of synthesis of SF for each foreground application within the preset detection time to determine the synthesis frequency of SF;
[0032] When the synthesis frequency of SF is greater than the current display frame rate of the first foreground application, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition.
[0033] In this way, when the screen refresh rate is greater than the display frame rate of the foreground application, SF will commit the buffer corresponding to the foreground application according to the screen refresh rate, and synthesize and display it after successfully obtaining the image frame to be displayed that the foreground application has prepared. Therefore, in some cases, the synthesis frequency of SF may be greater than the display frame rate of the foreground application, that is, unnecessary synthesis operations occur, resulting in power consumption waste. Therefore, when the current screen refresh rate is greater than the current display frame rate of the foreground application and the synthesis frequency of SF is greater than the current display frame rate of the foreground application, it is determined that the current display frame rate of the foreground application does not match the current screen refresh rate, and the power consumption of the display process of the electronic device is controlled to eliminate or reduce unnecessary synthesis operations, thereby further reducing the display power consumption of the electronic device.
[0034] Optionally, in another possible implementation of the first aspect, the display power consumption control strategy is any one of the following strategies: reducing the screen refresh rate of the electronic device, reducing the running time of the invalid commit operation of the SF on the buffer corresponding to each foreground application, and aligning the vertical synchronization (vertical synchronization, vsync) signals corresponding to each foreground application, wherein the invalid commit operation refers to the commit operation performed by the SF when the foreground application is using the buffer to prepare the image frame to be displayed.
[0035] In this way, since the reasons for display power waste of electronic devices may be different in different display scenarios, different power consumption control strategies can be used to control the power consumption of the display process of the electronic device according to the current screen refresh rate and the current display frame rate of each foreground application, as well as the different power consumption control conditions satisfied by the two. This can not only reduce the display power consumption of the electronic device and improve the battery life of the electronic device, but also further improve the reliability and accuracy of power consumption control, ensure the display stability of the electronic device, and further enhance the user experience.
[0036] Optionally, in another possible implementation of the first aspect, determining the display power consumption control strategy corresponding to the electronic device according to the current screen refresh rate and the current display frame rate of each foreground application includes:
[0037] When the degree of matching between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition, and the current screen refresh rate is greater than the minimum screen refresh rate corresponding to the electronic device, determining the target screen refresh rate corresponding to the electronic device according to the current screen refresh rate, the minimum screen refresh rate and the current display frame rates of each foreground application, wherein the target screen refresh rate is less than the current screen refresh rate and greater than or equal to the minimum screen refresh rate;
[0038] Accordingly, the above-mentioned power consumption control is performed on the display process of the electronic device according to the display power consumption control strategy to reduce the display power consumption of the electronic device, including:
[0039] Reduce the current screen refresh rate to the target screen refresh rate.
[0040] In this way, since when the current screen refresh rate is much greater than the current display frame rate of the foreground application, the SF will not be synthesized after executing the commit operation during the synthesis and display process, the screen refresh rate of the electronic device can be reduced when the current screen refresh rate is greater than the minimum screen refresh rate to narrow the gap between the screen refresh rate and the display frame rate of the foreground application. The current screen refresh rate, the minimum screen refresh rate and the display frame rate of each foreground application can be comprehensively considered to determine the target screen refresh rate that the electronic device can currently be reduced to, and the current screen refresh rate can be reduced to the target screen refresh rate to eliminate or reduce unnecessary commit operations, thereby directly reducing the screen refresh rate to control the display power consumption of the electronic device, which not only effectively reduces the display power consumption of the electronic device, but also further improves the efficiency of power consumption control.
[0041] Optionally, in another possible implementation of the first aspect, determining the display power consumption control strategy corresponding to the electronic device according to the current screen refresh rate and the current display frame rate of each foreground application includes:
[0042] When the degree of match between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition, and the current screen refresh rate is equal to the minimum screen refresh rate corresponding to the electronic device, the display power consumption control strategy is determined to reduce the running time of invalid commit operations of SF on the buffers corresponding to each foreground application.
[0043] Optionally, in yet another possible implementation of the first aspect, the performing power consumption control on the display process of the electronic device according to the display power consumption control strategy to reduce the display power consumption of the electronic device includes:
[0044] When the SF performs a commit operation on the buffer corresponding to the foreground application, the usage status of the buffer corresponding to the foreground application is determined;
[0045] When the usage status of the buffer corresponding to the foreground application is the data preparation status, the subsequent process of executing the commit operation is terminated.
[0046] In this way, when the current screen refresh rate is much higher than the current display frame rate of the foreground application and the current screen refresh rate cannot be reduced, when an invalid commit operation of SF on the buffer corresponding to the foreground application is detected, the subsequent process of the invalid commit operation can be terminated in time to reduce the execution time of the invalid commit operation, thereby achieving the purpose of reducing the display power consumption of the electronic device.
[0047] Optionally, in another possible implementation of the first aspect, determining the display power consumption control strategy corresponding to the electronic device according to the current screen refresh rate and the current display frame rate of each foreground application includes:
[0048] When the degree of matching between the current display frame rate of each foreground application and the current screen refresh rate meets the second power consumption control condition, the display power consumption control strategy is determined to align the vsync signals corresponding to each foreground application.
[0049] In this way, since the degree of match between the current display frame rate of the foreground application and the current screen refresh rate meets the second power consumption control condition, it means that there is no unnecessary commit operation in the process of synthesizing and displaying SF, but there is a situation where the synthesis frequency of SF is greater than the current display frame rate of the foreground application, that is, there is unnecessary synthesis operation in the process of synthesizing and displaying SF, and the reason for the unnecessary synthesis operation is that each foreground application starts to prepare the image frame to be displayed when different vsync signals arrive, that is, there is a phase difference between the vsync signals corresponding to different foreground applications. Therefore, when there is unnecessary synthesis operation in SF, the vsync signals corresponding to each foreground application can be aligned to eliminate unnecessary synthesis operation and achieve the purpose of reducing the display power consumption of the electronic device.
[0050] Optionally, in another possible implementation of the first aspect, determining the current display scene corresponding to the electronic device according to each changed foreground application includes:
[0051] Get the type, number and display mode of each foreground application;
[0052] The current display scene corresponding to the electronic device is determined according to the type of each foreground application, the number of foreground applications and the display mode of each foreground application.
[0053] In this way, since factors such as the type and number of foreground applications displayed in the electronic device and the display method of the foreground applications may affect the consistency between the display frame rate of the foreground applications and the screen refresh rate, it is possible to preliminarily judge whether the current display scene is a display scene that may require power consumption control based on the type and number of foreground applications and the display method of the foreground applications, and then further judge whether power consumption control is required when the current display scene is a power consumption control scene, and do not enter power consumption control when the current display scene is not a power consumption control scene. This can reduce the display power consumption of the electronic device and improve the reliability of power consumption control, while simplifying the processing flow of scenes that do not require power consumption control as much as possible, thereby further improving the efficiency and stability of power consumption control.
[0054] Optionally, in yet another possible implementation of the first aspect, determining the current display scene corresponding to the electronic device according to the type of each foreground application, the number of foreground applications, and the display mode of each foreground application includes:
[0055] When the type of at least one foreground application is a preset application type and the number of foreground applications is greater than or equal to 2, determining whether the display mode corresponding to the at least one foreground application is floating display;
[0056] When the display mode corresponding to at least one foreground application is floating display, it is determined that the current display scene is a power consumption control scene.
[0057] In this way, since when an electronic device simultaneously displays multiple foreground applications in a floating manner, it is easy for the display frame rate of the foreground application to be much lower than the screen refresh rate, and power consumption control is required, preset application types that may be displayed in a floating manner can be pre-configured, and when there is a foreground application of the preset application type and the foreground application is displayed in a floating manner, it is determined that the current display scene is a power consumption control scene, and then further detects whether power consumption control is needed, which not only reduces the display power consumption of the electronic device, but also further improves the practicality and accuracy of display power consumption control.
[0058] Optionally, in yet another possible implementation of the first aspect, after the power consumption of the display process of the electronic device is controlled according to the display power consumption control strategy to reduce the display power consumption of the electronic device, the method further includes:
[0059] When a trigger event corresponding to any foreground application is obtained, the power consumption control of the display process of the electronic device is terminated, and the current display frame rate of each foreground application is re-detected to see whether it matches the current screen refresh rate.
[0060] Optionally, in another possible implementation manner of the first aspect, after the synthetic display transmission process of the electronic device is controlled according to the display power consumption control strategy to reduce the display power consumption of the electronic device, the method further includes:
[0061] When a change in the foreground application is detected, the power consumption control of the display process of the electronic device is terminated.
[0062] In this way, due to the occurrence of triggering events such as touch, sudden animation, etc. in the foreground application, and when the foreground application changes, the display scene, screen refresh rate, and display frame rate of the foreground application and other parameters of the electronic device may change, so that the electronic device may enter a state where power consumption control is not required, or the control strategy needs to change. Therefore, when a triggering event occurs in the foreground application or the foreground application changes, power consumption control can be temporarily exited to avoid control when it is not needed, thereby further improving the reliability of power consumption control and further improving the display stability of the electronic device.
[0063] In a second aspect, an embodiment of the present application provides a display power consumption optimization device, comprising: a first determination module, for determining a current display scene corresponding to the electronic device according to each changed foreground application when a change is detected in a foreground application displayed by the electronic device, wherein the screen of the electronic device is an LTPS screen; a first detection module, for detecting whether the current display frame rate of each foreground application matches the current screen refresh rate corresponding to the electronic device when the current display scene is a power consumption control scene; a second determination module, for determining the display power consumption control strategy corresponding to the electronic device according to the current screen refresh rate and the current display frame rate of each foreground application when the current display frame rate of at least one foreground application does not match the current screen refresh rate; a first control module, for performing power consumption control on the display process of the electronic device according to the display power consumption control strategy to reduce the display power consumption of the electronic device.
[0064] In a possible implementation of the second aspect, the first detection module includes:
[0065] A first detection unit, used to detect whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition;
[0066] A first determining unit is used to determine that the current display frame rate of the first foreground application does not match the current screen refresh rate when the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition, wherein the first foreground application is any foreground application;
[0067] A second detection unit is used to detect whether the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition when the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition;
[0068] A second determining unit is used to determine that the current display frame rate of the first foreground application does not match the current screen refresh rate when the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition;
[0069] The third determination unit is used to determine that the current display frame rate of the first foreground application matches the current screen refresh rate when the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the second power consumption control condition.
[0070] Optionally, in another possible implementation manner of the second aspect, the first detection unit is specifically used to:
[0071] Get the current screen refresh rate and the current display frame rate of each foreground application;
[0072] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0073] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0074] Optionally, in another possible implementation of the second aspect, the first detection unit is specifically configured to:
[0075] Count the number of commit operations of SF on the buffer corresponding to each foreground application and the number of synthesis of the image frames to be sent and displayed in the buffer corresponding to each foreground application within the preset detection time;
[0076] When the ratio of the number of synthesis times to the number of commit operations corresponding to the first foreground application is greater than or equal to the second threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0077] When the ratio of the number of synthesis times and the number of commit operations corresponding to the first foreground application is less than the second threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0078] Optionally, in yet another possible implementation of the second aspect, the first detection unit is specifically configured to:
[0079] When at least one foreground application calls the hardware decoder, obtain the current screen refresh rate and the decoding frame rate of the hardware decoder;
[0080] When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0081] When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is less than the first threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0082] Optionally, in yet another possible implementation of the second aspect, the second detection unit is specifically configured to:
[0083] Get the current screen refresh rate and the current display frame rate of the first foreground application;
[0084] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold and greater than or equal to the second threshold, counting the number of synthesis of SF for each foreground application within the preset detection time to determine the synthesis frequency of SF;
[0085] When the synthesis frequency of SF is greater than the current display frame rate of the first foreground application, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition.
[0086] Optionally, in another possible implementation of the second aspect, the display power consumption control strategy is any one of the following strategies: reducing the screen refresh rate of the electronic device, reducing the running time of the invalid commit operation of the SF on the buffer corresponding to each foreground application, and aligning the vsync signals corresponding to each foreground application, wherein the invalid commit operation refers to the commit operation performed by the SF when the foreground application is using the buffer to prepare the image frame to be displayed.
[0087] Optionally, in another possible implementation of the second aspect, the second determining module includes:
[0088] a fourth determination unit, configured to determine a target screen refresh rate corresponding to the electronic device according to the current screen refresh rate, the minimum screen refresh rate and the current display frame rate of each foreground application, when the degree of matching between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition and the current screen refresh rate is greater than the minimum screen refresh rate corresponding to the electronic device, wherein the target screen refresh rate is less than the current screen refresh rate and greater than or equal to the minimum screen refresh rate;
[0089] Correspondingly, the first control module includes:
[0090] The first frame reduction unit is used to reduce the current screen refresh rate to a target screen refresh rate.
[0091] Optionally, in yet another possible implementation manner of the second aspect, the second determining module includes:
[0092] The fifth determination unit is used to determine the display power consumption control strategy to reduce the running time of invalid commit operations of SF on the buffers corresponding to each foreground application when the degree of matching between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition and the current screen refresh rate is equal to the minimum screen refresh rate corresponding to the electronic device.
[0093] Optionally, in yet another possible implementation of the second aspect, the first control module includes:
[0094] a sixth determining unit, configured to determine a usage status of the buffer corresponding to the foreground application when the SF performs a commit operation on the buffer corresponding to the foreground application;
[0095] The first termination unit is used to terminate the subsequent process of executing the commit operation when the usage status of the buffer corresponding to the foreground application is in the data preparation status.
[0096] Optionally, in another possible implementation of the second aspect, the second determining module includes:
[0097] The seventh determination unit is used to determine the display power consumption control strategy as aligning the vsync signals corresponding to each foreground application when the matching degree between the current display frame rate of each foreground application and the current screen refresh rate meets the second power consumption control condition.
[0098] Optionally, in another possible implementation of the second aspect, the first determining module includes:
[0099] A first acquisition unit is used to acquire the type of each foreground application, the number of foreground applications, and the display mode of each foreground application;
[0100] The eighth determining unit is used to determine the current display scene corresponding to the electronic device according to the type of each foreground application, the number of foreground applications and the display mode of each foreground application.
[0101] Optionally, in yet another possible implementation manner of the second aspect, the eighth determining unit is specifically configured to:
[0102] When the type of at least one foreground application is a preset application type and the number of foreground applications is greater than or equal to 2, determining whether the display mode corresponding to the at least one foreground application is floating display;
[0103] When the display mode corresponding to at least one foreground application is floating display, it is determined that the current display scene is a power consumption control scene.
[0104] Optionally, in yet another possible implementation of the second aspect, the apparatus further includes:
[0105] The first ending module is used to end the power consumption control of the display process of the electronic device when a trigger event corresponding to any foreground application is obtained, and to re-detect whether the current display frame rate of each foreground application matches the current screen refresh rate.
[0106] Optionally, in another possible implementation of the second aspect, the apparatus further includes:
[0107] The second ending module is used to end the power consumption control of the display process of the electronic device when a change in the foreground application is detected.
[0108] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the display power consumption optimization method as described above.
[0109] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the display power consumption optimization method as described above.
[0110] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on an electronic device, the electronic device executes the display power consumption optimization method as described above.
[0111] In a sixth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the display power consumption optimization method as described above.
[0112] The technical effects obtained by the above-mentioned second, third, fourth, fifth and sixth aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0113] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0114] Figure 1 is a flow chart of a method for optimizing display power consumption provided by an embodiment of the present application;
[0115] Figure 2 It is a schematic diagram of a SF synthesis display process when a screen refresh rate does not match a display frame rate of a foreground application, provided by an embodiment of the present application;
[0116] Figure 3 It is a flowchart of a SF performing a commit operation on a buffer corresponding to an application provided by an embodiment of the present application;
[0117] Figure 4 This is a schematic diagram of an interface for displaying a foreground application in a picture-in-picture manner provided by an embodiment of the present application;
[0118] Figure 5 This is a schematic diagram of an interface for displaying a foreground application in a smart capsule manner provided by an embodiment of the present application;
[0119] Figure 6 It is a schematic diagram of a process of synthesizing and displaying SF when vsync signals corresponding to two foreground applications are aligned, provided by an embodiment of the present application;
[0120] Figure 7 It is a schematic diagram of a process of synthesizing and displaying SF when vsync signals corresponding to two foreground applications are not aligned, provided by an embodiment of the present application;
[0121] Figure 8 This is a schematic diagram of a result of power consumption control by reducing the screen refresh rate provided by an embodiment of the present application;
[0122] Fig. 9 This is another schematic diagram of the result of power consumption control by reducing the screen refresh rate provided by an embodiment of the present application;
[0123] Fig.10 This is a schematic diagram of the result of power consumption control by aligning the vsync signals corresponding to the foreground application provided by an embodiment of the present application;
[0124] Fig.11This is a schematic diagram of an overall process of controlling power consumption by reducing the screen refresh rate of an electronic device provided by an embodiment of the present application;
[0125] Fig.12 It is a schematic diagram of the overall flow of a method for optimizing display power consumption provided by an embodiment of the present application;
[0126] Fig.13 It is a structural schematic diagram of a device for optimizing display power consumption provided by an embodiment of the present application;
[0127] Fig.14 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0128] The display power consumption optimization method, device, electronic device, chip system, storage medium and computer program provided in the present application are described in detail below with reference to the accompanying drawings.
[0129] Please refer to Figure 1 , Figure 1 : is a flow chart of a method for optimizing display power consumption provided by an embodiment of the present application, and the method may include part or all of the following contents:
[0130] Step 101, when it is detected that a foreground application displayed by an electronic device has changed, a current display scene corresponding to the electronic device is determined according to each changed foreground application, wherein the screen of the electronic device is an LTPS screen.
[0131] It should be noted that the display power consumption optimization method of the embodiment of the present application can be performed by the display power consumption optimization device of the embodiment of the present application. The display power consumption optimization device of the embodiment of the present application can be configured in any electronic device with a display function to perform the display power consumption optimization method of the embodiment of the present application. For example, the display power consumption optimization device of the embodiment of the present application can be configured in electronic devices such as mobile phones, computers, wearable devices, etc. that use LTPS screens to control the display power consumption of electronic devices and reduce the power consumption of electronic devices.
[0132] It should be noted that the embodiment of the present application does not limit the operating system loaded in the electronic device, which may be an Android system, a Windows Phone (WP) operating system, or an IOS system, etc. For example, for ease of description, the embodiment of the present application uses the Android system for subsequent description.
[0133] First, the causes of the technical problems to be solved by this application and the applicable scenarios of this application are explained:
[0134] When an electronic device equipped with an LTPS screen displays multiple foreground applications simultaneously in a floating display manner, in order to reduce the operating pressure of the electronic device and ensure the display effect of the foreground application, the electronic device usually reduces the display frame rate of at least one foreground application that the user does not pay attention to or has a low frame rate requirement to a lower level; however, since the LTPS screen uses a fixed refresh rate or a higher graded refresh rate (such as 60Hz, 90Hz, 120Hz and other high-end positions) to display the picture, when the display frame rate of the foreground application is low, the refresh rate of the LTPS screen cannot be synchronously reduced to a lower level, which easily leads to a large difference between the screen refresh rate and the display frame rate of the foreground application, which in turn causes SF to perform a commit operation on the buffer corresponding to the foreground application when the foreground application is preparing the data to be displayed during the synthesis and display process, thereby failing to successfully extract the prepared data to be displayed, resulting in the inability to execute the subsequent synthesis process, that is, an invalid commit operation occurs, resulting in power consumption waste.
[0135] like Figure 2 As shown, it is a schematic diagram of the SF synthesis and display process when the screen refresh rate does not match the display frame rate of the foreground application. Assuming that the screen refresh rate is 90Hz, that is, the period of the screen refresh rate is about 11.1ms, the electronic device currently displays two foreground applications, the display frame rate of application 1 is 30Hz, that is, the display period of application 1 is about 33.3ms, and the display frame rate of application 2 is 90Hz, that is, the display frame rate of application 2 is about 11.1ms. The screen refresh rate is 3 times the display frame rate of application 1, which is much greater than the display frame rate of application 1. The Android system introduces the vsync refresh mechanism in the display refresh process. Specifically, the vsync refresh mechanism is actually to insert a "heartbeat", that is, a system synchronization vsync signal, into the entire display process, which is sent by the screen refresh rate controller to the CPU to generate a vsync interrupt to control each layer drawing operation and layer synthesis operation to be completed according to the heartbeat, thereby incorporating the key steps of the entire display process into the unified management mechanism of vsync. That is to say, every time a vsync interrupt arrives, the screen of the electronic device performs a refresh operation and displays a new frame. The frequency of the vsync signal is consistent with the screen refresh rate, which is 90Hz, and SF will access the buffer corresponding to the application every time the vsync interrupt arrives to determine whether there is an image frame to be sent for synthesis and display; the time it takes for the application to prepare the image frame to be sent is approximately within half a display cycle. For example, if the display frame rate of application 1 is 30Hz, application 1 can prepare the image frame to be sent in about 16ms.
[0136] like Figure 2As shown, 1, 2, 3, 4, 5, 6, 7, and 8 are used to represent the sequence number of the vsync interrupt. Assume that the first vsync interrupt arrives at 0ms, the second vsync interrupt arrives at 11.1ms, the third vsync signal interrupt arrives at 22.2ms, and so on; when the first vsync interrupt arrives, SF accesses the buffer corresponding to application 1. At this time, application 1 has not started to prepare the image frame to be displayed, that is, the buffer corresponding to application 1 is empty, and SF does not perform a commit operation at this time; when the second vsync interrupt arrives, that is, at 11.1ms, SF accesses the buffer corresponding to application 1 again. Since application 1 needs about 16ms to prepare the image frame to be displayed, when SF accesses the buffer corresponding to application 1, application 1 has not yet prepared the image frame to be displayed. At this time, SF will perform a commit operation on the buffer corresponding to application 1 to enable application 1 to submit the buffered data (that is, the image frame to be displayed), but at this time, application 1 has not prepared the image frame to be displayed, so it cannot submit the buffered data, so SF cannot extract the ready-to-be-sent image frame, resulting in the inability to synthesize normally after the commit operation is executed, that is, the commit operation is an invalid commit operation, resulting in power consumption waste; when the third vsync interrupt arrives, that is, at 22.2ms, SF accesses the buffer corresponding to application 1 again. At this time, application 1 has prepared the data to be sent, and the buffer corresponding to application 1 is not empty. At this time, SF will perform a commit operation on the buffer corresponding to application 1, so that application 1 submits the prepared buffered data to obtain the ready-to-be-sent image frame, and clears the buffer occupied by the image frame to be sent, so that subsequent synthesis operations can be performed normally; when the fourth vsync interrupt arrives, that is, at 33.3ms, SF accesses the buffer corresponding to application 1 again. At this time, the first frame of the image frame to be sent prepared by application 1 has been taken away by SF, and application 1 has not yet started to prepare the next frame of the image frame to be sent, and the buffer corresponding to application 1 is empty. At this time, SF does not perform a commit operation, and so on; Figure 2 It can be seen that SF performs two commit operations before performing one synthesis operation. The commit operation without synthesis after commit will lead to waste of power consumption. Therefore, the solution of the present application can be used to eliminate or reduce the waste of power consumption caused by invalid commit.
[0137] like Figure 3As shown, it is a flowchart of SF performing a commit operation on the buffer corresponding to the application. SF performs a commit operation on the buffer corresponding to the application through the commit function. When the data in the buffer corresponding to the application is updated, that is, the buffer corresponding to the application is not empty and the buffer data (the image frame to be sent to the display) is ready, the application can execute the setBuffer function to submit the buffer data, and queue the buffer data into latchBuffers to wait for synthesis. After that, if it is determined that the latchBuffers queue is not empty, the flag bit newDataLatched corresponding to the data update can be set to true; then the synthesis flag bit mustComposite is set to true, and the synthesis process is executed normally. When the data in the buffer corresponding to the application is not updated, that is, when the application is preparing data, latchBuffers can be executed directly. Since the application has not submitted the buffer data, the latchBuffers queue is empty and there is no buffer data, the flag bit newDataLatched corresponding to the data update can be set to false; then the synthesis flag bit mustComposite is set to false, and then the synthesis process is not executed and return is directly performed. It can be seen that when the buffer corresponding to the application is not updated, that is, when the application is not ready to buffer data, SF will still execute a series of commit processes, resulting in power waste.
[0138] In the embodiment of the present application, since the display frame rate and screen refresh rate of the foreground application may change when the foreground application displayed by the electronic device changes, the matching degree between the display frame rate and the screen refresh rate of the foreground application may also change before and after the foreground application changes, so that the change of the foreground application displayed by the electronic device can be used as an opportunity to detect whether display power consumption control is needed, so as to control the display power consumption in a timely manner in the scene where display power consumption control is needed. Therefore, when the foreground application changes, the current display scene corresponding to the electronic device can be determined according to each changed foreground application, so as to preliminarily judge whether the current display scene may have power consumption waste according to the currently displayed foreground application.
[0139] For example, when there is one foreground application, the display frame rate of the application and the screen refresh rate are usually matched when the electronic device displays one application; when there are multiple foreground applications, in order to balance the operating pressure and display effect, the electronic device usually reduces the display frame rate of one or more foreground applications that the user does not pay attention to or has a low frame rate requirement to a lower level. Therefore, it is easy for the display frame rate of the foreground application to not match the screen refresh rate, and power consumption may be wasted. Therefore, if the number of foreground applications is 1, it can be determined that there will be no power consumption waste in the current display scene, that is, it can be determined that the current display scene is not a power consumption control scene; if the number of foreground applications is multiple, it can be determined that there may be power consumption waste in the current display scene, that is, it can be determined that the current display scene is a power consumption control scene.
[0140] For example, applications that are likely to cause power waste can be added to the preset application list, so that when the foreground application is an application in the preset application list, it can be determined that the current display scene may cause power waste, that is, the current display scene can be determined to be a power consumption control scene; when all foreground applications are not applications in the preset application list, it can be determined that the current display scene will not cause power waste, that is, it can be determined that the current display scene is not a power consumption control scene.
[0141] It should be noted that the above examples are only exemplary and cannot be regarded as limiting the present application. In actual use, the judgment conditions of the power consumption control scenario can be set according to actual needs and specific application scenarios, and the present application embodiment does not limit this.
[0142] Furthermore, since factors such as the type and number of foreground applications displayed in the electronic device and the display mode of the foreground applications may affect the consistency between the display frame rate of the foreground application and the screen refresh rate, it is possible to preliminarily determine whether the current display scene is a display scene that may require power consumption control based on the type and number of foreground applications and the display mode of the foreground applications, and then further determine whether power consumption control is required when the current display scene is a power consumption control scene, and do not enter power consumption control when the current display scene is not a power consumption control scene, so as to reduce the display power consumption of the electronic device and improve the reliability of power consumption control, while simplifying the processing flow of scenes that do not require power consumption control as much as possible, and further improve the efficiency and stability of power consumption control. That is, in a possible implementation method of the present application embodiment, the above step 101 may include:
[0143] Get the type, number and display mode of each foreground application;
[0144] The current display scene corresponding to the electronic device is determined according to the type of each foreground application, the number of foreground applications and the display mode of each foreground application.
[0145] As a possible implementation method, when the type of at least one foreground application is a preset application type and the number of foreground applications is greater than or equal to 2, it can be determined whether the display mode corresponding to at least one foreground application is a floating display; and when the display mode corresponding to at least one foreground application is a floating display, it can be determined that the current display scene is a power consumption control scene.
[0146] The preset application types may include all application types that may be displayed in a floating manner in the electronic device, such as various video applications, instant messaging applications, and call applications.
[0147] Among them, the floating display mode may include picture-in-picture, smart capsule, floating window, mini window, small window playback and other display modes, but is not limited to these.
[0148] As an example, the preset application types that may be displayed in a floating display mode can be pre-configured to generate a preset application list (such as a whitelist application list). When the foreground application changes, the desktop can send an antent to the activity manager service (AMS), and the AMS can send the changed foreground application type (such as the application name) to the power saving wizard through the push point. Then the power saving wizard sends the type of the foreground application to the APS (power saving module), and the APS resets the control mark bit, where the control mark bit is used to identify whether the electronic device is to be controlled for power consumption. When the control mark bit is a first preset value (such as true or 1), it indicates that control is required. When the control mark is a second preset value (such as false or 0), it indicates that control is not required. When the type of the foreground application is a preset application type, the APS sets the application mark position to the first preset value and sends it to the SF; otherwise, the application mark position is set to the second preset value and sends it to the SF. After that, the SF can determine whether there is a foreground application that is suspended based on the number of layers and the size of each layer. If the number of layers is greater than or equal to 2, and there is a layer whose size is smaller than the size threshold (for example, the width of the layer is smaller than the width threshold, the height of the layer is smaller than the height threshold, or the area of the layer is smaller than the area threshold, etc.), it can be determined that there is a foreground application that is suspended, that is, the current display scene is determined to be a power consumption control scene, and subsequent steps are further performed to determine whether the display frame rate of each foreground application matches the screen refresh rate; if it is determined that there is no foreground application that is suspended, it can be determined that the current display scene is not a power consumption control scene, and display power consumption control is not required, that is, subsequent steps can be omitted.
[0149] For example, if Figure 4As shown, the interface 400 of the electronic device displays a desktop application and a video application 410 at the same time, wherein the video application is suspended above the desktop application in a picture-in-picture manner, wherein the type of the video application is a preset application type, the number of foreground applications is 2, and there is a foreground application that is suspended, so that the display scene can be determined to be a power consumption control scene. Figure 5 As shown, in the interface 500 of the electronic device, the smart capsule 510 corresponding to the desktop and call application is displayed at the same time. The type of call application is a preset application type, the number of foreground applications is 2, and there is a foreground application displayed in suspension, so that it can be determined that the display scene is a power consumption control scene.
[0150] It should be noted that the above examples are only exemplary and cannot be regarded as limitations of the present application. In actual use, the foreground application can be suspended in any manner other than picture-in-picture and smart capsules, and the suspended application can be suspended above any other statically displayed application in addition to being suspended above the desktop application, and the present application embodiment does not limit this.
[0151] Step 102, when the current display scenario is a power consumption control scenario, detect whether the current display frame rate of each foreground application matches the current screen refresh rate corresponding to the electronic device.
[0152] In an embodiment of the present application, if it is determined that the current display scene is a power consumption control scene, it can be determined that the current display scene may have the problem of invalid commit operation or unnecessary synthesis operation in the above analysis, thereby resulting in waste of power consumption. Therefore, after determining that the current display scene is a power consumption control scene, the matching degree between the current display frame rate of each foreground application and the current screen refresh rate can be detected; and when the difference between the current display frame rate of the foreground application and the current screen refresh rate is too large, it is determined that the current display frame rate of the foreground application does not match the current screen refresh rate, so that it can be determined that the display power consumption of the electronic device needs to be controlled at present, and the control mark position is set to the first preset value to indicate that control is currently required; when the current display frame rate of each foreground application is the same as the screen refresh rate corresponding to the electronic device or the difference is small, it can be determined that the current display frame rate of each foreground application matches the current screen refresh rate, so that it can be determined that the display power consumption of the electronic device does not need to be controlled at present, and the control mark position is set to the second preset value to indicate that control is not required at present.
[0153] Furthermore, the pre-configured power consumption control conditions can be used to determine whether the current display frame rate of each foreground application matches the current screen refresh rate, so as to detect whether there is currently a power consumption waste situation, and different power consumption waste scenarios can be distinguished through different power consumption control conditions, so as to further improve the reliability and accuracy of power consumption control, and further reduce the power consumption of electronic devices, and improve the battery life of electronic devices. That is, in a possible implementation method of the embodiment of the present application, the above step 102 may include:
[0154] Detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition;
[0155] When the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition, determining that the current display frame rate of the first foreground application and the current screen refresh rate do not match, wherein the first foreground application is any foreground application;
[0156] When the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition, detecting whether the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition;
[0157] When the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition, determining that the current display frame rate of the first foreground application and the current screen refresh rate do not match;
[0158] When the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the second power consumption control condition, it is determined that the current display frame rate of the first foreground application matches the current screen refresh rate.
[0159] Among them, the first power consumption control condition may refer to the condition that needs to be met when the current screen refresh rate is much greater than the current display frame rate of the foreground application. For example, the first power consumption control condition may be that the ratio between the current screen refresh rate and the current display frame rate of the foreground application is greater than or equal to the first threshold. In actual use, the first threshold can be determined based on experience and specific application scenarios, and the embodiment of the present application does not limit this. For example, the first threshold may be 3.
[0160] As a possible implementation method, the following method can be used to detect whether the matching degree between the current display frame rate of the foreground application and the current screen refresh rate meets the first power consumption control condition:
[0161] Get the current screen refresh rate and the current display frame rate of each foreground application;
[0162] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0163] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0164] In a possible implementation of the embodiment of the present application, the number of times the first foreground application is displayed can be counted within a period of time (such as 1 second, 2 seconds, 5 seconds, etc.) to determine the current display frame rate of the first foreground application, and then the ratio between the current screen refresh rate and the current display frame rate of the first foreground application can be determined. If the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is greater than or equal to the first threshold value, it can be determined that the current screen refresh rate is much greater than the current display frame rate of the first foreground application, so that it can be determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition, and then the power consumption of the display process of the electronic device can be controlled. If the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold value, it can be determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0165] Therefore, through the above method, when the screen refresh rate of the electronic device is much higher than the display frame rate of at least one foreground application, the SF will not synthesize the buffer corresponding to the foreground application after committing during the synthesis and display process, thereby causing unnecessary commit operations and waste of power. Therefore, it is possible to measure whether the current screen display frame rate is much higher than the current display frame rate of a foreground application based on the ratio between the current screen refresh rate and the current display frame rate of each foreground application and the set first threshold. That is, when the ratio between the current screen refresh rate and the current display frame rate of a foreground application is greater than the first threshold, it can be determined that the current screen refresh rate is much higher than the current display frame rate of the foreground application, that is, it meets the first power consumption control condition, so that the display process of the electronic device can be controlled for power consumption to eliminate or reduce the power consumption waste caused by unnecessary commit operations and improve the battery life of the electronic device.
[0166] For example, assuming the first threshold is 3, Figure 2As shown, the current screen refresh rate is 90Hz, and the current display frame rate of application 1 is 30Hz, that is, the current screen refresh rate is 3 times the current display frame rate of application 1, and there is an invalid commit operation, which meets the first power consumption control condition, so that the power consumption of the display process of the electronic device can be controlled.
[0167] As a possible implementation method, the following method can be used to detect whether the matching degree between the current display frame rate of the foreground application and the current screen refresh rate meets the first power consumption control condition:
[0168] Count the number of commit operations of SF on the buffer corresponding to each foreground application and the number of synthesis of the image frames to be sent and displayed in the buffer corresponding to each foreground application within the preset detection time;
[0169] When the ratio of the number of synthesis times to the number of commit operations corresponding to the first foreground application is greater than or equal to the second threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0170] When the ratio of the number of synthesis times and the number of commit operations corresponding to the first foreground application is less than the second threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0171] It should be noted that the second threshold is smaller than the first threshold. The second threshold can be determined based on experience and specific application scenarios, and the embodiment of the present application does not limit this. For example, the second threshold can be 2.
[0172] In a possible implementation of the embodiment of the present application, when the screen refresh rate of the electronic device is much higher than the display frame rate of at least one foreground application, the SF may not synthesize the buffer corresponding to the foreground application after committing it during the synthesis and display process, thereby causing unnecessary commit operations and wasting power. Therefore, if the current screen refresh rate is much higher than the current display frame rate of the foreground application, the number of commits of the SF to the foreground application is not aligned with the number of synthesis operations; Figure 2 As shown in the figure, when the current screen refresh rate is 3 times the current display frame rate of application 1, the number of commit operations of SF on the buffer corresponding to application 1 is 2 times the number of synthesis operations. Figure 2As shown, if the current screen refresh rate is more than 3 times the current display frame rate of application 1, then the number of commit operations of SF on the buffer corresponding to application 1 will also be more than 2 times the number of synthesis operations. Therefore, whether the current screen display frame rate is much greater than the current display frame rate of a certain foreground application can be measured based on whether the number of commit operations performed by SF on the buffer corresponding to the foreground application and the number of synthesis operations within a period of time are aligned. When the ratio between the number of commit operations performed by SF on the buffer corresponding to a certain foreground application and the number of synthesis operations is greater than the second threshold, it is determined that the current screen refresh rate is much greater than the current display frame rate of the foreground application, that is, it meets the first power consumption control condition, and then the power consumption of the display process of the electronic device can be controlled to eliminate or reduce the power consumption waste caused by unnecessary commit operations and improve the battery life of the electronic device.
[0173] It should be noted that the preset detection duration may be a synthesis period of N SFs, and the value of N may be determined according to actual needs and specific application scenarios, for example, N may be 10, 20, 100, etc., which is not limited in the embodiments of the present application. Alternatively, the preset detection duration may also be 1 second, 2 seconds, 5 seconds, etc., which is not limited in the embodiments of the present application.
[0174] As a possible implementation method, the following method can be used to detect whether the matching degree between the current display frame rate of the foreground application and the current screen refresh rate meets the first power consumption control condition:
[0175] When at least one foreground application calls the hardware decoder, obtain the current screen refresh rate and the decoding frame rate of the hardware decoder;
[0176] When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0177] When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is less than the first threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0178] In a possible implementation of the embodiment of the present application, when there is a foreground application displayed in a suspended display mode such as picture-in-picture, smart capsule, etc., it will be determined that the current display scene is a power consumption control scene, and in suspended display scenes such as picture-in-picture, smart capsule, etc., the hardware decoder is usually called, and the decoding frame rate of the hardware decoder is the display frame rate of the corresponding foreground application. Therefore, in order to more efficiently and conveniently obtain the current display frame rate of the foreground application, and then more efficiently, conveniently and accurately determine whether the current display frame rate of the foreground application matches the current screen refresh rate, after determining that the current display scene is a power consumption control scene, it can be determined whether there is a foreground application that calls the hardware decoder, and if there is a foreground application that calls the hardware decoder, the decoding frame rate of the hardware decoder called by the foreground application can be directly used as the current display frame rate of the foreground application; therefore, when the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is greater than or equal to the first threshold, it can be determined that the current screen refresh rate is much greater than the current display frame rate of the foreground application, that is, it meets the first power consumption control condition.
[0179] In this way, since the electronic device displays multiple foreground applications at the same time, and there is a foreground application displayed in a suspended display manner such as picture-in-picture, smart capsule, etc., the display frame rate of the foreground application in the suspended display will usually drop to a lower level, resulting in a screen refresh rate that is much higher than the display frame rate of the foreground application in the suspended display, and the foreground applications in the suspended display such as picture-in-picture, smart capsule, etc. usually call the hardware decoder, and the decoding frame rate of the hardware decoder is the display frame rate of the foreground application. Therefore, when there is a foreground application calling the hardware decoder, the decoding frame rate of the hardware decoder can be used as the display frame rate of the foreground application to reduce the convenience and reliability of the display frame rate acquisition of the foreground application. Further, when the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder called by a foreground application is greater than the first threshold, it can be determined that the current screen refresh rate is much higher than the current display frame rate of the foreground application, that is, it meets the first power consumption control condition, so that the display process of the electronic device can be controlled for power consumption to eliminate or reduce the power consumption waste caused by unnecessary commit operations and improve the battery life of the electronic device.
[0180] It should be noted that when the ratio between the current screen refresh rate and the current display frame rate of each foreground application is less than the first threshold, that is, when the first power consumption control condition is not met, SF may not have too many invalid commit operations, but when the ratio between the current screen refresh rate and the current display frame rate of each foreground application is greater than or equal to the second threshold, SF may have unnecessary synthesis operations. The following is a specific description with the first threshold being 3 and the second threshold being 2. Assume that the current screen refresh rate is 60Hz, the frequency of the vsync signal is also 60Hz, that is, the period of the vsync signal is about 16.7ms; two current applications are currently displayed, and the current display frame rates of application 1 and application 2 are both 30Hz, that is, the current screen refresh rate is twice the current display frame rate of the two foreground applications, and the display period of application 1 and application 2 is about 33.3ms. The time for application and application 2 to prepare buffered data is approximately within half of the display period, that is, application 1 and application 2 can prepare the image frames to be displayed within approximately 16ms. However, since the frequency of the vsync signal is 60Hz, that is, Application 1 and Application 2 are provided with 60 opportunities to prepare buffered data every second, and the current display frame rate of Application 1 and Application 2 is 30Hz, that is, Application 1 and Application 2 need to prepare 30 frames of buffered data every second; this may cause Application 1 and Application 2 to start preparing buffered data at the same time when the same vsync interrupt arrives. For example, Application 1 and Application 2 both choose to start preparing buffered data when the 1st, 3rd, 5th, 7th... vsync interrupt arrives (such as Figure 6 As shown); or both application 1 and application 2 choose to start preparing buffer data when the 2nd, 4th, 6th, 8th, ... vsync interrupt arrives. Correspondingly, application 1 and application 2 may also start preparing buffer data when different vsync interrupts arrive. For example, application 1 chooses to start preparing buffer data when the 1st, 3rd, 5th, 7th, ... vsync interrupt arrives, and application 2 chooses to start preparing buffer data when the 2nd, 4th, 6th, 8th, ... vsync interrupt arrives, that is, there is a phase difference between the vsync signals corresponding to application 1 and application 2, as shown Figure 7 shown.
[0181] exist Figure 6In the scenario shown, when the first vsync interrupt arrives, SF accesses the buffers corresponding to application 1 and application 2. At this time, application 1 and application 2 have not started to prepare buffered data (i.e., image frames to be sent for display), that is, the buffers corresponding to application 1 and application 2 are empty, and SF does not perform a commit operation at this time; when the second vsync interrupt arrives, that is, at 16.7ms, SF accesses the buffers corresponding to application 1 and application 2 again. At this time, application 1 and application 2 are ready to buffer data, and the buffers corresponding to application 1 and application 2 are not empty. At this time, SF will perform a comm operation on the buffers corresponding to application 1 and application 2 respectively. It operation is performed to make application 1 and application 2 submit the prepared buffered data, so as to obtain the image frame to be sent and displayed, and clear the buffer occupied by the image frame to be sent and displayed, so that subsequent synthesis operations can be performed normally; when the third vsync interrupt arrives, that is, at 33.3ms, SF accesses the buffer corresponding to application 1 and application 2 again. At this time, the first frame buffer data prepared by application 1 and application 2 has been taken away by SF, and application 1 and application 2 have not started to prepare the next frame buffer data. The buffer corresponding to application 1 and application 2 is empty. At this time, SF does not perform the commit operation, and so on; from Figure 6 It can be seen that when the screen refresh rate is twice the display frame rate of the application, and the phases of the vsync signals corresponding to application 1 and application 2 are aligned, there is no invalid commit operation, and the synthesis frequency of SF is the same as the display frame rate of application 1 and application 2, and there is no redundant synthesis operation. Therefore, there is no waste of power consumption and ineffective control.
[0182] exist Figure 7In the scenario shown, when the first vsync interrupt arrives, SF accesses the buffers corresponding to application 1 and application 2. At this time, application 1 and application 2 have not started to prepare buffered data (i.e., image frames to be displayed), that is, the buffers corresponding to application 1 and application 2 are empty, and SF does not perform a commit operation at this time; when the second vsync interrupt arrives, that is, at 16.7ms, SF accesses the buffers corresponding to application 1 and application 2 again. At this time, application 1 is ready to buffer data, and the buffer corresponding to application 1 is not empty. At this time, SF will perform a commit operation on the buffer corresponding to application 1, so that application 1 commits the data that is ready. , so as to obtain the prepared image frame to be displayed, and clear the buffer occupied by the image frame to be displayed, so that the subsequent synthesis operation can be performed normally; however, when the second vsync interrupt arrives, application 2 has not started to prepare buffer data, that is, the buffer corresponding to application 2 is empty, and SF does not perform the commit operation on the buffer corresponding to application 2 at this time; that is, when the second vsync interrupt arrives, SF only successfully obtains the new buffer data of application 1, and fails to obtain the new buffer data of application 2. At this time, SF will use the new buffer data of application 1, that is, the old buffer data of the previous frame of application 2 for synthesis. When the third vsync interrupt arrives, that is, at 33.3ms, SF accesses the buffers corresponding to application 1 and application 2 again. At this time, the buffer data of the first frame prepared by application 1 has been taken away by SF, and application 1 has not yet started to prepare the buffer data of the next frame. The buffer corresponding to application 1 is empty. At this time, SF does not perform a commit operation on the buffer corresponding to application 1; however, at this time, application 2 has prepared buffer data, and the buffer corresponding to application 2 is not empty. At this time, SF will perform a commit operation on the buffer corresponding to application 2, so that application 2 can submit the prepared buffer data to obtain the image frame to be sent and displayed, and clear the buffer occupied by the image frame to be sent and display, so that subsequent synthesis operations can be performed normally; that is, when the third vsync interrupt arrives, SF only successfully obtains the new buffer data of application 2, and fails to obtain the new buffer data of application 1. At this time, SF will use the new buffer data of application 2 and the old buffer data of the previous frame for synthesis, and so on. Figure 7 It can be seen that when the screen refresh rate is twice the application display frame rate and the phases of the vsync signals corresponding to application 1 and application 2 are not aligned, there is no invalid commit operation at this time, but SF is synthesized at a synthesis frequency of 60Hz. However, SF only needs to be synthesized at a synthesis frequency of 30Hz to meet the display requirements of application 1 and application 2, resulting in redundant synthesis operations in SF, wasting power consumption.
[0183] Therefore, through the above analysis, it can be found that when the ratio of the current screen refresh rate to the current display frame rate of each foreground application is less than the first threshold value, and when it does not meet the first power consumption control condition, it is possible to continue to judge whether SF has redundant synthesis operations through the second power consumption control condition, and when it is determined that the degree of matching between the current screen refresh rate and the current display frame rate of each foreground application meets the second power consumption control condition, it can be determined that SF has redundant synthesis operations, so that the display process of the electronic device can be controlled to reduce or eliminate redundant synthesis operations, thereby further reducing the display power consumption of the electronic device.
[0184] As a possible implementation method, whether the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition can be determined in the following manner:
[0185] Get the current screen refresh rate and the current display frame rate of the first foreground application;
[0186] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold and greater than or equal to the second threshold, counting the number of synthesis of SF for each foreground application within the preset detection time to determine the synthesis frequency of SF;
[0187] When the synthesis frequency of SF is greater than the current display frame rate of the first foreground application, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition.
[0188] In a possible implementation method of the embodiment of the present application, when the ratio of the current screen refresh rate to the current display frame rate of the first foreground application is less than the first threshold, it is possible to continue to determine whether the ratio of the current screen refresh rate to the current display frame rate of the first foreground application is greater than or equal to the second threshold, and when the ratio of the current screen refresh rate to the current display frame rate of each foreground application is greater than or equal to the second threshold, it is further determined whether the synthesis frequency of SF is greater than the current display frame rate of the first foreground application; if it is determined that the synthesis frequency of SF is greater than the current display frame rate of the first foreground application, it can be determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition, that is, SF may have redundant synthesis operations.
[0189] Step 103, when the current display frame rate of at least one foreground application does not match the current screen refresh rate, determine the display power consumption control strategy corresponding to the electronic device according to the current screen refresh rate and the current display frame rates of each foreground application.
[0190] In an embodiment of the present application, if there is a current display frame rate of at least one foreground application that does not match the current screen refresh rate, it can be determined that in the process of synthesizing and displaying, the electronic device may have redundant commit operations or redundant synthesis operations, wasting power consumption. Therefore, according to the current screen refresh rate and the current display frame rate of each foreground application, a suitable display power consumption management strategy can be determined to eliminate or reduce redundant commit operations or synthesis operations, thereby reducing the display power consumption of the electronic device.
[0191] Among them, the display power consumption control strategy can be any one of the following strategies: reducing the screen refresh rate of the electronic device, reducing the running time of the invalid commit operation of SF on the buffer corresponding to each foreground application, and aligning the vsync signal corresponding to each foreground application. Among them, the invalid commit operation refers to the commit operation performed by SF when the foreground application is using the buffer to prepare the image frame to be displayed.
[0192] In the embodiments of the present application, since the reasons for display power waste of electronic devices may be different in different display scenarios, different power consumption control strategies can be used to control the power consumption of the display process of the electronic device according to the current screen refresh rate and the current display frame rate of each foreground application, as well as the different power consumption control conditions satisfied by the two. This can not only reduce the display power consumption of the electronic device and improve the battery life of the electronic device, but also further improve the reliability and accuracy of power consumption control, ensure the display stability of the electronic device, and further enhance the user experience.
[0193] Furthermore, since when the current screen refresh rate is much higher than the current display frame rate of the foreground application, it will cause the SF to not be synthesized after executing the commit operation during the synthesis and display process, so when the current screen refresh rate is higher than the minimum screen refresh rate, the screen refresh rate of the electronic device can be reduced to narrow the gap between the screen refresh rate and the display frame rate of the foreground application, so as to comprehensively consider the current screen refresh rate, the minimum screen refresh rate and the display frame rate of each foreground application, determine the target screen refresh rate that the electronic device can currently be reduced to, and reduce the current screen refresh rate to the target screen refresh rate, so as to eliminate or reduce unnecessary commit operations, thereby directly reducing the screen refresh rate to control the display power consumption of the electronic device, which can not only effectively reduce the display power consumption of the electronic device, but also further improve the efficiency of power consumption control. That is, in a possible implementation method of the present application embodiment, the above step 103 may include:
[0194] When the degree of match between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition and the current screen refresh rate is greater than the minimum screen refresh rate corresponding to the electronic device, the target screen refresh rate corresponding to the electronic device is determined based on the current screen refresh rate, the minimum screen refresh rate and the current display frame rate of each foreground application, wherein the target screen refresh rate is less than the current screen refresh rate and greater than or equal to the minimum screen refresh rate.
[0195] In an embodiment of the present application, if there is at least one foreground application whose current display frame rate and current screen refresh rate match to a first power consumption control condition, it can be determined that the current screen refresh rate is much greater than the current display frame rate of the foreground application, which will cause unnecessary commit operations in the SF synthetic display process; if the current screen refresh rate is greater than the minimum screen refresh rate of the electronic device at this time, it means that the electronic device allows frame reduction processing of the screen refresh rate, so that the screen refresh rate of the electronic device can be reduced to narrow the gap between the screen refresh rate and the display frame rate of the foreground application, thereby reducing or eliminating unnecessary commit operations, thereby achieving the purpose of reducing display power consumption.
[0196] As a possible implementation method, assuming that the foreground application 1 meets the first power consumption control condition, if the current display frame rate of application 1 is less than or equal to the minimum screen refresh rate, the minimum screen refresh rate can be directly determined as the target screen refresh rate; if the current display frame rate of application 1 is greater than the minimum screen refresh rate, and there are other adjustable refresh rate gears between the minimum screen refresh rate and the current screen refresh rate, the refresh rate gear that is closest to the current display frame rate of application 1 and has the smallest refresh rate can be determined as the target screen refresh rate, so as to minimize the display power consumption of the electronic device and at the same time ensure the display effect of the foreground as much as possible.
[0197] As a possible implementation method, assuming that two foreground applications are currently displayed, the current display frame rate of application 1 is less than the current display frame rate of application 2, and the matching degree between the current display frame rate of application 1 and the current screen refresh rate meets the first power consumption control condition, while the matching degree between the current display frame rate of application 2 and the current screen refresh rate does not meet the first power consumption control condition. At this time, in order to reduce the display power consumption while ensuring the display effect of application 2 as much as possible, the current display frame rate of application 2 can be used as a reference when determining the target screen refresh rate. If there is no other adjustable refresh rate gear between the current screen refresh rate and the minimum screen refresh rate, the minimum screen refresh rate can be determined as the target screen refresh rate. If there are other adjustable refresh rate levels between the current screen refresh rate and the minimum screen refresh rate, the product of the current display frame rate of application 1 and the first threshold can be first determined as the reference refresh rate; if the reference refresh rate is less than or equal to the minimum screen refresh rate, the minimum screen refresh rate can be determined as the target screen refresh rate; if the reference refresh rate is greater than the minimum screen refresh rate, all reference refresh rate levels lower than the reference refresh rate are determined, and the reference refresh rate level closest to the current display frame rate of application 2 is determined as the target screen refresh rate, so as to control the display power consumption while minimizing the impact on the display effect of application 2.
[0198] For example, assuming that the current display frame rate of application 1 is 30Hz, the current display frequency of application 2 is 90Hz, the current screen refresh rate is 90Hz, application 1 meets the first power consumption control condition, application 2 does not meet the first power consumption control condition, and the adjustable refresh rate gears of the electronic device include 60Hz, 90Hz, and 120Hz. Since there are no other refresh rate gears between the minimum screen refresh rate and the current screen refresh rate, the minimum screen refresh rate of 60Hz can be determined as the target screen refresh rate.
[0199] For another example, assuming that the current display frame rate of application 1 is 60Hz, the current display frequency of application 2 is 180Hz, the current screen refresh rate is 180Hz, the first threshold is 3, application 1 meets the first power consumption control condition, application 2 does not meet the first power consumption control condition, and the adjustable refresh rate gears of the electronic device include 60Hz, 90Hz, 120Hz, and 150Hz. Since there are other adjustable refresh rate gears of 90Hz and 120Hz between the lowest screen refresh rate of 60Hz and the current screen refresh rate of 180Hz, 180Hz can be determined as the reference refresh rate, and 60Hz, 90Hz, and 120Hz can be determined as reference refresh rate gears. Since 120Hz is closest to the current display frequency of application 2, 120Hz can be determined as the target screen refresh rate.
[0200] It should be noted that the above-listed methods for determining the target screen refresh rate are only exemplary and cannot be regarded as limitations of the present application. In actual use, a suitable method for determining the target screen refresh rate can be selected according to actual needs and specific application scenarios, and the present application embodiment does not limit this.
[0201] Furthermore, since the current screen refresh rate may be the lowest refresh rate of the electronic device, when it is determined that there is a foreground application that meets the first power consumption control condition, the current screen refresh rate cannot be reduced. Therefore, when it is impossible to reduce the frame rate, when the invalid commit operation of SF on the buffer corresponding to the foreground application is detected, the subsequent process of the invalid commit operation can be terminated in time to reduce the execution time of the invalid commit operation, thereby achieving the purpose of reducing the display power consumption of the electronic device. That is, in a possible implementation of the embodiment of the present application, the above step 103 may include:
[0202] When the degree of match between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition, and the current screen refresh rate is equal to the minimum screen refresh rate corresponding to the electronic device, the display power consumption control strategy is determined to reduce the running time of invalid commit operations of SF on the buffers corresponding to each foreground application.
[0203] In an embodiment of the present application, if the degree of match between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition, and the current screen refresh rate has dropped to the minimum screen refresh rate, so that the screen refresh rate can no longer be reduced, in order to eliminate the power consumption waste caused by invalid commit operations, the display power consumption control strategy can be determined to reduce the running time of invalid commit operations of SF on the buffers corresponding to each foreground application, so as to reduce the running time of invalid commit operations as much as possible, thereby achieving the purpose of reducing the display power consumption of the electronic device.
[0204] Furthermore, since the degree of matching between the current display frame rate of the foreground application and the current screen refresh rate meets the second power consumption control condition, it means that there is no unnecessary commit operation in the process of synthesizing and displaying SF, but there is a situation where the synthesis frequency of SF is greater than the current display frame rate of the foreground application, that is, there is unnecessary synthesis operation in the process of synthesizing and displaying SF, and the reason for the unnecessary synthesis operation is that each foreground application starts to prepare the image frame to be displayed when different vsync signals arrive, that is, there is a phase difference between the vsync signals corresponding to different foreground applications. Therefore, when there is unnecessary synthesis operation in SF, the vsync signals corresponding to each foreground application can be aligned to eliminate unnecessary synthesis operations and achieve the purpose of reducing the display power consumption of the electronic device. That is, in a possible implementation method of the embodiment of the present application, the above step 103 may include:
[0205] When the degree of matching between the current display frame rate of each foreground application and the current screen refresh rate meets the second power consumption control condition, the display power consumption control strategy is determined to align the vsync signals corresponding to each foreground application.
[0206] Step 104 , according to the display power consumption control strategy, the display process of the electronic device is controlled to reduce the display power consumption of the electronic device.
[0207] As a possible implementation, when the display power consumption control strategy is to reduce the screen refresh rate of the electronic device, the above step 104 may include:
[0208] Reduce the current screen refresh rate to the target screen refresh rate.
[0209] In an embodiment of the present application, if the display power consumption control strategy is determined to reduce the screen refresh rate of the electronic device in the aforementioned steps, and the target screen refresh rate is determined, the current screen refresh rate of the electronic device can be reduced to the target screen refresh rate to reduce or eliminate unnecessary commit operations.
[0210] For example, if Figure 2 In the case shown in FIG. 1 , the current display frame rate of application 1 is 30 Hz, and the current screen refresh rate is 90 Hz. If the target screen refresh rate is determined to be 60 Hz, the current screen refresh rate is reduced to 60 Hz, and the synthesis display process of SF is converted to the following: Figure 8 The situation shown, from Figure 8 It can be seen that Figure 2The invalid commit operation on the buffer corresponding to application 1 has been eliminated, achieving the purpose of reducing the display power consumption of electronic devices. In other words, after the current screen refresh rate is reduced, there will no longer be a situation where the data is being prepared but not updated when SF performs a commit operation on the buffer corresponding to the foreground application. Figure 3 There is no processing flow corresponding to the update branch in the process, and the processing flow corresponding to the update branch is directly cancelled, such as Fig. 9 shown.
[0211] As a possible implementation, when the display power consumption control strategy is to reduce the running time of the invalid commit operation of the SF on the buffer corresponding to each foreground application, the above step 104 may include:
[0212] When the SF performs a commit operation on the buffer corresponding to the foreground application, the usage status of the buffer corresponding to the foreground application is determined;
[0213] When the usage status of the buffer corresponding to the foreground application is the data preparation status, the subsequent process of executing the commit operation is terminated.
[0214] In an embodiment of the present application, when SF performs a commit operation on the buffer corresponding to the foreground application, it can detect through the frameIsEarly function whether it is too early to obtain the buffered data, that is, if the return result of the frameIsEarly function is that the buffered data is obtained too early, it can be determined that the usage status of the buffer corresponding to the foreground application is the data preparation status, that is, when SF performs a commit operation on the buffer corresponding to the foreground application, the foreground application is using the buffer to prepare buffered data, that is, this commit operation is an invalid commit operation, so that the commit process after executing the frameIsEarly function can be terminated, such as frame rate control, HWC update, and detection of repeated frame loss, so as to minimize the running time of invalid commit operations and reduce the display power consumption of electronic devices.
[0215] As a possible implementation method, when the display power consumption control strategy is to align the vsync signals corresponding to each foreground application, the display frequency of one or more foreground applications can be temporarily increased to be consistent with the frequency of the vsync signal, and after each application starts to prepare buffered data at the same time when the same vsync interrupt arrives, the display frame rate of the foreground application can be adjusted to the original display frame rate to achieve alignment processing of the vsync signals corresponding to each foreground application.
[0216] For example, if Figure 7In the scenario shown, two foreground applications are currently displayed. The current display frame rates of application 1 and application 2 are both 30Hz, and the current screen refresh rate and vsync signal frequency are 60Hz. Since the phases of the vsync signals corresponding to application 1 and application 2 are not aligned, redundant synthesis operations occur during the synthesis and display of SF. Therefore, Fig.10 As shown, the current display frame rate of application 2 can be temporarily adjusted to 60Hz when the second vsync interrupt arrives (16.7ms). Therefore, application 2 will start to prepare buffered data for a new frame when the second and third vsync interrupts arrive, so that application 1 and application 2 can achieve phase alignment of the vsync signal when the third vsync interrupt arrives. After the third vsync interrupt, the current display frame rate corresponding to application 2 can be readjusted to 30Hz. Starting from the fourth vsync interrupt, application 1 and application 2 will start to prepare buffered data at the same time when the same vsync interrupt arrives, thereby achieving alignment of the vsync signals of application 1 and application 2, eliminating redundant synthesis operations, reducing the display power consumption of electronic devices, and improving the battery life of electronic devices.
[0217] Furthermore, when a trigger event such as touch or sudden motion occurs in the foreground application, the display scene, screen refresh rate, and display frame rate of the electronic device may change, so that the electronic device may enter a state where power consumption control is not required, or the control strategy needs to change. Therefore, when a trigger event occurs in the foreground application, power consumption control can be temporarily exited to avoid control when control is not required, thereby further improving the reliability of power consumption control and the display stability of the electronic device. That is, in a possible implementation of the embodiment of the present application, after the above step 104, it can also include:
[0218] When a trigger event corresponding to any foreground application is obtained, the power consumption control of the display process of the electronic device is terminated, and the current display frame rate of each foreground application is re-detected to see whether it matches the current screen refresh rate.
[0219] Among them, the triggering event may include a user's touch event on the electronic device, an application sudden animation effect, etc., but is not limited to these.
[0220] As a possible implementation method, when any foreground application is triggered by a touch, sudden something or other triggering event, the display scene of the electronic device, the screen refresh rate, the display frame rate of the foreground application and other parameters may change, so that the electronic device may enter a state where power consumption control is not required, or the control strategy needs to be changed. Therefore, when a triggering event occurs in the foreground application, power consumption control can be temporarily exited to avoid control when it is not needed, and after exiting power consumption control, the current display frame rate of each foreground application can be re-checked to see if it matches the current screen refresh rate, so as to re-enter power consumption control in time when control is needed.
[0221] Furthermore, since the display scene, screen refresh rate, and display frame rate of the electronic device may change when the foreground application changes, the electronic device may enter a state where power consumption control is not required, or the control strategy needs to change. Therefore, when a trigger event occurs in the foreground application, power consumption control can be temporarily exited to avoid control when control is not required, thereby further improving the reliability of power consumption control and further improving the display stability of the electronic device. That is, in a possible implementation of the embodiment of the present application, after the above step 104, it can also include:
[0222] When a change in the foreground application is detected, the power consumption control of the display process of the electronic device is terminated.
[0223] As a possible implementation method, after detecting a change in the foreground application and ending the power consumption control of the display process of the electronic device, it is also possible to re-determine whether the current display scene is a power consumption control scene, so as to re-enter power consumption control in time when control is needed.
[0224] As an example, Fig.11Taking the example of the embodiment of the present application, the overall process of controlling power consumption by reducing the screen refresh rate of the electronic device is described. First, after APS detects the change of the foreground application and determines that the foreground application is a whitelist application (preset application type), it detects whether the foreground application is displayed in a suspended manner such as picture-in-picture, smart capsule, etc.; and when it is determined that there is a foreground application displayed in a suspended manner such as picture-in-picture, smart capsule, etc., it detects whether there is a misalignment between the commit operation of SF and the synthesis operation; if the commit operation of SF is not aligned with the synthesis operation, it can be determined that the power consumption control conditions are currently met, and control is started; otherwise, no control is performed; and the target screen refresh rate is determined based on the current screen refresh rate and the current display frame rate of each foreground application, and frame reduction processing is started based on the target screen refresh rate. After control, if a triggering event such as touch or sudden motion effect is encountered, the control is exited and the current screen refresh rate is restored to the level before control. Among them, detecting whether the foreground application is displayed in a suspended manner such as picture-in-picture or smart capsule can be judged according to the number of layers of SF and the size of each layer; detecting whether there is a misalignment between the commit operation and the synthesis operation of SF can be achieved by detecting whether the current screen refresh rate is much higher than the current display frame rate of the foreground application, counting the ratio of commit operations to synthesis operations, detecting whether the current screen refresh rate is much higher than the decoding frame rate of the hardware decoder, etc.; the specific implementation process and principles can refer to the detailed description of the above embodiment, which will not be repeated here.
[0225] As an example, Fig.12 Take as an example, the overall process of the method for optimizing display power consumption of the embodiment of the present application is described. First, when it is detected that the foreground application switches to the whitelist application and there is a foreground application displayed in a picture-in-picture, smart capsule, etc., N SF synthesis cycles are identified to determine whether the current display frame rate of the foreground application matches the current screen refresh rate; if it matches, no control is required; if it does not match, control is performed, and according to the timing, any one of the schemes of reducing the running time of invalid commit operations (Scheme 1), aligning the vsync signals of each foreground application (Scheme 2), and reducing the screen refresh rate (Scheme 3) is used for control. When an emergency occurs, if a triggering event such as touch, sudden animation, etc. that does not change the foreground application occurs, the control is temporarily exited (when using Scheme 3 for control), and after re-identifying N synthesis cycles, it is determined whether the control needs to continue; if the foreground application changes, the entire control scheme is exited. Other specific implementation processes and principles can refer to the detailed description of the above embodiments, which will not be repeated here.
[0226] It should be noted that Fig.11 and Fig.12The scheme shown is only an example of an embodiment of the present application and cannot be regarded as a limitation of the present application.
[0227] The display power consumption optimization method provided in the embodiment of the present application timely detects whether the current display scene is a power consumption control scene and whether there is a mismatch between the display frame rate of the foreground application and the screen display frame rate when the foreground application displayed on the electronic device is switched. When the current display scene is a power consumption control scene and there is a mismatch between the display frame rate of the foreground application and the screen display frame rate, the display process of the electronic device is power-consumption controlled according to the current display frame rate of each foreground application and the current screen refresh rate, thereby reducing the display power consumption of the electronic device and improving the battery life of the electronic device.
[0228] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0229] Corresponding to the method for optimizing display power consumption described in the above embodiment, Fig.13 A structural block diagram of a display power consumption optimization device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0230] Reference Fig.13 , the device 1300, comprises:
[0231] A first determining module 1301 is used to determine a current display scene corresponding to the electronic device according to each changed foreground application when a change is detected in a foreground application displayed by the electronic device, wherein the screen of the electronic device is an LTPS screen;
[0232] The first detection module 1302 is used to detect whether the current display frame rate of each foreground application matches the current screen refresh rate corresponding to the electronic device when the current display scene is a power consumption control scene;
[0233] The second determination module 1303 is used to determine the display power consumption control strategy corresponding to the electronic device according to the current screen refresh rate and the current display frame rates of each foreground application when the current display frame rate of at least one foreground application does not match the current screen refresh rate;
[0234] The first control module 1304 is used to control the power consumption of the display process of the electronic device according to the display power consumption control strategy to reduce the display power consumption of the electronic device.
[0235] In actual use, the display power consumption optimization device provided in the embodiment of the present application can be configured in any electronic device to execute the aforementioned display power consumption optimization method.
[0236] The display power consumption optimization device provided in the embodiment of the present application timely detects whether the current display scene is a power consumption control scene and whether there is a mismatch between the display frame rate of the foreground application and the screen display frame rate when the foreground application displayed on the electronic device is switched. When the current display scene is a power consumption control scene and there is a mismatch between the display frame rate of the foreground application and the screen display frame rate, the display process of the electronic device is controlled in power consumption according to the current display frame rate of each foreground application and the current screen refresh rate, thereby reducing the display power consumption of the electronic device and improving the battery life of the electronic device.
[0237] In a possible implementation of the present application, the first detection module 1302 includes:
[0238] A first detection unit, used to detect whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition;
[0239] A first determining unit is used to determine that the current display frame rate of the first foreground application does not match the current screen refresh rate when the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition, wherein the first foreground application is any foreground application;
[0240] A second detection unit is used to detect whether the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition when the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition;
[0241] A second determining unit is used to determine that the current display frame rate of the first foreground application does not match the current screen refresh rate when the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition;
[0242] The third determination unit is used to determine whether the current display frame rate of the first foreground application matches the current screen refresh rate when the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the second power consumption control condition.
[0243] Furthermore, in another possible implementation of the present application, the first detection unit is specifically used to:
[0244] Get the current screen refresh rate and the current display frame rate of each foreground application;
[0245] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0246] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0247] Furthermore, in another possible implementation of the present application, the first detection unit is specifically used to:
[0248] Count the number of commit operations of SF on the buffer corresponding to each foreground application and the number of synthesis of the image frames to be sent and displayed in the buffer corresponding to each foreground application within the preset detection time;
[0249] When the ratio of the number of synthesis times to the number of commit operations corresponding to the first foreground application is greater than or equal to the second threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0250] When the ratio of the number of synthesis times and the number of commit operations corresponding to the first foreground application is less than the second threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0251] Furthermore, in another possible implementation of the present application, the first detection unit is specifically used to:
[0252] When at least one foreground application calls the hardware decoder, obtain the current screen refresh rate and the decoding frame rate of the hardware decoder;
[0253] When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition;
[0254] When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is less than the first threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
[0255] Furthermore, in another possible implementation of the present application, the second detection unit is specifically used to:
[0256] Get the current screen refresh rate and the current display frame rate of the first foreground application;
[0257] When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold and greater than or equal to the second threshold, counting the number of synthesis of SF for each foreground application within the preset detection time to determine the synthesis frequency of SF;
[0258] When the synthesis frequency of SF is greater than the current display frame rate of the first foreground application, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition.
[0259] Furthermore, in another possible implementation of the present application, the above-mentioned display power consumption control strategy is any one of the following strategies: reducing the screen refresh rate of the electronic device, reducing the running time of the invalid commit operation of SF on the buffer corresponding to each foreground application, and aligning the vsync signals corresponding to each foreground application, wherein the invalid commit operation refers to the commit operation performed by SF when the foreground application is using the buffer to prepare the image frame to be displayed.
[0260] Furthermore, in another possible implementation of the present application, the second determining module 1303 includes:
[0261] a fourth determination unit, configured to determine a target screen refresh rate corresponding to the electronic device according to the current screen refresh rate, the minimum screen refresh rate and the current display frame rate of each foreground application, when the degree of matching between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition and the current screen refresh rate is greater than the minimum screen refresh rate corresponding to the electronic device, wherein the target screen refresh rate is less than the current screen refresh rate and greater than or equal to the minimum screen refresh rate;
[0262] Accordingly, the first control module 1304 includes:
[0263] The first frame reduction unit is used to reduce the current screen refresh rate to a target screen refresh rate.
[0264] Furthermore, in another possible implementation of the present application, the second determining module 1303 includes:
[0265] The fifth determination unit is used to determine the display power consumption control strategy to reduce the running time of invalid commit operations of SF on the buffers corresponding to each foreground application when the degree of matching between the current display frame rate of at least one foreground application and the current screen refresh rate meets the first power consumption control condition and the current screen refresh rate is equal to the minimum screen refresh rate corresponding to the electronic device.
[0266] Furthermore, in another possible implementation of the present application, the first control module 1304 includes:
[0267] a sixth determining unit, configured to determine a usage status of the buffer corresponding to the foreground application when the SF performs a commit operation on the buffer corresponding to the foreground application;
[0268] The first termination unit is used to terminate the subsequent process of executing the commit operation when the usage status of the buffer corresponding to the foreground application is in the data preparation status.
[0269] Furthermore, in another possible implementation of the present application, the second determining module 1303 includes:
[0270] The seventh determination unit is used to determine the display power consumption control strategy as aligning the vsync signals corresponding to each foreground application when the matching degree between the current display frame rate of each foreground application and the current screen refresh rate meets the second power consumption control condition.
[0271] Furthermore, in another possible implementation of the present application, the first determining module 1301 includes:
[0272] A first acquisition unit is used to acquire the type of each foreground application, the number of foreground applications, and the display mode of each foreground application;
[0273] The eighth determining unit is used to determine the current display scene corresponding to the electronic device according to the type of each foreground application, the number of foreground applications and the display mode of each foreground application.
[0274] Furthermore, in another possible implementation of the present application, the eighth determining unit is specifically configured to:
[0275] When the type of at least one foreground application is a preset application type and the number of foreground applications is greater than or equal to 2, determining whether the display mode corresponding to the at least one foreground application is floating display;
[0276] When the display mode corresponding to at least one foreground application is floating display, it is determined that the current display scene is a power consumption control scene.
[0277] Furthermore, in another possible implementation of the present application, the apparatus 1300 further includes:
[0278] The first ending module is used to end the power consumption control of the display process of the electronic device when a trigger event corresponding to any foreground application is obtained, and to re-detect whether the current display frame rate of each foreground application matches the current screen refresh rate.
[0279] Furthermore, in another possible implementation of the present application, the apparatus 1300 further includes:
[0280] The second ending module is used to end the power consumption control of the display process of the electronic device when a change in the foreground application is detected.
[0281] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0282] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0283] In order to implement the above embodiments, the present application also proposes an electronic device.
[0284] Fig.14 A schematic diagram of the structure of an electronic device according to an embodiment of the present application.
[0285] See also Fig.14The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0286] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0287] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0288] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0289] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0290] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0291] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0292] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193 and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0293] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0294] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0295] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is an integer greater than 1.
[0296] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0297] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0298] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created by the electronic device 100 during use (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0299] The electronic device 100 can implement audio functions, such as music playback, recording, etc., through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D and the application processor.
[0300] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc. As an example of the present application, microphone 170C can be used as a signal receiver to receive the echo signal of the original Chirp signal reflected by the target object, or to receive the marker echo signal of the original marker signal reflected by the target object.
[0301] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, in a shooting scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0302] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0303] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the method for optimizing the display power consumption of the embodiment of the present application, and will not be repeated here.
[0304] An embodiment of the present application also provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device implements the steps in the above-mentioned method embodiments.
[0305] An embodiment of the present application further provides a computer-readable storage medium, which includes instructions. When the instructions are executed on an electronic device, the electronic device implements the steps in the above-mentioned method embodiments.
[0306] The embodiments of the present application also provide a computer program product. When the computer program product is executed on an electronic device, the electronic device implements the steps in the above-mentioned method embodiments.
[0307] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0308] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0309] In the above-described embodiments, specific details such as specific system structures, technologies, etc. are provided for illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0310] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0311] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0312] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0313] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0314] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the sentences "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0315] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0316] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0317] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0318] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for optimizing display power consumption, characterized in that: include: In the case where a change is detected in a foreground application displayed by an electronic device, determining a current display scene corresponding to the electronic device according to each changed foreground application, wherein the screen of the electronic device is a low-temperature polycrystalline silicon LTPS screen; In the case where the current display scenario is a power consumption control scenario, detecting whether the current display frame rate of each foreground application matches the current screen refresh rate corresponding to the electronic device; When the current display frame rate of at least one of the foreground applications does not match the current screen refresh rate, determining a display power consumption control strategy corresponding to the electronic device according to the current screen refresh rate and the current display frame rates of each of the foreground applications; According to the display power consumption control strategy, power consumption control is performed on the display process of the electronic device to reduce the display power consumption of the electronic device; The detecting whether the current display frame rate of each foreground application matches the current screen refresh rate corresponding to the electronic device includes: Detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition; When the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition, determining that the current display frame rate of the first foreground application does not match the current screen refresh rate, wherein the first foreground application is any of the foreground applications; In the case where the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition, detecting whether the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition; When the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition, determining that the current display frame rate of the first foreground application does not match the current screen refresh rate; When the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the second power consumption control condition, it is determined that the current display frame rate of the first foreground application matches the current screen refresh rate.
2. The method according to claim 1, characterized in that The detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition includes: Obtain the current screen refresh rate and the current display frame rate of each foreground application; When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is greater than or equal to a first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition; When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than the first threshold, it is determined that the degree of match between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
3. The method according to claim 1, characterized in that The detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition includes: Within a preset detection time, counting the number of commit operations performed by the graphics synthesizer SF on the buffer corresponding to each foreground application and the number of synthesized image frames to be sent and displayed in the buffer corresponding to each foreground application; When the ratio of the number of synthesis times corresponding to the first foreground application to the number of commit operations is greater than or equal to a second threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition; When the ratio of the number of synthesis times corresponding to the first foreground application to the number of commit operations is less than a second threshold, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
4. The method according to claim 1, characterized in that The detecting whether the matching degree between the current display frame rate of each foreground application and the current screen refresh rate corresponding to the electronic device meets the first power consumption control condition includes: When at least one of the foreground applications calls a hardware decoder, obtaining the current screen refresh rate and the decoding frame rate of the hardware decoder; When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is greater than or equal to the first threshold, determining that the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the first power consumption control condition; When the ratio between the current screen refresh rate and the decoding frame rate of the hardware decoder is less than a first threshold, it is determined that the degree of match between the current display frame rate of the first foreground application and the current screen refresh rate does not meet the first power consumption control condition.
5. The method according to claim 1, characterized in that The detecting whether the matching degree between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition includes: Obtaining the current screen refresh rate and the current display frame rate of the first foreground application; When the ratio between the current screen refresh rate and the current display frame rate of the first foreground application is less than a first threshold value and greater than or equal to a second threshold value, counting the number of synthesis of SF for each of the foreground applications within a preset detection time length to determine the synthesis frequency of the SF; When the synthesis frequency of the SF is greater than the current display frame rate of the first foreground application, it is determined that the degree of matching between the current display frame rate of the first foreground application and the current screen refresh rate meets the second power consumption control condition.
6. The method according to any one of claims 1 to 5, characterized in that: The display power consumption control strategy is any one of the following strategies: reducing the screen refresh rate of the electronic device, reducing the running time of the image synthesizer SF on the buffer corresponding to each of the foreground applications, and aligning the vertical synchronization vsync signals corresponding to each of the foreground applications, wherein the invalid commit operation refers to the commit operation performed by the SF when the foreground application is using the buffer to prepare the image frame to be displayed.
7. The method according to claim 6, characterized in that The determining, according to the current screen refresh rate and the current display frame rate of each foreground application, a display power consumption control strategy corresponding to the electronic device includes: In a case where the degree of matching between the current display frame rate of at least one of the foreground applications and the current screen refresh rate meets the first power consumption control condition, and the current screen refresh rate is greater than the minimum screen refresh rate corresponding to the electronic device, determining a target screen refresh rate corresponding to the electronic device according to the current screen refresh rate, the minimum screen refresh rate and the current display frame rates of each of the foreground applications, wherein the target screen refresh rate is less than the current screen refresh rate and greater than or equal to the minimum screen refresh rate; The performing power consumption control on the display process of the electronic device according to the display power consumption control strategy to reduce the display power consumption of the electronic device includes: The current screen refresh rate is reduced to the target screen refresh rate.
8. The method according to claim 6, characterized in that The determining, according to the current screen refresh rate and the current display frame rate of each foreground application, a display power consumption control strategy corresponding to the electronic device includes: When the degree of match between the current display frame rate of at least one of the foreground applications and the current screen refresh rate meets the first power consumption control condition, and the current screen refresh rate is equal to the minimum screen refresh rate corresponding to the electronic device, the display power consumption control strategy is determined to reduce the running time of the invalid commit operation of the SF on the buffer corresponding to each of the foreground applications.
9. The method according to claim 8, characterized in that The performing power consumption control on the display process of the electronic device according to the display power consumption control strategy to reduce the display power consumption of the electronic device includes: When the SF performs a commit operation on the buffer corresponding to the foreground application, determining a usage status of the buffer corresponding to the foreground application; When the usage status of the buffer corresponding to the foreground application is the data preparation status, the subsequent process of executing the commit operation is terminated.
10. The method according to claim 6, characterized in that The determining, according to the current screen refresh rate and the current display frame rate of each foreground application, a display power consumption control strategy corresponding to the electronic device includes: When the degree of matching between the current display frame rate of each foreground application and the current screen refresh rate meets the second power consumption control condition, the display power consumption control strategy is determined to align the vsync signals corresponding to each foreground application.
11. The method according to any one of claims 1 to 5 or 7 to 10, characterized in that: The determining the current display scene corresponding to the electronic device according to each changed foreground application includes: Obtaining the type of each foreground application, the number of foreground applications, and the display mode of each foreground application; The current display scene corresponding to the electronic device is determined according to the type of each foreground application, the number of the foreground applications and the display mode of each foreground application.
12. The method according to claim 11, characterized in that The determining, according to the type of each foreground application, the number of the foreground applications, and the display mode of each foreground application, a current display scene corresponding to the electronic device includes: When the type of at least one of the foreground applications is a preset application type and the number of the foreground applications is greater than or equal to 2, determining whether the display mode corresponding to at least one of the foreground applications is floating display; When the display mode corresponding to at least one of the foreground applications is floating display, the current display scene is determined to be the power consumption control scene.
13. The method according to any one of claims 1 to 5 or 7 to 10, characterized in that: After the display process of the electronic device is controlled according to the display power consumption control strategy to reduce the display power consumption of the electronic device, the method further includes: When a trigger event corresponding to any of the foreground applications is obtained, the power consumption control of the display process of the electronic device is terminated, and the current display frame rate of each foreground application is re-detected to see whether it matches the current screen refresh rate.
14. The method according to any one of claims 1 to 5 or 7 to 10, characterized in that: After the synthetic display transmission process of the electronic device is controlled according to the display power consumption control strategy to reduce the display power consumption of the electronic device, the method further includes: When a change is detected in the foreground application, the power consumption control of the display process of the electronic device is terminated.
15. An electronic device, characterized in that: The electronic device comprises: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes the method as described in any one of claims 1-14.
16. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1-14.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, and when the instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Screen refresh rate adjusting method and device, equipment and medium
CN111583886A
