A brightness adjustment method, electronic device and storage medium
By combining the differences in ambient light detected by the ambient light sensor and the camera sensor, the brightness of the display screen is adjusted, solving the problem of brightness decay after applying a screen protector and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-05-31
- Publication Date
- 2026-05-29
AI Technical Summary
Applying a screen protector reduces the brightness of electronic device displays, affecting the user experience.
By combining the differences in ambient light intensity detected by the ambient light sensor and the camera sensor, it is determined whether a protective film has been applied, and the brightness of the display screen is adjusted according to the difference to offset the effect of the film on brightness reduction.
It improves the user experience of electronic devices by reducing the adverse effects of screen protectors on display brightness through brightness adjustment.
Smart Images

Figure CN121098967B_ABST
Abstract
Description
Technical Field
[0001] The application relates to the field of terminal technology, and in particular to a brightness adjustment method, electronic device, and storage medium. Background Technology
[0002] Currently, to protect the screens of electronic devices and facilitate use (such as preventing others from peeping at the screen), users generally purchase various types of screen protectors to apply to their devices, depending on their needs. Since screen protectors essentially add a film layer to the display area of the electronic device's screen, if this film layer is not transparent enough or is too thick, the brightness of the light emitted from the screen will decrease after passing through the film layer. Therefore, compared to an electronic device without a screen protector, the perceived brightness of the screen after applying a screen protector will be significantly reduced, thus lowering the user experience. Summary of the Invention
[0003] This application provides a brightness adjustment method, an electronic device, and a storage medium that can reduce the brightness decay of the display screen caused by the film and improve the user experience.
[0004] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0005] In a first aspect, embodiments of this application provide a brightness adjustment method applied to an electronic device, wherein the front-facing camera of the electronic device includes a camera sensor. Specifically, the method may include: the electronic device acquiring a first ambient light level detected by an environmental sensor and a second ambient light level detected by a camera sensor; the electronic device determining a protective film recognition result based on the first and second ambient light levels; the protective film recognition result indicating that the electronic device has no protective film applied, or the protective film recognition result indicating that the electronic device has a protective film applied; when the protective film recognition result indicates that the electronic device has a protective film applied, the electronic device determining a target brightness based on the first and second ambient light levels; and the electronic device controlling the display screen to emit light at the target brightness.
[0006] Based on the technical solution provided in this application, since the presence or absence of a protective film affects the ambient light level detected by the ambient light sensor, the difference between the first ambient light level detected by the ambient light sensor and the second ambient light level detected by the camera sensor can reflect whether the electronic device has a protective film applied. In other words, the presence or absence of a protective film on the electronic device can be determined based on the first and second ambient light levels. Furthermore, since electronic devices generally adaptively adjust the brightness of the display screen based on the ambient light level detected by the ambient light sensor, the impact of the protective film on the ambient light level detected by the ambient light sensor, as reflected by the first and second ambient light levels, can also be used to infer a target brightness suitable for the current film application scenario. This target brightness can, to some extent, reduce the brightness attenuation of the display screen caused by the protective film. Using this target brightness as the brightness of the electronic device's display screen during operation can reduce the adverse effects of the protective film on the user's perception of the display screen brightness, thus improving the user experience of the electronic device.
[0007] In one possible implementation of the first aspect, the electronic device determines the film application recognition result based on a first ambient light intensity and a second ambient light intensity, including: the electronic device calculating the absolute value of a first difference between the first ambient light intensity and the second ambient light intensity; if the absolute value of the first difference is greater than a preset illuminance value, the electronic device determines that the film application recognition result indicates that the electronic device has applied a protective film; if the absolute value of the first difference is less than the preset illuminance value, the electronic device determines that the film application recognition result indicates that the electronic device has not applied a protective film.
[0008] Based on the technical solution corresponding to the above implementation method, since the ambient light intensity detected by the ambient light sensor will decrease when a protective film is applied to the electronic device compared to when no film is applied, while the ambient light intensity detected by the camera sensor will not change. Therefore, the electronic device can determine whether a protective film is applied to the phone based on the difference between the first and second ambient light intensities. This allows it to decide whether to adjust the display brightness according to the existing adaptive brightness curve or to determine a more suitable target brightness based on the first and second ambient light intensities. In other words, the technical solution corresponding to this implementation method provides data support for the subsequent processes of the brightness adjustment method, enabling the brightness adjustment method to be implemented smoothly.
[0009] In one possible implementation of the first aspect, when the absolute value of the first difference is greater than a preset illuminance value, the electronic device determines that the film identification result indicates that the electronic device has applied a protective film, including: when neither the first ambient light illuminance nor the second ambient light illuminance is less than a preset minimum value, and the absolute value of the first difference is greater than the preset illuminance value, the electronic device determines that the film identification result indicates that the electronic device has applied a protective film.
[0010] If an electronic device is in a low-light environment, both the first ambient light level detected by the ambient light sensor and the second ambient light level detected by the camera sensor will be very low (less than a preset minimum value), regardless of whether the device has a protective film applied. In this case, the difference between the first and second ambient light levels is insufficient to indicate whether a protective film is applied. Therefore, only when both the first and second ambient light levels are not less than the preset minimum value, and the absolute value of the first difference is greater than the preset illuminance value, can it be considered that the electronic device is currently in a high-light environment. In this case, it can be determined that a protective film is applied to the electronic device. Therefore, based on the technical solution corresponding to the above implementation method, it is possible to more accurately determine whether a protective film is applied to the electronic device.
[0011] In one possible implementation of the first aspect, the electronic device determines the film application recognition result based on a first ambient light intensity and a second ambient light intensity, and further includes: when both the first ambient light intensity and the second ambient light intensity are less than a preset minimum value, the electronic device determines that the film application recognition result indicates that the electronic device has not applied a protective film.
[0012] In low-light environments, regardless of whether a screen protector is applied, both the ambient light sensor (first ambient light level) and the camera sensor (second ambient light level) will detect very low ambient light. If both are below a preset minimum, the electronic device is considered to be in a low-light environment. In such a low-light scenario, for the purpose of stable screen brightness, the display brightness does not need special adjustment; instead, it should adaptively adjust according to existing logic. Therefore, it can be assumed that the phone is not covered by a screen protector. Based on the above implementation, the technical solution can determine that the electronic device is not covered by a screen protector when it is in a low-light environment. This avoids the discomfort to the user caused by adjusting the display brightness if a screen protector is detected in a low-light environment.
[0013] In one possible implementation of the first aspect, the electronic device determines the target brightness based on a first ambient illuminance and a second ambient illuminance, including: the electronic device determining a first brightness corresponding to the first ambient illuminance based on an adaptive brightness curve; the adaptive brightness curve being used to indicate the mapping relationship between the ambient illuminance and the display brightness; the electronic device determining a first brightness compensation value based on the first ambient illuminance, the second ambient illuminance, and the first brightness; and the electronic device determining the sum of the first brightness and the first brightness compensation value as the target brightness.
[0014] Based on the technical solution corresponding to the above implementation method, the electronic device can determine a first brightness compensation value that can offset the attenuation effect of the protective film on the display screen's brightness based on the difference between the first and second ambient light levels. This allows for the acquisition of a target brightness that matches the current lighting scenario. Since this target brightness can, to a certain extent, offset the attenuation effect of the protective film on the display screen's brightness, when the display screen subsequently emits light at this target brightness, the adverse effects of the protective film on the user's perception of the display screen's brightness can be reduced, thus improving the user's experience with the electronic device.
[0015] In one possible implementation of the first aspect, the electronic device determines a first brightness compensation value based on a first ambient illuminance, a second ambient illuminance, and a first luminance, including: the electronic device calculating the absolute value of a first difference between the first ambient illuminance and the second ambient illuminance; the electronic device calculating a first ratio of the absolute value of the first difference to the second ambient illuminance; and the electronic device determining the product of the first luminance and the first ratio as the first brightness compensation value.
[0016] Since the film coating does not affect the camera sensor's detection of ambient light intensity, the second ambient light intensity can be approximated as the true ambient light intensity. However, the ambient light sensor's detection of ambient light intensity is attenuated by the film coating. Therefore, the absolute value of the first difference between the first and second ambient light intensity can be considered as the attenuation of ambient light intensity caused by the film coating. The first ratio of the absolute value of the first difference to the second ambient light intensity value can then characterize the percentage of the attenuation of ambient light intensity detected by the ambient light sensor due to the film coating relative to the true ambient light intensity. The product of this first ratio and the first brightness can be used as a first brightness compensation value to offset the attenuation of the display screen's brightness caused by the film coating. Therefore, based on the technical solution corresponding to the above implementation method, a suitable first brightness compensation value can be calculated, providing data support for subsequently determining the target brightness.
[0017] In one possible implementation of the first aspect, the electronic device determines the target brightness based on a first ambient illuminance and a second ambient illuminance, including: the electronic device determining a second brightness corresponding to the second ambient illuminance based on an adaptive brightness curve; the adaptive brightness curve being used to indicate the mapping relationship between ambient illuminance and display brightness; the electronic device determining a second brightness compensation value based on the first ambient illuminance, the second ambient illuminance, and the second brightness; and the electronic device determining the sum of the second brightness and the second brightness compensation value as the target brightness.
[0018] In practice, when a screen protector is applied to the display screen of an electronic device, there is a significant difference between the ambient light level measured by the ambient light sensor and the actual ambient light level. Therefore, the first brightness determined from the adaptive brightness curve based on the first ambient light level is essentially attenuated. Even if the first brightness compensation value can compensate for the brightness attenuation caused by the protective film when the display screen emits light, the brightness attenuation due to the first ambient light level still exists. Therefore, if a second brightness corresponding to a second ambient light level that is closer to the actual ambient light level is determined from the adaptive brightness curve, and then a second brightness compensation value corresponding to that second brightness is added to obtain the target brightness, the brightness attenuation caused by the protective film can be further reduced. Therefore, based on the technical solution corresponding to the above implementation method, the electronic device can determine a second brightness compensation value that better offsets the attenuation effect of the screen protector on the display screen's brightness based on the difference between the first and second ambient light levels. Since the second brightness value itself is determined from the adaptive brightness curve based on the second ambient light level that is closer to the actual ambient light level, the attenuation of the brightness (i.e., the first brightness) determined based on the ambient light level detected by the electronic device being affected by the protective film can be avoided. Furthermore, by adding the second brightness value to the second brightness compensation value, a target brightness that better matches the current lighting scenario can be obtained. This target brightness can better offset the attenuation effect of the protective film on the display's luminous brightness. Therefore, when the display emits light at this target brightness, the adverse effects of the protective film on the user's perception of the display brightness can be reduced to a greater extent, improving the user's experience with electronic devices.
[0019] In one possible implementation of the first aspect, the electronic device determines a second brightness compensation value based on a first ambient illuminance, a second ambient illuminance, and a second brightness, including: the electronic device calculating the absolute value of a first difference between the first ambient illuminance and the second ambient illuminance; the electronic device calculating a first ratio of the absolute value of the first difference to the second ambient illuminance; and the electronic device determining the product of the second brightness and the first ratio as the second brightness compensation value.
[0020] Since the second brightness value is determined from the adaptive brightness curve based on a second ambient light level that more closely reflects the actual ambient light level, the attenuation of the brightness (i.e., the first brightness) determined based on the ambient light level detected by the electronic device being affected by the protective film can be avoided. Therefore, based on the technical solution corresponding to the above implementation method, a more accurate brightness compensation value, i.e., the second brightness compensation value, can be obtained.
[0021] In one possible implementation of the first aspect, the method further includes: when the film recognition result indicates that the electronic device is not covered with a protective film, the electronic device determines a first brightness corresponding to a first ambient light level based on an adaptive adjustment curve, and controls the display screen to emit light at the first brightness.
[0022] Based on the technical solutions corresponding to the above implementation, even without a protective film attached, the electronic device can adaptively adjust the brightness of the display screen according to the ambient light intensity detected by the ambient light sensor.
[0023] Secondly, embodiments of this application also provide an electronic device. The functions of this electronic device can be implemented through hardware or through hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions, such as an acquisition module, a processing module, and a control module.
[0024] The system includes an acquisition module for acquiring a first ambient light level detected by an environmental sensor and a second ambient light level detected by a camera sensor. A processing module is used to determine a protective film recognition result based on the first and second ambient light levels acquired by the acquisition module; the protective film recognition result indicates that the electronic device has no protective film applied, or it indicates that the electronic device has a protective film applied. The processing module is also used to determine a target brightness based on the first and second ambient light levels acquired by the acquisition module when the protective film recognition result indicates that the electronic device has a protective film applied. A control module is used to control the display screen to emit light at the target brightness determined by the processing module.
[0025] Thirdly, this application provides an electronic device including a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform a brightness adjustment method as provided in the first aspect and any possible design thereof.
[0026] Fourthly, this application provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform a brightness adjustment method as provided in the first aspect and any possible design thereof.
[0027] Fifthly, this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform a brightness adjustment method as provided in the first aspect and any possible design thereof.
[0028] Understandably, the beneficial effects that the technical solutions provided in the second to fifth aspects described above can be achieved can be referred to the beneficial effects in the first aspect and any of its possible design methods, which will not be repeated here. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of a mobile phone before and after applying a screen protector, provided in an embodiment of this application.
[0030] Figure 2 A schematic diagram illustrating the placement of an ambient light sensor for related technologies;
[0031] Figure 3 A schematic diagram of an adaptive brightness curve provided in an embodiment of this application;
[0032] Figure 4 A schematic diagram of the ambient light intensity variation curves under three different scenarios provided in the embodiments of this application;
[0033] Figure 5 This is a schematic diagram of an electronic device film provided in an embodiment of this application;
[0034] Figure 6 A schematic diagram showing the results of the camera sensor and ambient light sensor detecting ambient light before and after film application, as provided in an embodiment of this application.
[0035] Figure 7 A schematic diagram illustrating the principle of a brightness adjustment method provided in an embodiment of this application;
[0036] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0037] Figure 9 A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;
[0038] Figure 10 A flowchart illustrating a brightness adjustment method provided in this application embodiment. Figure 1 ;
[0039] Figure 11 A flowchart illustrating a brightness adjustment method provided in this application embodiment. Figure 2 ;
[0040] Figure 12 This is a schematic diagram illustrating the effect of a brightness adjustment method provided in an embodiment of this application;
[0041] Figure 13 A flowchart illustrating a brightness adjustment method provided in this application embodiment. Figure 3 ;
[0042] Figure 14 A flowchart illustrating a brightness adjustment method provided in this application embodiment. Figure 4 ;
[0043] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0044] Figure 16 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0045] 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 limiting of this application. 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 “ / ” means “or,” for example, A / B can mean A or B; “and / or” in the text is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can mean: A alone, A and B simultaneously, and B alone.
[0046] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0047] The terms "first" and "second" in the following embodiments of this application are for descriptive purposes only and should not be construed as implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0048] First, the terms used in the embodiments of this application are explained as follows:
[0049] Always-on camera (AO camera): An AO camera refers to a camera that is always on. Taking a mobile phone as an example, the AO camera in a mobile phone generally refers to a low-power grayscale image camera, which can acquire low-resolution grayscale images. In some embodiments, the AO camera can be a function of a camera within an electronic device. That is, the electronic device may not have a separate AO camera, but rather integrate the AO camera function into a camera within the electronic device, such as a front-facing camera located on the side of the electronic device's display screen. In some embodiments, the AO camera may have the ability to measure ambient light levels; in this case, the module within the AO camera specifically used to measure ambient light levels can be called a camera sensor.
[0050] In related technologies, to protect the touchscreens of electronic devices such as mobile phones, tablets, and laptops and for ease of use (preventing others from peeping at the screen, etc.), users typically purchase protective films of various performance levels and apply them to the screens of their electronic devices, depending on their needs. Since a protective film essentially adds a film layer to the display area of the electronic device's screen, if the film layer on the display area is not transparent enough or is too thick (such as a privacy screen protector), the perceived brightness of the electronic device's screen will be somewhat reduced compared to the brightness before the film was applied.
[0051] Specifically, the decrease in the brightness of electronic device displays after applying a screen protector is due to the following two reasons:
[0052] Firstly, the added film layer on the display screen reduces the brightness of the light emitted by the screen after it passes through the film layer. For example, taking a mobile phone as an example, the brightness of the phone's light before applying a screen protector is as follows: Figure 1 As shown in (a), the brightness of the phone after applying the screen protector can be as follows: Figure 1 As shown in (b).
[0053] Secondly, since full-screen displays have become a major selling point for electronic devices, in pursuit of the ultimate screen-to-body ratio, most electronic devices adopt under-display ambient light solutions, which place the ambient light sensor (or ambient light sensing sensor) below the display screen. For example, taking a mobile phone as an example... Figure 2As shown in (a), the ambient light sensor can be positioned below the status bar section of the display screen. (See reference...) Figure 2 As shown in (b), when the phone's display shows an image, the user can see the image from above the screen. Simultaneously, the ambient light sensor located below the display also collects the ambient light intensity, allowing the phone to adaptively adjust the display brightness based on this intensity. Higher ambient light intensity results in higher display brightness. However, due to the influence of the film layer on the display, the ambient light intensity sensed by the sensor decreases. This causes the display brightness, adaptively adjusted by the electronic device based on ambient light intensity, to be lower than the brightness of the display before the film was applied.
[0054] For example, taking a mobile phone as an electronic device, and a privacy screen protector or other protective film with insufficient transparency or excessive thickness as an example, the relationship between the brightness of the phone screen and the ambient light level when no screen protector is applied, and the relationship between the brightness of the light emitted from the phone screen after passing through the film layer and the ambient light level when a screen protector is applied (which can be called an adaptive brightness curve), can be analyzed as follows: Figure 3 As shown in the figure, compared with the first relationship curve before applying the screen protector, under the same ambient light conditions, the brightness of the light emitted from the display screen is significantly reduced after passing through the film layer in the second relationship curve after applying the screen protector.
[0055] In summary, compared to electronic devices without a screen protector, the perceived brightness of the screen is significantly reduced after applying a screen protector, thus diminishing the user experience.
[0056] It should be noted that since protective films with sufficient transparency or very thin layers have little impact on the user's perception of screen brightness after being attached to the display screen of an electronic device, the protective films that affect the luminous brightness of the display screen mentioned in this application embodiment refer only to protective films with insufficient transparency or relatively thick thickness. Furthermore, "applying a film" refers to applying a protective film with insufficient transparency or relatively thick thickness, while "not applying a film" refers to not applying a protective film with insufficient transparency or relatively thick thickness. The same applies to subsequent embodiments.
[0057] Based on the above issues, for electronic devices employing under-display ambient light solutions, in order to reduce the adverse effects of screen protectors on brightness, the brightness of the display screen can be actively increased after the screen protector is applied, thereby reducing the negative impact of brightness attenuation caused by the screen protector on the user experience. A key issue is how to determine whether a screen protector is currently applied to the electronic device.
[0058] To address this issue, researchers discovered that in addition to ambient light sensors, the camera sensors in the front-facing cameras of current electronic devices also possess the ability to detect ambient light levels. Through actual testing of a particular electronic device under different environments for a certain period of time, they were able to obtain... Figure 4 The ambient light intensity change curves measured by the ambient light sensor and camera sensor of the electronic device under three different scenarios (a), (b) and (c). Figure 4 The horizontal axis of the three graphs represents time, and the vertical axis represents ambient light intensity.
[0059] in, Figure 4 Figure (a) shows the curves of ambient light intensity variation measured by the ambient light sensor and camera sensor in an indoor environment; Figure 4 Figure (b) shows the change curves of ambient light intensity measured by the ambient light sensor and camera sensor in a canteen environment; Figure 4 Figure (c) shows the variation curves of ambient illuminance measured by the ambient light sensor and the camera sensor in a garage environment. It can be seen that, regardless of the environment, the difference in ambient illuminance measured by the ambient light sensor and the camera sensor is very small, almost identical. That is, without a protective film, the absolute value of the difference between the ambient illuminance measured by the ambient light sensor and the camera sensor of the electronic device is less than a specific value. This specific value can be statistically derived by repeatedly measuring the ambient illuminance measured by the ambient light sensor and the camera sensor in an electronic device without a protective film under the same lighting conditions.
[0060] Meanwhile, the measured values (or readings) of the ambient light sensor and camera sensor under different illuminance levels, as well as the measured values of the illuminance meter, are shown in Table 1 below.
[0061]
[0062]
[0063] It can be seen that the ambient light illuminance detected by the ambient light sensor and the camera sensor is not significantly different, and the ambient light illuminance detected by both is also not significantly different from the actual value of the ambient light illuminance measured by the illuminance meter.
[0064] In summary, when electronic devices are not covered with a protective film, the ambient light intensity detected by the ambient light sensor and the camera sensor is approximately the same.
[0065] In practice, to ensure the shooting effect of the front-facing camera, electronic devices should be fitted with screen protectors according to the following guidelines: Figure 5 As shown in (a), a through-hole corresponding to the front-facing camera area will be cut out within the complete protective film. This way, after the film is applied and the electronic device is protected, refer to... Figure 5 As shown in (b), the area where the front-facing camera is located on the display screen of the electronic device is not covered by a protective film, and therefore the function of the front-facing camera is not affected by the protective film. However, since the ambient light sensor is located below the display screen, and the area of the display screen corresponding to the ambient light sensor is covered by a protective film, the ambient light intensity that the ambient light sensor can detect is lower than that before the protective film was applied, under the same lighting conditions.
[0066] For example, by acquiring the ambient light intensity detection of the camera sensor and ambient light sensor in an electronic device under three different lighting scenarios, the following can be obtained: Figure 6 The illuminance variation curve is shown. Figure 6 In the diagram, the vertical axis represents the measured ambient illuminance, while different values on the horizontal axis represent different lighting scenarios. Specifically, "1" on the horizontal axis can represent a lighting scenario with very low ambient illuminance (such as a dark room), "2" on the horizontal axis can represent a lighting scenario with relatively high ambient illuminance (such as an indoor scene with lights on), and "3" on the horizontal axis can represent a lighting scenario with even higher ambient illuminance (such as an outdoor scene during a sunny day).
[0067] It can be seen that in real-world low-light scenarios (such as a dark room), even with a protective film applied to the electronic device, the ambient light level detected by the camera sensor and ambient light sensor will be very low and not significantly different. However, in real-world high-light scenarios (such as an indoor scene with lights on or an outdoor scene on a sunny day), the difference in ambient light level detected by the camera sensor and ambient light sensor (the absolute value of the difference) will be relatively large. This difference can exceed a preset value, which can be calculated by repeatedly measuring the ambient light level measured by the ambient light sensor and camera sensor on the screen-covered electronic device in high-light scenarios. Furthermore, if the difference in ambient light level detected by the camera sensor and ambient light sensor is greater than a specific value but less than a preset value, it can be assumed that the electronic device has a protective film that has little impact on the brightness of the display screen. This type of protective film has sufficiently good transparency or a very thin film thickness.
[0068] For example, taking a privacy screen protector as an example when applying a screen protector to an electronic device, before applying the protector, the ambient light intensity detected by the ambient light sensor is 'a lux', while the ambient light intensity detected by the camera sensor in the front-facing camera is 'blux'. Therefore, |ba| = x, and x ≤ 5%a. Here, 5%a can be a specific value. After applying the privacy screen protector to the electronic device without changing the lighting environment, because the privacy screen protector has relatively low transmittance, the ambient light intensity detected by the ambient light sensor can become c, where c ≈ 60%–85%a. Therefore, |bc| ≥ 20%a. This 20%a is a preset value.
[0069] In summary, by comparing the ambient light levels detected by the camera sensor and ambient light sensor in an electronic device, it's possible to determine relatively accurately whether a protective film (either with insufficient transparency or excessive thickness) is applied. For example, if both the ambient light sensor and camera sensor detect ambient light levels below a preset minimum, the electronic device is in a very low-light environment, and it's impossible to determine whether a protective film is applied. Conversely, if both the ambient light sensor and camera sensor detect ambient light levels above a preset minimum, and the absolute value of the difference is less than a preset value, the electronic device is not in a very low-light environment and is not currently using a protective film. Finally, if both the ambient light sensor and camera sensor detect ambient light levels above a preset minimum, and the absolute value of the difference is greater than a preset value, the electronic device is not in a very low-light environment and is currently using a protective film.
[0070] Subsequently, assuming the electronic device currently has a protective film applied, a more suitable screen brightness can be determined based on the difference in ambient light intensity detected by the ambient light sensor and the camera sensor. This ensures that the brightness of the screen emitting light through the protective film is closer to the brightness of the screen of an electronic device without a protective film under the same conditions. Consequently, the user's perceived brightness before and after applying the film does not change significantly, thus improving the user experience of the electronic device.
[0071] Based on the above description, and addressing the problem in related technologies where the application of protective films to electronic devices leads to a significant decrease in the brightness of the electronic device's display screen, this application provides a brightness adjustment method. In this technical solution, referring to... Figure 7As shown, the electronic device can first acquire a first ambient light level detected by an ambient light sensor and a second ambient light level detected by a camera sensor. Then, based on the first and second ambient light levels, it can be determined whether the electronic device has a protective film applied. If it is determined that the electronic device has a protective film applied, a target brightness more suitable for the current scene can be determined based on the first and second ambient light levels, and the display screen can be controlled to emit light at that target brightness.
[0072] Furthermore, if it is determined that the electronic device is not covered with a protective film, the electronic device can adaptively adjust the brightness of the display screen according to the first ambient light level based on existing logic. For example, a first brightness corresponding to the first ambient light level can be determined based on an adaptive adjustment curve, and the display screen can be controlled to emit light at that first brightness. The adaptive adjustment curve indicates the mapping relationship between the ambient light level and the display screen brightness.
[0073] Based on this technical solution, since the presence or absence of a protective film affects the ambient light level detected by the ambient light sensor, the difference between the first ambient light level detected by the ambient light sensor and the second ambient light level detected by the camera sensor can reflect whether a protective film is applied to the electronic device. In other words, the presence or absence of a protective film can be determined based on the first and second ambient light levels. Furthermore, since electronic devices generally adaptively adjust the display brightness based on the ambient light level detected by the ambient light sensor, the impact of the protective film on the ambient light level detected by the sensor, as reflected by the first and second ambient light levels, can also be used to infer a target brightness suitable for the current screen protector application scenario. This target brightness can, to some extent, reduce the brightness attenuation caused by the protective film. Using this target brightness as the operating brightness of the electronic device's display can reduce the adverse effects of the protective film on the user's perception of display brightness, thus improving the user experience.
[0074] The technical solutions provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0075] The technical solutions provided in this application can be applied to electronic devices equipped with ambient light sensors and camera sensors. In some embodiments, the electronic device may be a mobile phone, tablet computer, handheld computer, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device, etc. The embodiments of this application do not impose any special limitations on the specific type of electronic device.
[0076] For example, taking a mobile phone as an electronic device, Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown.
[0077] Reference Figure 8 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a display screen 193, a subscriber identification module (SIM) card interface 194, and a camera 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0078] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0079] A controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.
[0080] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0081] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0082] The charging management module 140 is used to receive charging input from a power supply device (such as a charger, laptop power supply, etc.). The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device.
[0083] While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141. Specifically, the battery 142 can be composed of multiple batteries connected in series. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110.
[0084] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 193, camera 195, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery voltage, current, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110.
[0085] Indicator 192 can be an indicator light, which can be used to indicate charging status and power changes, or to indicate messages, missed calls, and notifications.
[0086] Button 190 may include a power button, volume buttons, etc. Button 190 may be a mechanical button or a touch button. The electronic device can receive button input and generate key signal inputs related to user settings and function control of the electronic device.
[0087] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0088] Internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be 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, and can be pre-loaded into the RAM for direct read and write operations by the processor 110.
[0089] A touch sensor, also known as a "touch device," can be located on the display screen 193. The touch sensor and the display screen 193 together form a touchscreen, also called a "touchscreen." The touch sensor detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 193. In other embodiments, the touch sensor may also be located on the surface of the electronic device, in a different position than the display screen 193.
[0090] An ambient light sensor is used to sense ambient light intensity. For example, an ambient light sensor can measure the illuminance of four channels of ambient light. The ambient light sensor outputs the measured illuminance of the four channels of ambient light to the processor 110. The processor 110 can process the illuminance of the four channels of ambient light output by the ambient light sensor to obtain the ambient light intensity, i.e., the ambient light illuminance. In the screen-on state, the electronic device can adaptively adjust the display brightness according to the ambient light intensity detected by the ambient light sensor.
[0091] A pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 193. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. When a touch operation is applied to the display screen 193, the electronic device monitors the intensity of the touch operation based on the pressure sensor. The electronic device can also calculate the touch location based on the monitoring signal from the pressure sensor. In some embodiments, touch operations applied to the same touch location but with different intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.
[0092] In some embodiments, an electronic device may include one or N cameras 195, where N is a positive integer greater than 1. In this application embodiment, the type of camera 195 can be distinguished based on hardware configuration and physical location. For example, a camera located on the side of the electronic device's display screen 193 can be called a front-facing camera, and a camera located on the side of the electronic device's back cover can be called a rear-facing camera; another example is that a camera with a short focal length and a wide field of view can be called a wide-angle camera, while a camera with a long focal length and a narrow field of view can be called a regular camera. Here, focal length and field of view are relative concepts and are not specifically limited by parameters. Therefore, wide-angle cameras and regular cameras are also relative concepts, and can be specifically distinguished based on physical parameters such as focal length and field of view.
[0093] In this embodiment of the application, the front-facing camera among the multiple cameras included in the electronic device may be an AO camera, which may include a camera sensor. This camera sensor can be used to detect ambient light levels.
[0094] The electronic device implements display functions through a GPU, a display screen 193, and an application processor. The GPU is a microprocessor for image editing, connected to the display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0095] Electronic devices can achieve shooting functions through ISP, camera 195, video codec, GPU, display 193, and application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information. In this embodiment, the GPU's functions are used during the frame rendering process of each image frame to achieve better display effects and performance in the final displayed image.
[0096] The Information Service Provider (ISP) is used to process data fed back from the camera 195. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into the camera 195. The camera 195 is used to capture still images or videos.
[0097] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device is selecting a frequency, a DSP can perform a Fourier transform on the frequency energy.
[0098] Display screen 193 is used to display images, videos, etc. Display screen 193 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 193, where N is a positive integer greater than 1.
[0099] Electronic devices can implement audio functions such as music playback and recording through audio modules 170, speakers 170A, receivers 170B, microphones 170C, headphone jacks 170D, and application processors.
[0100] In this embodiment of the application, the display screen 193 can be used to display the pages required by the electronic device, as well as various possible information.
[0101] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem, and baseband processor.
[0102] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0103] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 can be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be housed in the same device.
[0104] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 193. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0105] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0106] The SIM card interface 194 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 194 to make contact with and detach from the electronic device. The electronic device can support one or more SIM card interfaces. The SIM card interface 194 supports Nano SIM cards, Micro SIM cards, and other SIM cards. Multiple cards can be inserted into the same SIM card interface 194 simultaneously. The SIM card interface 194 is also compatible with external memory cards. The electronic device interacts with the network through the SIM card to achieve functions such as calls and data communication. One SIM card corresponds to one user number.
[0107] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0108] Of course, this is understandable. Figure 8 The illustration shown is merely an example when the electronic device is in the form of a mobile phone. If the electronic device is in the form of a tablet, handheld computer, PC, PDA, wearable device (such as a smartwatch, smart bracelet), or other similar device, the structure of the electronic device may include more advanced features. Figure 8 The fewer structures shown can also include more than Figure 8 The structures shown are not limited here.
[0109] It is understandable that, generally speaking, the implementation of electronic device functions requires not only hardware support but also software cooperation. The software system of electronic devices can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application's embodiment uses a layered architecture... Taking the system as an example, the software structure of the electronic device is illustrated.
[0110] Figure 9 This is a schematic diagram of the layered architecture of the software system of the electronic device provided in the embodiments of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces (e.g., APIs).
[0111] In some examples, refer to Figure 9As shown in this embodiment, the software of the electronic device is divided into five layers, from top to bottom: the application layer, the framework layer (or application framework layer), the system library and Android runtime, the HAL layer (hardware abstraction layer), and the driver layer (or kernel layer). The system library and Android runtime can also be referred to as the native framework layer or the native layer.
[0112] The application layer can include a series of applications. For example... Figure 9 As shown, the application layer can include applications (APPs) such as camera, gallery, calendar, map, WLAN, Bluetooth, music, video, SMS, call, navigation, and instant messaging.
[0113] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes predefined functions or services. For example, the application framework layer may include an activity manager, window manager, content provider, audio service, view system, phone manager, resource manager, notification manager, package manager, etc., but this embodiment does not impose any limitations on these.
[0114] The activity management service, specifically the ActivityManagerService in the electronic device, is used to obtain foreground activities, i.e., the activities of foreground applications. This can include information about the foreground application, including but not limited to: process, application name, etc.
[0115] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0116] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.
[0117] The primary function of camera services is to provide applications with a unified interface and functionality for accessing and operating camera devices (i.e., webcams). Similarly, the primary function of audio services is to provide applications with a unified interface and functionality for accessing and operating audio modules within electronic devices.
[0118] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon can include views for displaying text and views for displaying images. In some embodiments, the view system may also include or initiate a rendering thread to perform operations such as drawing framebuffers.
[0119] A phone manager is used to provide communication functionality for electronic devices. For example, a phone manager can manage the call status of a calling application (including initiation, connection, and termination).
[0120] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0121] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0122] Package manager in The package manager is used to manage application packages. It allows applications to obtain detailed information about installed applications and their services, permissions, etc. The package manager is also used to manage events such as application installation, uninstallation, and upgrades.
[0123] The system library can include multiple functional modules. For example: a surface manager, media libraries, OpenGL ES, and SGL. The surface manager manages the display subsystem and provides 2D and 3D layer blending for multiple applications. The media libraries support playback and recording of various common audio and video formats, as well as still image files. The media libraries support various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. OpenGL ES is used for 3D graphics drawing, image rendering, compositing, and layer processing. SGL is a 2D graphics engine.
[0124] The Android runtime consists of the core libraries and the ART virtual machine. The Android runtime is responsible for scheduling and managing the Android system. The core libraries comprise two parts: one part contains the functionalities that Java code needs to call, and the other part consists of the Android core libraries. The application layer and application framework layer run in the ART virtual machine. The ART virtual machine executes the Java files of the application layer and application framework layer into binary files. The ART virtual machine is used for managing object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0125] The Hardware Abstraction Layer (HAL) is the interface layer between the operating system kernel and the hardware circuitry, designed to abstract the hardware. It hides the platform-specific hardware interface details, providing the operating system with a virtual hardware platform that is hardware-independent and portable across multiple platforms. The HAL provides a standard interface that exposes device hardware functionality to the higher-level Java API framework (i.e., the framework layer). The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component, such as: audio HAL, Bluetooth HAL, camera HAL (also known as camera HAL or camera hardware abstraction module), and sensors HAL (or i-sensor service).
[0126] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, battery drivers, etc., but this application is not limited to these. Specifically, the sensor driver can include the driver for each sensor included in the electronic device, such as an ambient light sensor driver. For example, the ambient light sensor driver can, in response to an instruction or command from the sensor module to acquire detection data, promptly send the detection data from the ambient light sensor to the sensor module. The camera driver can include the driver for each camera in the electronic device, such as a front-facing camera driver. For example, the front-facing camera driver can, in response to an instruction or command from the camera module to acquire detection data, promptly send the detection data from the camera sensor in the front-facing camera to the camera module.
[0127] In this embodiment of the application, to implement the brightness adjustment method provided in this embodiment, the layered architecture may further include a brightness adjustment module. This brightness adjustment module can be a module in any layer, such as a frame layer or a HAL layer. After acquiring a first ambient light level detected by an ambient light sensor and a second ambient light level detected by a camera sensor, the brightness adjustment module can determine whether a protective film is applied to the electronic device based on the first and second ambient light levels. If it is determined that a protective film is applied to the electronic device, a target brightness suitable for the current scene can be determined based on the first and second ambient light levels, and the display screen can be instructed or controlled to emit light at that target brightness.
[0128] Although this application uses the Android system as an example to illustrate the software architecture of electronic devices, its basic principles are equally applicable to systems based on Android. Electronic devices using operating systems such as iOS and Windows.
[0129] The technical solutions provided in the embodiments of this application can all be implemented in electronic devices with the above-described hardware or software architecture.
[0130] Based on the above Figure 8 The hardware architecture shown and Figure 9 The software architecture shown below, combined with Figure 10 The brightness adjustment method provided in the embodiments of this application will be described as shown below. Figure 10 This is a schematic flowchart illustrating a brightness adjustment method provided in an embodiment of this application. (Refer to...) Figure 10 As shown, taking a mobile phone as an example, the brightness adjustment method may include S1001-S1005:
[0131] S1001, The mobile phone acquires the first ambient light intensity detected by the ambient light sensor and the second ambient light intensity detected by the camera sensor.
[0132] In this embodiment, the mobile phone employs an under-display ambient light solution, meaning the ambient light sensor is located below the electronic device's display screen. This ambient light sensor can detect ambient light intensity, which can be referred to as the first ambient light intensity. The camera sensor is a module within the always-on camera of the mobile phone's front-facing camera, and this camera sensor also has the ability to detect ambient light intensity. The ambient light intensity detected by this camera sensor can be referred to as the second ambient light intensity.
[0133] In some embodiments, the always-on camera (or always-on camera function) included in the front-facing camera can remain on during phone operation, and the camera sensor in the always-on camera is also operational when the always-on camera is on. In this embodiment, when the camera sensor detects ambient light and obtains the second ambient light illuminance, the RGB (red, green, blue) camera in the front-facing camera used for taking normal photos does not need to be on or operational.
[0134] In some embodiments, the ambient light sensor and the camera sensor can detect the ambient light illuminance in real time or periodically when the mobile phone screen is on, and obtain a first ambient light illuminance and a second ambient light illuminance.
[0135] In some embodiments, the brightness adjustment method can be implemented by a brightness adjustment module in the mobile phone. This brightness adjustment module can obtain the first ambient light intensity detected by the ambient light sensor through the sensor HAL in the HAL layer and the sensor drive in the driver layer. Similarly, the brightness adjustment module can obtain the second ambient light intensity detected by the camera sensor through the camera HAL in the HAL layer and the camera drive in the driver layer.
[0136] After the mobile phone obtains the first ambient light level detected by the ambient light sensor and the second ambient light level detected by the camera sensor, the difference between the two can indicate whether a protective film is applied to the electronic device. Therefore, the mobile phone can then determine whether a protective film is applied based on the first and second ambient light levels. That is, S1001 is followed by S1002.
[0137] S1002, the mobile phone determines the screen protector recognition result based on the first ambient light level and the second ambient light level.
[0138] The screen protector recognition result is used to indicate whether the phone has a screen protector applied, or it is used to indicate whether the phone has a screen protector applied.
[0139] When the screen protector recognition result indicates that the phone does not have a screen protector, the phone does not need to make specific adjustments to the screen brightness. In this case, the phone can determine a first brightness based on the first ambient light level and an adaptive adjustment curve, and control the screen to emit light at that first brightness. This is step S1003. The adaptive adjustment curve indicates the mapping relationship between ambient light level and screen brightness.
[0140] When the screen protector recognition result indicates that a screen protector is applied to the phone, the phone can determine a target brightness that is more suitable for the current scene based on the first ambient light level and the second ambient light level, and use this as the brightness for subsequent phone screen operation. That is, execute S1004-S1005.
[0141] In one possible implementation, based on the description of the changes in ambient light intensity detected by the ambient light sensor and camera sensor after the electronic device is coated with a film in the foregoing embodiments, combined with Figure 10 , refer to Figure 11 As shown, S1002 may specifically include S1101-S1105:
[0142] S1101. The mobile phone determines whether both the first ambient light intensity and the second ambient light intensity are less than the preset minimum value.
[0143] For example, the preset minimum value can be 10 lux or any other possible illuminance value.
[0144] Based on the foregoing embodiments, for Figure 6 According to the relevant description, if a mobile phone is in a low-light environment, regardless of whether a screen protector is applied, both the first ambient light level detected by the ambient light sensor and the second ambient light level detected by the camera sensor will be very low. In this case, the difference between the first and second ambient light levels is insufficient to indicate whether a screen protector is applied. Therefore, if both the first and second ambient light levels are less than a preset minimum value, the phone can be considered to be in a low-light environment (i.e., a dark scene), and it cannot be determined whether a screen protector is applied. In such a dark scene, for the purpose of stable screen brightness changes, the display brightness does not need to be specially adjusted but should be adaptively adjusted according to existing logic. Therefore, it can be assumed that the phone is not covered by a screen protector. For example, with a preset minimum value of 10 lux, in a dark room, the first ambient light level detected by the ambient light sensor could be 5 lux, and the second ambient light level detected by the camera sensor could be 2 lux. At this time, if both the first ambient light intensity and the second ambient light intensity are less than the preset minimum value, then the screen protector recognition result is used to indicate that the mobile phone does not have a screen protector.
[0145] In other words, since the process of adaptively adjusting the screen brightness is the same as the process of processing screen illumination when the phone is not covered by a screen protector, the determination that the phone is not covered by a screen protector can be categorized under the determination that the phone is not covered by a screen protector. That is, if both the first and second ambient light intensities are less than a preset minimum value, the screen protector recognition result can be used to indicate that the phone is not covered by a screen protector. Therefore, step S1102 is executed.
[0146] If both the first ambient light intensity and the second ambient light intensity are not less than the preset minimum value, it can be assumed that the phone is currently in a lighting scene with high ambient light intensity. In this case, it can be determined whether the phone has a protective film applied based on the difference between the first ambient light intensity and the second ambient light intensity. That is, execute S1103-S1105.
[0147] S1102. The mobile phone screen protector identification result is used to indicate that the mobile phone does not have a screen protector applied.
[0148] When the screen protector recognition result indicates that the phone does not have a screen protector, the phone does not need to make specific adjustments to the screen brightness. In this case, the phone can determine a first brightness based on the first ambient light level and the adaptive adjustment curve, and control the screen to emit light at that first brightness. Based on this, S1102 is followed by S1003.
[0149] S1103, The mobile phone calculates the absolute value of the first difference between the first ambient light intensity and the second ambient light intensity.
[0150] For example, taking a mobile phone in a normal office environment as an example, if the first ambient light level detected by the ambient light sensor is 400 lux, and the second ambient light level detected by the camera sensor in the front camera is 370 lux, then the first difference between the first and second ambient light levels is 30 lux.
[0151] For example, taking a mobile phone in a normal office environment as an example, if the ambient light sensor detects a first ambient light level of 300 lux, and the camera sensor in the front camera detects a second ambient light level of 370 lux, then the first difference between the first and second ambient light levels is 70 lux.
[0152] For example, assuming the phone is in a dark room, if the ambient light sensor detects a first ambient light level of 5 lux, and the camera sensor in the front-facing camera detects a second ambient light level of 2 lux, then the first difference between the first and second ambient light levels is 30 lux.
[0153] S1104. The mobile phone determines whether the absolute value of the first difference is greater than the preset illuminance value.
[0154] In this embodiment, the preset illuminance value can be statistically derived by repeatedly measuring the ambient illuminance measured by the ambient light sensor and camera sensor in the electronic device after the film is applied, under lighting conditions with high ambient light intensity. For example, the preset illuminance value can be 20% of the first ambient light intensity.
[0155] Based on the foregoing embodiments, for Figure 6According to the relevant description, if the absolute value of the first difference is greater than the preset illumination value, it can be assumed that a protective film is currently applied to the mobile phone. In other words, the film application recognition result is used to indicate that a protective film is applied to the mobile phone. That is, S1105 is executed.
[0156] If the absolute value of the first difference is less than the preset illumination value, it can be assumed that the phone is not currently fitted with a screen protector. In other words, the screen protector identification result is used to indicate that the phone is not fitted with a screen protector. That is, execute S1102.
[0157] It should be noted that the case where the absolute value of the first difference is equal to the preset illuminance value can be classified as either the case where the absolute value of the first difference is greater than the preset illuminance value, or the case where the absolute value of the first difference is less than the preset illuminance value. This application does not impose any specific restrictions on this. Figure 11 The example shown is only the case where the absolute value of the first difference is equal to the preset illuminance value, which is categorized as the case where the absolute value of the first difference is less than the preset illuminance value.
[0158] S1105, The mobile phone confirms that the screen protector recognition result is used to indicate that a screen protector has been applied to the mobile phone.
[0159] If it is confirmed that a screen protector is applied to the phone, the phone can determine a target brightness that is more suitable for the current scene based on the first ambient light level and the second ambient light level, that is, after S1105, S1004 is executed.
[0160] It should be noted that in the aforementioned technical solutions corresponding to S1101-S1105, it is also possible to first determine whether the first difference is greater than the preset illuminance value, and then determine whether both the first ambient light illuminance and the second ambient light illuminance are less than the preset minimum value. As long as it is ensured that, in the case where both the first ambient light illuminance and the second ambient light illuminance are not less than the preset minimum value, and the absolute value of the first difference is greater than the preset illuminance value, the screen protector recognition result is used to indicate that a screen protector has been applied to the phone; and in the case where both the first ambient light illuminance and the second ambient light illuminance are less than the preset minimum value, or the absolute value of the first difference is less than the preset illuminance value, the screen protector recognition result is used to indicate that no screen protector has been applied to the phone, these two determination results are sufficient.
[0161] Furthermore, in practice, if the situation where the phone is in a low-light environment is not considered, it is also possible to only determine whether the absolute value of the first difference is greater than a preset illuminance value. Then, if the absolute value of the first difference is greater than the preset illuminance value, the screen protector recognition result indicates that a screen protector is applied to the phone; if the absolute value of the first difference is less than the preset illuminance value, the screen protector recognition result indicates that no screen protector is applied to the phone. This technical solution can reduce the computational resources required for the brightness adjustment method provided in this application, but it will also reduce the accuracy of the screen protector recognition result to some extent.
[0162] Based on the technical solutions corresponding to S1101-S1105 above, the mobile phone can determine whether a protective film is applied based on the difference between the first ambient light level and the second ambient light level. This allows it to decide whether to adjust the display brightness according to the existing adaptive brightness curve or to determine a more suitable target brightness based on the first and second ambient light levels. In other words, this technical solution provides data support for the subsequent processes of the brightness adjustment method, enabling its smooth implementation.
[0163] S1003. When the screen protector recognition result indicates that the phone is not covered with a screen protector, the phone determines the first brightness corresponding to the first ambient light level based on the adaptive adjustment curve, and controls the display screen to emit light at the first brightness.
[0164] The adaptive adjustment curve is used to indicate the mapping relationship between ambient light intensity and display brightness.
[0165] In some embodiments, the adaptive adjustment curve may specifically be used to indicate the mapping relationship between the ambient light intensity detected by the ambient light sensor and the display brightness.
[0166] S1004. When the screen protector recognition result is used to indicate that the mobile phone has a screen protector applied, the mobile phone determines the target brightness based on the first ambient light level and the second ambient light level.
[0167] Once the target brightness is determined, the phone can control the display to emit light at the target brightness, i.e., execute S1005.
[0168] Combination Figure 3 , refer to Figure 12 As shown, the purpose of the technical solution provided in this application is that, after the mobile phone adjusts the brightness of the display screen based on this brightness adjustment scheme, it can improve the second relationship curve between the brightness of the light emitted by the screen of the phone after applying a screen protector and the ambient light intensity. This improves the second relationship curve to closely approximate the first relationship curve between the brightness of the phone screen and the ambient light intensity when the screen protector is not applied. Therefore, when the phone determines the target brightness, it needs to convert the first difference between the first and second ambient light intensities into a certain brightness compensation and add it to the brightness value corresponding to the first or second ambient light intensities. This ensures that the brightness of the phone screen after emitting light at the target brightness, after passing through the protective film, is close to the brightness of the phone screen under the same lighting conditions without a screen protector. In other words, the user's perception of the screen's brightness when the phone screen emits light at the target brightness should be close to or similar to the user's perception of the screen under the same lighting conditions without a screen protector. This reduces the adverse effects of applying a protective film on the user's perception of the screen brightness and improves the user experience of the electronic device.
[0169] Based on this, in one possible implementation, combining Figure 10 , refer to Figure 13 As shown, S1004 may specifically include S1301-S1303:
[0170] S1301. When the screen protector recognition result is used to indicate that the phone has a screen protector, the phone determines the first brightness corresponding to the first ambient light level based on the adaptive brightness curve.
[0171] S1302. The mobile phone determines a first brightness compensation value based on the first ambient light intensity, the second ambient light intensity, and the first brightness.
[0172] Since the screen protector does not affect the camera sensor's detection of ambient light intensity, the second ambient light intensity can be approximated as the true ambient light intensity. However, the ambient light sensor's detection of ambient light intensity is attenuated by the screen protector. Therefore, the absolute value of the first difference between the first and second ambient light intensity can be considered as the attenuation of ambient light intensity caused by the screen protector. The first ratio of the absolute value of the first difference to the second ambient light intensity value can then characterize the percentage of the attenuation of ambient light intensity detected by the ambient light sensor due to the screen protector relative to the true ambient light intensity. The product of this first ratio and the first brightness value can serve as a first brightness compensation value that can offset the attenuation of the display screen's brightness caused by the screen protector.
[0173] Based on this, S1302 can specifically be to first determine the absolute value of the first difference between the first ambient illuminance and the second ambient illuminance, then determine the first ratio of the absolute value of the first difference to the second ambient illuminance value, and finally determine the product of the first ratio and the first brightness as the first brightness compensation value.
[0174] Then, based on the first brightness corresponding to the first ambient light level, the first brightness compensation value is increased to obtain the target brightness that meets the requirements. That is, S1303 is executed.
[0175] S1303 The mobile phone determines the target brightness as the sum of the first brightness and the first brightness compensation value.
[0176] The process of calculating the target brightness in the technical solutions corresponding to S1301-S1303 above can be summarized by the following formula:
[0177]
[0178] Where Lx1 is the target brightness, Lv1 is the first brightness, b1 is the second ambient illuminance, and a1 is the first ambient illuminance. This is the first ratio.
[0179] Based on the technical solutions corresponding to S1301-S1303 described above, the mobile phone can determine a first brightness compensation value that can offset the attenuation effect of the protective film on the display's brightness based on the difference between the first and second ambient light levels. This allows for the acquisition of a target brightness that matches the current lighting scenario. Since this target brightness can, to a certain extent, offset the attenuation effect of the protective film on the display's brightness, when the display subsequently emits light at this target brightness, the adverse effects of the protective film on the user's perception of the display's brightness can be reduced, thus improving the user's experience with the electronic device.
[0180] In the technical solutions corresponding to 1301-S1303 above, the target brightness is obtained by adding the first brightness value corresponding to the first ambient light illuminance to the first brightness compensation value. This can reduce the impact of the screen protector on the brightness attenuation of the display. However, in reality, when the screen protector is attached to the mobile phone display, there is a significant difference between the first ambient light illuminance measured by the ambient light sensor and the actual ambient light illuminance. Therefore, the first brightness determined from the adaptive brightness curve based on the first ambient light illuminance has already undergone an attenuation. Even if the first brightness compensation value can compensate for the brightness attenuation caused by the screen protector when the display is emitting light, the attenuation of the first brightness caused by the first ambient light illuminance still exists. Based on this, if a second brightness corresponding to a second ambient light illuminance that is closer to the real ambient light illuminance is determined from the adaptive brightness curve, and then a second brightness compensation value corresponding to the second brightness is added to obtain the target brightness, the brightness attenuation caused by the screen protector can be further reduced. Therefore, in another possible implementation, combined with Figure 10 , refer to Figure 14 As shown, S1004 may specifically include S1401-S1403:
[0181] S1401. When the screen protector recognition result is used to indicate that the phone has a screen protector, the phone determines the second brightness corresponding to the second ambient light level based on the adaptive brightness curve.
[0182] S1402. The mobile phone determines a second brightness compensation value based on the first ambient light intensity, the second ambient light intensity, and the second brightness.
[0183] Based on the description following S1302 above, the first ratio can characterize the percentage of the attenuation of ambient light intensity detected by the ambient light sensor due to the film application relative to the actual ambient light intensity. The product of this first ratio and the second brightness can be used as a second brightness compensation value that can offset the attenuation effect of the film application on the display screen's brightness. Based on this, S1402 can specifically involve first determining the absolute value of the first difference between the first ambient light intensity and the second ambient light intensity, then determining the first ratio of the absolute value of the first difference to the second ambient light intensity value, and finally determining the product of the first ratio and the second brightness as the second brightness compensation value.
[0184] Then, by increasing the second brightness compensation value based on the second brightness corresponding to the second ambient light intensity, a target brightness that better meets the requirements can be obtained. That is, execute S1403.
[0185] S1403. The mobile phone determines the target brightness as the sum of the second brightness and the second brightness compensation value.
[0186] The process of calculating the target brightness in the technical solutions corresponding to S1401-S1403 above can be summarized by the following formula:
[0187]
[0188] Lv2 represents the second brightness level.
[0189] Based on the technical solutions corresponding to S1401-S1403 described above, the mobile phone can determine a second brightness compensation value that better offsets the attenuation effect of the protective film on the display's brightness, based on the difference between the first and second ambient light levels. Since the second brightness value is determined from the adaptive brightness curve based on the second ambient light level, which is closer to the actual ambient light level, it avoids the attenuation of the brightness (i.e., the first brightness) determined based on the ambient light level detected by the mobile phone being affected by the protective film. Furthermore, by adding the second brightness to the second brightness compensation value, a target brightness that better matches the current lighting scenario can be obtained. This target brightness can better offset the attenuation effect of the protective film on the display's brightness. Therefore, when the display subsequently emits light at this target brightness, the adverse effects of the protective film on the user's perception of the display brightness can be reduced to a greater extent, improving the user's experience with the electronic device.
[0190] S1005, The mobile phone controls the display screen to emit light at a target brightness.
[0191] Based on the brightness adjustment method provided in this application, since the presence or absence of a screen protector affects the ambient light level detected by the ambient light sensor, the difference between the first ambient light level detected by the ambient light sensor and the second ambient light level detected by the camera sensor can reflect whether a screen protector is applied to the phone. In other words, the presence or absence of a screen protector can be determined based on the first and second ambient light levels. Furthermore, since phones generally adjust the screen brightness adaptively based on the ambient light level detected by the ambient light sensor, the influence of the screen protector on the ambient light level detected by the ambient light sensor, as reflected by the first and second ambient light levels, can also be used to infer a target brightness suitable for the current screen protector application scenario. This target brightness can, to some extent, reduce the brightness attenuation caused by the screen protector. Using this target brightness as the operating brightness of the phone's screen can reduce the adverse effects of the screen protector on the user's perception of screen brightness, thus improving the user experience.
[0192] In practice, once a user applies a screen protector, they are unlikely to remove it for a certain period of time. Therefore, to reduce the computational resources consumed when the brightness adjustment method provided in this application is implemented in an electronic device, in some embodiments, when it is determined that the electronic device has a screen protector applied, the phone does not need to execute step S1002 within a preset time period. Instead, after obtaining the first ambient light intensity and the second ambient light intensity, it directly determines the target brightness based on the first ambient light intensity and the second ambient light intensity, i.e., it directly executes step S1004. The preset time period can be one day or any other feasible time period. Furthermore, the technical solutions corresponding to S1001-S1005 can be implemented periodically with the preset time period as the cycle.
[0193] It is understood that, in order to achieve the aforementioned functions, the electronic device includes corresponding hardware structures and / or software modules for performing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of this application.
[0194] This application embodiment can divide the above-described electronic device into functional modules based on the method example described above. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.
[0195] When dividing each function into modules according to its corresponding function, refer to Figure 15 As shown in the illustration, this application also provides an electronic device. This electronic device may include: an acquisition module 151, a processing module 152, and a control module 153.
[0196] The acquisition module 151 is used to acquire a first ambient light level detected by an environmental sensor and a second ambient light level detected by a camera sensor. The processing module 152 is used to determine a protective film recognition result based on the first and second ambient light levels acquired by the acquisition module 151; the protective film recognition result indicates that the electronic device has no protective film applied, or it indicates that the electronic device has a protective film applied. The processing module 152 is also used to determine a target brightness based on the first and second ambient light levels acquired by the acquisition module 151 when the protective film recognition result indicates that the electronic device has a protective film applied. The control module 153 is used to control the display screen to emit light at the target brightness determined by the processing module 152.
[0197] Optionally, the processing module 152 is specifically used to: calculate the absolute value of the first difference between the first ambient light intensity and the second ambient light intensity obtained by the acquisition module 151; determine that the film recognition result indicates that the electronic device has a protective film if the absolute value of the first difference is greater than the preset illuminance value; and determine that the film recognition result indicates that the electronic device has not a protective film if the absolute value of the first difference is less than the preset illuminance value.
[0198] Further optionally, the processing module 152 is specifically used to: determine that the film recognition result indicates that the electronic device has a protective film applied when the first ambient light intensity and the second ambient light intensity acquired by the acquisition module 151 are not both less than a preset minimum value and the absolute value of the first difference is greater than the preset illuminance value.
[0199] Optionally, the processing module 152 is further configured to: determine that the film identification result indicates that the electronic device has not been fitted with a protective film when both the first ambient light intensity and the second ambient light intensity acquired by the acquisition module 151 are less than a preset minimum value.
[0200] Optionally, the processing module 152 is specifically used to: determine the first brightness corresponding to the first ambient light intensity obtained by the acquisition module 151 based on the adaptive brightness curve; the adaptive brightness curve is used to indicate the mapping relationship between the ambient light intensity and the display brightness; determine the first brightness compensation value based on the first ambient light intensity obtained by the acquisition module 151, the second ambient light intensity obtained by the acquisition module 151, and the first brightness; and determine the first brightness and the sum of the first brightness and the first brightness compensation value as the target brightness.
[0201] Further optionally, the processing module 152 is specifically used to: calculate the absolute value of the first difference between the first ambient illuminance and the second ambient illuminance obtained by the acquisition module 151; calculate the first ratio of the absolute value of the first difference to the second ambient illuminance; and determine the product of the first brightness and the first ratio as the first brightness compensation value.
[0202] Optionally, the processing module 152 is specifically used to: determine the second brightness corresponding to the second ambient light intensity obtained by the acquisition module 151 based on the adaptive brightness curve; the adaptive brightness curve is used to indicate the mapping relationship between ambient light intensity and display brightness; determine the second brightness compensation value based on the first ambient light intensity obtained by the acquisition module 151, the second ambient light intensity obtained by the acquisition module 151, and the second brightness; and determine the sum of the second brightness and the second brightness compensation value as the target brightness.
[0203] Further optionally, the processing module 152 is specifically used to: calculate the absolute value of the first difference between the first ambient illuminance and the second ambient illuminance obtained by the acquisition module 151; calculate the first ratio of the absolute value of the first difference to the second ambient illuminance; and determine the product of the second brightness and the first ratio as the second brightness compensation value.
[0204] Optionally, the processing module 152 is further configured to determine the first brightness corresponding to the first ambient light intensity based on the adaptive adjustment curve when the film recognition result indicates that the electronic device is not covered with a protective film, and instruct the control module 153 to control the display screen to emit light at the first brightness.
[0205] Regarding the electronic device in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments of the brightness adjustment method described above, and will not be elaborated here. Its related beneficial effects can also be referred to the aforementioned brightness adjustment method. The related beneficial effects will not be repeated here.
[0206] This application also provides an electronic device, which includes: a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein, the memory stores computer program code, which includes computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the brightness adjustment method provided in the foregoing embodiments. The specific structure of this electronic device can be referred to... Figure 8 The structure of the electronic device shown is illustrated.
[0207] This application also provides a computer-readable storage medium that includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the brightness adjustment method provided in the foregoing embodiments.
[0208] This application also provides a computer program product containing executable instructions that, when run on an electronic device, cause the electronic device to perform the brightness adjustment method provided in the foregoing embodiments.
[0209] This application also provides a chip system, which can be part of an electronic device. For example... Figure 16 As shown, the chip system 1600 includes at least one processor 1601, a memory, and at least one interface circuit 1602. The processor 1601 and the interface circuit 1602 are interconnected via lines. For example, the interface circuit 1602 can be used to receive signals from other devices. As another example, the interface circuit 1602 can be used to send signals to other devices.
[0210] For example, interface circuit 1602 can read instructions or computer programs stored in memory and send them to processor 1601. When the instructions or computer program are executed by processor 1601, the various steps of the brightness adjustment method provided in the above embodiments can be implemented. Of course, the chip system may also include other discrete devices, and this application embodiment does not specifically limit this.
[0211] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0212] In the several embodiments provided in this application, it should be understood that the disclosed apparatus / device and method can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0213] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0214] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0215] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0216] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A brightness adjustment method, characterized in that, Applied to an electronic device, wherein the front-facing camera of the electronic device includes a camera sensor, the method includes: The electronic device acquires a first ambient light level detected by an environmental sensor and a second ambient light level detected by a camera sensor; The electronic device determines the film application recognition result based on the first ambient light intensity and the second ambient light intensity; the film application recognition result is used to indicate that the electronic device has no protective film applied, or the film application recognition result is used to indicate that the electronic device has a protective film applied. When the film recognition result indicates that the electronic device has a protective film applied, the electronic device determines the target brightness based on the first ambient light level and the second ambient light level; The electronic device controls the display screen to emit light at the target brightness.
2. The method according to claim 1, characterized in that, The electronic device determines the film recognition result based on the first ambient light level and the second ambient light level, including: When both the first ambient light intensity and the second ambient light intensity are less than a preset minimum value, the electronic device determines that the film identification result indicates that the electronic device has not applied a protective film.
3. The method according to claim 2, characterized in that, The electronic device determines the film recognition result based on the first ambient light level and the second ambient light level, and further includes: If neither the first ambient light intensity nor the second ambient light intensity is less than the preset minimum value, the electronic device calculates the absolute value of the first difference between the first ambient light intensity and the second ambient light intensity; If the absolute value of the first difference is greater than the preset illuminance value, the electronic device determines that the film recognition result indicates that the electronic device has applied a protective film; If the absolute value of the first difference is less than the preset illuminance value, the electronic device determines that the film identification result indicates that the electronic device has not applied a protective film.
4. The method according to claim 3, characterized in that, The step of determining that the electronic device has applied a protective film when the absolute value of the first difference is greater than a preset illuminance value includes: when both the first ambient light illuminance and the second ambient light illuminance are not less than a preset minimum value, and the absolute value of the first difference is greater than a preset illuminance value, the electronic device determines that the protective film has applied a protective film.
5. The method according to any one of claims 1-4, characterized in that, The electronic device determines the target brightness based on the first ambient light level and the second ambient light level, including: The electronic device determines the first brightness corresponding to the first ambient light level based on an adaptive brightness curve; the adaptive brightness curve is used to indicate the mapping relationship between ambient light level and display screen brightness. The electronic device determines a first brightness compensation value based on the first ambient light intensity, the second ambient light intensity, and the first brightness. The electronic device determines the target brightness as the sum of the first brightness and the first brightness compensation value.
6. The method according to claim 5, characterized in that, The electronic device determines a first brightness compensation value based on the first ambient light intensity, the second ambient light intensity, and the first brightness, including: The electronic device calculates the absolute value of a first difference between the first ambient illuminance and the second ambient illuminance; The electronic device calculates a first ratio of the absolute value of the first difference to the second ambient light intensity; The electronic device determines the first brightness compensation value by multiplying the first brightness and the first ratio.
7. The method according to any one of claims 1-4, characterized in that, The electronic device determines the target brightness based on the first ambient light level and the second ambient light level, including: The electronic device determines the second brightness corresponding to the second ambient light level based on an adaptive brightness curve; the adaptive brightness curve is used to indicate the mapping relationship between ambient light level and display screen brightness. The electronic device determines a second brightness compensation value based on the first ambient light intensity, the second ambient light intensity, and the second brightness. The electronic device determines the target brightness as the sum of the second brightness and the second brightness compensation value.
8. The method according to claim 7, characterized in that, The electronic device determines a second brightness compensation value based on the first ambient light intensity, the second ambient light intensity, and the second brightness, including: The electronic device calculates the absolute value of a first difference between the first ambient illuminance and the second ambient illuminance; The electronic device calculates a first ratio of the absolute value of the first difference to the second ambient light intensity; The electronic device determines the product of the second brightness and the first ratio as the second brightness compensation value.
9. The method according to claim 7, characterized in that, The method further includes: If the film recognition result indicates that the electronic device is not covered with a protective film, the electronic device determines the first brightness corresponding to the first ambient light level based on the adaptive brightness curve, and controls the display screen to emit light at the first brightness.
10. An electronic device, characterized in that, include: The electronic device includes a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the brightness adjustment method as described in any one of claims 1-9.
11. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the brightness adjustment method as described in any one of claims 1-9.