Methods for determining ambient light information, electronic devices, terminal equipment, and storage media

CN120032589BActive Publication Date: 2026-08-14GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0003]相关技术中,环境光传感器设置在显示屏的下方,环境光传感器检测到的环境光数据会受到显示屏发出的光的影响,导致环境光传感器检测的环境光数据并不能表示真实环境中的环境光数据,进而使得根据环境光传感器检测的环境光数据,调节的显示屏的显示参数的效果不理想

Benefits of technology

[0016]In this embodiment of the application, a first time period and a second time period are determined based on the time periods of the low-level signal and the high-level signal in the PWM signal; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, and the end time of the first time period is later than the end time of the low-level signal; the start time of the second time period is later than the start time of the high-level signal, and the end time of the second time period is earlier than the end time of the high-level signal; the difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold; target ambient light information is determined based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period. Thus, the ambient light data detected in the first time period includes not only the ambient light data corresponding to all low-level signals, but also the ambient light data corresponding to some high-level signals. The ambient light data detected in the second time period only includes the ambient light data corresponding to some high-level signals. Therefore, the target ambient light information determined based on the difference between the first ambient light information in the first time period and the second ambient light information in the second time period can eliminate the interference of light emitted by the display screen, reflect the ambient light data in the real environment, and help to accurately adjust the display parameters of the display screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032589B_ABST
    Figure CN120032589B_ABST
Patent Text Reader

Abstract

This application discloses a method, electronic device, terminal equipment, and storage medium for determining ambient light information. The method includes: determining a first time period and a second time period based on the time periods of a low-level signal and a high-level signal in a pulse width modulation (PWM) signal; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, and the end time of the first time period is later than the end time of the low-level signal; the start time of the second time period is later than the start time of the high-level signal, and the end time of the second time period is earlier than the end time of the high-level signal; the difference between the first duration corresponding to the first time period and the second duration corresponding to the low-level signal is less than or equal to the first threshold; and determining target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, electronic technology, and in particular to a method for determining ambient light information, an electronic device, a terminal device, and a storage medium. 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 parameters of the display based on ambient light information.

[0003] In related technologies, the ambient light sensor is located below the display screen. The ambient light data detected by the ambient light sensor is affected by the light emitted by the display screen, which means that the ambient light data detected by the ambient light sensor cannot represent the actual ambient light data in the environment. Consequently, the display parameters of the display screen adjusted based on the ambient light data detected by the ambient light sensor are not ideal. Summary of the Invention

[0004] This application provides a method for determining ambient light information, an electronic device, a terminal device, and a storage medium.

[0005] In a first aspect, this application provides a method for determining ambient light information, the method comprising:

[0006] Based on the time periods of the low-level signal and the high-level signal in the pulse width modulation (PWM) signal, a first time period and a second time period are determined; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, and the end time of the first time period is later than the end time of the low-level signal; the start time of the second time period is later than the start time of the high-level signal, and the end time of the second time period is earlier than the end time of the high-level signal; the difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold.

[0007] The target ambient light information is determined based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period.

[0008] Secondly, this application provides an electronic device, the electronic device comprising:

[0009] A time period determination unit is used to determine a first time period and a second time period based on the time periods of the low-level signal and the high-level signal in the PWM signal; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, the end time of the first time period is later than the end time of the low-level signal, the start time of the second time period is later than the start time of the high-level signal, the end time of the second time period is earlier than the end time of the high-level signal, and the difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold.

[0010] An ambient light information determination unit is used to determine target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period.

[0011] Thirdly, this application provides a terminal device, the terminal device comprising:

[0012] The display screen has a light-transmitting area for light to pass through, and the display screen is used to display according to PWM signals;

[0013] An ambient light sensor, located below the display screen, is used to detect ambient light data;

[0014] A processor, connected to the ambient light sensor, is used to execute the method described in the first aspect.

[0015] Fourthly, this application provides a computer storage medium storing one or more programs that can be executed by one or more processors to implement the method described in the first aspect.

[0016] In this embodiment of the application, a first time period and a second time period are determined based on the time periods of the low-level signal and the high-level signal in the PWM signal; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, and the end time of the first time period is later than the end time of the low-level signal; the start time of the second time period is later than the start time of the high-level signal, and the end time of the second time period is earlier than the end time of the high-level signal; the difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold; target ambient light information is determined based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period. Thus, the ambient light data detected in the first time period includes not only the ambient light data corresponding to all low-level signals, but also the ambient light data corresponding to some high-level signals. The ambient light data detected in the second time period only includes the ambient light data corresponding to some high-level signals. Therefore, the target ambient light information determined based on the difference between the first ambient light information in the first time period and the second ambient light information in the second time period can eliminate the interference of light emitted by the display screen, reflect the ambient light data in the real environment, and help to accurately adjust the display parameters of the display screen. Attached Figure Description

[0017] The accompanying drawings, which are provided to further illustrate this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application.

[0018] Figure 1 This is a schematic diagram of an image captured by a display screen in PWM dimming mode, provided as an embodiment of this application.

[0019] Figure 2 This application provides a schematic diagram illustrating the timing relationship between a PWM signal and a specified time period.

[0020] Figure 3 A schematic diagram illustrating the implementation process of a method for determining ambient light information provided in an embodiment of this application;

[0021] Figure 4 A schematic diagram illustrating the implementation process of another method for determining ambient light information provided in this application embodiment;

[0022] Figure 5 A schematic diagram illustrating the implementation process of another method for determining ambient light information provided in this application embodiment;

[0023] Figure 6A schematic diagram illustrating the implementation flow of a method for determining target ambient light information based on first ambient light information, second ambient light information, first duration, and third duration, provided in an embodiment of this application.

[0024] Figure 7 A schematic diagram illustrating the relationship between display screen brightness and black frame time is provided in an embodiment of this application.

[0025] Figure 8 A schematic diagram illustrating the timing relationship between a PWM signal, a first time period, and a second time period, provided in an embodiment of this application;

[0026] Figure 9 A schematic diagram illustrating the relationship between backlight level and backlight coefficient provided in this application embodiment;

[0027] Figure 10 A schematic diagram illustrating the timing relationship between another PWM signal, the first time period, and the second time period provided in an embodiment of this application;

[0028] Figure 11 A schematic diagram illustrating the timing relationship between a PWM signal, a first time period, and a second time period, as provided in an embodiment of this application;

[0029] Figure 12 This is a schematic diagram illustrating a fourth and fifth time period provided for an embodiment of this application;

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

[0031] Figure 14 This is a schematic diagram of the hardware entity of a terminal device provided in an embodiment of this application. Detailed Implementation

[0032] The technical solutions of this application will be described in detail below through embodiments and in conjunction with the accompanying drawings. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0033] It should be noted that in this application example, terms such as "first" and "second" are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0034] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0035] In related technologies, a notch area is typically located at the top of a terminal device, where no screen is displayed. An ambient light sensor can be placed within this notch area to detect ambient light data, including brightness and / or color temperature data. The terminal device can then adjust its display based on this data, such as adjusting brightness and / or color temperature and / or gamma. However, due to the need for narrow bezels in terminal devices, the notch area needs to be eliminated to increase the screen-to-body ratio. Therefore, the ambient light sensor needs to be placed under the display. However, an under-display ambient light sensor receives not only light from the external environment but also light leakage from the display. This means the displayed image affects the ambient light data collected by the sensor, thus impacting the detection results of brightness and / or color temperature data in the actual environment. Color temperature is a unit of measurement representing the color components in light, reflecting its warm or cool tone.

[0036] The terminal device in any embodiment of this application may include one or a combination of at least two of the following: Internet of Things (IoT) devices, satellite terminals, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, servers, mobile phones, tablets, computers with wireless transceiver capabilities, handheld computers, desktop computers, personal digital assistants, portable media players, smart speakers, navigation devices, smartwatches, smart glasses, smart necklaces and other wearable devices, learning machines, translation pens, translation machines, point-and-read machines, pedometers, digital TVs, Virtual Reality (VR) terminal devices, Augmented Reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, and wireless terminals in smart cities. Wireless terminals in cities, wireless terminals in smart homes, and vehicles, in-vehicle equipment, in-vehicle modules, wireless modems, handheld devices, customer premises equipment (CPE), and smart home appliances in vehicle networking systems.

[0037] In some implementations, the dimming mode of the display screen can include either a direct current (DC) dimming mode or a pulse width modulation (PWM) dimming mode. DC dimming mode refers to changing the brightness of the display screen by increasing or decreasing circuit power; for example, the brightness can be changed by adjusting the circuit power through voltage or current. PWM dimming mode refers to changing the brightness of the display screen based on the alternation of on and off states. In other words, in PWM dimming mode, each pixel in the display screen does not continuously emit light, but constantly switches between on and off states, so that the human eye perceives the brightness of the display screen as the desired target brightness. Specifically, the longer the duration of the off state of each pixel in the display screen, the lower the perceived brightness of the display screen. The shorter the duration of the off state of each pixel in the display screen, the higher the perceived brightness of the display screen. It is understood that due to their different dimming principles, DC dimming mode and PWM dimming mode have different characteristics. Therefore, a display screen can be configured with both dimming modes, and the appropriate dimming mode needs to be selected according to the display scenario to improve display quality. It is understood that in other embodiments, the display screen may be configured with only one dimming mode and dimming in all display scenarios using that dimming mode.

[0038] Figure 1 This application provides an embodiment of an image captured from a display screen in PWM dimming mode, as shown in the diagram. Figure 1 As mentioned above, when shooting a display screen in PWM dimming mode at an extremely fast shutter speed, it is possible to obtain... Figure 1 The image shown is a schematic diagram. It depicts some of the light-emitting devices on the display screen being lit, while the remaining devices are off. The lighting and extinguishing of these devices are controlled by a PWM signal, and each device receives a slightly different PWM signal at any given moment, resulting in the observed effect. Figure 1 The stripes shown are of varying shapes, and the positions of the black stripes shift over time. It should be noted that... Figure 1 In the illustrated embodiments, diagonal stripes are shown. In other embodiments, horizontal or vertical stripes may be shown. This application does not limit the embodiments in this regard.

[0039] In this image, the black striped areas correspond to light-emitting devices that are currently receiving a low-level PWM signal. These devices do not emit light, resulting in a black frame. The remaining areas correspond to light-emitting devices that are currently receiving a high-level PWM signal. These devices emit light, and the brightness corresponds to the desired display, resulting in a data frame. For example, if the display refresh rate is 60Hz and the PWM signal frequency is 360Hz, then the image will display as... Figure 1 The image shows six black bars. For example, if the display refresh rate is 60Hz and the PWM signal frequency is 480Hz, it will display eight black bars. It should be noted that... Figure 1 The number of stripes shown is for illustrative purposes only and is not intended to limit the scope of protection of this application.

[0040] In PWM dimming mode, the light-emitting device in the light-transmitting area is in an illuminating state for part of the time and an off state for part of the time. Accordingly, if the ambient light sensor collects data when the light-emitting device in the light-transmitting area is off, the data collected by the ambient light sensor will not be affected by the display screen. In DC dimming mode, the photosensitive data collected when the light-emitting device in the light-transmitting area is in an illuminating state can be compared with the photosensitive data collected when the light-transmitting device is in a reset state. Based on the comparison result, the influence of light leakage from the display screen on the sensing results can be eliminated. Therefore, by selecting different time periods based on different dimming modes, appropriate time periods can be selected for collecting photosensitive data, and accurate ambient light data can be obtained through corresponding analysis and processing.

[0041] The duty cycle of the PWM signal is related to the target brightness to be displayed. A low-level PWM signal controls the light-emitting devices in the display to show a black frame, while a high-level PWM signal controls the light-emitting devices to show a data frame. For example, if the target brightness to be displayed is 1 nit, and the data frame brightness is 4 nits, the duty cycle of the PWM signal can be controlled to 25%. That is, in one PWM signal cycle, 1 / 4 of the time is used to display 4 nits of brightness, and 3 / 4 of the time is used to display 0 nits of brightness. Therefore, as long as the brightness switching speed is faster than the speed perceptible to the human eye, the human eye will perceive a 1-nit brightness image. Similarly, if the target brightness to be displayed is 2 nits, and the data frame brightness is 4 nits, the duty cycle of the PWM signal can be controlled to 50%. That is, in one PWM signal cycle, 1 / 2 of the time is used to display 4 nits of brightness, and 1 / 2 of the time is used to display 0 nits of brightness. Therefore, as long as the brightness switching speed is faster than the speed perceptible to the human eye, the human eye will perceive a 2-nit brightness image. Therefore, for PWM dimming mode, different target brightness can be perceived by the human eye by adjusting the duty cycle of the PWM signal without changing the brightness of the data frame.

[0042] Based on the aforementioned display principles, if the display requires lower brightness, the duration of the black frame displayed by PWM needs to be relatively long. Conversely, if the display requires higher brightness, the duration of the black frame displayed by PWM needs to be relatively short. It's understandable that if the duration of the black frame displayed by PWM is too short, i.e., the duty cycle of the PWM signal is too high, the ambient light sensor will not be able to collect enough light-sensing data within a single black frame, thus failing to obtain accurate ambient light data. Therefore, it is necessary to further configure the time period selection method according to the sensitivity of the ambient light sensor to improve the accuracy of the color temperature detection results.

[0043] Figure 2 This application provides a schematic diagram illustrating the timing relationship between a PWM signal and a specified time period, as shown in the embodiments of the present application. Figure 2As shown, the frequency of the screen synchronization signal is the same as the refresh rate of the display screen, and the duty cycle of the PWM signal corresponds to the width of the black frame period (i.e., the period of the low-level signal), used to adjust the brightness of different modes in PWM dimming mode. The specified period can also be called the specified integration period. The ALS integration sampling signal is the signal that controls the ambient light sensor to perform integration sampling. The part filled with slashes represents the specified period (i.e., the period corresponding to als1). als1 is determined based on one or more ambient light data collected during the specified period. For example, als1 is any one of the sum, average, maximum, minimum, median, or mode of one or more ambient light data collected during the specified period. In this embodiment, when the duty cycle is less than the duty cycle threshold, that is, when the width corresponding to the black frame period is greater than the width threshold, sufficient ambient light can be collected during the black frame period of the display screen, thus realizing the low-light black frame stage algorithm. Figure 2 In this system, ALS1 can acquire ambient light information free from display interference. Based on the ambient light data collected by the ambient light sensor within a specified time period—for example, when ALS1 information includes color information, i.e., ALS1 is (R1, G1, B1) or (X1, Y1, Z1), or other channel combinations—pure ambient light data can be obtained, thereby determining the ambient light data in the real environment (i.e., the target ambient light information). Furthermore, within one refresh cycle of the display screen, for example, it can be as follows... Figure 2 The example shown uses six specified time periods to obtain more accurate initial photosensitive data. It is understood that in other embodiments, data may be acquired from only two, four, or other specified time periods.

[0044] exist Figure 2 In the corresponding embodiment, the figure shows that when the screen is 60Hz, there are 6 black bars, that is, 6 sets of als1 and als2 can be obtained per frame. By accumulating als1 for a sufficient time, enough ambient light information can be obtained. In addition, the short integration time (i.e. the duration corresponding to als1) must be less than the width of the black frame, otherwise als1 will be interfered with by the screen light, which will cause the algorithm to fail.

[0045] exist Figure 2 In a corresponding embodiment, the start time of each specified time period is later than the start time of the corresponding low-level signal time period, and the end time of each specified time period is earlier than the end time of the corresponding low-level signal time period.

[0046] Figure 2 The corresponding embodiment is an embodiment where the width of the black frame period is greater than a width threshold, which determines the ambient light data in the real environment. However, as the brightness required by the display screen continues to increase, the duration of the black frame period gradually shortens. Therefore, when the duty cycle is not small enough or the device sensitivity is insufficient to support a shorter target time, Figure 2The method in the embodiments is no longer applicable, so the solution of the present application embodiment is proposed. That is, the scenario to which this application applies is: when the width corresponding to the black frame period is less than or equal to the width threshold, and the ambient light sensor cannot collect ambient light data or collects less ambient light data during the black frame period of the display screen, how to determine the ambient light data (i.e., target ambient light information) in the real environment.

[0047] It should be noted that the method for determining ambient light information in this application embodiment can be applied to a display screen with only PWM dimming mode, or it can be applied to a display screen with both PWM dimming mode and DC dimming mode. This application embodiment does not limit the application.

[0048] The following describes some embodiments of this application:

[0049] Figure 3 This is a schematic diagram illustrating the implementation process of a method for determining ambient light information provided in an embodiment of this application, as shown below. Figure 3 As shown, this method is applied to a terminal device, and the method includes:

[0050] S301. Determine the first time period and the second time period based on the time periods of the low-level signal and the high-level signal in the PWM signal.

[0051] The PWM signal is used to control the display screen. The start time of the first time period is earlier than the start time of the low-level signal, and the end time of the first time period is later than the end time of the low-level signal. The start time of the second time period is later than the start time of the high-level signal, and the end time of the second time period is earlier than the end time of the high-level signal. The difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold.

[0052] S302. Determine the target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period.

[0053] In any embodiment of this application, the first time period may also be referred to as the first integration time period, the second time period may also be referred to as the second integration time period, and the third time period described below may also be referred to as the third integration time period.

[0054] In some embodiments, the PWM signal is a periodic signal. Within one PWM cycle, the PWM signal may include a low-level signal and a high-level signal. In some embodiments, the low-level signal is used to control the display screen to not emit light or display a black frame, and the high-level signal is used to control the display screen to emit light or display a data frame. In some embodiments, the low-level signal is used to control one or more rows of pixels, or one or more columns of pixels, to not emit light or display a black frame, and the high-level signal is used to control other areas of the display screen to emit light or display a data frame. Exemplarily, multiple rows of pixels can be consecutive, non-consecutive, or partially consecutive. Exemplarily, multiple columns of pixels can be consecutive, non-consecutive, or partially consecutive. For example, at one moment, the low-level signal in the PWM signal is used to control the 256N to 256N+M rows / columns of the display screen to display a black frame. N is an integer greater than or equal to 0, M is an integer greater than or equal to 0, where 256N+M is less than or equal to the total number of rows or columns of pixels on the display screen.

[0055] In some embodiments, the photosensitive area of ​​the ambient light sensor may correspond to a specific area of ​​the display screen, and the specific area may correspond to at least one row of pixels and / or at least one column of pixels. In some embodiments, unless otherwise specified, the PWM signal in this application refers to a PWM signal used to control the display of a specific area of ​​the display screen, or a PWM signal used to control the display of a certain pixel, a row of pixels, or a column of pixels in a specific area of ​​the display screen. In some embodiments, when at least one row of pixels includes at least two rows of pixels, the at least two rows of pixels are consecutive. In some embodiments, when at least one column of pixels includes at least two columns of pixels, the at least two columns of pixels are consecutive.

[0056] In some embodiments, one PWM cycle corresponds to one first time period and one second time period. For example, P PWM cycles correspond to P first time periods and P second time periods, where P is an integer greater than or equal to 1. In other embodiments, multiple PWM cycles correspond to one first time period and one second time period. For example, every Q PWM cycles correspond to one first time period and one second time period. For example, P × Q PWM cycles correspond to P first time periods and P second time periods, where Q is an integer greater than or equal to 2. Yet another example is that the first PWM cycle in every Q PWM cycles corresponds to one first time period and one second time period.

[0057] In some embodiments, a first time period and a second time period each correspond to one PWM cycle. In other embodiments, a first time period corresponds to one PWM cycle, and a second time period corresponds to another PWM cycle, and these two PWM cycles may be adjacent or separated by at least one PWM cycle.

[0058] In some embodiments, the PWM signal can be a PWM signal with one PWM cycle, and the corresponding first time period and second time period are: a first time period and a second time period corresponding to the PWM signal with one PWM cycle. In some embodiments, the PWM signal can be a PWM signal with P PWM cycles, and the corresponding first time period and second time period are: P first time periods and P second time periods corresponding to the PWM signal with P PWM cycles. In some embodiments, the PWM signal can be a PWM signal with P×Q PWM cycles, and the corresponding first time period and second time period are: P first time periods and P second time periods corresponding to the P×Q PWM cycles.

[0059] In some embodiments, the first time period and the second time period may be consecutive. For example, the end time of the first time period is the same as the start time of the second time period. In other embodiments, the first time period and the second time period may be discontinuous. For example, the end time of the first time period is spaced apart from the start time of the second time period.

[0060] In some embodiments, the first difference between the start time of the low-level signal and the start time of the first time period may be the same as the second difference between the end time of the first time period and the end time of the low-level signal. In other embodiments, the first difference may be different from the second difference. For example, the first difference may be greater than or less than the second difference.

[0061] In some embodiments, the third difference between the start time of the second time period and the start time of the high-level signal may be the same as the fourth difference between the end time of the high-level signal and the end time of the second time period. In other embodiments, the third difference may be different from the fourth difference. For example, the third difference may be greater than or less than the fourth difference.

[0062] In some embodiments, the first difference may be the same as the third difference. In other embodiments, the first difference may be different from the third difference. For example, the first difference may be greater than or less than the third difference. In some embodiments, the second difference may be the same as the fourth difference. In other embodiments, the second difference may be different from the fourth difference. For example, the second difference may be greater than or less than the fourth difference.

[0063] In some embodiments, the first threshold should be greater than 0.

[0064] In some embodiments, the first threshold can be a relatively small value. In some embodiments, the first threshold can be one or more clock cycles. For example, the first threshold can be one clock cycle, two clock cycles, four clock cycles, ten clock cycles, or twenty clock cycles, etc.

[0065] In some embodiments, the first threshold can be determined based on a second duration corresponding to the period of the low-level signal. For example, the first threshold can be equal to the second duration. Alternatively, the first threshold can be greater than the second duration. Exemplarily, the first threshold can be an integer multiple of the second duration, such as 1.5 times, 2 times, 4 times, or 5 times. Alternatively, the first threshold can be less than the second duration. Exemplarily, the first threshold can be a preset value multiplied by the second duration, where the preset value is greater than 0 and less than 1; for example, the first threshold can be 1 / 8, 1 / 4, or 1 / 2 of the second duration, etc.

[0066] In some embodiments, the first threshold may be less than or equal to 500 μs (microseconds). For example, the first threshold may be 100 μs, 200 μs, 300 μs, or 500 μs, etc.

[0067] In some embodiments, the first ambient light information for the first time period can be determined based on at least one ambient light data collected by an ambient light sensor during the first time period. For example, the first ambient light information for the first time period can be the accumulated value of at least one ambient light data collected during the first time period. Another example is that the first ambient light information for the first time period can be the maximum value of at least one ambient light data collected during the first time period. Yet another example is that the first ambient light information for the first time period can be the average, mode, or median of at least one ambient light data collected during the first time period, etc.

[0068] In some embodiments, the second ambient light information for the second time period can be determined based on at least one ambient light data collected by the ambient light sensor during the second time period. For example, the second ambient light information for the second time period can be the accumulated value of at least one ambient light data collected during the second time period. Another example is that the second ambient light information for the second time period can be the maximum value of at least one ambient light data collected during the second time period. Yet another example is that the second ambient light information for the second time period can be the mean, mode, or median of at least one ambient light data collected during the second time period, etc.

[0069] In some embodiments, the ambient light sensor may send at least one ambient light data collected in a first time period and at least one ambient light data collected in a second time period to the processor, so that the processor determines first ambient light information for the first time period and second ambient light information for the second time period. In other embodiments, the ambient light sensor may determine the first ambient light information for the first time period and the second ambient light information for the second time period, and send the first ambient light information for the first time period and the second ambient light information for the second time period to the processor.

[0070] In any embodiment of this application, a first time period has a corresponding second time period. In some embodiments, a first time period and a corresponding second time period do not overlap. In other embodiments, a first time period and a corresponding second time period may partially overlap.

[0071] In some embodiments, target ambient light information can be determined based on first ambient light information of a first time period, second ambient light information of a corresponding second time period, first duration of the first time period, and third duration of the second time period.

[0072] In other embodiments, target ambient light information can be determined based on first ambient light information of multiple first time periods, second ambient light information of multiple corresponding second time periods, first duration of the multiple first time periods, and third duration of the multiple second time periods. For example, multiple ambient light information can be determined based on the first ambient light information of each first time period, the second ambient light information of each corresponding second time period, the first duration of each first time period, and the third duration of each second time period, and the target ambient light information can be determined based on the multiple ambient light information. Exemplarily, the target ambient light information can be any one of the average, maximum, minimum, median, and mode of the multiple ambient light information.

[0073] In any embodiment of this application, ambient light data may include color temperature data and / or ambient light brightness data. The color temperature data may include values ​​from three channels, or values ​​from four channels, or values ​​from other numbers of color channels. Values ​​from three channels may include values ​​from the red channel, the green channel, and the blue channel, represented numerically as (R, G, B) or (X, Y, Z). Values ​​from four channels may include values ​​from the red channel, the green channel, the blue channel, and the white channel, or may include values ​​from the red channel, the green channel, the blue channel, the white channel, and the ultraviolet (UV) channel.

[0074] In some embodiments, the target ambient light information is the ambient light information in the real environment determined by the terminal device. In some embodiments, when the ambient light data includes color temperature data, at least one of the first ambient light information, the second ambient light information, and the target ambient light information also includes color temperature data. In some embodiments, when the ambient light data includes ambient light luminance data, at least one of the first ambient light information, the second ambient light information, and the target ambient light information also includes ambient light luminance data. In some embodiments, when the ambient light data includes both color temperature data and ambient light luminance data, at least one of the first ambient light information, the second ambient light information, and the target ambient light information also includes both color temperature data and ambient light luminance data.

[0075] In some embodiments, after S302, the method further includes: adjusting the display of the display screen according to the target ambient light information. For example, adjusting the color temperature and / or brightness of the display screen according to color temperature data and / or ambient light brightness data in the target ambient light information.

[0076] In some embodiments, the terminal device can determine a target ambient light brightness information (referred to as target ambient light brightness information 1) and adjust the display of the screen according to the target ambient light brightness information 1. Furthermore, the terminal device will continuously acquire subsequently determined target ambient light brightness information. If the difference between the subsequently acquired target ambient light brightness information (referred to as target ambient light brightness information 2) and target ambient light brightness information 1 is greater than or equal to a preset threshold, the display of the screen will be adjusted according to target ambient light brightness information 2. In this way, as time goes by, the terminal device can adjust the display of the screen when the target ambient light brightness information changes to a certain extent. This not only allows for timely adjustment of the display of the screen, but also ensures that adjustment is only performed when the difference between target ambient light brightness information 1 and target ambient light brightness information 2 is greater than or equal to the preset threshold. This avoids additional power consumption of the terminal device due to frequent adjustment of the display of the screen, and also avoids eye discomfort caused by frequent adjustment of the display of the screen.

[0077] In this embodiment of the application, a first time period and a second time period are determined based on the time periods of the low-level signal and the high-level signal in the PWM signal; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, and the end time of the first time period is later than the end time of the low-level signal; the start time of the second time period is later than the start time of the high-level signal, and the end time of the second time period is earlier than the end time of the high-level signal; the difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold; target ambient light information is determined based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period. Thus, the ambient light data detected in the first time period includes not only the ambient light data corresponding to all low-level signals, but also the ambient light data corresponding to some high-level signals. The ambient light data detected in the second time period only includes the ambient light data corresponding to some high-level signals. Therefore, the target ambient light information determined based on the difference between the first ambient light information in the first time period and the second ambient light information in the second time period can eliminate the interference of light emitted by the display screen, reflect the ambient light data in the real environment, and help to accurately adjust the display parameters of the display screen.

[0078] In some embodiments, the first duration is different from the third duration. In other embodiments of this application, the first duration may be the same as the third duration.

[0079] In some embodiments, the first duration is shorter than the third duration. In other embodiments of this application, the first duration may be longer than the third duration.

[0080] In some embodiments, the sum of the first duration and the third duration is the same as the period of the PWM signal.

[0081] In some embodiments, the sum of the first duration and the third duration is less than the period of the PWM signal.

[0082] It should be noted that, in the embodiments of this application, different schemes can be combined with each other without conflict. For example, one embodiment is that the sum of the first duration and the third duration is the same as the period of the PWM signal, and the first duration is less than the third duration. Another example is that the sum of the first duration and the third duration is less than the period of the PWM signal, and the first duration can be greater than, less than, or equal to the third duration. This application does not limit the embodiments obtained by combining these methods.

[0083] Figure 4 This is a schematic diagram illustrating the implementation process of another method for determining ambient light information provided in an embodiment of this application, as shown below. Figure 4 As shown, this method is applied to a terminal device. This method is applicable to situations where the sum of the first duration and the third duration is less than the period of the PWM signal. The method includes:

[0084] S401. Determine the first time period and the second time period based on the time periods of the low-level signal and the high-level signal in the PWM signal.

[0085] S402. During the first time period and the second time period, the ambient light sensor is controlled to detect ambient light data, and the first ambient light information and the second ambient light information are determined based on the ambient light data.

[0086] The methods for determining the first ambient light information and the second ambient light information can be referred to the relevant descriptions above, and will not be repeated here.

[0087] S403. In the third time period, control the ambient light sensor to enter a sleep state; the third time period is the period outside the first and second time periods in the target time period, the start time of the target time period is the start time of the first time period, and the duration of the target time period is the period of the PWM signal.

[0088] S404. Determine the target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period.

[0089] During implementation, a target time period may include a first time period, a second time period, and a third time period. The first time period and the second time period may be continuous or discontinuous, and the third time period is a time period within the target time period other than the first time period and the second time period. In some embodiments, the third time period may be continuous or discontinuous.

[0090] In some embodiments, each PWM cycle can correspond to a target time period. In this way, multiple target time periods are consecutive time periods.

[0091] In other embodiments, multiple PWM cycles may correspond to a target time period. For example, each set of multiple PWM cycles may correspond to a target time period. For example, the first PWM cycle in a set of multiple PWM cycles may correspond to a target time period.

[0092] In some embodiments, the multiple target time periods are periodic or aperiodic.

[0093] It should be noted that if a PWM cycle corresponds to a target time period, the duration of the PWM cycle and the target time period are the same, but the start time of the PWM cycle and the start time of the target time period can be the same or different.

[0094] In some embodiments, the first and second time periods within a target time period can be consecutive, meaning the end time of the first time period is the same as the start time of the second time period. In other embodiments, the first and second time periods within a target time period can be spaced out by a duration; for example, the difference between the start time of the second time period and the end time of the first time period can be a specific duration.

[0095] In some embodiments, the durations of the first and second time periods within a target time period may be the same or different. In some embodiments, the duration of the third time period may be greater than, less than, or equal to the duration of the first time period. In some embodiments, the duration of the third time period may be greater than, less than, or equal to the duration of the second time period. For example, in one implementation, the durations of the first and second time periods within a target time period are the same, both being T1, while the duration of the third time period may be R times the duration of the first time period, where R is an integer greater than or equal to 1. For example, the duration of the third time period may be T1, 2T1, 3T1, 4T1, 5T1, 7T1, etc., and this application embodiment does not impose any limitations on this.

[0096] In this embodiment, since the processor of the terminal device controls the ambient light sensor to detect ambient light data during the first and second time periods, and controls the ambient light sensor to go into sleep mode during the third time period, the working time of the ambient light sensor can be reduced, which is beneficial to reducing the power consumption of the terminal device.

[0097] In some embodiments, the absolute value of the difference between the first duration and the third duration is greater than or equal to 0 and less than or equal to a second threshold.

[0098] In some embodiments, the second threshold can be a relatively small value. In some embodiments, the second threshold can be one or more clock cycles. For example, the second threshold can be one clock cycle, two clock cycles, four clock cycles, ten clock cycles, or twenty clock cycles, etc.

[0099] In some embodiments, the second threshold can be determined based on a second duration corresponding to the period of the low-level signal. For example, the second threshold can be equal to the second duration. Alternatively, the second threshold can be greater than the second duration. Exemplarily, the second threshold can be an integer multiple of the second duration, such as 1.5 times, 2 times, 4 times, or 5 times. Alternatively, the second threshold can be less than the second duration. Exemplarily, the second threshold can be a preset value multiplied by the second duration, where the preset value is greater than 0 and less than 1; for example, the second threshold can be 1 / 8, 1 / 4, or 1 / 2 of the second duration, etc.

[0100] In some embodiments, the second threshold may be greater than or equal to 0 μs and less than or equal to 500 μs. For example, the second threshold may be 0 μs, 100 μs, 200 μs, 300 μs, or 500 μs, etc.

[0101] In some embodiments, the period of the first time period is the same as the period of the PWM signal, and the period of the second time period is the same as the period of the PWM signal.

[0102] Figure 5 A schematic diagram illustrating the implementation process of another method for determining ambient light information provided in this application embodiment is shown below. Figure 5 As shown, this method is applied to terminal devices, and this method is suitable for... Figure 4 In any embodiment other than the corresponding embodiment, the method includes:

[0103] S501. Based on the time periods of the low-level signal and the high-level signal in the PWM signal, determine multiple consecutive time periods; the total duration of the multiple consecutive time periods is the same as the period of the PWM signal.

[0104] S502. Determine the first time period and the second time period from the consecutive multiple time periods.

[0105] S503. In each of the plurality of time periods, the ambient light sensor is controlled to detect ambient light data, and ambient light information for each time period is determined based on the ambient light data corresponding to each time period; the ambient light information for each of the plurality of time periods includes the first ambient light information and the second ambient light information.

[0106] S504. Determine the target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period.

[0107] In some embodiments, a series of consecutive time periods may correspond to a PWM cycle.

[0108] In some embodiments, each PWM cycle may correspond to a series of consecutive time periods.

[0109] In other embodiments, multiple PWM cycles may correspond to a series of consecutive time periods. For example, each set of multiple PWM cycles may correspond to a series of consecutive time periods. For example, the first PWM cycle in each set of multiple PWM cycles may correspond to a series of consecutive time periods.

[0110] It should be noted that if a PWM cycle corresponds to a series of consecutive time periods, the total duration of the PWM cycle and the series of consecutive time periods is the same, but the start time of the PWM cycle and the start time of the series of consecutive time periods can be the same or different.

[0111] In some embodiments, the durations of different time periods within a series of consecutive time periods may be the same or different. For example, a series of consecutive time periods may include five time periods, all of which have the same duration. Alternatively, a series of consecutive time periods may include four time periods, where at least two of these four time periods have different durations.

[0112] In some embodiments, the first time period in a series of consecutive time periods is a first time period. In some embodiments, the second time period in a series of consecutive time periods is a second time period. In other embodiments, the second time period in a series of consecutive time periods is separated from the first time period by at least one time period. For example, the second time period may be the third or fourth time period in a series of consecutive time periods, etc.

[0113] In some embodiments, the ambient light information for each time period can be determined based on at least one ambient light data collected by the ambient light sensor in each time period. For example, the ambient light information for each time period can be the cumulative value of at least one ambient light data collected in each time period. Another example is that the ambient light information for each time period can be the maximum value of at least one ambient light data collected in each time period. Yet another example is that the ambient light information for each time period can be the mean, mode, or median of at least one ambient light data collected in each time period, etc.

[0114] In some embodiments, the ambient light information for each time period can be determined based on at least one ambient light data collected by the ambient light sensor in each time period. For example, the ambient light information for each time period can be the cumulative value of at least one ambient light data collected in each time period. Another example is that the ambient light information for each time period can be the maximum value of at least one ambient light data collected in each time period. Yet another example is that the ambient light information for each time period can be the mean, mode, or median of at least one ambient light data collected in each time period, etc.

[0115] In some embodiments, the ambient light sensor may send at least one ambient light data collected in each time period to the processor, so that the processor can determine the ambient light information for each time period. In other embodiments, the ambient light sensor may determine the ambient light information for each time period and send the ambient light information for each time period to the processor.

[0116] Figure 6 This application provides a schematic diagram of the implementation process of a method for determining target ambient light information based on first ambient light information, second ambient light information, a first duration, and a third duration, as illustrated in the embodiments of this application. Figure 6 As shown, this method is applied to a terminal device. This method is applicable to any of the above embodiments. The method is executed after determining the first time period, the second time period, the first ambient light information, and the second ambient light information. The method includes:

[0117] S601. Obtain the target correspondence; the target correspondence includes a one-to-one correspondence between multiple backlight brightness levels and the duration of multiple low-level signals.

[0118] In some embodiments, the target mapping relationship can be stored in the terminal device. In some embodiments, the target mapping relationship can be configured to the terminal device before it leaves the factory. In other embodiments, the target mapping relationship can be configured to the terminal device when system parameters are updated.

[0119] In some embodiments, the duration of the low-level signal varies depending on the backlight brightness level. In some embodiments, the higher the backlight brightness level, the shorter the duration of the corresponding low-level signal, and vice versa.

[0120] S602. Determine the second duration based on the current backlight brightness level of the display screen and the correspondence with the target.

[0121] In some embodiments, the current backlight brightness level of the display may include multiple backlight brightness levels.

[0122] S603. Determine the target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, the third duration corresponding to the second time period, and the second duration.

[0123] In some embodiments, determining the target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period includes:

[0124] The target ambient light information is determined according to the following formulas: als1=A×T1+P×(T1-T0); als2×(T1 / T2)=A×T1+P×T1; or,

[0125] The target ambient light information is determined according to the following formula: A = [als2 × (T1 - T0) - als2 × T2] / [T2 × (2T2 - T0)];

[0126] Wherein, als1 represents the first ambient light information, als2 represents the second ambient light information, A represents the target ambient light information, T1 represents the first duration, P represents the screen light information, T0 represents the second duration, and T2 represents the third duration.

[0127] During implementation, the target ambient light information can be determined by solving the two linear equations als1=A×T1+P×(T1-T0);als2×(T1 / T2)=A×T1+P×T1.

[0128] This embodiment illustrates how target ambient light information is determined using a first duration and a corresponding second duration. It should be noted that in other embodiments, multiple first durations and multiple corresponding second durations can be used to determine multiple ambient light brightness information respectively, and then the target ambient light information is determined based on the multiple ambient light brightness information.

[0129] Figure 7 This application provides a schematic diagram illustrating the relationship between display screen brightness and black frame time, as shown in the embodiment of the present application. Figure 7 As shown in regions 1 and 2, as the display brightness (in nits) gradually decreases, the black frame time (in μs) gradually decreases, meaning the PWM duty cycle gradually decreases. When the duty cycle is not high enough or the device sensitivity is insufficient to support a shorter integration time, Figure 2 The method in the corresponding embodiment is no longer applicable. Figure 7 In this diagram, regions 1 and 2 are PWM regions, and region 3 is a DC region or a fixed PWM width region. In some embodiments, the fixed PWM width region is suitable for Low Temperature Polycrystalline Oxide (LTPO) + Adaptive Dynamic Frame Rate (ADFR) screens. In some embodiments, some displays cannot use either region 2 or region 3. Figure 2 The method of the corresponding embodiment. In some embodiments, some displays may be used in region 1, region 2, or region 3. Figure 2 The method of the corresponding embodiment.

[0130] When the width of the PWM black frame is insufficient to support Figure 2 The corresponding implementation method requires a new algorithm to determine the target ambient light information. Three implementation methods are described below:

[0131] Implementation Method 1:

[0132] Figure 8 A schematic diagram illustrating the timing relationship between a PWM signal, a first time period, and a second time period is provided as an embodiment of this application. Figure 8 As shown, the frequency of the screen synchronization signal is the same as the refresh rate of the display screen, and the duty cycle of the PWM signal corresponds to the width of the black frame period (i.e., the period of the low-level signal), used to adjust the brightness of different modes in PWM dimming mode. In each PWM cycle, the black frame period of the PWM signal is within the first period (the period corresponding to als1), or in other words, the first period completely covers the black frame period of the PWM signal. The second period (the period corresponding to als2) is within the data frame period of the PWM signal (also known as the period of screen illumination), or in other words, the data frame period of the PWM signal completely covers the second period. The black frame period is the period during which the light-emitting devices in the light-transmitting area display the black frame image, and the data frame period is the period during which the light-emitting devices in the light-transmitting area display the data frame image. Figure 8 In the corresponding embodiment, the duration of the first time period is the same as the duration of the second time period.

[0133] pass Figure 8 The following formulas are satisfied: als1=A×T1+P×(T1-T0); als2=A×T2+P×T2. Setting T1=T2=T, we can obtain P=(als2-als1) / T0, A=als2 / T-(als2-als1) / T×K, K=T / T0. Therefore, given K, A can be determined.

[0134] Where als1 is the first ambient light information of the first time period, als2 is the second ambient light information of the second time period, A is the target ambient light information (Ambient light), T1 is the duration of the first time period, P is the screen light information (Panelleak light), T2 is the duration of the second time period, and T0 is the duration of the black frame period.

[0135] When the target ambient light intensity is 0, i.e., A = 0, according to als2 = A × T2 + P × T2 and T1 = T2 = T, we can obtain als2. (A=0) =P×T, and combining P=(als2-als1) / T0 and K=T / T0, we get K=als2 (A=0) / (als2-als1).

[0136] Figure 9 A schematic diagram illustrating the relationship between backlight level and backlight coefficient is provided for an embodiment of this application, as shown below. Figure 9 As shown, thus, through Figure 9 The corresponding curve, K = f(B), where B refers to the backlight brightness level and K is the backlight coefficient, allows us to obtain the backlight coefficient corresponding to each backlight level.

[0137] In this way, the current backlight brightness level of the display screen and the preset backlight coefficient corresponding to the current backlight brightness level can be obtained; based on the current preset backlight coefficient, the first ambient light information of the first time period, the second ambient light information of the second time period, the duration of the first time period, and the duration of the second time period, the target ambient light information can be obtained; wherein, the duration of the first time period and the duration of the second time period are the same, both being T. For example, through Figure 9 The corresponding curve determines the preset backlight coefficient corresponding to the current backlight brightness level. Based on the preset backlight coefficient and the formula A=als2 / T-(als2-als1) / T×K, A can be obtained, where K in A=als2 / T-(als2-als1) / T×K is the preset backlight coefficient.

[0138] Taking A as an example, where A includes color information (R1, G1, B1) or (X1, Y1, Z1), or other channel combinations, pure ambient light color information can be obtained, and then the ambient color temperature can be calculated using A. This algorithm is applicable not only to gradient areas but also to scenarios with fixed PWM width (LTPO+ADFR screens).

[0139] Implementation Method Two:

[0140] In Implementation Method 1, T1 = T2 = T needs to be set. However, in practical applications, T1 and T2 may not be equal. For example, technicians have found that in some scenarios, the duration of the black frame period is very short. Therefore, the difference between als1 and als2 determined according to Implementation Method 1 is very small. Due to limitations in computational precision, the calculated signal-to-noise ratio is low, and the value of als2 - als1 may be 0, leading to inaccurate calculation of the target ambient light information. Therefore, setting T1 and T2 to be unequal results in a larger difference between als2 and als1, thus leading to Implementation Method 2.

[0141] The difference between Implementation Method 2 and Implementation Method 1 is that T1 is not equal to T2. Thus, Implementation Method 2 only needs to satisfy the following conditions: the integration time T1 of als1 and the integration time T2 of als2 are added together to equal one PWM cycle; during the integration time of als1 and als2, the time period corresponding to als1 includes the black frame time period.

[0142] Figure 10 A schematic diagram illustrating the timing relationship between another PWM signal, the first time period, and the second time period provided in this application embodiment is shown below. Figure 10 As shown, Figure 10 and Figure 8 The difference between the corresponding embodiments is: Figure 8 In the middle, T1 = T2, in Figure 10 In this context, T1 is not equal to T2. Figure 10 and Figure 8 The common feature of the corresponding embodiments is that the PWM duty corresponds to als1 and als2, where the sum of the durations of als1 and als2, i.e., T1+T2, is the period corresponding to the PWM duty.

[0143] During the calculation, new_als2 = als2 × (T1 / T2) is set, where the duration corresponding to als2 is T2, and the duration corresponding to new_als2 is the same as T1.

[0144] Thus, through Figure 10 The following formulas are satisfied: als1=A×T1+P×(T1-T0); als2×(T1 / T2)=A×T1+P×T1.

[0145] Where als1 is the first ambient light information of the first time period, als2 is the second ambient light information of the second time period, A is the target ambient light information (Ambient light), T1 is the duration of the first time period, P is the screen light information (Panelleak light), T2 is the duration of the second time period, and T0 is the duration of the black frame period.

[0146] In some embodiments, a target correspondence can be obtained; the target correspondence includes a one-to-one correspondence between multiple backlight brightness levels and the duration (black frame duration) of multiple low-level signals; the black frame duration (i.e., T0) is determined based on the current backlight brightness level of the display screen and the target correspondence.

[0147] Thus, by solving the two linear equations als1 = A × T1 + P × (T1 - T0) and als2 × (T1 / T2) = A × T1 + P × T1, we can obtain A (i.e., the target ambient light information). For example, by eliminating P from the above formula, we can obtain A = [als2 × (T1 - T0) - als2 × T2] / [T2 × (2T2 - T0)].

[0148] Implementation Method 3:

[0149] Technicians discovered that in some scenarios, the duration of the black frame period is very short. If the value of als2-als1 needs to be as large as possible, the duration of T1 needs to be as close as possible to the duration of the black frame. However, this presents a problem: if the duration of T1 is as close as possible to the duration of the black frame, and the duration of the black frame is very short, the value of als1 will be very small. Due to the limitation of calculation precision, the signal-to-noise ratio of the calculation is low and the compensation precision is insufficient. Therefore, implementation method three was proposed.

[0150] In the third implementation method, it is not limited to performing only two light sensor values ​​in a single PWM duty. Instead, multiple integrations can be performed, and then only two or more of these integrations can be selected for calculation.

[0151] Figure 11 A schematic diagram illustrating the timing relationship between another PWM signal, the first time period, and the second time period provided in this application embodiment is shown below. Figure 11 As shown, five light sensor data points are acquired within a PWM duty cycle, with acquisition times of T1, T2, T3, T4, and T5. The times T1 through T5 can be equal or unequal, and the total time (T1 + T2 + T3 + T4 + T5) equals the PWM duty time. Only a few data points are selected for calculation. For example, the als values ​​corresponding to T1 and T3 (capable of fully capturing black frame signals and having some tolerance for misalignment between light sensor integration and PWM signal time) or the als values ​​corresponding to T1 and T4 (capable of fully capturing bright frame signals, without black frame signals, and having some tolerance for misalignment between light sensor integration and PWM signal time) can be used for calculation. Since the difference between T1 and T3 is small, or the difference between T1 and T4 is very small, this avoids the problems of excessively large differences between als2 and als1, and very small differences between als1 and als2.

[0152] In this embodiment, the method of determining the target ambient light information using the values ​​of als corresponding to T1 and T3 may include: the values ​​of als corresponding to T1 and T3 are als1 and als2 respectively; when T1 and T3 are different, the target ambient light information A is calculated using the formula in the second embodiment above; when T1 and T3 are the same, the target ambient light information A is calculated using the formula in the first or second embodiment above.

[0153] In this embodiment, the method of determining the target ambient light information using the values ​​of als corresponding to T1 and T4 may include: the values ​​of als corresponding to T1 and T4 are als1 and als2 respectively; when T1 and T4 are different, the target ambient light information A is calculated using the formula in Embodiment 2 above; when T1 and T4 are the same, the target ambient light information A is calculated using the formula in Embodiment 1 or 2 above.

[0154] It should be noted that, although Figure 11 The diagram shows the time period corresponding to T1, which completely covers the black frame time period. That is, the start time of the time period corresponding to T1 is earlier than the start time of the black frame time period, and the end time of the time period corresponding to T1 is later than the end time of the black frame time period. However, in other embodiments, the black frame time period may cover the time period corresponding to T1, meaning the start time of the time period corresponding to T1 is later than the start time of the black frame time period, and the end time of the time period corresponding to T1 is earlier than the end time of the black frame time period. Alternatively, in other embodiments, the black frame time period may partially cover the time period corresponding to T1.

[0155] The above describes how to calculate the target ambient light information corresponding to the PWM signal. However, for displays in DC mode, there is only a DC signal and no PWM signal. Therefore, a new algorithm is needed to solve this problem.

[0156] If the current dimming mode is DC dimming mode, then the fourth and fifth time periods are determined as target integration time periods respectively; the ambient light color temperature is obtained based on the fourth photosensitive data collected by the color temperature sensor in the fourth time period and the fifth photosensitive data collected in the fifth time period.

[0157] Figure 12 This is a schematic diagram illustrating a fourth and fifth time period provided for an embodiment of this application. (Refer to...) Figure 12 The DC signal reset period is located in the fourth period (i.e., the period corresponding to als1), and the fifth period (i.e., the period corresponding to als2) is located in the data frame period. The reset period is the period for resetting the data signal of the light-emitting device in the light-transmitting area, and the data frame period is the period during which the light-emitting device in the light-transmitting area displays the data frame image. The color temperature detection method in this embodiment is used to detect... Figure 7The ambient light color temperature in region 3 of the diagram is measured under the display screen scene. When the dimming mode is DC dimming mode, the ideal state of the DC signal is as shown by the dashed line in the diagram, i.e., completely reset to a low level. However, in reality, there are states where the signal doesn't drop to a low level and different images exhibit inconsistent performance, as shown by the solid line in the diagram. Therefore, using an algorithm similar to that in region 2 is insufficient to achieve high-precision under-display color temperature detection. Therefore, in this embodiment, the difference between the brightness of the actual displayed data frame and the brightness at reset can be obtained using the fourth photosensitive data als1 and the fifth photosensitive data als2. By introducing the aforementioned difference als2-als1 and three variables RGB that are only related to the display screen, light leakage from the display screen is subtracted to obtain an accurate ambient light color temperature.

[0158] In some embodiments, before obtaining the ambient light color temperature based on the fourth photosensitive data collected by the color temperature sensor in the fourth time period and the fifth photosensitive data collected in the fifth time period, the following steps are further included: Multiple sets of fourth and fifth photosensitive data of the display screen when the ambient light brightness is zero are obtained respectively, and used as training sample sets. A preset calculation model is constructed based on the training sample set. The preset calculation model is a multi-order function related to the data frame image, the fourth photosensitive data, and the fifth photosensitive data. In this embodiment, since the differences between data frame images under DC dimming mode are large, it is necessary to first train based on multiple sets of data when the ambient light brightness is zero to determine a preset calculation model that has relatively good matching performance for any type of data frame image, that is, to obtain multiple coefficients in the multi-order function. The multi-order function can be as follows:

[0159] P=f(R, G, B, (als2-als1))=K1R 3 +K2R 2 +K3R+K4G 3 +K5G 2 +K6G+K7B 3 +

[0160] K8B 2 +K9B+K(als2-als1).

[0161] In the above formula, the parameter K relies on prior experience, and RGB refers to the data of the three channels (R, G, B) of the image. The data of these three channels can be obtained by weighted averaging of pixels in the area above the color temperature sensor. When calculating K, it is necessary to capture als2-als1 under different backlight brightness levels and different images (e.g., one thousand images), and solve using the least squares method according to the above formula based on the captured data to obtain a relatively accurate coefficient. Based on the trained preset calculation model, the currently acquired fourth and fifth photosensitive data, and the currently displayed image, the ambient light data A = als1 - P can be obtained through calculation. When A contains color information, i.e., A is (R1, G1, B1) or (X1, Y1, Z1) or other channel combinations, the ambient light color information with basic elimination of display interference can be obtained. Then, the ambient light color temperature can be calculated through A, thus realizing the specular frame buffer color temperature compensation algorithm.

[0162] In some embodiments, the display screen is an Adaptive Frequency Adjustment (ADFR) screen, and the display screen is a Low Temperature Polysilicon Oxide (LTPO) screen. The processor is used to determine a first target time period as the target integration time period. The first target time period is located in the black frame time period, which is the time period during which the light-emitting devices in the light-transmitting area display the black frame image. The adaptive frequency adjustment screen has sufficient black frame width to use the low-light black frame stage algorithm and obtain the accurate ambient light color temperature.

[0163] In some embodiments, the display screen is a polarless OLED screen. The processor determines a second target time period and a third target time period as target integration time periods, respectively. The black frame period is located within the second target time period, and the third target time period is located within the data frame period. The data frame period is the time period during which the light-emitting devices in the light-transmitting area display the data frame image. Polarless OLED screens have lower transmittance; therefore, a longer integration time can be used to improve the sensing accuracy of the color temperature sensor through a mid-light gradient color temperature algorithm. In some embodiments, a combination of the low-light black frame stage algorithm and the mid-light gradient color temperature algorithm can also be used for detection to improve the detection speed and data processing complexity.

[0164] In some embodiments, the display screen is a DC dimming screen. The processor is used to determine the fourth time period and the fifth time period as target integration time periods, respectively. The reset time period of the DC signal is located in the fourth time period, and the fifth time period is located in the data frame time period. The reset time period is the time period for resetting the data signal of the light-emitting device in the light-transmitting area, and the data frame time period is the time period for the light-emitting device in the light-transmitting area to display the data frame image. That is, the DC dimming screen in this embodiment obtains the ambient light color temperature entirely through the high-brightness frame buffer color temperature compensation algorithm.

[0165] In some embodiments, the display screen is a dual-dimming mode screen with PWM dimming mode and DC dimming mode. The processor is used to select and determine a first target time period as the target integration time period, or select and determine a second target time period and a third target time period as the target integration time period, or select and determine a fourth time period and a fifth time period as the target integration time period. That is, the dual-dimming mode screen of this embodiment can use a combination of low-light black frame stage algorithm, mid-light gradient area color temperature algorithm and high-light frame buffer color temperature compensation algorithm for detection, and automatically select an appropriate algorithm to obtain the ambient light color temperature according to the current dimming mode, etc.

[0166] Based on the foregoing embodiments, this application provides an electronic device, which includes the included units and the modules included in each unit, which can be implemented by a processor in a terminal device; of course, it can also be implemented by specific logic circuits.

[0167] Figure 13 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of this application, such as... Figure 13 As shown, the electronic device 1300 includes:

[0168] The time period determination unit 1301 is used to determine a first time period and a second time period based on the time period of the low-level signal and the time period of the high-level signal in the PWM signal; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, the end time of the first time period is later than the end time of the low-level signal, the start time of the second time period is later than the start time of the high-level signal, the end time of the second time period is earlier than the end time of the high-level signal, and the difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold.

[0169] The ambient light information determination unit 1302 is used to determine the target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period.

[0170] In some embodiments, the first duration is different from the third duration.

[0171] In some embodiments, the first duration is less than the third duration.

[0172] In some embodiments, the sum of the first duration and the third duration is the same as the period of the PWM signal.

[0173] In some embodiments, the sum of the first duration and the third duration is less than the period of the PWM signal.

[0174] In some embodiments, the electronic device 1300 further includes: a control unit 1303, configured to control an ambient light sensor to detect ambient light data during the first time period and the second time period;

[0175] The ambient light information determination unit 1302 is further configured to: determine the first ambient light information and the second ambient light information based on the ambient light data;

[0176] The control unit 1303 is further configured to: control the ambient light sensor to enter a sleep state during a third time period; the third time period is a target time period outside of the first and second time periods, the start time of the target time period is the start time of the first time period, and the duration of the target time period is the period of the PWM signal.

[0177] In some embodiments, the absolute value of the difference between the first duration and the third duration is greater than or equal to 0 and less than or equal to a second threshold.

[0178] In some embodiments, the period of the first time period is the same as the period of the PWM signal, and the period of the second time period is the same as the period of the PWM signal.

[0179] In some embodiments, the time period determination unit 1301 is further configured to: determine a plurality of consecutive time periods based on the time periods of the low-level signal and the high-level signal in the PWM signal; the total duration of the plurality of consecutive time periods is the same as the period of the PWM signal; and determine the first time period and the second time period from the plurality of consecutive time periods.

[0180] The control unit 1303 is further configured to: control the ambient light sensor to detect ambient light data in each of the plurality of time periods, and determine the ambient light information for each time period based on the ambient light data corresponding to each time period; the ambient light information for each of the plurality of time periods includes the first ambient light information and the second ambient light information.

[0181] In some embodiments, the ambient light information determination unit 1302 is further configured to: acquire target correspondence; the target correspondence includes a one-to-one correspondence between multiple backlight brightness levels and the duration of multiple low-level signals;

[0182] The second duration is determined based on the correspondence between the current backlight brightness level of the display screen and the target.

[0183] The target ambient light information is determined based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, the third duration corresponding to the second time period, and the second duration.

[0184] In some embodiments, the ambient light information determination unit 1302 is further configured to: determine the target ambient light information according to the following formulas: als1=A×T1+P×(T1-T0); als2×(T1 / T2)=A×T1+P×T1; or,

[0185] The target ambient light information is determined according to the following formula: A = [als2 × (T1 - T0) - als2 × T2] / [T2 × (2T2 - T0)];

[0186] Wherein, als1 represents the first ambient light information, als2 represents the second ambient light information, A represents the target ambient light information, T1 represents the first duration, P represents the screen light information, T0 represents the second duration, and T2 represents the third duration.

[0187] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0188] In some embodiments, the electronic device may be included in the terminal device, or the electronic device may be the terminal device.

[0189] It should be noted that, in the embodiments of this application, if the above-described method for determining ambient light information is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a terminal device to execute all or part of the methods described in the various embodiments of this application.

[0190] Figure 14This is a schematic diagram of the hardware entity of a terminal device provided in an embodiment of this application, such as... Figure 14 As shown, the terminal device 1400 includes:

[0191] The display screen 1401 has a light-transmitting area for light to pass through, and the display screen is used to display according to PWM signals;

[0192] An ambient light sensor 1402 is located below the display screen and is used to detect ambient light data;

[0193] The processor 1403, connected to the ambient light sensor, is used to execute the method described in any of the above-described embodiments.

[0194] This application provides a computer storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the method for determining ambient light information as described in any of the above embodiments.

[0195] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0196] The various units or processors in the aforementioned electronic device may include one or more of the following integrated components: general-purpose processor, application-specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field-programmable gate array (FPGA), central processing unit (CPU), graphics processing unit (GPU), embedded neural-network processing unit (NPU), controller, microcontroller, microprocessor, programmable logic device, discrete gate or transistor logic device, or discrete hardware component. It is understood that the electronic device implementing the above-mentioned processor functions may also be other types, and this application embodiment does not specifically limit the specific implementation. The various units or processors in the electronic device may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0197] It is understood that the memory or computer storage medium in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0198] It should be understood that the phrases "an embodiment," "an embodiment," "an embodiment of this application," "the foregoing embodiment," "some implementations," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, the phrases "an embodiment," "an embodiment," "an embodiment of this application," "the foregoing embodiment," "some implementations," or "some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0199] Unless otherwise specified, any step in the embodiments of this application performed by the terminal device may be executed by the terminal device's processor. Unless otherwise specified, the embodiments of this application do not limit the order in which the terminal device performs the following steps. Furthermore, the methods used to process data in different embodiments may be the same or different methods. It should also be noted that any step in the embodiments of this application can be executed independently by the terminal device; that is, when the terminal device performs any step in the above embodiments, it may not depend on the execution of other steps.

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

[0201] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0202] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0203] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0204] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0205] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0206] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0207] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0208] In the embodiments of this application, descriptions of the same steps and contents in different embodiments can be referred to each other. In the embodiments of this application, the term "and" does not affect the order of steps. For example, if the terminal device executes A and executes B, it can mean that the terminal device executes A first and then B, or that the terminal device executes B first and then A, or that the terminal device executes A and B simultaneously.

[0209] The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0210] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0211] It should be noted that in the various embodiments involved in this application, all steps or some steps may be performed, as long as a complete technical solution can be formed.

[0212] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for determining ambient light information, characterized in that, The method includes: Based on the time periods of the low-level signal and the high-level signal in the pulse width modulation (PWM) signal, a first time period and a second time period are determined; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, and the end time of the first time period is later than the end time of the low-level signal; the start time of the second time period is later than the start time of the high-level signal, and the end time of the second time period is earlier than the end time of the high-level signal; the difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold. The target ambient light information is determined based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period. The step of determining the first time period and the second time period based on the time periods of the low-level signal and the high-level signal in the PWM signal includes: Based on the periods of low-level signals and high-level signals in the PWM signal, multiple consecutive time periods are determined; the total duration of the multiple consecutive time periods is the same as the period of the PWM signal. The first time period and the second time period are determined from the consecutive multiple time periods; The method further includes: in each of the plurality of time periods, controlling an ambient light sensor to detect ambient light data, and determining ambient light information for each time period based on the ambient light data corresponding to each time period; the ambient light information for each of the plurality of time periods includes the first ambient light information and the second ambient light information.

2. The method according to claim 1, characterized in that, The first duration is different from the third duration.

3. The method according to claim 2, characterized in that, The first duration is less than the third duration.

4. The method according to claim 1, characterized in that, The sum of the first duration and the third duration is the same as the period of the PWM signal.

5. The method according to claim 1, characterized in that, The sum of the first duration and the third duration is less than the period of the PWM signal.

6. The method according to claim 5, characterized in that, The method further includes: During the first time period and the second time period, the ambient light sensor is controlled to detect ambient light data, and the first ambient light information and the second ambient light information are determined based on the ambient light data; In the third time period, the ambient light sensor is controlled to enter a sleep state; the third time period is the period outside the first and second time periods in the target time period, the start time of the target time period is the start time of the first time period, and the duration of the target time period is the period of the PWM signal.

7. The method according to claim 1, characterized in that, The absolute value of the difference between the first duration and the third duration is greater than or equal to 0 and less than or equal to the second threshold.

8. The method according to any one of claims 1 to 7, characterized in that, The period of the first time segment is the same as the period of the PWM signal, and the period of the second time segment is the same as the period of the PWM signal.

9. The method according to any one of claims 1 to 7, characterized in that, The step of determining the target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period includes: Obtain the target correspondence; the target correspondence includes a one-to-one correspondence between multiple backlight brightness levels and the duration of multiple low-level signals; The second duration is determined based on the correspondence between the current backlight brightness level of the display screen and the target. The target ambient light information is determined based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, the third duration corresponding to the second time period, and the second duration.

10. The method according to claim 9, characterized in that, The step of determining the target ambient light information based on the first ambient light information of the first time period, the second ambient light information of the second time period, the first duration corresponding to the first time period, and the third duration corresponding to the second time period includes: The target ambient light information is determined according to the following formulas: als1 = A × T1 + P × (T1 - T0); als2 × (T1 / T2) = A × T1 + P × T1; or, The target ambient light information is determined according to the following formula: A = [als2 × (T1 - T0) - als2 × T2] / [T2 × (2T2 - T0)]; Wherein, als1 represents the first ambient light information, als2 represents the second ambient light information, A represents the target ambient light information, T1 represents the first duration, P represents the screen light information, T0 represents the second duration, and T2 represents the third duration.

11. An electronic device, characterized in that, The electronic device includes: A time period determination unit is used to determine a first time period and a second time period based on the time periods of the low-level signal and the high-level signal in the PWM signal; the PWM signal is used to control the display screen; the start time of the first time period is earlier than the start time of the low-level signal, the end time of the first time period is later than the end time of the low-level signal, the start time of the second time period is later than the start time of the high-level signal, the end time of the second time period is earlier than the end time of the high-level signal, and the difference between the first duration corresponding to the first time period and the second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold. An ambient light information determination unit is used to determine target ambient light information based on first ambient light information of the first time period, second ambient light information of the second time period, first duration corresponding to the first time period, and third duration corresponding to the second time period. The time period determination unit is further configured to determine multiple consecutive time periods based on the time periods of the low-level signal and the high-level signal in the PWM signal; the total duration of the multiple consecutive time periods is the same as the period of the PWM signal; and to determine the first time period and the second time period from the multiple consecutive time periods. The control unit is configured to control the ambient light sensor to detect ambient light data in each of the plurality of time periods, and to determine the ambient light information for each time period based on the ambient light data corresponding to each time period; the ambient light information for each of the plurality of time periods includes the first ambient light information and the second ambient light information.

12. A terminal device, characterized in that, The terminal device includes: The display screen has a light-transmitting area for light to pass through, and the display screen is used to display according to PWM signals; An ambient light sensor, located below the display screen, is used to detect ambient light data; A processor, connected to the ambient light sensor, is configured to perform the method according to any one of claims 1 to 10.

13. A computer storage medium, characterized in that, The computer storage medium stores one or more programs, which can be executed by one or more processors to implement the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Ambient light intensity determination method and device and storage medium

    CN112714205A