Light control method and electronic device based on ambient light quality detection
By integrating ambient light sensors into commonly used electronic devices, data is collected to adjust the combination of light-emitting devices, solving the problem that ordinary users have difficulty in detecting and adjusting ambient light quality, and realizing convenient eye health management and power consumption optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-11-29
- Publication Date
- 2026-05-29
AI Technical Summary
Ordinary users find it difficult to monitor ambient light quality and adjust light-emitting devices anytime and anywhere to improve eye health, and existing professional instruments are complex to operate and inconvenient to carry.
By integrating ambient light sensors into commonly used electronic devices such as mobile phones, tablets, and smartwatches, ambient light data is collected, location standards are determined, the combination of light-emitting devices is adjusted to achieve preset illumination parameters, and the switching of light-emitting devices is controlled to achieve standard ambient light.
It enables convenient ambient light quality detection and adjustment, improves users' eye health, saves power consumption, and provides personalized light source quality detection services.
Smart Images

Figure CN122121008A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of end-user devices, and more particularly to lighting control methods and electronic devices based on ambient light quality detection. Background Technology
[0002] Nowadays, users are paying increasing attention to eye health and ambient light quality. Ambient light quality often cannot be judged by the naked eye. In such cases, users need to use professional instruments for measurement, such as photometers, illuminometers, and spectrometers. However, for ordinary users, these instruments are complex to operate, inconvenient to carry, and cannot provide ambient light monitoring services at any time, nor can they change the operating status of light-emitting devices in the environment to alter ambient light quality. Summary of the Invention
[0003] This application provides a lighting control method and electronic device based on ambient light quality detection.
[0004] Firstly, this application provides a method for controlling lighting. This method is applied to electronic devices. Preferably, the electronic device is a commonly used and frequently carried device such as a mobile phone, tablet computer, smartwatch, or laptop computer.
[0005] The method includes: acquiring first ambient light data at a first moment; determining the first position of the electronic device at the first moment, the first position corresponding to a first standard; determining whether the ambient light at the first moment conforms to the first standard based on the first ambient light data; when it does not conform to the first standard: acquiring the illumination parameters of M1 light-emitting devices, M1≥1; determining the first combination and the first illumination parameters of each light-emitting device in the first combination based on the illumination parameters of the M1 light-emitting devices, the first combination including M2 light-emitting devices, 1≤M2≤M1, the ambient light data when the M2 light-emitting devices emit light according to the first illumination parameters under simulated conditions conforms to the first standard; issuing a first control command to control the M2 light-emitting devices in the first combination to emit light according to the first illumination parameters, and stopping non-target light-emitting devices from emitting light, the non-target light-emitting devices being the light-emitting devices in the M1 light-emitting devices other than the first combination.
[0006] Implementing the method provided in the first aspect, when it is determined that the current ambient light does not meet the standard (e.g., the first standard) based on the collected ambient light data (e.g., the first ambient light data), the electronic device can acquire the light-emitting devices in the environment and the illumination parameters of each light-emitting device. Based on the illumination parameters of each light-emitting device, a set of light-emitting device combinations that simultaneously emit light under simulated conditions and meet the preset standard (e.g., the first combination) is determined. Then, the light-emitting devices in the above combination are controlled to emit light, while other light-emitting devices do not emit light, thereby changing the ambient light to meet the standard, which can be used for user work and study.
[0007] In some embodiments, the method further includes: before acquiring the illumination parameters of the M1 light-emitting devices, the method further includes: displaying a first prompt message indicating that the ambient light does not meet a first standard; receiving a user operation confirming the adjustment of the ambient light; and acquiring the illumination parameters of the M1 light-emitting devices, specifically including: in response to the user operation confirming the adjustment of the ambient light, acquiring the illumination parameters of the M1 light-emitting devices.
[0008] In focused scenarios such as studying or working, users are sensitive to ambient light. In these situations, if the ambient light is inadequate, users need to adjust it to achieve a healthy eye environment. In other non-focused scenarios, users are not sensitive to ambient light. In these cases, inadequate ambient light generally does not affect the user's eye health, and the user may not need to adjust it. By implementing the above method, electronic devices can choose to adjust or not adjust the ambient light according to the user's needs, giving the user greater freedom of choice.
[0009] In some embodiments, the method further includes: when the first standard is met, displaying a second prompt message indicating that the ambient light meets the first standard. For example, the electronic device may display "Current ambient light meets the standard!" to prompt the user that the current ambient light is suitable for activities such as work and study.
[0010] In some embodiments, the method further includes: acquiring second ambient light data at a second time point, the second time point being after the issuance of the first control command; and determining whether the ambient light at the second time point conforms to the first standard based on the second ambient light data.
[0011] That is, after controlling the light-emitting devices to emit light or not emit light according to the calculated combination of light-emitting devices, the electronic device can also collect ambient light again to obtain environmental data (such as second ambient light data) to further verify whether the adjusted ambient light meets the standard. When it meets the standard, the electronic device can display a second prompt message; when it does not meet the standard, the electronic device can display a first prompt message and readjust the combination of light-emitting devices to update the ambient light so that the ambient light meets the standard.
[0012] A group of light-emitting devices that emit light simultaneously and meet preset standards includes one or more light-emitting devices. When the ambient light in an environment is sufficient to meet the preset standards when a single light-emitting device emits light, the electronic device can control only that device to emit light. When the ambient light in an environment is sufficient to meet the preset standards when no single light-emitting device emits light, the electronic device can find a combination of multiple light-emitting devices so that the ambient light when the light-emitting devices in the combination emit light together meets the preset standards for use by the user in work and study.
[0013] The electronic device is equipped with an ambient light sensor (ALS). The electronic device collects ambient light data through the ALS. Preferably, the ambient light sensor includes N channels, where N ≥ 3.
[0014] Ambient light data includes illuminance, blue light radiance, color temperature, flicker frequency, and fluctuation depth.
[0015] Illuminance is determined using the formula: E = k * V + q.
[0016] Blue light radiance is determined using the formula: I = p * Cb + y, or the modified formula: I(Cb, Xa, Yb). Where Cb represents the light intensity value of channel B, X is the ratio of the measured light intensity value of channel R to that of channel B, Y is the ratio of the measured light intensity value of channel G to that of channel B, a is the ratio of the light intensity value of channel R to that of channel B in standard blue light, and b is the ratio of the light intensity value of channel G to that of channel B in standard blue light.
[0017] The fluctuation depth is determined according to the formula: 100%*(max-min) / (max+min).
[0018] In some embodiments, M1 light-emitting devices are near-field devices of electronic devices.
[0019] In some embodiments, the electronic device establishes a direct connection with each of the M1 light-emitting devices based on near-field wireless communication technology. The electronic device acquires the illumination parameters of the M1 light-emitting devices, specifically by obtaining the illumination parameters of the M1 light-emitting devices from the M1 light-emitting devices via near-field wireless communication technology.
[0020] Taking Bluetooth communication as an example, the electronic device establishes a direct Bluetooth connection with each of the M1 light-emitting devices. When obtaining the illumination parameters of the M1 light-emitting devices, the electronic device sequentially obtains the illumination parameters of each light-emitting device through the aforementioned direct Bluetooth connection.
[0021] In some embodiments, the M1 light-emitting devices establish a direct connection with a local area network (LAN) central device (e.g., a routing device) in the environment based on near-field wireless communication technology. The electronic device has a first application installed. The user can configure the light-emitting devices through the first application, enabling them to join the near-field network where the central control device is located. At this time, the first application records the illumination parameters of the M1 light-emitting devices, and the electronic device obtains the illumination parameters of the M1 light-emitting devices from the first application, eliminating the need to obtain the illumination parameters of each light-emitting device individually.
[0022] In some embodiments, acquiring first ambient light data at a first moment specifically includes: acquiring first ambient light data at a first moment in a scenario where the screen of an electronic device is on.
[0023] When using electronic devices for work / study, users are sensitive to ambient light. Therefore, executing the method provided in the first aspect after detecting that the screen is lit can not only provide users with timely light source quality detection services, but also reduce the frequency of method execution, improve algorithm efficiency, and save power consumption.
[0024] In some embodiments, the scenarios where the electronic device screen is on specifically include: scenarios where the electronic device screen is on and a target application is running, the target application including learning applications and / or office applications. This allows the electronic device to further reduce the frequency of method operation and save power.
[0025] In a second aspect, this application provides an electronic device including one or more processors and one or more memories; wherein the one or more memories are coupled to one or more processors, and the one or more memories are used to store a computer program, which, when executed by one or more processors, causes the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0026] Thirdly, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the methods described in the first aspect and any possible implementation thereof.
[0027] Fourthly, this application provides a computer-readable storage medium including a computer program that, when run on an electronic device, causes the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0028] Fifthly, this application provides a computer program product containing instructions that, when the computer program product is run on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.
[0029] Understandably, the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method provided in this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description
[0030] Figure 1 This is a flowchart of a lighting control method based on ambient light quality detection provided in an embodiment of this application;
[0031] Figures 2A-2B These are schematic diagrams of a set of user interfaces provided in the embodiments of this application;
[0032] Figure 3 This is a schematic diagram of the structure of the ALS provided in the embodiments of this application;
[0033] Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0034] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be a limitation of this application.
[0035] Nowadays, users are paying increasing attention to eye health and ambient light quality. However, ambient light quality is often impossible to judge with the naked eye. Users need to use professional instruments for measurement, such as photometers, illuminometers, and spectrometers. However, these instruments are complex to operate and inconvenient for ordinary users to carry around, making it difficult to provide ambient light monitoring services at any time, and even more difficult to change the operating status of light-emitting devices in the environment to improve ambient light quality.
[0036] Therefore, this application provides a lighting control method based on ambient light quality detection. This method can be applied to commonly used and frequently carried electronic devices such as mobile phones, tablets, smartwatches, and laptops. This application does not limit the specific type of electronic device.
[0037] Specifically, Figure 1 This is a flowchart of a lighting control method based on ambient light quality detection provided in an embodiment of this application.
[0038] S101. Collect the current ambient light and determine the ambient light data that describes the quality of the current ambient light.
[0039] Electronic devices can periodically collect ambient light data. For example, at the first moment of a preset period, the electronic device can collect ambient light data to determine ambient light data that describes the current ambient light quality.
[0040] In some embodiments, the electronic device may also be configured to collect ambient light upon triggering a specific event. Considering that users are more sensitive to ambient light when using the electronic device for work / study, it is preferable that the electronic device collects ambient light when it detects a lit screen, particularly when it detects a lit screen and is running office or learning applications (e.g., Office suite applications, drawing applications, video editing applications, online learning applications, etc.).
[0041] In some embodiments, the electronic device may also have an ambient light detection control set up in a specific interface. Such a specific interface may include a settings interface, a drop-down menu, etc. At any given time, the user can control the electronic device to collect ambient light and perform ambient light quality detection by operating on the aforementioned control.
[0042] The electronic device is equipped with an ambient light sensor (ALS). The electronic device uses the ALS to collect ambient light and determine ambient light data describing the current ambient light quality. This ambient light data includes illuminance (E), blue radiance (I), color temperature (T), flicker frequency (F), and percent flicker (FPF).
[0043] S102. Determine the current location of the electronic device.
[0044] After triggering the acquisition of ambient light, the electronic device can immediately obtain location information and determine its current location. The electronic device can determine its current location through satellite positioning technology (such as GPS, BeiDou, etc.), cellular network positioning technology and / or indoor positioning technology based on wireless fidelity (Wi-Fi) networks or cellular communication.
[0045] S103. Determine the standard ambient light data for the current location.
[0046] Different environmental types (e.g., living room, bedroom, study, office, classroom, shopping mall, etc.) correspond to different standard ambient light data. For example, Table 1 shows the standard ambient light data corresponding to different environmental types provided in the embodiments of this application.
[0047] Table 1
[0048]
[0049] After determining its current location, the electronic device can determine the current environment type based on the current location, and then determine the corresponding standard ambient light data (first standard) based on the current environment type.
[0050] In one embodiment, the flicker frequency and fluctuation depth in the standard ambient light data both adopt the low-risk standard shown in Table 2.
[0051] Table 2
[0052] flicker frequency / Hz F≤8 8<F≤90 90<F≤1250 F>1250 Fluctuation depth / % 0.2 F×0.025 F×0.08 Unrestricted
[0053] In another embodiment, different standards can be used for the flicker frequency and fluctuation depth in the standard ambient light data for different environments. Referring to Table 1, for environments used for learning / working, such as studies, offices, and classrooms, the flicker frequency and fluctuation depth in the standard ambient light data can adopt the No-Observed-Effect-Level (NOEL) standard in Table 3; for other environments such as bedrooms, living rooms, and shopping malls, the flicker frequency and fluctuation depth in the standard ambient light data can adopt the low-risk standard shown in Table 2 or no standard.
[0054] Table 3
[0055] flicker frequency / Hz F≤10 10<F≤90 90<F≤3125 F>3125 Fluctuation depth / % 0.1 F×0.01 F×0.08 / 2.5 Unrestricted
[0056] In order to accurately calculate the frequency of optical signals ≤3125Hz, the sampling frequency of the Flicker function must be at least ≥6250Hz.
[0057] S104. Confirm whether the current ambient light is consistent with the standard ambient light of the current location.
[0058] Ambient light data describing the current ambient light quality is also called current ambient light data. After acquiring standard ambient light data, electronic devices can compare the current ambient light data with the standard ambient light data. For example, electronic devices can compare the illuminance in the current ambient light data with the illuminance in the standard ambient light data. When the illuminance in the current ambient light data is within the range shown in the standard ambient light data, the electronic device can determine that the illuminance of the current ambient light meets the requirements. Similarly, electronic devices can compare the radiance, color temperature, flicker frequency, and depth of fluctuation of the current ambient light with the standard ambient light data to determine whether the radiance, color temperature, flicker frequency, and depth of fluctuation of the current ambient light meet the requirements.
[0059] When the illuminance, radiance, color temperature, flicker frequency, and fluctuation depth of the current ambient light all meet the requirements, the electronic device can determine that the current ambient light is consistent with the standard ambient light of its current location, meaning the current ambient light meets the standard. Therefore, the electronic device can execute step S105. Conversely, if the current ambient light does not meet the standard, the electronic device can determine that the current ambient light does not meet the standard, and thus execute step S106.
[0060] S105, Displaying a "passed" message, the test ends.
[0061] refer to Figure 2A When the current ambient light is determined to be consistent with the standard ambient light of the current location, that is, when the current ambient light meets the standard, the electronic device can display a compliance prompt (second prompt information), such as "The current ambient light meets the standard!", to indicate to the user that the current ambient light meets the standard and can be used for activities such as work / study.
[0062] Depending on the triggering conditions, the electronic device can take different feedback measures after determining that the current ambient light meets the standard. For example, when periodically triggering the collection of ambient light, the electronic device can directly end the detection without displaying any information after determining that the current ambient light meets the standard, so as not to disturb the user. When the collection of ambient light is triggered by a specific event or by the user, the electronic device can display a prompt message after determining that the current ambient light meets the standard, informing the user that the current ambient light meets the standard.
[0063] S106. Display a non-compliance message. Confirm whether to adjust the ambient light.
[0064] When it is determined that the current ambient light is inconsistent with the standard ambient light of the current location, i.e., the current ambient light is substandard, preferably, the electronic device can first display a substandard prompt (first prompt information). For example, refer to... Figure 2B The electronic device can display card 31. Card 31 includes a non-compliance notice, such as "The current ambient light flicker frequency is too low. Please adjust it before use and pay attention to your eye health," to remind the user that the current ambient light flicker frequency does not meet the standard and needs to be adjusted.
[0065] As shown in card 31, card 31 may also include control 32 and control 33. After detecting a user operation on control 32, the electronic device can execute S107 to obtain the illumination parameters of the light-emitting devices in the environment, and then adjust the ambient light. Conversely, if a user operation on control 33 is detected, the electronic device can directly end the detection.
[0066] S107. Obtain the illumination parameters of the light-emitting devices in the environment.
[0067] Electronic devices can acquire illumination parameters of one or more light-emitting devices in the environment. Among them, the illumination parameters of the light-emitting devices that match the ambient light data acquired by the electronic devices include illuminance, radiance, color temperature, flicker frequency, and fluctuation depth.
[0068] Optionally, the electronic device can acquire the illumination parameters of one or more light-emitting devices in the environment at once through a local area network central device, such as a router. Specifically, the electronic device can install a smart home application (first application). This application can register various electronic devices in the home environment, allowing users to remotely control the operation of these electronic devices. These various electronic devices include light-emitting devices (e.g., lamps). When executing S107, the electronic device can acquire all light-emitting devices in the home environment through the aforementioned application and obtain the illumination parameters of each light-emitting device.
[0069] Preferably, when registering lighting devices, the smart home application can record the specific location of each lighting device in the home environment, such as the living room, bedroom, and bathroom. When acquiring the illumination parameters of lighting devices in the environment, the electronic device can specifically acquire the illumination parameters of the lighting device at its current location. For example, if the current location is the living room, the electronic device can only acquire the illumination parameters of the lighting devices in the living room, and not acquire the illumination parameters of lighting devices in other locations, such as the bathroom or bedroom, to avoid obstruction caused by partitions in the combination of lighting devices in different areas, which would affect the actual ambient light effect when the lighting is combined.
[0070] Alternatively, electronic devices can also communicate directly with one or more light-emitting devices in the environment through near-field wireless communication technologies such as Bluetooth (BT), Zigbee, near-field communication (NFC), and infrared (IR) technology to obtain the illumination parameters of each light-emitting device.
[0071] S108. Determine a set of target light-emitting devices that can achieve standard ambient light.
[0072] After obtaining the illumination parameters of one or more light-emitting devices, the electronic device can simulate the ambient light data when different combinations of light-emitting devices emit light, thereby determining at least one combination of light-emitting devices that can achieve standard ambient light, and determining one of the above at least one combination of light-emitting devices as the target combination of light-emitting devices (the first combination).
[0073] Preferably, after determining a set of light-emitting device combinations capable of achieving standard ambient light, the electronic device can stop calculation to save computing resources. This set of light-emitting device combinations is the target set of light-emitting devices. In some embodiments, after determining a set of light-emitting device combinations capable of achieving standard ambient light, the electronic device can continue calculation until all light-emitting device combinations capable of achieving standard ambient light are determined. Then, the electronic device can determine a set of light-emitting device combinations from all the light-emitting device combinations as the target set of light-emitting devices. Preferably, the electronic device can determine the light-emitting device combination with the highest distance dispersion from all the light-emitting device combinations as the target set of light-emitting devices to improve the uniformity of ambient light and enhance ambient light quality.
[0074] S109. Control the light-emitting devices in the target light-emitting device assembly to emit light, while other devices do not emit light.
[0075] When acquiring the illumination parameters of the light-emitting devices through the local area network (LAN) central device, after determining the target light-emitting device combination, the electronic device can send operating instructions to each light-emitting device in the target light-emitting device combination and send shutdown instructions to the light-emitting devices that are emitting light outside the target light-emitting device combination. In response to the operating instructions, the light-emitting devices emit light; in response to the shutdown instructions, the light-emitting devices stop emitting light. The first control command includes the operating instructions and / or shutdown instructions.
[0076] When directly acquiring the illumination parameters of each light-emitting device through near-field wireless communication technology, after determining the target light-emitting device combination, the electronic device can then directly send working instructions to each light-emitting device in the target light-emitting device combination and send turning-off instructions to the light-emitting devices that are emitting light outside the target light-emitting device combination through the aforementioned near-field wireless communication technology.
[0077] When simulating ambient light data during the emission of different combinations of light-emitting devices, the electronic device can record the specific illumination parameters of each device. After determining the target combination of light-emitting devices (i.e., the first combination), the electronic device can determine the specific illumination parameters (i.e., the first illumination parameters) of each electronic device in the target combination. When sending a working instruction, the electronic device can carry the specific illumination parameters of the light-emitting devices in the working instruction, instructing the light-emitting devices to emit light according to the specific illumination parameters.
[0078] Based on the aforementioned calculations, when the light-emitting devices in the target light-emitting device combination emit light while other devices do not emit light, the ambient light can be made consistent with the standard ambient light, thereby meeting the user's work / study needs.
[0079] For example, after determining that the current ambient light is insufficient, the electronic device can identify three light-emitting devices: LDev1, LDev2, and LDev3. For example, after calculation, the electronic device can determine the target combination of light-emitting devices: LDev2 and LDev3. The electronic device can then send activation instructions to LDev2 and LDev3 respectively. In response to these activation instructions, LDev2 and LDev3 begin emitting light. Simultaneously, the electronic device can check whether the remaining light-emitting device, LDev1, is emitting light. When LDev1 is emitting light, the electronic device can send a shutdown instruction to LDev1. In response to this shutdown instruction, LDev1 stops emitting light. It is understandable that if LDev1 is already in a shutdown state, then the electronic device does not need to send a shutdown instruction to LDev1. At this point, LDev2 and LDev3 emit light, while other devices do not, ensuring that the ambient light matches the standard ambient light, meeting the user's work / study needs.
[0080] Preferably, when the screen of the electronic device is lit, the one or more light-emitting devices that the electronic device receives also include the electronic device itself. Therefore, the electronic device can also change the ambient light by adjusting its own screen, so that the adjusted ambient light is consistent with the standard ambient light, meeting the user's work / study needs.
[0081] There is an error between the illumination parameters of the light-emitting device and the actual data of the ambient light when the light-emitting device emits light.
[0082] Therefore, the preferred one is, such as Figure 1 As shown, after executing S109, the electronic device can re-collect the current ambient light, determine the ambient light data describing the quality of the current ambient light, and then compare the current ambient light data with the standard ambient light data to determine whether the current ambient light meets the standard. If the current ambient light meets the standard, the electronic device can execute S105: display that the ambient light is normal and end the detection. If the current ambient light still does not meet the standard, the electronic device can determine the difference between the actual ambient light data collected and the illumination parameters calculated in S108, and then execute S108-S109 again based on this difference until the ambient light is detected to meet the standard.
[0083] Considering that repeatedly controlling the light-emitting device to emit or stop emitting light can lead to unstable lighting in the space, resulting in a poor user experience, in some embodiments, the electronic device can be set with a maximum number of corrections or a maximum correction time. When the number of executions of S108-S109 reaches the maximum number of corrections, or when the operation time after S107 reaches the maximum correction time, the electronic device can stop adjusting.
[0084] Understandably, electronic devices may also be unable to find a combination of light-emitting devices that meet standard ambient light requirements. In this case, the electronic device can prompt the user to change the natural lighting environment based on the current time and / or weather, such as prompting the user to adjust the curtains or change rooms, to obtain higher quality ambient light and protect the user's eye health.
[0085] Specifically, Figure 3 This is a schematic diagram of the structure of the ALS provided in the embodiments of this application.
[0086] like Figure 3As shown, an ALS (Advanced Light Detection System) includes one or more detection channels composed of photosensitive devices (such as photodiodes, photoelectric detectors, PDs), for example, an R (red) channel for detecting red light, a G (green) channel for detecting green light, a B (blue) channel for detecting blue light, and a W (wideband) channel for wideband detection. Optionally, an ALS may include more detection channels. In this way, electronic devices can obtain more ambient light data describing the current ambient light quality through the aforementioned ALS, thereby providing more accurate and comprehensive ambient light quality analysis results.
[0087] The detection channel is connected to an analog-to-digital converter (ADC). The ADC converts the analog signal output from the detection channel into a digital signal. The ADC is connected to the computing engine. The computing engine specifically includes an ALS engine and a flicker engine. The ALS engine is used to calculate the ambient light illuminance E, blue light radiance I, and color temperature T, while the flicker engine is used to calculate the ambient light flicker frequency F and percent flicker (FPF).
[0088] E=k*V+x (1)
[0089] Formula (1) above describes the relationship between illuminance and output voltage. Here, E represents illuminance (unit: lux lx), V represents the output voltage of any detection channel (unit: volts v), and k and x are constants. Therefore, according to formula (1), the ALS engine can determine the illuminance of each detection channel, such as the illuminance Er of the R channel, the illuminance Eg of the G channel, the illuminance Eb of the B channel, and the illuminance Ew of the W channel. Furthermore, the ALS engine can determine the total illuminance describing the current ambient light based on the illuminance of each of the above detection channels, denoted as Et.
[0090] I = p*Cb + y (2)
[0091] Formula (2) above describes the relationship between blue light radiance and light intensity. Where I represents blue light radiance (unit: watts per square meter steradian W / m). 2 / sr), Cb represents the light intensity value of channel B (unit: count), p and y are constants. Cb is positively correlated with the voltage and current of channel B.
[0092] Based on the illuminance on the RGBW and other detection channels, the ALS engine can determine the color temperature T (in Kelvin) of the ambient light by calculating the Correlated Color Temperature (CCT).
[0093] The Flicker engine can reconstruct the ambient light waveform from high-frequency collected light signals, and then determine the flicker frequency F (in Hertz, Hz) and fluctuation depth FPF of the current ambient light based on the waveform. Wherein:
[0094] FPF=100%*(max-min) / (max+min) (3)
[0095] In the above formula (3): max represents the maximum value of the optical waveform within one fluctuation period, and min represents the minimum value of the optical waveform within one fluctuation period.
[0096] Formula (2): I = p*Cb + y, also denoted as I(Cb).
[0097] Under known blue radiance scenarios of various standard lights, the ALS can be illuminated with the aforementioned standard lights to measure the corresponding Cb for each standard light. These standard lights include, but are not limited to, blue light from light-emitting diodes (LEDs), international standard artificial daylight D65, American Cool White Fluorescent (CWF) light source, and European, Japanese, and Chinese TL84 light sources. Then, through fitting, the ALS engine can determine the constant terms p and y in formula (2), that is, determine the specific mapping relationship of I(Cb).
[0098] Corresponding to Cb, Cr represents the light intensity value of the R channel, Cg represents the light intensity value of the G channel, Cr / Cb (denoted as Para1) is the ratio parameter of the light intensity value of the R channel to the light intensity value of the B channel, and Cg / Cb (denoted as Para2) is the ratio parameter of the light intensity value of the G channel to the light intensity value of the B channel.
[0099] Table 4 shows the standard values of Para1 and Para2 for various standard lights provided in the embodiments of this application.
[0100] Table 4
[0101]
[0102] When the ALS is illuminated with various standard lights, the ALS engine can also determine the light intensity values of channels other than the B channel, such as Cr and Cg mentioned above. Thus, the electronic equipment can measure the actual values of Para1 and Para2 for various standard lights.
[0103] Therefore, through fitting, the ALS engine can determine the specific mapping relationship (first mapping relationship) of I(Cb,Xa,Yb). Here, X is the measured actual value of Para1, and Y is the measured actual value of Para2. I(Cb,Xa,Yb) is negatively correlated with (Xa), and I(Cb,0,0)=0. I(Cb,Xa,Yb) is also called the modified blue light radiance formula.
[0104] Compared to I(Cb), the blue radiance of the B channel obtained based on I(Cb,Xa,Yb) is more accurate, which is more helpful for electronic devices to determine whether the blue radiance of ambient light exceeds the standard.
[0105] For example, the fitted I(Cb,Xa,Yb)=Cb*(1-k1*(Xa)+k2*(Yb)), where a=0.0710, b=0, K1=0.0141, k2=0.0310.
[0106] Table 5 shows the light intensity values of different standard lights provided in the embodiments of this application. Table 6 shows the light intensity values of different standard lights after correcting the blue light radiance based on I(Cb,Xa,Yb) provided in the embodiments of this application. Wherein, Cbg represents the light intensity value of blue light in the 400nm-500nm range of the B channel. Cb represents the light intensity value of the B channel, and Cbr represents the light intensity value of the B channel after correction by I(Cb,Xa,Yb).
[0107] Table 5
[0108]
[0109] Table 6
[0110]
[0111]
[0112] As shown in Table 5, before correction, the blue radiance of D65 and CWF had an error of 5% to 6%; while after correction, as shown in Table 6, the error of blue radiance of D65 and CWF was <0.1%.
[0113] Electronic devices can be combined in ascending order of quantity to determine a target light-emitting device combination whose light emission is consistent with standard ambient light.
[0114] Specifically, the electronic device can initially set the number of devices to 1. With 1 device, the electronic device sequentially compares the illumination parameters of each light-emitting device with the standard ambient light to determine if any light-emitting device matches the standard ambient light. If no light-emitting device matches the standard ambient light, the electronic device continues to increase the number of devices, for example, updating the number to 2. With 2 devices, the electronic device can first obtain one or more combinations of light-emitting devices with a device count of 2. Then, the electronic device sequentially determines the illumination parameters of each of these combinations, i.e., the ambient light data when emitting light simultaneously. Then, the electronic device sequentially compares the illumination parameters of each combination of light-emitting devices with the standard ambient light to determine if any combination of light-emitting devices matches the standard ambient light.
[0115] Similarly, if no combination of light-emitting devices matches the standard ambient light, the electronic device continues to increase its number of devices, for example, updating the number to 3, and updating the combination to determine if there is a combination that matches the standard ambient light in the new combination. This will not be elaborated further here.
[0116] For example, the illumination parameters of the three light-emitting devices (LDev1, LDev2, LDev3) obtained by the electronic device are as follows:
[0117] Table 7
[0118]
[0119] The electronic device can first compare LDev1, LDev2, and LDev3 sequentially with standard ambient light to determine if there is a single light-emitting device consistent with the standard ambient light. When comparing with the standard ambient light, preferably, the electronic device first compares the flicker frequency and fluctuation depth, and then the illuminance, radiance, and color temperature. This is because illuminance, radiance, and color temperature can be changed by adjusting the power of the light-emitting device, thus making it relatively easy to meet the requirements of standard ambient light.
[0120] In scenarios where LDev1, LDev2, and LDev3 all fail to meet standard ambient light requirements, the electronic device can update the number of devices to 2. Therefore, the electronic device can obtain the following combinations of emitting devices: LDev1+LDev2, LDev1+LDev3, LDev2+LDev3, and the illumination parameters for each of these combinations are as follows:
[0121] Table 8
[0122]
[0123]
[0124] Note: The flicker frequency and fluctuation depth are used as a set of average parameters, taking into account the most severe scenario. The flicker frequency uses the minimum flicker frequency of the hybrid light source, and the fluctuation depth is evaluated according to the maximum value calculated by the hybrid light source theory.
[0125] Therefore, the electronic device can sequentially compare the illumination parameters of each light-emitting device combination with standard ambient light to determine if there is a light-emitting device combination that matches the standard ambient light. Similarly, the electronic device first compares the flicker frequency and fluctuation depth. When the flicker frequency and fluctuation depth meet the requirements of standard ambient light, the electronic device can adjust the power of the light-emitting devices to make the illuminance, radiance, and color temperature of the combination also meet the requirements of standard ambient light.
[0126] Similarly, electronic devices can identify one or more combinations of light-emitting devices that meet the standard ambient light requirements, and select one of them as the target combination of light-emitting devices.
[0127] Understandably, the ambient light collected during S101 may include natural light and uncontrollable, unknown light sources. Therefore, when executing S108, the electronic device also needs to consider the influence of these light sources.
[0128] Therefore, after acquiring the illumination parameters of the light-emitting devices in the environment, the electronic device first identifies the light-emitting devices that are in operation, i.e., those emitting light, and calculates the difference between the illumination operation of these devices and the current ambient light data. This difference can be equivalent to the natural light in the current environment and an uncontrollable unknown light source. Then, when determining a set of target light-emitting devices that can achieve standard ambient light, the electronic device can determine the target light-emitting device set based on the remaining portion after deducting the aforementioned difference.
[0129] Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application.
[0130] like Figure 4As shown, the electronic device includes a processor 51. The processor 51 includes one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units can be independent devices or integrated into one or more processors. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0131] The processor 51 is connected to the memory 52. The memory 52 includes random access memory (RAM) and non-volatile memory (NVM). The RAM can be directly read and written by the processor 51 and is used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data. The executable programs and data stored in the NVM can be pre-loaded into the RAM for direct reading and writing by the processor 51. The processor 51 may also include a cache unit, which can be used to store recently used or repeatedly used instructions or data.
[0132] Optionally, some electronic devices may also be equipped with an external memory interface 53. The external memory interface 53 can be used to connect to an external NVM to expand the storage capacity of the electronic device.
[0133] The communication module 54 includes an antenna, a radio frequency front-end, and a radio frequency integrated circuit (RFIC), etc., for providing mobile communication solutions including 2G / 3G / 4G / 5G for use in electronic devices, and wireless communication solutions including wireless local area networks (WLAN) (e.g., Wi-Fi), Bluetooth, Bluetooth Low Energy (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR).
[0134] In this embodiment, the electronic device communicates with other devices through the wireless communication capability provided by the communication module 54, thereby obtaining the illumination parameters of the light-emitting devices in the environment, and controlling the light-emitting devices in the target light-emitting device combination to emit light while the other devices do not emit light.
[0135] The sensor module 55 includes an ambient light sensor (ALS). The electronic device collects ambient light data through the ALS, such as illuminance, radiance, color temperature, flicker frequency, and fluctuation depth. Based on this data, it analyzes the current ambient light quality to determine whether the ambient light meets the standards and is suitable for the user's study / work.
[0136] The sensor module 55 may also include an inertial measurement unit (IMU) and a touch sensor. In Wi-Fi or BitTorrent-based indoor positioning scenarios, the electronic device can use the IMU to determine its own trajectory, obtain higher-precision location information, and then determine the user's current environment and the corresponding standard ambient light. The touch sensor is located on the display screen 56 and is used to detect touch operations, such as clicks, applied to or near it, and transmit the detected touch operations to the application processor to determine the touch event type. Furthermore, the electronic device can provide visual output related to the touch operation through the display screen 56.
[0137] Not limited to ALS and IMU, sensor module 55 may also include more sensors, such as pressure sensors, gyroscope sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, etc. This application embodiment does not impose such limitations.
[0138] The electronic device also includes a display screen 56. The display screen 56 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-oled, quantum dot light-emitting diodes (QLEDs), etc. The electronic device may include one or more display screens 56.
[0139] Electronic devices utilize graphics processing units (GPUs), displays (56), and application processors to achieve display functions. Figures 2A-2B The user interface shown.
[0140] Typically, electronic devices also include a camera 57. The electronic device can achieve its shooting function through an ISP, camera 57, video codec, GPU, display 56, and application processor.
[0141] The processor 51, memory 52, communication module 54, sensor module 55, display screen 56, camera 57, and other components are connected through one or more buses. These buses can be inter-integrated circuit (I2C) buses, inter-integrated circuit sound (I2S) buses, pulse code modulation (PCM) buses, or mobile industry processor interfaces (MIPI), etc.
[0142] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. Optionally, the electronic device may also include more components, such as an audio module (including a speaker, receiver, microphone, and headphone jack), buttons, a motor, an indicator, a subscriber identification module (SIM) card interface, etc. The embodiments of this application do not impose any limitations in this regard.
[0143] The term "user interface (UI)" used in the specification, claims, and drawings of this application refers to the medium through which an application or operating system interacts and exchanges information with the user. It converts information from its internal form to a form acceptable to the user. The user interface of an application is source code written in a specific computer language such as Java or Extensible Markup Language (XML). This source code is parsed and rendered on the terminal device, ultimately presenting user-recognizable content such as images, text, and buttons. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, scroll bars, images, and text. The attributes and content of controls in the interface are defined using tags or nodes, such as XML tags. <textview> 、 <imgview> 、
[0144] <videoview>Nodes define the controls contained in the interface. A node corresponds to a control or property in the interface, and after parsing and rendering, the node is presented as the content visible to the user. In addition, many applications, such as hybrid applications, often contain web pages within their interfaces. A web page, also known as a webpage, can be understood as a special control embedded in the application interface. Web pages are source code written in a specific computer language, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), JavaScript (JS), etc. Web page source code can be loaded and displayed as user-readable content by a browser or a web page display component with browser-like functionality. The specific content contained in a webpage is also defined through tags or nodes in the webpage source code; for example, HTML uses tags or nodes to define the content. 、 、 <video> 、 <canvas>Used to define the elements and attributes of a webpage.
[0145] The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0146] As used in the specification and appended claims of this application, the singular expressions "a," "an," "the," "the," "the," and "this" are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the listed items. As used in the above embodiments, depending on the context, the term "when" can be interpreted as meaning "if..." or "after..." or "in response to determining..." or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining..." or "in response to determining..." or "when (the stated condition or event) is detected" or "in response to detecting (the stated condition or event)."
[0147] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0148] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.< / canvas> < / video> < / videoview> < / imgview> < / textview>
Claims
1. A lighting control method, applied to electronic devices, characterized in that, The method includes: Acquire the first ambient light data at the first moment; Determine the first position of the electronic device at the first moment, where the first position corresponds to a first standard; Determine whether the ambient light at the first moment meets the first standard based on the first ambient light data; When the first standard is not met: Obtain the illumination parameters of M1 light-emitting devices, where M1 ≥ 1; The first combination and the first illumination parameters of each light-emitting device in the first combination are determined based on the illumination parameters of the M1 light-emitting devices. The first combination includes M2 light-emitting devices, where 1 ≤ M2 ≤ M1. Under simulation conditions, the ambient light data when the M2 light-emitting devices emit light according to the first illumination parameters conforms to the first standard. A first control command is issued to control the M2 light-emitting devices in the first combination to emit light according to the first illumination parameters, and the non-target light-emitting devices to stop emitting light. The non-target light-emitting devices are the light-emitting devices in the M1 light-emitting devices other than the first combination.
2. The method according to claim 1, characterized in that, Before obtaining the illumination parameters of the M1 light-emitting devices, the method further includes: Display a first warning message indicating that the ambient light does not meet the first standard; Received confirmation from the user regarding adjusting the ambient light; The acquisition of illumination parameters of M1 light-emitting devices specifically includes: in response to the user operation of confirming the adjustment of ambient light, acquiring illumination parameters of M1 light-emitting devices.
3. The method according to claim 1, characterized in that, The method further includes: Acquire the second ambient light data at a second moment, which is after the first control command is issued; Based on the second ambient light data, determine whether the ambient light at the second moment meets the first standard.
4. The method according to claim 1, characterized in that, The illumination parameters include blue light radiance, which is obtained through a first mapping relationship. The first mapping relationship includes a first variable: Xa, and a second variable: Yb. Wherein, X is the ratio of the standard R channel light intensity value to the B channel light intensity value, a is the ratio of the measured R channel light intensity value to the B channel light intensity value, Y is the ratio of the standard G channel light intensity value to the B channel light intensity value, and b is the ratio of the measured G channel light intensity value to the B channel light intensity value.
5. The method according to claim 1, characterized in that, The M1 light-emitting devices are near-field devices of the electronic device.
6. The method according to claim 5, characterized in that, The acquisition of illumination parameters of the M1 light-emitting devices specifically includes: acquiring the illumination parameters of the M1 light-emitting devices from the M1 light-emitting devices via near-field wireless communication technology.
7. The method according to claim 5, characterized in that, The electronic device is equipped with a first application, which records the illumination parameters of the M1 light-emitting devices. The electronic device obtains the illumination parameters of the M1 light-emitting devices from the first application.
8. The method according to claim 1, characterized in that, The acquisition of the first ambient light data at the first moment specifically includes: acquiring the first ambient light data at the first moment in the scenario where the screen of the electronic device is on.
9. The method according to claim 1, characterized in that, The scenarios in which the electronic device screen is on specifically include: scenarios in which the electronic device screen is on and the target application is running, wherein the target application includes learning applications and / or office applications.
10. The method according to claim 1, characterized in that, The electronic device includes an ambient light sensor, which collects the first ambient light data. The ambient light sensor includes N channels, where N ≥ 3.
11. An electronic device, characterized in that, It includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store a computer program that, when the one or more processors execute the computer program, causes the method as described in any one of claims 1-10 to be performed.
12. A chip system applied to an electronic device, the chip system comprising one or more processors, characterized in that, The processor is used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-10.
13. A computer program product containing instructions, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-10.
14. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-10.