Screen parameter adjustment method, electronic equipment and storage medium
By obtaining screen brightness, ambient light brightness and grayscale histograms in the idle state of the electronic device, and judging and switching the refresh rate, the screen brightness jump problem caused by refresh rate switching is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202311832352.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-07-04
AI Technical Summary
During the refresh rate switching of electronic devices, the screen brightness is prone to jump, affecting the user experience.
By using the APS module, sensor module and display engine driver module to obtain screen brightness, ambient light brightness and grayscale histograms when the screen is in an idle state, the AGP module determines whether the switching conditions are met, and switches the refresh rate from low to high in time to avoid brightness jumps.
While the screen brightness jumps, it improves the accuracy and timeliness of refresh rate switching, avoids brightness jumps, and improves the user experience.
Smart Images

Figure CN120260518A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and in particular, to a method for adjusting screen parameters, an electronic device, and a storage medium. Background Art
[0002] Currently, the screens of electronic devices support multiple refresh rates. For example, an organic light-emitting diode (OLED) screen supports intelligent dynamic switching of the refresh rate in multiple gears such as 60Hz, 90Hz, and 120Hz. The higher the refresh rate, the higher the display smoothness when the user operates the screen. Also, the higher the refresh rate, the greater the power consumption of the electronic device.
[0003] To balance display smoothness and power consumption, the electronic device will perform intelligent dynamic switching of the refresh rate. For example, when the electronic device is in the idle state, the refresh rate is switched to the low refresh rate state (such as 60Hz) to save power; when the electronic device switches to the activity state, the refresh rate is switched to the high refresh rate (such as 120Hz) to improve the display smoothness of the screen and enhance the smoothness experience when the user operates the screen. However, screen brightness jumps occur during the refresh rate switching process. Summary of the Invention
[0004] This application provides a method for adjusting screen parameters, an electronic device, and a storage medium to solve the problem of screen brightness jumps caused by refresh rate switching.
[0005] In a first aspect, this application provides a method for adjusting screen parameters. This method is applied to an electronic device, which includes a low-power display APS module located in the application framework layer, a predictive image rendering AGP module located in the native layer, a display engine driver module and a sensor module located in the hardware abstraction layer. The method includes:
[0006] When the screen is in the idle state, the APS module sends the screen brightness to the AGP module; the sensor module obtains the current ambient light brightness and sends the current ambient light brightness to the AGP module through the first HIDL interface; the display engine driver module sends the grayscale histogram of the current display screen to the AGP module through the second HIDL interface; the AGP module determines whether the screen brightness, the current ambient light brightness, and the grayscale histogram meet the first switching condition, where the first switching condition is that the following three preset sub-conditions are satisfied simultaneously: the screen brightness is less than the preset screen brightness threshold, the current ambient light brightness is less than the preset ambient light brightness threshold, and the proportion of low-gray-scale pixels in the grayscale histogram is greater than the preset proportion threshold, and the proportion of low-gray-scale pixels is the proportion of pixels with a gray-scale value less than the preset gray-scale threshold in the grayscale histogram; if satisfied, the refresh rate of the screen is switched from the first refresh rate to the second refresh rate, and the first refresh rate is less than the second refresh rate.
[0007] It can be understood that the first refresh rate is the lower refresh rate (subsequently referred to as the low refresh rate) among the two refresh rates supported by the screen, and the second refresh rate is the higher refresh rate (subsequently referred to as the high refresh rate) among the two refresh rates supported by the screen. The screen brightness being less than the preset screen brightness threshold indicates that the screen is at a low brightness; the ambient light brightness being less than the preset ambient light threshold indicates that the electronic device is currently in a low-brightness environment; the proportion of low-gray-scale pixels being greater than the preset proportion indicates that the current display screen of the screen is a low-gray-scale screen.
[0008] Applying the method provided in the first aspect, the APS module sends the screen brightness to the AGP module, the sensor module sends the current ambient light brightness to the AGP module through the first HIDL interface, and the display engine driver module sends the grayscale histogram to the AGP module through the second HIDL interface. If the first switching condition is satisfied, it indicates that the screen is in a low-light scene, and the current display screen of the screen is a low-gray-scale screen. In this case, if the user touches the screen, it will cause a brightness jump. Therefore, when the electronic device is in the idle state, the refresh rate is switched to the high refresh rate. In this way, when the user touches the screen and the electronic device enters the activity state, the refresh rate will not be switched, thus avoiding the brightness jump. Moreover, compared with the transmission path in the related art, the embodiment of the present application simplifies the transmission path for the AGP module to obtain the necessary parameters for refresh rate switching, can improve the transmission rate, enables the AGP module to obtain the picture information of the current frame of the screen display in a timely manner, and further reduces the transmission delay. Furthermore, in the embodiment of the present application, the AGP module makes a unified decision on the refresh rate switching, without the need for the APS module and the display engine extension service module in the application framework layer to perform calculations, which can also reduce the transmission delay. Thus, the AGP module can perform the refresh rate switching in real time and accurately, avoiding the problem of screen brightness jump.
[0009] In a possible implementation, the electronic device further includes an ambient light sensor and an acceleration sensor ACC located in the kernel layer; the sensor module obtains the ambient light brightness, including: the sensor module receives the actual ambient light brightness sent by the ambient light sensor through the third HIDL interface; the sensor module receives the relative position sent by the acceleration sensor through the fourth HIDL interface, and the relative position is the relative position between the user's hand-held posture and the point light source; the sensor module determines the ambient light compensation value based on the relative position, and takes the sum of the actual ambient light brightness and the ambient light compensation value as the current ambient light brightness.
[0010] Since there is a difference between the posture of the user holding the electronic device and the angle of the point light source, the actual ambient light brightness obtained by the ambient light sensor is different from the true ambient light brightness. Furthermore, when using this actual ambient light brightness for refresh rate switching, the decision-making is inaccurate. In the embodiments of the present application, the actual ambient light brightness is compensated, so that the determined current ambient light brightness is more in line with the true ambient light brightness, thereby improving the decision-making accuracy during refresh rate switching. Moreover, the embodiments of the present application optimize the data transmission path. The ambient light sensor and the acceleration sensor located in the kernel layer both transmit data to the sensor module through the HIDL method, reducing the transmission delay, enabling the AGP module to obtain the accurate previous ambient light brightness more quickly, and thus performing timely and accurate refresh rate switching.
[0011] In a possible implementation, the relative position is the coordinate value of the relative position between the user's hand-held posture and the point light source; the sensor module determines the ambient light compensation value based on the relative position, including: the sensor module converts the coordinate value into a target angle value; the sensor module obtains the ambient light compensation value corresponding to the target angle value from the correspondence between the preset angle value and the preset ambient light compensation value. In this way, through the ambient light compensation value, the difference between the actual ambient light brightness obtained by the ambient light sensor and the true ambient light brightness caused by the difference between the hand-held posture and the point light source angle can be compensated. Based on this compensation value, the actual ambient light brightness is compensated to obtain the current ambient light brightness that conforms to the true ambient light brightness, thereby improving the accuracy of refresh rate switching.
[0012] In a possible implementation, the AGP module determines whether the screen brightness, the current ambient light brightness, and the grayscale histogram meet the first switching condition, including: the AGP module determines whether the screen brightness is less than a preset screen brightness threshold; if the screen brightness is greater than or equal to the preset screen brightness threshold, it is determined that the first switching condition is not met; if the screen brightness is less than the preset screen brightness threshold, the AGP module determines whether the current ambient light brightness is less than a preset ambient light brightness threshold; if the current ambient light brightness is greater than or equal to the preset ambient light brightness threshold, it is determined that the first switching condition is not met; if the current ambient light brightness is less than the preset ambient light brightness threshold, the AGP module calculates the proportion of low-grayscale pixels in the currently displayed screen image based on the grayscale histogram; the AGP module determines whether the proportion of low-grayscale pixels is greater than a preset proportion threshold; if the proportion of low-grayscale pixels is less than or equal to the preset proportion threshold, it is determined that the first switching condition is not met; if the proportion of low-grayscale pixels is greater than the preset proportion threshold, it is determined that the first switching condition is met.
[0013] In this implementation, multiple preset conditions are judged one by one, and the next preset condition is judged only when one preset condition is met. This reduces the execution of unnecessary steps, improves the judgment speed, makes the refresh rate switching more timely, and avoids screen brightness jumps to a greater extent.
[0014] In a possible implementation, the AGP module determines whether the screen brightness, the current ambient light brightness, and the grayscale histogram meet the first switching condition; if so, it switches the refresh rate of the screen from the first refresh rate to the second refresh rate, including: the AGP module determines whether the second switching condition is met, and the second switching condition is one or two preset sub-conditions included in the first switching condition; if so, it switches the refresh rate of the screen from the first refresh rate to the third refresh rate, and the third refresh rate is greater than the first refresh rate and less than the second refresh rate; the AGP module re-obtains the specified parameter and determines whether the specified parameter meets other preset sub-conditions except the second switching condition, and the specified parameter is the judgment parameter included in the other preset sub-conditions; if so, it switches the refresh rate of the screen from the third refresh rate to the second refresh rate.
[0015] Among them, the third refresh rate is between the high refresh rate and the low refresh rate, that is, the intermediate refresh rate. As an example, if the above other preset sub-condition is that the proportion of low-grayscale pixels in the grayscale histogram is greater than the preset proportion threshold, the specified parameter is the grayscale histogram; if the above other preset sub-condition is that the screen brightness is less than the preset screen brightness threshold, the specified parameter is the screen brightness; if the specified parameter is that the current ambient light brightness is less than the preset ambient light brightness threshold, the specified parameter is the current ambient light brightness. In addition, the above other preset sub-conditions can also include two preset sub-conditions, and the corresponding specified parameter is the judgment parameter included in these two preset sub-conditions. For example, the specified parameter is two of the grayscale histogram, the screen brightness, and the current ambient light brightness.
[0016] With this method, when the screen is in an idle state, a step-by-step switching of the refresh rate is achieved, which can avoid the brightness jump caused by the refresh rate switching process.
[0017] In a possible implementation, the electronic device further includes a scene recognition module located in the application framework layer. The method further includes: the scene recognition module recognizes the current application scene of the electronic device to obtain a scene recognition result, and sends the scene recognition result to the AGP module; the AGP module determines a preset ratio threshold according to the scene recognition result.
[0018] In a possible implementation, the AGP module determines a preset ratio threshold according to the scene recognition result, including: the AGP module determines the target threshold weight corresponding to the current application scene of the electronic device based on a preset correspondence between the application scene and the threshold weight; the AGP module calculates the product of the target threshold weight and the preset basic threshold to obtain a threshold increment; the sum of the preset basic threshold and the threshold increment is used as the preset ratio threshold.
[0019] Wherein, the preset ratio threshold = preset basic threshold + threshold increment = preset basic threshold + preset basic threshold * target threshold weight. Optionally, the preset basic threshold can be 70% for example.
[0020] Optionally, the application scenes in the preset correspondence include a text reading scene and a video and audio scene, and can also include other scenes.
[0021] For example, the threshold weight in the text reading scene can be -10%, the threshold weight in the video and audio scene can be 10%, and the threshold weight in other scenes can be -5%. For the text reading scene, the picture grayscale is relatively low, the touch frequency of the user on the screen is relatively high, and the possibility of brightness jump is relatively large. Therefore, the threshold weight in this application scene is set to be relatively small and set to a negative value to reduce the preset ratio, thereby reducing the frame locking condition and making it easier to lock the refresh rate to a high refresh rate to prevent brightness jump. For the video and audio scene, the picture grayscale is relatively high, the touch frequency of the user on the screen is relatively low, and the possibility of brightness jump is relatively small. Therefore, the threshold weight in this scene is set to be relatively large and set to a positive value to increase the preset ratio, thereby improving the frame locking condition, making it easier for the refresh rate to fall back to a low refresh rate, preventing brightness jump, and being able to better save power at the same time.
[0022] In this implementation, determining the preset ratio threshold according to the current application scene of the electronic device is equivalent to being able to dynamically set the judgment condition for the low grayscale picture, making the judgment result conform to the picture grayscale and the user's touch screen frequency in different application scenes, etc., and further making the judgment of the low grayscale picture more accurate, thereby improving the accuracy of the refresh rate switching in various application scenes.
[0023] In a second aspect, an embodiment of the present application provides an electronic device, including: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0024] In a third aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the processors are used to call computer instructions to cause the electronic device to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0025] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including a computer program, when the computer program runs on an electronic device, it causes the electronic device to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0026] In a fifth aspect, an embodiment of the present application provides a computer program product, the computer program product includes: computer program code, when the computer program code runs on an electronic device, it causes the electronic device to execute the method described in the first aspect and any possible implementation manner in the first aspect.
[0027] It can be understood that the electronic device provided in the above second aspect, the chip system provided in the third aspect, the computer storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method provided by the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0029] Figure 1 It is a schematic diagram of the interface change corresponding to the setting process of a refresh rate intelligent switching mode provided by an embodiment of the present application;
[0030] Figure 2 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
[0031] Figure 3 It is a software structure block diagram of an electronic device provided by an embodiment of the present application;
[0032] Figure 4 It is a schematic diagram of the software structure of an electronic device in the related art;
[0033] Figure 5 It is a module interaction flowchart of the screen parameter adjustment method provided by the embodiment of the present application;
[0034] Figure 6 It is a flowchart of a screen parameter adjustment method provided by the embodiment of the present application;
[0035] Figure 7 It is a flowchart of another screen parameter adjustment method provided by the embodiment of the present application;
[0036] Figure 8 It is a flowchart of a method for calculating the proportion of low gray-scale pixels provided by the embodiment of the present application;
[0037] Figure 9 It is a schematic diagram of the principle of calculating the proportion of low gray-scale pixels provided by the embodiment of the present application. Detailed implementation manners
[0038] For a better understanding of the technical solution of the present application, the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0039] For the convenience of clearly describing the technical solution of the embodiment of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and roles. For example, the first instruction and the second instruction are used to distinguish different user instructions, and the order between them is not limited. Those skilled in the art can understand that the terms such as "first" and "second" do not limit the quantity and execution order, and the terms such as "first" and "second" do not necessarily limit being different.
[0040] It should be noted that in the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplarily" or "for example" aims to present relevant concepts in a specific manner.
[0041] For ease of understanding, relevant concepts involved in the embodiments of the present application are introduced first.
[0042] The screen refresh rate refers to the refresh rate of the screen of an electronic device, also known as the hardware refresh rate, etc., abbreviated as the refresh rate, with the unit of hertz (Hz).
[0043] The idle state refers to the situation where the user does not perform any touch operations on the screen within a preset duration, and the screen of the electronic device does not detect touch data within the preset duration. Among them, touch operations can include clicking, swiping, long pressing, etc.
[0044] The activity state refers to the situation where the user performs touch operations on the screen within a preset duration, and the screen of the electronic device detects touch data within the preset duration.
[0045] The screen brightness, also known as the backlight brightness, etc., is a physical quantity representing the intensity of light emission of the screen of the electronic device, and the unit can be nit or candela per square meter (cd / m2).
[0046] The ambient light brightness, also known as the ambient light intensity, ambient illuminance, etc., is a physical quantity representing the intensity of light in the surrounding environment where the electronic device is located, and the unit can be lux.
[0047] The gray scale, also known as the grayscale, is a parameter representing the brightness and darkness of an image. An image is composed of multiple pixels, and each pixel can present a variety of different colors, which are composed of three sub-pixels of red, green, and blue (RGB). The light sources behind each sub-pixel can show different brightness levels. The gray scale represents the hierarchical levels of different brightness levels from the darkest to the brightest. For an 8-bit screen, the image can include 256 brightness levels from 0 to 255, that is, the image can include 256 gray scales from 0 to 255.
[0048] Currently, the screens of many electronic devices can support multiple refresh rates. For example, liquid crystal display (LCD) screens and OLED screens can support multiple refresh rates such as 60Hz, 90Hz, and 120Hz. At the same time, electronic devices that can support multiple refresh rates generally have a refresh rate intelligent switching mode. In the refresh rate intelligent switching mode, the refresh rate of the screen can be intelligently switched between two different refresh rates. For example, the refresh rate can be switched between 90Hz and 60Hz, or the refresh rate can be switched between 90Hz and 120Hz, etc. Among them, the higher refresh rate among the two different refresh rates is called the high refresh rate, and the lower refresh rate is called the low refresh rate. Or, the three different refresh rates can be respectively called the high refresh rate, medium refresh rate, and low refresh rate in descending order.
[0049] The user can set the refresh rate intelligent switching mode for the electronic device according to needs. Exemplarily, Figure 1 FIG. is a schematic diagram of the interface change corresponding to the setting process of a refresh rate intelligent switching mode provided by an embodiment of the present application. Taking the electronic device as a mobile phone as an example for illustration, as Figure 1As shown in (a) of [Figure 0], the user can enter the settings interface of the mobile phone by clicking on the settings application (APP) 101 on the desktop, such as Figure 1 shown in (b) of [Figure 1]. The settings interface may include a display and brightness settings control 102. When the user clicks on this control, they enter the display and brightness settings interface, such as Figure 1 shown in (c) of [Figure 2].
[0050] The display and brightness settings interface may include a screen refresh rate settings control 103. When the user clicks on this control, they enter the screen refresh rate settings interface, such as Figure 1 shown in (d) of [Figure 3]. The screen refresh rate settings interface may include options for low, medium, and high refresh rates and an intelligent switching option 104. When the user clicks on the intelligent switching option 104, the screen refresh rate of the mobile phone is set to the intelligent switching mode, and the mobile phone can intelligently switch the refresh rate according to a preset strategy.
[0051] In one implementation, the strategy for the electronic device to dynamically switch the refresh rate is as follows: when the user has no touch and the screen is in the idle state, the refresh rate is set to a low refresh rate (e.g., 60 Hz); when the user touches the screen and the screen switches from the idle state to the activity state, the refresh rate is switched to a high refresh rate (e.g., 120 Hz). In this way, it can not only ensure the display smoothness when the user is using the device, meet the user's high refresh rate experience, but also save power when the user has no touch, achieving a balance between high refresh rate and low power consumption.
[0052] However, it is found in use that for some screens represented by OLEDs, when touching the screen in a low-light scene (i.e., the screen brightness is low and the ambient light brightness is low), when the refresh rate switches from a low refresh rate to a high refresh rate, the screen will have a brightness jump that can be recognized by the human eye, that is, the screen flickers, affecting the user experience. Specifically, the screen includes multiple pixels, and each pixel may include a light-emitting element (OLED) and a pixel circuit that provides a driving current to the light-emitting element. The pixel circuit may include a pixel switch. By inputting a pulse signal (e.g., an electromagnetic pulse (EM pulse) signal) to the pixel circuit to control the opening and closing of the pixel switch, the on and off of the pixel circuit is controlled, thereby controlling the light emission of the light-emitting element. Since the pulse signals corresponding to different refresh rates are different, the number of times the pixel switch opens and closes is different, and the duration for which the pixel switch remains open is different. Within one pulse period, the time for which the pixel switch remains open is different, the light emission situation of the light-emitting element is different, and the screen brightness is different (the longer the pixel switch remains open, the higher the screen brightness). Therefore, at different refresh rates, the screen brightness is different, that is, switching the refresh rate causes the screen brightness to change.
[0053] In addition, it can be understood that since the human eye's perception of brightness is not proportional to the physical power, gamma correction is generally performed through a gamma curve. The gamma curve represents the non-linear relationship between the display brightness and the input voltage. Through gamma correction, the input voltage of the screen is finally proportional to the brightness perceived by the human eye. In order to make up for the difference in screen brightness at different refresh rates, OLED screens are configured with different gamma curves for different refresh rates. However, in practice, it is impossible to achieve the effect that the screen brightness is exactly the same at two refresh rates, and there is still a brightness change that can be recognized by the human eye when switching the refresh rate in a low-light scene. Because the relationship between the minimum perceptible brightness difference of the human eye and the background brightness (i.e., the brightness before the change) satisfies Weber's law. When touching the screen in a low-light scene, for the human eye, the background brightness is small and the brightness change amount is large, △L / L≥0.017. Therefore, the human eye can recognize the screen flicker, and the screen will have a brightness jump that can be recognized by the human eye. Among them, △L represents the brightness change amount, and L represents the background brightness.
[0054] Moreover, the gray scale situation of the picture is also an important factor affecting the brightness jump of the screen. When the picture displayed on the screen is a high-gray-scale picture, the change in screen brightness is not easily recognized by the human eye, while when the picture displayed on the screen is a low-gray-scale picture, the change in screen brightness is more easily recognized by the human eye. Therefore, when the user touches the screen when the picture currently displayed on the screen is a low-gray-scale picture, the screen will also have a phenomenon of brightness jump.
[0055] To solve the problem of brightness jump, an embodiment of the present application provides a screen parameter adjustment method, which is executed by an electronic device.
[0056] The electronic device can be an electronic device with a screen such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The screen of the electronic device can be an OLED screen or the like. The embodiment of the present application does not limit the type of the electronic device.
[0057] Exemplarily, as Figure 2 shown, Figure 2 is a schematic diagram of an electronic device provided by an embodiment of the present application, Figure 2The electronic device shown may include a processor 110, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, 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 button 190, a motor 191, an indicator 192, cameras 1-N 193, a display screen 194, and subscriber identification module (SIM) card interfaces 1-N 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0058] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0059] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor, 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.
[0060] Among them, the controller may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching instructions and executing instructions.
[0061] 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 can hold 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 directly call it from the memory. This avoids repeated accesses and reduces the waiting time of the processor 110, thus improving the efficiency of the system.
[0062] The wireless communication function of the electronic device can be implemented by antenna 1, antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0063] It can be understood that the interface connection relationships shown among the various modules in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0064] The charging management module 140 is used to receive a charging input from a charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141.
[0065] The electronic device implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0066] The display screen 194, also known as the display or screen, is used to display images, videos, etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0067] The electronic device can implement the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0068] The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture static images or videos. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0069] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance during photography. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0070] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100 at a different position from the display screen 194.
[0071] The digital signal processor is used to process digital signals. In addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0072] The electronic device can implement audio functions through the audio module 170, speaker, receiver, microphone, headphone jack, and application processor, etc. Such as music playback, recording, etc.
[0073] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
[0074] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as screen mirroring function, network sharing function, etc.), etc. The data storage area can store data created during the use of the electronic device (such as video data, etc.). In addition, the internal memory 121 can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0075] The button 190 includes a power-on button, volume buttons, etc. The button 190 can be a mechanical button or a touch button. The electronic device can receive button inputs and generate key signal inputs related to the user settings and function controls of the electronic device.
[0076] The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and can also be used for touch vibration feedback. The indicator 192 can be an indicator light and can be used to indicate the charging state, battery level change, and can also be used to indicate messages, missed calls, notifications, etc.
[0077] The SIM card interface 195 is used to connect the SIM card. The SIM card can be in contact with and separated from the electronic device by being inserted into or removed from the SIM card interface 195. The electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
[0078] The software system of the above-mentioned electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservices architecture, or cloud architecture. In the embodiments of the present application, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software system of the electronic device. 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 Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, the Native layer, the hardware abstract layer (HAL), and the kernel layer.
[0079] As Figure 3 shown, in the embodiments of the present application, the kernel layer can include the ambient light sensor 180L and the acceleration sensor 180E as shown in the Figure 2 embodiment shown. The ambient light sensor is used to collect the ambient light brightness around, and the acceleration sensor (ACC) is used to collect the relative position between the user's hand-held posture and the point light source. Among them, the acceleration sensor is an electronic component that can measure the acceleration force and is an internal component used to measure the relative inclination angle, and can determine the coordinate values (x, y, z) of the relative position between the hand-held posture of the electronic device and the point light source by using the different components of the gravitational force G perpendicular to the ground plane on the X, Y, and Z axes of the electronic device.
[0080] Among them, the hardware abstraction layer is an abstract interface of the device kernel driver, which is used to implement an application programming interface for accessing the underlying device to a higher-level API framework. In this embodiment, the hardware abstraction layer may include a display engine driver module and a sensor module (sensorHal). Among them, the display engine driver module is a module that can perform operations such as overlaying, mixing, and scaling on the input multi-layer images, and has the ability to calculate the grayscale histogram of the current screen in real time. In the embodiment of the present application, the display engine driver module is used to determine the grayscale histogram of the current display screen on the screen. The sensor module is used to receive the ambient light brightness reported by the ambient light module and the relative position reported by the acceleration sensor, and calculate the ambient light compensation value based on the ambient light brightness and the relative position.
[0081] The Native layer can also be referred to as the native layer, native framework layer, native algorithm layer, or native service layer, etc. In the embodiment of the present application, the Native layer may include an advanced graphic projects (AGP) module and a display engine service module. Among them, the AGP module is used to implement functions such as intelligent frame rate, game dynamic frame rate, game chirality improvement, game frame interpolation, and dual-screen / LTPO frame rate public knowledge. And it can provide the ability to control the middle platform of the screen refresh rate and can dynamically control the screen refresh rate. Hardware Abstraction Layer Interface Definition Language (HIDL) interfaces are registered between the AGP module and the display engine driver module and the sensor module respectively, that is, the AGP module communicates with the display engine driver module through the HIDL interface, and the AGP module also communicates with the sensor module through the HIDL interface. In the embodiment of the present application, the display engine service module is not used during the process of switching the refresh rate.
[0082] The application layer may include a series of application packages. The application packages may include applications such as a camera, a gallery, a calendar, a map, a navigation, a WLAN, a Bluetooth, music, a video, and a short message. In this embodiment, the application layer further includes a setting application. The setting application is used to set various parameters of the electronic device, including the screen brightness. Optionally, the setting of the screen brightness by the setting application may be a setting in response to the user's direct operation in the setting application, or a setting in response to the user's relevant operation in other applications. For example, the setting application may set the screen brightness in response to the user's brightness setting operation in the video application.
[0083] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0084] As Figure 3 shown, in the embodiments of the present application, the application framework layer may at least include a display engine extension service (display engine EX service) module, an activity management service (activity manger service, AMS), a window management service (windons manger service, WMS), a scene recognition module, a power management module, a screen brightness acquisition module, and an adaptive power saving (APS) module, etc.
[0085] Among them, the display engine service module in the native layer is used to receive the display information from the hardware abstraction layer and send the display information to the display engine extension service module in the application framework layer. In the process of switching the refresh rate in the embodiments of the present application, the display engine extension service module in the application framework layer is not used, and the display engine service module in the native layer is not used. The scene recognition module is used to obtain the running status of the applications in the application layer through the AMS and the WMS, determine the current application scene of the electronic device according to the running status of the applications, obtain the scene recognition result, and send the scene recognition result to the AGP module. The scene recognition module may be, for example, an iaware module. The power management module is used to update the screen brightness according to the brightness parameter provided by the settings application in the application layer and send the brightness parameter to the screen brightness acquisition module. The screen brightness acquisition module is used to determine the screen brightness according to the brightness parameter. The screen brightness acquisition module sends the determined screen brightness to the APS module. The APS module is used to send the screen brightness to the AGP module. The AGP module in the Native layer is used to switch the refresh rate according to the scene recognition result sent by the scene recognition module, the screen brightness sent by the APS module, the ambient light compensation value sent by the sensor module, and the grayscale histogram sent by the grayscale image calculation module.
[0086] In addition, the application framework layer may further include a content provider, a view system, a telephone manager, a resource manager, a notification manager, etc. ( Figure 3 not shown in Figure 3 ), and the native layer may further include a sensor service (
[0087] As Figure 4 shown, Figure 4 is a software system structure diagram of an electronic device in the related art, Figure 4 andFigure 3 Some modules in it are different, and the different parts are described below.
[0088] In Figure 4 After the grayscale histogram statistics module in the hardware abstraction layer obtains the grayscale histogram, it sends the grayscale histogram to the display engine service module in the local layer. Then, the display engine service module sends the grayscale histogram to the display engine extension service module in the application framework layer through Binder communication. The display engine extension service module in the application framework layer calculates the proportion of low-grayscale pixels in the currently displayed screen image according to the grayscale histogram obtained by the grayscale histogram statistics module (hereinafter referred to as the proportion of low-grayscale pixels), where low-grayscale pixels refer to pixels with a grayscale value less than the preset grayscale threshold in the image. Then, the display engine extension service module in the application framework layer sends the proportion of low-grayscale pixels to the AGP module in the local layer through Binder communication.
[0089] In addition, the screen brightness acquisition module sends the determined screen brightness to the APS module. The sensor service is used to obtain the ambient light brightness from the ambient light sensor in the kernel layer and report the obtained ambient light brightness to the APS module. The APS module is used to determine whether the screen brightness and / or the ambient light brightness meet the preset conditions, obtain the brightness determination result, and send the brightness determination result to the AGP module through Binder communication. Furthermore, the AGP module in the local layer is used to switch the refresh rate according to the scene recognition result sent by the scene recognition module, the brightness determination result sent by the APS module, and the proportion of low-grayscale pixels sent by the grayscale calculation module.
[0090] In the above process, the transmission path of the proportion of low-grayscale pixels is relatively long. It is necessary to first upload the grayscale histogram from the hardware abstraction layer to the local layer, and then upload it from the local layer to the application framework layer. After the display engine extension service module in the application framework layer calculates and determines the proportion of low-grayscale pixels, it can send the proportion of low-grayscale pixels to the AGP module through Binder communication. It can be seen that the transmission path is relatively long, and there is a problem of large time lag, resulting in the AGP module being unable to obtain the proportion of low-grayscale pixels of the current frame of the screen display in real time, resulting in untimely refresh rate switching, and there may still be a problem of brightness jump.
[0091] On the other hand, the transmission path of the ambient light brightness from the ambient light sensor to the APS module is also relatively long, resulting in a long time required for the APS module to determine the brightness determination result. Furthermore, there is also a time delay for the AGP module to obtain the brightness determination result, which will also lead to untimely refresh rate switching.
[0092] In the embodiments of the present application, the data transmission path is optimized, so that the transmission delay can be reduced, enabling the AGP module to timely switch the refresh rate according to the current frame of the screen, and avoiding brightness jumps.
[0093] In the following, the embodiments of the present application take an electronic device with the Figure 2 and Figure 3 shown structure as an example to introduce in detail the screen parameter adjustment method provided by the embodiments of the present application.
[0094] It should be noted that the embodiments of the present application are applied to the scenario where the electronic device enables the intelligent refresh rate switching mode, and are applicable to switching the refresh rate when the screen is in the idle state. The embodiments of the present application do not limit the refresh rate when the screen is in the activity state, and the switching of the refresh rate when the screen enters the activity state from the idle state, or when the screen enters the idle state from the activity state.
[0095] Figure 5 is a module interaction flowchart of the screen parameter adjustment method provided by the embodiments of the present application. As Figure 5 shown, the method includes:
[0096] S501. The screen brightness acquisition module in the application framework layer acquires the brightness parameter from the settings application in the application layer.
[0097] The brightness parameter refers to the parameter representing the screen brightness. In one embodiment, the brightness parameter may include the brightness level. It can be understood that according to the maximum and minimum adjustable values of the screen brightness, the screen brightness can be divided into multiple levels, and different levels correspond to different screen brightness values.
[0098] Optionally, the settings application can set and update the screen brightness through the power management module according to the brightness level. While setting and updating the screen brightness, the power management module can send the brightness level to the screen brightness acquisition module. Of course, the screen brightness acquisition module can also directly obtain the brightness level from the settings application, and the present application does not limit this. In addition, in some other embodiments, the brightness parameter may also be other parameters. For example, the brightness parameter may directly be the screen brightness value, etc., and the present application does not limit this.
[0099] Optionally, the screen brightness acquisition module can obtain the brightness parameter from the power management module periodically by the screen brightness module, or the power management module can report to the screen brightness module periodically (i.e., polling report), or the screen brightness acquisition module can obtain from the power management module in response to the call of the APS module, or the settings application can send the changed brightness parameter to the screen brightness acquisition module when the brightness parameter changes, etc. The embodiments of the present application do not limit this.
[0100] S502. The screen brightness acquisition module in the application framework layer determines the screen brightness according to the brightness parameter.
[0101] Taking the brightness parameter including the brightness level as an example, as a possible implementation manner, the screen brightness acquisition module can obtain the preset correspondence between the screen brightness and the screen brightness level, and determine the screen brightness corresponding to the brightness level according to the preset correspondence.
[0102] S503. The screen brightness acquisition module in the application framework layer sends the screen brightness to the APS module.
[0103] Optionally, the screen brightness acquisition module can poll and report the screen brightness to the APS module.
[0104] S504. The APS module in the application framework layer sends the screen brightness to the AGP module in the native layer.
[0105] S505. The scene recognition module in the application framework layer obtains the running conditions of each application in the application layer.
[0106] Optionally, the scene recognition module can monitor the running conditions of each application in the application layer in real time, and obtain the relevant information of the application running in the foreground, etc.
[0107] As a possible implementation manner, the scene recognition module can obtain the relevant information of the application running in the foreground through the AMS and the WMS. Specifically, when a certain application in the application layer is started, the application sends the package name of the application package to the AMS. The AMS creates a window according to the package name, and determines the window information such as the window size, window position, and window name. Then, the AMS sends the package name and the window information to the WMS. The WMS creates a layer according to the package name and the window information, and determines the layer information such as the layer size, layer position, and layer name. The WMS sends the package name, window information, layer information, etc. to the scene recognition module.
[0108] S506. The scene recognition module in the application framework layer determines the current application scene of the electronic device according to the running conditions of the application, and obtains the scene recognition result.
[0109] Optionally, the scene recognition module may identify which of multiple preset application scenarios the current application scenario of the electronic device belongs to based on the package name, window information, layer information sent by the WMS, and the application scenario whitelist, and obtain a scene recognition result. Among them, the application scenario whitelist includes multiple preset application scenarios. Optionally, the application scenario whitelist may be a file in.xml format.
[0110] Optionally, multiple application scenarios may be preset and an application scenario whitelist may be generated according to the different grayscale levels of the screen display when using different applications, as well as the different touch frequencies of the screen by the user during the use of different applications, etc. The multiple application scenarios may include, for example: text reading scenario, video and audio scenario, and other scenarios, etc. Among them, the text reading scenario refers to the scenario of using an electronic device for text reading, such as reading an e-book through an e-book application, viewing a file through an office software, browsing text through a web page, etc. In the text reading scenario, the screen is mostly text, mostly low grayscale level screens, and the user will click or slide the screen when turning pages, with a relatively high touch frequency on the screen. The video and audio scenario refers to the scenario of using an electronic device to watch videos, audio, etc. content, such as watching TV dramas, movies, etc. through a video playback software. In the video and audio scenario, the screens are mostly high grayscale level screens, and the user has a relatively low touch frequency on the screen. The other scenarios refer to the application scenarios other than the above text reading scenario and video and audio scenario. In the other scenarios, the grayscale level of the screen and the touch frequency of the user on the screen are between the text reading scenario and the video and audio scenario. Of course, the above several scenarios are only examples, and more and more detailed scenario types can be set according to requirements in actual applications.
[0111] S507. The scene recognition module in the application framework layer sends the scene recognition result to the AGP module in the local layer.
[0112] Optionally, the scene recognition module may send the scene recognition result to the AGP module through the Binder communication method.
[0113] S508. The sensor module in the hardware abstraction layer receives the actual ambient light brightness sent by the ambient light sensor in the kernel layer through the third HIDL interface.
[0114] S509. The sensor module in the hardware abstraction layer receives the relative position sent by the acceleration sensor in the kernel layer through the fourth HIDL interface.
[0115] Among them, the relative position is the relative position between the user's hand-held posture and the point light source, and the relative position is specifically the coordinate value of the relative position between the user's hand-held posture and the point light source.
[0116] S510. The sensor module of the hardware abstraction layer determines the ambient light compensation value based on the relative position, and uses the sum of the actual ambient light brightness and the ambient light compensation value as the current ambient brightness.
[0117] Among them, the sensor module can convert the coordinate value into a target angle value, and obtain the ambient light compensation value corresponding to the target angle value from the corresponding relationship between the preset angle value and the preset ambient light compensation value.
[0118] Among them, the preset ambient light compensation value in the preset corresponding relationship is an empirical value, that is, in the embodiments of the present application, the empirical values of the ambient light compensation values corresponding to each possible preset angle value are preset in advance, so that after obtaining the target angle value, the ambient light compensation value corresponding to the target angle value can be obtained from this corresponding relationship.
[0119] S511. The sensor module of the hardware abstraction layer sends the current ambient light brightness to the AGP module through the first HIDL interface.
[0120] S512. The display engine driver module of the hardware abstraction layer determines the grayscale histogram of the current display screen of the screen.
[0121] The specific implementation method of this step will be introduced in subsequent embodiments.
[0122] S513. The display engine driver module of the hardware abstraction layer sends the grayscale histogram to the AGP module through the second HIDL interface.
[0123] S514. The AGP module switches the refresh rate based on the scene recognition result, the screen brightness, the current ambient light brightness, and the grayscale histogram.
[0124] Using this method, the APS module can send the screen brightness to the AGP module, the sensor module can send the current ambient light brightness to the AGP module through the first HIDL interface, and the display engine driver module can send the grayscale histogram to the AGP module through the second HIDL interface. Meeting the first switching condition indicates that the screen is in a low-light scene, and the current display screen of the screen is a low-grayscale screen. In this case, if the user touches the screen, it will cause a brightness jump. Therefore, when the electronic device is in an idle state, the refresh rate is switched to a high refresh rate, so that when the user touches the screen and the electronic device enters the activity state, the refresh rate will not be switched, thus avoiding brightness jumps. And compared with Figure 4For the transmission path shown, in the embodiments of the present application, the transmission path for the AGP module to obtain the necessary parameters for refresh rate switching is simplified, which can improve the transmission rate, enabling the AGP module to obtain the picture information of the current frame of the screen display in a timely manner, and further reducing the transmission delay. Moreover, in the embodiments of the present application, the AGP module makes the decision on refresh rate switching uniformly. Without the APS module and the display engine extension service module in the application framework layer for calculation, the transmission delay can also be reduced. Thus, the AGP module can perform refresh rate switching in real time and accurately, avoiding the problem of screen brightness jump.
[0125] Optionally, in the above embodiments, the AGP module can determine a preset ratio according to the scene recognition result, compare the low gray-scale pixel ratio with the preset ratio, and determine the gray-scale situation (whether it is a low gray-scale picture) of the picture currently displayed on the screen. Then, the AGP switches the refresh rate based on the preset refresh rate switching strategy. Since the display engine driver module directly sends the gray-scale histogram to the AGP module through the HIDL interface without going through the step-by-step reporting of the local layer and the display engine extension service module in the application framework layer, the AGP module can obtain the gray-scale histogram in a timely manner, avoiding maintaining a high refresh rate in a low-brightness and high-gray-scale picture due to reporting delay after the change of the gray-scale histogram, and being able to make a more accurate frame rate decision.
[0126] In some embodiments of the present application, the refresh rate switching strategy is: when the screen is in an idle state, if the screen brightness, the current ambient light brightness, and the gray-scale histogram meet the first switching condition, the refresh rate of the screen is switched from the first refresh rate to the second refresh rate, where the first refresh rate is less than the second refresh rate. For example, the first refresh rate is 60Hz and the second refresh rate is 120Hz. For ease of understanding, the first refresh rate will be referred to as the low refresh rate and the second refresh rate will be referred to as the high refresh rate hereinafter. That is to say, when the first switching condition is met, the refresh rate of the screen is switched from the low refresh rate to the high refresh rate.
[0127] Among them, the screen brightness being less than the preset screen brightness threshold indicates that the screen is of low brightness; the ambient light brightness being less than the preset ambient light threshold indicates that the electronic device is currently in a low-brightness environment; the low gray-scale pixel ratio being greater than the preset ratio indicates that the picture currently displayed on the screen is a low gray-scale picture. That is to say, the first switching condition in this embodiment can be understood as the screen being in a dark light scene and the picture displayed on the screen being a low gray-scale picture, hereinafter referred to as the dark light low gray-scale scene.
[0128] As described above, when the screen is in a low-light and low-gray-scale scene, switching the refresh rate will cause a brightness jump. Therefore, in this embodiment, when the screen is in an idle state, if it is determined that the current is a low-light and low-gray-scale scene, the refresh rate is set to a high refresh rate, that is, locked to the high refresh rate. In this way, when the user touches the screen again and the screen enters the activity state from the idle state, there is no need to frequently switch the refresh rate, thereby avoiding brightness jumps, avoiding discomfort to the user's eyes, and improving the user experience. At the same time, if the current does not meet the frame-locking conditions, that is, the screen brightness is greater than or equal to the preset screen brightness threshold, or the ambient light brightness is greater than or equal to the preset ambient light threshold, or the low-gray-scale pixel ratio is less than or equal to the preset ratio, it means that the current is not in a low-light and low-gray-scale scene. In this case, switching the refresh rate will not cause a brightness jump. Therefore, the refresh rate is set to a low refresh rate, which can reduce power consumption, extend the standby time of the electronic device, and further improve the user experience.
[0129] That is to say, the screen parameter adjustment method provided by the embodiment of the present application can timely determine whether the current is in a low-light and low-gray-scale environment, avoiding untimely refresh rate switching caused by judgment delay. For example, before the user touches the screen, due to judgment delay, the refresh rate is not timely switched to the high refresh rate, resulting in the completion of the switch after the user touches the screen, still causing a brightness jump. In this way, by timely switching the refresh rate, the brightness jump caused by the refresh rate switch can be avoided, and the power consumption of the electronic device can be saved.
[0130] At the same time, the first switching condition in this embodiment includes both the condition of the low-light scene and the condition of the low-gray-scale screen. The high refresh rate is switched only when the current scene is a low-light scene and the current screen is a low-gray-scale screen. That is, the first switching condition in the embodiment of the present application is strict, which can improve the accuracy of identifying the brightness jump situation, improve the accuracy of the refresh rate switch, and make it more difficult to switch the refresh rate to the high refresh rate and easier to keep the refresh rate at the low refresh rate. Furthermore, the probability of switching to the high refresh rate in non-necessary situations is reduced, unnecessary power consumption is reduced, the standby time of the electronic device is extended, and the user experience is improved. Among them, switching to the high refresh rate in non-necessary situations includes: switching to the high refresh rate in a scene with low screen brightness and high ambient light brightness, or switching to the high refresh rate in a scene with high screen brightness and low ambient light brightness, or switching to the high refresh rate in a low-light scene but the current screen is a high-gray-scale screen, etc.
[0131] In the embodiment of the present application, the above first switching condition is specifically to simultaneously meet the following three preset sub-conditions: the screen brightness is less than the preset screen brightness threshold, the current ambient light brightness is less than the preset ambient light threshold, and the low-gray-scale pixel ratio in the gray-scale histogram is greater than the preset ratio threshold, where the low-gray-scale pixel ratio is the ratio of the pixels with gray-scale values less than the preset gray-scale threshold in the gray-scale histogram.
[0132] When determining whether the above first switching condition is satisfied, there are multiple implementation manners, that is, there are multiple determination sequences. One of the determination sequences is taken as an example in the embodiments of the present application for illustration. Figure 6 It is a schematic flowchart of a screen parameter adjustment method provided by an embodiment of the present application. This method is specifically executed by an AGP module in an electronic device, as Figure 6 shown. This method includes:
[0133] S601. Determine that the screen is in an idle state.
[0134] Among them, it is determined whether the screen is in an idle state by determining whether touch data is detected on the screen within a preset duration. If no touch data is detected on the screen within the preset duration, it indicates that the screen is in an idle state.
[0135] S602. Determine whether the screen brightness is less than a preset screen brightness threshold.
[0136] If the screen brightness is greater than or equal to the preset screen brightness threshold, it is determined that the first switching condition is not satisfied, and S607 is executed;
[0137] If the screen brightness is less than the preset screen brightness threshold, S603 is executed.
[0138] S603. Determine whether the current ambient light brightness is less than a preset ambient light brightness threshold.
[0139] If the current ambient light brightness is greater than or equal to the ambient light threshold, it is determined that the first switching condition is not satisfied, and S607 is executed;
[0140] If the current ambient light brightness is less than the preset screen brightness threshold, S604 is executed.
[0141] S604. Calculate the proportion of low-gray-scale pixels of the picture currently displayed on the screen based on the gray-scale histogram.
[0142] S605. Determine whether the proportion of low-gray-scale pixels is greater than a preset proportion threshold.
[0143] If the proportion of low-gray-scale pixels is less than or equal to the preset proportion threshold, it is determined that the first switching condition is not satisfied, and S607 is executed;
[0144] If the proportion of low-gray-scale pixels is greater than the preset proportion threshold, it is determined that the first switching condition is satisfied, and S606 is executed.
[0145] S606. Switch the refresh rate to a high refresh rate.
[0146] S607. Maintain a low refresh rate.
[0147] It should be noted that the above S602 - S607 can be periodically judged and executed according to a preset period, or can be triggered and executed by changes in the screen brightness, ambient light brightness, or the proportion of low - gray - level pixels in the currently displayed screen image. For example, when any one of the screen brightness, ambient light brightness, or the proportion of low - gray - level pixels in the currently displayed screen image changes, the above process is triggered and executed. This application does not make any restrictions on this.
[0148] In addition, the embodiments of this application do not limit the execution order of the above steps S602 to S606, and can be judged and executed in the order shown in Figure 6 the embodiments shown, or can be judged and executed in other orders. For example, first execute S605, then execute S603 and S604, and then execute S602; or, steps S602, S603, and S605 can be executed simultaneously. When the judgment results of all three are yes, execute S606. If any one of the judgment results is no, then execute S607.
[0149] In addition, when the screen supports three or more refresh rates, the embodiments of this application also support switching the refresh rate to the intermediate refresh rate. In the embodiments of this application, the intermediate refresh rate can also be referred to as the third refresh rate. Among them, the third refresh rate is greater than the first refresh rate and less than the second refresh rate, that is, the intermediate refresh rate is the refresh rate supported by the screen that is greater than the above - mentioned low refresh rate and less than the above - mentioned high refresh rate. For example, if the screen supports three refresh rates of 60Hz, 90Hz, and 120Hz, then 60Hz is the low refresh rate, 90Hz is the intermediate refresh rate, and 120Hz is the high refresh rate.
[0150] In this case, if the AGP module judges whether the screen brightness, the current ambient light brightness, and the gray - level histogram meet the second switching condition, and if the second switching condition is met, the refresh rate of the screen is switched from the low refresh rate to the intermediate refresh rate. Among them, the second switching condition is to meet one or two of the above three preset sub - conditions.
[0151] After switching to the intermediate refresh rate, it is necessary to re - obtain the latest specified parameter and continue to judge whether the specified parameter meets the other preset sub - conditions in the first preset switching condition except the second switching condition. If it meets, the refresh rate of the screen is switched from the intermediate refresh rate to the high refresh rate. Among them, the specified parameter is the judgment parameter included in the other preset sub - conditions.
[0152] The following combines Figure 7 to illustrate this switching process. Figure 7 is a flowchart of another screen parameter adjustment method provided by the embodiments of this application. This method is specifically executed by the AGP module in the electronic device, as Figure 7 shown. This method includes:
[0153] S701. Determine that the screen is in the idle state.
[0154] Among them, it can be determined whether the screen is in the idle state by determining whether touch data is detected on the screen within a preset duration. If no touch data is detected on the screen within the preset duration, it means that the screen is in the idle state.
[0155] S702. Calculate the proportion of low-gray-scale pixels in the current displayed screen image based on the gray-scale histogram.
[0156] S703. Determine whether the proportion of low-gray-scale pixels is greater than a preset proportion threshold.
[0157] If the proportion of low-gray-scale pixels is less than or equal to the preset proportion threshold, execute S710;
[0158] If the proportion of low-gray-scale pixels is greater than the preset proportion threshold, execute S704.
[0159] S704. Switch from a low refresh rate to an intermediate refresh rate.
[0160] S705. Obtain the current screen brightness.
[0161] S706. Determine whether the screen brightness is less than a preset screen brightness threshold.
[0162] If the screen brightness is greater than or equal to the preset screen brightness threshold, execute S709;
[0163] If the screen brightness is less than the preset screen brightness threshold, execute S707.
[0164] S707. Determine whether the current ambient light brightness is less than a preset ambient light brightness threshold.
[0165] If the current ambient light brightness is greater than or equal to the ambient light threshold, execute S709;
[0166] If the current ambient light brightness is less than the preset screen brightness threshold, execute S708.
[0167] S708. Switch from the intermediate refresh rate to the high refresh rate.
[0168] S709. Switch from the intermediate refresh rate to the low refresh rate.
[0169] S710. Maintain the low refresh rate.
[0170] In this embodiment, when the current scene meets the low gray-scale condition, the low refresh rate is switched to the intermediate refresh rate, and the current screen brightness is obtained. When the current screen brightness is less than the preset screen brightness threshold, that is, when the current scene meets the low-light condition, the intermediate refresh rate is further switched to the high refresh rate, thus realizing the step-by-step switching of the refresh rate. In this way, when the screen is in the idle state, the refresh rate is switched step by step according to the conditions met by the current scene, and finally the low refresh rate is switched to the high refresh rate, realizing frame locking to the high refresh rate. When the user touches the screen again and the screen enters the activity state from the idle state, there is no need to frequently switch the refresh rate, thus avoiding brightness jumps. Moreover, the step-by-step switching of the refresh rate can avoid the brightness jump caused by this refresh rate switching. That is to say, during the execution of the method of this embodiment, when the refresh rate is switched from the low refresh rate to the high refresh rate, there will be no brightness jump, further improving the user experience.
[0171] It can be understood that in other embodiments, the condition for switching from the low refresh rate to the intermediate refresh rate in the above step-by-step refresh rate switching strategy can also be set to other preset sub-conditions among the three preset sub-conditions, and multiple preset sub-conditions can be set. The embodiments of the present application do not limit this. For example, in one embodiment, the step-by-step refresh rate switching strategy can also be: when the screen is in the idle state and the current refresh rate is the low refresh rate, if the screen brightness is less than the preset screen brightness threshold and the current ambient light brightness is less than the preset ambient light brightness threshold, the refresh rate is switched to the intermediate refresh rate; then the current gray-scale histogram is obtained, and if it is determined based on the current gray-scale histogram that the proportion of low gray-scale pixels is greater than the preset proportion threshold, the refresh rate is switched to the high refresh rate.
[0172] The following describes the specific process by which the AGP module can determine the preset proportion threshold according to the scene recognition result.
[0173] As a possible implementation manner, the AGP module can determine the preset proportion threshold according to the following process:
[0174] Step 1: The AGP module determines the threshold weight according to the scene recognition result.
[0175] Optionally, the AGP can obtain the preset correspondence between the application scenario and the threshold weight, and then determine the target threshold weight corresponding to the current application scenario of the electronic device in the scene recognition result according to this preset correspondence.
[0176] In one embodiment, the preset correspondence between the application scenario and the threshold weight can be determined according to the grayscale of the screen in each application scenario and the touch frequency of the user on the screen in each application scenario. Specifically, for an application scenario with a lower screen grayscale and a higher touch frequency of the user on the screen, the possibility of brightness jump is greater, the threshold weight is smaller, the preset ratio to the threshold is smaller, the frame locking condition is looser, and it is easier to determine and identify the situation where brightness jump may occur, so as to reduce the occurrence of brightness jump and improve the user experience. For an application scenario with a higher screen grayscale and a lower touch frequency of the user on the screen, the possibility of brightness jump is smaller, the threshold weight is larger, the frame locking condition is stricter, the preset ratio threshold is larger, and the refresh rate is more easily set to a lower refresh rate, which can better save power while preventing brightness jump.
[0177] For example, the threshold weight in the text reading scenario can be -10%, the threshold weight in the video and audio scenario can be 10%, and the threshold weight in other scenarios can be -5%. Specifically, for the text reading scenario, the screen grayscale is lower and the touch frequency of the user on the screen is higher, so the possibility of brightness jump is greater. Therefore, the threshold weight in this application scenario is set to be smaller and negative to reduce the preset ratio threshold, thereby lowering the frame locking condition and making it easier to lock the refresh rate to a higher refresh rate to prevent brightness jump. For the video and audio scenario, the screen grayscale is higher and the touch frequency of the user on the screen is lower, so the possibility of brightness jump is smaller. Therefore, the threshold weight in this scenario is set to be larger and positive to increase the preset ratio threshold, thereby improving the frame locking condition and making it easier for the refresh rate to drop back to a lower refresh rate, which can better save power while preventing brightness jump. For other scenarios, both the screen grayscale and the touch frequency of the user on the screen are between the text reading scenario and the video and audio scenario. Therefore, the threshold weight in this scenario is also between the threshold weights corresponding to these two scenarios.
[0178] Step 2: The AGP module determines the preset ratio threshold according to the threshold weight based on a preset algorithm.
[0179] In a possible implementation manner, the calculation method for calculating the preset ratio threshold can be: preset ratio threshold = preset base threshold + threshold increment. Wherein, the preset base threshold is a preset value, and this preset base threshold can be a percentage value. The threshold increment can be determined according to the threshold weight. Optionally, the corresponding relationship between various threshold weights and threshold increments can be established in advance, and the threshold increment can be determined according to this corresponding relationship. Optionally, the threshold increment can also be obtained by calculating the product of the threshold weight and the base threshold weight, that is, preset ratio threshold = preset base threshold + preset base threshold * A = preset base threshold * (100% + A), where A represents the threshold weight.
[0180] In one embodiment, the preset base threshold may be 70%. Assuming that the current application scenario is a text reading scenario and the corresponding threshold weight is -10%, then the preset ratio = 70% * (100% - 10%) = 63%.
[0181] In this embodiment, the threshold weight is determined according to the scenario recognition result, and the preset ratio threshold is determined according to the threshold weight. In this way, the preset ratio threshold can be dynamically set in combination with the current application scenario of the electronic device, that is, the condition for judging the low gray-scale picture is dynamically set, fully considering the picture gray-scale and the user's touch screen frequency in different scenarios, making the judgment result of the picture gray-scale situation more accurate, and further making the frame locking condition more accurate and the result of the refresh rate switching more accurate, improving the user experience. Moreover, determining the preset ratio threshold according to the scenario recognition result and then performing the refresh rate switching enables the screen refresh rate switching method provided in this embodiment to be applicable to various application scenarios and improves the applicability of the method.
[0182] The calculation process of the low gray-scale pixel ratio of the picture in the embodiment of the present application will be described below.
[0183] Exemplarily, Figure 8 is a flowchart of a method for calculating the low gray-scale pixel ratio provided in an embodiment of the present application, Figure 9 is a schematic diagram of the principle for calculating the low gray-scale pixel ratio provided in an embodiment of the present application. Please refer to Figure 8 and Figure 9 together. Among them, the display engine driver module of the hardware abstraction layer determines the gray-scale histogram of the current display picture of the screen, and the AGP module of the local layer calculates the low gray-scale pixel ratio of the current display picture of the screen based on the gray-scale histogram. Specifically, it may include the following steps. In the following steps, the execution subject of S801 to S806 is the display engine driver module, and the execution subject of S807 is the AGP module, which will not be repeated below.
[0184] S801: Convert the current display picture of the screen into a gray-scale picture.
[0185] It can be understood that the current display picture of the screen may be a color picture. Converting the current display picture of the screen into a gray-scale picture is shown in, for example, Figure 9 Figure (a).
[0186] S802: Divide the gray-scale picture into multiple sub-gray-scale pictures.
[0187] In one embodiment, the gray-scale picture may be divided into 16 sub-gray-scale pictures of 4 * 4, as shown in Figure 9 Figure (b).
[0188] S803: Obtain the gray-scale data of each sub-gray-scale picture, where the gray-scale data refers to the gray-scale values of each pixel in the sub-gray-scale picture.
[0189] Figure 9 In figure (c) Figure 9 is an enlarged view of the sub-gray scale map 902 in figure (b). Taking obtaining the gray scale data of the sub-gray scale map 902 as an example for illustration. Exemplarily, the gray scale data of the sub-gray scale map 902 can be as shown in Table 1 below. Each number in the "gray scale data" column in Table 1 represents the gray scale value of a pixel.
[0190] Table 1
[0191]
[0192] S804. Divide the total gray scale range into multiple preset gray scale sections.
[0193] According to requirements, the total gray scale range of the screen can be divided into multiple consecutive gray scale sections. For example, the 256 gray scales from 0 to 255 can be divided into 32 gray scale sections, and each gray scale section is called a bin. Then the multiple preset gray scale sections include 32 bins from bin1 to bin32, as shown in Table 1.
[0194] S805. According to the gray scale data of each sub-gray scale map, count the number of pixels whose gray scale values are in each gray scale section in each sub-gray scale map.
[0195] For example, when counting the sub-gray scale map 902 shown in figure (c) Figure 9 it can be counted according to the gray scale data in Table 1 that the number of pixels with gray scale values in bin1 in the sub-gray scale map 902 is 28, the number of pixels with gray scale values in bin2 is 18... the number of pixels with gray scale values in bin32 is 2.
[0196] S806. According to the statistical results of each sub-gray scale map, perform gray scale histogram statistics on all sub-gray scale maps to obtain the gray scale histogram of the current display screen of the screen.
[0197] That is to say, by means of gray scale histogram statistics, count the total number of pixels whose gray scale values are in each gray scale section in all sub-gray scale maps. For example, the gray scale histogram of the current display screen of the screen obtained by statistics can be as shown in Figure 9 figure (d). Among them, Figure 9 in figure (d), the abscissa represents different bins, and the ordinate represents the number of pixels.
[0198] S807. According to the gray scale histogram of the current display screen of the screen, determine the proportion of the number of pixels whose gray scale values are less than the preset gray scale threshold to obtain the low gray scale pixel proportion of the current display screen of the screen.
[0199] Optionally, the preset gray scale threshold can be 15 to 20, for example, it can be 17. Assume that the pixel of the current displayed screen is X. According to the statistical result, the number of pixels less than the preset gray scale threshold is Y, then the proportion of low gray scale pixels is Y / X%. It can be understood that if the gray scale value of a certain pixel is less than the preset gray scale threshold, it means that the pixel is a low gray scale pixel. According to the gray scale histogram, by counting the proportion of the number of pixels with gray scale values less than the preset gray scale threshold, the proportion of low gray scale pixels in the gray scale map can be determined, thereby qualitatively determining the gray scale situation of the current displayed screen. The larger the proportion of low gray scale pixels, the lower the gray scale of the screen. Specifically, as described in the above embodiment, when the proportion of low gray scale pixels is greater than the preset proportion threshold, it means that the screen is a low gray scale screen; when the proportion of low gray scale pixels is less than or equal to the preset proportion threshold, it means that the screen is a high gray scale screen.
[0200] In this embodiment, by converting the current displayed screen of the screen into a gray scale map, then obtaining the gray scale values of each pixel in the gray scale map, and counting the total number of pixels with gray scale values in each gray scale section in the gray scale map, and further determining the proportion of the number of pixels with gray scale values less than the preset gray scale threshold, the proportion of low gray scale pixels is obtained. In this way, the proportion of pixels with lower gray scale in the image can be quantified and accurately counted, so as to accurately reflect the gray scale situation of the current displayed screen of the screen, improve the accuracy of the frame locking condition judgment, and further improve the accuracy of the refresh rate switching, thus improving the user experience. Moreover, in this embodiment, the gray scale map is divided into multiple sub-gray scale maps, and the gray scale statistics are respectively performed on each sub-gray scale map, which can further improve the accuracy of the gray scale statistics, thereby improving the accuracy of the calculation of the proportion of low gray scale pixels, further improving the accuracy of the frame locking condition judgment, increasing the accuracy rate of the refresh rate switching, and improving the user experience. In addition, in this embodiment, the gray scale statistics are performed by means of gray scale histogram statistics, which can improve the efficiency and accuracy of the gray scale statistics and has strong versatility.
[0201] It can be understood that the method for counting and calculating the proportion of low gray scale pixels provided in this embodiment is only an example. In other embodiments, other methods can also be selected for counting and calculating. For example, in another embodiment, in step S805, the gray scale histogram statistics method can also be used to statistically obtain the gray scale histogram corresponding to each sub-gray scale map. Then, in step S806, according to the gray scale histograms corresponding to each sub-gray scale map, the gray scale histogram of the current displayed screen of the screen is obtained. The embodiments of the present application do not make any limitation on this, as long as the proportion of low gray scale pixels can be determined.
[0202] In specific implementation, the present application further provides a computer storage medium, including a computer program. When the computer program runs on an electronic device, the electronic device is caused to execute some or all of the steps in the foregoing embodiments. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), or the like.
[0203] In specific implementation, the embodiments of the present application further provide a computer program product. The computer program product includes computer program code. When the computer program code runs on an electronic device, the electronic device is caused to execute some or all of the steps in the foregoing method embodiments.
[0204] The embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memories and / or storage elements), at least one input device, and at least one output device.
[0205] The program code can be applied to the input instructions to execute the various functions described in the present application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purpose of the present application, the processing system includes any system having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor.
[0206] The program code can be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system. When necessary, the program code can also be implemented in an assembly language or a machine language. In fact, the mechanism described in the present application is not limited to the scope of any specific programming language. In any case, the language can be a compiled language or an interpreted language.
[0207] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or via other computer-readable media. Accordingly, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to, floppy disks, optical disks, optical discs, compact disc read only memories (CD-ROMs), magneto-optical disks, read only memories (ROMs), random access memories (RAM), erasable programmable read only memories (EPROMs), electrically erasable programmable read only memories (EEPROMs), magnetic or optical cards, flash memory, or tangible machine-readable memories for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) in electrical, optical, acoustic, or other forms using the Internet. Thus, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0208] In the drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and / or order than shown in the accompanying drawings of the specification. Additionally, the inclusion of a structural or method feature in a particular figure does not imply that such a feature is required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0209] It should be noted that each unit / module mentioned in the device embodiments of the present application is a logical unit / module. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or can be implemented as a combination of multiple physical units / module. The physical implementation manner of these logical units / modules themselves is not the most important. The combination of the functions implemented by these logical units / modules is the key to solving the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed in the present application, which does not mean that there are no other units / modules in the above device embodiments.
[0210] It should be noted that in the examples and the specification of this patent, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising one" does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0211] Although the present application has been illustrated and described by referring to some preferred embodiments of the present application, those of ordinary skill in the art should understand that various changes can be made to it in form and detail without departing from the spirit and scope of the present application.
Claims
1. A method for adjusting screen parameters, characterized in that, The method is applied to an electronic device, which includes a low-power display APS module located in the application framework layer, a predictive image rendering AGP module located in the native layer, and a display engine driver module and a sensor module located in the hardware abstraction layer. The method includes: When the screen is in an idle state, the APS module sends the screen brightness to the AGP module; The sensor module obtains the current ambient light brightness and sends the current ambient light brightness to the AGP module through a first Hardware Interface Definition Language (HIDL) interface; The display engine driver module sends the grayscale histogram of the current display screen to the AGP module through a second HIDL interface; The AGP module determines whether the screen brightness, the current ambient light brightness, and the grayscale histogram satisfy a first switching condition. The first switching condition is that the following three preset sub-conditions are satisfied simultaneously: the screen brightness is less than a preset screen brightness threshold, the current ambient light brightness is less than a preset ambient light brightness threshold, and the proportion of low-gray-scale pixels in the grayscale histogram is greater than a preset proportion threshold. The proportion of low-gray-scale pixels is the proportion of pixels with a gray-scale value less than a preset gray-scale threshold in the grayscale histogram; If satisfied, the refresh rate of the screen is switched from a first refresh rate to a second refresh rate, where the first refresh rate is less than the second refresh rate.
2. The method according to claim 1, characterized in that, The electronic device further includes an ambient light sensor and an acceleration sensor ACC located in the kernel layer; The sensor module obtains the ambient light brightness, including: The sensor module receives the actual ambient light brightness sent by the ambient light sensor through a third HIDL interface; The sensor module receives the relative position sent by the acceleration sensor through a fourth HIDL interface. The relative position is the relative position between the user's hand-held posture and the point light source; The sensor module determines an ambient light compensation value based on the relative position and uses the sum of the actual ambient light brightness and the ambient light compensation value as the current ambient light brightness.
3. The method according to claim 2, wherein The relative position is the coordinate value of the relative position between the user's hand-held posture and the point light source; The sensor module determines the ambient light compensation value based on the relative position, including: The sensor module converts the coordinate value into a target angle value; The sensor module obtains the ambient light compensation value corresponding to the target angle value from the correspondence between the preset angle value and the preset ambient light compensation value.
4. The method according to any one of claims 1 to 3, characterized in that The AGP module determines whether the screen brightness, the current ambient light brightness, and the grayscale histogram satisfy the first switching condition, including: The AGP module determines whether the screen brightness is less than the preset screen brightness threshold; If the screen brightness is greater than or equal to the preset screen brightness threshold, it is determined that the first switching condition is not satisfied; If the screen brightness is less than the preset screen brightness threshold, the AGP module determines whether the current ambient light brightness is less than the preset ambient light brightness threshold; If the current ambient light brightness is greater than or equal to the preset ambient light brightness threshold, it is determined that the first switching condition is not satisfied; If the current ambient light luminance is less than the preset ambient light luminance threshold, the AGP module calculates the proportion of low gray-scale pixels in the currently displayed screen image based on the gray-scale histogram; The AGP module determines whether the proportion of low gray-scale pixels is greater than a preset proportion threshold; If the proportion of low gray-scale pixels is less than or equal to the preset proportion threshold, it is determined that the first switching condition is not satisfied; If the proportion of low gray-scale pixels is greater than the preset proportion threshold, it is determined that the first switching condition is satisfied.
5. The method according to any one of claims 1-3, characterized in that The AGP module determines whether the screen brightness, the current ambient light luminance, and the gray-scale histogram satisfy the first switching condition; If satisfied, the refresh rate of the screen is switched from the first refresh rate to the second refresh rate, including: The AGP module determines whether the second switching condition is satisfied, where the second switching condition is one or two preset sub-conditions included in the first switching condition; If so, the refresh rate of the screen is switched from the first refresh rate to the third refresh rate, where the third refresh rate is greater than the first refresh rate and less than the second refresh rate; The AGP module re-obtains the specified parameter and determines whether the specified parameter satisfies other preset sub-conditions except the second switching condition, where the specified parameter is the judgment parameter included in the other preset sub-conditions; If so, the refresh rate of the screen is switched from the third refresh rate to the second refresh rate.
6. The method according to any one of claims 1-3, characterized in that, The electronic device further includes a scene recognition module located in the application framework layer, and the method further includes: The scene recognition module recognizes the current application scene of the electronic device, obtains a scene recognition result, and sends the scene recognition result to the AGP module; The AGP module determines the preset proportion threshold according to the scene recognition result.
7. The method according to claim 6, wherein The AGP module determines the preset proportion threshold according to the scene recognition result, including: The AGP module determines the target threshold weight corresponding to the current application scene of the electronic device based on a preset correspondence between the application scene and the threshold weight; The AGP module calculates the product of the target threshold weight and the preset basic threshold to obtain a threshold increment; The AGP module uses the sum of the preset basic threshold and the threshold increment as the preset proportion threshold.
8. The method according to claim 7, characterized in that, The application scenes in the preset correspondence include a text reading scene and a video and audio scene.
9. An electronic device, characterized in that, Including: One or more processors and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program code, where the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, Including a computer program, when the computer program runs on the electronic device, it causes the electronic device to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Brightness adjusting method, brightness adjusting device and terminal
CN105825839A
Screen refresh rate switching method, electronic equipment and computer readable storage medium
CN116661724A
Screen brightness adjusting method and device, equipment and medium
CN117198193A
Method for extracting objects and apparatus therefor
KR102348852B1