Luminance detection method, electronic device, processor and computer program product

By detecting the output electrical signal of the optical sensor within different exposure time and adjusting according to the electrical signal range, the problem of low detection accuracy of the ambient light sensor in different brightness environments is solved, and more accurate brightness detection is achieved.

CN119756570APending Publication Date: 2025-04-04WUHAN TIANMA MICROELECTRONICS CO LTD SHANGHAI BRANCH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411917800.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

When detecting the brightness of the ambient light, existing ambient light sensors are susceptible to the light emission on the screen, resulting in a decrease in detection accuracy. In different brightness environments, the photogenerating current is too large or too small, resulting in signal saturation or weakening, which in turn affects the detection accuracy.

Method used

A brightness detection method is adopted to detect the output electrical signal of the optical sensor within different exposure times, and adjust it according to whether the electrical signal is within the preset electrical signal range until the detection is stopped. This method can adjust the exposure time through frequency conversion method, determine the appropriate exposure time according to the change of the electrical signal, thereby improving the detection accuracy.

Benefits of technology

By adjusting the exposure time, the brightness of the light can be accurately detected under different ambient light brightness, improving the detection accuracy of the ambient light sensor and avoiding the problem of signal saturation or weakening.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119756570A_ABST
    Figure CN119756570A_ABST
Patent Text Reader

Abstract

The invention provides a light brightness detection method, electronic equipment, a processor and a computer program product. The method comprises the following steps: a first detection step: detecting an output electric signal of a first optical sensor within a first exposure duration; a second detection step of detecting an output electric signal of a second optical sensor within a second exposure duration; and a determination step: in all the detection steps, detection is stopped under the condition that the obtained output electric signal is in a preset electric signal range, and the method solves the problem of low detection precision of the ambient light sensor in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of display, and in particular, to a method for detecting brightness, an electronic device, a computer-readable storage medium, a processor, and a computer program product. Background Art

[0002] With the continuous updating of electronic devices, ambient light sensors have also become basic components. Ambient light sensors (also called optical sensors) mainly use optical components to generate photocurrent under light, causing changes in the detection potential. The light intensity is judged by the potential change value, thereby detecting the intensity of light in the environment where the electronic device is located.

[0003] At present, ambient light sensors are mainly placed under the display screen. However, with this assembly method, the sensor is easily affected by the screen display light when detecting ambient light, which reduces the detection accuracy. At the same time, because the ambient light brightness range spans a large range, for an optical sensor with a given exposure time, the photocurrent is small and the optical signal is weak in low-light environments; in high-light environments, the photocurrent is too large and the optical signal is saturated, resulting in inaccurate detection accuracy of the optical sensor.

[0004] Therefore, there is an urgent need for a method that can improve the detection accuracy of an ambient light sensor. Summary of the invention

[0005] The main purpose of the present application is to provide a method for detecting brightness, an electronic device, a computer-readable storage medium, a processor and a computer program product, so as to at least solve the problem of low detection accuracy of ambient light sensors in the prior art.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for detecting brightness is provided, the method comprising: a first detection step, detecting an output electrical signal of a first optical sensor within a first exposure time; a second detection step, detecting an output electrical signal of a second optical sensor within a second exposure time, the second exposure time being different from the first exposure time; a determination step, stopping the detection if, in all the detection steps, the acquired output electrical signal is within a preset electrical signal range.

[0007] Optionally, the first optical sensor and the second optical sensor are the same optical sensor, and the second detection step includes: when it is determined that the output electrical signal in the first detection step is not within the preset electrical signal range, detecting the output electrical signal of the second optical sensor within the second exposure time; the determination step includes: when the output electrical signal acquired in the second detection step is within the preset electrical signal range, stopping detection.

[0008] Optionally, the first optical sensor and the second optical sensor are different optical sensors, and the first detection step and the second detection step are performed simultaneously.

[0009] Optionally, the first detection step and / or the second detection step include: controlling the detection circuit to reset the voltage of a predetermined optical sensor, and when the reset time reaches a first preset time, reading the voltage of a predetermined end of the detection circuit to obtain a first voltage, exposing the predetermined optical sensor, and when the exposure time is a predetermined exposure time, reading the voltage of the predetermined end to obtain a second voltage; calculating the difference between the first voltage and the second voltage to obtain an output electrical signal of the predetermined optical sensor, wherein, in the first detection step, the predetermined optical sensor is the first optical sensor, and the predetermined exposure time is the first exposure time; in the second detection step, the predetermined optical sensor is the second optical sensor, and the predetermined exposure time is the second exposure time.

[0010] Optionally, the first optical sensor and the second optical sensor are respectively first photosensitive diodes, and the detection circuit includes a first thin film transistor, a second thin film transistor and a third thin film transistor, the first electrode of the first thin film transistor is respectively electrically connected to the gate of the second thin film transistor and the cathode of the first photosensitive diode, the gate of the first thin film transistor is connected to a first reset signal, the second electrode of the first thin film transistor is connected to a first power supply voltage, the first electrode of the second thin film transistor is electrically connected to the second electrode of the third thin film transistor, the second electrode of the second thin film transistor is connected to a second power supply voltage, the anode of the first photosensitive diode is connected to a third power supply voltage, the gate of the third thin film transistor is connected to a reading signal, and the first electrode of the third thin film transistor is the predetermined end of the detection circuit.

[0011] Optionally, the detection circuit is controlled to reset the voltage of the predetermined optical sensor, and when the reset time reaches a first preset time, the voltage of the predetermined end of the detection circuit is read to obtain a first voltage, the predetermined optical sensor is exposed, and when the exposure is performed for a predetermined exposure time, the voltage of the predetermined end is read to obtain a second voltage, and the first voltage and the second voltage include the voltage of the predetermined optical sensor, including: controlling the read signal to be a high level so that the third thin film transistor is turned on; when the read signal maintains a high level for a second preset time, controlling the first reset signal to be a high level so that the first thin film transistor and the second thin film transistor are turned on The first photosensitive diode is turned on, thereby resetting the cathode potential of the first photosensitive diode; when the first reset signal maintains the high level for the first preset time, the first voltage is read, and the first reset signal is controlled to be a low level and the first photosensitive diode is started to be exposed; when the exposure time reaches a third preset time, the read signal is controlled to be a low level, and when it is maintained for a fourth preset time, the read signal is controlled to be a high level; when the exposure time reaches the predetermined exposure time, the second voltage is read, and the first reset signal is synchronously controlled to be a high level, and the predetermined exposure time is greater than the sum of the third preset time and the fourth preset time.

[0012] Optionally, the first optical sensor and the second optical sensor are respectively second photosensitive diodes, and the detection circuit includes a fourth thin film transistor, a first electrode of the fourth thin film transistor is electrically connected to the cathode of the second photosensitive diode, a gate of the fourth thin film transistor is connected to a second reset signal, an anode of the second photosensitive diode is connected to a third power supply voltage, and a second electrode of the fourth thin film transistor is connected to a column bus, wherein the second electrode of the fourth thin film transistor is the predetermined end of the detection circuit.

[0013] Optionally, the detection circuit is controlled to reset the voltage of a predetermined optical sensor, and when the reset time reaches a first preset time, the voltage of a predetermined end of the detection circuit is read to obtain a first voltage, and the predetermined optical sensor is exposed. When the exposure time is predetermined, the voltage of the predetermined end is read to obtain a second voltage, and the first voltage and the second voltage include the voltage of the predetermined optical sensor, including: controlling the second reset signal to be high and the column bus to be powered on, so that the fourth thin film transistor is turned on, thereby resetting the cathode potential of the second photosensitive diode; when the second reset signal maintains the high level for the first preset time, the first voltage is read, and the second reset signal is controlled to be low, the column bus is powered off, and the exposure of the second photosensitive diode is controlled to start; when the exposure lasts for the predetermined exposure time, the second voltage is read, and the second reset signal is controlled to be high and the column bus is powered on.

[0014] Optionally, the detection method also includes: determining the light brightness range corresponding to the current environment according to the target exposure time, and obtaining the target light brightness range, wherein the target exposure time is the exposure time corresponding to the output electrical signal within the preset electrical signal range; determining the correspondence between the output electrical signal and the light brightness according to the target light brightness range, and determining the light brightness of the current environment within the target light brightness range according to the target output electrical signal and the correspondence, wherein the target output electrical signal is the output electrical signal within the preset electrical signal range.

[0015] According to another aspect of the present application, based on the same inventive concept, an electronic device is provided, comprising at least one optical sensor, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a detection method for any one of the above-mentioned methods.

[0016] Optionally, the optical sensor is a first photosensitive diode, and the electronic device further includes a detection circuit, the detection circuit including a first thin film transistor, a second thin film transistor and a third thin film transistor, the first electrode of the first thin film transistor is electrically connected to the gate of the second thin film transistor and the cathode of the first photosensitive diode respectively, the gate of the first thin film transistor is connected to a first reset signal, the second electrode of the first thin film transistor is connected to a first power supply voltage, the first electrode of the second thin film transistor is electrically connected to the second electrode of the third thin film transistor, the second electrode of the second thin film transistor is connected to a second power supply voltage, the anode of the first photosensitive diode is connected to a third power supply voltage, the gate of the third thin film transistor is connected to a reading signal, the first electrode of the third thin film transistor is a voltage reading terminal, the first reset signal is used to reset the potential of the cathode of the first photosensitive diode, and the reading signal is used to control the on and off of the third thin film transistor.

[0017] Optionally, the optical sensor is a second photosensitive diode, and the electronic device further includes a detection circuit, the detection circuit includes a fourth thin film transistor, the first electrode of the fourth thin film transistor is electrically connected to the cathode of the second photosensitive diode, the gate of the fourth thin film transistor is connected to the second reset signal, the anode of the second photosensitive diode is connected to the third power supply voltage, the second electrode of the fourth thin film transistor is connected to the column bus, the second electrode of the fourth thin film transistor is a voltage reading terminal, and the second reset signal is used to reset the potential of the cathode of the second photosensitive diode.

[0018] Optionally, there are at least two optical sensors, namely a first optical sensor and a second optical sensor.

[0019] Optionally, the electronic device is a display device.

[0020] According to another aspect of the present application, based on the same inventive concept, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned detection methods.

[0021] According to another aspect of the present application, based on the same inventive concept, a processor is provided, wherein the processor is used to run a program, wherein the program executes any one of the detection methods described above when running.

[0022] According to another aspect of the present application, based on the same inventive concept, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.

[0023] The technical solution of the present application is applied, firstly, the output electrical signal of the first optical sensor is detected within the first exposure time; secondly, the output electrical signal of the second optical sensor is detected within the second exposure time, and the second exposure time is different from the first exposure time; finally, in all the detection steps, if the output electrical signal obtained is within the preset electrical signal range, the detection is stopped. Compared with the solution in the prior art in which the optical sensor timing is set to a fixed exposure time, the solution of the present application adopts different exposure time driving, that is, driving by frequency conversion, and determines the ambient light brightness according to the exposure time corresponding to the electrical signal obtained by the test when it is within the preset electrical signal range, thereby solving the problem of low detection accuracy of the ambient light sensor in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0025] Figure 1 A hardware structure block diagram of a mobile terminal for performing a method for detecting light brightness provided in an embodiment of the present application is shown;

[0026] Figure 2 A schematic diagram of a process of detecting brightness according to an embodiment of the present application is shown;

[0027] Figure 3 A structural block diagram of a light brightness detection circuit using three thin film transistors provided according to an embodiment of the present application is shown;

[0028] Figure 4 A timing diagram of light brightness detection generated by using three thin film transistors in a light brightness detection method provided in an embodiment of the present application is shown;

[0029] Figure 5 A structural block diagram of a brightness detection circuit using a thin film transistor in a brightness detection method provided according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0030] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] As introduced in the background technology, the detection accuracy of ambient light sensors in the prior art is low. To solve the above problem, the embodiments of the present application provide a brightness detection method, an electronic device, a computer-readable storage medium, a processor and a computer program product.

[0034] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0035] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for detecting brightness according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] As mentioned in the background art, the exposure time of the optical sensor in the prior art is fixed. When the ambient light brightness is strong or weak, the detection accuracy of the optical detection sensor is poor, and the detected ambient light brightness is inaccurate.

[0038] In order to solve the above-mentioned technical problems of the present application, a method for detecting light brightness running on a mobile terminal, a computer terminal or a similar computing device is provided in this embodiment. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0039] Figure 2 FIG. 1 is a flow chart of a method for detecting brightness according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0040] Step S201, a first detection step, detects an output electrical signal of a first optical sensor within a first exposure time.

[0041] Specifically, a first exposure time is set, the first optical sensor is controlled to be exposed during the time, and the electrical signal output by the first optical sensor after the exposure is controlled to be detected.

[0042] Step S202, a second detection step, detects the output electrical signal of the second optical sensor within a second exposure time, and the second exposure time is different from the first exposure time.

[0043] Specifically, a second exposure time is set, the second optical sensor is controlled to be exposed during the time, and the electrical signal output by the second optical sensor after the exposure is controlled to be detected.

[0044] Step S203, a determination step, in all the detection steps, if the obtained output electrical signal is within the preset electrical signal range, stop the detection.

[0045] Specifically, by detecting the electrical signals output by different optical sensors after exposure at different exposure times, it is determined whether these electrical signals are within the preset electrical signal range. If they are within the range, the detection is stopped. This means that the current exposure time is suitable for the current ambient light brightness, and the corresponding output electrical signals can be used to accurately determine the ambient light brightness.

[0046] In the above embodiment, first, the output electrical signal of the first optical sensor is detected within the first exposure time; second, the output electrical signal of the second optical sensor is detected within the second exposure time, and the second exposure time is different from the first exposure time; finally, in all the detection steps, if the output electrical signal obtained is within the preset electrical signal range, the detection is stopped. Compared with the scheme in the prior art in which the optical sensor timing is set to a fixed exposure time, the scheme of the present application adopts different exposure time driving, that is, driving by frequency conversion, and determines the ambient light brightness according to the exposure time corresponding to the electrical signal obtained by the test when it is within the preset electrical signal range, thereby solving the problem of low detection accuracy of the ambient light sensor in the prior art.

[0047] The first optical sensor in the first detection step and the second optical sensor in the second detection step can be the same optical sensor or different optical sensors. In actual applications, different optical sensors can be selected to perform the two detection steps according to actual conditions, or the same optical sensor can be used to perform the two detection steps.

[0048] In one embodiment of the present application, the first optical sensor and the second optical sensor are the same optical sensor, and the second detection step includes: when it is determined that the output electrical signal in the first detection step is not within the preset electrical signal range, the output electrical signal of the second optical sensor is detected within the second exposure time, that is, no accurate electrical signal can be detected in the first detection step; the determination step includes: when the output electrical signal obtained in the second detection step is within the preset electrical signal range, the detection is stopped. In this method, detection is performed by an optical sensor. First, the optical sensor performs detection in the first exposure time and outputs an electrical signal to determine whether the detected electrical signal is within the preset range. If it is not within the range, a second detection will be performed. The optical sensor will perform detection within the second exposure time and output an electrical signal. If the output electrical signal is within the preset range, the detection will be stopped.

[0049] In the scheme of using the same optical sensor to detect ambient light, the exposure time will be adjusted only when the output electrical signal in the first detection step is not within the preset electrical signal range, that is, the second detection step is executed after the first detection step is completed, so the detection time is relatively long. In order to make the detection of light brightness more efficient, in one embodiment of the present application, the first optical sensor and the second optical sensor are different optical sensors, and the first detection step and the second detection step are performed simultaneously.

[0050] In actual detection, when the output electrical signals obtained in the first detection step and the second detection step are not within the preset electrical signal range, the above-mentioned determination step includes: repeatedly executing the first detection step and / or the second detection step, and during the repeated execution, the exposure time is increased or decreased until the corresponding output electrical signal is within the preset electrical signal range, and the detection is stopped. In the case where the exposure time (first exposure time or second exposure time) corresponding to the detection step (first detection step or second detection step) is short, the exposure time is gradually increased during the repeated execution until the corresponding output electrical signal is within the preset electrical signal range, and the detection is stopped; in the case where the exposure time (first exposure time or second exposure time) corresponding to the detection step (first detection step or second detection step) is long, the exposure time is gradually reduced during the repeated execution until the corresponding output electrical signal is within the preset electrical signal range, and the detection is stopped.

[0051] In actual detection, when the output electrical signals obtained in the first detection step and the second detection step are both outside the preset electrical signal range, optionally, the above-mentioned determination step includes: controlling the execution of multiple other detection steps, the optical sensors in any two other detection steps are not the same, the exposure times in any two other detection steps are different and are different from the first exposure time and the second exposure time, and these other detection steps can be executed synchronously, so that the target exposure time can be determined more quickly.

[0052] More specifically, in the above scheme, the first detection step can be repeated alone, and the second detection step can also be repeated alone. In the case where the optical sensors in the first detection step and the second detection step are different optical sensors, the first detection step and the second detection step can also be repeated simultaneously. During the repetition, the exposure time of the short exposure time is increased, and the exposure time of the long exposure time is decreased, so that the exposure time within the preset electrical signal range can be found more efficiently, thereby more efficiently determining the ambient light brightness.

[0053] In another embodiment, the first detection step and / or the second detection step include: controlling the detection circuit to reset the voltage of the predetermined optical sensor, and when the reset time reaches a first preset time, the voltage reset is considered to be completed, reading the voltage of the predetermined end of the detection circuit to obtain the first voltage, that is, the voltage after reset, exposing the predetermined optical sensor, and when the exposure is for a predetermined exposure time, reading the voltage of the predetermined end to obtain the second voltage, that is, reading the voltage after exposure, the first voltage and the second voltage include the voltage of the predetermined optical sensor; calculating the difference between the first voltage and the second voltage to obtain the output electrical signal of the predetermined optical sensor, the output electrical signal is actually the change in the electrical signal of the predetermined optical sensor before and after exposure, and can be specifically a voltage change, wherein in the first detection step, the predetermined optical sensor is the first optical sensor, and the predetermined exposure time is the first exposure time; in the second detection step, the predetermined optical sensor is the second optical sensor, and the predetermined exposure time is the second exposure time. In this method, the predetermined optical sensor is reset, so that the voltage change value of the optical sensor during the exposure time can be obtained more accurately, thereby further ensuring the accuracy of the electrical signal output by the optical sensor, and further improving the accuracy of the optical sensor in detecting light brightness.

[0054] In order to more accurately detect the light signal and output the corresponding result more accurately, thereby further improving the detection accuracy of the optical sensor, in one embodiment of the present application, the first optical sensor and the second optical sensor are respectively a first photodiode PD1, which generates a photocurrent Idiode under light, causing the Q point potential of the first photodiode PD1 to change, thereby detecting the ambient light brightness. Figure 3 As shown, the detection circuit includes a first thin film transistor M1, a second thin film transistor M2 and a third thin film transistor M3, the first electrode of the first thin film transistor M1 is electrically connected to the gate of the second thin film transistor M2 and the cathode of the first photosensitive diode PD1 respectively, the gate of the first thin film transistor M1 is connected to the first reset signal Reset1, the second electrode of the first thin film transistor M1 is connected to the first power supply voltage Vreset, the first electrode of the second thin film transistor M2 is electrically connected to the second electrode of the third thin film transistor M3, the second electrode of the second thin film transistor M2 is connected to the second power supply voltage Vdd, the anode of the first photosensitive diode PD1 is connected to the third power supply voltage Vcom, the gate of the third thin film transistor is connected to the read signal Read, the first electrode of the third thin film transistor is the predetermined end of the detection circuit, and the detection voltage thereof is Vdata.

[0055] Figure 3 The process of resetting and exposing the first photodiode PD1 shown in FIG. 1 is equivalent to a process of charging and discharging a capacitor, so: Figure 3 The first capacitor C1 in the circuit does not actually exist, but means that the first photodiode PD1 is equivalent to the first capacitor C1.

[0056] In another embodiment, the control detection circuit resets the voltage of the predetermined optical sensor, and when the reset time reaches a first preset time, reads the voltage of the predetermined end of the detection circuit to obtain the first voltage, exposes the predetermined optical sensor, and when the exposure time is the predetermined exposure time, reads the voltage of the predetermined end to obtain the second voltage, wherein the first voltage and the second voltage include the voltage of the predetermined optical sensor, including: Figure 3 and 4As shown, the read signal Read is controlled to be at a high level, so that the third thin film transistor is turned on; when the read signal Read maintains the high level for the second preset time t2, the first reset signal Reset1 is controlled to be at a high level, so that the first thin film transistor M1 and the second thin film transistor M2 are turned on, so that the cathode potential of the first photosensitive diode PD1 is reset, that is, the cathode of the first photosensitive diode PD1 is loaded with a higher voltage, that is, the Q point potential is higher, and the first photosensitive diode PD1 is reverse biased. During the resetting process of the first photosensitive diode PD1, the change of the voltage across the first photosensitive diode PD1 is similar to the charging process of the capacitor C1; when the first reset signal Reset1 maintains the high level for the first preset time In the case of t1, it is considered that the reset has been completed, the above-mentioned first voltage is read, and the above-mentioned first reset signal Reset1 is controlled to be low level and the above-mentioned first photodiode PD1 begins to be exposed. During the exposure process, the first photodiode PD1 will generate photogenerated carriers, namely photogenerated electrons and photogenerated holes. After a certain exposure time, the potential of the Q point decreases. In this process, the change of the voltage across the first photodiode PD1 is similar to the discharge process of the capacitor C1; when the exposure time reaches the third preset time t3, the above-mentioned read signal Read is controlled to be low level, and when the read signal Read maintains the low level for the fourth preset time t4, the above-mentioned read signal Read is controlled to be high level; when the exposure time reaches the above-mentioned predetermined exposure time, as Figure 4 As shown, in the first detection step, the predetermined exposure time is the first exposure time Texpo1, the second voltage is read, which is the voltage of the first photosensitive diode PD1 after exposure, and the first reset signal Reset1 is synchronously controlled to be high level, and the predetermined exposure time t is greater than the sum of the third preset time t3 and the fourth preset time t4, that is, t>t3+t4. In this method, by controlling the level of the first reset signal Reset1 and the read signal Read, it is further ensured that the voltage of the optical sensor is accurately reset and the voltage is read, thereby further improving the accuracy and stability of the optical sensor. In addition, by controlling t>t3+t4, the read signal Read can maintain a high level for a period of time after exposure, so that Vdata can be read within a period of time after reset and exposure, which can more truly reflect the performance of the device, further ensure that the voltage of the first photosensitive diode PD1 after reset is more accurate, and then the output electrical signal of the predetermined optical sensor is more accurate, further ensuring the accuracy of subsequent ambient light detection.

[0057] In order to further ensure the accuracy of the first voltage after reset, in one embodiment of the present application, t3≤Texpo / 10, where Texpo is the predetermined exposure time, and when the predetermined exposure time is the first exposure time, t3≤Texpo1 / 10. Setting t3 within this range can further ensure that within t3, very few photogenerated carriers are generated after exposure, and the voltage of the current first photosensitive diode PD1 is slightly affected, thereby further ensuring the accurate reading of the first voltage after reset.

[0058] In a specific implementation process, the first voltage and the second voltage may be voltages read at a certain time point in the reading phase, for example, the first voltage is Vdata when the exposure time reaches t3. The first voltage and the second voltage may also be weighted averages of the voltages read in the reading phase, and those skilled in the art may select or calculate the corresponding first voltage and second voltage according to actual conditions.

[0059] The above-mentioned preset exposure time can be the first exposure time or the second exposure time. When the output electrical signal obtained in the first detection step and the second detection step is not within the preset electrical signal range, the determination step also includes other detection steps, and the preset exposure time can also be the exposure time in other detection steps.

[0060] Specifically, Figure 4 As shown, when the frequency conversion driving circuit is used, the circuit needs two pulse timings for one exposure. For example, to complete the first exposure (the corresponding predetermined exposure duration is the exposure stage of Texpo1) and read, it is necessary to mark the first reset signal Reset1 and the corresponding read signal Read after the first reset, and perform continuous exposure according to different exposure durations, for example, the second exposure (the corresponding predetermined exposure duration is the exposure stage of Texpo2) and the third exposure (the corresponding predetermined exposure duration is the exposure stage of Texpo3) in the figure. Among them, light 1, light 2 and light 3 are lights of different light intensities, and the light intensities are arranged from high to low as: light 1, light 2 and light 3, and the Vout potential is Figure 3 Vdata in the circuit.

[0061] Specifically, Figure 4As shown, under stronger light, that is, brightness 1, in the case of the first exposure time Texpo1, the output electrical signal is the first electrical signal Vout1, which is within the back-end reading voltage range (preset electrical signal range), which indicates that the current exposure time matches the ambient light brightness; if the exposure time increases, that is, under Texpo2, the corresponding output electrical signal is the second electrical signal Vout2, which is not within the preset electrical signal range, which indicates that the current exposure time does not match the ambient light brightness; under weaker light 3, in the case of the first exposure time Texpo1, the output electrical signal is Vout3, which is not within the preset electrical signal range, which indicates that the current exposure time does not match the ambient light brightness and the exposure time needs to be increased. When the exposure time is extended to Texpo3, the read electrical signal is within the preset electrical signal range, indicating that the external light matches the light corresponding to Texpo3. It should be noted that Figure 4 The five-pointed star in the figure indicates that the corresponding value is within the preset electrical signal range.

[0062] In order to make the detection circuit structure simpler, in one embodiment of the present application, Figure 5 As shown, the first optical sensor and the second optical sensor are respectively the second photodiode PD2, the detection circuit includes a fourth thin film transistor M4, the first electrode of the fourth thin film transistor M4 is electrically connected to the cathode of the second photodiode PD2, the gate of the fourth thin film transistor M4 is connected to the second reset signal Reset2, the anode of the second photodiode PD2 is connected to the third power supply voltage Vcom, the second electrode of the fourth thin film transistor is connected to the column bus Column bus, wherein the second electrode of the fourth thin film transistor M4 is the predetermined end of the detection circuit.

[0063] Figure 5 The second photodiode PD2 shown in FIG. 1 is equivalent to a capacitor charging and discharging process during the resetting and exposure process, so: Figure 5 The first capacitor C2 does not actually exist in the circuit, but means that the second photodiode PD2 is equivalent to the second capacitor C2.

[0064] In another embodiment, the detection circuit is controlled to reset the voltage of the predetermined optical sensor, and when the reset time reaches the first preset time, the voltage of the predetermined end of the detection circuit is read to obtain the first voltage, the predetermined optical sensor is exposed, and when the exposure time is the predetermined exposure time, the voltage of the predetermined end is read to obtain the second voltage, and the first voltage and the second voltage include the voltage of the predetermined optical sensor, including: controlling the second reset signal Reset2 to be high and the column bus Column bus is powered on, so that the fourth thin film transistor M4 is turned on, the potential of the Q point is substantially equal to the voltage on the column bus, that is, the potential on the cathode of the second photosensitive diode PD2 is high, so that the second photosensitive diode PD2 is reverse biased, that is, the potential of the cathode of the second photosensitive diode PD2 begins to reset; when the second reset signal Reset2 maintains the high level for the first preset time t1, it is considered that the reset has been completed, the first voltage is read, and the second reset signal Reset2 is controlled to be low and the column bus Column bus is powered on. The bus is powered off and the exposure of the second photosensitive diode PD2 is controlled. The second photosensitive diode PD2 will generate electron-hole pairs under light. During the exposure process, the second photosensitive diode PD2 will generate photogenerated carriers, i.e., photogenerated electrons and photogenerated holes. After a certain exposure time, the potential of the Q point decreases. When the exposure continues for the predetermined exposure time, the second voltage is read, and the second reset signal Reset2 is controlled to be high level and the column bus Column bus is powered on. In this method, the output electrical signal can be obtained by controlling the on and off of the fourth transistor and the power on and off of the column bus. This method is simpler and more efficient.

[0065] It should be noted that the first photodiode PD1 and the second photodiode PD2 of the present application may be the same photodiodes or different photodiodes, and those skilled in the art may select a suitable photodiode according to actual conditions.

[0066] It should also be noted that any one of the first thin film transistor, the second thin film transistor, the third thin film transistor and the fourth transistor of the present application can be any feasible thin film transistor in the prior art. Those skilled in the art can select a suitable thin film transistor according to actual conditions. In the embodiment of the present application, the first thin film transistor, the second thin film transistor, the third thin film transistor and the fourth transistor are selected as N-type thin film transistors as examples, but are not limited to this. Optionally, the first thin film transistor, the second thin film transistor, the third thin film transistor and the fourth transistor can also be P-type transistors. In specific applications, the first thin film transistor, the second thin film transistor, the third thin film transistor and the fourth transistor of the present application can independently select any one of an amorphous silicon thin film transistor, a low-temperature polycrystalline silicon thin film transistor, and an organic semiconductor thin film transistor. In addition, one of the first and second electrodes of each of the above-mentioned thin film transistors is a source electrode, and the other is a drain electrode.

[0067] In order to more accurately determine the brightness of the current environment, in an embodiment of the present application, the detection method further includes: determining the brightness range corresponding to the current environment according to the target exposure time to obtain the target brightness range, wherein the target exposure time is the exposure time corresponding to the output electrical signal within the preset electrical signal range, that is, the exposure time matches a certain brightness range, so the corresponding brightness range can be determined according to the target exposure time; determining the correspondence between the output electrical signal and the brightness according to the target brightness range, and in fact, the correspondence between the output electrical signal and the brightness is different within different target brightness ranges, and therefore, the correspondence can be more accurately determined according to the target brightness range, and determining the brightness of the current environment within the target brightness range according to the target output electrical signal and the correspondence, and the target output electrical signal is the output electrical signal within the preset electrical signal range.

[0068] Specifically, please refer to Table 1, which shows the corresponding relationship between target light brightness and target exposure time.

[0069] Table 1

[0070]

[0071] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the brightness detection method of the present application will be described in detail below in conjunction with specific embodiments.

[0072] This embodiment relates to a specific method for detecting light brightness, comprising the following steps:

[0073] Step 1: Control the detection circuit to reset the voltage of the predetermined optical sensor, and when the reset time reaches a first preset time, read the voltage of the predetermined end of the detection circuit to obtain a first voltage;

[0074] Step 2: exposing a predetermined optical sensor, and reading a voltage at a predetermined end when the exposure time is predetermined to obtain a second voltage;

[0075] Step 3: performing a difference operation on the first voltage and the second voltage to obtain an output electrical signal of the optical sensor, wherein the exposure time is set according to whether the output electrical signal is within a predetermined signal range, and the detection is stopped until the output electrical signal is within the predetermined signal range;

[0076] Step 4: Determine the brightness range corresponding to the current environment according to the target exposure time to obtain the target brightness range;

[0077] Step 5: Determine the corresponding relationship between the target output electrical signal and the light brightness within the target light brightness range, and determine the light brightness of the above current environment within the target light brightness range according to the target output electrical signal and the corresponding relationship.

[0078] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0079] The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory. One or more kernels can be provided, and the problem of low detection accuracy of the ambient light sensor in the prior art is solved by adjusting the kernel parameters.

[0080] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0081] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to perform the brightness detection method, the method comprising:

[0082] Step S201, a first detection step, detects an output electrical signal of a first optical sensor within a first exposure time.

[0083] Step S202, a second detection step, detects the output electrical signal of the second optical sensor within a second exposure time, and the second exposure time is different from the first exposure time.

[0084] Step S203, a determination step, in all the detection steps, if the obtained output electrical signal is within the preset electrical signal range, stop the detection.

[0085] An embodiment of the present invention provides a processor, the processor is used to run a program, wherein when the program is run, the brightness detection method is executed, the method comprising:

[0086] Step S201, a first detection step, detects an output electrical signal of a first optical sensor within a first exposure time.

[0087] Step S202, a second detection step, detects the output electrical signal of the second optical sensor within a second exposure time, and the second exposure time is different from the first exposure time.

[0088] Step S203, a determination step, in all the detection steps, if the obtained output electrical signal is within the preset electrical signal range, stop the detection.

[0089] An embodiment of the present invention provides an electronic device, comprising at least one optical sensor, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing the processor to execute the above-mentioned various detection methods, and the detection method has at least the following steps:

[0090] Step S201, a first detection step, detects an output electrical signal of a first optical sensor within a first exposure time.

[0091] Step S202, a second detection step, detects the output electrical signal of the second optical sensor within a second exposure time. The second exposure time is different from the first exposure time. The second optical sensor may be the same as the first optical sensor or may be different. When they are the same, the electronic device may include only one optical sensor. When they are different, the electronic device may include multiple optical sensors.

[0092] Step S203, a determination step, in all the detection steps, if the obtained output electrical signal is within the preset electrical signal range, stop the detection.

[0093] In the light brightness detection method performed by the electronic device, different exposure time driving is adopted, that is, a variable frequency method is adopted to drive the optical sensor for exposure, and the ambient light brightness is determined according to the exposure time corresponding to when the electrical signal obtained from the test is within a preset electrical signal range, thereby solving the problem of low detection accuracy of the ambient light sensor in the prior art.

[0094] In order to more accurately detect the light signal and output the corresponding result more accurately, thereby further improving the detection accuracy of the optical sensor, in one embodiment of the present application, the first optical sensor and the second optical sensor are respectively a first photodiode PD1, which generates a photocurrent under light, causing the Q point potential of the first photodiode PD1 to change, thereby detecting the ambient light brightness. Figure 3 As shown, the detection circuit includes a first thin film transistor M1, a second thin film transistor M2 and a third thin film transistor M3, the first electrode of the first thin film transistor M1 is electrically connected to the gate of the second thin film transistor M2 and the cathode of the first photosensitive diode PD1, the gate of the first thin film transistor M1 is connected to the first reset signal Reset1, the second electrode of the first thin film transistor M1 is connected to the first power supply voltage Vreset, the first electrode of the second thin film transistor M2 is electrically connected to the second electrode of the third thin film transistor M3, the second electrode of the second thin film transistor M2 is connected to the second power supply voltage Vdd, the anode of the first photosensitive diode PD1 is connected to the third power supply voltage Vcom, the gate of the third thin film transistor is connected to the read signal Read, the first electrode of the third thin film transistor is a voltage reading terminal, and its detection voltage is Vdata.

[0095] Figure 3 The process of resetting and exposing the first photodiode PD1 shown in FIG. 1 is equivalent to a process of charging and discharging a capacitor, so: Figure 3 The first capacitor C1 in the circuit does not actually exist, but means that the first photodiode PD1 is equivalent to the first capacitor C1.

[0096] In another embodiment, in order to make the detection circuit structure simpler, in an embodiment of the present application, as Figure 5As shown, the optical sensor is a second photodiode PD2, and the electronic device further includes a detection circuit, which includes a fourth thin film transistor M4, a first electrode of the fourth thin film transistor M4 is electrically connected to the cathode of the second photodiode PD2, a gate of the fourth thin film transistor M4 is connected to a second reset signal Reset2, an anode of the second photodiode PD2 is connected to a third power supply voltage Vcom, a second electrode of the fourth thin film transistor is connected to a column bus Columnbus, a second electrode of the fourth thin film transistor is a voltage reading terminal, and the second reset signal is used to reset the potential of the cathode of the second photodiode PD2, thereby making the detection circuit structure in the electronic device simpler.

[0097] Figure 5 The second photodiode PD2 shown in FIG. 1 is equivalent to a capacitor charging and discharging process during the resetting and exposure process, so: Figure 5 The first capacitor C2 does not actually exist in the circuit, but means that the second photodiode PD2 is equivalent to the second capacitor C2.

[0098] In another embodiment, there are at least two optical sensors, namely a first optical sensor and a second optical sensor. The two optical sensors can more quickly determine the target exposure time, so that the electronic device can detect the ambient light brightness more efficiently.

[0099] In another embodiment, the electronic device is a display device. Display devices often need to detect the brightness of ambient light so that the display mode can be adjusted according to the brightness of ambient light.

[0100] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0101] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0102] Step S201, a first detection step, detects an output electrical signal of a first optical sensor within a first exposure time.

[0103] Step S202, a second detection step, detects the output electrical signal of the second optical sensor within a second exposure time, and the second exposure time is different from the first exposure time.

[0104] Step S203, a determination step, in all the detection steps, if the obtained output electrical signal is within the preset electrical signal range, stop the detection.

[0105] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0106] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0107] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0110] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0111] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0112] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0113] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0114] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0115] In the above embodiment, first, the output electrical signal of the first optical sensor is detected within the first exposure time; second, the output electrical signal of the second optical sensor is detected within the second exposure time, and the second exposure time is different from the first exposure time; finally, in all the detection steps, if the output electrical signal obtained is within the preset electrical signal range, the detection is stopped. Compared with the scheme in the prior art where the optical sensor timing is set to a fixed exposure time and cannot be adjusted according to the ambient light brightness, the scheme of the present application adopts different exposure time driving, that is, driving by frequency conversion, and determines the ambient light brightness according to the frequency corresponding to the electrical signal obtained by the test when it is within the preset electrical signal range, thereby solving the problem of low detection accuracy of the ambient light sensor in the prior art.

[0116] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for detecting light brightness, characterized in that: The method comprises: A first detection step, detecting an output electrical signal of a first optical sensor within a first exposure time; a second detection step, detecting an output electrical signal of a second optical sensor within a second exposure time, wherein the second exposure time is different from the first exposure time; The determination step is to stop the detection if the output electrical signal obtained in all the detection steps is within the preset electrical signal range.

2. The detection method according to claim 1, characterized in that: The first optical sensor and the second optical sensor are the same optical sensor, The second detection step comprises: When it is determined that the output electrical signal in the first detection step is not within the preset electrical signal range, detecting the output electrical signal of the second optical sensor within the second exposure time; The determining step comprises: When the output electrical signal acquired in the second detection step is within a preset electrical signal range, the detection is stopped.

3. The detection method according to claim 1, characterized in that: The first optical sensor and the second optical sensor are different optical sensors, and the first detection step and the second detection step are performed simultaneously.

4. The detection method according to any one of claims 1 to 3, characterized in that: The first detection step and / or the second detection step comprises: Controlling the detection circuit to reset the voltage of the predetermined optical sensor, and when the reset time reaches a first preset time, reading the voltage of the predetermined end of the detection circuit to obtain a first voltage, exposing the predetermined optical sensor, and when the exposure time is a predetermined exposure time, reading the voltage of the predetermined end to obtain a second voltage; calculating the difference between the first voltage and the second voltage to obtain an output electrical signal of the predetermined optical sensor, Among them, in the first detection step, the predetermined optical sensor is the first optical sensor, and the predetermined exposure time is the first exposure time; in the second detection step, the predetermined optical sensor is the second optical sensor, and the predetermined exposure time is the second exposure time.

5. The detection method according to claim 4, characterized in that: The first optical sensor and the second optical sensor are respectively first photosensitive diodes, and the detection circuit includes a first thin film transistor, a second thin film transistor and a third thin film transistor, the first electrode of the first thin film transistor is respectively electrically connected to the gate of the second thin film transistor and the cathode of the first photosensitive diode, the gate of the first thin film transistor is connected to a first reset signal, the second electrode of the first thin film transistor is connected to a first power supply voltage, the first electrode of the second thin film transistor is electrically connected to the second electrode of the third thin film transistor, the second electrode of the second thin film transistor is connected to a second power supply voltage, the anode of the first photosensitive diode is connected to a third power supply voltage, the gate of the third thin film transistor is connected to a read signal, and the first electrode of the third thin film transistor is the predetermined end of the detection circuit.

6. The detection method according to claim 5, characterized in that: Controlling the detection circuit to reset the voltage of the predetermined optical sensor, and when the reset time reaches a first preset time, reading the voltage of the predetermined end of the detection circuit to obtain a first voltage, exposing the predetermined optical sensor, and when the exposure time is a predetermined exposure time, reading the voltage of the predetermined end to obtain a second voltage, wherein the first voltage and the second voltage include the voltage of the predetermined optical sensor, including: Controlling the read signal to be at a high level so that the third thin film transistor is turned on; When the read signal maintains a high level for a second preset time, controlling the first reset signal to be a high level, so that the first thin film transistor and the second thin film transistor are turned on, thereby resetting the cathode potential of the first photosensitive diode; When the first reset signal maintains the high level for the first preset time, reading the first voltage, and controlling the first reset signal to be a low level and starting to expose the first photosensitive diode; When the exposure time reaches a third preset time, the read signal is controlled to be at a low level, and when the read signal maintains the low level for a fourth preset time, the read signal is controlled to be at a high level; When the exposure time reaches the predetermined exposure time, the second voltage is read and the first reset signal is synchronously controlled to be high level, and the predetermined exposure time is greater than the sum of the third preset time and the fourth preset time.

7. The detection method according to claim 4, characterized in that: The first optical sensor and the second optical sensor are respectively second photosensitive diodes, and the detection circuit includes a fourth thin film transistor, a first electrode of the fourth thin film transistor is electrically connected to the cathode of the second photosensitive diode, a gate of the fourth thin film transistor is connected to a second reset signal, an anode of the second photosensitive diode is connected to a third power supply voltage, and a second electrode of the fourth thin film transistor is connected to a column bus, wherein the second electrode of the fourth thin film transistor is the predetermined end of the detection circuit.

8. The detection method according to claim 7, characterized in that: Controlling the detection circuit to reset the voltage of the predetermined optical sensor, and when the reset time reaches a first preset time, reading the voltage of the predetermined end of the detection circuit to obtain a first voltage, exposing the predetermined optical sensor, and when the exposure time is a predetermined exposure time, reading the voltage of the predetermined end to obtain a second voltage, wherein the first voltage and the second voltage include the voltage of the predetermined optical sensor, including: Controlling the second reset signal to be at a high level and powering on the column bus, so that the fourth thin film transistor is turned on, thereby resetting the cathode potential of the second photosensitive diode; When the second reset signal maintains the high level for the first preset time, reading the first voltage, controlling the second reset signal to be a low level, powering off the column bus, and controlling the second photosensitive diode to start exposing; When the exposure lasts for the predetermined exposure time, the second voltage is read, and the second reset signal is controlled to be at a high level and the column bus is powered on.

9. The detection method according to any one of claims 1 to 3, characterized in that: The detection method further comprises: Determine the brightness range corresponding to the current environment according to the target exposure time to obtain the target brightness range, wherein the target exposure time is the exposure time corresponding to the output electrical signal within the preset electrical signal range; According to the target light brightness range, the correspondence between the output electrical signal and the light brightness is determined; according to the target output electrical signal and the correspondence, the light brightness of the current environment is determined within the target light brightness range; the target output electrical signal is the output electrical signal within the preset electrical signal range.

10. An electronic device, characterized in that: The device comprises at least one optical sensor, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the detection method described in any one of claims 1 to 9.

11. The electronic device according to claim 10, characterized in that: The optical sensor is a first photosensitive diode. The electronic device also includes a detection circuit, which includes a first thin film transistor, a second thin film transistor and a third thin film transistor. The first electrode of the first thin film transistor is electrically connected to the gate of the second thin film transistor and the cathode of the first photosensitive diode respectively, the gate of the first thin film transistor is connected to a first reset signal, the second electrode of the first thin film transistor is connected to a first power supply voltage, the first electrode of the second thin film transistor is electrically connected to the second electrode of the third thin film transistor, the second electrode of the second thin film transistor is connected to a second power supply voltage, the anode of the first photosensitive diode is connected to a third power supply voltage, the gate of the third thin film transistor is connected to a reading signal, the first electrode of the third thin film transistor is a voltage reading terminal, the first reset signal is used to reset the potential of the cathode of the first photosensitive diode, and the reading signal is used to control the on and off of the third thin film transistor.

12. The electronic device according to claim 10, characterized in that: The optical sensor is a second photosensitive diode. The electronic device also includes a detection circuit, which includes a fourth thin film transistor. The first electrode of the fourth thin film transistor is electrically connected to the cathode of the second photosensitive diode. The gate of the fourth thin film transistor is connected to a second reset signal. The anode of the second photosensitive diode is connected to a third power supply voltage. The second electrode of the fourth thin film transistor is connected to a column bus. The second electrode of the fourth thin film transistor is a voltage reading terminal. The second reset signal is used to reset the potential of the cathode of the second photosensitive diode.

13. The electronic device according to claim 10, characterized in that: There are at least two optical sensors, namely a first optical sensor and a second optical sensor.

14. The electronic device according to any one of claims 10 to 13, characterized in that: The electronic device is a display device.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the detection method according to any one of claims 1 to 9.

16. A processor, characterized in that: The processor is used to run a program, wherein the program executes the detection method according to any one of claims 1 to 9 when running.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.