Color gradation adjusting method and electronic equipment

By dynamically adjusting the color level of the display, first set it to a lower level to avoid brightness flickering, and then adjust it to a higher level step by step to save power consumption, solving the problem of brightness flickering and insufficient power consumption during interface switching.

CN120071793APending Publication Date: 2025-05-30HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410268611.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-22
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

During the interface switching process, fixed setting of high color level results in brightness flickering problems, and it is also impossible to maximize the power consumption of the display screen.

Method used

Dynamically adjust the color level of the display, first set the color level to a lower level to avoid brightness flickering, and then gradually adjust to a higher level to minimize power consumption.

Benefits of technology

It effectively avoids the brightness flickering problem during interface switching, and at the same time saves the power consumption of the display to the greatest extent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120071793A_ABST
    Figure CN120071793A_ABST
Patent Text Reader

Abstract

The invention discloses a color gradation adjusting method and electronic equipment, and belongs to the technical field of display. The method comprises the steps that a first window of a first application is displayed at a first moment; wherein the color gradation of the electronic equipment at the first moment is a first color gradation; in response to a first window switching operation input by the user, displaying a second window of a second application at a second moment; wherein after the second window is displayed, the color gradation of the electronic equipment is changed into a second color gradation, and the second color gradation is smaller than the first color gradation; and changing the color gradation of the electronic equipment into the first color gradation at a third moment after the interval of the first duration from the second moment. Thus, on one hand, the color gradation is firstly changed into the second color gradation with the lower color gradation grade, and the brightness flickering phenomenon after window change can be avoided. And on the other hand, the second color gradation is adjusted to the first color gradation with the higher color gradation level, so that the electronic equipment can be kept at the higher color gradation level after the second window is stabilized, and the power consumption of the display screen is reduced to the greatest extent.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202311557962.2, the original application date is November 22, 2023, and the entire content of the original application is incorporated herein by reference. Technical Field

[0002] This application belongs to the field of display technology, and particularly relates to a color level adjustment method and an electronic device. Background Art

[0003] The hardware with high power consumption in an electronic device is mainly the display screen. In order to reduce the power consumption of the display screen, the display power saving technology (DPST) has emerged.

[0004] DPST is a technology for reducing the power consumption of the display screen by adjusting the color level. Specifically, the electronic device can adjust the brightness and darkness of the displayed or to-be-displayed image based on the set color level by using a brightness compensation algorithm, so that the brightness and darkness of the adjusted image are adapted to the backlight brightness. Among them, the higher the color level, the more power is saved, the more brightness compensation is required, and the longer the calculation time of the brightness compensation algorithm.

[0005] Generally, the electronic device fixedly sets the color level to 3 levels. If more power is to be saved, the color level can be fixedly set to 6 levels. However, if the color level is fixedly set to 6 levels, due to the longer calculation time of the brightness compensation algorithm, during the interface switching process, the user can perceive obvious brightness flicker. Summary of the Invention

[0006] This application provides a color level adjustment method and an electronic device, which can solve the problem of brightness flicker during interface switching and can save the power consumption of the display screen to the greatest extent.

[0007] In a first aspect, this application provides a color level adjustment method, which is applied to an electronic device. The method includes: displaying a first window of a first application at a first moment; wherein, the color level of the electronic device at the first moment is a first color level; in response to a first window switching operation input by the user, displaying a second window of a second application at a second moment; wherein, after displaying the second window, the color level of the electronic device becomes a second color level, and the second color level is less than the first color level; at a third moment after an interval of a first duration from the second moment, the color level of the electronic device becomes the first color level.

[0008] In this way, after the window of the electronic device is switched from the first window to the second window, the color level of the electronic device first changes to the second color level of the lower color level grade, and then is adjusted from the second color level to the first color level of the higher color level grade. In this way, on the one hand, the color level first changes to the second color level of the lower color level grade, which can avoid the brightness flicker phenomenon after the window changes. On the other hand, adjusting from the second color level to the first color level of the higher color level grade can keep the electronic device at the higher level color level after stabilizing the second window, thereby minimizing the power consumption of the display screen to the greatest extent.

[0009] In one implementable manner, at the first moment, the first window is the focus window; at the second moment, the focus window changes from the first window to the second window.

[0010] In one implementable manner, the method further includes: after the second moment, based on the change of the focus window, adjusting the color level of the electronic device to the second color level.

[0011] In this way, as long as the focus window changes, the color level of the electronic device will be adjusted to the second color level to ensure that there is no brightness flicker problem during each focus window switching process.

[0012] In one implementable manner, at the third moment after the first duration from the second moment, the color level of the electronic device becomes the first color level, including: at the second duration after the second moment, the color level of the electronic device becomes the third color level; wherein, the third color level is less than the first color level and greater than the second color level, and the second duration is less than the first duration; at the third duration after the second moment, the color level of the electronic device becomes the fourth color level; wherein, the fourth color level is less than the first color level and greater than the third color level, and the third duration is greater than the second duration and less than the first duration.

[0013] In this way, the color level of the electronic device can be adjusted from the second color level of the lower level to the first color level of the higher color level by gradually adjusting the color level grade. This can ensure the stability of the brightness displayed during the color level adjustment process.

[0014] In one implementable manner, at the second duration after the second moment, the color level of the electronic device becomes the third color level, including: setting a first timer after the second moment, where the first timer is used to time the stable duration of the focus window; after the timing time of the first timer reaches the preset stable duration, obtaining the first current color level of the electronic device, where the first current color level is the second color level; in the case where the first current color level is less than the first color level, adjusting the color level of the electronic device to the third color level.

[0015] In one implementable manner, before setting the first timer, it further includes: when there is a first timer that is timing after the second moment, turning off the first timer that is timing.

[0016] In this way, by setting the first timer, after waiting for the second window to stabilize, the process of adjusting from the second color level to the first color level can be carried out. If a new window change is detected within the preset stable duration, the first timer that is timing can be turned off, and a new first timer can be set to re-time the preset stable duration. In this way, the color level adjustment process based on the previous focus window change can be interrupted in a timely manner.

[0017] In one implementable manner, in the third duration after the second moment, the color level of the electronic device becomes the fourth color level, including: after the second moment, setting the display power saving technology (DPST) characteristic parameter to the first parameter; setting a first timer, where the first timer is used to time the stable duration of the focus window; after the timing time of the first timer reaches the preset stable duration, setting the DPST characteristic parameter to the second parameter; obtaining the first current color level of the electronic device, where the first current color level is the second color level; when the first current color level is less than the first color level, adjusting the second color level to the third color level; after adjusting the second color level to the third color level, when the DPST characteristic parameter is the second parameter, obtaining the second current color level of the electronic device, where the second current color level is the third color level; when the second current color level is less than the first color level, adjusting the third color level of the electronic device to the fourth color level.

[0018] In this way, if a new window change occurs during the process of gradually adjusting the color level, the color level adjustment process based on the previous focus window change can be interrupted in a timely manner based on the change of the DPST characteristic parameter.

[0019] In one implementable manner, after adjusting the second color level to the third color level, it further includes: when the DPST characteristic parameter is the second parameter, setting a second timer, where the second timer is used to time the preset cycle interval time; when the timing time of the second timer reaches the preset cycle interval time and no focus window change notification is recognized within the preset cycle interval time, obtaining the second current color level; where the focus window change notification is used to notify a focus window change.

[0020] In this way, if a new window change occurs during the waiting process of the preset cycle interval time, the color level adjustment process based on the previous focus window change can be interrupted in a timely manner based on the focus window change notification.

[0021] In one implementable manner, the method further includes: in response to a second window switching operation input by a user, displaying a third window at a fourth moment; after displaying the third window, the color level of the electronic device becomes the second color level, and the fourth moment is after the third moment; within a second duration after the fourth moment, the color level of the electronic device becomes a third color level; wherein, the third color level is less than the first color level and greater than the second color level; after the color level of the electronic device becomes the third color level, in response to a third window switching operation input by the user, displaying a fourth window at a fifth moment; after displaying the fourth window, the color level of the electronic device becomes the second color level.

[0022] In this way, when switching from the second window to the third window and from the third window to the fourth window, the color level of the electronic device will be changed back to the second color level.

[0023] In one implementable manner, at the fourth moment, the third window is the focused window; at the fifth moment, the focused window changes from the third window to the fourth window; based on the change of the focused window, the color level of the electronic device is adjusted to the second color level.

[0024] In one implementable manner, the method further includes: after the color level of the electronic device becomes the third color level, setting a second timer, where the second timer is used to time a preset cycle interval; in response to a third window switching operation input by the user, displaying a fourth window at a fifth moment within the preset cycle interval; after the fifth moment, generating a window change notification; based on the window change notification, ending the continuous adjustment of the color level of the third color level.

[0025] In this way, after the color level becomes the third color level, if a new window change occurs during the waiting process of the preset cycle interval, the color level adjustment process of the previous focus window change can be interrupted in a timely manner based on the focus window change notification.

[0026] In one implementable manner, after the second moment, based on the change of the focused window, adjusting the color level of the electronic device to the second color level includes: after the second moment, based on the change of the focused window and the power mode of the electronic device being a DC power supply, adjusting the color level of the electronic device to the second color level.

[0027] In one implementable manner, the method further includes: in the case of recognizing an event of exiting the sleep state or a power-on event, adjusting the color level of the electronic device to the second color level.

[0028] In a second aspect, the present application further provides an electronic device, which includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device is caused to execute the method according to any one of the first aspect.

[0029] In a third aspect, the present application further provides a computer-readable storage medium, in which computer programs or instructions are stored. When the computer programs or instructions are run on a computer, the computer is caused to execute the method according to any one of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a schematic structural diagram of a display screen provided by an embodiment of the present application;

[0031] Figure 2 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application;

[0032] Figure 3 It is a software architecture diagram of an electronic device provided by an embodiment of the present application;

[0033] Figure 4 It is a software interaction diagram of a color level adjustment method provided by an embodiment of the present application;

[0034] Figure 5 For Figure 4 Color level change schematic diagram;

[0035] Figure 6 It is a software interaction diagram of another color level adjustment method provided by an embodiment of the present application;

[0036] Figure 7 For Figure 6 Color level change schematic diagram;

[0037] Figure 8 It is a software interaction diagram of another color level adjustment method provided by an embodiment of the present application;

[0038] Figure 9 For Figure 8 Color level change schematic diagram;

[0039] Figure 10 It is a software interaction diagram of another color level adjustment method provided by an embodiment of the present application;

[0040] Figure 11 For Figure 10 Color level change schematic diagram;

[0041] Figure 12 This is a software interaction diagram of another method for adjusting color levels provided by an embodiment of the present application;

[0042] Figure 13 This is a workflow diagram of another method for adjusting color levels provided by an embodiment of the present application;

[0043] Figure 14 This is provided by an embodiment of the present application based on Figure 13 Schematic diagram of color level change;

[0044] Figure 15 This is a schematic diagram of the change in color level grades read by the tool PowerMax. Detailed implementation manners

[0045] To facilitate the understanding of the technical solution of the application, some concepts involved in the present application will be described first below.

[0046] Focus window, (focus window), refers to the window that has the focus. The focus window is the only window that can receive keyboard input. The determination method of the focus window is associated with the focus mode of the system. The top-level window of the focus window is called the active window (active window). Only one window can be the active window at the same time. The focus window is most likely the window that the user currently needs to use.

[0047] Exemplarily, the focus window can be the window that is displayed in the frontmost position of the electronic device and can be directly operated by the user. When the electronic device displays the first window (or the first interface), the focus window can correspond to the first window. When the electronic device displays the second window (or the second interface), the focus window can correspond to the second window.

[0048] The focus mode can be used to determine how the mouse makes a window obtain the focus. Generally, the focus mode can include three types, namely:

[0049] (1) Click-to focus, in this mode, the window clicked by the mouse can obtain the focus. That is, when the mouse clicks on any position of a window that can obtain the focus, the window can be activated, and the window will be placed in the front of all windows and receive keyboard input. When the mouse clicks on other windows, this window will lose the focus.

[0050] (2) Focus-follow-mouse. In this mode, the window under the mouse can obtain focus. That is, when the mouse moves into the range of a window that can obtain focus, the user can activate this window and receive keyboard input without clicking on a certain place of the window, but this window is not necessarily placed in the front of all windows. When the mouse moves out of the range of this window, this window will also lose focus accordingly.

[0051] (3) Sloppy focus. This focus mode is similar to focus-follow-mouse: when the mouse moves into the range of a window that can obtain focus, the user can activate this window and receive keyboard input without clicking on a certain place of the window, but this window is not necessarily placed in the front of all windows. Different from focus-follow-mouse, when the mouse moves out of the range of this window, the focus will not change accordingly. Only when the mouse moves to another window that can receive focus, the system focus will change.

[0052] The hardware with high power consumption in an electronic device is mainly the display screen. According to statistics, in normal use, the display screen consumes almost one-third of the power of the electronic device. In order to reduce the power consumption of the display screen, the display power saving technology (DPST) came into being.

[0053] The following takes the liquid crystal display (LCD) as an example to introduce DPST.

[0054] Figure 1 This is a schematic structural diagram of an LCD provided for the embodiments of this application. As Figure 1 shown, the LCD includes a circuit layer 10, a backlight layer 20, a liquid crystal layer 30, a polarization unit 40, a color filter 50, and a surface layer 60 arranged in sequence.

[0055] The circuit layer 10 can supply power to the backlight layer 20 to make the backlight layer 20 emit uniform white light. The liquid crystal layer 30 deflects the light according to the color and brightness information of each point. Since the deflection rates of different primary color lights are different, it affects the final colors of different points. Thus, it can be seen that the truly luminous part in the LCD is the backlight layer 20. In other words, the backlight layer 20 is the most power-consuming part in the LCD. The stronger the backlight brightness provided by the backlight layer 20, the higher the power consumption of the LCD. Therefore, weakening the backlight brightness of the backlight layer 20 can reduce the power consumption of the LCD. And the liquid crystal layer 30 is actually a dissipative layer, and the light can be deflected and blocked through the color filter 50 and the polarization unit 40.

[0056] It should be understood that the lower the backlight brightness, the lower the power consumption of the LCD. However, the overall displayed image will become darker. DPST is a technology that can maintain the overall display quality even when the backlight brightness is weakened, without the user perceiving a change in the brightness or darkness of the displayed image. In this way, DPST can reduce the power consumption of the LCD without affecting the user's visual experience.

[0057] DPST is a technology that reduces the power consumption of the display screen by adjusting the color level. The color level is an index representing the brightness or darkness of an image, and the color level can affect the brightness or darkness of the displayed or to-be-displayed image. Specifically, the electronic device can adjust the brightness or darkness of the displayed or to-be-displayed image based on the set color level using a brightness compensation algorithm, so that the brightness or darkness of the adjusted image is adapted to the backlight brightness, ensuring that the user does not perceive a change in the brightness or darkness of the displayed image. Among them, the higher the color level, the more brightness compensation is required, and the longer the calculation time of the brightness compensation algorithm.

[0058] That is to say, DPST can use the brightness compensation algorithm to modify the pixel data of the displayed or to-be-displayed image to achieve the purpose of adjusting the brightness or darkness of the displayed or to-be-displayed image.

[0059] Specifically, DPST can include multiple color levels. The higher the color level, the more power consumption is saved. For example, DPST can include six color levels from 1 to 6. Among them, color level 6 saves the most power consumption, and color level 1 saves the least power consumption. Generally, the electronic device fixedly sets the color level to 3 levels. If more power consumption is to be saved, the color level can be fixedly set to 6 levels. However, if the color level is fixedly set to 6 levels, due to the longer calculation time of the brightness compensation algorithm, during the interface switching process, the user can perceive obvious brightness flickering, which can also be called screen flickering. For example, the display screen shows phenomena such as flickering or irregular flashing.

[0060] The embodiment of the present application provides a color level adjustment method, which can monitor the change of the focus window and dynamically adjust the color level of the display screen according to the change of the focus window to solve the problem that the user can perceive obvious brightness flickering during the interface switching process.

[0061] The color level adjustment method provided by the embodiment of the present application can be applied to an electronic device. The electronic device can be a terminal device with a display screen such as a mobile phone, a tablet computer, a laptop computer, a computer, etc. The embodiment of the present application does not limit the specific form of the electronic device here.

[0062] The following embodiments only take the electronic device as a laptop computer as an example to illustrate the color level adjustment method provided by the embodiment of the present application.

[0063] Figure 2This is a schematic diagram of the hardware structure of an electronic device 100 provided by an embodiment of the present application.

[0064] As Figure 2 shown, the 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, a wireless communication module 150, a display screen 160, etc.

[0065] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0066] 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 processing unit (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. Among them, different processing units may be independent devices or integrated in one or more processors.

[0067] The controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0068] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0069] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an 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 USB interface, etc.

[0070] It can be understood that the interface connection relationship between the modules illustrated in this embodiment is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. In some other embodiments, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0071] The charging management module 140 is configured to receive a charging input from a charger. Among them, the charger may be a wireless charger or a wired charger. While charging the battery 142, the charging management module 140 may also supply power to the electronic device through the power management module 141.

[0072] 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 inputs 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 160, the wireless communication module 150, etc. In some embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.

[0073] The wireless communication module 150 may provide solutions for wireless communications applied to the electronic device 100, including WLAN (such as Wi-Fi), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. For example, in the embodiments of the present application, the electronic device 100 may establish a Bluetooth connection with a terminal device (such as the wireless earphone 100) through the wireless communication module 150.

[0074] The wireless communication module 150 may be one or more devices integrating at least one communication processing module. The wireless communication module 150 receives electromagnetic waves via an antenna, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 150 may also receive the signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna for radiation.

[0075] The electronic device 100 realizes the display function through the GPU, the display screen 160, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 160 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0076] The display screen 160 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc.

[0077] The external memory interface 120 can be used to connect to an external memory card, such as a Micro SD card, to implement the storage capacity expansion of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.

[0078] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes 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. For example, in the embodiment of the present application, the processor 110 can execute the instructions stored in the internal memory 121, and the internal memory 121 can include a program storage area and a data storage area.

[0079] Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0080] The software system of the above-mentioned electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiment of the present invention, the Windows system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device 100.

[0081] Figure 3 This is a software architecture diagram of an electronic device 100 provided for the embodiment of the present application.

[0082] As Figure 3 shown, the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Windows system includes an application layer and an operating system (OS) layer. Among them, the application layer and the OS layer can run on a system-on-a-chip (SOC). The SOC can be connected to external devices through a bus, and the external devices can include a display screen, a camera, a keyboard, a mouse, etc.

[0083] The application layer may include a computer management application (application, APP). Among them, the application layer may also include other applications (not shown in the figure), such as music, video, games, office, social, etc., shopping applications, browser and other applications, which are not limited in this application.

[0084] The OS layer may include OS services and a kernel. The kernel may include an iGPU driver, and the iGPU driver is an integrated graphics card driver. The kernel may also include drivers such as a mouse driver, an audio and video driver, a camera driver, a keyboard driver, etc., which are not limited in this application.

[0085] Among them, the computer management APP may include a system probe and a DPST policy scheduling module. The system probe may include a window status probe and a system event probe, and the DPST policy scheduling module may include a window status monitoring sub-module, an event filtering sub-module, and a DPST adjustment sub-module.

[0086] The window status probe may monitor whether the focus window of the electronic device 100 changes. When it monitors that the focus window changes, the window status probe may send a window status change notification to the window status monitoring sub-module to notify the DPST policy scheduling module that the focus window has changed.

[0087] In response to monitoring that the focus window has changed, the DPST adjustment sub-module may execute a gamma adjustment policy based on the change of the focus window. For example, first adjust the gamma to 3 levels, and then gradually adjust the gamma to 6 levels.

[0088] The system event probe may monitor the sleep event and the power-on event of the electronic device 100. When it monitors that the electronic device 100 exits the sleep event or the power-on event, the system event probe may send a notification of the exit sleep event or the power-on event to the event filtering sub-module to notify the DPST policy scheduling module that the system exits sleep or starts up.

[0089] In response to monitoring that the system exits sleep or starts up, the DPST adjustment sub-module may execute a gamma adjustment policy based on the exit sleep or power-on startup. For example, directly adjust the gamma to 3 levels.

[0090] After the DPST policy scheduling module determines the color level to be adjusted, it can send the color level parameter through the interface in the IGCL library (such as the ctlGetPowerOptimizationSetting function). Then, the IGCL library sends the color level parameter to the integrated display (IGPU) driver. After that, the IGPU / CPU / GPU, etc. of the SOC can perform brightness compensation processing on the displayed or to-be-displayed image based on the received color level parameter using the brightness compensation algorithm. Finally, the image after brightness compensation processing is sent to the display screen for display.

[0091] It should be noted that, in the embodiments of this application, only the Windows system is taken as an example for illustration. In other operating systems (such as the Android system, the IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of this application, the solution of this application can also be implemented.

[0092] Figure 4 The module interaction diagram of a color level adjustment method provided by the embodiments of this application is shown. In the following embodiments, the window state probe, the system event probe, and the DPST policy scheduling module can be independent modules respectively, and the window state monitoring sub-module, the event filtering sub-module, and the DPST adjustment sub-module can be three threads in the DPST policy scheduling module. For example, the color level adjustment method provided by the embodiments of this application is exemplarily described. Among them, the window state monitoring sub-module can also be called the window state monitoring thread, the event filtering sub-module can also be called the event filtering thread, and the DPST adjustment sub-module can also be called the DPST adjustment thread. The window state monitoring thread, the event filtering thread, and the DPST adjustment thread can be asynchronous threads.

[0093] As Figure 4 shown, a color level adjustment method provided by the embodiments of this application may include the following steps:

[0094] S201, the window state probe monitors whether the focused window changes.

[0095] S202, when it is monitored that the focused window changes, the DPST policy scheduling module sets the color level of the electronic device to the initial color level.

[0096] Exemplarily, at the first moment, the electronic device displays the first window of the first application. For example, the first application is a video application, and the first window is the search interface of the video application. In response to the user's operation on the first application, at the second moment, the electronic device displays the second window. For example, the user exits the video application and returns to the main interface of the electronic device. When the electronic device switches from the search interface of the video application to the main interface, the window state probe can monitor that the focused window changes from the first window to the second window, thereby determining that the focused window changes.

[0097] After detecting a change in the focused window, the DPST policy scheduling module can first set the color level of the electronic device to the initial color level. The initial color level can be a color level of a relatively small level. In this way, for a color level of a relatively small level, the calculation time of the brightness compensation algorithm is relatively short, which can ensure that there is no screen flashing phenomenon after switching to the second window. For example, in the embodiments of the present application, the color level of the initial color level can be 3 levels.

[0098] In some embodiments, the power mode of the electronic device can also be monitored. The power mode can include alternating current (AC) and direct current (DC). When the power mode of the electronic device is AC, it indicates that the electronic device is connected to an adapter and powered by a power source such as a socket. In this power mode, the power consumption problem of the display screen can be ignored. When the power mode of the electronic device is DC, it indicates that the electronic device is powered by a battery. In this power mode, the power consumption problem of the display screen needs to be considered.

[0099] Therefore, in the embodiments of the present application, when it is detected that the power mode of the electronic device is DC and the focused window changes, the DPST policy scheduling module sets the color level of the electronic device to the initial color level. That is to say, when it is detected that the focused window changes, but the power mode is AC, the DPST policy scheduling module does not need to be triggered to execute step S202.

[0100] S203. The DPST policy scheduling module sends the initial color level to the IGPU driver.

[0101] In some embodiments, the color level can be set by calling the ctlGetPowerOptimizationSetting function. The ctlGetPowerOptimizationSetting function is an interface in the intel IGCL library for setting and obtaining the color level. After sending the initial color level to the IGPU driver, the IGPU / CPU / GPU, etc. of the SOC can perform brightness compensation processing on the displayed or to-be-displayed image based on the received initial color level by using the brightness compensation algorithm. Finally, the image after the brightness compensation processing is sent to the display screen for display.

[0102] S204. The DPST policy scheduling module sets a first timer, and the first timer is used to time the stable duration of the focused window.

[0103] The stable duration of the focused window refers to the duration during which the focused window remains unchanged. For example, after the focused window changes to the second window, the duration during which the second window does not change to the focused window again.

[0104] After the embodiment of the present application monitors that the focus window changes, the color scale is first set to the initial color scale. Then, when the focus window does not change again within the preset stable duration, the DPST adjustment thread can be started to gradually adjust the color scale level from the initial color scale to the target color scale. Among them, the color scale level of the target color scale is higher than that of the initial color scale. In this way, by gradually adjusting the color scale from a lower-level color scale to a higher-level target color scale, the problem of screen flashing when the color scale is fixedly set to 6 levels can be solved.

[0105] The embodiment of the present application does not limit the specific value of the preset stable duration. For example, the preset stable duration can be 120s. If the timing time (WaitTime) of the first timer reaches 120s, the DPST adjustment thread can be started.

[0106] The above steps S201 to S204 can be understood as the logic for judging the stability of the focus window. After the focus window is stable, the DPST adjustment thread can be started to gradually adjust the color scale level from the initial color scale to the target color scale. Among them, the steps of gradually adjusting the color scale level from the initial color scale to the target color scale can refer to steps S205 to S208.

[0107] S205, when the timing time WaitTime of the first timer reaches the preset stable duration, the DPST policy scheduling module obtains the current color scale curLevel.

[0108] In some embodiments, the current color scale curLevel can be obtained by calling the ctlGetPowerOptimizationSetting function.

[0109] S206, determine whether the current color scale curLevel is less than the target color scale.

[0110] The embodiment of the present application does not limit the target color scale. Exemplarily, the target color scale can be the highest-level color scale in DPST. For example, the target color scale is 6 levels. It should be understood that if the highest-level color scale in future DPST exceeds 6 levels, the target color scale can be the highest-level color scale in future DPST.

[0111] S207, if the current color scale curLevel is less than the target color scale, set the color scale curLevel to curLevel + 1.

[0112] S208, the DPST policy scheduling module sends the current color scale curLevel to the IGPU driver.

[0113] Among them, the current color scale curLevel sent by the DPST policy scheduling module to the IGPU driver is the latest set color scale curLevel.

[0114] S209. Loop and execute the above steps S205 to S208 at a preset loop interval until the current color level is equal to the target color level, and then exit the DPST adjustment thread.

[0115] Exemplarily, a second timer can be set, which is used to time the preset loop interval. In this way, after setting curLevel = curLevel + 1 in S207, the second timer can start timing. When the timing time reaches the preset loop interval, execute S205 to S208 again until the current color level curLevel is not less than the target color level.

[0116] The above steps S205 to S208 are a loop process. Taking the color level of the initial color level as 3, the color level of the target color level as 6, and the preset loop interval as 12s as an example, the above loop process is described.

[0117] Combined with Figure 4 and Figure 5 As shown, it is monitored that the focus window changes at time T0, and the current color level curLevel is set to 3. After the stable duration WaitTime = 120s of the focus window timed by the first timer, the above steps S205 - S208 are started to be executed. Specifically, after WaitTime = 120s, the currently obtained current color level curLevel for the first time is 3. Since the current color level curLevel is 3, which is less than the target color level (i.e., 6), at time T1 after WaitTime = 120s, the color level curLevel is set to 4. After setting the color level curLevel to 4, wait for the loop interval CycleTime = 12s, and the currently obtained current color level curLevel for the second time is 4. Since the current color level curLevel is 4, which is less than the target color level (i.e., 6), at time T2 after the first CycleTime = 12s, the color level curLevel is set to 5. After setting the color level curLevel to 5, wait for the loop interval CycleTime = 12s again, and the currently obtained current color level curLevel for the third time is 5. Since the current color level curLevel 5 is less than the target color level (i.e., 6), at time T3 after the second CycleTime = 12s, the color level curLevel is set to 6. After setting the color level curLevel to 6, wait for the loop interval CycleTime = 12s again, and the currently obtained current color level for the third time is 6. Since the current color level curLevel is 6, which is not less than the target color level (i.e., 6), thus the loop algorithm ends and the DPST adjustment thread can be exited.

[0118] In this way, for the color level adjustment method provided by the embodiments of the present application, after detecting a change in the focused window, the color level is first adjusted to a lower-level color level. For example, the lower-level color level is 3 levels, so as to ensure that there is no screen flashing phenomenon in the switched interface. Further, after waiting for the focused window to stabilize, the color level is gradually increased to a higher level. For example, the higher-level color level is 6 levels. In this way, when the focused window changes, that is, after the interface is switched, there will be no screen flashing phenomenon, and the power consumption of the display screen can be saved to the greatest extent.

[0119] It should be noted that the above embodiments only take the scenario where a change in the focused window is detected as an example to exemplarily illustrate the color level adjustment method provided by the embodiments of the present application. In some embodiments, when the electronic device exits the sleep state or is powered on, the display of the interface is also involved, so the problem of screen flashing is also involved.

[0120] To solve the problem of screen flashing of the electronic device in the scenario where the electronic device exits the sleep state or is powered on, as Figure 4 shown, the color level adjustment method provided by the embodiments of the present application may further include the following steps:

[0121] S210, The OS service reports the event of exiting the sleep state or the power-on event to the system event probe.

[0122] S211, Based on the event of exiting the sleep state or the power-on event reported by the OS service, the system event probe determines that the current scenario is the event of exiting the sleep state or the power-on event.

[0123] S212, The DPST policy scheduling module sets the color level to the initial color level.

[0124] Among them, after the event of exiting the sleep state, the display interface of the electronic device usually displays the interface before sleep. After being powered on, the display interface of the electronic device usually displays the main interface of the electronic device. In the embodiments of the present application, after the electronic device exits the sleep state or is powered on, the color level is directly set to the initial color level. For example, the color level of the initial color level is 3 levels. In this way, there will be no screen flashing phenomenon when displaying the interface before sleep or the main interface of the electronic device.

[0125] After displaying the interface before sleep or the main interface of the electronic device, the above steps S201 to S209 can be executed. That is, after exiting the sleep state or being powered on, the color level is first set to 3 levels. Then, if a change in the focused window is detected, the color level is first set to 3 levels, and then gradually adjusted to 6 levels. In this way, there will be no screen flashing phenomenon during the interface switching process in the scenarios where the electronic device exits the sleep state, is powered on, and the focused window changes.

[0126] In some embodiments, after the electronic device is powered on, the Computer Manager APP starts. When the Computer Manager APP starts, it can load a configuration file. For example, the configuration file may include the machine name adapted to the color level adjustment scheme provided in the embodiments of the present application, the initial color level, the stable duration WaitTime of the focused window, the preset cycle interval time CycleTime, etc.

[0127] S213. The DPST policy scheduling module sends the initial color level to the iGPU driver.

[0128] It should be noted that the color level adjustment scheme provided in the above embodiments is applicable to the situation where there is no change in the new focused window during the entire color level adjustment process. However, during the actual operation, new focused window changes may occur at different stages of the color level adjustment. If a new focused window change occurs, it means that the previous focused window is no longer displayed. Therefore, it is not necessary to continue adjusting the color level of the previous focused window. That is to say, if a new focused window change occurs, it is necessary to interrupt the ongoing color level adjustment, and then re-execute step S202 and the subsequent steps. Therefore, the embodiments of the present application may further include the following interruption mechanism to adapt to the situation where new focused window changes occur during the color level adjustment process.

[0129] The following describes several interruption mechanisms provided in the embodiments of the present application.

[0130] The first interruption mechanism is applicable to the situation where when the stable duration of the focused window counted by the first timer does not reach the preset stable duration, the window state probe monitors a new focused window change.

[0131] Exemplarily, as Figure 6 and Figure 7 shown, the color level adjustment scheme including the first interruption mechanism may include the following steps:

[0132] S301. The window state probe monitors whether the focused window changes.

[0133] S302. In the case where it is monitored that the focused window changes, the DPST policy scheduling module sets the color level of the electronic device to the initial color level.

[0134] S303. The DPST policy scheduling module sends the initial color level to the iGPU driver.

[0135] S304. The DPST policy scheduling module determines whether there is a running first timer.

[0136] S305. In the case where it is determined that there is a running first timer, the running first timer is turned off.

[0137] S306. After determining that there is no running first timer or after turning off the running first timer, the DPST policy scheduling module resets the first timer, which is used to time the stable duration of the focus window.

[0138] S307. When the timing time WaitTime of the first timer reaches the preset stable duration, the DPST policy scheduling module obtains the current color level curLevel.

[0139] S308. Determine whether the current color level curLevel is less than the target color level.

[0140] S309. If the current color level curLevel is less than the target color level, set the color level curLevel to curLevel + 1.

[0141] S310. The DPST policy scheduling module sends the current color level to the IGPU driver.

[0142] S311. According to the preset loop interval time, loop and execute the above steps S307 to S310 until the current color level is equal to the target color level.

[0143] Combined Figure 6 and Figure 7 As shown, at time T0, it is monitored that the focus window changes. Set the current color level curLevel to level 3, and set the first timer to time the stable duration WaitTime1 of the focus window. If a new focus window change is monitored at time T0' within the stable duration WaitTime1 of the focus window, interrupt the ongoing color level adjustment (i.e., interrupt Figure 7During the process from T0' to T3'. Instead, reset the current color level curLevel to level 3 and turn off the first timer that is currently timing. After that, the DPST policy scheduling module can reset a new first timer and restart timing the stable duration WaitTime2 of the focus window from 0s. If no new focus window change is detected within the restarted WaitTime2, the following steps S307 to S310 can be executed. That is, at the T1 moment after WaitTime2 = 120s, set the color level curLevel to level 4. After setting the color level curLevel to level 4, wait for the loop interval time CycleTime = 12s, and the currently obtained color level curLevel for the second time is level 4. Since the current color level curLevel of level 4 is less than the target color level (i.e., level 6), at the T2 moment after the first CycleTime = 12s, set the color level curLevel to level 5. After setting the color level curLevel to level 5, wait for the loop interval time CycleTime = 12s again, and the currently obtained color level curLevel for the third time is level 5. Since the current color level curLevel is level 5, which is less than the target color level (i.e., level 6), at the T3 moment after the second CycleTime = 12s, set the color level curLevel to level 6. After setting the color level curLevel to level 6, wait for the loop interval time CycleTime = 12s again, and the currently obtained color level for the third time is level 6. Since the current color level curLevel is level 6, which is not less than the target color level (i.e., level 6), thus, the loop algorithm ends here, and the DPST adjustment thread can be exited.

[0144] If a new focus window change is detected again within the restarted WaitTime2, then execute the steps of resetting the color level to level 3, turning off the first timer that is currently timing, and resetting the first timer again. In this way, the Figure 6 shown color level adjustment scheme can be applied to the situation where the window state probe detects a new focus window change again when the stable duration of the focus window timed by the first timer has not reached the preset stable duration. By using the Figure 6 shown color level adjustment scheme, the color level adjustment policy based on the previous focus window change can be interrupted in a timely manner.

[0145] It should be noted that steps S301 to S303 in the above embodiments can refer to the descriptions of steps S201 to S203, and steps S307 to S311 can refer to the descriptions of steps S205 to S209, which will not be elaborated here.

[0146] The second interruption mechanism is applicable to the situation where during the execution of S205 - S207 or S307 - S309, the window state probe monitors a new change in the focused window.

[0147] Exemplarily, as Figure 8 shown, the color level adjustment scheme including the second interruption mechanism may include the following steps:

[0148] S401, the window state probe monitors whether the focused window changes.

[0149] S402, in the case where it is monitored that the focused window changes, the DPST policy scheduling module sets the color level of the electronic device to the initial color level.

[0150] S403, the DPST policy scheduling module sends the initial color level to the IGPU driver.

[0151] S404, the DPST policy scheduling module sets the DPST characteristic parameter mFlag to True.

[0152] In the embodiment of the present application, in the case where the focused window changes, the window state monitoring thread can set mFlag to True, where mFlag = True can indicate that the focused window changes.

[0153] Among them, mFlag can include two parameter values, that is, mFlag = True or mFlag = Flase. The DPST characteristic parameter mFlag can be a global variable, that is to say, each thread in the DPST policy scheduling module can know whether the current mFlag = True or mFlag = Flase.

[0154] Exemplarily, after the window state monitoring thread sets mFlag = True, the DPST adjustment thread can know that mFlag = True. Correspondingly, after the DPST adjustment thread sets mFlag = Flase, the window state monitoring thread can know that mFlag = Flase.

[0155] S405, the DPST policy scheduling module sets a first timer, and the first timer is used to time the stable duration of the focused window.

[0156] S406, when the stable duration of the focused window reaches the preset stable duration, the DPST policy scheduling module sets the DPST characteristic parameter mFlag to Flase.

[0157] After the stable duration of the focus window in the embodiment of the present application reaches the preset stable duration, the DPST adjustment thread can first set the DPST characteristic parameter mFlag to False to start the DPST adjustment thread to adjust the initial color level to the target color level. That is to say, mFlag = False can be understood as the switch to start the DPST adjustment thread.

[0158] S407, the DPST policy scheduling module obtains the current color level curLevel.

[0159] S408, the DPST policy scheduling module determines whether the current color level curLevel is less than the target color level.

[0160] S409, if the current color level curLevel is less than the target color level, the DPST policy scheduling module sets the color level curLevel to curLevel + 1.

[0161] S410, the DPST policy scheduling module sends the current color level to the IGPU driver.

[0162] S411, the DPST policy scheduling module determines whether the DPST characteristic parameter mFlag is True.

[0163] In the embodiment of the present application, as long as a change in the focus window is detected, mFlag will be set to True. In this way, if a new focus window change is detected during the execution of steps S406 to S409, the mFlag = False originally set by the DPST adjustment thread will be reset to mFlag = True.

[0164] That is to say, the embodiment of the present application can determine whether a new focus window change is detected during the execution of steps S406 to S409 through mFlag = True or mFlag = False. Specifically, if the DPST policy scheduling module determines in step S411 that the DPST characteristic parameter mFlag = True, it means that a new focus window change is detected during the execution of steps S406 to S409. On the contrary, if the DPST policy scheduling module determines in step S411 that the DPST characteristic parameter mFlag = False, it means that no new focus window change is detected during the execution of steps S406 to S409.

[0165] S412, in the case where it is determined that the DPST characteristic parameter mFlag is True, exit the DPST adjustment thread.

[0166] In the case where it is determined that the DPST characteristic parameter mFlag is not True, the above steps S407 to S411 are cyclically executed at a preset cyclic interval time until the current color level is equal to the target color level.

[0167] It should be noted that before each waiting loop interval in the embodiments of the present application, step S411 needs to be judged once. If it is determined that the DPST characteristic parameter mFlag is not True, then the waiting loop interval time is started again.

[0168] It should be noted that in some embodiments, step S411 can also be executed first, and then step S410. In this way, if the DPST policy scheduling module determines that the DPST characteristic parameter mFlag is True, then step S410 will not be executed.

[0169] Exemplarily, as Figure 9 shown, at time T0, it is monitored that the focused window changes, the current color level curLevel is set to level 3, and mFlag = True is set. Then, the first timer is set to time the stable duration WaitTime1 of the focused window. At time T1 after WaitTime1 = 120s, mFlag = False is set. After that, the color level curLevel is set to level 4. If at time T1' during the process of adjusting the color level from level 3 to level 4, a new focused window change is monitored again, then the current color level curLevel is reset to level 3, and mFlag = True is reset again. In this way, after the color level is adjusted to level 4, it can be judged that mFlag = True, then the ongoing color level adjustment process based on the previous focused window change is interrupted (i.e., interrupt Figure 9 the process from T2' to T5' in Figure 9 ), and a new color level adjustment process based on the latest focused window change is started (i.e.,

[0170] the process from T1' to T4 in Figure 8 ). Figure 8 In this way, the above

[0171] The third interruption mechanism is applicable to the situation where the window status probe monitors a new focused window change during the period of waiting for the preset loop interval time.

[0172] Exemplarily, as Figure 10 shown, the color level adjustment scheme including the third interruption mechanism may include the following steps:

[0173] S501, the window status probe monitors whether the focused window changes.

[0174] S502. When it is detected that the focused window has changed, the DPST policy scheduling module sets the color level of the electronic device to the initial color level.

[0175] S503. The DPST policy scheduling module sends the initial color level to the IGPU driver.

[0176] S504. The DPST policy scheduling module generates a window change notification, which is used to notify that the focused window has changed.

[0177] S505. The DPST policy scheduling module sets a first timer, which is used to time the stable duration of the focused window.

[0178] S506. When the stable duration of the focused window reaches the preset stable duration, the DPST policy scheduling module obtains the current color level.

[0179] S507. The DPST policy scheduling module determines whether the current color level curLevel is less than the target color level.

[0180] S508. If the current color level curLevel is less than the target color level, the DPST policy scheduling module sets the color level curLevel to curLevel + 1.

[0181] S509. The DPST policy scheduling module sends the current color level to the IGPU driver.

[0182] S510. The DPST policy scheduling module determines whether a window change notification is recognized within the preset loop interval time.

[0183] It should be noted that the above steps S502, S504, and S505 can be executed by the window status monitoring thread, while S506 to S510 can be executed by the DPST adjustment thread. Since the window status monitoring thread and the DPST adjustment thread are asynchronous threads, if the focused window changes during the waiting loop interval period and the DPST adjustment thread is not notified, the DPST adjustment thread will not know that the focused window has changed.

[0184] In order for the DPST adjustment thread to promptly know that a new focus window change has occurred to interrupt the ongoing color level adjustment. In the embodiment of the present application, when a new focus window change is detected, the window status monitoring thread generates a window change notification, and this window change notification can be used specifically for the DPST adjustment thread to identify within the waiting preset loop interval. That is to say, if a new focus window change occurs within the waiting preset loop interval, the DPST adjustment thread can identify the window change notification. If the new focus window change does not occur within the waiting preset loop interval, the DPST adjustment thread will not identify the window change notification.

[0185] In this way, the DPST adjustment thread can determine whether it has identified the window change notification within the waiting preset loop interval. If the window change notification is identified, it means that the focus window has changed again. If the window change notification is not identified, it means that no new focus window change has occurred within the waiting preset loop interval, and the next color level adjustment can be continued.

[0186] S511, in the case of identifying a window change notification within the preset loop interval, exit the DPST adjustment thread.

[0187] In the case of determining that no window change notification is identified within the preset loop interval, execute the above steps S506 to S510 again until the current color level is equal to the target color level.

[0188] Exemplarily, as Figure 11 shown, at time T0, it is detected that the focus window has changed, and the current color level curLevel is set to level 3. Then, the first timer is set to time the stable duration WaitTime1 of the focus window. At time T1 after WaitTime1 = 120s, the current color level curLevel is adjusted from level 3 to level 4. After that, after waiting for the preset loop interval to reach 12s, the process of adjusting the current color level curLevel from level 4 to level 5 starts. If at time T1' within the waiting preset loop interval CycleTime, a new focus window change is detected again, a window change notification is generated. In this way, since the DPST adjustment thread identifies the window change notification within the waiting preset loop interval, the color level adjustment process based on the previous focus window change (i.e., Figure 11 the process from T1' to T3' in Figure 11 is interrupted, and the color level adjustment process based on the latest focus window change (i.e.,

[0189] It should be noted that the three interruption mechanisms provided in the above embodiments can be applied to the color level adjustment scheme provided in the embodiments of the present application alone, or any two or three of them can be combined and applied to the color level adjustment scheme provided in the embodiments of the present application.

[0190] The following takes the combined application of the three interruption mechanisms to the color level adjustment scheme provided in the embodiments of the present application as an example for illustration.

[0191] As Figure 12 shown, the combined application of the three interruption mechanisms to the color level adjustment scheme provided in the embodiments of the present application may include the following steps:

[0192] S601, the window state probe monitors whether the focus window changes.

[0193] S602, when it is monitored that the focus window changes, the DPST policy scheduling module sets the color level of the electronic device to the initial color level.

[0194] S603, the DPST policy scheduling module sends the initial color level to the IGPU driver.

[0195] S604, the DPST policy scheduling module determines whether there is a first timer that is running.

[0196] S605, when it is determined that there is a first timer that is running, the running first timer is turned off.

[0197] S606, when it is determined that there is no first timer that is running or after the running first timer is turned off, the DPST policy scheduling module sets the DPST characteristic parameter mFlag to True.

[0198] S607, the DPST policy scheduling module generates a window change notification, and the window change notification is used to notify that the focus window is monitored to change.

[0199] S608, the DPST policy scheduling module sets a first timer, and the first timer is used to time the stable duration of the focus window.

[0200] S609, when the stable duration of the focus window reaches the preset stable duration, the DPST policy scheduling module sets the DPST characteristic parameter mFlag to False.

[0201] S610, the DPST policy scheduling module obtains the current color level curLevel.

[0202] S611, the DPST policy scheduling module determines whether the current color level curLevel is less than the target color level.

[0203] S612. If the current color level curLevel is less than the target color level, the DPST policy scheduling module sets the color level curLevel to curLevel + 1.

[0204] S613. The DPST policy scheduling module sends the current color level to the IGPU driver.

[0205] S614. The DPST policy scheduling module determines whether the DPST characteristic parameter mFlag is True.

[0206] S615. When it is determined that the DPST characteristic parameter mFlag is not True, the DPST policy scheduling module determines whether a window change notification is recognized within the preset loop interval time.

[0207] S616. If a window change notification is recognized within the preset loop interval time, or when it is determined that the DPST characteristic parameter mFlag is True, the DPST adjustment thread is exited.

[0208] When it is determined that no window change notification is recognized within the preset loop interval time, the above steps S610 to S615 are executed again until the current color level is equal to the target color level.

[0209] In this way, if a new focus window change occurs during the waiting for the focus window to stabilize stage, through steps S604, S605, and S608, the first timer that is currently timing can be closed, and a new first timer can be recreated to restart the timing. In this way, by applying the first interruption mechanism, the color level adjustment process based on the previous focus window change can be interrupted. If a new focus window change occurs during the S609 to S612 stage, through steps S606, S609, and S614, based on the change of mFlag, it can be determined that a new focus window change occurs during the S609 to S612 stage. In this way, by applying the second interruption mechanism, the color level adjustment process based on the previous focus window change can be interrupted. If a new focus window change occurs during the preset loop interval time stage, through steps S607 and S615, based on the window change notification, it can be determined that a new focus window change occurs during the preset loop interval time stage. In this way, by applying the third interruption mechanism, the color level adjustment process based on the previous focus window change can be interrupted.

[0210] Among them, for the above steps S601 to S605, reference can be made to the descriptions of steps S301 to S306, for steps S606, S608 to S614, reference can be made to the descriptions of steps S404 to S412, and for steps S607, S615, reference can be made to the descriptions of steps S504 to S511, which will not be elaborated here.

[0211] It should be noted that the above embodiments are only examples for illustration with the adjustment strategy of increasing one color level each time, and do not represent a limitation on the color level adjustment strategy. For example, the color level can also be adjusted by increasing two color levels each time. For another example, the color level can also be adjusted by increasing one color level for the first time and two color levels for the second time, etc.

[0212] Figure 13 The flowchart of a color level adjustment method provided by an embodiment of this application. As Figure 13 shown, the method may include the following steps:

[0213] S701, display the first window of the first application at the first moment; wherein, the color level of the electronic device at the first moment is the first color level (which can also be called the target color level).

[0214] S702, in response to the first window switching operation input by the user, display the second window of the second application at the second moment; wherein, after the second window is displayed, the color level of the electronic device becomes the second color level (which can also be called the initial color level), and the second color level is less than the first color level.

[0215] S703, at the third moment after an interval of the first duration from the second moment, the color level of the electronic device becomes the first color level.

[0216] Exemplarily, as Figure 14 shown, the first window displayed at the first moment T1 can be the focus window. At the second moment T2, the focus window switches from the first window to the second window. Among them, the first application and the second application can be the same application or different applications, and the embodiments of this application do not limit this.

[0217] After the second moment T2, based on the change of the focus window, the color level becomes the second color level L2. Exemplarily, at the moment T2' after the second moment T2, the color level becomes the second color level L2. Among them, the color level of the first color level L1 can be 6 levels, and the color level of the second color level L2 can be 3 levels.

[0218] Among them, for the specific implementation manner of monitoring the change of the focus window, reference can be made to the descriptions of steps S201 to S202, which will not be elaborated here.

[0219] In some embodiments, as Figure 14As shown, at the third moment T3 after an interval of the first duration K1 from the second moment T2, the process of the color level of the electronic device changing to the first color level L1 may include: at the second duration K2 after the second moment T2, the color level of the electronic device changes to the third color level L3. Among them, the third color level L3 is less than the first color level L1 and greater than the second color level L2, and the second duration K2 is less than the first duration K1. At the third duration K3 after the second moment T2, the color level of the electronic device changes to the fourth color level L4. Among them, the fourth color level L4 is less than the first color level L1 and greater than the third color level L3, and the third duration K3 is greater than the second duration K2 and less than the first duration K1.

[0220] In some embodiments, at the second duration K2 after the second moment T2, the process of the color level of the electronic device changing to the third color level L3 can be implemented in some ways: set a first timer after the second moment T2, and the first timer is used to time the stable duration of the focus window. After the timing time of the first timer reaches the preset stable duration, obtain the first current color level of the electronic device, and the first current color level is the second color level L2; when the first current color level L2 is less than the first color level L1, adjust the color level of the electronic device from the second color level L2 to the third color level L3.

[0221] Exemplarily, taking the color level of the first color level L1 as 6 levels, the color level of the second color level L2 as 3 levels, the color level of the third color level L3 as 4 levels, and the color level of the fourth color level L4 as 5 levels as an example. Combining Figure 4 and Figure 14 , the above is the process of gradually adjusting the electronic device from the second color level L2 to the first color level L1. Among them, steps S201 to S208 can be executed once during the second duration K2 to adjust the color level from the second color level L2 to the third color level L3. The third duration K3 period includes the second duration K2 period, and during the third duration K3 period, the loop process of S205 to S208 can be executed one more time to adjust the color level from the third color level L3 to the fourth color level L4.

[0222] It should be noted that for the specific implementation process of the color level of the electronic device changing to the first color level L1 at the third moment T3 after an interval of the first duration K1 from the second moment T2, reference can be made to the description of steps S201 to S208, which will not be elaborated here.

[0223] It should also be noted that the above embodiments only exemplarily illustrate two loop adjustment processes in the process of gradually adjusting the second color level L2 to the first color level L1, and do not represent a limitation on the color level adjustment method. Specifically, reference can be made to the description of steps S201 to S208. For example, it may include multiple loop adjustment processes until the color level is adjusted to the first color level.

[0224] In some embodiments, before setting the first timer, it may further include: when there is a first timer that is timing after the second moment T2, turning off the first timer that is timing.

[0225] Exemplarily, please refer to Figure 6 and Figure 7 , steps S301 to S310 can be executed once within the second duration K2. In this way, if a new focus window change is detected during the timing period of the first timer, the first timer that is timing can be turned off, and then a new first timer can be set to restart the timing.

[0226] For the above specific implementation process, please refer to the description of steps S301 to S310, which will not be elaborated here.

[0227] In some embodiments, at the third duration after the second moment T2, the color level of the electronic device becomes the fourth color level, which can be achieved in the following way: after the second moment T2, set the display power saving technology DPST characteristic parameter to the first parameter. Then, set the first timer, which is used to time the stable duration of the focus window. After the timing time of the first timer reaches the preset stable duration, set the DPST characteristic parameter to the second parameter. After that, obtain the first current color level of the electronic device, and the first current color level is the second color level L2. When the first current color level is less than the first color level L1, adjust the color level of the electronic device from the second color level L2 to the third color level L3. After adjusting the color level of the electronic device from the second color level L2 to the third color level L3, when the DPST characteristic parameter is the second parameter, obtain the second current color level of the electronic device, and the second current color level is the third color level L3. When the second current color level is less than the first color level L1, adjust the color level of the electronic device from the third color level L3 to the fourth color level L4.

[0228] Exemplarily, please refer to Figure 8 and Figure 9 , steps S401 to S411 can be executed once within the second duration K2. In this way, if no new focus window change is detected during the period from S406 to S409 (or from S406 to S410), it can be determined in step S411 that the DPST characteristic parameter is still the second parameter. In this way, the process of adjusting the color level of the electronic device from the third color level L3 to the fourth color level L4 can be entered. If a new focus window change is detected during the period from S406 to S409 (or from S406 to S410), it can be determined in step S411 that the DPST characteristic parameter becomes the first parameter. In this way, the process of continuing to adjust the third color level L3 will not enter, and the process of adjusting the third color level L3 will end.

[0229] For the above specific implementation process, reference can be made to the descriptions in steps S401 to S412, which will not be elaborated here.

[0230] It should be noted that the DPST characteristic parameter can be mFlag. The first parameter can be mFlag = True, and the second parameter can be mFlag = False. For another example, the first parameter can also be mFlag = 1, and the second parameter can be mFlag = 0. This application does not limit this.

[0231] In some embodiments, after adjusting the color level of the electronic device from the second color level L2 to the third color level L3, it may further include: when the DPST characteristic parameter is the second parameter, setting a second timer, where the second timer is used to time a preset cycle interval. When the timing time of the second timer reaches the preset cycle interval and no focus window change notification is recognized within the preset cycle interval, obtaining the second current color level. Wherein, the focus window change notification is used to notify the change of the focus window.

[0232] Exemplarily, please refer to Figure 12 , after adjusting the color level of the electronic device from the second color level L2 to the third color level L3, step S614 can be executed. If it is determined in step S614 that the DPST characteristic parameter is the second parameter, step S615 can be further executed. If no window change notification is received during the execution of step S615, the process of adjusting the color level of the electronic device from the third color level L3 to the fourth color level L4 can be entered. If a new focus window change occurs during the execution of step S615, a window change notification will be received during the execution of step S615. In this way, based on the window change notification, the process of adjusting the color level of the electronic device from the third color level L3 to the fourth color level L4 will not be entered, and the continuous adjustment process of the third color level L3 will end.

[0233] For the above specific implementation process, reference can be made to the descriptions in steps S601 to S616, which will not be elaborated here.

[0234] In some embodiments, please refer to Figure 13, in response to a second window switching operation input by the user, a third window is displayed at the fourth moment T4. After the third window is displayed, the color level of the electronic device becomes the second color level L2 (for example, at the moment T4' after the fourth moment T4, the color level becomes the second color level L2), and the fourth moment T4 is after the third moment T3. After a second duration K2 after the fourth moment T4, the color level of the electronic device becomes the third color level L3. Among them, the third color level L3 is less than the first color level L1 and greater than the second color level L2. After the color level of the electronic device becomes the third color level L3, in response to a third window switching operation input by the user, a fourth window is displayed at the fifth moment T5. After the fourth window is displayed, the color level of the electronic device becomes the second color level L2 (for example, at the moment T5' after the fourth moment T5, the color level becomes the second color level L2).

[0235] Among them, at the fourth moment T4, the third window is the focused window; at the fifth moment T5, the focused window changes from the third window to the fourth window; based on the change of the focused window, the color level of the electronic device is adjusted to the second color level L2.

[0236] That is to say, from the second moment T2 to the fourth moment T4, the focused window is stable at the second window. From the second moment T2 to the third moment T3, the process of adjusting the color level from the second color level L2 to the first color level L1 can be realized. From the third moment T3 to the fourth moment, the color level can be stable at the first color level L1. Until the fourth moment T4, the focused window becomes the third window. At the moment T4' after the focused window becomes the third window, based on the change of the focused window, the color level becomes the second color level L2 again. After that, first, after a second duration K2 after the fourth moment T4, the second color level L2 is adjusted to the third color level L3. At the fifth moment T5 during the process of adjusting the third color level L3 to the fourth color level, the focused window becomes the fourth window. At the moment T4' after the focused window becomes the fourth window, based on the change of the focused window, the color level becomes the second color level L2 again.

[0237] In some embodiments, after the color level of the electronic device becomes the third color level, a second timer can be set, and the second timer is used to time a preset cycle interval. In response to a third window switching operation input by the user, a fourth window is displayed at the fifth moment T5 within the preset cycle interval. After the fifth moment, a window change notification is generated; based on the window change notification, the adjustment of the third color level L3 is ended.

[0238] Exemplarily, steps S601 to S616 can be executed from the fourth moment T4 to the fifth moment T5. The specific implementation process can refer to the description of steps S601 to S616, which will not be elaborated here.

[0239] In some embodiments, after the second moment, based on the change of the focus window and the power supply mode of the electronic device being a DC power supply, the color level of the electronic device is adjusted to the second color level.

[0240] In some embodiments, when an exit sleep event or a power-on event is recognized, the color level of the electronic device is adjusted to the second color level. For details, refer to the descriptions of steps S211 to S213, which will not be elaborated here.

[0241] The color level adjustment method provided by the embodiments of the present application first sets the color level of the electronic device to the second color level after the window is switched. Then, the color level is gradually adjusted from the second color level to the first color level. In this way, it can not only solve the problem of screen flashing when the focus window changes, but also save the power consumption of the display screen to the greatest extent. In addition, during the color level adjustment process, if a new focus window change occurs, the color level adjustment process based on the previous focus window change can be interrupted in time.

[0242] Figure 15 It is a schematic diagram for reading the change of the color level of the color level adjustment solution provided by the embodiments of the present application through the tool PowerMax. Figure 15 It is the color level change information captured for 15 minutes in the full-screen mode of the local video when the power supply mode is DC. As Figure 15 shown, the color level of the electronic device gradually rises from level 3 to level 6 and stabilizes at level 6 for operation. Among them, when the color level of the electronic device gradually rises from level 3 to level 6, the color level is increased by one level every 12 s until the color level reaches level 6. In this way, since the color level gradually rises from level 3 to level 6, there will be no screen flashing phenomenon during this process. In addition, after the color level rises to level 6 and stabilizes at level 6, the power consumption of the display screen can be saved to the greatest extent.

[0243] Each method embodiment described herein can be an independent solution or can be combined according to the internal logic, and these solutions all fall within the protection scope of the present application.

[0244] It can be understood that in the above-mentioned method embodiments, the methods and operations implemented by the electronic device can also be implemented by components (such as chips or circuits) applicable to the electronic device.

[0245] The above embodiments have introduced the color level adjustment method provided by this application. It can be understood that in order for an electronic device to implement the above functions, it includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed in this article, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0246] In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The steps of the method disclosed in combination with the embodiments of this application can be directly embodied as being completed by the execution of the hardware processor, or completed by the combination of the hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0247] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method embodiments can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of this application can be directly embodied as being completed by the execution of the hardware decoding processor, or completed by the combination of the hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.

[0248] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include but not be limited to these and any other suitable types of memory.

[0249] According to the method provided by the embodiments of the present application, the embodiments of the present application also provide a computer program product, which includes: a computer program or instruction, when the computer program or instruction runs on a computer, enabling the computer to execute the method of any one of the method embodiments.

[0250] According to the method provided by the embodiments of the present application, the embodiments of the present application also provide a computer storage medium, which stores a computer program or instruction, when the computer program or instruction runs on a computer, enabling the computer to execute the method of any one of the method embodiments.

[0251] According to the method provided by the embodiments of the present application, the embodiments of the present application also provide an electronic device, including a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code includes computer instructions, when the processor executes the computer instructions, enabling the electronic device to execute the method of any one of the method embodiments.

[0252] Those of ordinary skill in the art will appreciate that the various illustrative logical blocks and steps described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.

[0253] If the described functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, external hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0254] The computer storage medium, computer program product, and electronic device provided in the embodiments of this application are all used to execute the methods provided above. Therefore, the beneficial effects they can achieve can refer to the beneficial effects corresponding to the methods provided above, and will not be elaborated here.

[0255] It should be understood that in the various embodiments of this application, the execution order of each step should be determined according to its function and internal logic. The size of each step number does not mean the sequence of execution, and does not limit the implementation process of the embodiment.

[0256] Each part of this specification is described in a progressive manner. For the same or similar parts between the various embodiments, reference can be made to each other. Each embodiment focuses on introducing the differences from other embodiments. In particular, for the embodiments of the device, computer storage medium, computer program product, and electronic device, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the descriptions in the method embodiments.

[0257] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present application.

[0258] The embodiments of the present application described above do not constitute a limitation on the protection scope of the present application.

Claims

1. A method for adjusting color levels, characterized in that, the method is applied to an electronic device, and the method includes: displaying a first window at a first moment; wherein, at the first moment, the first window is the focus window, and the color level of the electronic device at the first moment is the first color level; in response to a first operation input by the user, setting a second window as the focus window at a second moment; wherein, after the second moment, the color level of the electronic device is the second color level, the second color level is less than the first color level, and the second moment is later than the first moment.

2. The method according to claim 1, characterized in that, the method further includes: after setting the second window as the focus window, based on the change of the focus window, setting the color level of the electronic device to the second color level.

3. The method according to claim 1 or 2, characterized in that, the method further includes: at a third moment, setting the color level of the electronic device to the first color level; the third moment is later than the second moment.

4. The method according to claim 3, characterized in that, before setting the color level of the electronic device to the first color level at the third moment, the method further includes: after the color level of the electronic device is the second color level and before the third moment, setting the color level of the electronic device to a third color level; wherein, the third color level is less than the first color level and greater than the second color level; after setting the color level of the electronic device to the third color level and before the third moment, setting the color level of the electronic device to a fourth color level; wherein, the fourth color level is less than the first color level and greater than the third color level.

5. The method according to claim 4, characterized in that, the method further includes: setting a first timer after the second moment; the setting the color level of the electronic device to the third color level includes: after the timing time of the first timer reaches a preset duration, based on the fact that the current second color level of the electronic device is less than the first color level, setting the second color level of the electronic device to the third color level.

6. The method according to claim 4, characterized in that, the method further includes: after the second moment, setting the display power saving technology DPST characteristic parameter to a first parameter and setting a first timer; after the timing time of the first timer reaches a preset duration, setting the DPST characteristic parameter to a second parameter; wherein, the DPST characteristic parameter has the characteristic of being set to the first parameter when the focus window changes; the setting the color level of the electronic device to the third color level includes: based on the fact that the DPST characteristic parameter is the second parameter and the current second color level of the electronic device is less than the first color level, setting the color level of the electronic device to the third color level; the setting the color level of the electronic device to the fourth color level includes: Based on the second parameter being the DPST characteristic parameter and the current third color level of the electronic device being less than the first color level, set the color level of the electronic device to the fourth color level.

7. The method according to claim 4 or 5, wherein, after setting the color level of the electronic device to the third color level, the method further includes: setting a second timer; the setting the color level of the electronic device to the fourth color level includes: based on the elapsed time of the second timer reaching a preset cycle interval time, no focus window change notification being recognized within the preset cycle interval time, and the current third color level of the electronic device being less than the first color level, setting the color level of the electronic device to the fourth color level; wherein, the focus window change notification is used to notify a change in the focus window.

8. The method according to claim 5 or 6, wherein, before setting the first timer, it further includes: based on there being a first timer that is timing after the second moment, turning off the first timer that is timing.

9. The method according to claim 3, wherein, the method further includes: in response to a second operation input by the user, setting a third window as the focus window at a fourth moment; after the fourth moment, the color level of the electronic device is the second color level, and the fourth moment is after the third moment; after the fourth moment, setting the color level of the electronic device to the third color level; wherein, the third color level is less than the first color level and greater than the second color level; after setting the color level of the electronic device to the third color level, in response to a third operation input by the user, setting a fourth window as the focus window at a fifth moment; after the fifth moment, the color level of the electronic device is the second color level.

10. The method according to claim 9, wherein, the method further includes: after setting the color level of the electronic device to the third color level, setting a second timer; after the fifth moment, generating a window change notification; based on the elapsed time of the second timer being within the preset cycle interval time and the window change notification, ending the color level adjustment after setting the color level of the electronic device to the third color level.

11. The method according to claim 1, wherein, the method further includes: based on an event of exiting the sleep state or a power-on event, setting the color level of the electronic device to the second color level.

12. An electronic device, wherein, the electronic device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1-11.

13. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program or instructions, and when the computer program or instructions run on a computer, the computer is caused to execute the method according to any one of claims 1-11.