A dimming method, electronic device and storage medium

By inserting adjacent brightness values ​​and grayscale adjustment parameters into high-frequency PWM dimming, the brightness step problem is solved, the display effect of electronic devices is improved, and brightness flicker is avoided.

CN119252211BActive Publication Date: 2026-06-05HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-04-12
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

During high-frequency PWM dimming, the brightness dimming accuracy of electronic devices is significantly reduced, resulting in obvious brightness steps and causing dimming flicker at low brightness levels, which affects the display effect.

Method used

By acquiring the brightness values ​​corresponding to multiple backlight levels, inserting a second brightness value between adjacent brightness values, and determining the corresponding grayscale adjustment parameters, the brightness of the display screen can be precisely adjusted, reducing brightness steps.

Benefits of technology

It improves the display effect of electronic devices, ensures smoother brightness changes, reduces brightness steps, and avoids flickering at low brightness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119252211B_ABST
    Figure CN119252211B_ABST
Patent Text Reader

Abstract

The application provides a dimming method, an electronic device and a storage medium, and relates to the technical field of intelligent terminal display. The second brightness value is inserted between adjacent first brightness values, so that the brightness of the display screen of the electronic device can be more accurately adjusted according to the gray scale adjustment parameter corresponding to the second brightness value, and the display effect of the electronic device is improved. The method comprises the following steps: acquiring first brightness values corresponding to each backlight step number in a plurality of backlight step numbers; determining the number of second brightness values to be inserted between adjacent first brightness values corresponding to adjacent backlight step numbers in the plurality of backlight step numbers based on the adjacent first brightness values; when the number of the second brightness values to be inserted is greater than or equal to a preset number, determining each second brightness value and a gray scale adjustment parameter corresponding to each second brightness value based on the plurality of adjacent first brightness values; and adjusting the brightness of the display screen of the electronic device based on each second brightness value and the gray scale adjustment parameter corresponding to each second brightness value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart terminal display technology, and in particular to a dimming method, electronic device and storage medium. Background Technology

[0002] With the rapid development of electronic device technology, mobile phones and other electronic devices have become indispensable tools in people's lives. Currently, the brightness of electronic devices can be adjusted using Pulse Width Modulation Dimming (PWM). Since the higher the frequency of PWM dimming, the less harm it causes to the human eye, high-frequency PWM dimming has become the development direction of smart terminal display technology to achieve eye-protection functionality in electronic devices.

[0003] However, due to the influence of hardware circuits in electronic devices, the dimming accuracy is significantly lost during high-frequency PWM dimming, resulting in brightness steps between the displayed brightness levels. When the human eye perceives the brightness changes between these steps, it will cause dimming flicker at low brightness, severely affecting the display effect of the electronic device. Summary of the Invention

[0004] This application provides a dimming method, an electronic device, and a storage medium that can avoid brightness steps between the brightness levels of the electronic device display, thereby improving the display effect of the electronic device.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] In a first aspect, this application provides a dimming method applied to an electronic device. The method includes: acquiring a first brightness value corresponding to each backlight level among a plurality of backlight levels; determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on adjacent first brightness values ​​corresponding to adjacent backlight levels among the plurality of backlight levels; when the number of second brightness values ​​to be inserted is greater than or equal to a preset number, determining each second brightness value and a grayscale adjustment parameter corresponding to each second brightness value based on the plurality of adjacent first brightness values; and adjusting the brightness of the display screen of the electronic device based on each second brightness value and the grayscale adjustment parameter corresponding to each second brightness value.

[0007] Based on the technical solution provided in the above embodiments, a second brightness value can be inserted between adjacent first brightness values ​​corresponding to adjacent backlight levels in multiple backlight levels, so that the brightness step change between two adjacent brightness values ​​is small. Thus, the brightness of the electronic device's display screen can be adjusted more precisely according to each second brightness value and the grayscale adjustment parameter corresponding to each second brightness value, ensuring that the brightness step between the brightness displayed by the electronic device is small and improving the display effect of the electronic device.

[0008] In one possible design approach of the first aspect, determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on adjacent first brightness values ​​corresponding to adjacent backlight orders in a plurality of backlight orders includes: determining the brightness change value between adjacent first brightness values ​​corresponding to adjacent backlight orders; and determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on a plurality of brightness change values ​​and adjacent first brightness values.

[0009] Based on the above scheme, the number of second brightness values ​​inserted between adjacent first brightness values ​​can be determined relatively accurately based on multiple brightness change values ​​and adjacent first brightness values.

[0010] In one possible design approach of the first aspect, adjacent first brightness values ​​include a third brightness value and a fourth brightness value, wherein the third brightness value is greater than the fourth brightness value. Determining the brightness change value between adjacent first brightness values ​​corresponding to adjacent backlight levels includes: determining the brightness difference between the third brightness value and the fourth brightness value; and determining the brightness change value based on a first ratio of the brightness difference to the fourth brightness value.

[0011] Based on the above scheme, the brightness difference between the third brightness value and the fourth brightness value can be accurately determined.

[0012] In one possible design approach of the first aspect, determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on multiple brightness change values ​​and adjacent first brightness values ​​includes: determining a brightness change step size based on multiple brightness change values; and determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the brightness change step size and adjacent first brightness values.

[0013] Based on the above scheme, when the brightness change step size can accurately reflect the changing trend between multiple brightness change values, the number of second brightness values ​​to be inserted between adjacent first brightness values ​​can be determined more accurately based on the brightness change step size and adjacent first brightness values.

[0014] In one possible design approach of the first aspect, determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the brightness change step size and adjacent first brightness values ​​includes: determining a second ratio between a third brightness value and a fourth brightness value; and determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the second ratio and the brightness change step size.

[0015] Based on the above scheme, the number of second brightness values ​​to be inserted between adjacent first brightness values ​​can be accurately determined.

[0016] In one possible design approach of the first aspect, adjacent first brightness values ​​include a third brightness value and a fourth brightness value, where the third brightness value is greater than the fourth brightness value. Determining each second brightness value and the corresponding grayscale adjustment parameter includes: determining a brightness change step size based on multiple brightness change values; determining each second brightness value based on the brightness change step size and the fourth brightness value; and determining the corresponding grayscale adjustment parameter based on each second brightness value and the third brightness value.

[0017] Based on the above scheme, it is possible to accurately determine each second brightness value to be inserted between adjacent first brightness values ​​and the grayscale adjustment parameters corresponding to each second brightness value.

[0018] In one possible design of the first aspect, adjacent first brightness values ​​include a third brightness value and a fourth brightness value, wherein the third brightness value is greater than the fourth brightness value. The brightness of the display screen of the electronic device is adjusted based on each second brightness value and the grayscale adjustment parameter corresponding to each second brightness value, including: determining the backlight adjustment parameter corresponding to each second brightness value based on the third brightness value; and adjusting the brightness of the display screen of the electronic device based on each second brightness value, the backlight adjustment parameter corresponding to each second brightness value, and the grayscale adjustment parameter corresponding to each second brightness value.

[0019] Based on the above technical solution, when the backlight adjustment parameters cannot achieve precise adjustment of the brightness of the electronic device's display screen, the brightness of the electronic device's display screen can be further adjusted by using the grayscale adjustment parameters corresponding to each second brightness value, thereby achieving high-precision adjustment of the brightness of the electronic device's display screen.

[0020] In one possible design of the first aspect, the brightness of the display screen of the electronic device is adjusted based on each second brightness value, the backlight adjustment parameter corresponding to each second brightness value, and the grayscale adjustment parameter corresponding to each second brightness value, including: obtaining a target brightness value; determining a target backlight adjustment parameter corresponding to the target brightness value from the backlight adjustment parameters corresponding to each second brightness value; determining a target grayscale adjustment parameter corresponding to the target brightness value from the grayscale adjustment parameters corresponding to each second brightness value; writing the target backlight adjustment parameter into the screen register corresponding to the backlight of the electronic device; and transmitting the target grayscale adjustment parameter to the corresponding image processing module in the electronic device to adjust the brightness of the display screen of the electronic device accordingly.

[0021] Based on the above technical solution, when the backlight adjustment parameters corresponding to each second brightness value are relatively accurate, the target backlight adjustment parameters corresponding to the target brightness value can be determined relatively accurately; when the grayscale adjustment parameters corresponding to each second brightness value are relatively accurate, the target grayscale adjustment parameters corresponding to the target brightness value can be determined relatively accurately. Furthermore, by writing the target backlight adjustment parameters into the screen register corresponding to the backlight of the electronic device and transmitting the target grayscale adjustment parameters to the corresponding image processing module in the electronic device, the brightness adjustment of the display screen of the electronic device can be precisely achieved, ensuring that the brightness of the display screen of the electronic device corresponds to the target brightness value.

[0022] In a second aspect, this application provides an electronic device comprising: a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform a dimming method as provided in the first aspect and any of its possible design embodiments.

[0023] Thirdly, this application provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform a dimming method as provided in the first aspect and any of its possible design embodiments.

[0024] Fourthly, this application provides a computer program product containing executable instructions that, when the computer program product is run on an electronic device, cause the electronic device to perform a dimming method as provided in the first aspect and any of its possible design embodiments.

[0025] Fifthly, an apparatus (e.g., a system-on-a-chip) is provided, comprising a processor for supporting an electronic device in performing the functions described in the second aspect above. In one possible design, the apparatus further comprises a memory for storing program instructions and data necessary for the electronic device. When the apparatus is a system-on-a-chip, it may be composed of chips or may include chips and other discrete devices.

[0026] Understandably, the beneficial effects that the technical solutions provided in the second to fifth aspects described above can be achieved can be referred to the beneficial effects in the first aspect and any of its possible design methods, which will not be repeated here. Attached Figure Description

[0027] Figure 1 A schematic diagram of the hardware architecture of an electronic device provided in an embodiment of this application;

[0028] Figure 2A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;

[0029] Figure 3 A schematic flowchart of a dimming method provided in an embodiment of this application;

[0030] Figure 4 A schematic diagram of a brightness adjustment interface for an electronic device provided in an embodiment of this application;

[0031] Figure 5 A schematic flowchart illustrating another dimming method provided in an embodiment of this application;

[0032] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0033] Figure 7 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0034] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that “ / ” means “or,” for example, A / B can mean A or B; “and / or” in the text is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can mean: A alone, A and B simultaneously, and B alone.

[0035] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0036] The terms "first" and "second" in the following embodiments of this application are for descriptive purposes only and should not be construed as implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0037] With the rapid development of electronic device technology, people have increasingly higher requirements for the display effect of electronic devices. Currently, in terms of hardware design of electronic devices, the main approach is to add a thin-film transistor (TFT) reset drive circuit to the pixel drive circuit of the electronic device to eliminate afterimages and mura (such as various traces caused by uneven brightness of the display) that occur during the display process, making the display image smoother.

[0038] To ensure the display image is fully refreshed, high-frequency PWM dimming with pulse counts that are multiples of 3 can be used to address the issue of image retention during display. Currently, in the implementation of 36-pulse PWM dimming, since there is no specific integrated circuit (IC) capable of generating a 36-pulse PWM control signal, it is necessary to reuse a 12-pulse IC three times to achieve 36-pulse PWM dimming.

[0039] However, in the process of using a 12-pulse IC to achieve 36-pulse PWM dimming by repeating it 3 times, only 12 pulses can be dimmed independently. This results in a significant loss of dimming accuracy, causing brightness steps between display brightness levels. Furthermore, when the brightness changes between adjacent steps are within the range that can be perceived by the human eye, it will cause dimming flicker at low brightness, which will seriously affect the display effect of electronic devices.

[0040] To address the aforementioned problems, this application provides a dimming method applicable to electronic devices. In this solution, a first brightness value corresponding to each backlight level among multiple backlight levels can be obtained. Based on adjacent first brightness values ​​corresponding to adjacent backlight levels, the number of second brightness values ​​to be inserted between adjacent first brightness values ​​is determined. Thus, when the number of second brightness values ​​to be inserted is greater than or equal to a preset number, each second brightness value and its corresponding grayscale adjustment parameter can be accurately determined based on multiple adjacent first brightness values. Therefore, based on each second brightness value and its corresponding grayscale adjustment parameter, the brightness of the electronic device's display screen can be precisely adjusted, ensuring a small brightness gradient between brightness levels and improving the display effect of the electronic device.

[0041] The technical solutions provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0042] In this application, the electronic device can be a mobile phone, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., which uses a multi-battery series system to supply power. The embodiments of this application do not limit the specific type of electronic device.

[0043] Take mobile phones as an example of electronic devices. Figure 1 A schematic diagram of the structure of the electronic device provided in this application is shown.

[0044] Reference Figure 1 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a display screen 193, a subscriber identification module (SIM) card interface 194, and a camera 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.

[0045] Processor 110 may include one or more processing units, such as an access point (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0046] A controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.

[0047] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. In this embodiment, the processor can be a System-on-a-Chip (SoC).

[0048] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an I2C interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0049] The charging management module 140 is used to receive charging input from a power supply device (e.g., a charger, a laptop, etc.). The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via a USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device.

[0050] While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141. Specifically, the battery 142 can be composed of multiple batteries connected in series. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110.

[0051] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 193, camera 195, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as the voltage, current, battery cycle count, and battery health status (leakage current, impedance) of the battery 142. In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device; for example, the power management module 141 and the charging management module 140 may be different functional modules within the same chip.

[0052] In this embodiment, the power management module 141 and / or the charging management module 140 may include a fast charging chip. The power management module 141 and / or the charging management module 140 can utilize the fast charging chip to achieve high-power charging of the battery. The fast charging chip has multiple registers for storing corresponding ADC data for different types of data.

[0053] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.

[0054] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data, and can be pre-loaded into the RAM for direct read and write operations by the processor 110.

[0055] A touch sensor, also known as a "touch device," can be located on the display screen 193. The touch sensor and the display screen 193 together form a touchscreen, also called a "touchscreen." The touch sensor detects touch operations applied to or near it. 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 193. In other embodiments, the touch sensor may also be located on the surface of the electronic device, in a different position than the display screen 193.

[0056] A pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 193. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. When a touch operation is applied to the display screen 193, the electronic device monitors the intensity of the touch operation based on the pressure sensor. The electronic device can also calculate the touch location based on the monitoring signal from the pressure sensor. In some embodiments, touch operations applied to the same touch location but with different intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.

[0057] A temperature sensor is a device used to measure the temperature of an environment or object. It converts temperature into an electrical or digital signal, allowing the temperature to be read and processed by a computer or other electronic device.

[0058] A gyroscope (GYRO-sensor), also known as a ground sensor or gyroscope sensor, traditionally consists of an internal gyroscope. A three-axis gyroscope can simultaneously measure position, trajectory, and acceleration in six directions. A single-axis gyroscope can only measure quantities in two directions, meaning a system typically requires three gyroscopes, while a single three-axis gyroscope can replace three single-axis gyroscopes. The working principle of a three-axis gyroscope is to measure the angle between the vertical axis of the gyroscope rotor and the device in a three-dimensional coordinate system, and calculate the angular velocity. The angle and angular velocity are used to determine the object's motion state in three-dimensional space. A three-axis gyroscope can simultaneously measure six directions: up, down, left, right, forward, and backward (the composite direction can also be decomposed into three-axis coordinates), ultimately determining the device's trajectory and acceleration. In other words, a three-axis gyroscope determines the device's current motion state by measuring its own rotation, such as forward, backward, up, down, left, or right; and whether it is accelerating (angular velocity) or decelerating (angular velocity). In this embodiment, the gyroscope sensor in the electronic device is a three-axis gyroscope sensor. Based on the detection data from the gyroscope sensor, the electronic device can determine the location or area on the electronic device corresponding to the user's thermal feedback operation.

[0059] The electronic device implements display functions through a GPU, a display screen 193, and an application processor. The GPU is a microprocessor for image editing, connected to the display screen 193 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 modify display information.

[0060] Electronic devices can achieve shooting functions through ISP, camera 195, video codec, GPU, display 193 and application processor.

[0061] The Information Service Provider (ISP) is used to process data fed back from the camera 195. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into the camera 195. The camera 195 is used to capture still images or videos. In some embodiments, the electronic device may include one or N cameras, where N is a positive integer greater than 1. The camera 195 can be a front-facing camera or a rear-facing camera.

[0062] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device is selecting a frequency, a DSP can perform a Fourier transform on the frequency energy.

[0063] Display screen 193 is used to display images, videos, etc. Display screen 193 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniled LED, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 193, where N is a positive integer greater than 1.

[0064] In this embodiment of the application, the display screen 193 can be used to display the interface of an electronic device (e.g., a camera preview interface, a video preview interface, a final preview interface, etc.), and display images captured by any one or more cameras 195 in the interface.

[0065] In some examples, the display screen 193 may also include space for adjusting the display brightness at specific locations on the interface. For example, a brightness bar may be provided in the upper right corner of the display screen 193.

[0066] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem, and baseband processor.

[0067] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0068] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 can be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be housed in the same device.

[0069] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 193. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0070] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0071] The SIM card interface 194 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 194 to make contact with and detach from the electronic device. The electronic device can support one or more SIM card interfaces. The SIM card interface 194 supports Nano SIM cards, Micro SIM cards, and other SIM cards. Multiple cards can be inserted into the same SIM card interface 194 simultaneously. The SIM card interface 194 is also compatible with external memory cards. The electronic device interacts with the network through the SIM card to achieve functions such as calls and data communication. One SIM card corresponds to one user number.

[0072] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0073] Of course, this is understandable. Figure 1 The illustration shown is merely an example when the electronic device is in the form of a mobile phone. If the electronic device is a tablet, handheld computer, personal computer (PC), PDA, wearable device (such as a smartwatch, smart bracelet), or other device form factor, the structure of the electronic device may include more... Figure 1 The fewer structures shown can also include more than Figure 1 The structures shown are not limited here.

[0074] It is understandable that, generally speaking, the realization of functions in electronic devices requires not only hardware support but also software cooperation. The software system of electronic devices can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application's embodiment uses a layered architecture... Taking the system as an example, the software structure of the electronic device is illustrated.

[0075] Figure 2 This is a schematic diagram of the layered architecture of the software system of the electronic device provided in the embodiments of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces (e.g., APIs).

[0076] In some examples, refer to Figure 2 As shown in the embodiments of this application, the software of the electronic device is divided into four layers, from top to bottom: application layer, system library and Android runtime, HAL layer (hardware abstraction layer) and driver layer (or kernel layer).

[0077] The application layer can include a series of applications. For example... Figure 3 As shown, the application layer can include applications (APPs) such as camera, gallery, calendar, map, WLAN, Bluetooth, music, video, SMS, call, contacts, and live streaming. Among them, the call application and contacts can be pre-installed on the electronic device or third-party applications for user calls provided by the app store.

[0078] In some examples, apps such as camera, gallery, calendar, map, video, and live streaming, as well as third-party applications, can call or include a brightness adjustment request module and an adjustment result display module. The brightness adjustment request module can be used to generate and send brightness adjustment requests. The adjustment result display module can be used to receive brightness adjustment results and display them.

[0079] The system library can include multiple functional modules, such as: a surface manager, media libraries, OpenGL ES, and SGL. The surface manager manages the display subsystem and provides 2D and 3D layer blending for multiple applications. The media libraries support playback and recording of various common audio and video formats, as well as still image files. The media libraries support various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. OpenGL ES is used for 3D graphics drawing, image rendering, compositing, and layer processing. SGL is a 2D graphics engine.

[0080] In some examples, the surface manager may include a brightness management module and an adjustment result transmission module. The brightness management module can receive brightness adjustment requests, generate a dynamic brightness management item based on the target brightness value and the current brightness value in the request, and issue a brightness adjustment request including the target brightness value corresponding to the current frame based on the dynamic brightness management item. The adjustment result transmission module can receive the brightness adjustment results and pass them through to the adjustment result display module in the application layer.

[0081] The Android runtime consists of the core libraries and the ART virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries comprise two parts: one part contains the functionalities that Java code needs to call, and the other part consists of the Android core libraries. The application layer and application framework layer run in the ART virtual machine. The ART virtual machine executes the Java files of the application layer and application framework layer into binary files. The ART virtual machine is used for managing object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0082] The Hardware Abstraction Layer (HAL) is an interface layer located between the operating system kernel and the hardware circuitry, its purpose being to abstract the hardware. It hides the platform-specific hardware interface details, providing the operating system with a virtual hardware platform that is hardware-independent and portable across multiple platforms. The HAL provides a standard interface that exposes device hardware functionality to the higher-level Java API framework (i.e., the framework layer). The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component.

[0083] In some examples, the HAL layer includes a camera HAL, an audio HAL, a Bluetooth HAL, and a sensor HAL (or sensor service), etc., but this application embodiment does not limit this. The camera HAL may include a brightness adjustment request processing module and a processing result capture module.

[0084] The brightness adjustment request processing module receives a brightness adjustment request, including the target brightness value corresponding to the current frame, and responds to the request. It determines the target backlight adjustment parameters (e.g., target backlight level) and target grayscale adjustment parameters corresponding to the target brightness value, and inputs the target grayscale adjustment parameters to the display compositing module (e.g., Hardware Composer HAL, HWC). Simultaneously, it sends the target backlight level to the screen register of the backlight in the driving layer. The screen register adjusts the driving current of the pixels in response to the target backlight level adjustment parameters, obtaining the initial brightness adjustment result of the pixel in response to the corresponding driving current, and then passes the initial brightness adjustment result to the HAL layer. The HWC then performs display compositing based on the initial brightness adjustment result and the target grayscale adjustment parameters to obtain the brightness adjustment processing result. The processing result capture module captures the brightness adjustment processing result and passes it to the surface manager.

[0085] The kernel layer (or driver layer) is the layer between hardware and software. In some examples, the kernel layer includes camera drivers (or webcam drivers), display drivers, audio drivers, sensor drivers, battery drivers, etc., but this application embodiment does not limit this.

[0086] The methods described in the following embodiments can all be implemented in an electronic device with the above-described hardware structure.

[0087] Based on the above hardware architecture and software structure, the following combines... Figure 3 This application provides a detailed description of a dimming method based on its embodiments, which can be used in electronic devices. (Refer to...) Figure 3 As shown, the dimming method provided in this application embodiment may include steps S301 to S310:

[0088] Step S301: Obtain the first brightness value corresponding to multiple backlight levels within the preset backlight level range.

[0089] For example, backlight levels are used to represent different brightness adjustment levels in a backlight system. In some examples, a higher backlight level allows the backlight system to finer adjust the brightness, thereby providing a better viewing experience under different ambient lighting conditions.

[0090] For example, the preset backlight level range refers to the range of backlight levels supported by the backlight of the electronic device. In some examples, the preset backlight level range may be determined based on the number of bits in the screen register in the electronic device. For example, if the screen register is 12 bits, the preset backlight level range is 0 to 4095 (2 to the power of 12) levels.

[0091] In some examples, the first brightness values ​​corresponding to multiple backlight levels within the preset backlight level range can be found in Table 1 below.

[0092] Table 1

[0093] Backlight levels First luminance value (unit: Nit) 743 12.0309 744 12.0249 745 12.3585 746 12.2780 747 12.3648 748 12.3338 749 12.3532 750 12.2980 751 12.3684 752 12.3149 753 12.3625 754 12.3167 755 12.6167 756 12.5756 757 12.6127 758 12.5722 759 12.6106 760 12.5545

[0094] For example, when writing multiple backlight levels within a preset backlight level range into the screen register of an electronic device, the brightness value corresponding to each backlight level can be tested by a brightness testing device.

[0095] Step S302: Determine the brightness change value between two adjacent first brightness values ​​corresponding to two adjacent backlight levels among multiple backlight levels.

[0096] For example, the brightness change value can be a percentage representing the magnitude of the brightness change. In some examples, the brightness change value can be greater than or equal to 2%, or less than 2%, and the embodiments of this application do not limit the magnitude of the brightness change value. For example, referring to Table 1 above, the brightness change value of the two adjacent first brightness values ​​12.3167 and 12.6167 corresponding to adjacent backlight levels 754 and 755 ((12.6167-12.3167) / 12.3167) is greater than or equal to 2%; the brightness change value of the two adjacent first brightness values ​​12.3338 and 12.3532 corresponding to adjacent backlight levels 748 and 749 ((12.3532-12.3338) / 12.3338) is less than 2%.

[0097] For example, based on a preset brightness change determination rule, corresponding calculations can be performed on two adjacent first brightness values ​​corresponding to two adjacent backlight orders among multiple backlight orders to obtain the brightness change value. This application embodiment does not limit the implementation method of the brightness change determination rule.

[0098] For example, taking a preset brightness change rule corresponding to ΔL / L, a set of two adjacent brightness values ​​includes a third brightness value and a fourth brightness value, where the third brightness value is greater than the fourth brightness value. The brightness difference between the adjacent third and fourth brightness values ​​can be calculated first, and then a first ratio between the brightness difference and the fourth brightness value can be calculated. The brightness change value is determined based on this first ratio. In some examples, the first ratio can be determined as the brightness change value, or the first ratio can be multiplied by a preset proportional coefficient to obtain the brightness change value. This application embodiment does not limit the specific implementation method for determining the brightness change value. This application embodiment uses determining the first ratio as the brightness change value as an example for illustrative explanation.

[0099] For example, since multiple backlight levels include multiple sets of two adjacent backlight levels, and a set of two adjacent backlight levels can correspond to a set of two adjacent brightness values, multiple brightness change values ​​can be determined based on the first brightness values ​​corresponding to the multiple backlight levels respectively.

[0100] In some examples, referring to Table 1 above, the 18 backlight levels (backlight levels 743 to 760) include 17 sets of two adjacent backlight levels (e.g., 743 and 744, 744 and 745, 745 and 746, etc.). Furthermore, 17 brightness variation values ​​can be determined based on the 17 sets of two adjacent first brightness values ​​(e.g., 12.0309 and 12.0249, 12.0249 and 12.3585, 12.3585 and 12.2780, etc.).

[0101] Step S303: Based on multiple brightness change values ​​and two adjacent first brightness values, determine the number of second brightness values ​​to be inserted between two adjacent first brightness values.

[0102] For example, if the number of second brightness values ​​to be inserted is greater than or equal to a preset number, then proceed to step S304; if the number of second brightness values ​​to be inserted is less than the preset number, then determine that no brightness value will be inserted between two adjacent first brightness values.

[0103] In this embodiment, the brightness change step size can be determined based on multiple brightness change values, and the number of second brightness values ​​to be inserted between two adjacent first brightness values ​​can be determined based on the brightness change step size and two adjacent first brightness values.

[0104] For example, the brightness change step size can be a brightness change value that ensures the display screen of an electronic device displays normally during dimming. In some examples, the brightness change step size can be any percentage less than or equal to 0.5%. This application embodiment uses a brightness change step size of 0.5% as an example for illustrative purposes.

[0105] In this embodiment of the application, the maximum brightness change value can be determined from multiple brightness change values, and then the brightness change step size can be determined based on at least one brightness change value other than the maximum brightness change value from the multiple brightness change values.

[0106] For example, the maximum brightness change can refer to a brightness change value that is greater than or equal to a preset percentage. The preset percentage can be the brightness change value that causes flickering on the display of an electronic device during dimming. In some examples, the preset percentage can be the minimum brightness change perceived by the human eye when the brightness exceeds 1 nit (nit), according to a simplified model of the human eye. For example, the preset percentage can be 2%, or any value greater than 2%.

[0107] For example, at least one maximum brightness change value may be included among the multiple brightness change values. In some examples, referring to Table 1, since the brightness change values ​​between brightness levels 744 and 745 and between brightness levels 754 and 755 are both greater than or equal to 2%, the brightness change values ​​between brightness levels 744 and 745 and between brightness levels 754 and 755 can be determined as the maximum brightness change values.

[0108] In some examples, the average brightness value of at least one brightness change value other than the maximum brightness change value can be determined as the brightness change step size. For example, referring to Table 1, the average (e.g., 0.5%) of the remaining 15 brightness change values ​​other than the brightness change values ​​between brightness orders 744 and 745 and between brightness orders 754 and 755 can be used as the brightness change step size.

[0109] In this embodiment of the application, taking two adjacent first brightness values ​​as an example, which include a third brightness value and a fourth brightness value, and the third brightness value is greater than the fourth brightness value, the second ratio of the third brightness value to the fourth brightness value can be determined first, and based on the second ratio and the brightness change step size, the number of second brightness values ​​to be inserted between two adjacent first brightness values ​​can be determined.

[0110] For example, the number n of second brightness values ​​to be inserted between the third brightness value and the fourth brightness value can be determined based on the following formula (1).

[0111] n = log (1+c%) *B / A (1);

[0112] Where B represents the third brightness value; A represents the fourth brightness value; and c% represents the brightness change step size.

[0113] For example, when the calculated number of second brightness values ​​to be inserted, n, is not an integer, it is determined by rounding down. In some examples, if the calculated number of second brightness values ​​to be inserted, n, is 1.23 or 1.78, then the number of second brightness values ​​to be inserted between the third and fourth brightness values ​​is determined to be 1. If the calculated number of second brightness values ​​to be inserted, n, is 4.9 or 4.1, then the number of second brightness values ​​to be inserted between the third and fourth brightness values ​​is determined to be 4. If the calculated number of second brightness values ​​to be inserted, n, is 0.9 or 0.1, then the number of second brightness values ​​to be inserted between the third and fourth brightness values ​​is determined to be 0. For example, referring to Table 1, when the third brightness value is 12.6167 corresponding to brightness level 755, the fourth brightness value is 12.3167 corresponding to brightness level 754, and the brightness change step size is 0.5%, n can be calculated according to formula (1) as log (1+0.5%) *12.6167 / 12.3167≈4.

[0114] For example, if the number of second brightness values ​​to be inserted between two adjacent first brightness values ​​is 0, it means that the brightness change between two adjacent first brightness values ​​is small enough that there is no need to insert a second brightness value between two adjacent first brightness values.

[0115] Step S304: When the number of second brightness values ​​to be inserted is greater than or equal to a preset number, each second brightness value and the grayscale adjustment parameter corresponding to each second brightness value are determined based on multiple brightness change values ​​and two adjacent first brightness values.

[0116] For example, the preset quantity can be 1. Having a number of second brightness values ​​to be inserted that is greater than or equal to the preset quantity may mean that a second brightness value needs to be inserted between two adjacent first brightness values.

[0117] In this embodiment of the application, when determining to insert at least one second brightness value between two adjacent first brightness values, a brightness change step size can be determined based on multiple brightness change values; each second brightness value can be determined based on the brightness change step size and a fourth brightness value; and grayscale adjustment parameters corresponding to each second brightness value can be determined based on each second brightness value and a third brightness value.

[0118] For example, the brightness values ​​can be obtained by sequentially increasing the brightness value corresponding to the brightness change step size based on the fourth brightness value. In some examples, the brightness value L can be determined according to the following formula (2).

[0119] L = A * (1 + c%) i (2);

[0120] Where i can be a positive integer greater than or equal to 1, and i represents the i-th second brightness value inserted starting from the fourth brightness value.

[0121] Referring to Table 1 above, if, according to formula (1), it is determined that four brightness values ​​need to be inserted between the fourth brightness value of 12.3167 corresponding to brightness level 754 and the third brightness value of 12.6167 corresponding to brightness level 755, and the brightness change step size is 0.5%, then according to formula (2) above, the first inserted second brightness value L1 = 12.3167 * (1 + 0.5%) = 12.3783; the second inserted second brightness value L2 = 12.3167 * (1 + 0.5%). 2 =12.4402; The second brightness value of the third insertion, L3, is 12.3167*(1+0.5%). 3 =12.5024; the fourth inserted second brightness value L4 = 12.3167*(1+0.5%) 4 =12.5649.

[0122] For example, the ratio of each second brightness value to the third brightness value can be determined, and the obtained ratio can be used as the grayscale adjustment parameter corresponding to each second brightness value. That is, the ratio of the i-th inserted second brightness value to the third brightness value can be used as the grayscale adjustment parameter corresponding to the i-th inserted second brightness value. In some examples, the grayscale adjustment parameter PCC corresponding to each second brightness value can be determined according to the following formula (3).

[0123] PCC = A * (1 + c%) i / B (3);

[0124] In some examples, if the four brightness values ​​to be inserted between the fourth brightness value 12.3167 and the third brightness value 12.6167 are determined according to formula (2) to be 12.3783, 12.4402, 12.5024 and 12.5649 respectively, then the corresponding four grayscale adjustment parameters are 0.9811, 0.9860, 0.9909 and 0.9959 respectively.

[0125] Step S305: Based on the backlight level corresponding to the third brightness value, determine the backlight adjustment parameters corresponding to each second brightness value.

[0126] For example, the backlight level corresponding to the third brightness value can be determined as the backlight adjustment parameter corresponding to each of the second brightness values. For instance, if the backlight level corresponding to the third adjustment parameter is 755, then 755 is used as the backlight adjustment parameter corresponding to each of the second brightness values ​​inserted between the fourth brightness value 12.3167 and the third brightness value 12.6167.

[0127] Step S306: Write the grayscale adjustment parameters corresponding to the second brightness value and the backlight adjustment parameters corresponding to the second brightness value into the electronic device.

[0128] For example, the grayscale adjustment parameter corresponding to the second brightness value and the backlight adjustment parameter corresponding to the second brightness value can be represented by the same table, or they can be represented by different tables. This application embodiment does not limit the representation method of the grayscale adjustment parameter corresponding to the second brightness value and the backlight adjustment parameter corresponding to the second brightness value. This application embodiment uses the representation of the grayscale adjustment parameter corresponding to the second brightness value and the backlight adjustment parameter corresponding to the second brightness value by the same table as an example for illustrative purposes. For example, the grayscale adjustment parameter corresponding to the second brightness value and the backlight adjustment parameter corresponding to the second brightness value can be seen in Table 2 below.

[0129] Table 2

[0130] Brightness value Backlight adjustment parameters Grayscale adjustment parameters 12.3167 754 1 12.3783 755 0.9811 12.4402 755 0.9860 12.5024 755 0.9909 12.5649 755 0.9959 12.6167 755 1

[0131] In some examples, Table 2 above can be stored in the HAL layer of the electronic device.

[0132] Step S307: In response to the brightness adjustment command triggered by the electronic device, a brightness adjustment dynamic item is generated.

[0133] For example, the brightness adjustment command can be a voice adjustment command or a brightness adjustment operation. This application embodiment does not limit the implementation method of the brightness adjustment command. The following embodiments use a brightness adjustment command as a brightness adjustment operation as an example for illustrative explanation.

[0134] For example, taking brightness adjustment as an example, the user can first trigger the settings control in the electronic device or scroll down on the screen of the electronic device to enter, such as... Figure 4 The display brightness adjustment interface 40 is shown. (As shown) Figure 4 As shown, the brightness adjustment interface may include a brightness bar 400. The user can manually slide the brightness bar 400, and the electronic device receives and responds to the user's sliding operation (i.e., brightness adjustment operation) to generate a dynamic brightness adjustment item. It should be noted that the dimming method in this embodiment can be applied to any application that needs to display images. This application can be an application on an electronic device or a third-party application; this embodiment does not limit this. For example, the application could be a camera application on an electronic device or a third-party WeChat application.

[0135] For example, the brightness adjustment dynamics can be a series of brightness groups that adjust the current display brightness to the target display brightness within a preset time period, as determined by the brightness adjustment command. In some examples, if the brightness adjustment command is used to adjust the display brightness from 10 nits to 100 nits, the brightness adjustment dynamics can be to increase 10 nits by 11.5 nits sequentially within 100 ms (milliseconds) until it is adjusted to 100 nits. That is, the brightness adjustment dynamics can include 21.5 nits, 33 nits, 44.5 nits, 56 nits, 67.5 nits, 79 nits, and so on.

[0136] For example, a user can automatically trigger a brightness adjustment command when launching an application that requires image display, or they can choose to trigger a brightness adjustment command before or after launching an application that requires image display, depending on the user's needs.

[0137] For example, after a brightness adjustment command is triggered, a brightness adjustment request module can be triggered to generate a brightness adjustment request and send the request to the surface manager in the system library. The brightness management module in the surface manager receives the brightness adjustment request and generates a dynamic brightness adjustment item in response.

[0138] In some examples, the adjustment result transmission module in the surface manager can also receive the brightness adjustment results transmitted through the HAL layer and transmit the brightness adjustment results to the adjustment result display module in the application layer.

[0139] In some examples, the brightness adjustment request may include the target brightness adjustment value corresponding to the brightness adjustment instruction. After receiving the brightness adjustment request, the brightness management module can obtain the current brightness value and generate a dynamic brightness adjustment item based on the current brightness value, the target value, and preset rules.

[0140] Step S308: Determine the target brightness value corresponding to the current image frame based on the brightness adjustment dynamic item.

[0141] For example, the surface manager in the system library can sequentially select brightness values ​​from the brightness adjustment dynamics as the target brightness value for the current image frame, the target brightness value for the next image frame, and so on. For instance, if the brightness adjustment dynamics include 21.5 nits, 33 nits, 44.5 nits, 56 nits, 67.5 nits, 79 nits, etc., then 21.5 nits can be used as the target brightness value for the current image frame, and 33 nits can be used as the target brightness value for the next image frame.

[0142] In some examples, when adjusting the brightness of the current image frame, the brightness management module in the surface manager can send a brightness adjustment request to the brightness adjustment request processing module of the HAL layer, which includes the target brightness value (e.g., 21.5 Nit) corresponding to the current image frame.

[0143] Step S309: Determine the target backlight adjustment parameter corresponding to the target brightness value from the backlight adjustment parameters corresponding to each second brightness value, and determine the target grayscale adjustment parameter corresponding to the target brightness value from the grayscale adjustment parameters corresponding to each second brightness value.

[0144] For example, the brightness adjustment request processing module of the HAL layer can query the backlight adjustment parameters corresponding to each second brightness value according to the target brightness value to obtain the target backlight adjustment parameters corresponding to the target brightness value, and query the grayscale adjustment parameters corresponding to each second brightness value according to the target brightness value to obtain the target grayscale adjustment parameters corresponding to the target brightness value.

[0145] In some examples, taking the target brightness value of 12.5 corresponding to the current image frame as an example, the brightness adjustment request processing module of the HAL layer can query Table 2 above to determine that the backlight adjustment parameter corresponding to the brightness value of 12.5 is 755 and the grayscale adjustment parameter corresponding to the brightness value of 12.5 is 0.9909. That is, the target backlight adjustment parameter is 755 and the target grayscale adjustment parameter is 0.9909.

[0146] Step S310: Write the target backlight adjustment parameters into the screen register corresponding to the backlight of the electronic device, and pass the target grayscale adjustment parameters to the corresponding image processing module in the electronic device to adjust the brightness of the display screen of the electronic device accordingly.

[0147] For example, different values ​​in the screen register can drive different current magnitudes for a pixel, so the brightness of the electronic device's display can be adjusted by writing different values ​​to the screen register.

[0148] For example, the image processing module may be a display composition module in the HAL layer. In some examples, the image processing module may be an HWC.

[0149] For example, by inputting different grayscale adjustment parameters to the HWC, the grayscale of the electronic device's display screen can be adjusted, thereby achieving brightness adjustment of the electronic device's display screen.

[0150] For example, the target backlight adjustment parameters can be sent to the display driver in the driving layer. The display driver adjusts the driving current of the pixels and obtains the initial brightness adjustment result of the pixels in response to the corresponding driving current. This initial brightness adjustment result is then passed through to the HAL layer. Simultaneously, the image processing module performs a second brightness adjustment on the image frame based on the initial brightness adjustment result and the input target grayscale parameters, obtaining the brightness adjustment processing result. The processing result capture module captures the brightness adjustment processing result and passes it through to the adjustment result transmission module in the system library. The adjustment result transmission module receives the brightness adjustment processing result and passes it through to the adjustment result display module in the application layer, where the brightness adjustment result is displayed.

[0151] In this embodiment, by determining the brightness change value between two adjacent first brightness values ​​within a preset backlight level range, and when the number of second brightness values ​​to be inserted between two adjacent first brightness values ​​is greater than a preset number, each second brightness value and its corresponding grayscale adjustment parameter are determined based on multiple brightness change values ​​and two adjacent first brightness values. Then, the backlight adjustment parameter corresponding to each second brightness value is determined. Thus, based on multiple first brightness values, backlight adjustment parameters and grayscale adjustment parameters corresponding to the second brightness values ​​can be added. Furthermore, when the target brightness value is a second brightness value instead of a first brightness value, the brightness corresponding to the second brightness value can be displayed on the electronic device's screen based on the target backlight adjustment parameters and target grayscale adjustment parameters corresponding to the target brightness value, resulting in higher display accuracy.

[0152] Figure 5 This is a schematic flowchart illustrating another dimming method provided in an embodiment of this application. Figure 5As shown, the dimming method may include steps S501 to S504.

[0153] Step S501: Obtain the first brightness value corresponding to each backlight level among multiple backlight levels.

[0154] For example, the implementation of step S501 can be referred to Figure 3 Step S301 of the illustrated embodiment will not be repeated here.

[0155] Step S502: Based on the adjacent first brightness values ​​corresponding to adjacent backlight orders in multiple backlight orders, determine the number of second brightness values ​​to be inserted between adjacent first brightness values.

[0156] For example, the implementation of step S502 can be referred to Figure 3 Steps S302 and S303 of the illustrated embodiment will not be repeated here.

[0157] In some examples, the number of second brightness values ​​to be inserted between adjacent first brightness values ​​is determined based on adjacent first brightness values ​​corresponding to adjacent backlight levels in multiple backlight levels, including: determining the brightness change value between adjacent first brightness values ​​corresponding to adjacent backlight levels; and determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on multiple brightness change values ​​and adjacent first brightness values.

[0158] In some examples, adjacent first brightness values ​​include a third brightness value and a fourth brightness value, where the third brightness value is greater than the fourth brightness value. Determining the brightness change value between adjacent first brightness values ​​corresponding to adjacent backlight levels includes: determining the brightness difference between the third brightness value and the fourth brightness value; and determining the brightness change value based on a first ratio of the brightness difference to the fourth brightness value.

[0159] In some examples, determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on multiple brightness change values ​​and adjacent first brightness values ​​includes: determining a brightness change step size based on multiple brightness change values; and determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the brightness change step size and adjacent first brightness values.

[0160] In some examples, determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the brightness change step size and adjacent first brightness values ​​includes: determining a second ratio of the third brightness value to the fourth brightness value; and determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the second ratio and the brightness change step size.

[0161] Step S503: When the number of second brightness values ​​to be inserted is greater than or equal to a preset number, each second brightness value and the grayscale adjustment parameter corresponding to each second brightness value are determined based on multiple adjacent first brightness values.

[0162] For example, the implementation of step S503 can be referred to Figure 3 Step S304 of the illustrated embodiment will not be repeated here.

[0163] In some examples, adjacent first brightness values ​​include a third brightness value and a fourth brightness value, where the third brightness value is greater than the fourth brightness value. Determining each second brightness value and the corresponding grayscale adjustment parameter includes: determining the brightness change step size based on multiple brightness change values; determining each second brightness value based on the brightness change step size and the fourth brightness value; and determining the corresponding grayscale adjustment parameter based on each second brightness value and the third brightness value.

[0164] Step S504: Adjust the brightness of the electronic device's display screen based on each second brightness value and the corresponding grayscale adjustment parameters.

[0165] For example, the implementation of step S504 can be referred to Figure 3 Steps S309 and S310 of the illustrated embodiment will not be repeated here.

[0166] In some examples, adjacent first brightness values ​​include a third brightness value and a fourth brightness value, where the third brightness value is greater than the fourth brightness value. Based on each second brightness value and the corresponding grayscale adjustment parameters, the brightness of the electronic device's display screen is adjusted, including: determining the backlight adjustment parameters corresponding to each second brightness value based on the backlight level corresponding to the third brightness value; and adjusting the brightness of the electronic device's display screen based on each second brightness value, the corresponding backlight adjustment parameters, and the corresponding grayscale adjustment parameters.

[0167] In some examples, the brightness of the electronic device's display screen is adjusted based on each second brightness value, the backlight adjustment parameters corresponding to each second brightness value, and the grayscale adjustment parameters corresponding to each second brightness value. This includes: obtaining a target brightness value; determining a target backlight adjustment parameter corresponding to the target brightness value from the backlight adjustment parameters corresponding to each second brightness value; determining a target grayscale adjustment parameter corresponding to the target brightness value from the grayscale adjustment parameters corresponding to each second brightness value; writing the target backlight adjustment parameter into the screen register corresponding to the backlight of the electronic device; and passing the target grayscale adjustment parameter to the corresponding image processing module in the electronic device to adjust the brightness of the electronic device's display screen accordingly.

[0168] It is understood that, in order to achieve the aforementioned functions, the electronic device includes corresponding hardware structures and / or software modules for performing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of this application.

[0169] This application embodiment can divide the above-described electronic device into functional modules based on the method example described above. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0170] When dividing each function into modules according to its corresponding function, refer to Figure 6 As shown, this application provides an electronic device that can implement the dimming method provided in the foregoing embodiments. The electronic device 600 may include an acquisition module 601, a first determination module 602, a second determination module 603, and a brightness adjustment module 604.

[0171] Among them, the acquisition module 601 is used to acquire the first brightness value corresponding to each backlight level in multiple backlight levels;

[0172] The first determining module 602 is used to determine the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on adjacent first brightness values ​​corresponding to adjacent backlight orders in a plurality of backlight orders.

[0173] The second determining module 603 is used to determine each second brightness value and the grayscale adjustment parameter corresponding to each second brightness value based on multiple adjacent first brightness values ​​when the number of second brightness values ​​to be inserted is greater than or equal to a preset number.

[0174] The brightness adjustment module 604 is used to adjust the brightness of the display screen of the electronic device based on each second brightness value and the grayscale adjustment parameters corresponding to each second brightness value.

[0175] Optionally, the first determining module 602 is specifically used to determine the brightness change value between adjacent first brightness values ​​corresponding to adjacent backlight levels; and to determine the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on multiple brightness change values ​​and adjacent first brightness values.

[0176] Optionally, the adjacent first brightness values ​​include a third brightness value and a fourth brightness value, where the third brightness value is greater than the fourth brightness value. The first determining module 602 is specifically used to determine the brightness difference between the third brightness value and the fourth brightness value; and to determine the brightness change value based on the first ratio of the brightness difference to the fourth brightness value.

[0177] Optionally, the first determining module 602 is specifically used to determine the brightness change step size based on multiple brightness change values; and to determine the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the brightness change step size and adjacent first brightness values.

[0178] Optionally, the first determining module 602 is specifically used to determine a second ratio between the third brightness value and the fourth brightness value; and based on the second ratio and the brightness change step size, to determine the number of second brightness values ​​to be inserted between adjacent first brightness values.

[0179] Optionally, the second determining module 603 is specifically used to determine the brightness change step size based on multiple brightness change values; determine each second brightness value based on the brightness change step size and the fourth brightness value; and determine the grayscale adjustment parameter corresponding to each second brightness value based on each second brightness value and the third brightness value.

[0180] Optionally, the adjacent first brightness values ​​include a third brightness value and a fourth brightness value, wherein the third brightness value is greater than the fourth brightness value; the brightness adjustment module 604 is specifically used to determine the backlight adjustment parameters corresponding to each second brightness value based on the backlight level corresponding to the third brightness value; and to adjust the brightness of the display screen of the electronic device based on each second brightness value, the backlight adjustment parameters corresponding to each second brightness value, and the grayscale adjustment parameters corresponding to each second brightness value.

[0181] Optionally, the brightness adjustment module 604 is specifically used to obtain a target brightness value; determine a target backlight adjustment parameter corresponding to the target brightness value from the backlight adjustment parameters corresponding to each second brightness value; determine a target grayscale adjustment parameter corresponding to the target brightness value from the grayscale adjustment parameters corresponding to each second brightness value; write the target backlight adjustment parameter into the screen register corresponding to the backlight of the electronic device; and transmit the target grayscale adjustment parameter to the corresponding image processing module in the electronic device to adjust the brightness of the display screen of the electronic device accordingly.

[0182] Regarding the electronic devices in the above embodiments, the specific methods by which each module performs its operations have been described in detail in the embodiments of the information display method described above, and will not be elaborated here. The related beneficial effects can also be referred to the related beneficial effects of the aforementioned information display method, and will not be repeated here.

[0183] This application also provides an electronic device, which includes: a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein, the memory stores computer program code, which includes computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the dimming method provided in the foregoing embodiments. The specific structure of this electronic device can be referred to... Figure 1 The structure of the electronic device shown is illustrated.

[0184] This application also provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the dimming method provided in the foregoing embodiments.

[0185] This application also provides a computer program product containing executable instructions that, when run on an electronic device, cause the electronic device to perform the dimming method provided in the foregoing embodiments.

[0186] This application also provides a chip system, such as... Figure 7 As shown, the chip system 700 includes at least one processor 701 and at least one interface circuit 702. The processor 701 and the interface circuit 702 are interconnected via lines. For example, the interface circuit 702 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 702 can be used to send signals to other devices (e.g., the processor 701).

[0187] For example, interface circuit 702 can read instructions stored in memory and send those instructions to processor 701. When the instructions are executed by processor 701, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application embodiment does not specifically limit this.

[0188] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0189] In the several embodiments provided in this application, it should be understood that the disclosed apparatus / device and method can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0190] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0191] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0192] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0193] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A dimming method, characterized in that, Applied to electronic devices, the electronic devices perform dimming based on pulse width modulation (PWM) control signals, the method includes: When the pulse number of the PWM control signal does not match the pulse number supported by a specific integrated circuit IC, the first brightness value corresponding to each backlight order among multiple backlight orders is obtained; Based on adjacent first brightness values ​​corresponding to adjacent backlight levels in the plurality of backlight levels, the number of second brightness values ​​to be inserted between adjacent first brightness values ​​is determined, without changing the number of the plurality of backlight levels and the first brightness values ​​corresponding to each backlight level; wherein, the adjacent first brightness values ​​include a third brightness value and a fourth brightness value, and the third brightness value is greater than the fourth brightness value; including: determining the brightness change value between the adjacent first brightness values ​​corresponding to the adjacent backlight levels; and determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the plurality of brightness change values ​​and the adjacent first brightness values; When the number of second brightness values ​​to be inserted is greater than or equal to a preset number, each second brightness value and the corresponding grayscale adjustment parameter are determined based on multiple adjacent first brightness values; including: determining a brightness change step size based on multiple brightness change values; determining each second brightness value based on the brightness change step size and the fourth brightness value; and determining the grayscale adjustment parameter corresponding to each second brightness value based on each second brightness value and the third brightness value. Based on the backlight level corresponding to the third brightness value, determine the backlight adjustment parameters corresponding to each of the second brightness values; The brightness of the display screen of the electronic device is adjusted based on each of the second brightness values, the backlight adjustment parameters corresponding to each of the second brightness values, and the grayscale adjustment parameters corresponding to each of the second brightness values.

2. The method according to claim 1, characterized in that, Determining the brightness change value between adjacent first brightness values ​​corresponding to adjacent backlight orders includes: Determine the brightness difference between the third brightness value and the fourth brightness value; The brightness change value is determined based on the first ratio of the brightness difference to the fourth brightness value.

3. The method according to claim 2, characterized in that, The step of determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on multiple brightness change values ​​and adjacent first brightness values ​​includes: The brightness change step size is determined based on multiple brightness change values; Based on the brightness change step size and the adjacent first brightness values, the number of second brightness values ​​to be inserted between the adjacent first brightness values ​​is determined.

4. The method according to claim 3, characterized in that, The step of determining the number of second brightness values ​​to be inserted between adjacent first brightness values ​​based on the brightness change step size and the adjacent first brightness values ​​includes: Determine a second ratio between the third brightness value and the fourth brightness value; Based on the second ratio and the brightness change step size, the number of second brightness values ​​to be inserted between the adjacent first brightness values ​​is determined.

5. The method according to claim 1, characterized in that, The step of adjusting the brightness of the electronic device's display screen based on each of the second brightness values, the backlight adjustment parameters corresponding to each of the second brightness values, and the grayscale adjustment parameters corresponding to each of the second brightness values ​​includes: Obtain the target brightness value; The target backlight adjustment parameter corresponding to the target brightness value is determined from the backlight adjustment parameters corresponding to each of the second brightness values; The target grayscale adjustment parameter corresponding to the target brightness value is determined from the grayscale adjustment parameters corresponding to each of the second brightness values; The target backlight adjustment parameters are written into the screen register corresponding to the backlight of the electronic device, and the target grayscale adjustment parameters are transmitted to the corresponding image processing module in the electronic device to adjust the brightness of the display screen of the electronic device accordingly.

6. An electronic device, characterized in that, The device includes a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the dimming method as described in any one of claims 1-5.

7. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the dimming method as described in any one of claims 1-5.