Ambient light information determination method, electronic device, terminal equipment and storage medium

By analyzing the low-level and high-level signal periods in the PWM signal and calculating the target ambient light information, the problem of the ambient light sensor being affected by the light on the display screen is solved, and the acquisition of real ambient light data and accurate adjustment of display parameters are achieved.

CN120032589AActive Publication Date: 2025-05-23GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Application Number
CN202311577106.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-05-23
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

In the prior art, an ambient light sensor is arranged below the display screen, and the detected ambient light data is affected by the light emitted by the display screen, resulting in the detected ambient light data being unreal, which in turn affects the adjustment effect of the display parameters.

Method used

By analyzing the periods of the low-level signals and high-level signals in the PWM signal, determining the first and second periods, using the ambient light information in these periods, the target ambient light information is calculated, thereby eliminating interference from the light emitted by the display screen and obtaining real ambient light data.

Benefits of technology

It realizes accurate acquisition of ambient light data in the real environment, improves the effect of display parameter adjustment, and ensures optimization of display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032589A_ABST
    Figure CN120032589A_ABST
Patent Text Reader

Abstract

The invention discloses an ambient light information determination method, an electronic device, terminal equipment and a storage medium, and the method comprises the steps: determining a first time period and a second time period according to the time period of a low-level signal and the time period of a high-level signal in a pulse width modulation (PWM) signal; the PWM signal is used for controlling the display of the display screen, the starting time of the first time period is earlier than the starting 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 starting time of the second time period is later than the starting 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; a difference value between a first duration corresponding to the first time period and a second duration corresponding to the time period of the low-level signal is smaller than or equal to a first threshold value; and determining target ambient light information according to 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] The present 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 Art

[0002] With the development of display technology, consumers have higher and higher requirements for display screens. In order to optimize the display effect of the display screen, a solution is proposed that can adjust the display parameters of the display screen according to ambient light information.

[0003] In the related art, the ambient light sensor is arranged below the display screen, and the ambient light data detected by the ambient light sensor will be affected by the light emitted by the display screen, resulting in that the ambient light data detected by the ambient light sensor cannot represent the ambient light data in the real environment, thereby making the display parameters of the display screen adjusted according to the ambient light data detected by the ambient light sensor unsatisfactory. Summary of the invention

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

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

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

[0007] Target ambient light information is determined according to the first ambient light information of the first time period, the second ambient light information of the second time period, a first duration corresponding to the first time period, and a third duration corresponding to the second time period.

[0008] In a second aspect, the present application provides an electronic device, the electronic device comprising:

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

[0010] The ambient light information determining unit is used to determine the target ambient light information according to 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] In a third aspect, the present application provides a terminal device, the terminal device comprising:

[0012] A display screen, provided with a light-transmitting area for light to pass through, the display screen being used for displaying according to a PWM signal;

[0013] An ambient light sensor, disposed under the display screen, for detecting ambient light data;

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

[0015] In a fourth aspect, the present application provides a computer storage medium, wherein the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the first aspect.

[0016] In an embodiment of the present application, a first time period and a second time period are determined according to a time period of a low-level signal and a time period of a high-level signal in a PWM signal; the PWM signal is used to control display of a display screen, a start time of the first time period is earlier than a start time of the low-level signal, an end time of the first time period is later than an end time of the low-level signal, a start time of the second time period is later than a start time of the high-level signal, an end time of the second time period is earlier than an end time of the high-level signal, and a difference between a first duration corresponding to the first time period and a 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 according to first ambient light information of the first time period, second ambient light information of the second time period, a first duration corresponding to the first time period, and a third duration corresponding to the second time period. In this way, the ambient light data detected in the first time period includes not only the ambient light data of the time period corresponding to all low-level signals, but also the ambient light data of the time period corresponding to some high-level signals. The ambient light data detected in the second time period only includes the ambient light data of the time period 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 the light emitted by the display screen, reflect the ambient light data in the real environment, and is conducive to accurately adjusting the display parameters of the display screen. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0018] Figure 1 A schematic diagram of an image obtained by photographing a display screen in a PWM dimming mode provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of the timing relationship between a PWM signal and a specified time period provided in an embodiment of the present application;

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

[0021] Figure 4 A schematic diagram of an implementation flow of another method for determining ambient light information provided in an embodiment of the present application;

[0022] Figure 5 A schematic diagram of an implementation flow of another method for determining ambient light information provided in an embodiment of the present application;

[0023] Figure 6A schematic diagram of an implementation flow of a method for determining target ambient light information according to first ambient light information, second ambient light information, first duration, and third duration provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of the relationship between display brightness and black frame time provided in an embodiment of the present application;

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

[0026] Fig. 9 A schematic diagram of the relationship between a backlight level and a backlight coefficient provided in an embodiment of the present application;

[0027] Fig.10 A schematic diagram of the timing relationship between another PWM signal, a first time period, and a second time period provided in an embodiment of the present application;

[0028] Fig.11 A schematic diagram of the timing relationship between another PWM signal, a first time period, and a second time period provided in an embodiment of the present application;

[0029] Fig.12 A schematic diagram of a fourth time period and a fifth time period provided for an embodiment of the present application;

[0030] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0031] Fig.14 A hardware entity diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0033] It should be noted that in the examples of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0034] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict. In the description of the present application, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0035] In the related art, a bangs area where no picture is displayed is set at the top of the terminal device, and an ambient light sensor can be placed in the bangs area, so that the ambient light sensor can detect ambient light data, which may include ambient light brightness data and / or color temperature data, so that the terminal device can adjust the display of the display screen of the terminal device according to the detected ambient light data. For example, adjust the brightness and / or color temperature and / or gamma value of the display screen. However, due to the requirement of a narrow bezel of the terminal device, it is necessary to cancel the bangs area in the terminal device to increase the screen-to-body ratio. Therefore, it is necessary to place the ambient light sensor under the display screen. However, the ambient light sensor under the screen will not only receive light from the external ambient light, but also receive light leakage from the display screen. That is to say, the picture displayed on the display screen will affect the ambient light data collected by the ambient light sensor, thereby affecting the detection results of the ambient light brightness and / or color temperature data in the real environment. Among them, color temperature is a unit of measurement that indicates the color components contained in light, which can reflect the cold and warm tones of light.

[0036] The terminal device in any embodiment of the present application may include one of the following or a combination of at least two of them: Internet of Things (IoT) devices, satellite terminals, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDA), handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, servers, mobile phones, tablet computers (Pad), computers with wireless transceiver functions, PDAs, desktop computers, personal digital assistants, portable media players, smart speakers, navigation devices, smart watches, smart glasses, smart necklaces and other wearable devices, learning machines, translation pens, translation machines, point reading 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. The wireless terminals in the Internet of Vehicles (IoV) system include wireless terminals in smart cities, wireless terminals in smart homes, and vehicles, on-board equipment, on-board modules, wireless modems, handheld devices, customer premises equipment (CPE), smart home appliances, etc. in the IoV system.

[0037] In some embodiments, the dimming mode of the display screen may include a direct current (DC) dimming mode or a pulse width modulation (PWM) dimming mode. The DC dimming mode refers to a method of changing the brightness of the display screen by increasing or decreasing the circuit power. For example, the circuit power can be adjusted by changing the voltage or current to change the brightness of the display screen. The PWM dimming mode refers to a method of changing the brightness of the display screen according to the alternation of the display screen on and off. In other words, in the PWM dimming mode, each pixel in the display screen does not emit light continuously, but switches between lighting and extinguishing the display screen constantly, so that the human eye thinks that the brightness of the display screen is the required target brightness. Specifically, the longer the duration of the extinguishing state of each pixel in the display screen is, the lower the brightness of the display screen is perceived by the human eye. The shorter the duration of the extinguishing state of each pixel in the display screen is, the higher the brightness of the display screen is perceived by the human eye. It can be understood that due to different dimming principles, the DC dimming mode and the PWM dimming mode have different characteristics. Therefore, two dimming modes can be configured for a display screen, and the corresponding dimming mode needs to be selected for dimming according to the display scene, thereby improving the display quality. It is understandable that in other embodiments, the display screen may be configured with only one of the dimming modes, and this dimming mode is used for dimming in all display scenarios.

[0038] Figure 1 A schematic diagram of an image obtained by photographing a display screen in a PWM dimming mode provided in an embodiment of the present application, such as Figure 1 As described above, when shooting a display in PWM dimming mode at an extremely fast shutter speed, the following images can be obtained: Figure 1 The schematic diagram of the image shown in FIG. That is, some of the light-emitting devices in the display screen are in the light-on state, while the remaining light-emitting devices are in the light-off state. Among them, the light-emitting devices are turned on and off by the PWM signal, and the PWM signals received by each light-emitting device at the same time are not exactly the same, resulting in a Figure 1 The black stripes are shown in FIG. 1 , and the positions of the black stripes move with time. Figure 1 In the illustrated embodiment, oblique stripes are displayed. In other embodiments, horizontal stripes or vertical stripes may be displayed, and this embodiment of the present application does not limit this.

[0039] The light-emitting devices corresponding to the black stripe area in the image can be understood as currently receiving a PWM signal in a low-level state, and the light-emitting devices do not emit light, that is, a black frame is displayed. The light-emitting devices in the remaining area can be understood as currently receiving a PWM signal in a high-level state, and the light-emitting devices emit light, and the light-emitting brightness corresponds to the image to be displayed, that is, a data frame is displayed. For example, if the refresh rate of the display screen is 60Hz and the frequency of the PWM signal is 360Hz, it will be displayed as Figure 1 For example, if the refresh rate of the display screen is 60 Hz and the frequency of the PWM signal is 480 Hz, then 8 black stripes will be displayed. It should be noted that Figure 1 The number of stripes shown is for exemplary purposes only and is not intended to limit the scope of protection of the present application.

[0040] For the PWM dimming mode, the light-emitting device in the light-transmitting area is in the light-emitting state part of the time, and in the off state part of the time. Accordingly, if the ambient light sensor is controlled to collect data when the light-emitting device in the light-transmitting area is in the off state, the data collected by the ambient light sensor will not be affected by the display screen. For the DC dimming mode, the photosensitive data collected when the light-emitting device in the light-transmitting area is in the light-emitting state can be compared with the photosensitive data collected when the light-emitting device in the light-transmitting area is in the reset state, so as to eliminate the influence of the light leakage of the display screen on the sensing result according to the comparison result. Therefore, by selecting different time periods based on different dimming modes, the appropriate time period can be selected to collect 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. The PWM signal in the low-level state is used to control the light-emitting device in the display screen to display a black frame picture, and the PWM signal in the high-level state is used to control the light-emitting device to display a data frame picture. Exemplarily, if the target brightness to be displayed is 1nit (nit) and the brightness of the data frame picture is 4nit, the duty cycle of the PWM signal can be controlled to be 25%. That is, in one PWM signal cycle, 1 / 4 of the time is used to display the brightness of 4nit, and 3 / 4 of the time is used to display the brightness of 0nit. Then, as long as the brightness switching speed is faster than the speed that the human eye can perceive, the human eye will think that a picture with a brightness of 1nit is displayed. Similarly, if the target brightness to be displayed is 2nit and the brightness of the data frame picture is 4nit, the duty cycle of the PWM signal can be controlled to be 50%. That is, in one PWM signal cycle, 1 / 2 of the time is used to display the brightness of 4nit, and 1 / 2 of the time is used to display the brightness of 0nit. Then, as long as the brightness switching speed is faster than the speed that the human eye can perceive, the human eye will think that a picture with a brightness of 2nit is displayed. Therefore, for the PWM dimming mode, the duty cycle of the PWM signal can be adjusted without changing the brightness of the data frame image, so that the human eye can perceive different target brightness.

[0042] Based on the above display principle, if the required brightness of the display screen is low, the duration of PWM displaying the black frame image is required to be relatively long. If the required brightness of the display screen is high, the duration of PWM displaying the black frame image is required to be relatively short. It is understandable that if the duration of PWM displaying the black frame image is too short, that is, the duty cycle of the PWM signal is too high, the ambient light sensor will not be able to collect enough photosensitivity data in a black frame image, and will not be able 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, so as to improve the accuracy of the color temperature detection results.

[0043] Figure 2 A schematic diagram of the timing relationship between a PWM signal and a specified time period provided in an embodiment of the present application, such as 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), which is used to achieve the adjustment of different brightness in the PWM dimming mode. Among them, the specified period can also be called the specified integration period. The ALS integral sampling signal is a signal that controls the ambient light sensor to perform integral sampling. The part filled with slashes is the specified period (i.e., the period corresponding to ALS1). ALS1 is determined based on one or more ambient light data collected in the specified period. For example, ALS1 is any one of the cumulative sum, average value, maximum value, minimum value, median, and mode of one or more ambient light data collected in the specified period. In this embodiment, when the duty cycle is less than the duty cycle threshold, that is, the width corresponding to the black frame period is greater than the width threshold, sufficient ambient light can be collected in the black frame period of the display screen, and the low-light black frame stage algorithm can be implemented. Figure 2 In the example, als1 can obtain ambient light information without display screen interference. According to the ambient light data collected by the ambient light sensor during the specified period, for example, when als1 information contains color information, that is, als1 is (R1, G1, B1) or (X1, Y1, Z1), or other channel combinations, pure ambient light data can be obtained, and then the ambient light data in the real environment (that is, the target ambient light information) can be determined. Furthermore, in a refresh cycle of the display screen, for example, Figure 2 As shown, six designated time periods are set to obtain more accurate first light-sensing data. It is understandable that in other embodiments, data in only two, four, or other designated time periods may be obtained.

[0044] exist Figure 2 In the corresponding embodiment, the figure shows that when the conventional screen is 60Hz, there are 6 black bars, that is, 6 groups of ALS1 and ALS2 can be obtained in each frame. Sufficient ambient light information can be obtained by accumulating ALS1 for a sufficient time. In addition, the short integration time (that is, the duration corresponding to ALS1) must be less than the black frame width, otherwise ALS1 will be disturbed by the screen light, which will cause the algorithm to fail.

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

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

[0047] It should be noted that the method for determining ambient light information in the embodiment of the present application can be applied to a display screen having only a PWM dimming mode, or can be applied to a display screen having both a PWM dimming mode and a DC dimming mode, and the embodiment of the present application is not limited thereto.

[0048] Some embodiments of the present application are described below:

[0049] Figure 3 A schematic diagram of an implementation flow of a method for determining ambient light information provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the method is applied to a terminal device, and the method includes:

[0050] S301 , determining a first time period and a second time period according to a time period of a low level signal and a time period of a high level signal in a PWM signal.

[0051] Wherein, the PWM signal is used to control the display of 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 the first threshold.

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

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

[0054] In some embodiments, the PWM signal is a periodic signal, and within a 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 not to emit light or to display a black frame picture, and the high-level signal is used to control the display screen to emit light or to display a data frame picture. In some embodiments, the low-level signal is used to control one or more rows of pixels, or one or more columns of pixels not to emit light or to display a black frame picture, and the high-level signal is used to control other areas of the display screen to emit light or to display a data frame picture. Exemplarily, the multiple rows of pixels may be continuous multiple rows of pixels, or discontinuous multiple rows of pixels, or partially continuous multiple rows of pixels. Exemplarily, the multiple columns of pixels may be continuous multiple columns of pixels, or discontinuous multiple columns of pixels, or partially continuous multiple columns of pixels. For example, at a moment, the low-level signal in the PWM signal is used to control the 256Nth to 256N+Mth row / column pixels of the display screen to display a black frame picture. N is an integer greater than or equal to 0, and M is an integer greater than or equal to 0, wherein 256N+M is less than or equal to the total number of rows or columns of pixels of 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, the PWM signal in the embodiments of the present application, unless otherwise specified, refers to a PWM signal for controlling the display of a specific area of ​​the display screen, or refers to a PWM signal for controlling the display of a certain pixel point or a certain row of pixels or a certain 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 continuous. 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 continuous.

[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. For another example, 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 a PWM cycle. In other embodiments, a first time period corresponds to a PWM cycle, a second time period corresponds to another PWM cycle, and the two PWM cycles may be adjacent or separated by at least one PWM cycle.

[0058] In some embodiments, the PWM signal may be a PWM signal of 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 of the one PWM cycle. In some embodiments, the PWM signal may be a PWM signal of 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 of the P PWM cycles. In some embodiments, the PWM signal may be a PWM signal of 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 continuous. For example, the end time point of the first time period is the same as the start time point of the second time period. In other embodiments, the first time period and the second time period may be discontinuous. For example, there is a time interval between the end time point of the first time period and the start time point 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 period can be the same as the second difference between the end time of the first period and the end time of the low level signal. In other embodiments, the first difference can be different from the second difference. For example, the first difference can be greater than or less than the second difference.

[0061] In some embodiments, the third difference between the start time of the second 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 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 zero.

[0064] In some embodiments, the first threshold value may be a relatively small value. In some embodiments, the first threshold value may be one or more clock cycles. For example, the first threshold value may be one clock cycle, 2 clock cycles, 4 clock cycles, 10 clock cycles, or 20 clock cycles, etc.

[0065] In some embodiments, the first threshold value may be determined according to the second duration corresponding to the period of the low level signal. For example, the first threshold value may be equal to the second duration. For another example, the first threshold value may be greater than the second duration. Exemplarily, the first threshold value may be an integer multiple of the second duration, such as 1.5 times, 2 times, 4 times, or 5 times. For another example, the first threshold value may be less than the second duration. Exemplarily, the first threshold value may be a preset value multiplied by the second duration, the preset value being greater than 0 and less than 1, for example, the first threshold value may be 1 / 8, 1 / 4, or 1 / 2 of the second duration, and the like.

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

[0067] In some embodiments, the first ambient light information of the first time period may be determined based on at least one ambient light data collected by the ambient light sensor in the first time period. For example, the first ambient light information of the first time period may be the accumulated value of at least one ambient light data collected in the first time period. For another example, the first ambient light information of the first time period may be the maximum value of at least one ambient light data collected in the first time period. For another example, the first ambient light information of the first time period may be the average value, mode or median of at least one ambient light data collected in the first time period, etc.

[0068] In some embodiments, the second ambient light information of the second time period may be determined based on at least one ambient light data collected by the ambient light sensor in the second time period. For example, the second ambient light information of the second time period may be the accumulated value of at least one ambient light data collected in the second time period. For another example, the second ambient light information of the second time period may be the maximum value of at least one ambient light data collected in the second time period. For another example, the second ambient light information of the second time period may be the average value, mode or median of at least one ambient light data collected in the second time period, etc.

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

[0070] In any embodiment of the present application, a first time period has a corresponding second time period. In some embodiments, a first time period does not overlap with a corresponding second time period. In other embodiments, a first time period may partially overlap with a corresponding second time period.

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

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

[0073] In any embodiment of the present application, the ambient light data may include color temperature data and / or ambient light brightness data. The color temperature data may include the values ​​of three channels, or may include the values ​​of four channels, or may include the values ​​of other number of color channels. The values ​​of three channels may include: the value of the red channel, the value of the green channel, and the value of the blue channel, which may be expressed as (R, G, B) or (X, Y, Z). The values ​​of four channels may include: the value of the red channel, the value of the green channel, the value of the blue channel, the value of the white channel, or may include the value of the red channel, the value of the green channel, the value of the blue channel, the value of the white channel, and the value of the ultraviolet (UV) channel.

[0074] In some embodiments, the target ambient light information is ambient light information in a 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 brightness 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 brightness data. In some embodiments, when the ambient light data includes color temperature data and ambient light brightness 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 and ambient light brightness 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 the 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 display screen according to the target ambient light brightness information 1. Further, the terminal device will continuously obtain the target ambient light brightness information determined later, and when the difference between the subsequently obtained target ambient light brightness information (referred to as target ambient light brightness information 2) and the target ambient light brightness information 1 is greater than or equal to a preset threshold, the display of the display screen is adjusted according to the target ambient light brightness information 2. In this way, as time goes by, the terminal device can adjust the display of the display screen when the target ambient light brightness information changes to a certain extent. Not only can the display of the display screen be adjusted in a timely manner, but the display of the display screen can also be adjusted only when the difference between the target ambient light brightness information 1 and the target ambient light brightness information 2 is greater than or equal to the preset threshold, thereby avoiding additional power consumption of the terminal device due to frequent adjustment of the display of the display screen, and avoiding discomfort to the user's eyes due to frequent adjustment of the display of the display screen.

[0077] In an embodiment of the present application, a first time period and a second time period are determined according to a time period of a low-level signal and a time period of a high-level signal in a PWM signal; the PWM signal is used to control display of a display screen, a start time of the first time period is earlier than a start time of the low-level signal, an end time of the first time period is later than an end time of the low-level signal, a start time of the second time period is later than a start time of the high-level signal, an end time of the second time period is earlier than an end time of the high-level signal, and a difference between a first duration corresponding to the first time period and a 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 according to first ambient light information of the first time period, second ambient light information of the second time period, a first duration corresponding to the first time period, and a third duration corresponding to the second time period. In this way, the ambient light data detected in the first time period includes not only the ambient light data of the time period corresponding to all low-level signals, but also the ambient light data of the time period corresponding to some high-level signals. The ambient light data detected in the second time period only includes the ambient light data of the time period 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 the light emitted by the display screen, reflect the ambient light data in the real environment, and is conducive to accurately adjusting the display parameters of the display screen.

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

[0079] In some embodiments, the first duration is less than the third duration. In other embodiments of the present application, the first duration may be greater 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 smaller than a period of the PWM signal.

[0082] It should be noted that in the embodiments of the present application, different schemes can be combined with each other without conflict. For example, there is an embodiment in which 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. For another example, there is an embodiment in which 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. The present application does not limit the embodiments obtained by combination.

[0083] Figure 4 A schematic diagram of an implementation flow of another method for determining ambient light information provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the method is applied to a terminal device, and the method is applicable to a solution in which the sum of the first duration and the third duration is less than the period of the PWM signal, and the method includes:

[0084] S401 , determining a first time period and a second time period according to a time period of a low level signal and a time period of a high level signal in a PWM signal.

[0085] S402: During the first time period and the second time period, control the ambient light sensor to detect ambient light data, and determine the first ambient light information and the second ambient light information according to the ambient light data.

[0086] Among them, the method for determining the first ambient light information and the second ambient light information can refer to the above-mentioned related description, which will not be repeated here.

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

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

[0089] In the implementation process, a target period may include a first period, a second period, and a third period, wherein the first period and the second period may be continuous or discontinuous, and the third period is a period in a target period outside the first period and the second period. In some embodiments, a third period may be continuous or discontinuous.

[0090] In some embodiments, each PWM cycle may correspond to a target time period. Thus, the multiple target time periods are continuous time periods.

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

[0092] In some embodiments, the plurality of target time periods are periodic or non-periodic.

[0093] It should be noted that if a PWM cycle corresponds to a target time period, the duration of the PWM cycle is the same as that of the target time period, but the start time of the PWM cycle may be the same as or different from the start time of the target time period.

[0094] In some embodiments, the first time period and the second time period in a target time period may be continuous, that is, 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 in a target time period may be separated by a time length, for example, the difference between the start time of the second time period and the end time of the first time period may be a specific time length.

[0095] In some embodiments, the durations corresponding to the first time period and the second time period in a target time period may be the same or different. In some embodiments, the duration corresponding to the third time period may be greater than or less than or equal to the duration corresponding to the first time period. In some embodiments, the duration corresponding to the third time period may be greater than or less than or equal to the duration corresponding to the second time period. Exemplarily, in one embodiment, the durations corresponding to the first time period and the second time period in a target time period are the same, both are T1, and the duration corresponding to the third time period may be R times the duration corresponding to the first time period, where R is an integer greater than or equal to 1. For example, the duration corresponding to the third time period may be T1, 2T1, 3T1, 4T1, 5T1, 7T1, etc., which is not limited in the embodiments of the present application.

[0096] In the embodiment of the present application, since the processor of the terminal device controls the ambient light sensor to detect ambient light data in the first time period and the second time period, and controls the ambient light sensor to sleep in 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 value can be a relatively small value. In some embodiments, the second threshold value can be one or more clock cycles. For example, the second threshold value can be one clock cycle, 2 clock cycles, 4 clock cycles, 10 clock cycles or 20 clock cycles, etc.

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

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

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

[0102] Figure 5 A schematic diagram of the implementation flow of another method for determining ambient light information provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the method is applied to a terminal device, and the method is applicable to Figure 4 In any embodiment other than the corresponding embodiment, the method includes:

[0103] S501. Determine a plurality of consecutive time periods according to a time period of a low-level signal and a time period of a high-level signal in a PWM signal; a total duration corresponding to the plurality of consecutive time periods is the same as a cycle of the PWM signal.

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

[0105] S503. In each of the multiple time periods, control the ambient light sensor to detect ambient light data, and determine the ambient light information of each time period according to the ambient light data corresponding to each time period; the ambient light information of each of the multiple time periods includes the first ambient light information and the second ambient light information.

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

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

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

[0109] In other embodiments, the plurality of PWM cycles may correspond to a plurality of continuous time periods. For example, each plurality of PWM cycles corresponds to a plurality of continuous time periods. For example, the first PWM cycle in each plurality of PWM cycles corresponds to a plurality of continuous time periods.

[0110] It should be noted that if a PWM cycle corresponds to multiple consecutive time periods, the total duration of the PWM cycle and the multiple consecutive time periods are the same, but the start time of the PWM cycle may be the same as or different from the start time of the multiple consecutive time periods.

[0111] In some embodiments, the durations corresponding to different time periods in a continuous plurality of time periods may be the same or different. For example, a continuous plurality of time periods includes 5 time periods, and the durations corresponding to the 5 time periods are the same. For another example, a continuous plurality of time periods includes 4 time periods, and the durations corresponding to at least two time periods in the 4 time periods are different in duration.

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

[0113] In some embodiments, the ambient light information of 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 of each time period can be the accumulated value of at least one ambient light data collected in each time period. For another example, the ambient light information of each time period can be the maximum value of at least one ambient light data collected in each time period. For another example, the ambient light information of each time period can be the average value, mode or median of at least one ambient light data collected in each time period, etc.

[0114] In some embodiments, the ambient light information of 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 of each time period can be the accumulated value of at least one ambient light data collected in each time period. For another example, the ambient light information of each time period can be the maximum value of at least one ambient light data collected in each time period. For another example, the ambient light information of each time period can be the average value, 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 determines the ambient light information of each time period. In other embodiments, the ambient light sensor may determine the ambient light information of each time period and send the ambient light information of each time period to the processor.

[0116] Figure 6 A schematic diagram of an implementation flow of a method for determining target ambient light information according to first ambient light information, second ambient light information, first duration, and third duration provided in an embodiment of the present application, such as Figure 6 As shown, the method is applied to a terminal device, and the 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, obtaining a target correspondence relationship; the target correspondence relationship includes a one-to-one correspondence relationship between a plurality of backlight brightness levels and a plurality of durations of low-level signals.

[0118] In some embodiments, the target correspondence relationship may be stored in the terminal device. In some embodiments, the target correspondence relationship may be configured to the terminal device before the terminal device leaves the factory. In other embodiments, the target correspondence relationship may be configured to the terminal device when the terminal device updates the system parameters.

[0119] In some embodiments, different backlight brightness levels correspond to different durations of low-level signals. In some embodiments, when the backlight brightness level is higher, the duration of the corresponding low-level signal is shorter, and conversely, when the backlight brightness level is lower, the duration of the corresponding low-level signal is longer.

[0120] S602: Determine the second duration according to the corresponding relationship between the current backlight brightness level of the display screen and the target.

[0121] In some embodiments, the current backlight brightness level of the display screen may be included in a plurality of backlight brightness levels.

[0122] S603: Determine the target ambient light information according to 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 according to 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 formula: 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] Among them, 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 screen light information, T0 represents the second duration, and T2 represents the third duration.

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

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

[0129] Figure 7 A schematic diagram of the relationship between display brightness and black frame time provided in an embodiment of the present application, such as Figure 7 As shown in Figure 1, in areas 1 and 2, as the brightness of the display (unit: nit) gradually decreases, the black frame time (unit: μs) gradually decreases, that is, the PWM duty cycle gradually decreases. When the duty cycle is not high enough or the device sensitivity is not enough to support a shorter integration time, Figure 2 The method of the corresponding embodiment is no longer applicable. Figure 7 In the example, area 1 and area 2 are PWM areas, and area 3 is a DC area or a fixed PWM width area. In some embodiments, the fixed PWM width area is suitable for Low Temperature Polycrystalline Oxide (LTPO) + Adaptive Dynamic Frame Rate (ADFR) screens. In some embodiments, some display screens cannot be used in area 2 or area 3. Figure 2 In some embodiments, some display screens can be used in area 1, area 2, or area 3. Figure 2 The method of the corresponding embodiment.

[0130] When the width of the PWM black frame is not enough to support Figure 2 The corresponding method of the embodiment 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 of the timing relationship between a PWM signal, a first time period, and a second time period provided in an embodiment of the present application, such as 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), which is used to achieve the adjustment of different brightness in the 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 the first period completely covers the black frame period of the PWM signal, and the second period (the period corresponding to als2) is within the data frame period of the PWM signal (also known as the screen luminous period), or the data frame period of the PWM signal completely covers the second period. The black frame period is the period when the light-emitting device in the light-transmitting area is used to display the black frame picture, and the data frame period is the period when the light-emitting device in the light-transmitting area is used to display the data frame picture. Figure 8 In a corresponding embodiment, the duration corresponding to the first time period is the same as the duration corresponding to the second time period.

[0133] pass Figure 8 The following formulas are satisfied: als1 = A × T1 + P × (T1-T0); als2 = A × T2 + P × T2. Set T1 = T2 = T, so that P = (als2-als1) / T0, A = als2 / T-(als2-als1) / T × K, K = T / T0, so when K is determined, A can be determined.

[0134] Among them, 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 corresponding to the first time period, P is the screen light information (Panelleak light), T2 is the duration corresponding to the second time period, and T0 is the duration corresponding to the black frame period.

[0135] When the target ambient light brightness is 0, that is, A = 0, according to als2 = A × T2 + P × T2 and T1 = T2 = T, we can get als2 (A=0) =P×T, and then combined with P=(als2-als1) / T0 and K=T / T0, we get K=als2 (A=0) / (als2-als1).

[0136] Fig. 9 A schematic diagram of the relationship between a backlight level and a backlight coefficient provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, through Fig. 9 The corresponding curve, namely K=f(B), B refers to the backlight brightness level, and K is the backlight coefficient, so that the backlight coefficient corresponding to each backlight level can be obtained.

[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; the target ambient light information can be obtained according to 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 corresponding to the first time period and the duration corresponding to the second time period; wherein the duration corresponding to the first time period and the duration corresponding to the second time period are the same, both T. For example, by Fig. 9 Corresponding curve, determine the preset backlight coefficient corresponding to the current backlight brightness level, according to the preset backlight coefficient and the formula A=als2 / T-(als2-als1) / T×K, so that A can be obtained, wherein K in A=als2 / T-(als2-als1) / T×K is the preset backlight coefficient.

[0138] For example, when A includes color information, that is, when A is (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 through A. This algorithm is applicable not only to gradient areas, but also to scenes with fixed PWM width (LTPO+ADFR screen).

[0139] Implementation method 2:

[0140] In the first implementation, it is necessary to set T1=T2=T, however, in practical applications, T1 and T2 may not be equal. For example, technicians have found that in some scenarios, the duration corresponding to the black frame period is very short, so the difference between als1 and als2 determined according to the first implementation is very small, and due to the limitation of calculation accuracy, the calculated signal-to-noise ratio is low, and the value of als2-als1 may be 0, resulting in inaccurate calculated target ambient light information. Therefore, T1 and T2 are set unequal, so that als2-als1 has a large difference, and thus the second implementation is proposed.

[0141] The difference between implementation mode 2 and implementation mode 1 is that T1 is not equal to T2. Thus, implementation mode 2 only needs to satisfy the following conditions: the integration time T1 of als1 and the integration time T2 of als2, the sum of which is equal to one PWM cycle; and within the integration time of als1 and als2, the period corresponding to als1 includes a black frame period.

[0142] Fig.10 A schematic diagram of the timing relationship between another PWM signal, the first time period, and the second time period provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, Fig.10 and Figure 8 The differences between the corresponding embodiments are: Figure 8 In the case of Fig.10 , T1 is not equal to T2. Fig.10 and Figure 8 The common point of the corresponding embodiments is that a PWM duty corresponds to als1 and als2, wherein the sum of the durations corresponding to als1 and als2, ie, T1+T2, is the period corresponding to the PWM duty.

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

[0144] In this way, through Fig.10 In this way, the following formulas are satisfied: als1=A×T1+P×(T1-T0); als2×(T1 / T2)=A×T1+P×T1.

[0145] Among them, 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 corresponding to the first time period, P is the screen light information (Panelleak light), T2 is the duration corresponding to the second time period, and T0 is the duration corresponding to the black frame period.

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

[0147] Thus, by solving the binary linear equation als1 = A×T1+P×(T1-T0); als2×(T1 / T2) = A×T1+P×T1, A (i.e., target ambient light information) can be obtained. For example, by eliminating P in the above formula, A = [als2×(T1-T0)-als2×T2] / [T2×(2T2-T0)] can be obtained.

[0148] Implementation method three:

[0149] Technicians have found that in some scenarios, the duration corresponding to the black frame period is very short. If the value of als2-als1 needs to be as large as possible, the T1 duration must be as close to the black frame duration as possible. However, there is a problem. If the T1 duration is as close to the black frame duration as possible and the black frame duration is very short, the als1 value will be very small. Due to the limitation of calculation accuracy, the calculated signal-to-noise ratio is low and the compensation accuracy is insufficient. Therefore, implementation method three is proposed.

[0150] In the third implementation mode, it is not limited to perform integration of two light sense values ​​in one PWM duty, but multiple integrations can be performed, and then only two or more of the integrations are selected for calculation.

[0151] Fig.11 A schematic diagram of the timing relationship between another PWM signal, the first time period and the second time period provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, five light sensing data are collected in one PWM duty, and the time of the five data collections is T1, T2, T3, T4, and T5 respectively. The time of T1 to T5 can be equal or unequal, and the total time of T1+T2+T3+T4+T5 is equal to the PWM duty time, and then only a few of the data are selected for calculation. Exemplarily, the als values ​​corresponding to T1 and T3 (which can completely obtain the black frame signal and have a certain tolerance for the misalignment of the light sensing integral and the PWM signal time) can be taken for calculation, or the als values ​​corresponding to T1 and T4 (which can completely obtain the bright frame signal, have no black frame signal, and have a certain tolerance for the misalignment of the light sensing integral and the PWM signal) can be taken for calculation. Since the difference between T1 and T3 is small, or the difference between T1 and T4 is small, the problem of too large difference in the value of als2-als1 and the problem of very small difference between als1 and als2 are avoided.

[0152] In this embodiment, the implementation method of using the als values ​​corresponding to T1 and T3 to determine the target ambient light information may include: the als values ​​corresponding to T1 and T3 are als1 and als2 respectively. When T1 and T3 are different, the formula in the above-mentioned embodiment 2 is used to calculate the target ambient light information A. When T1 and T3 are the same, the formula in the above-mentioned embodiment 1 or 2 is used to calculate the target ambient light information A.

[0153] In this embodiment, the implementation method of using the als values ​​corresponding to T1 and T4 to determine the target ambient light information may include: the als values ​​corresponding to T1 and T4 are als1 and als2 respectively. When T1 and T4 are different, the formula in the above-mentioned embodiment 2 is used to calculate the target ambient light information A. When T1 and T4 are the same, the formula in the above-mentioned embodiment 1 or 2 is used to calculate the target ambient light information A.

[0154] It should be noted that although Fig.11 What is shown is that the period corresponding to T1 completely covers the black frame period, that is, the start time of the period corresponding to T1 is earlier than the start time of the black frame period, and the end time of the period corresponding to T1 is later than the end time of the black frame period. However, in other embodiments, the black frame period may cover the period corresponding to T1, that is, the start time of the period corresponding to T1 is later than the start time of the black frame period, and the end time of the period corresponding to T1 is earlier than the end time of the black frame period, or in other embodiments, the black frame period may partially cover the period corresponding to T1.

[0155] The above description is about the calculation method of the target ambient light information corresponding to the PWM signal. However, for the DC mode display, there is only a DC signal but no PWM signal. Therefore, a new algorithm is needed to solve this problem.

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

[0157] Fig.12 A schematic diagram of a fourth period and a fifth period provided for an embodiment of the present application, referring to Fig.12 The reset period of the DC signal is in the fourth period (i.e., the period corresponding to als1), and the fifth period (i.e., the period corresponding to als2) is 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 for the light-emitting device in the light-transmitting area to display the data frame picture. The color temperature detection method of this embodiment is used to detect Figure 7The color temperature of ambient light under the display screen scene in area 3 in . Among them, when the dimming mode is the DC dimming mode, the ideal state of the DC signal is as shown by the dotted line in the figure, that is, it is completely reset to a low level. However, in reality, there will be a state where the drop cannot be made and different images are inconsistent, as shown by the solid line in the figure. Therefore, only using an algorithm similar to area 2 is not sufficient to achieve high-precision under-screen color temperature detection. Therefore, in this embodiment, the difference between the brightness when the data frame is actually displayed and the brightness when reset can be obtained through the fourth photosensitive data als1 and the fifth photosensitive data als2, and the light leakage of the display screen is deducted by introducing the above-mentioned difference als2-als1 and the three RGB variables that are only related to the display screen to obtain the accurate color temperature of ambient light.

[0158] In some embodiments, before obtaining the ambient light color temperature according to 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 also included. Acquire multiple sets of fourth photosensitive data and fifth photosensitive data of the display screen when the ambient light brightness is zero, respectively, and use them as training sample sets. Train according to the training sample set to construct a preset calculation model, and the preset calculation model is a multi-order function related to the data frame picture, the fourth photosensitive data, and the fifth photosensitive data. In this embodiment, due to the large differences between the data frame pictures in the DC dimming mode, it is necessary to first train according to multiple sets of data when the ambient light brightness is zero to determine a preset calculation model that is relatively well matched to any type of data frame picture, that is, to obtain multiple coefficients in the multi-order function. Among them, the multi-order function can be as follows:

[0159] P=f(R, G, B, (als2-als1))=K 1 R 3 +K 2 R 2 +K 3 R+K 4 G 3 +K 5 G 2 +K 6 G+K 7 B 3 +

[0160] K 8 B 2 +K 9 B+K(als2-als1).

[0161] In the above formula, the K parameter needs to rely on prior experience, and RGB refers to the data of the three channels (R, G, B) of the image. Among them, the data of the three channels can be obtained by weighted average calculation of the 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 pictures (for example, one thousand pictures), and solve it according to the least squares method according to the captured data according to the above formula to obtain a more accurate coefficient. Based on the trained preset calculation model, the fourth photosensitive data, the fifth photosensitive data currently collected, and the currently displayed picture, the ambient light data A=als1-P can be obtained by calculation. When the A information contains color information, that is, A is (R1, G1, B1) or (X1, Y1, Z1) or other forms of channel combination, the ambient light color information that basically eliminates the interference of the display screen can be obtained, and then the ambient light color temperature is calculated by A, that is, the highlight frame buffer color temperature compensation algorithm is realized.

[0162] In some embodiments, the display screen is an adaptive frequency modulation (ADFR) screen, and the display screen is a low temperature polycrystalline oxide (LTPO) screen, and the processor is used to determine a first target period as a target integration period, and the first target period is in a black frame period, and the black frame period is a period in which the light-emitting device in the light-transmitting area is used to display a black frame picture. The adaptive frequency modulation screen has enough black frame width to use a low light black frame stage algorithm and obtain an accurate ambient light color temperature.

[0163] In some embodiments, the display screen is an OLED screen without a polarizer layer (Polless), and the processor is used to determine the second target period and the third target period as the target integration period respectively, the black frame period is located in the second target period, and the third target period is located in the data frame period, and the data frame period is the period in which the light-emitting device in the light-transmitting area is used to display the data frame picture. The transmittance of the OLED screen without a polarizer layer (Polless) is low, so the sensing accuracy of the color temperature sensor can be improved based on a longer integration time through the medium light gradient zone color temperature algorithm. In some embodiments, the combination of the low light black frame stage algorithm and the medium light gradient zone color temperature algorithm can also be used for detection to improve the detection speed of the color temperature and the complexity of data processing.

[0164] In some embodiments, the display screen is a DC dimming screen, and the processor is used to determine the fourth period and the fifth period as target integration periods respectively, the reset period of the DC signal is located in the fourth period, and the fifth period 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 for the light-emitting device in the light-transmitting area to display the data frame picture. That is, the DC dimming screen of this embodiment completely obtains the ambient light color temperature through the high-light frame buffer color temperature compensation algorithm.

[0165] In some embodiments, the display screen is a dual dimming mode screen with a PWM dimming mode and a DC dimming mode, and the processor is used to select and determine the first target period as the target integration period, or select and determine the second target period and the third target period as the target integration period, or select and determine the fourth period and the fifth period as the target integration period. That is, the dual dimming mode screen of this embodiment can be detected by combining a low-light black frame stage algorithm, a medium-light gradient area color temperature algorithm, and a high-light frame buffer color temperature compensation algorithm, and automatically selects a suitable algorithm to obtain the ambient light color temperature according to the current dimming mode, etc.

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

[0167] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig.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 according to a time period of a low-level signal and a time period of a high-level signal in a PWM signal; the PWM signal is used to control display of a display screen, a start time of the first time period is earlier than a start time of the low-level signal, an end time of the first time period is later than an end time of the low-level signal, a start time of the second time period is later than a start time of the high-level signal, an end time of the second time period is earlier than an end time of the high-level signal, and a difference between a first duration corresponding to the first time period and a 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 determining unit 1302 is used to determine target ambient light information according to 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 smaller than the period of the PWM signal.

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

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

[0176] The control unit 1303 is also used to: control the ambient light sensor to enter a sleep state in a third time period; the third time period is a time period in the target time period outside the first time period and the second time period, the start time of the target time period is the start time of the first time period, and the duration corresponding to 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, a period of the first time period is the same as a period of the PWM signal, and a period of the second time period is the same as a period of the PWM signal.

[0179] In some embodiments, the time period determination unit 1301 is further used to: determine a plurality of continuous time periods according to the time period of the low level signal and the time period of the high level signal in the PWM signal; the total duration corresponding to the plurality of continuous time periods is the same as the cycle of the PWM signal; and determine the first time period and the second time period from the plurality of continuous time periods;

[0180] The control unit 1303 is also used to: control the ambient light sensor to detect ambient light data in each of the multiple time periods, and determine the ambient light information of each time period based on the ambient light data corresponding to each time period; the ambient light information of each of the multiple 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 used to: obtain a target correspondence relationship; the target correspondence relationship includes a one-to-one correspondence relationship between multiple backlight brightness levels and multiple durations of low-level signals;

[0182] Determining the second duration according to the corresponding relationship between the current backlight brightness level of the display screen and the target;

[0183] The target ambient light information is determined according to 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 determining unit 1302 is further used to: determine the target ambient light information according to the following formula: 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] Among them, 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 screen light information, T0 represents the second duration, and T2 represents the third duration.

[0187] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present 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 the present application, if the above-mentioned method for determining ambient light information is implemented in the form of a software function 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 the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a terminal device to execute all or part of the methods described in each embodiment of the present application.

[0190] Fig.14A hardware entity diagram of a terminal device provided in an embodiment of the present application, such as Fig.14 As shown, the terminal device 1400 includes:

[0191] A display screen 1401 is provided with a light-transmitting area for light to pass through, and the display screen is used to display according to a PWM signal;

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

[0193] The processor 1403 is connected to the ambient light sensor and is used to execute any of the above methods.

[0194] An embodiment of the present application provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the method for determining ambient light information in any of the above embodiments.

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

[0196] Each unit or processor in the above-mentioned electronic device may include any one or more of the following integrations: 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 processor (neural-network processing units, NPU), controller, microcontroller, microprocessor, programmable logic device, discrete gate or transistor logic device, discrete hardware component. It can be understood that the electronic device that implements the above-mentioned processor function can also be other, and the embodiment of the present application is not specifically limited. Each unit or processor in the electronic device can implement or execute the disclosed methods, steps and logic block diagrams in the embodiment of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0197] It is understood that the memory or computer storage medium in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of 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 "one embodiment" or "an embodiment" or "an embodiment of the present application" or "the aforementioned embodiment" or "some implementations" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "an embodiment of the present application" or "the aforementioned embodiment" or "some implementations" or "some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and 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 embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0199] Unless otherwise specified, the terminal device executes any step in the embodiment of the present application, and the processor of the terminal device may execute the step. Unless otherwise specified, the embodiment of the present application does not limit the order in which the terminal device executes the following steps. In addition, the methods used to process data in different embodiments may be the same method or different methods. It should also be noted that any step in the embodiment of the present application can be independently executed by the terminal device, that is, when the terminal device executes any step in the above embodiment, it can be independent of the execution of other steps.

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

[0201] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0202] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

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

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

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

[0206] Those skilled in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.

[0207] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0208] In the embodiments of the present application, the descriptions of the same steps and the same contents in different embodiments can refer to each other. In the embodiments of the present application, the term "and" does not affect the order of the steps. For example, the terminal device executes A and executes B, which means that the terminal device executes A first and then executes B, or the terminal device executes B first and then executes A, or the terminal device executes A and executes B at the same time.

[0209] As used in the embodiments of the present application and the appended claims, the singular forms "a," "an," "said," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0210] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0211] It should be noted that in each embodiment involved in the present application, all steps may be executed or part of the steps may be executed as long as a complete technical solution can be formed.

[0212] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for determining ambient light information, It is characterized in that The method comprises: Determine a first time period and a second time period according to a time period of a low-level signal and a time period of a high-level signal in a pulse width modulation (PWM) signal; the PWM signal is used to control display of a display screen; a start time of the first time period is earlier than a start time of the low-level signal; an end time of the first time period is later than an end time of the low-level signal; a start time of the second time period is later than a start time of the high-level signal; an end time of the second time period is earlier than an end time of the high-level signal; a difference between a first duration corresponding to the first time period and a 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 according to the first ambient light information of the first time period, the second ambient light information of the second time period, a first duration corresponding to the first time period, and a third duration corresponding to the second time period.

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

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

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

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

6. The method according to claim 5, It is characterized in that The method further comprises: During the first time period and the second time period, controlling the ambient light sensor to detect ambient light data, and determining the first ambient light information and the second ambient light information according to 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 a time period in the target time period outside the first time period and the second time period, the start time of the target time period is the start time of the first time period, and the duration corresponding to the target time period is the period of the PWM signal.

7. The method according to claim 1, It is characterized in that An absolute value of a 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.

8. The method according to any one of claims 1 to 7, It is characterized in that 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.

9. The method according to any one of claims 1 to 5 and 7, It is characterized in that The step of determining the first time period and the second time period according to the time period of the low level signal and the time period of the high level signal in the PWM signal comprises: Determine a plurality of continuous time periods according to a time period of a low-level signal and a time period of a high-level signal in the PWM signal; the total duration corresponding to the plurality of continuous time periods being the same as a period of the PWM signal; Determine the first time period and the second time period from the plurality of continuous time periods; The method also includes: in each of the multiple time periods, controlling the ambient light sensor to detect ambient light data, and determining the ambient light information of each time period based on the ambient light data corresponding to each time period; the ambient light information of each of the multiple time periods includes the first ambient light information and the second ambient light information.

10. The method according to any one of claims 1 to 7, It is characterized in that The determining target ambient light information according to 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: Acquire a target correspondence relationship; the target correspondence relationship includes a one-to-one correspondence between a plurality of backlight brightness levels and a plurality of durations of low-level signals; Determining the second duration according to the corresponding relationship between the current backlight brightness level of the display screen and the target; The target ambient light information is determined according to 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.

11. The method according to claim 10, It is characterized in that The determining target ambient light information according to 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 formula: 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)]; Among them, 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 screen light information, T0 represents the second duration, and T2 represents the third duration.

12. An electronic device, It is characterized in that The electronic device comprises: a time period determination unit, configured to determine a first time period and a second time period according to a time period of a low-level signal and a time period of a high-level signal in a PWM signal; the PWM signal is used to control display of a display screen, a start time of the first time period is earlier than a start time of the low-level signal, an end time of the first time period is later than an end time of the low-level signal, a start time of the second time period is later than a start time of the high-level signal, an end time of the second time period is earlier than an end time of the high-level signal, and a difference between a first duration corresponding to the first time period and a second duration corresponding to the time period of the low-level signal is less than or equal to a first threshold; The ambient light information determining unit is used to determine the target ambient light information according to 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.

13. A terminal device, It is characterized in that The terminal device comprises: A display screen, provided with a light-transmitting area for light to pass through, the display screen being used for displaying according to a PWM signal; An ambient light sensor, disposed under the display screen, for detecting ambient light data; A processor, connected to the ambient light sensor, for executing the method according to any one of claims 1 to 11.

14. A computer storage medium, It is characterized in that The computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Display devices with ambient light sensing

    CN101331532A

  • Ambient light detection method and device, storage medium and electronic device

    CN107945747A

  • Ambient light detecting method and device, terminal, and storage medium

    CN109410833A

  • Ambient light detection method, apparatus, electronic device and storage medium

    CN109855727A

  • Ambient light data acquisition method and electronic equipment

    CN110012162A

Cited By

  • Vehicle-mounted display screen dual-mode dimming control method, device and equipment and storage medium

    CN120472858A