Ambient Light Acquisition Method and Device

By calculating and adjusting the frequency of the screen PWM dimming signal, the ambient light sensor accurately collects ambient light under high-frequency PWM dimming conditions, solving the problem of inaccurate ambient light collection and improving the accuracy of screen brightness adjustment.

CN115691416BActive Publication Date: 2025-06-17VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211384430.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2025-06-17
Estimated Expiration
2042-11-07

AI Technical Summary

Technical Problem

When using high-frequency PWM dimming technology, the width of the PWM dimming shutdown interval is not enough to cover the light-transmitting hole on the back of the screen, resulting in inaccurate ambient light collected by the ambient light sensor, affecting the accuracy of screen brightness adjustment.

Method used

By calculating the first frequency of the screen PWM dimming signal and emitting the target screen PWM dimming signal, the width of the PWM dimming closing interval is greater than the width of the light transmitting hole when the ambient light sensor collects ambient light, thereby avoiding the acquisition of light emitted by the screen.

Benefits of technology

It ensures accurate collection of ambient light, improves the accuracy of calculations such as ambient light illuminance and color temperature, and thus improves the accuracy of screen brightness adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115691416B_ABST
    Figure CN115691416B_ABST
Patent Text Reader

Abstract

The present application discloses an ambient light acquisition method and device, belonging to the technical field of electronic devices. The ambient light acquisition method includes: receiving an ambient light acquisition request sent by an ambient light sensor; in response to the ambient light acquisition request, determining a first frequency of the screen PWM dimming signal according to a target width of a PWM dimming off interval corresponding to ambient light acquisition, a first width of a PWM dimming on interval, a total length of the screen of the electronic device, and a first duration for the screen PWM dimming signal to be transmitted from a first end of the screen to a second end; wherein the target width is greater than a second width of a light transmission hole for transmitting ambient light; emitting a target screen PWM dimming signal at the first frequency and a second frequency, so that when the ambient light sensor acquires ambient light, the width of the PWM dimming off interval is greater than the second width, wherein the second frequency is the frequency of the original screen PWM dimming signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of electronic devices, and particularly relates to an ambient light acquisition method and device. Background Art

[0002] With the continuous improvement of Organic Light-Emitting Diode (OLED) technology, high-frequency Pulse Width Modulation (PWM) dimming technology has been gradually applied to various electronic devices (such as mobile phones, tablets, computers, etc.). Compared with low-frequency PWM dimming technology, high-frequency PWM dimming technology can reduce the eye discomfort caused by screen flicker and improve the user experience.

[0003] In related technologies, when adjusting the screen brightness, it is necessary to collect ambient light using an ambient light sensor disposed under the screen and operating in the PWM dimming off interval.

[0004] However, in some cases, for example, when using high-frequency PWM dimming technology for dimming or when the screen brightness is high, the width of the PWM dimming off interval is not sufficient to cover the width of the light-transmitting hole for ambient light to pass through on the light-shielding foam on the back of the screen. As Figure 1 shown in Figure 1 , ① is the PWM dimming off interval, and ② is the light-transmitting hole. This causes the ambient light sensor to also collect the light emitted by the screen when collecting ambient light, resulting in inaccurate collected ambient light, and further affecting the accuracy of calculations such as ambient light illuminance and color temperature, and affecting the accuracy of screen brightness adjustment. Summary of the Invention

[0005] The purpose of the embodiments of this application is to provide an ambient light acquisition method and device, which can solve the problem of inaccurate ambient light acquisition.

[0006] In a first aspect, the embodiments of this application provide an ambient light acquisition method, including:

[0007] Receiving an ambient light acquisition request sent by an ambient light sensor;

[0008] In response to the ambient light acquisition request, determining a first frequency of the screen PWM dimming signal according to a target width of the PWM dimming off interval corresponding to the ambient light acquisition, a first width of the PWM dimming on interval, a total length of the screen of the electronic device, and a first duration for the screen PWM dimming signal to be transmitted from a first end of the screen to a second end; wherein, the target width is greater than a second width of the light-transmitting hole for transmitting ambient light;

[0009] Send a target screen PWM dimming signal at a first frequency and a second frequency, so that when the ambient light sensor collects ambient light, the width of the PWM dimming off interval is greater than a second width, where the second frequency is the frequency of the original screen PWM dimming signal.

[0010] In a second aspect, an embodiment of the present application provides an ambient light collection device, including:

[0011] A receiving module, configured to receive an ambient light collection request sent by an ambient light sensor;

[0012] A first determination module, configured to, in response to the ambient light collection request, determine a first frequency of the screen PWM dimming signal according to a target width of the PWM dimming off interval corresponding to the ambient light collection, a first width of the PWM dimming on interval, a total length of the screen of the electronic device, and a first duration for the screen PWM dimming signal to be transmitted from a first end of the screen to a second end; where the target width is greater than a second width of a light transmission hole for transmitting ambient light;

[0013] A transmitting module, configured to send a target screen PWM dimming signal at the first frequency and the second frequency, so that when the ambient light sensor collects ambient light, the width of the PWM dimming off interval is greater than the second width, where the second frequency is the frequency of the original screen PWM dimming signal.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.

[0016] In a fifth aspect, an embodiment of the present application provides a chip, including a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to run a program or instruction to implement the steps of the method described in the first aspect.

[0017] In a sixth aspect, an embodiment of the present application provides a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the method described in the first aspect.

[0018] In an embodiment of the present application, after receiving an ambient light acquisition request sent by an ambient light sensor, according to the target width of the PWM dimming off interval corresponding to the ambient light acquisition, the first width of the PWM dimming on interval, the total length of the screen of the electronic device, and the first duration for the screen PWM dimming signal to be transmitted from the first end to the second end of the screen, the first frequency of the screen PWM dimming signal is determined; then, the target screen PWM dimming signal is emitted at the determined first frequency and the second frequency of the original screen PWM dimming signal. When the ambient light sensor acquires ambient light, the width of the PWM dimming off interval is greater than the width of the light transmission hole for transmitting ambient light, and the width of the PWM dimming off interval can cover the width of the light transmission hole, so that the ambient light sensor will not collect the light emitted by the screen when acquiring ambient light, which can ensure the accuracy of the acquired ambient light, and further improve the accuracy of calculations such as ambient light illumination and color temperature, and improve the accuracy of screen brightness adjustment. Description of the Drawings

[0019] Figure 1 is a schematic diagram of the positions of the PWM dimming off interval and the light transmission hole during ambient light acquisition in the related art;

[0020] Figure 2 is a schematic flowchart of the ambient light acquisition method provided by an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of the widths of various objects provided by an embodiment of the present application;

[0022] Figure 4 is a first schematic diagram of emitting a target screen PWM dimming signal provided by an embodiment of the present application;

[0023] Figure 5 is a second schematic diagram of emitting a target screen PWM dimming signal provided by an embodiment of the present application;

[0024] Figure 6 is a schematic structural diagram of the ambient light acquisition device provided by an embodiment of the present application;

[0025] Figure 7 is a schematic structural diagram of the electronic device provided by an embodiment of the present application;

[0026] Figure 8 is a schematic hardware structure diagram of the electronic device for implementing an embodiment of the present application. Detailed Embodiments

[0027] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0028] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually of the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.

[0029] Next, in conjunction with the accompanying drawings, the ambient light acquisition method and device provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.

[0030] Figure 2 is a schematic flowchart of the ambient light acquisition method provided by the embodiments of the present application. As Figure 2 shown, the ambient light acquisition method may include:

[0031] S201: Receive an ambient light acquisition request sent by an ambient light sensor;

[0032] S202: In response to the ambient light acquisition request, determine the first frequency of the screen PWM dimming signal according to the target width of the PWM dimming off interval corresponding to the ambient light acquisition, the first width of the PWM dimming on interval, the total length of the screen of the electronic device, and the first duration for the screen PWM dimming signal to be transmitted from the first end to the second end of the screen; wherein, the target width is greater than the second width of the light transmission hole for transmitting ambient light;

[0033] S203: Send the target screen PWM dimming signal at the first frequency and the second frequency, so that when the ambient light sensor acquires ambient light, the width of the PWM dimming off interval is greater than the second width, where the second frequency is the frequency of the original screen PWM dimming signal.

[0034] The specific implementation manners of the above steps will be described in detail below.

[0035] In an embodiment of the present application, after receiving an ambient light acquisition request sent by an ambient light sensor, according to the target width of the PWM dimming off interval corresponding to ambient light acquisition, the first width of the PWM dimming on interval, the total length of the screen of the electronic device, and the first duration for the screen PWM dimming signal to be transmitted from the first end to the second end of the screen, the first frequency of the screen PWM dimming signal is determined; then, the target screen PWM dimming signal is sent at the determined first frequency and the second frequency of the original screen PWM dimming signal. When the ambient light sensor acquires ambient light, the width of the PWM dimming off interval is greater than the width of the light transmission hole for transmitting ambient light, the width of the PWM dimming off interval can cover the width of the light transmission hole, and the ambient light sensor will not acquire the light emitted by the screen when acquiring ambient light, which can ensure the accuracy of the acquired ambient light, and further improve the accuracy of calculations such as ambient light illumination and color temperature, and improve the accuracy of screen brightness adjustment.

[0036] In some possible implementations of the embodiment of the present application, the first end and the second end in the embodiment of the present application may respectively refer to the top end and the bottom end of the screen, where the top end and the bottom end of the screen are the upper edge and the lower edge of the screen respectively.

[0037] In some possible implementations of the embodiment of the present application, the widths of various objects such as the target width of the PWM dimming off interval corresponding to ambient light acquisition, the width of the PWM dimming on interval, the width of the light transmission hole, the total length of the screen, and the distance from the light transmission hole to the top end of the screen are as Figure 3 shown.

[0038] Among them, in Figure 3 , W1 is the target width of the PWM dimming off interval corresponding to ambient light acquisition, W2 is the width of the light transmission hole, W3 is the width of the PWM dimming on interval, W4 is the total length of the screen, and W0 is the distance from the light transmission hole to the top end of the screen.

[0039] The transmission speed of the screen PWM dimming signal is W4 / T4, where T4 is the first duration for the screen PWM dimming signal to be transmitted from the top end to the bottom end of the screen.

[0040] The time used for the screen PWM dimming signal to transmit W1

[0041] The time used for the screen PWM dimming signal to transmit W3

[0042] Then the first frequency of the screen PWM dimming signal:

[0043]

[0044] It can also be understood that the time taken for the screen PWM dimming signal to be transmitted to W1 + W3 is (W1 + W3)×T4 / W4, then the first frequency of the screen PWM dimming signal

[0045] Therefore, the first frequency F of the screen PWM dimming signal can be calculated according to the following formula (1):

[0046]

[0047] When the transmission range of the target screen PWM dimming signal is the entire screen, the target screen PWM dimming signal is emitted as Figure 4 shown Figure 4 which is the first schematic diagram of emitting the target screen PWM dimming signal provided by the embodiment of the present application.

[0048] It can be understood that, in this embodiment, the target screen PWM dimming signal includes two frequencies (the above-mentioned first frequency and second frequency), that is, the target screen PWM dimming signal is a mixed-frequency PWM dimming signal.

[0049] In the embodiment of the present application, on the one hand, it can be ensured that when ambient light is collected, the width of the PWM dimming off interval is greater than the width of the light-transmitting hole, the width of the PWM dimming off interval can cover the width of the light-transmitting hole, and the ambient light sensor will not collect the light emitted by the screen when collecting ambient light, which can ensure the accuracy of the collected ambient light. On the other hand, when ambient light is not collected, high-frequency PWM dimming can be ensured to reduce eye discomfort caused by screen flicker.

[0050] In some possible implementations of the embodiment of the present application, the screen may include a first area and a second area, where the first area includes the area opposite to the light-transmitting hole, and the second area is the area other than the first area; the target screen PWM dimming signal includes a first screen PWM dimming signal and an original screen PWM dimming signal; S203 may include: in the first area, emitting the first screen PWM dimming signal at the first frequency; in the second area, emitting the original screen PWM dimming signal at the second frequency.

[0051] The target screen PWM dimming signal is emitted as Figure 5 shown Figure 5 which is the second schematic diagram of emitting the target screen PWM dimming signal provided by the embodiment of the present application.

[0052] In Figure 5 it, the screen includes area 1 and area 2, the first screen PWM dimming signal is only transmitted at the first frequency in area 1, and the original screen PWM dimming signal is only transmitted at the frequency of the original screen PWM dimming signal in area 2.

[0053] In the embodiments of the present application, since the first screen PWM dimming signal is only transmitted in the area of the screen opposite to the light-transmitting hole, and the original screen PWM dimming signal is only transmitted in another area of the screen. On the one hand, it can ensure that when collecting ambient light, the width of the PWM dimming off interval is greater than the width of the light-transmitting hole, and the width of the PWM dimming off interval can cover the width of the light-transmitting hole, so that the ambient light sensor will not collect the light emitted by the screen when collecting ambient light, and the accuracy of the collected ambient light can be ensured. On the other hand, when collecting ambient light, it will not affect the frequency of the screen PWM dimming signal in other areas, so that high-frequency PWM dimming can still be ensured in other areas, reducing the eye discomfort caused by screen flicker.

[0054] In some possible implementations of the embodiments of the present application, the ambient light collection method provided by the embodiments of the present application may further include: calculating a second duration T2 for the ambient light sensor to collect ambient light according to the following formula (2):

[0055] T2 = W1×T4 / W4 - W2×T4 / W4 (2)

[0056] In some possible implementations of the embodiments of the present application, the ambient light collection method provided by the embodiments of the present application may further include: calculating a start time T0 for the ambient light sensor to collect ambient light based on the following formula (3):

[0057] T0 = (W0 + W2)×T4 / W4 (3)

[0058] It can be understood that after the ambient light collection request sent by the ambient light sensor, it takes a certain amount of time for the screen PWM dimming signal to reach the light-transmitting hole and the width of the PWM dimming off interval to completely cover the width of the light-transmitting hole. Therefore, it is necessary to collect ambient light when the width of the PWM dimming off interval completely covers the width of the light-transmitting hole.

[0059] The time taken for the target screen PWM dimming signal to reach the light-transmitting hole The time taken for the target screen PWM dimming signal to pass through the light-transmitting hole W2 Then the start time T0 for the ambient light sensor to collect ambient light = t2 + t1 = W0×T4 / W4 + W2×T4 / W4 = (W0 + W2)×T4 / W4.

[0060] It can also be understood that the distance for the target screen PWM dimming signal to pass through the light-transmitting hole is W0 + W2, and the time taken for the target screen PWM dimming signal to pass through W0 + W2 is the start time T0 for the ambient light sensor to collect ambient light = (W0 + W2)×T4 / W4.

[0061] In the embodiments of the present application, it is possible to ensure that the width of the PWM dimming off interval completely covers the width of the light-transmitting hole, so that the ambient light sensor does not collect the light emitted by the screen when collecting ambient light, which can ensure the accuracy of the collected ambient light, and further improve the accuracy of calculations such as ambient light illuminance and color temperature, and improve the accuracy of screen brightness adjustment.

[0062] It should be noted that for the ambient light collection method provided in the embodiments of the present application, the execution subject may be an ambient light collection device. In the embodiments of the present application, taking the ambient light collection device as the execution subject of the ambient light collection method as an example, the ambient light collection device provided in the embodiments of the present application is described.

[0063] Figure 6 It is a schematic structural diagram of the ambient light collection device provided in the embodiments of the present application. As Figure 6 shown, the ambient light collection device 600 may include:

[0064] A receiving module 601, configured to receive an ambient light collection request sent by an ambient light sensor;

[0065] A first determination module 602, configured to, in response to the ambient light collection request, determine a first frequency of the screen PWM dimming signal according to a target width of the PWM dimming off interval corresponding to the ambient light collection, a first width of the PWM dimming on interval, a total length of the screen of the electronic device, and a first duration for the screen PWM dimming signal to be transmitted from the first end to the second end of the screen; wherein, the target width is greater than a second width of the light-transmitting hole for transmitting ambient light;

[0066] A transmitting module 603, configured to emit a target screen PWM dimming signal at the first frequency and a second frequency, so that when the ambient light sensor collects ambient light, the width of the PWM dimming off interval is greater than the second width, where the second frequency is the frequency of the original screen PWM dimming signal.

[0067] In an embodiment of the present application, after receiving an ambient light acquisition request sent by an ambient light sensor, according to the target width of the PWM dimming off interval corresponding to ambient light acquisition, the first width of the PWM dimming on interval, the total length of the screen of the electronic device, and the first duration for the screen PWM dimming signal to be transmitted from the first end to the second end of the screen, the first frequency of the screen PWM dimming signal is determined; then, the target screen PWM dimming signal is emitted at the determined first frequency and the second frequency of the original screen PWM dimming signal. When the ambient light sensor acquires ambient light, the width of the PWM dimming off interval is greater than the width of the light transmission hole for transmitting ambient light, the width of the PWM dimming off interval can cover the width of the light transmission hole, and the ambient light sensor will not acquire the light emitted by the screen when acquiring ambient light, which can ensure the accuracy of the acquired ambient light, and further improve the accuracy of calculations such as ambient light illumination and color temperature, and improve the accuracy of screen brightness adjustment.

[0068] In some possible implementations of the embodiment of the present application, the screen includes a first region and a second region, where the first region includes the region opposite to the light transmission hole, and the second region is the region other than the first region; the target screen PWM dimming signal includes a first screen PWM dimming signal and an original screen PWM dimming signal;

[0069] The transmitting module 603 may include:

[0070] A first emitting sub-module, configured to emit a first screen PWM dimming signal at the first frequency in the first region;

[0071] A second emitting sub-module, configured to emit an original screen PWM dimming signal at the second frequency in the second region.

[0072] In the embodiment of the present application, since the first screen PWM dimming signal is only transmitted in the region of the screen opposite to the light transmission hole, and the original screen PWM dimming signal is only transmitted in another region of the screen, on the one hand, it can ensure that when ambient light is acquired, the width of the PWM dimming off interval is greater than the width of the light transmission hole, the width of the PWM dimming off interval can cover the width of the light transmission hole, and the ambient light sensor will not acquire the light emitted by the screen when acquiring ambient light, which can ensure the accuracy of the acquired ambient light. On the other hand, when ambient light is acquired, it will not affect the frequency of the screen PWM dimming signal in other regions, so that other regions can still ensure high-frequency PWM dimming and reduce the eye discomfort caused by screen flicker.

[0073] In some possible implementations of the embodiment of the present application, the first determination module may specifically be used for:

[0074] Calculate the first frequency of the screen PWM dimming signal according to the above formula (1).

[0075] In some possible implementations of the embodiments of the present application, the ambient light acquisition device 600 may further include:

[0076] A second determination module, configured to calculate a second duration for the ambient light sensor to collect ambient light according to the above formula (2).

[0077] In some possible implementations of the embodiments of the present application, the ambient light acquisition device 600 may further include:

[0078] A third determination module, configured to calculate a start time for the ambient light sensor to collect ambient light according to the above formula (3).

[0079] In the embodiments of the present application, it can be ensured that the width of the PWM dimming off interval completely covers the width of the light transmission hole, and the ambient light sensor will not collect the light emitted by the screen when collecting ambient light, which can ensure the accuracy of the collected ambient light, and further improve the accuracy of calculations such as ambient light illumination and color temperature, and improve the accuracy of screen brightness adjustment.

[0080] The ambient light acquisition device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than terminals. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0081] The ambient light acquisition device in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.

[0082] The ambient light acquisition device provided by the embodiments of the present application can achieve Figures 2 to 5For the sake of avoiding repetition, the various processes in the embodiments of the ambient light acquisition method are not described herein again.

[0083] Optionally, as Figure 7 shown, an embodiment of the present application further provides an electronic device 700, including a processor 701 and a memory 702. The memory 702 stores a program or instruction that can run on the processor 701. When the program or instruction is executed by the processor 701, it implements each step of the above-mentioned ambient light acquisition method embodiment and can achieve the same technical effect. For the sake of avoiding repetition, it is not described herein again.

[0084] In some possible implementations of the embodiments of the present application, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured as one or more integrated circuits implementing the embodiments of the present application.

[0085] In some possible implementations of the embodiments of the present application, the memory 702 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Therefore, generally, the memory 702 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the ambient light acquisition method according to the embodiments of the present application.

[0086] Figure 8 is a schematic hardware structure diagram of the electronic device implementing the embodiments of the present application.

[0087] The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810, etc.

[0088] Those skilled in the art can understand that the electronic device 800 may further include a power source (such as a battery) for supplying power to each component. The power source may be logically connected to the processor 810 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. Figure 8The structure of the electronic device shown does not limit the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0089] Among them, the processor 810 is configured to: receive an ambient light acquisition request sent by the ambient light sensor; in response to the ambient light acquisition request, determine the first frequency of the screen PWM dimming signal according to the target width of the PWM dimming off interval corresponding to ambient light acquisition, the first width of the PWM dimming on interval, the total length of the screen of the electronic device 800, and the first duration for the screen PWM dimming signal to be transmitted from the first end to the second end of the screen; where the target width is greater than the second width of the light transmission hole for transmitting ambient light; emit the target screen PWM dimming signal at the first frequency and the second frequency, so that when the ambient light sensor acquires ambient light, the width of the PWM dimming off interval is greater than the second width, where the second frequency is the frequency of the original screen PWM dimming signal.

[0090] In the embodiment of the present application, after receiving the ambient light acquisition request sent by the ambient light sensor, determine the first frequency of the screen PWM dimming signal according to the target width of the PWM dimming off interval corresponding to ambient light acquisition, the first width of the PWM dimming on interval, the total length of the screen of the electronic device, and the first duration for the screen PWM dimming signal to be transmitted from the first end to the second end of the screen; then, emit the target screen PWM dimming signal at the determined first frequency and the second frequency of the original screen PWM dimming signal. So that when the ambient light sensor acquires ambient light, the width of the PWM dimming off interval is greater than the width of the light transmission hole for transmitting ambient light, the width of the PWM dimming off interval can cover the width of the light transmission hole, the ambient light sensor will not acquire the light emitted by the screen when acquiring ambient light, which can ensure the accuracy of the acquired ambient light, and further improve the accuracy of calculations such as ambient light illumination and color temperature, and improve the accuracy of screen brightness adjustment.

[0091] In some possible implementations of the embodiment of the present application, the screen includes a first area and a second area, where the first area includes the area opposite to the light transmission hole, and the second area is the area other than the first area; the target screen PWM dimming signal includes a first screen PWM dimming signal and the original screen PWM dimming signal; the processor 810 may specifically be configured to:

[0092] In the first area, emit the first screen PWM dimming signal at the first frequency;

[0093] In the second area, emit the original screen PWM dimming signal at the second frequency.

[0094] In the embodiment of the present application, since the first screen PWM dimming signal is only transmitted in the area of the screen opposite to the light-transmitting hole, and the original screen PWM dimming signal is only transmitted in another area of the screen. On the one hand, it can ensure that when collecting ambient light, the width of the PWM dimming off interval is greater than the width of the light-transmitting hole, and the width of the PWM dimming off interval can cover the width of the light-transmitting hole, so that the ambient light sensor will not collect the light emitted by the screen when collecting ambient light, and the accuracy of the collected ambient light can be ensured. On the other hand, when collecting ambient light, it will not affect the frequency of the screen PWM dimming signal in other areas, so that high-frequency PWM dimming can still be ensured in other areas, reducing the eye discomfort caused by screen flicker.

[0095] In some possible implementations of the embodiment of the present application, the processor 810 may specifically be used for:

[0096] Calculate the first frequency of the screen PWM dimming signal according to the above formula (1).

[0097] In some possible implementations of the embodiment of the present application, the processor 810 may also be used for:

[0098] Calculate the second duration for the ambient light sensor to collect ambient light according to the above formula (2).

[0099] In some possible implementations of the embodiment of the present application, the processor 810 may also be used for:

[0100] Calculate the start time for the ambient light sensor to collect ambient light according to the above formula (3).

[0101] In the embodiment of the present application, it can ensure that the width of the PWM dimming off interval completely covers the width of the light-transmitting hole, and the ambient light sensor will not collect the light emitted by the screen when collecting ambient light, which can ensure the accuracy of the collected ambient light, and further improve the accuracy of calculations such as ambient light illumination and color temperature, and improve the accuracy of screen brightness adjustment.

[0102] It should be understood that in the embodiments of the present application, the input unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042. The GPU 8041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. The touch panel 8071 is also referred to as a touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. The other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated here.

[0103] The memory 809 can be used to store software programs and various data. The memory 809 mainly includes a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area can store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 809 can include a volatile memory or a non-volatile memory, or the memory 809 can include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 809 in the embodiments of the present application includes, but is not limited to, these and any other suitable types of memories.

[0104] The processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor may not be integrated into the processor 810 either.

[0105] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above-mentioned embodiment of the ambient light acquisition method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0106] Among them, the processor is the processor in the electronic device in the above-mentioned embodiment. The readable storage medium includes a computer-readable storage medium, and examples of the computer-readable storage medium include non-transitory computer-readable storage media, such as ROM, RAM, magnetic disks, or optical discs, etc.

[0107] The embodiment of the present application also provides a chip, including a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement each process of the above-mentioned embodiment of the ambient light acquisition method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0108] It should be understood that the chip mentioned in the embodiment of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0109] The embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement each process of the above-mentioned embodiment of the ambient light acquisition method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0110] It should be noted that, in this document, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0111] From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the related art can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for causing a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present application.

[0112] The embodiments of the present application have been described above with reference to the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Those of ordinary skill in the art, under the inspiration of the present application and without departing from the spirit and scope protected by the claims of the present application, can still make many forms, all of which fall within the protection scope of the present application.

Claims

1. An ambient light collection method, characterized in that, The method includes: Receiving an ambient light acquisition request sent by an ambient light sensor; In response to the ambient light acquisition request, determining a first frequency of the screen PWM dimming signal according to a target width of a PWM dimming off interval corresponding to ambient light acquisition, a first width of a PWM dimming on interval, a total length of the screen of the electronic device, and a first duration for the screen PWM dimming signal to be transmitted from a first end to a second end of the screen; wherein the target width is greater than a second width of a light transmission hole for transmitting ambient light; Emitting a target screen PWM dimming signal at the first frequency and a second frequency, so that when the ambient light sensor acquires ambient light, the width of the PWM dimming off interval is greater than the second width, wherein the second frequency is the frequency of the original screen PWM dimming signal; The determining the first frequency of the screen PWM dimming signal according to the target width of the PWM dimming off interval corresponding to ambient light acquisition, the first width of the PWM dimming on interval, the total length of the screen of the electronic device, and the first duration for the screen PWM dimming signal to be transmitted from the first end to the second end of the screen includes: Calculating the first frequency according to the following formula: where F is the first frequency, W1 is the target width, W3 is the first width, W4 is the total length of the screen, and T4 is the first duration.

2. The method according to claim 1, characterized in that, The screen includes a first region and a second region, wherein the first region includes a region opposite to the light transmission hole, and the second region is a region other than the first region; the target screen PWM dimming signal includes a first screen PWM dimming signal and the original screen PWM dimming signal; The emitting the target screen PWM dimming signal at the first frequency and the second frequency includes: In the first region, emitting the first screen PWM dimming signal at the first frequency; In the second region, emitting the original screen PWM dimming signal at the second frequency.

3. The method according to claim 1, characterized in that, The method further includes: Calculating a second duration for the ambient light sensor to acquire ambient light according to the following formula: T2 = W1×T4 / W4 - W2×T4 / W4 where T2 is the second duration, W1 is the target width, W2 is the second width, W4 is the total length of the screen, and T4 is the first duration.

4. The method according to claim 1, characterized in that, The method further includes: Calculating a start time for the ambient light sensor to acquire ambient light according to the following formula: T0 = (W0 + W2)×T4 / W4 where T0 is the start time, W0 is a first distance, W2 is the second width, W4 is the total length of the screen, T4 is the first duration, and the first distance is the distance from the light transmission hole to the first end.

5. An ambient light collection device, characterized in that, The device includes: A receiving module, configured to receive an ambient light acquisition request sent by an ambient light sensor; A first determination module, configured to, in response to the ambient light acquisition request, determine a first frequency of the screen PWM dimming signal according to a target width of a PWM dimming off interval corresponding to ambient light acquisition, a first width of a PWM dimming on interval, a total length of the screen of the electronic device, and a first duration for the screen PWM dimming signal to be transmitted from a first end of the screen to a second end; wherein, the target width is greater than a second width of a light-transmitting hole for transmitting ambient light. A transmitting module, configured to emit a target screen PWM dimming signal at the first frequency and a second frequency, so that when the ambient light sensor acquires ambient light, a width of the PWM dimming off interval is greater than the second width, wherein the second frequency is the frequency of the original screen PWM dimming signal. The first determination module is specifically configured to: Calculate the first frequency according to the following formula: Wherein, F is the first frequency, W1 is the target width, W3 is the first width, W4 is the total length of the screen, and T4 is the first duration.

6. The device according to claim 5, characterized in that, The screen includes a first region and a second region, wherein the first region includes a region opposite to the light-transmitting hole, and the second region is a region other than the first region; the target screen PWM dimming signal includes a first screen PWM dimming signal and the original screen PWM dimming signal. The transmitting module includes: A first emitting sub-module, configured to emit the first screen PWM dimming signal at the first frequency in the first region. A second emitting sub-module, configured to emit the original screen PWM dimming signal at the second frequency in the second region.

7. The device according to claim 5, characterized in that, The device further includes: A second determination module, configured to calculate a second duration for the ambient light sensor to acquire ambient light according to the following formula: T2 = W1×T4 / W4 - W2×T4 / W4 Wherein, T2 is the second duration, W1 is the target width, W2 is the second width, W4 is the total length of the screen, and T4 is the first duration.

8. The device according to claim 5, characterized in that, The device further includes: A third determination module, configured to calculate a start time for the ambient light sensor to acquire ambient light according to the following formula: T0 = (W0 + W2)×T4 / W4 Wherein, T0 is the start time, W0 is a first distance, W2 is the second width, W4 is the total length of the screen, T4 is the first duration, and the first distance is the distance from the light-transmitting hole to the first end.

Citation Information

Patent Citations

  • Terminal, display parameter control method and device and storage medium

    CN112242119A

  • Method and device for determining brightness of under-screen light sensing environment, and terminal equipment

    CN113096614A