Ambient light determination method and device and display device

By associating ambient light data and timestamps corresponding to valid pulses of the storage frame synchronization signal in the ambient light sensor, the processor aligns the ambient light data with the self-illumination of the display screen, thus solving the problem of inaccurate ambient light detection accuracy and achieving higher detection accuracy and display effect.

CN121661941APending Publication Date: 2026-03-13SUZHOU JUXIN MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

The ambient light data detected by the ambient light sensor is affected by the light emitted from the display screen, resulting in inaccurate detection accuracy and affecting the adjustment effect of the display screen.

Method used

By associating ambient light data and timestamps corresponding to valid pulses of the storage frame synchronization signal in the ambient light sensor, the processor can align the ambient light data with the self-illumination of the display screen, eliminating interference caused by time asynchrony and improving detection accuracy.

Benefits of technology

It improves the accuracy of ambient light determination, eliminates interference from the display's self-emission, enhances display effects and user experience, and reduces adaptation costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661941A_ABST
    Figure CN121661941A_ABST
Patent Text Reader

Abstract

The invention relates to an ambient light determination method and device and a display device, and relates to the technical field of display. The method comprises the following steps: acquiring a detection parameter from an ambient light sensor in the display device; wherein the detection parameters at least comprise environment light data and an environment timestamp which are stored in an associated manner; the ambient light data is acquired by the ambient light sensor according to an effective pulse of a frame synchronization signal in the display device, and the ambient time stamp is recorded by the ambient light sensor according to the effective pulse of the frame synchronization signal; obtaining display parameters of the display device; and determining the actual ambient light of the display device according to the detection parameters and the display parameters. By adopting the method, the determination precision of the actual ambient light can be improved, so that the display effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display technology, and in particular to an ambient light determination method, apparatus, and display device. Background Technology

[0002] With the development of display technology, consumers have increasingly higher requirements for displays. In order to optimize the display effect, a solution has been proposed that can adjust the display data according to the ambient light.

[0003] In related technologies, the ambient light sensor is located below the display screen. The ambient light data detected by the ambient light sensor may be affected by the light emitted by the display screen, which may cause the ambient light data detected by the ambient light sensor to not represent the ambient light data in the real environment, thus resulting in an unsatisfactory adjustment effect of the display screen. Summary of the Invention

[0004] Therefore, it is necessary to provide an ambient light determination method, apparatus, and display device to address the aforementioned technical problems, which can improve the accuracy of determining actual ambient light and thus enhance the display effect.

[0005] In a first aspect, embodiments of this application provide an ambient light determination method, applied to a processor in a display device, the method comprising:

[0006] Detection parameters are obtained from an ambient light sensor in the display device; wherein, the detection parameters include at least a stored ambient light data and an ambient timestamp; the ambient light data is acquired by the ambient light sensor based on the effective pulses of the frame synchronization signal in the display device, and the ambient timestamp is recorded by the ambient light sensor based on the effective pulses of the frame synchronization signal;

[0007] Obtain the display parameters of the display device;

[0008] The actual ambient light of the display device is determined based on the detection parameters and the display parameters.

[0009] In one embodiment, the display parameters include at least display data for a target area and a corresponding display timestamp, wherein the target area is the area in the display device corresponding to the ambient light sensor; wherein determining the actual ambient light of the display device based on the detection parameters and the display parameters includes:

[0010] From at least one of the environmental timestamps in the detection parameters, determine a target timestamp that matches the display timestamp;

[0011] The actual ambient light of the display device is determined based on the ambient light data corresponding to the target timestamp and the display data corresponding to the display timestamp.

[0012] In one embodiment, the ambient light data includes at least two ambient photon data; determining the target timestamp that matches the display timestamp from at least one of the ambient timestamps in the detection parameters includes:

[0013] Based on the acquisition parameters of each environmental photon data and the environmental timestamp, determine the environmental sub-timestamp corresponding to each environmental photon data;

[0014] From at least two of the environmental sub-timestamps in the detection parameters, a target timestamp that matches the display timestamp is determined.

[0015] In one embodiment, the ambient light data includes at least two ambient photon data; determining the actual ambient light of the display device based on the detection parameters and the display parameters includes:

[0016] Based on at least two of the ambient photon data in the detection parameters and the corresponding ambient timestamp, determine the first ambient photon data corresponding to the current data frame of the target area and the second ambient photon data corresponding to the current black frame of the target area;

[0017] Based on at least one of the display data in the display parameters and the corresponding display timestamp, determine the target display data corresponding to the current data frame of the target area;

[0018] The actual ambient light is determined based on the first ambient photon data, the second ambient photon data, and the target display data.

[0019] In one embodiment, the display parameters include a first duration corresponding to a pulse width modulation signal at a first level; when the pulse width modulation signal is at the first level, turning off the light-emitting device in the display device; when the pulse width modulation signal is at a second level, turning on the light-emitting device in the display device; wherein the integration duration corresponding to each ambient photon data is the same; determining the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data includes:

[0020] Obtain the integration duration corresponding to each of the aforementioned environmental photon data;

[0021] When the first duration is less than the integration duration, the actual ambient light of the display device is determined based on the first duration, the integration duration, the first ambient photon data, the second ambient photon data, and the target display data; the actual ambient light is negatively correlated with the first duration and positively correlated with the integration duration.

[0022] In one embodiment, the actual ambient light is calculated using the following formula:

[0023] Value1 = X + Y

[0024] Value2=(PWM_L / Atime)*X+[(Atime-PWM_L) / Atime]*(X+Y)

[0025] Wherein, X represents the actual ambient light; Y represents the target display data; Value1 represents the first ambient photon data; Value2 represents the second ambient photon data; PWM_L represents the first duration; and Atime represents the integration duration.

[0026] In one embodiment, determining the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data includes:

[0027] Based on a pre-built parameter database, target light leakage compensation parameters corresponding to the target display data are obtained; the target light leakage compensation parameters are used to compensate for the self-emission interference of the display screen in the target area.

[0028] The actual ambient light is determined based on the target light leakage compensation parameter, the first ambient photon data, and the second ambient photon data; the actual ambient light is positively correlated with the target light leakage compensation parameter, the first ambient photon data, and the second ambient photon data, respectively.

[0029] In one embodiment, determining the actual ambient light based on the target light leakage compensation parameter, the first ambient photon data, and the second ambient photon data includes:

[0030] Determine a first difference between the first ambient photon data and the second ambient photon data;

[0031] A first ratio is determined between the first difference and the target light leakage compensation parameter; the actual ambient light is the difference between the first ambient photon data and the first ratio.

[0032] In one embodiment, the method further includes:

[0033] Obtain multiple reference display data for the target area;

[0034] Acquire sensor data corresponding to each of the reference display data in the target area under no ambient light conditions;

[0035] Based on the sensor data corresponding to each of the reference display data, determine the screen-on detection data and screen-off detection data corresponding to each of the reference display data;

[0036] Based on the on-screen detection data and off-screen detection data corresponding to each reference display data, the light leakage compensation parameters corresponding to each reference display data are determined.

[0037] In one embodiment, determining the first ambient photon data corresponding to the current data frame of the target region and the second ambient photon data corresponding to the current black frame of the target region based on at least two ambient photon data in the detection parameters and the corresponding ambient timestamps includes:

[0038] Based on at least two ambient photon data and the corresponding ambient timestamp in the detection parameters, the fluctuation parameters of multiple ambient photon data corresponding to the current frame of the target area are obtained;

[0039] Based on at least two ambient photon data points from the detection parameters and the corresponding ambient timestamps, at least one ambient photon data point corresponding to the current data frame of the target region and at least one ambient photon data point corresponding to the current black frame of the target region are determined; wherein,

[0040] When the fluctuation parameter is less than or equal to a preset fluctuation threshold, the first ambient photon data is the average value of at least one ambient photon data corresponding to the current data frame, and the second ambient photon data is the average value of at least one ambient photon data corresponding to the current black frame; or...

[0041] When the fluctuation parameter is greater than a preset fluctuation threshold, the first ambient photon data is the maximum ambient photon data among at least one ambient photon data corresponding to the current data frame, and the second ambient photon data is the minimum ambient photon data among at least one ambient photon data corresponding to the current black frame.

[0042] In one embodiment, the display parameters include a first duration corresponding to a first level state of the pulse width modulation signal and a second duration corresponding to a second level state of the pulse width modulation signal; when the pulse width modulation signal is in the first level state, the light-emitting device in the display device is turned off; when the pulse width modulation signal is in the second level state, the light-emitting device in the display device is turned on; the ambient light data includes at least two ambient photon data; wherein, determining the actual ambient light of the display device based on the detection parameters and the display parameters includes:

[0043] The integration duration of the ambient photon data is obtained;

[0044] When the first duration is greater than or equal to the integral duration of the ambient photon data, the actual ambient light of the display device is determined based on at least the second duration, the integral duration of each ambient photon data, at least two of the ambient photon data in the detection parameters, and the corresponding ambient timestamp; the actual ambient light is the ambient photon data collected by the ambient light sensor in the target area while the pulse width modulation signal is kept at a first level.

[0045] Secondly, embodiments of this application provide an ambient light determination device, applied to a processor in a display device, the device comprising:

[0046] An acquisition module is configured to acquire detection parameters from an ambient light sensor in the display device, and to acquire display parameters of the display device; wherein, the detection parameters include at least a stored ambient light data and an ambient timestamp; the ambient light data is acquired by the ambient light sensor based on valid pulses of the frame synchronization signal in the display device, and the ambient timestamp is recorded by the ambient light sensor based on valid pulses of the frame synchronization signal;

[0047] A determination module is used to determine the actual ambient light of the display device based on the detection parameters and the display parameters.

[0048] Thirdly, embodiments of this application provide a display device, including:

[0049] Display screen;

[0050] An ambient light sensor is used to collect ambient light data corresponding to the effective pulse of the frame synchronization signal of the display device, record the ambient timestamp corresponding to the effective pulse, and store the ambient light data and ambient timestamp corresponding to each effective pulse.

[0051] The processor is configured to acquire detection parameters from the ambient light sensor in the display device, acquire display parameters of the display device, and determine the actual ambient light of the display device based on the detection parameters and the display parameters.

[0052] The aforementioned ambient light determination method, apparatus, and display device allow the processor to acquire detection parameters from the ambient light sensor in the display device, as well as display parameters of the display device. This enables the determination of the actual ambient light of the display device based on the detection and display parameters. Since the detection parameters include at least associated stored ambient light data and an ambient timestamp, and the ambient light data is acquired by the ambient light sensor based on valid pulses of the frame synchronization signal in the display device, while the ambient timestamp is recorded by the ambient light sensor based on valid pulses of the frame synchronization signal, each ambient light data point can be bound to the timing of the display frame through its corresponding ambient timestamp. For any frame, the corresponding ambient light data can be found through the ambient timestamp, allowing for direct alignment of display and detection parameters to determine the accurate actual ambient light. This avoids the problem of asynchronous interference elimination caused by misalignment between ambient light acquisition and display changes in related technologies, improving the accuracy of actual ambient light determination and thus enhancing the display effect. For example, when self-emitting interference from the display screen exists, the display characteristics of the frame to which the acquisition time belongs can be quickly matched based on the ambient timestamp to accurately distinguish between the actual ambient light and the screen's self-emitting interference, achieving effective interference removal. Furthermore, by eliminating the need for software algorithms to handle deviations caused by time asynchrony, the complexity of eliminating screen self-emission interference in ambient light data is reduced, improving the processing efficiency and accuracy of actual ambient light. In addition, the flexible configuration of the ambient light sensor's internal hardware-level timestamps overcomes the limitations of software timestamp schemes in related technologies. It eliminates the need for software calculations, avoiding software resource consumption and alignment resource consumption, and freeing it from the constraints of fixed software integration durations. Moreover, the associated stored ambient light data and timestamps can adapt to the timing characteristics of different display panels according to the frame synchronization signal. This means it can achieve adaptive frame rate detection of ambient light, eliminating the need for manual parameter adjustments based on image and brightness variation patterns, reducing adaptation costs, and ultimately achieving a dual improvement in ambient light determination accuracy and display adjustment adaptability. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the display device in one embodiment;

[0054] Figure 2 This is a schematic diagram of the display device in another embodiment;

[0055] Figure 3 This is a schematic cross-sectional view of the display device in one embodiment;

[0056] Figure 4 This is a flowchart illustrating an ambient light determination method in one embodiment;

[0057] Figure 5 This is a timing diagram illustrating the use of a long integral detection mechanism for the ambient light sensor in one embodiment.

[0058] Figure 6 This is a timing diagram illustrating the short integral detection mechanism used by the ambient light sensor in one embodiment.

[0059] Figure 7 This is a timing diagram illustrating the frame synchronization signal, pulse width modulation signal, and ambient light sensor using a short integral detection mechanism in one embodiment.

[0060] Figure 8 This is a flowchart illustrating the ambient light determination method in another embodiment;

[0061] Figure 9 This is a flowchart illustrating the ambient light determination method in yet another embodiment;

[0062] Figure 10 This is a timing diagram of the frame synchronization signal and the pulse width modulation signal in one embodiment;

[0063] Figure 11 This is a flowchart illustrating the ambient light determination method in another embodiment;

[0064] Figure 12 This is a schematic diagram of an image captured on a display screen in one embodiment;

[0065] Figure 13 This is a flowchart illustrating the ambient light determination method in another embodiment;

[0066] Figure 14 This is a schematic diagram illustrating the process by which a display device determines the actual ambient light in one embodiment.

[0067] Figure 15 This is a schematic diagram of the ambient light determination device in another embodiment;

[0068] Figure 16 This is an internal structural diagram of a display device in one embodiment. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0070] The ambient light determination method provided in this application embodiment can be applied to a display device. The display device 1000 can be... Figure 1The mobile phone shown can also be other electronic products with display functions, including but not limited to the following categories: television, laptop, desktop monitor, tablet computer, digital camera, smart bracelet, smart glasses, vehicle display, industrial control equipment, medical display screen, touch interactive terminal, etc. This application embodiment does not make any special limitation on this.

[0071] like Figure 2 and Figure 3 As shown, the display device 1000 may include at least an ambient light sensor 10, a display screen 20, and a processor 30. The ambient light sensor 10 is used to detect ambient light. The ambient light sensor 10 may also have data processing and data storage functions. A memory may also be provided in the ambient light sensor 10 for storing instructions and data. In this application, the ambient light sensor 10 may be located on the backlight side 201 of the display screen 20.

[0072] Processor 30 can be connected to ambient light sensor 10 and can be used to determine the actual ambient light. In some exemplary embodiments, processor 110 may include one or more processing units, such as: application processor (AP), sensor coprocessor (SCP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Processor 30 may also include memory for storing instructions and data.

[0073] The display screen 20 provides display functionality for displaying images, videos, etc. The display screen 20 includes a display panel. The display panel may employ an organic light-emitting diode (OLED). In some exemplary embodiments, the display device 1000 may include at least one display screen 20.

[0074] It is understandable that ambient light sensors are affected by the self-emission of the display screen when detecting ambient light data, leading to inaccurate detection. Related technologies typically correct the ambient light data collected by the sensor based on the currently displayed content to eliminate the interference caused by the screen's self-emission. However, since the content displayed on the screen is constantly changing, the amount of interference from the screen's self-emission also changes continuously. The ambient light data detected by the sensor and the compensation value calculated based on the displayed content need to be synchronized; otherwise, the ambient light intensity after reducing the interference from the screen's self-emission will be inaccurate. However, in related technologies, when eliminating interference from the screen's self-emission, it is impossible to guarantee that the compensation value calculated based on the displayed content is synchronized with the ambient light data detected by the sensor. This introduces compensation errors, resulting in inaccurate calculated actual ambient light. Consequently, adjusting the display based on this actual ambient light is ineffective, negatively impacting the user experience.

[0075] In response, this application provides an ambient light determination method. Since the ambient light sensor stores the ambient light data and ambient timestamp corresponding to each valid pulse of the frame synchronization signal, the processor can obtain detection data aligned with the frame synchronization signal from the ambient light sensor. This allows the processor to align the ambient light collected by the sensor with the self-emission of the display screen based on the frame synchronization signal, solving the problem of asynchronous timing between ambient light acquisition and display interference acquisition, eliminating compensation errors caused by time asynchrony, improving the detection accuracy of actual ambient light, and thus improving the display effect.

[0076] In some exemplary embodiments, an ambient light determination method is provided, with the application of this method to a processor in a display device as an example for illustration. Figure 4 As shown, the ambient light determination method includes the following steps S402 to S406.

[0077] S402, acquire detection parameters from the ambient light sensor in the display device.

[0078] The detection parameters include at least one associated stored ambient light data and an ambient timestamp. For example... Figure 5 and Figure 6As shown, ambient light data is acquired by the ambient light sensor based on valid pulses of the frame synchronization signal in the display device, and the ambient timestamp is recorded by the ambient light sensor based on valid pulses of the frame synchronization signal. The ambient light sensor can receive the frame synchronization signal (Vertical Synchronization, VSYNC) sent by the display driver IC (DDIC) in the display device. The frame synchronization signal can be provided by the display driver IC. In applications, the display driver IC can provide a suitable frame synchronization signal according to display requirements. For example, the frequency of the frame synchronization signal can be 1Hz, 60Hz, or 120Hz, etc. The frequency of the frame synchronization signal can also be dynamically set according to display requirements, such as switching to 1Hz in low-power scenarios and switching to 120Hz in high-refresh-rate scenarios. Further limitations are not specified here.

[0079] A frame synchronization signal may include at least one valid pulse. A valid pulse in the frame synchronization signal refers to a specific level change in the frame synchronization signal used to mark the start or end of a frame of image. A valid pulse can be a high-level pulse or a low-level pulse. When a valid pulse of the frame synchronization signal appears, it means that the current frame has ended and the next frame has begun. The frequency of the frame synchronization signal determines the display frame rate; that is, the number of valid pulses of the frame synchronization signal sent per second determines the number of frames displayed. It should be noted that the type and number of valid pulses of the frame synchronization signal can be set according to display requirements and are not limited here.

[0080] Ambient light data is used to represent the intensity of ambient light detected by the ambient light sensor, such as Figure 5 and Figure 5 The data_i shown. During the display process, the ambient light detected by the ambient light sensor includes actual ambient light and may also include the display screen's self-emission. The display screen's self-emission, relative to the actual ambient light, can be referred to as self-emission interference or self-emission noise. Self-emission noise can include the color and brightness of the image displayed in the target area. The target area can be understood as the display area that interferes with the ambient light collected by the ambient light sensor, for example, such as... Figure 3The display area AA1 is shown. The position of the target area on the display screen can be determined by factors such as the relative position of the ambient light sensor and the display screen, and the light-sensing angle. The ambient light data corresponding to the effective pulse can be understood as the ambient light data collected by the ambient light sensor within a total frame corresponding to N effective pulses, with each N effective pulses corresponding to one ambient light data, where N is greater than or equal to 1. In application, the ambient light sensor can collect the ambient light data corresponding to each N effective pulses based on the effective pulses of the frame synchronization signal. It can be understood that the display screen refreshes a complete frame of image based on one effective pulse of the frame synchronization signal. Based on this, in each display frame of the display device, when N is 1, the ambient light sensor collects one ambient light data. For ease of understanding, this application can use N=1 as an example for illustration. In application, after detecting the current effective pulse of the frame synchronization signal, the ambient light sensor can collect the ambient light data corresponding to the current effective pulse between the current effective pulse and the next effective pulse, that is, collect ambient light data between two adjacent effective pulses.

[0081] Ambient light data includes at least one ambient photon data. In some exemplary embodiments, such as Figure 5 As shown, ambient light data includes ambient photon data, that is, the ambient light sensor can collect a data point based on the effective pulse of the frame synchronization signal; this application may refer to this detection mechanism as a long integration detection mechanism, or in other words, the ambient light sensor operates in long integration mode. In other embodiments, such as Figure 6 As shown, the ambient light data includes at least two ambient photon data points, meaning the ambient light sensor can acquire at least two data points based on the effective pulse of the frame synchronization signal. This detection mechanism can be referred to as a short integration detection mechanism, or the ambient light sensor operates in short integration mode. In applications, the detection mechanism of the ambient light sensor can be flexibly configured according to ambient light detection requirements.

[0082] An environmental timestamp is used to mark the time or moment information of an event in which an ambient light sensor collects ambient light data. Essentially, an environmental timestamp is a timestamp. An environmental timestamp can be a real time, a preset string marker, or other methods that can mark the collected event. It is understandable that, for example... Figure 5 and Figure 6As shown, one cycle of the frame synchronization signal (als_vsync_inter_k, where k represents the i-th cycle) includes one valid pulse. Therefore, the actual time of the environmental timestamp recording the acquired event can be any time within one cycle of the frame synchronization signal. For example, it can be the start or end time of one cycle, or any intermediate time such as the start time of the ambient light sensor acquiring ambient light data. In practice, it can be flexibly set according to the specific scenario; this is only an example. The environmental timestamp corresponding to the valid pulse can be understood as the timestamp of the acquired event corresponding to that valid pulse. Each valid pulse corresponds to one environmental timestamp. In applications, ambient light data can be recorded based on the valid pulses of the frame synchronization information, recording the environmental timestamp corresponding to each valid pulse. Alternatively, in each display frame of the display device, the ambient light sensor records one environmental timestamp.

[0083] For each valid pulse of the frame synchronization signal, there exists ambient light data and an ambient timestamp. The ambient light sensor can therefore associate and store the ambient light data and ambient timestamp corresponding to each valid pulse. In some exemplary embodiments, the ambient light sensor can use a preset format such as FIFO (First In First Out) to associate and store the ambient light data and ambient timestamp corresponding to each valid pulse.

[0084] The detection parameters can include ambient light data and ambient timestamps corresponding to one valid pulse of the frame synchronization signal, or ambient light data and ambient timestamps corresponding to multiple valid pulses. That is, the processor can obtain ambient light data and ambient timestamps corresponding to one valid pulse, or ambient light data and ambient timestamps corresponding to multiple valid pulses, from the ambient light sensor.

[0085] For example, the processor can acquire detection parameters from the ambient light sensor according to a preset period. This preset period can be pre-set, such as 1ms, 100ms, 250ms, 500ms, 1s, or other suitable values, without further limitation. As another example, the processor can also acquire detection parameters from the ambient light sensor according to the display control requirements of the display device; that is, the processor can acquire detection parameters on demand, non-periodically. In practical applications, the method by which the processor acquires detection parameters can be flexibly set according to the specific scenario. For example, the processor can acquire 30 data points and corresponding timestamps from the ambient light sensor every 250ms.

[0086] S404, Obtain the display parameters of the display device.

[0087] Display parameters are used to represent parameters related to the display of a display device. In some exemplary embodiments, display parameters may include display data of the display device and a corresponding display timestamp. In some exemplary embodiments, display data may include at least one of a screen color value and a display brightness value, and the display timestamp may include at least one of a color timestamp and a brightness timestamp. For example, display parameters may include a screen color value and a corresponding color timestamp, and / or a display brightness value and a brightness timestamp. The color timestamp and the brightness timestamp may be the same or different.

[0088] In other exemplary embodiments, such as Figure 7 As shown, the display parameters may include parameters related to the pulse width modulation (PWM) signal of the display device, including but not limited to the frequency / period VSYNC_interval, duty cycle, low-level pulse width (or the first duration of the PWM signal being in a low-level state, PWM_L (PWM_Low)), and high-level pulse width (or the second duration of the PWM signal being in a high-level state, PWM_H (PWM_High)). The PWM signal is used to adjust the display brightness of the display device.

[0089] In applications, display parameters can be flexibly set according to the actual scenario. For example, they may include the above-mentioned display data and the corresponding display timestamp, as well as relevant parameters of the pulse width modulation signal. No further restrictions are imposed here.

[0090] S406, determine the actual ambient light of the display device based on the detection parameters and display parameters.

[0091] It is understandable that one cycle of the frame synchronization signal corresponds to one display frame of the display device. Therefore, for any display frame, there exists associated stored ambient light data and an ambient timestamp. Thus, for any display frame, the corresponding ambient light data can be found through the ambient timestamp.

[0092] Based on the foregoing, self-emissive noise can include the color and brightness of the image displayed in the target area. The refresh rate of the displayed image is the same as the frequency of the frame synchronization signal; that is, the display screen refreshes the image according to the frequency of the frame synchronization signal. The pixel colors of the displayed image are updated within the frame period marked by the frame synchronization signal, and its update boundary is aligned with the frame rate of the frame synchronization signal. Furthermore, to ensure stable brightness within a frame, the brightness adjustment command for the displayed image waits for the arrival of a valid pulse from the frame synchronization signal; that is, the brightness update is completed within a safe window using the frame interval marked by the valid pulse of the frame synchronization signal, and the effective boundary of the brightness adjustment process is aligned with the frame synchronization signal. Additionally, the frequency of the pulse width modulation signal is typically an integer multiple of the frequency of the frame synchronization signal, and the timing of the pulse width modulation signal is aligned with that of the frame synchronization signal.

[0093] To address this, the display parameters and ambient light data can be aligned using a frame synchronization signal. The self-emission interference in the corresponding ambient light data can be eliminated using the display parameters, thereby determining the actual ambient light of the display device.

[0094] It should be noted that in some exemplary embodiments, the data collected by the ambient light sensor may not be subject to display self-illumination interference, that is, the data collected by the sensor is the actual ambient light. In this case, the processor can also determine the actual ambient light of the display device based on the display parameters and detection parameters.

[0095] The aforementioned ambient light detection and determination method allows the processor to acquire detection parameters from the ambient light sensor in the display device, as well as the display parameters of the display device. This enables the determination of the actual ambient light of the display device based on the detection and display parameters. Since the detection parameters include at least associated stored ambient light data and an ambient timestamp, and the ambient light data is acquired by the ambient light sensor based on valid pulses of the frame synchronization signal in the display device, while the ambient timestamp is recorded by the ambient light sensor based on valid pulses of the frame synchronization signal, each ambient light data point can be bound to the timing of the display frame through its corresponding ambient timestamp. For any frame, the corresponding ambient light data can be found through the ambient timestamp, allowing for direct alignment of the display and detection parameters to determine the accurate actual ambient light. This avoids the problem of asynchronous interference elimination caused by misalignment between the timing of ambient light acquisition and display changes in related technologies, improving the accuracy of actual ambient light determination and thus enhancing the display effect. For example, when there is interference from the display screen's self-emission, the display characteristics of the frame to which the acquisition time belongs can be quickly matched based on the ambient timestamp to accurately distinguish between the actual ambient light and the screen's self-emission interference, achieving effective interference removal. Furthermore, by eliminating the need for software algorithms to handle deviations caused by time asynchrony, the complexity of eliminating screen self-emission interference in ambient light data is reduced, improving the processing efficiency and accuracy of actual ambient light. In addition, the flexible configuration of the ambient light sensor's internal hardware-level timestamps overcomes the limitations of software timestamp schemes in related technologies. It eliminates the need for software calculations, avoiding software resource consumption and alignment resource consumption, and freeing it from the constraints of fixed software integration durations. Moreover, the associated stored ambient light data and timestamps can adapt to the timing characteristics of different display panels according to the frame synchronization signal. This means it can achieve adaptive frame rate detection of ambient light, eliminating the need for manual parameter adjustments based on image and brightness variation patterns, reducing adaptation costs, and ultimately achieving a dual improvement in ambient light determination accuracy and display adjustment adaptability.

[0096] In some exemplary embodiments, the display parameters include at least display data for the target area and a corresponding display timestamp. The display data represents data related to the display of the target area. For example, the display data includes at least one of a screen color value and a display brightness value. The screen color value can be determined based on the proportions of R, G, and B pixels in the target area.

[0097] The display timestamp refers to the time when the aforementioned display data is displayed in the target area. The display timestamp may include at least one of the color timestamp corresponding to the screen color value and the brightness timestamp corresponding to the display brightness value. The color timestamp can be understood as the frame display timestamp, and the brightness timestamp as the screen brightness timestamp. The color timestamp and brightness timestamp may be the same or different. The display timestamp (including the color timestamp and brightness timestamp) can be determined based on the frame synchronization signal. In applications, the display timestamp can be set according to the actual scenario; this is only an example and not a limitation.

[0098] The target area is the region in the display device corresponding to the ambient light sensor. The target area can be understood as the display area that interferes with the ambient light collected by the ambient light sensor; for details, please refer to the aforementioned related content, which will not be repeated here.

[0099] For example, display parameters include image color values ​​and corresponding color timestamps. In an application, when a display device launches an application (APP), the application can send frames to the display driver chip in the display device by calling a drawing service such as SurfaceFlinger, that is, send the image to be displayed to the display driver chip. The display driver chip synchronously drives the display screen to display based on the frame synchronization signal. During the frame sending and display process, the processor can use a matting module such as ScreenShot to matte / capture the image to be displayed, obtain the image color value corresponding to the target area, and record the corresponding color timestamp. The processor can also associate and store the image color value and the corresponding color timestamp. In some exemplary embodiments, the processor can use a FIFO format to associate and store the image color value and the corresponding color timestamp.

[0100] Another example is that the display parameters include the display brightness value and the corresponding brightness timestamp. In the application, the processor can send the brightness to be adjusted to the kernel node in the processor kernel layer through the display engine service, so that the relevant hardware can adjust the brightness of the display screen according to the brightness to be adjusted stored in the kernel node. The processor can listen for changes in the data stored in the kernel node based on the uevent mechanism. After detecting a change in the data in the kernel node, the processor obtains the currently stored data from the kernel node, namely the brightness value to be adjusted (this brightness value is used to adjust the brightness of the display screen, so it can also be recorded as the display brightness value), and records the corresponding display timestamp, and stores the display brightness value and the corresponding display timestamp together. In some exemplary embodiments, the processor can use a FIFO format to associate and store the display brightness value and the corresponding display timestamp.

[0101] like Figure 8As shown, the aforementioned S406 determines the actual ambient light of the display device based on the detection parameters and display parameters, including the following S802 and S804.

[0102] S802, determine the target timestamp that matches the display timestamp from at least one environmental timestamp in the detection parameters.

[0103] S804: Determine the actual ambient light of the display device based on the ambient light data corresponding to the target timestamp and the display data corresponding to the display timestamp.

[0104] It is understandable that the pixel colors of the displayed image are updated within the frame period marked by the frame synchronization signal, and its update boundary is aligned with the frame rate of the frame synchronization signal. Furthermore, the effective boundary of the brightness adjustment process is also aligned with the frame synchronization signal. In some embodiments, a display timestamp can be recorded based on the frame synchronization signal. Thus, by using the frame synchronization signal as a medium between the display timestamp and the ambient timestamp, the display data and ambient light data can be quickly matched, eliminating ambient light determination errors caused by time asynchrony.

[0105] In the application, the processor can acquire the display data and corresponding display timestamp of the current frame in real time, and determine the target timestamp that matches the display timestamp from at least one ambient timestamp in the detection parameters. Therefore, based on the ambient light data corresponding to the target timestamp and the display data corresponding to the display timestamp, the actual ambient light for eliminating interference can be determined. The target timestamp can be understood as an ambient timestamp that is the same as or similar to the display timestamp.

[0106] The ambient light determination method provided in the above embodiments determines a target timestamp that matches the display timestamp from at least one ambient timestamp in the detection parameters through a processor, and determines the actual ambient light of the display device based on the ambient light data corresponding to the target timestamp and the display data corresponding to the display timestamp. On the one hand, by using the precise matching of the display timestamp and the ambient timestamp associated with the frame synchronization signal, the time deviation caused by the asynchronous acquisition of display data and ambient light data is eliminated at the source, avoiding the misalignment problem where the display screen has been updated but the ambient light data still corresponds to the old frame, significantly improving the accuracy of actual ambient light detection, and providing a reliable data foundation for the subsequent adaptive adjustment of the display device (such as automatic brightness and color temperature optimization); on the other hand, by using the logic of matching the target timestamp, the interference of the display device's own light emission on the ambient light sensor can be corrected by combining the display data of the corresponding frame (such as screen color value and display brightness value), thereby eliminating interference. This method eliminates interference factors to obtain ambient light values ​​that are closer to real-world scenarios. Furthermore, by relying on frame synchronization signals to achieve timestamp association, it eliminates the need for complex additional synchronization mechanisms. The processor can complete data matching and calculation in real time, balancing real-time performance and efficiency in ambient light determination. It can adapt to display scenarios with different frame rates (such as variable refresh rates), further enhancing the method's versatility and practicality. Ultimately, it provides users with a display experience that better meets actual environmental needs (such as avoiding excessive brightness and glare in low-light environments, and ensuring clear visibility in bright light environments). It also supports low-power optimization of display devices (such as dynamically adjusting backlight power based on accurate ambient light).

[0107] In some exemplary embodiments, ambient light data includes at least two ambient photon data points. Each ambient timestamp is associated with at least two ambient photon data points corresponding to the same valid pulse. In this embodiment, one valid pulse corresponds to at least two ambient photon data points and one ambient timestamp. In application, the ambient light sensor can time-divisionally acquire at least two ambient photon data points corresponding to a valid pulse based on the valid pulse of the frame synchronization signal, and record the ambient timestamp corresponding to the valid pulse, and store the at least two ambient photon data points and the ambient timestamp corresponding to each valid pulse in association. For ease of description, in this application, the detection mechanism where one valid pulse corresponds to multiple ambient photon data points can be referred to as a short integral one-to-many detection mechanism.

[0108] The aforementioned S802, determining a target timestamp that matches the display timestamp from at least one environmental timestamp in the detection parameters, includes: determining the environmental sub-timestamp corresponding to each environmental photon data based on the acquisition parameters and environmental timestamp of each environmental photon data; and determining the target timestamp that matches the display timestamp from at least two environmental sub-timestamps in the detection parameters.

[0109] Acquisition parameters are used to represent relevant parameters of the ambient light sensor's acquisition of ambient photon data. For example, acquisition parameters include the integration duration corresponding to the ambient photon data. Figure 6 As shown, the integration duration can be denoted as asitime, where i represents the i-th ambient photon data. Similarly, as... Figure 5 As shown, in the long integral detection mechanism scenario, the acquisition parameters may include the integration time of ambient light data, which can be denoted as als_inte_time.

[0110] Another example is that the acquisition parameters include the integration duration corresponding to the ambient photon data, and may also include at least one of the delay duration, initialization duration, and data processing duration corresponding to the ambient photon data. For example... Figure 5 and Figure 6 As shown, the integration duration can be understood as the duration for which the ambient light sensor integrates the electrical signal converted from the optical signal. The delay duration refers to the time interval between the moment when the ambient light sensor detects the current valid pulse of the frame synchronization signal and the start of the initialization process, which can be denoted as als_vsync_delay or Td; the initialization duration refers to the duration for the ambient light sensor to perform initialization processing, which can be denoted as Tr; and the data processing duration refers to the duration for the ambient light sensor to process data after acquiring a piece of data, which can be denoted as Tp.

[0111] It should be noted that each ambient photon data point corresponds to an integration time. The integration time for different ambient photon data points can be the same, such as... Figure 7 As shown, the integration time for each ambient photon data point is Atime. The integration time can also differ for different ambient photon data points, such as... Figure 6 As shown, the integration durations of two adjacent ambient photon data points are different. For example, one integration duration as1time can be the first duration PWM_L of the PWM signal, and another integration duration as2time can be the second duration PWM_H of the PWM signal. At least one ambient photon data point can correspond to the same delay duration Td, the same initialization duration Tr, and the same data processing duration Tp. For example, multiple ambient photon data points of the same valid pulse of the frame synchronization signal correspond to the same delay duration Td, and each ambient photon data point of the same valid pulse corresponds to an initialization duration Tr and a data processing duration Tp; that is, when the ambient light sensor detects a valid pulse of the frame synchronization signal, after performing a delay processing according to the delay duration Td, for each ambient photon data point, it sequentially performs initialization processing, integration processing, and data processing according to the initialization duration Tr, the integration duration (such as as1time and as2time, or Atime, etc.), and the data processing duration Tp, thereby obtaining multiple ambient photon data points of that valid pulse. Furthermore, multiple ambient photon data points of at least two valid pulses can correspond to the same delay duration Td, for example, as... Figure 7 As shown, multiple ambient photon data from two valid pulses undergo only one delay processing. Similarly, at least two ambient photon data can correspond to the same initialization duration Tr and / or data processing duration Tp. In applications, the acquisition parameters of the ambient light sensor can be configured according to actual acquisition needs; no further limitations are imposed here.

[0112] In applications, the processor can calculate the environmental sub-timestamp of each ambient photon data in each valid pulse of the frame synchronization signal based on the acquisition parameters and environmental timestamps of each ambient photon data. The processor can also associate and store the ambient photon data and the corresponding environmental sub-timestamps, which can be used to detect the actual ambient light of the display device.

[0113] It should be noted that in the above embodiments, for multiple ambient photon data and an ambient timestamp corresponding to the same valid pulse, the ambient photon timestamp corresponding to the multiple ambient photon data can be calculated by software algorithm based on the ambient timestamp. This calculation and processing function can be integrated into other devices in the display device, such as a processor, or into an ambient light sensor. The specific configuration can be flexibly configured according to actual needs, and no further limitations are made here.

[0114] The ambient light determination method provided in the above embodiments determines the corresponding environmental sub-timestamp for each ambient photon data based on the acquisition parameters and environmental timestamp of each ambient photon data by a processor; and determines the target timestamp that matches the display timestamp from at least two environmental sub-timestamps in the detection parameters. Since the ambient light sensor supports smaller granularity data acquisition, and the processor can determine the corresponding environmental sub-timestamp for each ambient photon data based on the environmental timestamp and acquisition parameters using a software algorithm, for any ambient light acquisition scenario, the corresponding ambient photon data can be quickly matched based on the environmental sub-timestamp. This significantly improves the time alignment accuracy between ambient light data and display frame data, avoiding the problem of ambient light changes lagging behind display updates due to coarse sampling granularity in long-term scenarios, and also solving the problem of mismatch between ambient light data and the current frame due to the inability to capture instantaneous changes in short-term scenarios. Meanwhile, this method of generating environmental sub-timestamps through software algorithms eliminates the need for additional hardware sampling modules. This reduces hardware costs while flexibly adapting to ambient light sensors with different sampling frequencies, making full use of every piece of subdivided ambient photon data and reducing data waste. Ultimately, the actual ambient light determined based on the accurately matched ambient light data can more realistically and accurately support the adaptive adjustment of the display device (such as dynamic backlighting and color temperature calibration), ensuring that the display effect always matches the current real environment. This not only improves user visual comfort but also provides more refined data for optimizing the power consumption of the display device (such as avoiding excessive maintenance of high brightness).

[0115] In some exemplary embodiments, the ambient light data includes at least two ambient photon data points, and the ambient timestamp includes at least two ambient sub-timestamps, wherein each ambient photon data point is associated with an ambient sub-timestamp corresponding to the same valid pulse. In this embodiment, one valid pulse corresponds to at least two ambient photon data points and at least two ambient timestamps, that is, one valid pulse can correspond to at least two key-value pairs, one of which includes an ambient sub-timestamp and an ambient photon data point.

[0116] In applications, the ambient light sensor can time-divisionally acquire at least two ambient photon data points corresponding to the valid pulses of the frame synchronization signal, and record at least two ambient sub-timestamps corresponding to the valid pulses. It then associates and stores the at least two ambient photon data points and at least two ambient sub-timestamps corresponding to each valid pulse. In this case, the processor can directly obtain the ambient photon data and corresponding ambient sub-timestamps from the ambient light sensor, eliminating the need to calculate the ambient sub-timestamps, thus simplifying the processor's data processing flow and reducing the resource requirements on the processor.

[0117] The ambient light detection method provided in this embodiment also conforms to the aforementioned short integral detection mechanism. For ease of description, a mechanism in which a key-value pair includes at least two environmental sub-timestamps and at least two environmental photon data points can be referred to as a short integral one-to-one detection mechanism. In applications, the working mode or detection mechanism of the ambient light sensor and the functions of the processor can be flexibly configured according to actual needs, such as the device performance of the sensor and the processing performance of the processor. No further limitations are imposed here.

[0118] It should be noted that in the above embodiments, for the same valid pulse, m ambient photon data and an ambient timestamp, the ambient photon timestamp corresponding to the m ambient photon data can be calculated by software algorithm based on the ambient timestamp. This calculation and processing function can be integrated into the ambient light sensor or into other devices in the display device, such as the processor. The specific configuration can be flexibly configured according to actual needs, and no further limitations are made here.

[0119] In some exemplary embodiments, the ambient light data includes at least two ambient photon data points. That is, the ambient light sensor uses a short integration detection mechanism to detect ambient light. For example... Figure 9 As shown, the aforementioned S406 determines the actual ambient light of the display device based on the detection parameters and display parameters, including the following S902 to S906.

[0120] S902, based on at least two ambient photon data and the corresponding ambient timestamp in the detection parameters, determine the first ambient photon data corresponding to the current data frame of the target area and the second ambient photon data corresponding to the current black frame of the target area.

[0121] S904, determine the target display data corresponding to the current data frame of the target area based on at least one display data in the display parameters and the corresponding display timestamp.

[0122] S906, determine the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data.

[0123] The current frame, also known as the current display frame, refers to a complete refresh cycle of the image currently displayed on the display device. Display frames include data frames and black frames. Correspondingly, the current frame includes the current data frame and the current black frame. "Current" can be understood as the current stage of the display device. The current frame refers to a complete cycle corresponding to the current valid pulse of the frame synchronization signal, including the current valid pulse stage and the current invalid pulse stage. The current data frame of the target area refers to the stage in which the target area actually displays the image content in the current frame. The displayed image includes color values ​​(or RGB pixel values), brightness information, etc. The display device converts the data frame signal into pixel illumination or occlusion states through the driving circuit, ultimately presenting a visible image. The current black frame of the target area is the stage in which the target area is completely black or has extremely low brightness (light leakage) in the current frame. The black frame of the target area may include the off (or screen-off) stage and / or initialization (Reset) stage in the PWM dimming process. During the initialization stage, the target area is in the black frame stage (or in a screen-off state).

[0124] The first ambient photon data can be understood as the data acquired by the ambient light sensor in the current data frame of the target area. The entire acquisition phase of the first ambient photon data corresponds to the display frame phase of the target area. In other words, within the entire integration time of the first ambient photon data, both ambient light and self-emission interference from the target area's display data frame exist. Therefore, the first ambient photon data represents not only ambient light but also self-emission interference.

[0125] The second ambient photon data can be understood as the data collected by the ambient light sensor in the current black frame of the target area. This can be understood as data collected by the ambient light sensor when the target area is completely black (no light leakage), or data collected by the ambient light sensor when the target area is in a screen-off state and light leakage exists. When light leakage exists in the second ambient photon data, the acquisition phase cannot completely correspond to the completely black state of the target area; part of the acquisition phase corresponds to the black frame phase of the target area, and the remaining acquisition phase corresponds to the display frame phase of the target area. In other words, within the entire integration time of the second ambient photon data, part of the integration phase only involves ambient light, while the remaining integration phase involves interference from both ambient light and the display screen's self-emission.

[0126] To distinguish it from the display screen self-emission interference described in the remaining integration stage and the display screen self-emission interference in the first ambient photon data, the display screen self-emission interference in the first ambient photon data is denoted as screen light, and the display screen self-emission interference that may exist in the second ambient sub-data is denoted as screen light leakage. Based on this, it can be simply stated as: First ambient photon data = Ambient light + Screen light; Second ambient photon data = Ambient light, or Second ambient photon data = Ambient light + Screen light leakage.

[0127] In the application, the processor can determine multiple ambient photon data corresponding to the current valid pulse of the frame synchronization signal based on the ambient timestamp in the detection parameters. Then, it can determine the first and second ambient photon data corresponding to the current frame (or the current valid pulse) based on these multiple ambient photon data. Furthermore, the processor can determine the target display data corresponding to the current data frame of the target area based on at least one display data and the corresponding display timestamp in the display parameters. Then, it can determine the actual ambient light based on the first, second, and target display data. In determining the actual ambient light, the processor can subtract the first and second ambient photon data and combine this with the target display data to obtain compensation data for the actual ambient light of the current frame. This compensation data can then be used to eliminate self-emission interference from the display screen, thereby obtaining the actual ambient light. Specifically, the processor can determine a sub-data difference between the first ambient photon data and the second ambient photon data. This sub-data difference can be the screen light or the difference between the screen light and screen light leakage. Then, it can determine a target difference between the first ambient photon data and the sub-data difference. This target difference can be the actual ambient light or the sum of the actual ambient light and screen light leakage. Since screen light leakage is relatively small, this target difference can be used as the actual ambient light.

[0128] The ambient light determination method provided in the above embodiments determines the first ambient photon data corresponding to the current data frame of the target area and the second ambient photon data corresponding to the current black frame of the target area based on at least two ambient photon data and the corresponding ambient timestamp in the detection parameters. It also determines the target display data corresponding to the current data frame of the target area based on at least one display data and the corresponding display timestamp in the display parameters, and determines the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data. This method fully considers the light leakage problem that may exist in the black frame stage of the display device. Whether it is the pure ambient light attribute of the second ambient photon data in a completely black scene without light leakage, or the superposition attribute of the ambient light and screen light leakage of the second ambient photon data in a scene with light leakage, it can accurately remove the self-emission interference of the display screen through subsequent subtraction calculation with the first ambient photon data and combined with the compensation logic of the target display data, avoiding detection errors of the actual ambient light caused by the self-emission interference of the display screen. Furthermore, this method links the environmental timestamp and the display timestamp with the frame synchronization signal, ensuring that the first and second ambient photon data accurately correspond to the acquisition stages of the current data frame and the current black frame, respectively. The target display data also perfectly matches the screen state of the current data frame. This avoids the interference stripping failure caused by cross-frame data mixing in the time dimension. At the same time, it avoids excessive backlight consumption or undercompensation deviation caused by inaccurate ambient light detection, further improving the calculation accuracy of actual ambient light and thus improving the display effect.

[0129] Please continue reading. Figure 7 In some exemplary embodiments, the display parameters include a first duration PWM_L corresponding to a first level state of the pulse width modulation signal. The first duration PWM_L can be understood as the width of a single pulse corresponding to the first level state of the pulse width modulation signal. When the pulse width modulation signal is in the first level state, the light-emitting device in the display device is turned off, corresponding to a black frame in the display device. When the pulse width modulation signal is in the second level state, the light-emitting device in the display device is turned on, corresponding to a data frame in the display device. The first level state and the second level state are different. For example, the first level state may be a high level state, and the second level state may be a low level state. Alternatively, the first level state may be a low level state, and the second level state may be a high level state. In application, the specific types of the first and second level states can be set according to the specific driving method of the light-emitting device in the display device. For ease of understanding, this application uses a low level state as an example and a high level state as a description.

[0130] In applications, the processor can obtain the first duration PWM_L based on the duty cycle and period (or frequency) of the pulse width modulation signal. The duty cycle refers to the proportion of the total time the light-emitting device is lit within one PWM cycle. The duty cycle of the pulse width modulation signal can be dynamically adjusted according to dimming requirements; a larger duty cycle results in a higher display brightness.

[0131] In this case, the integration time corresponding to each ambient photon data is the same, such as Figure 7 As shown, the integration time is Atime. In applications, when the ambient light sensor detects a valid pulse of the frame synchronization signal, it can collect multiple ambient photon data corresponding to that valid pulse according to a uniform integration time Atime.

[0132] In step S906, determining the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data includes: acquiring a first duration and an integrated duration; and, if the first duration is less than the integrated duration, determining the actual ambient light of the display device based on the first duration, the integrated duration, the first ambient photon data, the second ambient photon data, and the target display data. The actual ambient light is negatively correlated with the first duration and positively correlated with the integrated duration.

[0133] In the application, the processor can obtain the first duration PWM_L corresponding to the first level state of the PWM signal, such as the low level state, and obtain the integration duration Atime corresponding to each ambient photon data, and compare the first duration PWM_L with the integration duration Atime to obtain the comparison result.

[0134] like Figure 7 or Figure 10As shown, if the comparison result is that the first duration PWM_L is less than the integration duration Atime, it indicates that the ambient light sensor cannot collect ambient photon data containing only ambient light. In this case, the ambient photon data will inevitably contain interference from the display screen's self-emission. Therefore, the second ambient photon data includes not only ambient light but also screen light leakage. In this case, the processor can determine the actual ambient light of the display device based on the first duration PWM_L, the integration duration Atime, the first ambient photon data, the second ambient photon data, and the target display data. Specifically, in determining the actual ambient light, the processor can directly calculate the actual ambient light of the display device based on the first duration PWM_L and the integration duration Atime, using the proportional relationship between the integration duration of only ambient light collection in the second ambient photon data and the integration duration of both ambient light and screen light leakage collection, combined with the actually collected first ambient photon data, second ambient photon data, and target display data. For ease of description, the method for determining the actual ambient light in this embodiment is referred to as the PWM calculation method. In some exemplary embodiments, the actual ambient light is negatively correlated with the first duration PWM_L and positively correlated with the integration duration Atime. That is, the smaller the first duration PWM_L, the larger the actual ambient light. The larger the integration duration Atime, the larger the actual ambient light.

[0135] If the comparison result shows that the first duration PWM_L is greater than or equal to the integration duration Atime, it indicates that the ambient light sensor can collect ambient photon data containing only ambient light. In this case, the processor can find the ambient photon data containing only ambient light from multiple ambient photon data sets as the second ambient photon data set. The processor can then directly determine the actual ambient light of the display device based on this second ambient photon data set. For example, the processor can directly determine the ambient photon data containing only ambient light as the actual ambient light of the display device. It should be noted that the first duration PWM_L being greater than or equal to the integration duration Atime can be understood as ideally, the ambient light sensor can collect ambient photon data containing only ambient light. In applications, considering the self-emission interference of the display screen, to ensure that ambient photon data containing only ambient light can be collected, the constraints can be further narrowed. That is, the processor can compare the first duration PWM_L with a preset multiple of the integration duration Atime, and identify whether the ambient light sensor can collect ambient photon data containing only ambient light based on the comparison result. The preset multiple is greater than or equal to 1; for example, the preset multiple can be 1, 1.5, 2, 3, or other values. Taking a preset multiplier of 2 as an example, if the first duration PWM_L is greater than or equal to twice the integration duration Atime (i.e., PWM_L ≥ 2 * Atime), the ambient light sensor can be considered to be able to collect ambient photon data where only ambient light exists. This increases the likelihood of the ambient light sensor collecting data where there is no ambient light, thereby improving the accuracy of the actual ambient light data.

[0136] It is understandable that the frequency of the PWM signal usually changes dynamically according to the dimming requirements, and the frequency of the PWM signal is generally higher than that of the frame synchronization signal, and in some cases, it is much higher. For example, the frequency of the frame synchronization signal is 120Hz, while the frequency of the PWM signal may be 1920Hz, 3840Hz, or higher. For high-frequency PWM signals, the device performance of the ambient light sensor may not be able to meet the requirements for capturing a completely black frame. For example, if the PWM signal frequency is 3840Hz, and the first duration of the first level state of the PWM signal is PWM_L (i.e., the duration of a single time the light-emitting device is turned off) is 130 microseconds, and if the minimum integration time for the ambient light sensor to collect a single data point is 200 microseconds > 130 microseconds, then in this case, the device performance of the ambient light sensor cannot meet the requirements for capturing a completely black frame. Therefore, each data point collected by the ambient light sensor includes interference from the display screen's self-emission. The PWM calculation method provided in the above embodiment can be used to determine the actual ambient light.

[0137] The ambient light determination method provided in the above embodiments obtains a first duration PWM_L and an integration duration such as Atime. When the first duration PWM_L is less than the integration duration Atime, the method determines the actual ambient light of the display device based on the first duration PWM_L, the integration duration Atime, the first ambient photon data, the second ambient photon data, and the target display data. This method can identify scenarios where the ambient light sensor cannot collect pure ambient light data under high-frequency PWM dimming, avoiding the ambient light detection deviation caused by ignoring light leakage in traditional methods. In this scenario, there is no need to replace it with a higher-performance sensor; instead, it can quickly find the first and second ambient photon data based on timestamps. By using the relationship between the first duration PWM_L and the integration duration Atime, it eliminates the interference from the display screen's self-emission in the ambient photon data, further improving the detection accuracy of the actual ambient light. Moreover, it solves the detection dilemma caused by insufficient hardware performance from a software perspective, significantly reducing hardware costs and selection thresholds. Furthermore, since the frequency and duty cycle of the PWM signal change dynamically according to the dimming requirements, this method can flexibly adapt to the detection requirements under different PWM parameters by acquiring the first duration PWM_L and the integral duration Atime in real time and dynamically judging the relationship between the two. Whether it is a short first duration PWM_L scenario of high frequency PWM or a long first duration PWM_L scenario of low frequency PWM, accurate detection can be achieved through a unified logic framework without adjusting the core logic of the algorithm due to changes in PWM parameters, which significantly improves the versatility and scenario adaptability of the method.

[0138] In some exemplary embodiments, the actual ambient light is calculated using the following formula:

[0139] Value1 = X + Y (1)

[0140] Value2=(PWM_L / Atime)*X+[(Atime-PWM_L) / Atime]*(X+Y) (2)

[0141] Where X represents the actual ambient light, i.e., the ambient light in the first ambient photon data; Y represents the target display data; Value1 represents the first ambient photon data; Value2 represents the second ambient photon data; PWM_L represents the first duration; and Atime represents the integration duration. Specifically, Atime-PWM_L represents the duration of acquiring ambient light and the display screen's self-emission (i.e., screen light leakage) during the entire acquisition phase of the second ambient photon data.

[0142] The ambient light determination method provided in the above embodiments provides a mathematical model for calculating the actual ambient light. It transforms the mixed acquisition scenario of ambient light and display screen self-emission into accurate and quantifiable calculation logic, providing technical support for solving the actual ambient light problem. Since the first duration PWM_L, integration duration, first ambient photon data, second ambient photon data, and target display data are all known, the processor can calculate the actual ambient light based on the above formulas (1) and (2). In this way, the qualitative logic of removing the interference of display screen self-emission from the data collected by the sensor is transformed into a quantitative calculation process. This method not only has a low computational threshold and can be executed quickly by the processor, but also minimizes human estimation errors. Especially in the hardware-limited scenario of high-frequency PWM dimming (PWM_L is very small) and the sensor integration duration cannot match the black frame duration, the accurate time ratio and component decomposition can stably output the real ambient light value, providing reliable data support for the adaptive dimming of the display device.

[0143] In some exemplary embodiments, such as Figure 11 As shown, the aforementioned S406 determines the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data, including the following S1102 and S1104.

[0144] S1102, based on the pre-built parameter database, obtain the target light leakage compensation parameters corresponding to the target display data; the target light leakage compensation parameters are used to compensate for the self-emission interference of the display screen in the target area.

[0145] S1104. Determine the actual ambient light based on the target light leakage compensation parameters, the first ambient photon data, and the second ambient photon data.

[0146] The parameter database includes the association between at least one reference display data and a light leakage compensation parameter. Each reference display data corresponds to one light leakage compensation parameter. The light leakage compensation parameter is obtained under conditions of no ambient light and is the reference display data. The reference display data is the relevant data displayed by the display device under preset display conditions. The reference display data corresponds to the target display data. The target light leakage compensation parameter is used to compensate for light leakage interference in the target area; in other words, the target light leakage compensation parameter can be used to represent compensation for screen light leakage in the second ambient photon data.

[0147] In applications, the processor can determine reference display data that matches the target display data from a pre-built parameter database based on the target display data (such as the color and brightness values ​​of the current frame). The light leakage compensation parameters associated with this reference display data then become the light leakage compensation parameters corresponding to the target display data. For example, the processor can directly determine reference display data that is identical to the target display data from the parameter database. In this case, the processor can directly use the light leakage compensation parameters associated with this reference display data as the light leakage compensation parameters corresponding to the target display data.

[0148] If the processor cannot directly determine the reference display data identical to the target display data from the parameter database, it can perform data processing based on the target display data and the reference database to obtain the light leakage compensation parameters corresponding to the target display data. This data processing may include color recognition, linear interpolation, and other related processes. For example, if the reference screen color values ​​in the parameter database include white, red, green, and blue, the processor can perform color recognition based on the screen color values ​​in the target display data to determine the color type, such as red. Then, based on this color type, the display brightness values ​​in the target display data, and the light leakage compensation parameters corresponding to each reference display brightness value under red, it can perform linear interpolation to obtain the light leakage compensation parameters corresponding to the target display data. In application, newly acquired light leakage compensation parameters and corresponding target display data can be stored in the parameter database, updating the parameter database. In this way, the parameter database can be continuously improved as the usage scenario expands, adapting to the actual needs of dynamic changes in display screen color and brightness, and avoiding the problem of light leakage compensation deviation due to differences in display content.

[0149] It should be noted that the above is merely an illustrative example. In some other embodiments, it is not necessary to establish a parameter database, and regardless of the current displayed data value, the processor can directly call the pre-set default light leakage compensation parameters for light leakage compensation. These default light leakage compensation parameters are the target light leakage compensation parameters corresponding to each frame of displayed data. The default light leakage compensation parameters can be understood as the balanced values ​​under various display scenarios. In practical applications, other suitable algorithms can also be used to determine the light leakage compensation parameters corresponding to the target display parameters, which will not be limited further here.

[0150] Based on the above, after determining the light leakage compensation parameter corresponding to the target display parameter, the processor can calculate the actual ambient light of the display device according to the light leakage compensation parameter, the first ambient photon data, and the second ambient photon data. For example, the processor can call a pre-built light leakage compensation model, inputting the light leakage compensation parameter corresponding to the target display parameter, the first ambient photon data, and the second ambient photon data into the light leakage compensation model, and obtaining the output value of the light leakage compensation model as the actual ambient light. In some embodiments, the actual ambient light is positively correlated with the target light leakage compensation parameter, the first ambient photon data, and the second ambient photon data, respectively. For ease of description, the method for determining the actual ambient light in this embodiment is referred to as the parameter compensation method.

[0151] It is understandable that the above parameter compensation method is decoupled from the dimming mode of the display device. This parameter compensation method is applicable to both PWM dimming and DC (Direct Current) dimming of the display device. Specifically, when the display device is operating in DC dimming mode, the first ambient photon data can be the ambient photon data collected by the ambient light sensor during the effective display phase, and the second ambient photon data can be the data collected by the ambient light sensor during the integration phase, including the initialization phase (Reset) of the display device. During the initialization phase, the target area is in a screen-off state. Figure 12 This is a schematic diagram illustrating an image obtained by capturing a display screen, as provided in an embodiment of this application. During the initialization phase of the display device, when the display screen is captured at an extremely fast shutter speed, an image can be obtained such as... Figure 12 The image shown is a schematic diagram. The light-emitting device in the target area of ​​the display screen is in an off state, corresponding to... Figure 12 The black stripes in the middle.

[0152] The initialization phase of the display device can correspond to the delay processing phase of the ambient light sensor. To address this, the ambient light sensor can be configured to acquire data across frames, meaning that at least two valid pulses of the frame synchronization signal correspond to a delay duration. For example, taking the example of at least two valid pulses of the frame synchronization signal corresponding to a delay duration, the ambient light sensor performs a delay processing step according to the delay duration when it detects the current valid pulse of the frame synchronization signal; and does not perform delay processing when it detects the next valid pulse. In this way, by adapting the cross-frame acquisition performance of the ambient light sensor (such as the delay processing corresponding to the initialization phase), the integrity of light leakage compensation in scenarios such as DC dimming is ensured, covering more hardware operating modes of the display device.

[0153] The ambient light determination method provided in the above embodiments allows the processor to obtain target light leakage compensation parameters corresponding to the target display data based on a pre-built parameter database. This enables the determination of the actual ambient light based on the target light leakage compensation parameters, first ambient photon data, and second ambient photon data. Since the target light leakage compensation parameters are used to compensate for self-emission interference from the display screen in the target area, the compensation parameters can accurately eliminate self-emission interference from the display screen in the ambient photon data, such as eliminating screen light leakage in the second ambient photon data. This avoids ambient light detection deviations caused by fuzzy light leakage estimation and significantly improves the accuracy of actual ambient light calculation. Furthermore, regardless of whether the light leakage occurs in PWM dimming mode or DC dimming mode, this method can obtain the corresponding light leakage compensation parameters for the display state from the parameter database and apply them uniformly to the actual ambient light calculation. This eliminates the need to design separate compensation algorithms for different dimming technologies, reducing the adaptation cost across hardware platforms. The actual ambient light data obtained from light leakage compensation can provide a more reliable basis for the adaptive adjustment of display devices. This avoids the misjudgment of ambient light caused by light leakage interference (such as light leakage being misjudged as strong light in dark environments, resulting in excessively high screen brightness), and ensures the visual comfort of users under different display content and different dimming modes. At the same time, it lays a data foundation for optimizing device power consumption (such as accurately adjusting backlight power based on real ambient light).

[0154] In some exemplary embodiments, the aforementioned S1104, determining the actual ambient light based on the target light leakage compensation parameter, the first ambient photon data, and the second ambient photon data, includes: determining a first difference between the first ambient photon data and the second ambient photon data; determining a first ratio between the first difference and the target light leakage compensation parameter; and the actual ambient light being the difference between the first ambient photon data and the first ratio.

[0155] For example, the light leakage compensation parameter can be used to represent the percentage difference between the on-screen detection data and the off-screen detection data corresponding to the target area under conditions of no ambient light. Here, the on-screen detection data refers to the data collected by the ambient light sensor under conditions of no ambient light and when the target area displays data frames, with the displayed data frames being preset reference display data. The off-screen detection data refers to the data collected by the sensor under conditions of no ambient light and when the target area displays black frames.

[0156] As mentioned above, the first ambient photon data is the sum of ambient light and screen light, and the second ambient photon data is the sum of ambient light and screen light leakage. Both screen light and screen light leakage are self-emissive emissions from the display screen under ambient light conditions. Therefore, the first difference Δb1 is the difference between the first ambient photon data Sd11 and the second ambient photon data Sd21, i.e., Δb1 = Sd11 - Sd21. Thus, by subtracting, ambient light is eliminated; therefore, the first difference can also be expressed as the difference between screen light and screen light leakage under ambient light conditions. Actual ambient light can be expressed by the formula:

[0157] X=Sd11-Δb1 / p1=Sd11-(Sd11-Sd21) / P1 (3)

[0158] Where X represents the actual ambient light, Sd11 represents the first ambient photon data, Sd21 represents the second ambient photon data, and P1 represents the target light leakage compensation parameter.

[0159] The ambient light determination method provided in the above embodiments can directly eliminate the influence of ambient light by determining the first difference between the first ambient photon data and the second ambient photon data, that is, completely eliminating the variable of ambient light. This lays a pure computational foundation for the subsequent removal of interference related to screen self-emission and avoids interference from ambient light fluctuations in the breakdown of interference items. Furthermore, by determining the first ratio between the first difference and the target light leakage compensation parameter, the difference between the first ambient photon data and the first ratio can be determined as the actual ambient light. Since the target light leakage compensation parameter represents the ratio of screen-on to screen-off detection data under no ambient light, it is essentially an inherent correlation coefficient between screen light and light leakage. The actual ambient light can be directly calculated through this coefficient, solving the problem of difficulty in eliminating screen light and light leakage from the data collected by the sensor. This method can quickly respond to the real-time demand for ambient light data from the display device, while significantly reducing the hardware resource cost of the algorithm. Furthermore, since the light leakage compensation parameters are pre-calibrated based on different reference display data (such as color and brightness), when the display screen changes dynamically (such as switching from white to red, or adjusting the brightness from 50% to 80%), it is only necessary to match the corresponding target light leakage compensation parameters from the database and substitute them into the formula to automatically adapt to the light leakage compensation requirements of the new scene without readjusting the calculation logic. At the same time, this logic is completely decoupled from the dimming method (PWM / DC). Whether it is light leakage in a PWM dimming scenario or a DC dimming scenario, it can obtain accurate actual ambient light, which significantly improves the versatility and cross-hardware adaptability of the method. It provides interference-free real data support for the adaptive adjustment of the display device and avoids problems such as excessive brightness in dark environments and excessively dark images in strong light environments caused by misjudgment of screen light and light leakage. It not only ensures the visual comfort of users, but also provides a reliable basis for the device to optimize backlight power consumption based on real ambient light.

[0160] In some exemplary embodiments, the method for determining ambient light further includes: acquiring multiple reference display data of a target area; acquiring sensor data corresponding to each reference display data in the target area without ambient light; determining screen-on detection data and screen-off detection data corresponding to each reference display data based on the sensor data corresponding to each reference display data; and determining light leakage compensation parameters corresponding to each reference display data based on the screen-on detection data and screen-off detection data corresponding to each reference display data.

[0161] For example, the data to be displayed includes at least one of a reference screen color value and a reference display brightness value. The reference screen color value can be represented by the color type of the image displayed in the target area, for example, it can be white, red, green, and blue, or any other color, without limitation. The reference display brightness value is a preset display brightness value, for example, a brightness value between backlight levels 0 and 2047, or any other suitable value.

[0162] Sensor data refers to the data collected by the ambient light sensor when the display device is in the absence of ambient light and the display parameters are reference display data. For details on the ambient light sensor acquisition process, please refer to the relevant introduction above, which will not be repeated here.

[0163] Screen-on detection data refers to the data from the sensor that corresponds to the display frame in the target area when the display device is in a state of no ambient light and the display parameters are reference display data. Screen-off detection data refers to the data from the sensor that corresponds to the display frame in the target area when the display device is in a state of no ambient light and the display parameters are reference display data. The meaning of screen-on detection data is similar to that of the aforementioned first ambient photon data, the difference being that their detection conditions are different. Similarly, the meaning of screen-off detection data is similar to that of the aforementioned second ambient photon data, the difference being that their detection conditions are different.

[0164] The light leakage compensation parameter can be used to represent the percentage of the difference between the on-screen detection data and the off-screen detection data for the target area under conditions of no ambient light. It can be expressed by the formula:

[0165] P0=Δb0 / Sd10=(Sd10-Sd20) / Sd10 (4)

[0166] Where P0 represents the light leakage compensation parameter; Δb0 represents the difference between the screen-on detection data and the screen-off detection data; Sd10 represents the screen-on detection data; and Sd20 represents the screen-off detection data.

[0167] In the application, multiple reference display data can be obtained according to the requirements and the display parameters of the display device can be set according to the reference display data for display. In addition, sensor data corresponding to each reference display data collected by the ambient light sensor under no ambient light conditions can be obtained. Thus, the screen-on detection data and screen-off detection data corresponding to each reference display data can be determined according to the sensor data corresponding to each reference display. The light leakage compensation parameter P0 corresponding to each reference display data can be calculated according to the above formula (4). The display reference data and the light leakage compensation parameter P0 can also be associated and stored to build a parameter database to provide data support for determining the actual ambient light.

[0168] Table 1 shows the correlation between multiple reference display data and light leakage compensation parameters. The data in this table was collected with a delay duration Td of 7.3ms. Table 1 is for illustrative purposes only and does not represent an actual parameter database. In applications, the parameter database can be stored in the display device before it leaves the factory, and the reference database can also be dynamically updated as the display device is used.

[0169] Table 1

[0170]

[0171] The ambient light determination method provided in the above embodiments acquires multiple reference display data for a target area, and acquires sensor data corresponding to each reference display data in the absence of ambient light. Based on the sensor data corresponding to each reference display data, it determines the on-screen detection data and off-screen detection data corresponding to each reference display data. Therefore, based on the on-screen detection data and off-screen detection data corresponding to each reference display data, it determines the light leakage compensation parameters corresponding to each reference display data. This allows for the establishment of a parameter database, providing data support for determining the actual ambient light using the light leakage compensation method. Since the calibration condition without ambient light completely eliminates the interference of ambient light on the sensor data, the difference between the on-screen detection data and the off-screen detection data only reflects the characteristics of screen light and screen light leakage. That is, the sensor data is acquired under test conditions without ambient light and without the display screen's self-illumination. This enables the light leakage compensation parameters to accurately characterize the true intensity of screen light leakage under specific display conditions, avoiding distortion of the compensation parameters due to ambient light mixing in the calibration process. This provides a benchmark for removing light leakage interference in subsequent real-world scenarios. Secondly, by designing reference display data, the parameter database can achieve broad scenario coverage, enabling it to adapt to the dynamic changes in display content during practical applications and providing support for rapid and accurate compensation. Furthermore, the pre-established parameter database significantly improves the efficiency and stability of practical applications. The processor does not need to collect ambient light data or calculate light leakage compensation parameters in real time; it can quickly calculate the actual ambient light by matching and calling pre-stored parameters in the database. This not only reduces the hardware resource consumption of real-time calculations but also avoids errors that may occur during real-time calibration, resulting in faster response speeds and more stable results for actual ambient light detection, better meeting the real-time requirements of dynamic dimming in display devices.

[0172] In some exemplary embodiments, such as Figure 13 As shown, in S404, based on at least two ambient photon data and the corresponding ambient timestamp in the detection parameters, the first ambient photon data corresponding to the current data frame of the target area and the second ambient photon data corresponding to the current black frame of the target area are determined, including the following S1302 and S1304.

[0173] S1302, based on at least two ambient photon data and the corresponding ambient timestamp in the detection parameters, obtain the fluctuation parameters of multiple ambient photon data corresponding to the current frame of the target area.

[0174] S1304, based on at least two ambient photon data and the corresponding ambient timestamp in the detection parameters, determine at least one ambient photon data corresponding to the current data frame of the target area, and at least one ambient photon data corresponding to the current black frame of the target area.

[0175] Specifically, when the fluctuation parameter is less than or equal to a preset fluctuation threshold, the first ambient photon data is the average value of at least one ambient photon data corresponding to the current data frame, and the second ambient photon data is the average value of at least one ambient photon data corresponding to the current black frame. Alternatively, when the fluctuation parameter is greater than the preset fluctuation threshold, the first ambient photon data is the maximum ambient photon data among at least one ambient photon data corresponding to the current data frame, and the second ambient photon data is the minimum ambient photon data among at least one ambient photon data corresponding to the current black frame.

[0176] Fluctuation parameters reflect the degree of data fluctuation or dispersion. Appropriate metrics can be used to measure fluctuation, including but not limited to variance, standard deviation, and interquartile range. A preset fluctuation threshold is used to identify the fluctuation level of multiple ambient photon data corresponding to the current frame of the target area. If the fluctuation level is less than or equal to the preset fluctuation threshold, it indicates that the data fluctuation is small, or that the data values ​​are relatively uniform. In this case, mean processing can be used, i.e., taking the average value of at least one ambient sub-data corresponding to the current data frame as the first ambient photon data, and taking the average value of at least one ambient photon data corresponding to the current black frame as the second ambient photon data. If the fluctuation level is greater than the preset fluctuation threshold, it indicates that the data fluctuation is large, or that the data values ​​are not uniform. In this case, extremum processing can be used, i.e., taking the maximum value among at least one ambient sub-data corresponding to the current data frame (i.e., the aforementioned maximum ambient photon data) as the first ambient photon data, and taking the minimum value among at least one ambient photon data corresponding to the current black frame (i.e., the aforementioned minimum ambient photon data) as the second ambient photon data.

[0177] Taking a display device employing PWM dimming and an ambient light sensor operating in short integration mode as an example, assuming the current valid pulse of the frame synchronization signal corresponds to 8 ambient photon data points, numbered Data1 to Data8, the processor can determine multiple ambient photon data points corresponding to the current data frame of the target area based on the ambient timestamp of the current valid pulse. These data points include, for example, the four ambient photon data points Data1, Data3, Data5, and Data7 collected when the PWM is at a low level (i.e., the light-emitting device is off), and multiple ambient light data points corresponding to the current black frame of the target area, such as the four ambient photon data points Data2, Data4, Data6, and Data8 collected when the PWM is at a high level (i.e., the light-emitting device is on). If the fluctuation parameter of these 8 ambient photon data points is less than or equal to a preset fluctuation threshold, then the first ambient photon data point is (Data1 + Data3 + Data5 + Data7) / 4, and the second ambient photon data point is (Data2 + Data4 + Data6 + Data8) / 4. If the fluctuation parameters of these 8 ambient photon data exceed the preset fluctuation threshold, then the first ambient photon data is Max(Data1, Data3, Data5, Data7), and the second ambient photon data is Min(Data2, Data4, Data6, Data8).

[0178] The ambient light determination method provided in the above embodiments can obtain the fluctuation parameters of the current frame's ambient photon data based on at least two ambient photon data and the corresponding ambient timestamp in the detection parameters, thereby effectively detecting the data stability. Then, by combining the comparison results of the fluctuation parameters with a preset waveguide threshold, the method of selecting the values ​​of the first and second ambient photon data is dynamically selected: the average value is taken for small fluctuations, and the maximum value is taken for large fluctuations. This achieves precise adaptation to the differences in the stability of ambient photon data, ensuring the reliability of subsequent actual ambient light calculations from the data source, while also taking into account the detection accuracy and anti-interference capability under different scenarios. This dynamic value selection logic does not require additional hardware costs; it can be implemented only through software-level fluctuation judgment and simple calculations. This ensures the algorithm's lightweight nature and flexibly adapts to different environmental scenarios (from constant indoor light to dynamic outdoor light), significantly improving the method's scenario adaptability. Furthermore, regardless of whether the data is a stable average or fluctuating extreme values, the actual ambient light can be accurately calculated using the aforementioned PWM calculation or light leakage compensation method. This further enhances the versatility and robustness of the entire method, ultimately enabling the display device's adaptive adjustment to respond accurately based on reliable ambient light data, whether the ambient light is stable or fluctuating. This improves the user's visual experience while avoiding unnecessary power consumption waste.

[0179] Please continue reading. Figure 7In some exemplary embodiments, the display parameters include a first duration PWM_L corresponding to a first level state and a second duration PWM_H corresponding to a second level state. The first duration PWM_L can be understood as the width of a single pulse when the PWM signal is in the first level state, such as a low level state. The second duration PWM_H can be understood as the width of a single pulse when the PWM signal is in the second level state, such as a high level state. When the PWM signal is in the first level state, the light-emitting device in the display device is turned off. When the PWM signal is in the second level state, the light-emitting device in the display device is turned on. The ambient light data includes at least two ambient photon data points. That is, the display device uses PWM dimming, and the ambient light data uses a short integral detection mechanism.

[0180] S406, determining the actual ambient light of the display device based on detection parameters and display parameters, includes: acquiring the integration duration of ambient photon data; if the first duration is greater than or equal to the integration duration of the ambient photon data, determining the actual ambient light of the display device based on the second duration, the integration duration of each ambient photon data, at least two ambient photon data in the detection parameters, and the corresponding ambient timestamp; the actual ambient light is the ambient photon data collected by the ambient light sensor when the pulse width modulation signal in the target area is kept at the first level.

[0181] If the first duration PWM_L is greater than or equal to the integral duration of the ambient photon data, it indicates that the ambient light sensor can collect ambient photon data in which only ambient light exists. In this case, the processor can use the ambient photon data in which only ambient light exists as the second ambient photon data. Based on the second ambient photon data, the processor can directly determine the actual ambient light of the display device.

[0182] In the application, the processor can determine at least two ambient photon data corresponding to the current frame based on the ambient timestamp, and can directly find the actual ambient light from at least two ambient photon data corresponding to the current frame based on at least the second duration PWM_H and the integral duration of each ambient photon data.

[0183] For example, since the integration time of each ambient photon data is the same, the actual ambient light can be determined using the following formula:

[0184] (5)

[0185] Where k represents the kth ambient photon data acquired in one valid pulse of the frame synchronization signal; PWM_H represents the second duration, that is, the duration corresponding to the pulse width modulation signal being in the second level state (light-emitting device off); Tsample represents the integration duration of the ambient photon data; This indicates rounding down. The actual ambient light is represented by the (k+1)th ambient photon data.

[0186] Taking a PWM signal frequency of 1920Hz, a PWM period Ttotal of 520 microseconds, a PWM signal low-level pulse width (first duration PWM_L) of 200 microseconds, a PWM signal high-level pulse width (second duration PWM_H) of 320 microseconds, and an ambient photon data integration duration Tsample of 50 microseconds as an example, to ensure that the sampling point falls within the 200-microsecond Tlow interval, assuming that at t=0, the PWM signal just transitions from a low-level state to a high-level state, starting a high-potential interval of 320 microseconds, and the ambient light sensor starts collecting the first ambient photon data at t=0, it can be calculated using the above formula (5). If the low-level state of the PWM signal completely covers the integration phase of the 8th ambient photon data, and the 8th ambient photon data only includes ambient light and does not include the self-emission of the display screen, then the 8th ambient photon data can be determined as the actual ambient light.

[0187] For ease of explanation, the method described above, which uses ambient light sensors to collect ambient photon data that only contains ambient light, to determine the actual ambient light, is referred to as the complete black frame method.

[0188] The ambient light determination method provided in the above embodiments obtains the integration duration of ambient photon data. When the first duration PWM_L is greater than or equal to the integration duration of the ambient photon data, the actual ambient light of the display device is determined based on the second duration PWM_H, the integration duration of each ambient photon data, at least two ambient photon data in the detection parameters, and the corresponding ambient timestamp. This method effectively identifies scenes where the ambient light sensor can collect pure ambient light data. In these scenes, there is no need to separate interference from light leakage or screen light; pure ambient light data can be directly located. This ensures the authenticity of the actual ambient light detection results from the source, avoiding computational deviations that may be introduced during interference item separation. It not only reduces the processor's computational load and hardware resource consumption but also significantly improves the response speed of ambient light detection, perfectly meeting the real-time requirements of dynamic dimming in display devices.

[0189] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0190] Based on the same inventive concept, this application also provides a display device for implementing the ambient light determination method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more display device embodiments provided below can be found in the limitations of the ambient light determination method described above, and will not be repeated here.

[0191] In some exemplary embodiments, such as Figure 1 and Figure 2 As shown, a display device is provided, which may include a display screen 20, an ambient light sensor 10, and a processor 30. The ambient light sensor 10 is used to collect ambient light data corresponding to valid pulses of the frame synchronization signal of the display device, and record the ambient timestamps corresponding to the valid pulses; and associates and stores the ambient light data and ambient timestamps corresponding to each valid pulse. The processor 30 can obtain detection parameters from the ambient light sensor 10 and the display parameters of the display device, and determine the actual ambient light of the display device based on the detection parameters and the display parameters. The detection parameters include at least a set of associated and stored ambient light data and ambient timestamps. The processor 30 can use the ambient light determination method provided in the foregoing embodiments to determine the actual ambient light; details can be found in the foregoing descriptions, which will not be repeated here.

[0192] In some exemplary embodiments, a display device 1000 is provided, in conjunction with Figures 1 to 14 The determination of the actual ambient light for the display device 1000 is explained.

[0193] The ambient light sensor 10 in the display device 1000 can employ a long integration detection mechanism and / or a short integration detection mechanism. Based on the valid pulse of the frame synchronization signal, it acquires ambient light data corresponding to the valid pulse and records the corresponding ambient timestamp, storing the ambient light data and timestamp for each valid pulse in association. In short integration mode, the ambient light data includes at least two ambient photon data points. Furthermore, the ambient light sensor 10 can use a FIFO format to associate and store the ambient light data and timestamp.

[0194] The display driver chip DDIC in the display device 1000 can synchronize with the frame synchronization signal and, according to the frame synchronization signal, periodically capture images at a preset frequency to obtain the screen color value corresponding to the target area, as well as record the color timestamp corresponding to the screen refresh, and store each screen color value and color timestamp in association. Furthermore, the display driver chip can use a FIFO format to associate and store the screen color value and color timestamp.

[0195] The processor 30 in the display device 1000 can monitor screen brightness information through the uevent mechanism, record the display brightness value of the current frame and the corresponding brightness timestamp, and store the display brightness value and the corresponding brightness timestamp in association using FIFO format.

[0196] The processor 30 can acquire detection data from the ambient light sensor 10 at a preset cycle, and acquire the screen color value and color timestamp corresponding to the current frame from the display driver chip at a preset cycle. The detection data may include ambient light data and ambient timestamp corresponding to the current valid pulse of the frame synchronization signal. The processor 30 can determine the actual ambient light corresponding to the current frame of the display device 1000 based on the display brightness value and corresponding brightness timestamp, the screen color value and corresponding color timestamp, and the ambient light data and corresponding ambient timestamp, thereby compensating for the display brightness value of the next frame based on the actual ambient light.

[0197] When the display device 1000 uses PWM dimming, and the low-level pulse width PWM_L of the PWM signal is greater than or equal to the integration time (e.g., Atime) for a single data acquisition by the ambient light sensor, meaning the ambient light sensor 10 can acquire data requiring only ambient light, the processor 30 can determine the actual ambient light using the aforementioned complete black frame method. When the display device 1000 uses PWM dimming, and the low-level pulse width PWM_L of the PWM signal is less than the integration time (e.g., Atime) for a single data acquisition by the ambient light sensor 10, meaning the ambient light sensor cannot acquire data requiring only ambient light, the processor 30 can determine the actual ambient light using the aforementioned PWM calculation method. When the display device uses PWM and / or DC dimming, if the ambient light sensor cannot acquire data requiring only ambient light, the processor 30 can determine the actual ambient light using the aforementioned parameter compensation method. In applications, the appropriate method for determining the actual ambient light can be flexibly selected based on the actual scenario of the display device 1000.

[0198] The display device provided in the above embodiments can acquire ambient light data corresponding to the effective pulses of the frame synchronization signal of the display device through an ambient light sensor, and record the ambient timestamps corresponding to the effective pulses; and associate and store the ambient light data and ambient timestamps corresponding to each effective pulse. Furthermore, a processor can obtain detection parameters from the ambient light sensor and display parameters of the display device, and determine the actual ambient light of the display device based on the detection parameters and display parameters. Since the detection parameters include at least one associated and stored ambient light data and ambient timestamp, and the ambient light data is acquired by the ambient light sensor based on the effective pulses of the frame synchronization signal in the display device, and the ambient timestamp is recorded by the ambient light sensor based on the effective pulses of the frame synchronization signal, each ambient light data can be bound to the timing of the display frame through the corresponding ambient timestamp. For any frame, the corresponding ambient light data can be found through the ambient timestamp, thereby directly determining the accurate actual ambient light by aligning the display parameters and detection parameters with the frame. This avoids the problem of asynchronous interference elimination caused by misalignment between the timing of ambient light acquisition and display changes in related technologies, improves the accuracy of determining the actual ambient light, and thus improves the display effect. For example, when interference from the screen's self-emission is present, the display characteristics of the frame to which the data was collected can be quickly matched based on the environmental timestamp, accurately distinguishing between actual ambient light and screen self-emission interference, thus effectively removing the interference. Furthermore, it eliminates the need for software algorithms to handle deviations caused by time asynchrony, reducing the complexity of eliminating screen self-emission interference in ambient light data and improving the processing efficiency and accuracy of actual ambient light. In addition, the flexible configuration of the ambient light sensor's internal hardware-level timestamp overcomes the limitations of software timestamp schemes in related technologies, eliminating reliance on software calculations, avoiding software resource consumption and alignment resource consumption, and freeing it from the constraints of fixed software integration durations. Moreover, the associated stored ambient light data and environmental timestamps can adapt to the timing characteristics of different display panels according to the frame synchronization signal, i.e., it can achieve adaptive frame rate detection of ambient light. Therefore, it eliminates the need for manual parameter adjustments based on image and brightness change patterns, reducing adaptation costs and ultimately achieving a dual improvement in ambient light determination accuracy and display adjustment adaptability.

[0199] Based on the same inventive concept, this application also provides an ambient light determination apparatus for implementing the ambient light determination method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more ambient light determination apparatus embodiments provided below can be found in the limitations of the ambient light determination method described above, and will not be repeated here.

[0200] In some exemplary embodiments, such as Figure 15As shown, an ambient light determination device is provided, including an acquisition module 1501 and a determination module 1502. The acquisition module 1501 is used to acquire detection parameters from an ambient light sensor in a display device, and to acquire display parameters of the display device. The detection parameters include at least associated stored ambient light data and an ambient timestamp. The ambient light data is acquired by the ambient light sensor based on valid pulses of a frame synchronization signal in the display device, and the ambient timestamp is recorded by the ambient light sensor based on valid pulses of the frame synchronization signal. The determination module 1502 is used to determine the actual ambient light of the display device based on the detection parameters and the display parameters.

[0201] In some exemplary embodiments, the display parameters include at least display data of a target area and a corresponding display timestamp, wherein the target area is the area in the display device corresponding to the ambient light sensor; wherein, the determining module is further configured to determine a target timestamp that matches the display timestamp from at least one ambient timestamp in the detection parameters; and determine the actual ambient light of the display device based on the ambient light data corresponding to the target timestamp and the display data corresponding to the display timestamp.

[0202] In some exemplary embodiments, the ambient light data includes at least two ambient photon data; the determining module is further configured to: determine the environmental sub-timestamp corresponding to each ambient photon data according to the acquisition parameters and the ambient timestamp of each ambient photon data; and determine the target timestamp that matches the display timestamp from the at least two environmental sub-timestamps in the detection parameters.

[0203] In some exemplary embodiments, the ambient light data includes at least two ambient photon data; the determining module is further configured to: determine the first ambient photon data corresponding to the current data frame of the target area and the second ambient photon data corresponding to the current black frame of the target area based on the at least two ambient photon data in the detection parameters and the corresponding ambient timestamp; determine the target display data corresponding to the current data frame of the target area based on the at least one display data in the display parameters and the corresponding display timestamp; and determine the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data.

[0204] In some exemplary embodiments, the display parameters include a first duration corresponding to a first level state of the pulse width modulation signal; when the pulse width modulation signal is in the first level state, turning off the light-emitting device in the display device; when the pulse width modulation signal is in the second level state, turning on the light-emitting device in the display device; wherein, the integration duration corresponding to each ambient photon data is the same; the acquisition module is further configured to acquire the integration duration corresponding to each ambient photon data; the determination module is further configured to determine the actual ambient light of the display device based on the first duration, the integration duration, the first ambient photon data, the second ambient photon data, and the target display data when the first duration is less than the integration duration; the actual ambient light is negatively correlated with the first duration and positively correlated with the integration duration.

[0205] In some exemplary embodiments, the determining module is further configured to calculate the actual ambient light using the following formulas: Value1=X+Y; Value2=(PWM_L / Atime)*X+[(Atime-PWM_L) / Atime]*(X+Y); where X represents the actual ambient light; Y represents the target display data; Value1 represents the first ambient photon data; Value2 represents the second ambient photon data; PWM_L represents the first duration; and Atime represents the integration duration.

[0206] In some exemplary embodiments, the acquisition module is further configured to acquire target light leakage compensation parameters corresponding to the target display data based on a pre-built parameter database; the target light leakage compensation parameters are used to compensate for self-emission interference of the display screen in the target area. The determination module is further configured to determine the actual ambient light based on the target light leakage compensation parameters, the first ambient photon data, and the second ambient photon data; the actual ambient light is positively correlated with the target light leakage compensation parameters, the first ambient photon data, and the second ambient photon data, respectively.

[0207] In some exemplary embodiments, the determining module is further configured to: determine a first difference between the first ambient photon data and the second ambient photon data; determine a first ratio between the first difference and the target light leakage compensation parameter; and the actual ambient light is the difference between the first ambient photon data and the first ratio.

[0208] In some exemplary embodiments, the acquisition module is further configured to acquire multiple reference display data of the target area; and acquire sensor data corresponding to each reference display data in the target area under no ambient light. The determination module is further configured to determine screen-on detection data and screen-off detection data corresponding to each reference display data based on the sensor data corresponding to each reference display data; and determine light leakage compensation parameters corresponding to each reference display data based on the screen-on detection data and screen-off detection data corresponding to each reference display data.

[0209] In some exemplary embodiments, the acquisition module is further configured to acquire fluctuation parameters of multiple ambient photon data corresponding to the current frame of the target area based on at least two ambient photon data in the detection parameters and the corresponding ambient timestamps. The determination module is further configured to determine at least one ambient photon data corresponding to the current data frame of the target area and at least one ambient photon data corresponding to the current black frame of the target area based on at least two ambient photon data in the detection parameters and the corresponding ambient timestamps. Wherein, when the fluctuation parameter is less than or equal to a preset fluctuation threshold, the first ambient photon data is the average value of at least one ambient photon data corresponding to the current data frame, and the second ambient photon data is the average value of at least one ambient photon data corresponding to the current black frame; or, when the fluctuation parameter is greater than the preset fluctuation threshold, the first ambient photon data is the maximum ambient photon data among the at least one ambient photon data corresponding to the current data frame, and the second ambient photon data is the minimum ambient photon data among the at least one ambient photon data corresponding to the current black frame.

[0210] In some exemplary embodiments, the display parameters include a first duration corresponding to a first level state of the pulse width modulation signal and a second duration corresponding to a second level state of the pulse width modulation signal; when the pulse width modulation signal is at the first level state, the light-emitting device in the display device is turned off; when the pulse width modulation signal is at the second level state, the light-emitting device in the display device is turned on; the ambient light data includes at least two ambient photon data. The acquisition module is further configured to acquire the integration duration of the ambient photon data. The determination module is further configured to, when the first duration is greater than or equal to the integration duration of the ambient photon data, determine the actual ambient light of the display device based at least on the second duration, the integration duration of each ambient photon data, at least two ambient photon data in the detection parameters, and the corresponding ambient timestamp; the actual ambient light is the ambient photon data collected by the ambient light sensor in the target area when the pulse width modulation signal is maintained at the first level state.

[0211] Each module in the aforementioned ambient light determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0212] In some exemplary embodiments, a display device is provided, which may be a terminal, and its internal structure diagram may be as follows. Figure 16As shown, the display device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an ambient light determination method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the display device casing, or an external keyboard, touchpad, or mouse.

[0213] Those skilled in the art will understand that Figure 16 The structure shown in the figure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the display device to which the present application is applied. A specific display device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0214] In some exemplary embodiments, a display device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the aforementioned method.

[0215] In some exemplary embodiments, a computer-readable storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned method.

[0216] In some exemplary embodiments, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the aforementioned method.

[0217] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0218] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0219] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0220] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for determining ambient light, characterized in that, The method, applied to a processor in a display device, includes: Detection parameters are obtained from an ambient light sensor in the display device; wherein, the detection parameters include at least a stored ambient light data and an ambient timestamp; the ambient light data is acquired by the ambient light sensor based on the effective pulses of the frame synchronization signal in the display device, and the ambient timestamp is recorded by the ambient light sensor based on the effective pulses of the frame synchronization signal; Obtain the display parameters of the display device; The actual ambient light of the display device is determined based on the detection parameters and the display parameters.

2. The method according to claim 1, characterized in that, The display parameters include at least display data for a target area and a corresponding display timestamp, wherein the target area is the area in the display device corresponding to the ambient light sensor; wherein, determining the actual ambient light of the display device based on the detection parameters and the display parameters includes: From at least one of the environmental timestamps in the detection parameters, determine a target timestamp that matches the display timestamp; The actual ambient light of the display device is determined based on the ambient light data corresponding to the target timestamp and the display data corresponding to the display timestamp.

3. The method according to claim 2, characterized in that, The ambient light data includes at least two ambient photon data; determining the target timestamp that matches the displayed timestamp from at least one of the ambient timestamps in the detection parameters includes: Based on the acquisition parameters of each environmental photon data and the environmental timestamp, determine the environmental sub-timestamp corresponding to each environmental photon data; From at least two of the environmental sub-timestamps in the detection parameters, a target timestamp that matches the display timestamp is determined.

4. The method according to claim 1, characterized in that, The ambient light data includes at least two ambient photon data; determining the actual ambient light of the display device based on the detection parameters and the display parameters includes: Based on at least two of the ambient photon data in the detection parameters and the corresponding ambient timestamp, determine the first ambient photon data corresponding to the current data frame of the target area and the second ambient photon data corresponding to the current black frame of the target area; Based on at least one display data in the display parameters and the corresponding display timestamp, determine the target display data corresponding to the current data frame of the target area; The actual ambient light is determined based on the first ambient photon data, the second ambient photon data, and the target display data.

5. The method according to claim 4, characterized in that, The display parameters include a first duration corresponding to the pulse width modulation signal being at a first level; when the pulse width modulation signal is at the first level, the light-emitting device in the display device is turned off; When the pulse width modulation signal is at the second level, the light-emitting device in the display device is illuminated; wherein, the integration duration corresponding to each ambient photon data is the same; determining the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data includes: Obtain the integration duration corresponding to each of the aforementioned environmental photon data; When the first duration is less than the integration duration, the actual ambient light of the display device is determined based on the first duration, the integration duration, the first ambient photon data, the second ambient photon data, and the target display data; the actual ambient light is negatively correlated with the first duration and positively correlated with the integration duration.

6. The method according to claim 5, characterized in that, The actual ambient light is calculated using the following formula: Value1 = X + Y Value2= (PWM_L / Atime)*X + [(Atime-PWM_L) / Atime]*(X+Y) Wherein, X represents the actual ambient light; Y represents the target display data; Value1 represents the first ambient photon data; Value2 represents the second ambient photon data; PWM_L represents the first duration; and Atime represents the integration duration.

7. The method according to claim 4, characterized in that, Determining the actual ambient light based on the first ambient photon data, the second ambient photon data, and the target display data includes: Based on a pre-built parameter database, target light leakage compensation parameters corresponding to the target display data are obtained; the target light leakage compensation parameters are used to compensate for the self-emission interference of the display screen in the target area. The actual ambient light is determined based on the target light leakage compensation parameter, the first ambient photon data, and the second ambient photon data; the actual ambient light is positively correlated with the target light leakage compensation parameter, the first ambient photon data, and the second ambient photon data, respectively.

8. The method according to claim 7, characterized in that, The step of determining the actual ambient light based on the target light leakage compensation parameters, the first ambient photon data, and the second ambient photon data includes: Determine a first difference between the first ambient photon data and the second ambient photon data; A first ratio is determined between the first difference and the target light leakage compensation parameter; the actual ambient light is the difference between the first ambient photon data and the first ratio.

9. The method according to claim 7, characterized in that, The method further includes: Obtain multiple reference display data for the target area; Acquire sensor data corresponding to each of the reference display data in the target area under no ambient light conditions; Based on the sensor data corresponding to each of the reference display data, determine the screen-on detection data and screen-off detection data corresponding to each of the reference display data; Based on the on-screen detection data and off-screen detection data corresponding to each reference display data, the light leakage compensation parameters corresponding to each reference display data are determined.

10. The method according to claim 4, characterized in that, The step of determining the first ambient photon data corresponding to the current data frame of the target region and the second ambient photon data corresponding to the current black frame of the target region based on at least two ambient photon data in the detection parameters and the corresponding ambient timestamps includes: Based on at least two ambient photon data and the corresponding ambient timestamp in the detection parameters, the fluctuation parameters of multiple ambient photon data corresponding to the current frame of the target area are obtained; Based on at least two ambient photon data points from the detection parameters and the corresponding ambient timestamps, at least one ambient photon data point corresponding to the current data frame of the target region and at least one ambient photon data point corresponding to the current black frame of the target region are determined; wherein, When the fluctuation parameter is less than or equal to a preset fluctuation threshold, the first ambient photon data is the average value of at least one ambient photon data corresponding to the current data frame, and the second ambient photon data is the average value of at least one ambient photon data corresponding to the current black frame; or... When the fluctuation parameter is greater than a preset fluctuation threshold, the first ambient photon data is the maximum ambient photon data among at least one ambient photon data corresponding to the current data frame, and the second ambient photon data is the minimum ambient photon data among at least one ambient photon data corresponding to the current black frame.

11. The method according to claim 1, characterized in that, The display parameters include a first duration corresponding to a pulse width modulation signal at a first level and a second duration corresponding to a pulse width modulation signal at a second level; when the pulse width modulation signal is at the first level, the light-emitting device in the display device is turned off. When the pulse width modulation signal is in the second level state, the light-emitting device in the display device is lit up; The ambient light data includes at least two ambient photon data; wherein, determining the actual ambient light of the display device based on the detection parameters and the display parameters includes: The integration duration of the ambient photon data is obtained; When the first duration is greater than or equal to the integral duration of the ambient photon data, the actual ambient light of the display device is determined based on at least the second duration, the integral duration of each ambient photon data, at least two of the ambient photon data in the detection parameters, and the corresponding ambient timestamp; the actual ambient light is the ambient photon data collected by the ambient light sensor when the pulse width modulation signal in the target area is kept at a first level.

12. An ambient light determining device, characterized in that, A processor used in a display device, the device comprising: An acquisition module is configured to acquire detection parameters from an ambient light sensor in the display device, and to acquire display parameters of the display device; wherein, the detection parameters include at least a stored ambient light data and an ambient timestamp; the ambient light data is acquired by the ambient light sensor based on valid pulses of the frame synchronization signal in the display device, and the ambient timestamp is recorded by the ambient light sensor based on valid pulses of the frame synchronization signal; A determination module is used to determine the actual ambient light of the display device based on the detection parameters and the display parameters.

13. A display device, characterized in that, include: Display screen; An ambient light sensor is used to collect ambient light data corresponding to the effective pulse of the frame synchronization signal of the display device, record the ambient timestamp corresponding to the effective pulse, and store the ambient light data and ambient timestamp corresponding to each effective pulse. The processor is configured to acquire detection parameters from the ambient light sensor in the display device, acquire display parameters of the display device, and determine the actual ambient light of the display device based on the detection parameters and the display parameters.