Ambient light acquisition method and device, electronic equipment and readable storage medium

By arranging light-emitting diodes on electronic devices and using their photocurrent in the cut-off state to collect ambient light brightness, the high cost and appearance problems of light sensors in the existing technology are solved, and economical and aesthetic effects of ambient light collection are achieved.

CN118711548APending Publication Date: 2024-09-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310312558.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The ambient light collection method in existing electronic equipment requires a light sensor to be installed in a hole on the back of the equipment, which is costly and affects the aesthetic appearance.

Method used

Set up a light-emitting diode on the electronic device, and control it to work in the cut-off state through a switch, using photocurrent to collect ambient light brightness, avoiding the use of a light sensor and opening a hole on the back.

Benefits of technology

The cost is reduced, the aesthetics of the device is maintained, and the accurate collection of ambient light brightness is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118711548A
    Figure CN118711548A
Patent Text Reader

Abstract

The invention relates to an ambient light acquisition method and device, electronic equipment and a readable storage medium, and the method comprises the steps: the electronic equipment is provided with a light-emitting diode, the positive electrode of the light-emitting diode is connected with a light-emitting drive circuit or a signal processing circuit through a first switch, and the negative electrode of the light-emitting diode is connected with a power supply or grounded through a second switch; controlling the light-emitting diode to work in a cut-off state through the first switch and the second switch, obtaining light current generated by the light-emitting diode in the cut-off state under the action of ambient light, and determining ambient light brightness corresponding to the light current; the brightness of the ambient light is determined according to the magnitude of the light current generated by the light-emitting diode in the cut-off state under the action of the ambient light, the situation that the brightness of the ambient light is collected through a light sensor is avoided, the cost is saved, and the situation that the light sensor is holed on the back face of the electronic equipment is avoided, so that the electronic equipment is more attractive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of ambient light collection, and in particular to an ambient light collection method, device, electronic device and readable storage medium. Background Art

[0002] The automatic adjustment function of the display brightness has become popular in electronic devices such as mobile phones and watches, which improves the readability of multiple scenes and greatly enhances the user experience. The automatic adjustment function of the display brightness refers to automatically adjusting the brightness of the display based on changes in ambient light. The higher the brightness of the ambient light, the higher the brightness of the display. However, most of the current methods of collecting ambient light are to set one or more light sensors on the back of the electronic device, that is, the non-screen side, to collect the brightness of the ambient light. This method requires opening a hole on the back of the electronic device to facilitate the light sensor to collect ambient light. However, the method of collecting ambient light through a light sensor is costly, and opening a hole on the back of an electronic device will affect the appearance of the device. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an ambient light collection method, device, electronic device and readable storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an ambient light collection method, which is applied to an electronic device, wherein a light emitting diode is provided on the electronic device, and the electronic device is provided with a light emitting driving circuit and a signal processing circuit, wherein the positive electrode of the light emitting diode is connected to the light emitting driving circuit or the signal processing circuit through a first switch, and the negative electrode of the light emitting diode is connected to a power supply or ground through a second switch; the method comprises: controlling the light emitting diode to work in a cut-off state through the first switch and the second switch; obtaining a photocurrent generated by the light emitting diode in the cut-off state under the action of ambient light; and determining the ambient light brightness corresponding to the photocurrent. .

[0005] Optionally, controlling the light-emitting diode to operate in a cut-off state through the first switch and the second switch includes: controlling the positive electrode of the light-emitting diode to be disconnected from the light-emitting driving circuit through the first switch, and controlling the positive electrode of the light-emitting diode to be connected to the signal processing circuit through the first switch; and controlling the negative electrode of the light-emitting diode to be connected to the power supply through the second switch.

[0006] Optionally, the ambient light collection method further includes: controlling the light emitting diode to operate in a flash mode through the first switch and the second switch.

[0007] Optionally, controlling the light-emitting diode to operate in a flash mode through the first switch and the second switch includes: controlling the positive electrode of the light-emitting diode to be connected to the light-emitting driving circuit through the first switch, and controlling the positive electrode of the light-emitting diode to be disconnected from the signal processing circuit through the first switch; and controlling the negative electrode of the light-emitting diode to be grounded through the second switch.

[0008] Optionally, determining the ambient light intensity corresponding to the photocurrent includes:

[0009] The signal processing circuit is controlled to determine the ambient light brightness corresponding to the photocurrent through a conversion algorithm.

[0010] Optionally, the method for determining the conversion algorithm includes: obtaining multiple photocurrents generated by the light-emitting diode under different types of common light sources with different brightnesses; for multiple types of the common light sources, linearly fitting the correspondence between the brightness and photocurrent of the same type of common light sources to obtain multiple correspondences corresponding to the different types of common light sources with different brightnesses; and using the multiple correspondences as the conversion algorithm.

[0011] Optionally, controlling the signal processing circuit to determine the ambient light brightness corresponding to the photocurrent through a conversion algorithm includes: determining the type of ambient light in which the electronic device is located; and determining the ambient light brightness corresponding to the photocurrent according to a conversion algorithm corresponding to the ambient light corresponding to the type.

[0012] According to a second aspect of an embodiment of the present disclosure, there is provided an ambient light collection device, which is applied to an electronic device, wherein a light emitting diode is arranged on the electronic device, and the electronic device is provided with a light emitting diode, characterized in that the electronic device is provided with a light emitting driving circuit and a signal processing circuit, the positive electrode of the light emitting diode is connected to the light emitting driving circuit or the signal processing circuit through a first switch, and the negative electrode of the light emitting diode is connected to a power supply or ground through a second switch; the device comprises: a control module, configured to control the light emitting diode to operate in a cut-off state through the first switch and the second switch; an acquisition module, configured to acquire a photocurrent generated by the light emitting diode in the cut-off state under the action of ambient light; and a processing module, configured to determine the ambient light brightness corresponding to the photocurrent.

[0013] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the aforementioned ambient light collection method.

[0014] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the ambient light collection method provided in the first aspect of the present disclosure are implemented.

[0015] According to a fifth aspect of an embodiment of the present disclosure, a chip is provided, including a processor and an interface; the processor is used to read instructions to execute the steps of the aforementioned ambient light collection method.

[0016] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: a light-emitting diode is arranged on the electronic device, the positive electrode of the light-emitting diode is connected to the light-emitting driving circuit or the signal processing circuit through the first switch, and the negative electrode of the light-emitting diode is connected to the power supply or the ground through the second switch; the light-emitting diode is controlled to operate in a cut-off state through the first switch and the second switch, the photocurrent generated by the light-emitting diode in the cut-off state under the action of ambient light is obtained, and the ambient light brightness corresponding to the photocurrent is determined; the ambient light brightness is determined by the magnitude of the photocurrent generated by the light-emitting diode in the cut-off state under the action of ambient light, thereby avoiding the use of a light sensor to collect the brightness of the ambient light, saving costs, and avoiding opening a hole for the light sensor on the back of the electronic device, making the electronic device more beautiful.

[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0019] Figure 1 The present invention is a schematic diagram of the structure of a computer system according to an exemplary embodiment of the present invention.

[0020] Figure 2 The present invention is a flowchart of an ambient light collection method according to an exemplary embodiment of the present invention.

[0021] Figure 3 The figure is a schematic diagram of a structure of ambient light collection shown in an exemplary embodiment of the present disclosure.

[0022] Figure 4 The present invention is a schematic diagram of a circuit connection of a light emitting diode according to an exemplary embodiment of the present invention.

[0023] Figure 5 This is a schematic diagram of another circuit connection of a light emitting diode according to an exemplary embodiment of the present disclosure.

[0024] Figure 6The figure is a block diagram of an ambient light collection device according to an exemplary embodiment.

[0025] Figure 7 The present invention is a block diagram of a device according to an exemplary embodiment. DETAILED DESCRIPTION

[0026] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0027] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar thereto. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0028] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first switch can also be referred to as the second switch, and similarly, the second switch can also be referred to as the first switch.

[0029] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0030] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0031] Figure 1 A schematic diagram of the structure of a computer system provided by an exemplary embodiment of the present disclosure is shown. The computer system includes a terminal 120 and a server 140 .

[0032] The terminal 120 and the server 140 are connected to each other via a wired or wireless network.

[0033] The terminal 120 may include at least one of a smart phone, a laptop computer, a desktop computer, a tablet computer, and a smart speaker.

[0034] Terminal 120 includes a display; the brightness of the display can be automatically adjusted by the terminal.

[0035] The terminal 120 includes a first memory and a first processor. A first program is stored in the first memory; the first program is called and executed by the first processor to implement the ambient light collection method provided by the present disclosure. The first memory may include but is not limited to the following: Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electric Erasable Programmable Read-Only Memory (EEPROM).

[0036] The first processor may be composed of one or more integrated circuit chips. Optionally, the first processor may be a general-purpose processor, such as a central processing unit (CPU) or a network processor (NP). Optionally, the first processor may be used to implement the ambient light collection method provided in the present disclosure.

[0037] Figure 2 A flowchart of an ambient light collection method is shown in an exemplary embodiment of the present disclosure. Figure 2 As shown, the ambient light collection method is performed by an electronic device, for example, by Figure 1 The electronic device is provided with a light emitting diode. The ambient light collection method comprises the following steps.

[0038] In step S21, the light emitting diode is controlled to operate in a cut-off state by the first switch and the second switch.

[0039] A diode is an electronic device made of semiconductor materials, including silicon, selenium, germanium, etc. A diode has two electrodes, the positive electrode, also called the anode, and the negative electrode, also called the cathode. When a forward voltage is applied between the two electrodes of the diode, the diode is turned on, and when a reverse voltage is applied, the diode is turned off. The conduction and cutoff of a diode are equivalent to the on and off of a switch.

[0040] A light-emitting diode is a type of diode. It is a unidirectional conducting device that only allows current to flow from the positive electrode to the negative electrode. Therefore, when a forward voltage is applied between the two stages of the light-emitting diode, the light-emitting diode is in the on state and emits light; when a reverse voltage is applied between the two stages of the light-emitting diode, the light-emitting diode is reverse biased, in the cut-off state, and does not emit light.

[0041] The LED is reverse biased because the reverse current of the LED is very small under the condition of no light, which is called dark current; under the condition of light, the reverse current of the LED will increase sharply, which is called photocurrent, and the magnitude of the photocurrent has a certain correspondence with the brightness of the ambient light, which is affected by the type of ambient light and the brightness of the ambient light. Therefore, when the LED is working in the cut-off state, the photocurrent generated by the LED in the cut-off state under the action of ambient light can be obtained, and the brightness of the ambient light can be inferred based on the magnitude of the photocurrent and the corresponding relationship.

[0042] In one embodiment, the light emitting diode is arranged on the back of the electronic device as a rear flash of the electronic device. In one embodiment, the light emitting diode is arranged on the front of the electronic device as a front flash of the electronic device.

[0043] It should be noted that the surface of the electronic device where the screen is located is referred to as the front side of the electronic device, and the non-screen surface is referred to as the back side of the electronic device.

[0044] The positive electrode of the light emitting diode is connected to the light emitting driving circuit or the signal processing circuit through the first switch, and the negative electrode of the light emitting diode is connected to the power supply or the ground through the second switch. The light emitting driving circuit is used to drive the light emitting diode to emit light, and the signal processing circuit is used to process the photocurrent signal generated by the light emitting diode.

[0045] Exemplarily, the first switch and the second switch are both single-pole double-throw switches, and the first switch can control the positive electrode of the light-emitting diode to be connected to the light-emitting driving circuit or the signal processing circuit, and the second switch can control the negative electrode of the light-emitting diode to be connected to the power supply or the ground.

[0046] In step S22, a photocurrent generated by the light emitting diode in the cut-off state under the effect of ambient light is obtained.

[0047] In the above steps, the working state of the light emitting diode is controlled to be in the cut-off state, and the light emitting diode in the cut-off state generates a photocurrent under the action of ambient light, and the magnitude of the photocurrent will change accordingly when the brightness or type of the ambient light changes. Therefore, the photocurrent generated by the light emitting diode under the action of the ambient light in the current environment is obtained, so as to calculate the corresponding ambient light brightness according to the magnitude of the photocurrent in the subsequent steps.

[0048] In step S23, the ambient light brightness corresponding to the photocurrent is determined.

[0049] For example, when the light-emitting diode is operating in the cut-off state, the correspondence between the brightness of various types of commonly used light sources and the size of the photocurrent can be determined in advance, and the correspondence can be used as a conversion algorithm for the ambient light brightness and the photocurrent size, and then the ambient light brightness corresponding to the photocurrent can be determined through the conversion algorithm.

[0050] The brightness of the ambient light is determined by the size of the photocurrent generated by the light-emitting diode in the cut-off state under the action of ambient light, avoiding the need to collect the brightness of the ambient light through a light sensor, saving costs, and avoiding the need to open a hole for the light sensor on the back of the electronic device, making the electronic device more beautiful.

[0051] See also Figure 3 , Figure 3 FIG. 1 is a flow chart of another ambient light collection method shown in an exemplary embodiment of the present disclosure. The method is executed by an electronic device, for example, Figure 1 The computer system shown is executed by a terminal.

[0052] The electronic device is provided with a light emitting diode, see Figure 4 , Figure 4 The present invention is a schematic diagram of a circuit connection of a light emitting diode according to an exemplary embodiment of the present invention. Figure 4 In the embodiment, the positive electrode of the light emitting diode is connected to the light emitting driving circuit or the signal processing circuit through the first switch, and the negative electrode of the light emitting diode is connected to the power supply or the ground through the second switch.

[0053] The light emitting diode can be controlled to operate in a cut-off state or a conducting state by means of the first switch and the second switch.

[0054] The light-emitting driving circuit is used to drive the light-emitting diode to emit light. Exemplarily, the light-emitting diode is controlled to operate in a flash mode through a first switch and a second switch, that is, the light-emitting diode is driven to emit light. The positive electrode of the light-emitting diode is controlled by the first switch to be connected to the light-emitting driving circuit and disconnected from the signal processing circuit. The negative electrode of the light-emitting diode is controlled by the second switch to be grounded. At this time, the light-emitting diode is in an on state, and the light-emitting diode emits light under the drive of the light-emitting driving circuit.

[0055] The signal processing circuit is used to process the photocurrent generated by ambient light of different brightness, and determine the corresponding ambient light brightness according to the magnitude of the photocurrent. Exemplarily, the positive electrode of the light-emitting diode is electrically connected to the signal processing circuit, the negative electrode of the light-emitting diode is connected to the power supply, the light-emitting diode is reverse biased, and works in the cut-off state. Under the action of ambient light, the light-emitting diode generates a photocurrent, and the signal processing circuit determines the brightness of the ambient light according to the magnitude of the photocurrent.

[0056] It should be noted that Figure 3 The ambient light collection method shown is similar to Figure 2 The implementation methods of the ambient light collection methods shown are consistent with each other. Figure 3 For reference not mentioned in Figure 2 The description will not be repeated here. Figure 3 The ambient light collection method shown includes the following steps:

[0057] In step S31, the light emitting diode is controlled to operate in a cut-off state through the first switch and the second switch.

[0058] Please continue reading Figure 4 For example, the positive electrode of the light-emitting diode can be connected to the light-emitting driving circuit or the signal processing circuit by controlling the first switch, and the negative electrode of the light-emitting diode can be connected to the power supply or the ground by controlling the second switch.

[0059] In one implementation, two switches, namely the third switch and the fourth switch, may be provided at the positive electrode of the light emitting diode, and two switches, namely the fifth switch and the sixth switch, may be provided at the negative electrode of the light emitting diode. Figure 5 , Figure 5 Another circuit connection diagram of a light-emitting diode is shown in an exemplary embodiment of the present disclosure. Exemplarily, the light-emitting diode can be controlled to operate in a cut-off state or a conducting state by opening or closing the third switch, the fourth switch, the fifth switch, and the sixth switch. For example, when the third switch is opened, the fourth switch is closed, the third and fifth switches are opened, and the sixth switch is closed, the positive electrode of the light-emitting diode is electrically connected to the signal processing circuit, the negative electrode of the light-emitting diode is connected to the power supply, and the light-emitting diode is reverse biased and operates in a cut-off state.

[0060] In one embodiment, the light emitting diode is arranged on the back of the electronic device as a rear flash of the electronic device. In one embodiment, the light emitting diode is arranged on the front of the electronic device as a front flash of the electronic device. It should be noted that the surface where the screen of the electronic device is located is regarded as the front of the electronic device, and the non-screen surface is regarded as the back of the electronic device.

[0061] For matters not described in step S31 , reference may be made to the description in step S21 .

[0062] In step S32, the photocurrent generated by the light emitting diode in the cut-off state under the effect of ambient light is obtained.

[0063] When the light emitting diode works in the cut-off state, the light emitting diode will generate photocurrent under the action of ambient light, and the photocurrent generated by the light emitting diode in the cut-off state under the action of ambient light is obtained.

[0064] For matters not described in step S32 , reference may be made to the description in step S22 .

[0065] In step S33, the control signal processing circuit determines the ambient light brightness corresponding to the photocurrent through a conversion algorithm.

[0066] The signal processing circuit obtains the photocurrent generated by the light emitting diode in the cut-off state under the action of the ambient light, and determines the brightness of the ambient light according to the magnitude of the photocurrent based on the conversion algorithm.

[0067] It should be noted that the conversion algorithm is determined in the following manner: obtaining multiple photocurrents generated by light-emitting diodes under different types of commonly used light sources with different brightnesses, and linearly fitting the corresponding relationship between the brightness and photocurrent of the same type of commonly used light sources for multiple types of commonly used light sources to obtain multiple corresponding relationships corresponding to different types of commonly used light sources with different brightnesses; that is, linearly fitting the brightness and photocurrent of different types of commonly used light sources to obtain the corresponding relationship between the brightness and photocurrent of different types of commonly used light sources. The obtained multiple corresponding relationships are used as the conversion algorithm. Exemplarily, the light-emitting diode is illuminated by various types of commonly used light sources with different brightnesses, and the light signal receiver of the light-emitting diode generates different photocurrents based on the received light source, that is, the photocurrents corresponding to commonly used light sources of different types and different brightnesses, and the corresponding relationship between the brightness and photocurrent of the same type of commonly used light sources is linearly fitted, and this corresponding relationship is used as the conversion algorithm.

[0068] The control signal processing circuit determines the ambient light brightness corresponding to the photocurrent through a conversion algorithm, including: determining the type of ambient light in which the electronic device is located, and determining the ambient light brightness corresponding to the photocurrent according to a conversion algorithm corresponding to the ambient light of the type. Exemplarily, the type of ambient light currently in which the electronic device is located is first determined, and then the ambient light brightness corresponding to the current photocurrent is determined according to a conversion algorithm corresponding to the type of ambient light.

[0069] The ambient light collection method provided by the present disclosure can be further promoted to any electronic device with a light-emitting diode display lamp bead in front, and only needs to add Figure 4The circuit shown can collect the brightness of ambient light, avoiding the need to collect the brightness of ambient light through a light sensor, saving costs, and avoiding the need to open a hole for the light sensor on the back of the electronic device.

[0070] In summary, the ambient light collection method provided by the present disclosure includes: arranging a light-emitting diode on an electronic device, the electronic device is provided with a light-emitting driving circuit and a signal processing circuit, the positive electrode of the light-emitting diode is connected to the light-emitting driving circuit or the signal processing circuit through a first switch, and the negative electrode of the light-emitting diode is connected to a power supply or ground through a second switch, the light-emitting diode is controlled to operate in a cut-off state through the first switch and the second switch, the photocurrent generated by the light-emitting diode in the cut-off state under the action of ambient light is obtained, and the ambient light brightness corresponding to the photocurrent is determined; the ambient light brightness is determined by the size of the photocurrent generated by the light-emitting diode in the cut-off state under the action of ambient light, thereby avoiding the use of a light sensor to collect the brightness of the ambient light, saving costs, and avoiding opening a hole for the light sensor on the back of the electronic device, making the electronic device more beautiful.

[0071] Figure 6 The block diagram of an ambient light collection device is shown in an exemplary embodiment of the present disclosure. The ambient light collection device is applied to an electronic device, and a light emitting diode is provided on the electronic device, and the electronic device is provided with a light emitting driving circuit and a signal processing circuit. The positive electrode of the light emitting diode is connected to the light emitting driving circuit or the signal processing circuit through a first switch, and the negative electrode of the light emitting diode is connected to a power supply or ground through a second switch; Figure 6 The ambient light collection device 20 includes a control module 201 , an acquisition module 202 and a processing module 203 .

[0072] The control module 201 is configured to control the light emitting diode to operate in a cut-off state through the first switch or the second switch;

[0073] The acquisition module 202 is configured to acquire the photocurrent generated by the light emitting diode in the cut-off state under the action of ambient light;

[0074] The processing module 203 is configured to determine the ambient light brightness corresponding to the photocurrent.

[0075] Optionally, the control module 201 is further configured to control the positive electrode of the light-emitting diode to be disconnected from the light-emitting driving circuit through the first switch, and control the positive electrode of the light-emitting diode to be connected to the signal processing circuit through the first switch;

[0076] The cathode of the light emitting diode is controlled to be connected to the power source through the second switch.

[0077] Optionally, the control module 201 is further configured to control the light emitting diode to operate in a flash mode through the first switch and the second switch.

[0078] Optionally, the control module 201 is further configured to control the positive electrode of the light-emitting diode to be connected to the light-emitting driving circuit through the first switch, and to control the positive electrode of the light-emitting diode to be disconnected from the signal processing circuit through the first switch;

[0079] The cathode of the light emitting diode is controlled to be grounded by the second switch.

[0080] Optionally, the processing module 203 is further configured to control the signal processing circuit to determine the ambient light brightness corresponding to the photocurrent through a conversion algorithm.

[0081] Optionally, the processing module 203 is further configured to obtain a plurality of photocurrents generated by the light emitting diode under different types of commonly used light sources with different brightness;

[0082] For the plurality of types of the commonly used light sources, linearly fitting the corresponding relationship between the brightness and the photocurrent of the commonly used light sources of the same type, so as to obtain a plurality of corresponding relationships corresponding to the commonly used light sources of different types and different brightnesses;

[0083] The multiple corresponding relationships are used as the conversion algorithm.

[0084] Optionally, the processing module 203 is further configured to determine the type of the ambient light in which the electronic device is located;

[0085] The ambient light brightness corresponding to the photocurrent is determined according to a conversion algorithm corresponding to the ambient light corresponding to the type.

[0086] Optionally, the light emitting diode is configured as a rear flash of the electronic device, or the light emitting diode is configured as a front flash of the electronic device.

[0087] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0088] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and the program instructions, when executed by a processor, implement the steps of the ambient light collection method provided by the present disclosure.

[0089] Figure 7800 is a block diagram of a device for collecting ambient light according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0090] Reference Figure 7 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .

[0091] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned ambient light collection method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0092] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0093] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0094] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0095] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0096] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0097] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0098] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0099] In an exemplary embodiment, the device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned ambient light collection method.

[0100] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of the device 800 to complete the above-mentioned ambient light collection method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0101] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned ambient light collection method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, for example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned ambient light collection method can be implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned ambient light collection method.

[0102] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above ambient light collection method when executed by the programmable device.

[0103] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0104] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An ambient light collection method, applied to an electronic device, wherein the electronic device is provided with a light emitting diode, It is characterized in that The electronic device is provided with a light-emitting driving circuit and a signal processing circuit, the positive electrode of the light-emitting diode is connected to the light-emitting driving circuit or the signal processing circuit through a first switch, and the negative electrode of the light-emitting diode is connected to a power supply or a ground through a second switch; the method comprises: Controlling the light emitting diode to operate in a cut-off state by using the first switch and the second switch; Acquiring a photocurrent generated by the light emitting diode in the cut-off state under the action of ambient light; The ambient light brightness corresponding to the photocurrent is determined.

2. The method according to claim 1, It is characterized in that The step of controlling the light emitting diode to operate in a cut-off state by using the first switch and the second switch includes: The positive electrode of the light emitting diode is disconnected from the light emitting driving circuit by controlling the first switch, and the positive electrode of the light emitting diode is connected to the signal processing circuit by controlling the first switch; The cathode of the light emitting diode is controlled to be connected to the power source through the second switch.

3. The method according to claim 1, It is characterized in that Also includes: The light emitting diode is controlled to work in a flash mode by the first switch and the second switch.

4. The method according to claim 3, It is characterized in that The step of controlling the light emitting diode to operate in a flash mode by using the first switch and the second switch includes: The positive electrode of the light emitting diode is connected to the light driving circuit by controlling the first switch, and the positive electrode of the light emitting diode is disconnected from the signal processing circuit by controlling the first switch; The cathode of the light emitting diode is controlled to be grounded by the second switch.

5. The method according to claim 1, It is characterized in that The determining the ambient light intensity corresponding to the photocurrent includes: The signal processing circuit is controlled to determine the ambient light brightness corresponding to the photocurrent through a conversion algorithm.

6. The method according to claim 5, It is characterized in that The method for determining the conversion algorithm includes: Acquire multiple photocurrents generated by the light emitting diode under different types of commonly used light sources with different brightness; For the plurality of types of the commonly used light sources, linearly fitting the corresponding relationship between the brightness and the photocurrent of the commonly used light sources of the same type, so as to obtain a plurality of corresponding relationships corresponding to the commonly used light sources of different types and different brightnesses; The multiple corresponding relationships are used as the conversion algorithm.

7. The method according to claim 5, It is characterized in that The controlling the signal processing circuit to determine the ambient light brightness corresponding to the photocurrent through a conversion algorithm includes: Determining a type of ambient light in which the electronic device is located; The ambient light brightness corresponding to the photocurrent is determined according to a conversion algorithm corresponding to the ambient light corresponding to the type.

8. An ambient light collection device, applied to an electronic device, wherein the electronic device is provided with a light emitting diode. It is characterized in that The electronic device is provided with a light emitting diode, characterized in that the electronic device is provided with a light emitting driving circuit and a signal processing circuit, the positive electrode of the light emitting diode is connected to the light emitting driving circuit or the signal processing circuit through a first switch, and the negative electrode of the light emitting diode is connected to a power supply or ground through a second switch; the device comprises: A control module, configured to control the light emitting diode to operate in a cut-off state through the first switch and the second switch; An acquisition module is configured to acquire a photocurrent generated by the light emitting diode in the cut-off state under the action of ambient light; The processing module is configured to determine the ambient light brightness corresponding to the photocurrent.

9. An electronic device, It is characterized in that include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the executable instructions to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, It is characterized in that When the program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A chip, It is characterized in that The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 7.