Methods and devices for determining light intensity, electronic devices, and storage media.

By combining an angle sensor and multiple light sensors, and utilizing preset mapping relationships and light intensity data, the problems of light sensor occlusion and limited light sensing range are solved, enabling more accurate determination of ambient light intensity and adjustment of electronic device brightness.

CN115839764BActive Publication Date: 2026-06-30BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2022-12-26
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing technologies, light sensors cannot accurately determine the intensity of ambient light, and there are problems such as obstruction and limited light-sensing range, which leads to inaccurate brightness control of electronic devices.

Method used

By combining an angle sensor and multiple light sensors, and using a preset mapping relationship and light intensity data from the light sensors at different angles, the unobstructed target light sensor is identified, and the target light intensity is determined based on the light intensity sensed by it.

Benefits of technology

It improves the accuracy of ambient light intensity, ensuring that the brightness adjustment of electronic devices is better matched with the ambient light intensity, thereby enhancing the user experience and imaging effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115839764B_ABST
    Figure CN115839764B_ABST
Patent Text Reader

Abstract

This disclosure relates to a method, apparatus, electronic device, and storage medium for determining light intensity. The method is applied to an electronic device including an angle sensor and multiple light sensors, and includes: determining the current angle of the electronic device using the angle sensor; acquiring the light intensity sensed by each of the light sensors at the current angle; and determining the target light intensity of the environment in which the electronic device is located based on the current angle of the electronic device, the light intensity sensed by each of the light sensors at the current angle, and a preset mapping relationship between angle and light intensity. This method can improve the accuracy of determining the target light intensity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of ambient light intensity technology, and in particular to a method and apparatus for determining light intensity, electronic equipment, and storage medium. Background Technology

[0002] A light sensor is a light-to-digital converter. Electronic devices such as mobile phones, cameras, and tablets can sense the intensity of ambient light using light sensors, and then control the operation of the electronic devices based on the sensed ambient light intensity, such as adjusting the screen brightness. Therefore, accurately determining the intensity of ambient light is crucial. However, because light sensors cannot receive light signals covering the entire spherical surface, and because users may accidentally obstruct the light sensor, and the size of the light sensor's aperture limits its sensing range, the accuracy of determining the intensity of ambient light based on a single light sensor is relatively low. Summary of the Invention

[0003] This disclosure provides a method and apparatus for determining light intensity, an electronic device, and a storage medium.

[0004] According to a first aspect of the present disclosure, a method for determining light intensity is provided, applied in an electronic device including an angle sensor and multiple light sensors, comprising:

[0005] The current angle of the electronic device is determined by the angle sensor;

[0006] Acquire the light intensity sensed by each of the light sensors at the current angle;

[0007] The target light intensity of the environment in which the electronic device is located is determined based on the current angle of the electronic device, the light intensity sensed by each of the light sensors at the current angle, and the preset mapping relationship between angle and light intensity.

[0008] In some embodiments, the preset mapping relationship includes the correspondence between the photosensitive angle and the historical photosensitive light intensity;

[0009] The step of determining the target light intensity of the environment in which the electronic device is located, based on the current angle of the electronic device, the light intensity sensed by each of the light sensors at the current angle, and a preset mapping relationship between angle and light intensity, includes:

[0010] The light-sensing angle of each light sensor is determined based on the current angle of the electronic device.

[0011] For each of the light sensors, determine the difference between the light intensity sensed by the light sensor and the historical sensed light intensity corresponding to the photosensitive angle in the preset mapping relationship;

[0012] Based on the differences, the target light sensor that is not blocked among the plurality of light sensors is determined;

[0013] The target light intensity is determined based on the target light sensor.

[0014] In some embodiments, the electronic device includes a first light sensor and a second light sensor; the first difference corresponding to the first light sensor includes a first amplitude of light intensity change and a first direction of light intensity change, and the second difference corresponding to the second light sensor includes a second amplitude of light intensity change and a second direction of light intensity change;

[0015] The step of determining the unobstructed target light sensor among the plurality of light sensors based on the differences includes:

[0016] If both the first amplitude and the second amplitude are less than a preset amplitude threshold, it is determined that both the first light sensor and the second light sensor are the target light sensor;

[0017] If either the first amplitude or the second amplitude is greater than or equal to the preset amplitude threshold, the target light sensor is determined based on the first amplitude, the first direction, the second amplitude, and the second direction.

[0018] In some embodiments, determining the target light sensor based on the first amplitude, the first direction, the second amplitude, and the second direction includes:

[0019] When the first direction and the second direction are the same, and the difference between the first amplitude and the second amplitude is less than a preset difference threshold, the first light sensor and the second light sensor are determined to be the target light sensor;

[0020] When the first direction is different from the second direction, another light sensor other than the light sensor corresponding to the direction representing the decrease in light intensity in the first direction and the second direction is determined as the target light sensor.

[0021] In some embodiments, determining the target light intensity based on the target light sensor includes:

[0022] The correspondence between the light intensity sensed by the target light sensor and the light-sensing angle of the target light sensor is updated to the preset mapping relationship;

[0023] Based on the updated preset mapping relationship, the maximum value of the historical sensed light intensity mapped by the preset angle range, including the photosensitive angle, is determined as the target light intensity; wherein, the historical sensed light intensity mapped by the preset angle range, including the photosensitive angle, includes at least the light intensity sensed by the target light sensor.

[0024] In some embodiments, the electronic device includes a display screen; the method further includes:

[0025] The brightness of the display screen is adjusted according to the target light intensity.

[0026] In some embodiments, when the plurality of light sensors include a first light sensor and a second light sensor, the light-sensing direction of the first light sensor is toward the display screen of the electronic device, and the light-sensing direction of the second light sensor is opposite to the light-sensing direction of the first light sensor.

[0027] According to a second aspect of the present disclosure, a light intensity determination device is provided, applied in an electronic device including an angle sensor and a plurality of light sensors, comprising:

[0028] The first determining module is used to determine the current angle of the electronic device through the angle sensor;

[0029] The acquisition module is used to acquire the light intensity sensed by each of the light sensors at the current angle;

[0030] The second determining module is used to determine the target light intensity of the environment in which the electronic device is located based on the current angle of the electronic device, the light intensity sensed by each of the light sensors at the current angle, and the preset mapping relationship between angle and light intensity.

[0031] In some embodiments, the preset mapping relationship includes the correspondence between the photosensitive angle and the historical photosensitive light intensity;

[0032] The second determining module is configured to determine the light-sensing angle of each light sensor based on the current angle of the electronic device; for each light sensor, determine the difference between the light intensity sensed by the light sensor and the historical sensed light intensity corresponding to the light-sensing angle in the preset mapping relationship; based on each difference, determine the unobstructed target light sensor among the plurality of light sensors; and determine the target light intensity based on the target light sensor.

[0033] In some embodiments, the electronic device includes a first light sensor and a second light sensor; the first difference corresponding to the first light sensor includes a first amplitude of light intensity change and a first direction of light intensity change, and the second difference corresponding to the second light sensor includes a second amplitude of light intensity change and a second direction of light intensity change;

[0034] The second determining module is used to determine that both the first light sensor and the second light sensor are the target light sensor when both the first amplitude and the second amplitude are less than a preset amplitude threshold; and to determine the target light sensor based on the first amplitude, the first direction, the second amplitude, and the second direction when either the first amplitude or the second amplitude is greater than or equal to the preset amplitude threshold.

[0035] In some embodiments, the second determining module is configured to determine the first light sensor and the second light sensor as the target light sensor when the first direction and the second direction are the same and the difference between the first amplitude and the second amplitude is less than a preset difference threshold; and to determine another light sensor other than the light sensor corresponding to the direction representing the decrease in light intensity in the first direction and the second direction as the target light sensor when the first direction and the second direction are different.

[0036] In some embodiments, the second determining module is used to update the correspondence between the light intensity sensed by the target light sensor and the photosensitive angle of the target light sensor to the preset mapping relationship; based on the updated preset mapping relationship, the maximum value of the historical sensed light intensity mapped by the preset angle range including the photosensitive angle is determined as the target light intensity; wherein, the historical sensed light intensity mapped by the preset angle range including the photosensitive angle includes at least the light intensity sensed by the target light sensor.

[0037] In some embodiments, the electronic device includes a display screen; the device further includes:

[0038] An adjustment module is used to adjust the brightness of the display screen according to the target light intensity.

[0039] In some embodiments, when the plurality of light sensors include a first light sensor and a second light sensor, the light-sensing direction of the first light sensor is toward the display screen of the electronic device, and the light-sensing direction of the second light sensor is opposite to the light-sensing direction of the first light sensor.

[0040] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0041] A processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the method as described in the first aspect above.

[0042] According to a fourth aspect of the present disclosure, a storage medium is provided, comprising:

[0043] When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method described in the first aspect above.

[0044] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0045] This embodiment of the present disclosure combines the light intensity sensed by the light sensor with the angle based on the current angle of the electronic device determined by the angle sensor and the light intensity sensed by each light sensor at the current angle, so that the sensed light intensity corresponds to the spatial orientation, and can more accurately characterize the ambient light intensity. Furthermore, this embodiment of the present disclosure determines the target light intensity by combining the correspondence between angle and light intensity in the preset mapping relationship with low real-time performance and the light intensity sensed by each light sensor at the current angle of the electronic device with high real-time performance, which can improve the accuracy of the target light intensity.

[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

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

[0048] Figure 1 This is a schematic diagram of a mobile phone in a related technology.

[0049] Figure 2 This is a schematic diagram of a mobile phone in another related technology.

[0050] Figure 3 This is a flowchart example of a method for determining light intensity shown in an embodiment of this disclosure. Figure 1 .

[0051] Figure 4 This is a schematic diagram illustrating the limitation of the light-sensing range of a light sensor by an opening, as shown in an embodiment of this disclosure.

[0052] Figure 5 This is a side view schematic diagram of an electronic device shown in an embodiment of this disclosure.

[0053] Figure 6 This is a flowchart example of a method for determining light intensity shown in an embodiment of this disclosure. Figure 2.

[0054] Figure 7 This is a schematic diagram of a light intensity determination device shown in an embodiment of this disclosure.

[0055] Figure 8 This is a block diagram of an electronic device illustrated in an embodiment of this disclosure. Detailed Implementation

[0056] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0057] In one related technology, a mobile phone is equipped with a front-facing light sensor and a rear-facing light sensor; wherein the light-sensing direction of the front-facing light sensor is towards the phone's display screen, and the light-sensing direction of the rear-facing light sensor is opposite to that of the front-facing light sensor. A first light intensity sensed by the front-facing light sensor and a second light intensity sensed by the rear-facing light sensor are acquired. When the difference between the first and second light intensities is significant, the larger light intensity is determined to be the true ambient light intensity, and the brightness of the display screen is adjusted according to the larger light intensity.

[0058] However, in this solution, if the front light sensor is located in a backlit environment and the rear light sensor is located in a frontlit environment, the second light intensity sensed in the frontlit environment is greater than the first light intensity sensed in the backlit environment. This can lead to problems such as the screen brightness being too bright when the second light intensity is used as the ambient light intensity.

[0059] Figure 1 A schematic diagram of a mobile phone in a related technology is shown, where P1 identifies the front view of the phone, P2 identifies the rear view, LS11 identifies the front-facing light sensor, and LS12 identifies the rear-facing light sensor. In this solution, a first light intensity sensed by the front-facing light sensor and a second light intensity sensed by the rear-facing light sensor are acquired. If the first light intensity is greater than the second light intensity, or if the first light intensity is greater than the second light intensity for a preset time, the phone is determined to be in a front-lit environment. If the first light intensity is less than the second light intensity, or if the first light intensity is less than the second light intensity for a preset time, the phone is determined to be in a back-lit environment. Therefore, the screen brightness is increased when the phone is in a front-lit environment, or decreased when the phone is in a back-lit environment. This can also be based on screen backlight brightness curve fitting, i.e., after a significant change in ambient light, the screen backlight changes slowly according to a smooth curve. Furthermore, it can be combined with... Figure 1The left-side view of the phone, marked with P3, shows the third light intensity sensed by the sensor located on the phone's frame, marked LS13, which determines whether the phone is in a front-light or back-light environment.

[0060] However, this solution has a flaw: if the phone is in a front-lit environment, and the user blocks or continuously (for a preset time) the front light sensor, the first light intensity becomes less than the second light intensity, thus incorrectly determining that the phone is in a backlit environment, resulting in a decrease in the brightness of the phone screen.

[0061] Figure 2 A schematic diagram of a mobile phone in another related technology is shown, in which the phone is equipped with three light sensors, including a first light sensor identified as LS21, a second light sensor identified as LS22, and a third light sensor identified as LS23, each light sensor being located at a different position on the phone's frame. In this solution, the phone also has multiple pressure sensors. The pressure sensed by these sensors determines whether the phone is being held. If the phone is being held, the first unobstructed target light sensor is identified based on the holding position, and the screen brightness is adjusted according to the light intensity sensed by the first target light sensor. For example, the holding position indicates that the user's hand is holding the bottom edge of the phone, thus identifying the light sensor identified as LS21 as the first target light sensor, and adjusting the screen brightness according to the light intensity sensed by the first target light sensor. If the phone is not being held, and the screen is on, the phone's orientation information (such as landscape or portrait mode) is determined by the phone's built-in angle sensor. Based on the orientation information, an unobstructed second target light sensor is identified, and the screen brightness is adjusted according to the light intensity sensed by the second target light sensor. For example, when the phone is in portrait mode, the light sensor identified by LS21 is identified as the second target light sensor, and the screen brightness is adjusted according to the light intensity sensed by the second target light sensor.

[0062] However, in this solution, regardless of whether the phone is being held, there is a possibility that the light sensor marked LS21 may be accidentally blocked by the user, causing the light intensity sensed by the light sensor marked LS21 to be much lower than the actual ambient light intensity, thus resulting in an incorrect reduction of the phone's screen brightness.

[0063] To address this, this disclosure provides a method for determining light intensity, applicable to electronic devices including angle sensors and multiple light sensors. The executing entity can be the processor of the electronic device, such as a Central Processing Unit (CPU), Microcontroller Unit (MCU), or other devices capable of data processing and control. The electronic device can be a User Equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, Personal Digital Assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, the method for determining light intensity can be implemented by the processor calling computer-readable instructions stored in memory.

[0064] Figure 3 This is a flowchart example of a method for determining light intensity shown in an embodiment of this disclosure. Figure 1 It is used in electronic devices that include angle sensors and multiple light sensors, such as... Figure 3 As shown, it includes the following steps:

[0065] S101. Determine the current angle of the electronic device using the angle sensor;

[0066] S102. Obtain the light intensity sensed by each of the light sensors at the current angle;

[0067] S103. Determine the target light intensity of the environment in which the electronic device is located based on the current angle of the electronic device, the light intensity sensed by each of the light sensors at the current angle, and the preset mapping relationship between angle and light intensity.

[0068] In this embodiment, the electronic device includes an angle sensor, such as a tilt sensor or a gyroscope, for sensing the angle of the electronic device. In step S101, the electronic device determines its current angle using the angle sensor. Taking a gyroscope as an example, based on a preset spatial polar coordinate system, the gyroscope determines the angles of the electronic device in this spatial polar coordinate system as yaw, pitch, and roll, where yaw represents the yaw angle, pitch represents the pitch angle, and roll represents the roll angle, all with a value range of 0 to 360 degrees. Furthermore, the angle value can be converted based on a preset precision. For example, if the preset precision is 1, and the gyroscope determines the angle of the electronic device on one coordinate axis of the spatial polar coordinate system to be 3.15159, then based on the preset precision, the angle value on that coordinate axis is converted to 3.

[0069] The electronic device in this embodiment also includes a light sensor, such as an ambient light sensor or a spectral sensor, for at least sensing the light intensity of the environment in which the electronic device is located. In step S102, the electronic device obtains the light intensity sensed by each light sensor at the current angle through multiple light sensors. The light intensity sensed by the light sensor at the current angle can be stored as a three-dimensional array als[yaw][pitch][roll].

[0070] It should be noted that by using multiple light sensors positioned at different locations on an electronic device, the light intensity received by the electronic device from different directions in its environment can be obtained. In one embodiment, the electronic device can record the light intensity sensed by each light sensor at the current angle using different three-dimensional arrays. For example, the light intensity sensed by one light sensor at the current angle is als_A[yaw][pitch][roll], and the light intensity sensed by another light sensor at the current angle is als_B[yaw][pitch][roll]. In another embodiment, based on the different light-sensing directions of different light sensors, the electronic device can also record the light intensity sensed by each light sensor at the current angle using different angles of the same three-dimensional array. For example, the light intensity sensed by the front light sensor at the current angle is als[yaw][pitch][roll], and the light intensity sensed by the rear light sensor at the current angle is als[yaw][pitch][roll+180], etc. This disclosure does not limit this.

[0071] In this embodiment of the disclosure, the preset mapping relationship includes the historical sensed light intensity obtained by each light sensor at different angles of the electronic device; or the preset mapping relationship includes a pre-defined correspondence between angles and light intensity, such as the light intensity corresponding to each angle being half of the maximum light intensity corresponding to that angle based on experiments. Wherein, if the preset mapping relationship includes the historical sensed light intensity obtained by each light sensor at different angles of the electronic device, the initial value of the preset mapping relationship can be a pre-defined mapping between light intensity and angle, and after obtaining the current angle and the light intensity sensed by each light sensor at the current angle, the light intensity mapped to the current angle in the preset mapping relationship can be updated to the light intensity sensed by the light sensor at the current angle.

[0072] In step S103, this embodiment of the present disclosure determines the target light intensity of the environment in which the electronic device is located based on the current angle of the electronic device, the light intensity sensed by each light sensor at the current angle, and the preset mapping relationship between the aforementioned angle and light intensity. In some embodiments, the light intensity sensed by the light sensor is less than the actual ambient light intensity when the light sensor is blocked, the light sensing range of the light sensor is limited by the opening, and / or the light source is displaced, resulting in a reduction in the sensed light. Therefore, this embodiment of the present disclosure selects the maximum light intensity between the light intensity sensed by each light sensor at the current angle of the electronic device and the light intensity mapped by the current angle in the preset mapping relationship, and determines the maximum light intensity as the target light intensity. The target light intensity is the actual light intensity of the environment in which the electronic device is located.

[0073] Understandably, compared to related technologies that determine the target light intensity based on the light intensity currently detected by the light sensor, this solution combines the light intensity sensed by the light sensor with the current angle of the electronic device determined by the angle sensor, making the sensed light intensity correspond to the spatial orientation, thus more accurately representing the ambient light intensity. Furthermore, in this embodiment, the maximum value of the light intensity corresponding to the angle in the preset mapping relationship with low real-time performance, and the light intensity sensed by each light sensor at the current angle of the electronic device with high real-time performance, is determined as the target light intensity. This can reduce the impact of the instantaneous decrease in sensed light intensity caused by the light sensor being blocked or / or the light-sensing range of the light sensor being limited by an opening, thereby improving the accuracy of determining the target light intensity of the environment in which the electronic device is located.

[0074] Among them, the light-sensing range of the light sensor is limited by the opening, such as... Figure 4 As shown, LS41 is identified as the light sensor; the light sensor is typically fixed to the opening (corresponding to...). Figure 4 Inside the groove (of the structure). Figure 4 It is known that light sensors can only receive light from a limited angle, and light from a source of equal intensity (such as...) Figure 4 (As shown by the line segment with arrows) Different incident angles result in different light intensities. For example, if a very strong light source shines from the side of the phone, the front and rear light sensors will not receive a strong signal due to the limitation of the opening angle, thus the sensed light intensity will be relatively low.

[0075] In some embodiments, for each light sensor, the difference between the light intensity sensed by the light sensor at the current angle of the electronic device and the light intensity mapped to the current angle in a preset mapping relationship is determined. Since the light intensity sensed by an obstructed light sensor at the current angle is much smaller than the light intensity mapped to the current angle in the preset mapping relationship, while the light intensity change sensed by an unobstructed light sensor is smaller, in this embodiment of the electronic device, if the difference between the degree of light intensity reduction represented by the differences corresponding to each light sensor is greater than a preset difference threshold, the light sensor representing a larger degree of light intensity reduction (e.g., greater than the preset light intensity threshold) is identified as an obstructed light sensor. The target light intensity is then determined based on the maximum light intensity sensed by each unobstructed light sensor at the current angle.

[0076] It is understood that the embodiments of this disclosure can accurately determine the changes in the light intensity sensed by the light sensor by the difference between the light intensity sensed by the light sensor and the light intensity in the preset mapping relationship, thereby improving the accuracy of determining the blocked light sensor based on the changes in the light intensity sensed by each light sensor, and further improving the accuracy of determining the target light intensity characterizing the real light intensity received by the electronic device in the environment based on the light intensity sensed by the unblocked light sensor.

[0077] In this embodiment of the invention, after determining the target light intensity of the environment in which the electronic device is located, the operation of the electronic device can be controlled according to the target light intensity. For example, if the electronic device is a camera, during the camera imaging process, shooting parameters such as exposure parameters, metering mode, and white balance settings can be adjusted according to the target light intensity of the current environment, thereby making the shooting parameters more compatible with the current scene and improving the imaging effect and the realism of the image. If the electronic device is a mobile phone, when the mobile phone screen is lit, the backlight brightness and display brightness of the screen can be adjusted according to the target light intensity, thereby making the screen more compatible with the current scene during the display process and improving the user experience.

[0078] As can be seen from the above, the embodiments of this disclosure combine the light intensity sensed by the light sensor with the angle, so that the sensed light intensity corresponds to the spatial orientation, and can more accurately characterize the ambient light intensity; furthermore, the target light intensity can be determined by combining the correspondence between angle and light intensity in the preset mapping relationship with low real-time performance, and the light intensity sensed by each light sensor at the current angle of the electronic device with high real-time performance, which can improve the accuracy of the target light intensity.

[0079] In some embodiments, the preset mapping relationship includes the correspondence between the photosensitive angle and the historical photosensitive light intensity;

[0080] The step of determining the target light intensity of the environment in which the electronic device is located, based on the current angle of the electronic device, the light intensity sensed by each of the light sensors at the current angle, and a preset mapping relationship between angle and light intensity, includes:

[0081] The light-sensing angle of each light sensor is determined based on the current angle of the electronic device.

[0082] For each of the light sensors, determine the difference between the light intensity sensed by the light sensor and the historical sensed light intensity corresponding to the photosensitive angle in the preset mapping relationship;

[0083] Based on the differences, the target light sensor that is not blocked among the plurality of light sensors is determined;

[0084] The target light intensity is determined based on the target light sensor.

[0085] In this embodiment, the preset mapping relationship includes the correspondence between the light sensor's sensing angle and the historical sensed light intensity. The sensing angle can be determined based on the current angle of the electronic device determined by the angle sensor and the position of each light sensor on the electronic device. Taking a camera as an example, the sensing angle of the front light sensor is consistent with the camera's imaging angle, while the sensing angle of the rear light sensor is opposite to that of the front light sensor. Therefore, when the current angle of the camera is determined to be yaw, pitch, and roll by the angle sensor, the sensing angle of the front light sensor is yaw, pitch, and roll, and the sensing angle of the rear light sensor is yaw, pitch, roll + 180°. Furthermore, the light sensor can also be a sensor with a rotatable sensing end. The sensing angle of the light sensor can be determined based on the current angle of the electronic device determined by the angle sensor, the position of each light sensor on the electronic device, and the obtained rotation angle of the sensing end. This disclosure does not limit this.

[0086] In this embodiment, after determining the photosensitive angle of each light sensor, the difference between the light intensity sensed by each light sensor and the historical photosensitive light intensity corresponding to the photosensitive angle in a preset mapping relationship is determined. The difference between the light sensors includes the magnitude of the light intensity change and the direction of the light intensity change (e.g., light intensity increasing, light intensity decreasing). Based on the differences between each light sensor, unobstructed target light sensors are determined. For example, if the differences indicate that the light intensity sensed by each light sensor changes only slightly or remains constant, it is determined that none of the light sensors are obstructed, and thus each light sensor is a target light sensor. If the differences indicate that the light intensity sensed by one light sensor decreases significantly while the light intensity sensed by other light sensors remains constant, it is determined that the light sensor with the significantly decreased light intensity is obstructed, and the other light sensors are target light sensors.

[0087] In this embodiment of the disclosure, after determining the target light sensor, the light intensity sensed by the target light sensor can be determined as the target light intensity, or the maximum light intensity among the light intensity sensed by the target light sensor and the historical sensed light intensity corresponding to the photosensitive angle of the target light sensor in the preset mapping relationship can be determined as the target light, etc.

[0088] It is understood that the difference between the light intensity sensed by each light sensor and the historical light intensity sensed at the corresponding photosensitive angle characterizes the degree of change in the light intensity sensed by the light sensor. Based on the characteristic that the light intensity sensed by a light sensor decreases significantly after being blocked, this embodiment of the present disclosure determines the unblocked target light sensor based on the differences between each light sensor, and determines the target light intensity based on the target light sensor, which can improve the accuracy of determining the target light intensity. Furthermore, compared to determining the differences between each light sensor based on the current angle of the electronic device, this embodiment of the present disclosure determines the difference between the light intensity sensed at a given photosensitive angle and the corresponding historical light intensity based on the photosensitive angle of the light sensor. In cases where the photosensitive end of the light sensor is rotatable, this improves the purposefulness of comparing the light intensity sensed at different photosensitive angles at the same photosensitive angle with the historical light intensity, thereby helping to improve the determination of the target light sensor and the accuracy of determining the target light intensity based on the target light sensor.

[0089] In some embodiments, the electronic device includes a first light sensor and a second light sensor; the first difference corresponding to the first light sensor includes a first amplitude of light intensity change and a first direction of light intensity change, and the second difference corresponding to the second light sensor includes a second amplitude of light intensity change and a second direction of light intensity change;

[0090] The step of determining the unobstructed target light sensor among the plurality of light sensors based on the differences includes:

[0091] If both the first amplitude and the second amplitude are less than a preset amplitude threshold, it is determined that both the first light sensor and the second light sensor are the target light sensor;

[0092] If either the first amplitude or the second amplitude is greater than or equal to the preset amplitude threshold, the target light sensor is determined based on the first amplitude, the first direction, the second amplitude, and the second direction.

[0093] In this embodiment of the disclosure, the electronic device includes a first light sensor and a second light sensor; such as Figure 5 The diagram shows a side view of an electronic device, where Z1 denotes the light-sensing range of a first light sensor and Z2 denotes the light-sensing range of a second light sensor. In the case where the electronic device includes a display screen, the light-sensing direction of the first light sensor can be towards the display screen, and the light-sensing direction of the second light sensor can be opposite to that of the first light sensor.

[0094] In this embodiment of the present disclosure, the first difference between the light intensity sensed by the first light sensor and the historical sensed light intensity corresponding to the photosensitive angle of the first light sensor in the preset mapping relationship includes the first amplitude of the light intensity change and the first direction of the light intensity change; the second difference between the light intensity sensed by the second light sensor and the historical sensed light intensity corresponding to the photosensitive angle of the second light sensor in the preset mapping relationship includes the first amplitude of the light intensity change and the second direction of the light intensity change; wherein, if the direction (including the first direction and the second direction) represents an increase in light intensity, it can be represented by "+", and if it represents a decrease in light intensity, it can be represented by "-".

[0095] In this embodiment of the present disclosure, when both the first amplitude of the first difference and the second amplitude of the second difference are less than a preset amplitude threshold, it indicates that the light intensity sensed by the first light sensor and the second light sensor changes slightly or remains unchanged. In this case, it is highly likely that neither the first light sensor nor the second light sensor is blocked, thereby determining that both the first light sensor and the second light sensor are target light sensors. The slight change in light intensity includes a slight decrease in light intensity, no change in light intensity, and a slight increase in light intensity.

[0096] In this embodiment of the present disclosure, if either the first amplitude of the first difference or the second amplitude of the second difference is greater than or equal to a preset amplitude threshold, it indicates that the first light sensor and / or the second light sensor has a large amplitude of light intensity change. Then, based on the first amplitude, the first direction, the second amplitude, and the second direction, it determines whether the light intensity increases or decreases, and the amplitude of the increase or decrease in light intensity, thereby determining the unobstructed target light sensor. If the light intensity sensed by the first light sensor decreases significantly, while the light intensity sensed by the second light sensor remains unchanged or decreases slightly, the second light sensor is determined to be the target light sensor.

[0097] It is understood that, on the one hand, in the embodiments of this disclosure, when both the first amplitude and the second amplitude are less than a preset amplitude threshold, both the first light sensor and the second light sensor are determined to be target light sensors, without needing to determine the direction of light intensity change, thus improving the immediacy of determining the target light sensor. On the other hand, when either the first amplitude or the second amplitude is greater than or equal to the preset amplitude threshold, the target light sensor is determined based on the first amplitude and first direction of the light intensity change sensed by the first light sensor, and the second amplitude and second direction of the light intensity change sensed by the second light sensor. This allows for accurate characterization of light intensity changes, thereby improving the accuracy of determining the target light sensor based on light intensity changes.

[0098] In some embodiments, determining the target light sensor based on the first amplitude, the first direction, the second amplitude, and the second direction includes:

[0099] When the first direction and the second direction are the same, and the difference between the first amplitude and the second amplitude is less than a preset difference threshold, the first light sensor and the second light sensor are determined to be the target light sensor;

[0100] When the first direction is different from the second direction, another light sensor other than the light sensor corresponding to the direction representing the decrease in light intensity in the first direction and the second direction is determined as the target light sensor.

[0101] In this embodiment of the disclosure, when there is a preset amplitude threshold in the first amplitude and the second amplitude, the first direction and the second direction are the same, and the difference between the first amplitude and the second amplitude is less than the preset difference threshold, such as when the ambient light intensity increases significantly (e.g., when the lights are turned on), the light intensity sensed by the first light sensor and the second light sensor increases significantly, or when the ambient light intensity decreases significantly (e.g., when the lights are turned off), the light intensity sensed by the first light sensor and the second light sensor decreases significantly. In this case, it is highly likely that neither the first light sensor nor the second light sensor is blocked, thereby determining that both the first light sensor and the second light sensor are target light sensors.

[0102] In this embodiment of the disclosure, if either the first amplitude or the second amplitude is greater than or equal to a preset amplitude threshold, and the first direction is different from the second direction, such as a significant decrease in the light intensity sensed by the first light sensor while the light intensity sensed by the second light sensor does not significantly decrease, then the probability that the first light sensor is blocked and the second light sensor is not blocked is relatively high, thereby determining the second light sensor as the target light sensor. Here, "the light intensity sensed by the second light sensor not significantly decreasing" includes light intensity remaining unchanged, light intensity significantly increasing, light intensity slightly increasing, and light intensity slightly decreasing.

[0103] It is understood that, on the one hand, in the embodiments of this disclosure, when there is a preset amplitude threshold in the first amplitude and the second amplitude, and the first direction is different from the second direction, it is determined that the light sensor corresponding to the direction of decreasing light intensity is blocked, without needing to determine the direction of light intensity change, which can improve the immediacy of determining the target light sensor; on the other hand, when there is a preset amplitude threshold in the first amplitude and the second amplitude, the first direction is the same as the second direction, and the difference between the first amplitude and the second amplitude is less than a preset difference threshold, it is more likely that the light intensity will both increase or decrease significantly. In this case, it is very likely that neither the first light sensor nor the second light sensor is blocked, which can improve the accuracy of determining the unblocked target light sensor.

[0104] In some embodiments, determining the target light intensity based on the target light sensor includes:

[0105] The correspondence between the light intensity sensed by the target light sensor and the light-sensing angle of the target light sensor is updated to the preset mapping relationship;

[0106] Based on the updated preset mapping relationship, the maximum value of the historical sensed light intensity mapped by the preset angle range, including the photosensitive angle, is determined as the target light intensity; wherein, the historical sensed light intensity mapped by the preset angle range, including the photosensitive angle, includes at least the light intensity sensed by the target light sensor.

[0107] In this embodiment of the disclosure, for each target light sensor, the correspondence between the light intensity sensed by the target light sensor at a certain photosensitive angle and the photosensitive angle of the target light sensor is updated to a preset mapping relationship. Thus, the historical sensed light intensity corresponding to the photosensitive angle in the updated preset mapping relationship is the light intensity sensed by the target light sensor at that photosensitive angle. Furthermore, based on the updated preset mapping relationship, the maximum value among the historical sensed light intensities mapped within a preset angle range, including the photosensitive angle, is determined as the target light intensity. That is, the maximum value among the light intensity sensed by the target light sensor and the historical sensed light intensities corresponding to other photosensitive angles within the preset angle range is determined as the target light intensity.

[0108] It is understandable that, due to the limitation of the target light sensor's light-sensing range by the opening and / or the movement of the light source, the light intensity sensed by the target light sensor may be less than the actual ambient light intensity. In this embodiment, based on the updated preset mapping relationship, the maximum value among the light intensity sensed by the target light sensor and the historical sensed light intensity corresponding to other light-sensing angles within the preset angle range is determined as the target light intensity. This can reduce the impact of the opening limiting the light-sensing range of the target light sensor and / or the movement of the light source on the determination of the target light intensity, and improve the accuracy of the determination of the target light intensity.

[0109] Figure 6 This is a flowchart example of a method for determining light intensity shown in an embodiment of this disclosure. Figure 2 It is used in electronic devices including angle sensors and multiple light sensors, by Figure 6 It can be seen that the process includes the following steps:

[0110] S501, Obtain als = history_als;

[0111] In this embodiment of the disclosure, history_als corresponds to the aforementioned acquisition of the preset mapping relationship. The preset mapping relationship is obtained by assigning als to history_als. The preset mapping relationship includes the correspondence between the photosensitive angle and the historical photosensitive light intensity.

[0112] S502, Determine whether to exit the loop;

[0113] In this embodiment of the disclosure, the electronic device includes a display screen; based on the obtained display state indicating whether the display screen is displayed, and if the display state indicates that the display screen is displayed (e.g., the display screen is lit), step S503 is executed; otherwise, step S513 is executed, thereby exiting the loop when the display screen is not displayed, and reducing the power consumption of the electronic device.

[0114] S503. Get yaw, pitch, roll; front_als; back_als;

[0115] In this embodiment, yaw, pitch, and roll correspond to the current angle of the aforementioned electronic device, front_als corresponds to the light intensity sensed by the first light sensor (e.g., a front-facing light sensor) at the specified light-sensing angle, and back_als corresponds to the light intensity sensed by the second light sensor (e.g., a rear-facing light sensor) at the specified light-sensing angle. Specifically, when the current angle of the electronic device is yaw, pitch, and roll, the light-sensing angle of the first light sensor is yaw, pitch, and roll, and the light-sensing angle of the second light sensor is yaw, pitch, and roll + 180°.

[0116] This embodiment of the disclosure determines the current angle of the electronic device using an angle sensor, obtains the light intensity front_als sensed at the current angle using a first light sensor, and the light intensity back_als sensed at the current angle using a second light sensor.

[0117] S504. Determine als[yaw][pitch][roll]≈front_als, als[yaw][pitch][roll+180]≈back_als;

[0118] In this embodiment, if als[yaw][pitch][roll]≈front_als, it indicates that the difference between the light intensity sensed by the first light sensor and the historical sensed light intensity corresponding to the sensing angle in the preset mapping relationship is small, corresponding to the first amplitude in the aforementioned first difference being less than the preset amplitude threshold; if als[yaw][pitch][roll+180]≈back_als, it indicates that the difference between the light intensity sensed by the second light sensor and the historical sensed light intensity corresponding to the sensing angle in the preset mapping relationship is also small, corresponding to the second amplitude in the aforementioned second difference being less than the preset amplitude threshold; thus, when als[yaw][pitch][roll]≈front_als and als[yaw][pitch][roll+180]≈back_als, it indicates that the ambient light intensity changes slowly, and both the first light sensor and the second light sensor are unobstructed target light sensors, and step S507 is executed; otherwise, step S505 is executed.

[0119] S505. Judge als[yaw][pitch][roll]>>front_als, als[yaw][pitch][roll+180]>>back_als;

[0120] In this embodiment, if als[yaw][pitch][roll]>>front_als, it indicates that the light intensity sensed by the first light sensor is significantly reduced compared to the historical light intensity sensed at the sensing angle in the preset mapping relationship; if als[yaw][pitch][roll+180]>>front_als, it indicates that the light intensity sensed by the second light sensor is also significantly reduced compared to the historical light intensity sensed at the sensing angle in the preset mapping relationship; corresponding to the aforementioned first amplitude and second amplitude having a value greater than or equal to a preset amplitude threshold, if the first direction and the second direction are the same, and the difference between the first amplitude and the second amplitude is less than a preset difference threshold, it indicates that the ambient light intensity has significantly decreased, and both the first light sensor and the second light sensor are unobstructed target light sensors, and step S507 is executed; otherwise, step S506 is executed.

[0121] S506, Determine if als[yaw][pitch][roll] < <front_als,als[yaw][pitch][roll+180]<<back_als;

[0122] In an embodiment of the present disclosure, if als[yaw][pitch][roll] << front_als, it indicates that the light intensity sensed by the first light sensor has increased significantly compared to the historical sensed light intensity corresponding to the photosensitive angle in the preset mapping relationship; if als[yaw][pitch][roll + 180] << front_als, it indicates that the light intensity sensed by the second light sensor has also increased significantly compared to the historical sensed light intensity corresponding to the photosensitive angle in the preset mapping relationship; in the case where there is a first amplitude and a second amplitude that are greater than or equal to a preset amplitude threshold, if the first direction is the same as the second direction and the difference between the first amplitude and the second amplitude is less than a preset difference threshold, it indicates at this time that the ambient light intensity has increased significantly, and both the first light sensor and the second light sensor are target light sensors that are not blocked, and then step S507 is executed; otherwise, step S508 is executed.

[0123] S507. Update als[yaw][pitch][roll] = front_als, als[yaw][pitch][roll + 180] = back_als;

[0124] In an embodiment of the present disclosure, in the case where both the first light sensor and the second light sensor are target light sensors that are not blocked, for each target light sensor, update the historical sensed light intensity corresponding to the photosensitive angle in the preset mapping relationship to the light intensity sensed by this target light sensor, and then step S512 is executed. Among them, in each loop process, the corresponding relationship between the angle and the light intensity included in the iteratively updated preset mapping relationship is closer to the real environment.

[0125] S508. Determine whether als[yaw][pitch][roll + 180] ≈ back_als and als[yaw][pitch][roll] >> front_als;

[0126] In an embodiment of the present disclosure, if als[yaw][pitch][roll + 180] ≈ back_als, it indicates that the difference between the light intensity sensed by the second light sensor and the historical sensed light intensity corresponding to the photosensitive angle in the preset mapping relationship is small; if als[yaw][pitch][roll] >> front_als, it indicates that the light intensity sensed by the first light sensor has decreased significantly compared to the historical sensing corresponding to the photosensitive angle in the preset mapping relationship. In the case where the first direction is different from the second direction as described above, determine the other light sensor other than the light sensor corresponding to the direction indicating a decrease in light intensity in the first direction and the second direction as the target light sensor, that is, determine the second light sensor as the target light sensor, and then step S509 is executed; otherwise, step S510 is executed.

[0127] S509, update als[yaw][pitch][roll+180]=back_als;

[0128] In this embodiment of the disclosure, when it is determined that the second light sensor is an unobstructed target light sensor, the historical sensed light intensity corresponding to the photosensitive angle in the preset mapping relationship is updated to the light intensity sensed by the target light sensor, and then step S512 is executed.

[0129] S510. Determine als[yaw][pitch][roll]≈front_als, als[yaw][pitch][roll+180]>>back_als;

[0130] In this embodiment, if als[yaw][pitch][roll]≈front_als, it indicates that the difference between the light intensity sensed by the first light sensor and the historical light intensity sensed at the sensing angle in the preset mapping relationship is small. If als[yaw][pitch][roll+180]>>back_als, it indicates that the light intensity sensed by the second light sensor is significantly reduced compared to the historical light intensity sensed at the sensing angle in the preset mapping relationship. This corresponds to the aforementioned case where the first direction and the second direction are different. Thus, the other light sensor besides the light sensor corresponding to the direction of light intensity reduction in the first direction and the second direction is determined as the target light sensor, that is, the first light sensor is determined as the target light sensor, and step S511 is executed. Otherwise, the preset mapping relationship is not updated.

[0131] S511. Update als[yaw][pitch][roll]=front_als;

[0132] In this embodiment of the disclosure, when it is determined that the first light sensor is an unobstructed target light sensor, the historical sensed light intensity corresponding to the photosensitive angle in the preset mapping relationship is updated to the light intensity sensed by the target light sensor, and then step S512 is executed.

[0133] S512. now_als=max{als[yaw±a][pitch][roll±a], als[yaw±a][pitch][roll+180±a]} report now_als;

[0134] In this embodiment, now_als corresponds to the aforementioned target light intensity, and 'a' is a preset angle, which is positively correlated with a preset angle range including the photosensitive angle of the target light sensor. Based on the preset mapping relationship updated according to the light intensity sensed by the target light sensor, this embodiment determines the maximum value among the historical sensed intensities corresponding to the preset angle range, including the photosensitive angle of the target light sensor, as the target light intensity, and reports it to a device that controls the brightness of the electronic device's display screen, such as a display driver integrated circuit (DDIC). The DDIC then adjusts the brightness of the display screen to match the target light intensity based on the target light intensity. Furthermore, in step S513, saving the current angle and light sensing mapping relationship and exiting the current loop helps improve the accuracy of determining the unobstructed target light sensor based on the correspondence between the angle and historical sensed light intensity in the real-time updated preset mapping relationship, thereby improving the accuracy of determining the target light intensity based on the target light sensor.

[0135] Figure 7 This is a schematic diagram of a light intensity determination device according to an exemplary embodiment, applied in an electronic device including an angle sensor and multiple light sensors, with reference to... Figure 7 The device includes:

[0136] The first determining module 701 is used to determine the current angle of the electronic device through the angle sensor;

[0137] Acquisition module 702 is used to acquire the light intensity sensed by each of the light sensors at the current angle;

[0138] The second determining module 703 is used to determine the target light intensity of the environment in which the electronic device is located based on the current angle of the electronic device, the light intensity sensed by each of the light sensors at the current angle, and the preset mapping relationship between the angle and the light intensity.

[0139] In some embodiments, the preset mapping relationship includes the correspondence between the photosensitive angle and the historical photosensitive light intensity;

[0140] The second determining module 703 is used to determine the light-sensing angle of each light sensor according to the current angle of the electronic device; for each light sensor, determine the difference between the light intensity sensed by the light sensor and the historical sensed light intensity corresponding to the light-sensing angle in the preset mapping relationship; determine the unobstructed target light sensor among the plurality of light sensors according to the differences; and determine the target light intensity according to the target light sensor.

[0141] In some embodiments, the electronic device includes a first light sensor and a second light sensor; the first difference corresponding to the first light sensor includes a first amplitude of light intensity change and a first direction of light intensity change, and the second difference corresponding to the second light sensor includes a second amplitude of light intensity change and a second direction of light intensity change;

[0142] The second determining module 703 is used to determine that both the first light sensor and the second light sensor are the target light sensor when both the first amplitude and the second amplitude are less than a preset amplitude threshold; and to determine the target light sensor based on the first amplitude, the first direction, the second amplitude, and the second direction when either the first amplitude or the second amplitude is greater than or equal to the preset amplitude threshold.

[0143] In some embodiments, the second determining module 703 is used to determine the first light sensor and the second light sensor as the target light sensor when the first direction and the second direction are the same and the difference between the first amplitude and the second amplitude is less than a preset difference threshold; and when the first direction and the second direction are different, determine another light sensor other than the light sensor corresponding to the direction representing the decrease in light intensity in the first direction and the second direction as the target light sensor.

[0144] In some embodiments, the second determining module 703 is used to update the light intensity sensed by the target light sensor and the light sensing angle of the target light sensor to the preset mapping relationship; based on the updated preset mapping relationship, the maximum value of the historical sensed light intensity mapped by the preset angle range including the light sensing angle is determined as the target light intensity; wherein, the historical sensed light intensity mapped by the preset angle range including the light sensing angle includes at least the light intensity sensed by the target light sensor.

[0145] In some embodiments, the electronic device includes a display screen; the device further includes:

[0146] The adjustment module 704 is used to adjust the brightness of the display screen according to the target light intensity.

[0147] In some embodiments, when the plurality of light sensors include a first light sensor and a second light sensor, the light-sensing direction of the first light sensor is toward the display screen of the electronic device, and the light-sensing direction of the second light sensor is opposite to the light-sensing direction of the first light sensor.

[0148] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0149] Figure 8 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a mobile computer, etc.

[0150] Reference Figure 8 The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0151] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0152] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. 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 storage, flash memory, magnetic disk, or optical disk.

[0153] Power supply component 806 provides power to various components of electronic device 800. 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 to electronic device 800.

[0154] Multimedia component 808 includes a screen that provides an output interface between the electronic 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

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

[0156] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0157] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0158] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as Wi-Fi, 4G, or 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0159] In an exemplary embodiment, the electronic device 800 may 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 methods described above.

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

[0161] A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the aforementioned method for determining light intensity.

[0162] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the foregoing claims.

[0163] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for determining light intensity, characterized in that, The method, applied in an electronic device including an angle sensor and multiple light sensors, comprises: The current angle of the electronic device is determined by the angle sensor; Acquire the light intensity sensed by each of the light sensors at the current angle; The light-sensing angle of each light sensor is determined based on the current angle of the electronic device. For each of the light sensors, determine the difference between the light intensity sensed by the light sensor and the historical sensed light intensity corresponding to the sensing angle in the preset mapping relationship; Based on the differences, the target light sensor that is not blocked among the plurality of light sensors is determined; The target light intensity of the environment in which the electronic device is located is determined based on the target light sensor.

2. The method according to claim 1, characterized in that, The electronic device includes a first light sensor and a second light sensor; the first difference corresponding to the first light sensor includes a first amplitude of light intensity change and a first direction of light intensity change, and the second difference corresponding to the second light sensor includes a second amplitude of light intensity change and a second direction of light intensity change. The step of determining the unobstructed target light sensor among the plurality of light sensors based on the differences includes: If both the first amplitude and the second amplitude are less than a preset amplitude threshold, it is determined that both the first light sensor and the second light sensor are the target light sensor; If either the first amplitude or the second amplitude is greater than or equal to the preset amplitude threshold, the target light sensor is determined based on the first amplitude, the first direction, the second amplitude, and the second direction.

3. The method according to claim 2, characterized in that, Determining the target light sensor based on the first amplitude, the first direction, the second amplitude, and the second direction includes: When the first direction and the second direction are the same, and the difference between the first amplitude and the second amplitude is less than a preset difference threshold, the first light sensor and the second light sensor are determined to be the target light sensor; When the first direction is different from the second direction, another light sensor other than the light sensor corresponding to the direction representing the decrease in light intensity in the first direction and the second direction is determined as the target light sensor.

4. The method according to claim 1, characterized in that, Determining the target light intensity of the environment in which the electronic device is located based on the target light sensor includes: The correspondence between the light intensity sensed by the target light sensor and the light-sensing angle of the target light sensor is updated to the preset mapping relationship; Based on the updated preset mapping relationship, the maximum value of the historical sensed light intensity mapped by the preset angle range, including the photosensitive angle, is determined as the target light intensity; wherein, the historical sensed light intensity mapped by the preset angle range, including the photosensitive angle, includes at least the light intensity sensed by the target light sensor.

5. The method according to claim 1, characterized in that, The electronic device includes a display screen; the method further includes: The brightness of the display screen is adjusted according to the target light intensity.

6. The method according to claim 5, characterized in that, In the case where the plurality of light sensors include a first light sensor and a second light sensor, the light-sensing direction of the first light sensor is toward the display screen of the electronic device, and the light-sensing direction of the second light sensor is opposite to the light-sensing direction of the first light sensor.

7. A device for determining light intensity, characterized in that, The device, applicable to electronic devices including angle sensors and multiple light sensors, comprises: The first determining module is used to determine the current angle of the electronic device through the angle sensor; The acquisition module is used to acquire the light intensity sensed by each of the light sensors at the current angle; The second determining module is used to determine the light-sensing angle of each light sensor based on the current angle of the electronic device; for each light sensor, determine the difference between the light intensity sensed by the light sensor and the historical sensed light intensity corresponding to the light-sensing angle in the preset mapping relationship; based on each difference, determine the unobstructed target light sensor among the plurality of light sensors; and determine the target light intensity of the environment in which the electronic device is located based on the target light sensor.

8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1 to 6.