CN113889053B - Screen brightness adjusting method based on ambient light sensor - Google Patents

Screen brightness adjusting method based on ambient light sensor Download PDF

Info

Publication number
CN113889053B
CN113889053B CN202110627555.9A CN202110627555A CN113889053B CN 113889053 B CN113889053 B CN 113889053B CN 202110627555 A CN202110627555 A CN 202110627555A CN 113889053 B CN113889053 B CN 113889053B
Authority
CN
China
Prior art keywords
electronic device
brightness
screen
ambient light
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110627555.9A
Other languages
Chinese (zh)
Other versions
CN113889053A (en
Inventor
汤中峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110627555.9A priority Critical patent/CN113889053B/en
Publication of CN113889053A publication Critical patent/CN113889053A/en
Priority to PCT/CN2022/084689 priority patent/WO2022252793A1/en
Application granted granted Critical
Publication of CN113889053B publication Critical patent/CN113889053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/10Intensity circuits
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J1/00Photometry, e.g. photographic exposure meter

Abstract

A screen brightness adjusting method based on an ambient light sensor. The screen brightness adjusting method based on the ambient light sensor comprises the following steps: after the electronic equipment determines that the scene is a weak light scene, the brightness of the screen is adjusted based on the reading of the ambient light sensor, and then the light intensity of the ambient light does not need to be determined through complex calculation, so that the calculation overhead and the power consumption of the electronic equipment are reduced.

Description

Screen brightness adjusting method based on ambient light sensor
Technical Field
The application relates to the technical field of electronics, in particular to a screen brightness adjusting method based on an ambient light sensor.
Background
With the development of material technology and the popularization of electronic devices, more and more electronic devices are configured with screens, and the size and quality of the screens are continuously improved. For example, electronic devices such as mobile phones, smart bands, and smart watches are configured with screens of different sizes.
The screen surface has a layer of glass, can reflect light naturally under the illumination, and when the user used electronic equipment under the great light source of luminous intensity, the luminous intensity that intensity after the light can reflect at glass is higher than or is close to the luminous intensity of screen, and then leads to the user can't see the content that shows on the screen clearly.
In order to enhance the experience of the user using the electronic device in the strong light environment, a feasible method is as follows: the electronic device continuously calculates the light intensity of the current ambient light, and adjusts the brightness of the screen and the contrast of the display content on the screen based on the light intensity of the ambient light to improve the visibility of the display content on the screen.
However, since the ambient light sensor is located below the screen, the reading/reporting value of the ambient light sensor of the electronic device cannot accurately reflect the light intensity of the ambient light on the screen, and a large amount of computing resources of the electronic device are consumed to calculate and determine the light intensity of the ambient light on the screen according to the reading/reporting value of the ambient light sensor and the content displayed on the screen.
Disclosure of Invention
The embodiment of the application provides a screen brightness adjusting method based on an ambient light sensor. The method comprises the following steps: the electronic equipment firstly determines a scene, and if the scene is a weak light scene, the screen brightness is adjusted based on the reading of the ambient light sensor; if the scene is not a weak light scene, the light intensity of the ambient light is calculated based on the reading of the ambient light sensor, and then other parameters such as the screen brightness, the contrast, the color temperature and the like are adjusted based on the light intensity of the ambient light.
In a first aspect, the present application provides a method for adjusting screen brightness based on an ambient light sensor, where the method includes: the electronic equipment determines that the current scene is a low-light scene; after the electronic equipment determines that the current scene is a low-light scene, the electronic equipment adjusts the brightness of the screen based on the report value of the ambient light sensor.
In the above embodiment, when the electronic device determines that the current scene is a weak light scene, the light intensity of the ambient light does not need to be calculated and determined based on the reading of the ambient light sensor, and the brightness of the screen is directly adjusted based on the reading/reporting value of the ambient light sensor, so that the calculation overhead of the electronic device is reduced, and the power consumption is reduced.
With reference to some embodiments of the first aspect, in some embodiments, before the electronic device determines that the current scene is a low-light scene, the method further includes: the electronic device determines that the current scene is not a low-light scene; after the electronic device determines that the current scene is not a weak light scene, the electronic device determines the light intensity of the ambient light based on the report value of the ambient light sensor, and then adjusts the brightness of the screen based on the light intensity of the ambient light.
In the above embodiment, when the electronic device determines that the current scene is not a weak light scene, the light intensity of the ambient light is determined based on the reading of the ambient light sensor, and then the parameters such as the brightness, the contrast, the color temperature, and the like of the screen are adjusted based on the light intensity of the ambient light.
With reference to some embodiments of the first aspect, in some embodiments, after the electronic device determines that the current scene is a low-light scene, the electronic device adjusts the brightness of the screen based on the report value of the ambient light sensor, which specifically includes: after the electronic equipment determines that the current scene is a weak light scene, at a first moment, the report value of the ambient light sensor is a first report value, and the electronic equipment determines that the brightness of the screen is first brightness based on the first report value; after the first moment, the report value of the ambient light sensor is a second report value, and the electronic equipment determines the brightness of the screen to be second brightness based on the second report value; if the first threshold is greater than the second threshold, the first brightness is greater than the second brightness; if the first threshold is less than the second threshold, the first brightness is less than the second brightness.
In the above embodiment, the electronic device adjusts the brightness of the screen based on the report of the ambient light sensor, so that the brightness of the screen is not negatively correlated with the report of the ambient light sensor.
With reference to some embodiments of the first aspect, in some embodiments, after the electronic device determines that the current scene is a non-weak light scene, the electronic device first determines the light intensity of the ambient light based on the report of the ambient light sensor, and then adjusts the brightness of the screen based on the light intensity of the ambient light, which specifically includes: after the electronic device determines that the current scene is a non-weak light scene, at a third moment, the report value of the ambient light sensor is a third report value, the electronic device determines that the light intensity of the ambient light is a third intensity based on the third report value and the content displayed on the screen, and the electronic device determines that the brightness of the screen is a third brightness based on the third intensity; after the third moment, the report value of the ambient light sensor is a fourth report value, the electronic device determines that the light intensity of the ambient light is fourth intensity based on the fourth report value and the content displayed on the screen, and the electronic device determines that the brightness of the screen is fourth brightness based on the fourth intensity; if the third intensity is greater than the fourth intensity, the third brightness is greater than the fourth brightness; if the third intensity is less than the fourth intensity, the third brightness is less than the fourth brightness.
In the above embodiment, the electronic device adjusts the brightness of the screen based on the report of the ambient light sensor, so that the brightness of the screen is not negatively correlated with the light intensity of the ambient light.
With reference to some embodiments of the first aspect, in some embodiments, when the third report is smaller than the fourth report, the third intensity is smaller than the fourth intensity.
In the above embodiments, the electronic device has a non-negative correlation between the ambient light sensor reading and the light intensity of the ambient light in the non-low light scene, and the light intensity of the ambient light may be determined based on the ambient light sensor reading.
With reference to some embodiments of the first aspect, in some embodiments, after the electronic device determines that the current scene is a low-light scene, the electronic device further includes: the electronic device reduces the frequency at which the ambient light sensor determines the reward.
In the above embodiment, after the electronic device determines that the scene is a low-light scene, the operating frequency of the ambient light sensor may be reduced to further reduce power consumption.
With reference to some embodiments of the first aspect, in some embodiments, the determining, by the electronic device, that the current scene is a low-light scene specifically includes: after the electronic device determines that the report value of the ambient light sensor is smaller than the threshold value, the electronic device determines that the current scene is a low-light scene.
In the above embodiment, the electronic device may simply determine that the current scene is a low-light scene through the report of the ambient light sensor.
With reference to some embodiments of the first aspect, in some embodiments, the determining, by the electronic device, that the current scene is a low-light scene specifically includes: the electronic equipment determines that the current scene is a low-light scene after determining that the area where the electronic equipment is located is night based on the positioning information and the time information.
In the above embodiment, the electronic device may determine that the current scene is a low-light scene according to the time zone information.
With reference to some embodiments of the first aspect, in some embodiments, the determining, by the electronic device, that the current scene is a low-light scene specifically includes: after the electronic equipment determines that the electric quantity is lower than the electric quantity threshold value, the electronic equipment determines that the current scene is a low-light scene.
In the above embodiment, when the electronic device has a low power, it may be determined that the current scene is a low-light scene.
With reference to some embodiments of the first aspect, in some embodiments, the determining, by the electronic device, that the current scene is a low-light scene specifically includes: after determining that the foreground application on the electronic device is the game application, the electronic device determines that the current scene is a low-light scene.
In the above embodiment, when the foreground application of the electronic device is an application requiring more resources, it is determined that the current scene is a low-light scene.
With reference to some embodiments of the first aspect, in some embodiments, the determining, by the electronic device, that the current scene is a low-light scene specifically includes: after the electronic equipment determines that the automatic screen brightness adjusting function is off, the electronic equipment determines that the current scene is a low-light scene.
In the above embodiment, after the screen brightness automatic adjustment function of the electronic device is turned off, it is determined that the current scene is a low-light scene.
In a second aspect, an embodiment of the present application provides an electronic device, including: one or more processors and memory; the memory coupled with the one or more processors, the memory to store computer program code, the computer program code including computer instructions, the one or more processors to invoke the computer instructions to cause the electronic device to perform: determining that the current scene is a low-light scene; and after the current scene is determined to be a weak light scene, adjusting the brightness of the screen based on the report value of the ambient light sensor.
In the embodiment, when the electronic device determines that the current scene is a weak light scene, the electronic device does not need to calculate and determine the light intensity of the ambient light based on the reading of the ambient light sensor, and directly adjusts the brightness of the screen based on the reading/reporting of the ambient light sensor, so that the calculation overhead of the electronic device is reduced, and the power consumption is reduced.
In some embodiments in combination with some embodiments of the second aspect, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: determining that the current scene is not a low-light scene; after the current scene is determined not to be the weak light scene, the light intensity of the ambient light is determined based on the report value of the ambient light sensor, and then the brightness of the screen is adjusted based on the light intensity of the ambient light.
With reference to some embodiments of the second aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: after the current scene is determined to be a weak light scene, at a first moment, the report value of the ambient light sensor is a first report value, and the brightness of the screen is determined to be first brightness based on the first report value; after the first moment, the report value of the ambient light sensor is a second report value, and the brightness of the screen is determined to be second brightness based on the second report value; if the first threshold is greater than the second threshold, the first brightness is greater than the second brightness; if the first threshold is smaller than the second threshold, the first brightness is smaller than the second brightness.
With reference to some embodiments of the second aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: after the current scene is determined to be a non-weak light scene, at a third moment, the report value of the ambient light sensor is a third report value, the light intensity of the ambient light is determined to be a third intensity based on the third report value and the content displayed on the screen, and the brightness of the screen is determined to be a third brightness based on the third intensity; after the third moment, the report value of the ambient light sensor is a fourth report value, the light intensity of the ambient light is determined to be fourth intensity based on the fourth report value and the content displayed on the screen, and the brightness of the screen is determined to be fourth brightness based on the fourth intensity; if the third intensity is greater than the fourth intensity, the third brightness is greater than the fourth brightness; if the third intensity is less than the fourth intensity, the third brightness is less than the fourth brightness.
In some embodiments, in combination with some embodiments of the second aspect, the third strength is less than the fourth strength when the third report is less than the fourth report.
In some embodiments in combination with some embodiments of the second aspect, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: the frequency at which the ambient light sensor determines the reading is reduced.
In some embodiments, in combination with some embodiments of the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: and determining that the area where the electronic equipment is located is evening based on the positioning information and the time information, and determining that the current scene is a low-light scene.
With reference to some embodiments of the second aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: and after the electric quantity is lower than the electric quantity threshold value, determining that the current scene is a low-light scene.
With reference to some embodiments of the second aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: and after determining that the foreground application on the electronic equipment is game application, determining that the current scene is a low-light scene.
In some embodiments, in combination with some embodiments of the second aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform: and after the automatic screen brightness adjusting function is determined to be closed, determining that the current scene is a low-light scene.
In a third aspect, an embodiment of the present application provides a chip system, where the chip system is applied to an electronic device, and the chip system includes one or more processors, and the processor is configured to invoke a computer instruction to cause the electronic device to perform a method as described in any one of the first aspect and the possible implementation manner of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product including instructions, which, when run on an electronic device, cause the electronic device to perform the method as described in the first aspect and any one of the possible implementation manners of the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation manner of the first aspect.
It is understood that the electronic device provided by the second aspect, the chip system provided by the third aspect, the computer program product provided by the fourth aspect, and the computer storage medium provided by the fifth aspect are all used to execute the method provided by the embodiments of the present application. Therefore, the beneficial effects achieved by the method can refer to the beneficial effects in the corresponding method, and are not described herein again.
Drawings
FIGS. 1A and 1B are exemplary diagrams of ambient light to which the present application relates;
FIG. 2 is an exemplary diagram of a screen brightness auto-adjustment function according to the present application;
FIGS. 3A and 3B are schematic diagrams illustrating a process of adjusting a reference value of screen brightness by a user according to the present application;
fig. 4 is an exemplary schematic diagram of automatic adjustment of screen brightness in the case that the light intensity of the ambient light is not accurately obtained according to the embodiment of the present application;
FIG. 5 is an exemplary illustration of the readability enhancing function in sunlight according to the present application;
fig. 6A and fig. 6B are schematic diagrams illustrating a method for determining light intensity of ambient light according to an embodiment of the present application;
fig. 7 is an exemplary diagram illustrating a data flow of a method for adjusting brightness of a mobile phone according to the present application;
fig. 8A and 8B are schematic diagrams illustrating a data flow of a method for adjusting a screen brightness based on an ambient light sensor according to an embodiment of the present disclosure;
fig. 9 is an exemplary schematic diagram of a screen brightness adjustment method based on an ambient light sensor according to an embodiment of the present application;
FIG. 10 is a diagram illustrating an exemplary scene for a method for adjusting screen brightness according to an embodiment of the present application;
FIG. 11 is an exemplary diagram of a low-light scene provided by an embodiment of the present application;
fig. 12A and 12B are another exemplary diagrams of a low-light scene provided by an embodiment of the present application;
fig. 13 is an exemplary schematic diagram of a hardware architecture of an electronic device according to an embodiment of the present application;
fig. 14 is an exemplary schematic diagram of a software architecture of an electronic device according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the specification of the present application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the listed items.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of the application, unless stated otherwise, "plurality" means two or more.
For ease of understanding, the following description will first describe related terms and related concepts related to the embodiments of the present application. The terminology used in the description of the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
(1) Ambient light
The ambient light is the superposition of light waves transmitted, refracted and reflected by all light sources in the environment and transmitted to a screen on the electronic equipment. Wherein the intensity of the light impinging on the screen can be measured as the intensity of the ambient light. The unit of measurement of the intensity of light is the luminous flux of visible light received on a single-side area, which is referred to as illuminance for short. The light intensity is measured in Lux (Lux or Ix).
The light source may be natural or artificial. The light source may include various types, such as, but not limited to, direct sunlight, refraction or reflection of sunlight by a building, incandescent lamps, LED lamps, and the like.
The contents shown in fig. 1A and 1B are taken as examples to exemplarily describe the ambient light and the influence of the ambient light on the use of the electronic device by the user.
Fig. 1A and 1B are schematic diagrams of an exemplary ambient light to which the present application relates.
As shown in fig. 1A, ambient light includes light rays that are sunlight directly onto the cell phone and light rays that are reflected or refracted by a building onto the cell phone.
As shown in fig. 1B, when the intensity of the ambient light reflected or refracted by the screen of the electronic device is greater than the intensity of the light of the screen display content, it is difficult for the user to clearly see the content displayed on the screen of the electronic device.
It can be understood that in the case shown in fig. 1B, the electronic device needs to increase the brightness of the screen so that the user can clearly see the contents displayed on the screen. The method for increasing the screen brightness mainly comprises two methods, namely a screen brightness automatic adjusting function and a sunlight readability function. The screen brightness automatic adjustment function and the sunlight readability function may refer to the text descriptions in (2) the screen brightness automatic adjustment and (3) the sunlight readability enhancement in the term interpretation, and are not described herein again.
(2) Automatic screen brightness adjustment
The automatic screen brightness adjustment is a function that can change the backlight intensity of the screen of the electronic device supporting the function as the ambient light changes. The screen brightness automatic adjustment function enables the brightness variation trend of the screen to be positively correlated with the light intensity variation trend of the ambient light.
The ambient light sensor reads as a linear or non-linear superposition of ambient light with the content displayed on the screen. When the display content on the screen has little or no change, the reading of the ambient light sensor is positively correlated with the trend of the change of the light intensity of the ambient light. In this case, the screen brightness automatic adjustment may be based on the ambient light sensor readings, and need not necessarily be based on the light intensity of the ambient light. When the content displayed on the screen changes greatly, the reading of the ambient light sensor does not necessarily have a positive correlation with the trend of the change of the light intensity of the ambient light. The reading of the ambient light sensor can also be the report value of the ambient light sensor.
Among them, the unit of the backlight intensity of the screen may be nits (nits). For convenience of description, the backlight intensity of the screen is hereinafter referred to as the luminance of the screen.
For example, in a mobile phone equipped with an OLED screen, the brightness of the screen ranges from about tens of nits to hundreds of nits; for professional OLED displays, the upper limit of the luminance range of the screen is on the order of thousands of nits.
It is obvious that in a non-dark environment, when the brightness of the screen of the electronic device is always maintained in a high value range, the user can be ensured to clearly browse the contents displayed on the screen. However, the brightness of the screen directly affects the power consumption of the mobile phone. The higher the brightness of the screen is, the higher the energy consumption of the electronic equipment is; the lower the brightness of the screen, the lower the power consumption of the electronic device.
In order to ensure the user experience and the low energy consumption of the electronic equipment at the same time, the brightness of the screen is automatically adjusted to a proper value through the screen brightness automatic adjusting function without maintaining the screen brightness in a high range.
The following takes the content shown in fig. 2 as an example to describe the screen brightness automatic adjustment function on the mobile phone.
Fig. 2 is an exemplary diagram of a screen brightness automatic adjustment function according to the present application.
As shown in fig. 2, the user can bring up the pull-down menu bar by a slide-down operation or the like. In the drop-down menu bar, the screen brightness auto-adjustment function can be seen. Wherein the user may decide to turn the function on or off. If the user starts the function, the mobile phone can determine the light intensity of the ambient light according to sensor equipment such as an ambient light sensor, so that the brightness of the screen of the mobile phone is adjusted, and the user experience is improved.
It should be noted that, when the screen brightness automatic adjustment function on the mobile phone is implemented, it is necessary to determine the correspondence between a reference brightness and the ambient light, that is, when the light intensity of the ambient light is equal to a, the brightness of the screen is equal to B. Wherein, A is determined by a sensor on the mobile phone, such as an ambient light sensor, a front camera and the like, and B is brightness designated by a developer/user.
The following describes an exemplary process of adjusting the screen brightness reference value by the user by using the contents shown in fig. 3A and fig. 3B as an example and using a mobile phone as an example.
Fig. 3A and 3B are schematic diagrams illustrating a process of adjusting a screen brightness reference value by a user according to the present application.
As shown in fig. 3A, when the mobile phone adopts the default setting, the screen brightness ranges from [50 nit, 400 nit ] with the change of the light intensity of the ambient light.
When the screen brightness automatic adjustment function is started, the user can reset the screen brightness reference value to adjust the range of the screen brightness. For example, if the user decides that the mobile phone has default settings, the screen brightness is too high. After resetting as shown in fig. 3B, the luminance range of the screen becomes [50 nit, 200 nit ].
It can be understood that based on the contents shown in fig. 3A and fig. 3B, the relationship between the ambient light and the screen brightness can be considered as follows:
Figure BDA0003102210430000061
wherein LightminAs minimum value of screen brightness, lightmaxAs maximum screen brightness, LightScreenFor adjusted brightness of the screen, LightenvH () is a monotonically increasing function, env, which may be a reading of an ambient light sensor or may be a light intensity of ambient light calculated based on a reading of an ambient light sensormaxMaximum value of ambient light, envminIs the ambient light minimum.
The user resetting the screen brightness reference value may be considered as adjusting the H () function, or may be considered as adjusting the screen brightness maximum value and the screen brightness minimum value.
When the electronic device does not obtain the accurate light intensity of the ambient light, the estimated error value between the reading of the ambient light sensor on the electronic device and the actual light intensity of the ambient light is equivalent to the reference value for which the screen brightness is reset. However, the estimated error value does not change the result that the variation trend of the brightness of the screen is positively correlated with the variation trend of the light intensity of the ambient light. Therefore, the electronic device can obtain inaccurate light intensity of the ambient light when realizing the screen brightness automatic adjustment function. That is, when the electronic device implements the screen brightness automatic adjustment function, the electronic device may adjust the screen brightness based on the reading of the ambient light sensor.
It should be noted that when the content displayed on the screen changes greatly, the brightness of the screen adjusted based on the reading of the ambient light sensor cannot be adjusted very accurately, but the change of the content displayed on the screen has a small influence on the reading of the ambient light sensor, which is equivalent to dynamically adjusting the reference value of the brightness of the screen, and has a small influence on the normal operation of the automatic brightness adjustment function of the screen.
Taking the content shown in fig. 4 as an example, the result of the screen brightness automatic adjustment performed by the electronic device is exemplarily described below, when the electronic device does not obtain the accurate light intensity of the ambient light.
Fig. 4 is an exemplary schematic diagram of automatic adjustment of screen brightness in the case that the light intensity of the ambient light is not accurately acquired according to the embodiment of the present application.
As shown in fig. 4, when the ambient light estimation is accurate, the screen brightness automatic adjustment function works normally; when the ambient light estimation is not accurate, the screen brightness automatic adjustment function works normally.
With reference to fig. 4 and the contents shown in fig. 3A and fig. 3B, it can be understood that, when the reading of the ambient light sensor can reflect the light intensity variation trend of the ambient light, whether the reading of the ambient light sensor is accurate does not affect the normal operation of the screen brightness automatic adjustment function.
In addition, in some cases, for example, different users have different light sensitivity degrees to eyes, or a user attaches a protective film or a peep-proof film to a screen of the electronic device, an algorithm pre-configured inside the electronic device cannot accurately calculate and determine the accurate light intensity of the ambient light according to the reading of the ambient light sensor in these cases.
(3) Readability enhancement in sunlight
The readability is improved in the sunlight, when the electronic device senses that the light intensity of the ambient light is higher than the set threshold value, the electronic device can improve the user experience function by adjusting parameters such as contrast, color temperature and backlight of the display content on the screen.
For example, when the readability enhancing function is turned on in the sunlight, if the light intensity of the ambient light is higher than the predetermined threshold, the electronic device increases the brightness (backlight) and the contrast of the screen along with the increase of the light intensity of the ambient light, and adaptively adjusts parameters such as the color temperature. After the brightness and the contrast of the screen are increased, the user can see the content on the screen clearly under strong light, the readability of the content on the screen is improved, and the experience of the user is further improved.
However, adjusting parameters such as brightness, contrast, and color temperature of the screen under strong light may cause some negative effects such as some distortion of the original display content. In order to reduce the change of the readability-improving function to the content displayed on the screen in the sunlight, the electronic device needs to accurately estimate the light intensity of the ambient light. That is, the readability enhancing function in sunlight requires a more accurate light intensity of the ambient light.
Taking the adjustment of the brightness of the screen as an example, the relationship between the readability improvement in sunlight and the light intensity of the ambient light is exemplarily described below.
If the readability enhancing function of the electronic device is not started in the sunlight, the range of the screen brightness is adjusted to be Light only through the automatic screen brightness adjusting functionmin,lightmax](ii) a If the readability enhancement function of the electronic equipment is started in the sunlight, the range of the screen brightness is adjusted to be Light through the automatic screen brightness adjusting functionmin,lightsun]Wherein lightsun>lightmax
That is, if the light intensity of the ambient light is in the range of [0, env ]max]When the screen brightness is adjusted, the automatic screen brightness adjusting function takes effect; if the light intensity of the ambient light has a value greater than envsunThe readability-improving function takes effect in the sun. Wherein, envsunEnv or moremax
Based on the light-emitting mechanism of LCD or OLED screen, when the brightness of the screen is increased by 10%, the power consumption of the screen is increased by at least 20%. And, when the brightness of the screen is higher, for example, when the brightness of the screen [ Light ]max,lightsun]There is a possibility that the eyes of the user are not comfortable. Therefore, when the function of readability improvement in sunlight is in effect, an accurate determination of the ambient light value is required because: firstly, if the brightness of the screen is not enough, the user still cannot see the screen clearly; secondly, if the brightness of the screen exceeds a proper valueGreatly increased power consumption, and a stronger screen brightness may cause discomfort to the user.
The following takes the contents shown in fig. 5 as an example to describe the influence of whether the ambient light estimation is accurate on the readability improvement function in sunlight.
Fig. 5 is an exemplary diagram illustrating the readability enhancing function in sunlight according to the present application.
As shown in fig. 5, when the electronic device estimates the light intensity of the ambient light accurately, the sunlight readability-improving function adjusts the brightness of the screen to a reasonable value. If the electronic device estimates the light intensity of the ambient light inaccurately, the sunlight readability enhancing function adjusts the brightness of the screen to be near a reasonable value. When the brightness of the adjusting screen is lower than a reasonable value, the user basically cannot see the content of the screen; when the brightness of the screen is adjusted to be greater than a reasonable value, power consumption of the electronic device is increased too much, and the brightness of the screen which is too bright may cause discomfort to a user.
It is understood that, similar to the content shown in fig. 5, if the electronic device estimates the light intensity of the ambient light inaccurately, inappropriate parameters such as contrast, color temperature, etc. may degrade the user experience. Therefore, the readability enhancement function in the sunny day also needs to accurately estimate the light intensity of the ambient light when adjusting other parameters such as the contrast, the color temperature, etc. of the content displayed on the screen. It is worth noting that in some embodiments of the present application, a function module can be used to realize the readability improving function and the screen brightness automatic adjusting function in the sunlight.
(4) Determining light intensity of ambient light
Due to different contents such as the material of the screen and the relative position between the ambient light sensor and the screen of different electronic devices, different electronic devices have different methods for determining the light intensity of the ambient light.
The following describes an exemplary method for determining the light intensity of the ambient light according to an embodiment of the present application, by taking the contents shown in fig. 6A and fig. 6B as an example.
Fig. 6A and fig. 6B are schematic diagrams illustrating a method for determining light intensity of ambient light according to an embodiment of the present application.
As shown in fig. 6A and 6B, an ambient light sensor is disposed below the screen of the electronic device. The input to the ambient light sensor is ambient light transmitted through the screen. For convenience of description, Env is called1For ambient light impinging on the screen, Env2Is the light that shines through the screen onto the ambient light sensor.
It is clear that when the environment of the electronic device is relatively fixed, i.e. Env1When the content is unchanged, the content displayed on the screen can directly influence Env2The value of (c). For ease of description Env1And Env2Relationship between, can be considered Env2=f(Env1) Where f is a function related to the screen itself and the content displayed on the screen.
By determining the inverse function f of f-1Electronic device determining Env based on ambient light sensor2By the inverse function Env1=f-1(Env2)。
However, determining Env1And Env2The relationship f between them is quite complex. Specifically, firstly, the content displayed on a screen above an ambient light sensor needs to be periodically calculated in real time; secondly, the influence of the content displayed on the screen on the reading of the ambient light sensor needs to be estimated through methods such as more complex integration and multivariate analysis; finally, since the effect in the previous step may be non-linear and non-independent, i.e. the effect is correlated with the reading of the ambient light sensor itself, further analysis is needed to remove the effect to determine the light intensity of the ambient light.
In some embodiments of the present application, the electronic device determines Env1F can be directly constructed by methods such as function fitting, deep learning and the like without passing through f-1And then determining Env1
Similarly, when there are multiple ambient light sensors, the electronic device may independently calculate and determine different or the same Env based on the readings of each ambient light sensor2To determine a more accurate Env1
It is worth noting that determining the light intensity of the ambient light requires determining f-1And f is-1In relation to the content displayed on the screen of the electronic device, f needs to be updated continuously-1The computing resources of the electronic device are greatly occupied and the power consumption of the electronic device is increased.
Next, a mobile phone brightness adjustment scheme related to the present application is described below.
The following describes an exemplary adjustment scheme for the brightness of a mobile phone with reference to fig. 7.
Fig. 7 is an exemplary schematic diagram of a data flow of a method for adjusting brightness of a mobile phone according to the present application.
As shown in FIG. 7, the ambient light sensor periodically determines Env2And sends the reading to the CPU of the electronic device. CPU of electronic equipment acquiring Env2After reading, Env can be determined1As the light intensity of the ambient light of the screen on the electronic device. According to the parameters of the screen of the electronic equipment, the CPU of the electronic equipment calculates and determines the proper screen brightness value, and sends the value to the screen or directly adjusts the brightness of the screen through instructions, interfaces and the like.
It is apparent that in the method shown in fig. 7, the implementation of the screen automatic brightness adjustment function and the sunlight readability function both depend on Env determined by the CPU calculation of the electronic device1The value of (c). Due to Env1The value of (2) can represent the light intensity of the ambient light of the screen on the electronic equipment, so that the electronic equipment can realize the automatic screen brightness adjusting function and the sunlight readability function.
However, the CPU of the electronic device is based on the Env of the ambient light sensor2To determine Env1The value of (b) involves a large number of operations. And in some cases, also involves the process of matrix inversion, the amount of computation is further increased. Second, the ambient light sensor determines Env, taking into account that the electronic device may be in a changing scene2The frequency of readings is often as high as tens of Hz, further increasing the number of calculations.
In order to solve the defects of the method shown in fig. 7, the present application proposes a screen brightness adjustment method based on an ambient light sensor. The data flow of the screen brightness adjusting method based on the ambient light sensor provided by the embodiment of the present application is exemplarily described below by taking the contents shown in fig. 8A and fig. 8B as an example.
Fig. 8A and 8B are schematic diagrams illustrating a data flow of a method for adjusting a screen brightness based on an ambient light sensor according to an embodiment of the present disclosure.
In contrast to what is shown in FIG. 7, the ambient light sensor periodically determines Env as shown in FIG. 8A2And sends the reading to the CPU of the electronic device. Acquiring Env by CPU of electronic equipment2After reading, Env can be judged first2And a threshold value EnvthresholdIf Env is large or small2Less than a threshold EnvthresholdThen the electronic device is directly based on Env2The proper brightness value of the screen is determined and sent to the screen or the brightness of the screen is directly adjusted through instructions, interfaces and the like.
If Env, as shown in FIG. 8B2Greater than or equal to the threshold EnvthresholdThen the electronic device may first be according to Env2Is determined by the value of1And Env of1The value is taken as the light intensity of the ambient light of the screen on the electronic device. Second, the electronic device is based on Env1And determining the proper brightness value of the screen, and sending the value to the screen or directly adjusting the brightness of the screen through an instruction, an interface and the like.
It is worth mentioning that Env2Less than threshold EnvthresholdMeanwhile, electronic devices are often in indoor scenes. In an indoor scenario, the electronic device does not need the sunlight readability function to be effective, so the electronic device does not need to calculate and determine the accurate light intensity of the ambient light, i.e., it does not need to determine Env1The value of (c). Since the electronic device does not need to be according to Env2To determine Env1The calculation amount is reduced, and the power consumption of the electronic equipment is further reduced.
Next, a method for adjusting screen brightness based on an ambient light sensor provided in an embodiment of the present application is described in detail below.
The screen brightness adjusting method based on the ambient light sensor comprises the following steps: when the electronic equipment is positionedIn low light scene, is directly based on Env2Determining the proper brightness of the screen; based on Env, when the electronic equipment is positioned in a non-weak light scene or the electronic equipment cannot judge the current scene2Determining Env1After, based on Env1The appropriate brightness of the screen is determined. And, determining Env at the ambient light sensor2Is below a threshold EnvthresholdIn this case, the operating frequency of the ambient light sensor can be reduced.
Wherein whether the electronic device is located in a low light scene may determine Env based on the ambient light sensor2Reading of (2) and threshold value EnvthresholdThe size relationship of (2) is judged and determined. For example, when an ambient light sensor determines Env2Is below a threshold value EnvthresholdWhen the electronic equipment is in a low-light scene, the electronic equipment determines that the electronic equipment is in the low-light scene; when the ambient light sensor determines Env2Is greater than or equal to a threshold value EnvthresholdThe electronic device determines that it is in a non-low light scene.
Fig. 9 is an exemplary schematic diagram of a method for adjusting screen brightness based on an ambient light sensor according to an embodiment of the present application.
As shown in fig. 9, a method for adjusting screen brightness based on an ambient light sensor according to an embodiment of the present application includes:
s901: the electronic device determines the value of the ambient light sensor.
Specifically, the electronic device periodically obtains a reading Env from the ambient light sensor2. Step S902 is executed.
S902: whether the report value of the ambient light sensor is greater than or equal to a threshold value.
Specifically, the electronic device acquires the Env each time2Then, a judgment is made to judge Env2And EnvthresholdOf (c) is used. When Env2Less than EnvthresholdIf so, execute step S904; when Env2Env or morethresholdThen, step S903 is executed.
It is understood that the electronic device determines Env2And EnvthresholdIs used for determining the scene of the current equipment and combining the scenePerforming the subsequent different steps.
It should be noted that, the electronic device may not execute step S901 and step S902, and determine that the current scene of the electronic device is a scene with low light intensity of the ambient light through other information. For convenience of description, a scene with low light intensity of ambient light is referred to as a low-light scene.
For example, when the electronic device determines that the time zone in which the electronic device is located is night through the positioning information and the time, step S904 may be directly performed without performing step S902 and step S903. Alternatively, the electronic device may determine that the user has entered the sleep state through a bracelet or other smart devices, and may directly perform step S904 without performing step S902 and step S903. Alternatively, in the smart home scenario, when the electronic device determines that part or all of the lights in the room are turned off, step S904 may be directly performed without performing step S902 and step S903. Alternatively, the electronic device may read information of the program of the travel class APP, and when it is determined that the user is riding a public transportation such as an airplane in a certain time period, the step S902 and the step S903 may not be executed in the time period and the step S904 may be directly executed. Alternatively, when the electronic device determines that the electronic device is located in an environment such as a movie theater or a secret room escape through router information, the electronic device may directly perform step S904 without performing step S903.
It should be noted that, when the electronic device has low power or the foreground application needs to occupy more system resources, steps S901 and S902 may not be executed, for example, when the electronic device is in a power saving mode, an energy saving mode, or has low power, step S904 may not be executed but step S902 and step S903 may be directly executed. When the electronic device foreground application is a large game, step S904 may be executed without executing step S902 and step S903.
S903: the electronic device determines a value of the light intensity of the ambient light.
Specifically, the electronic device may determine the report value Env of the ambient light sensor according to the determination in step S9012To determine the value Env of the light intensity of the ambient light1. How the electronic device depends on Env, among other things2Determining Env1Can be used as referenceThe text description in (4) determining the light intensity of the ambient light in the explanation is not repeated here.
S904: the electronic device adjusts the brightness of the screen.
Specifically, if the electronic device determines Env1Can then be based on Env1Determines the proper brightness value of the screen, and sends the value to the screen or directly adjusts the brightness of the screen through instructions, interfaces and the like. The adjusting of the brightness value of the screen may be automatic adjustment of the brightness of the screen or may also be readability improvement in sunlight. That is, based on Env1The value of (2) determines the proper brightness value of the screen, which can be used for realizing the automatic screen brightness adjusting function or the sunlight readability improving function. The screen brightness automatic adjustment function and the readability improvement in sunlight can refer to (2) screen brightness automatic adjustment and (3) text description in readability improvement in sunlight in term interpretation, and are not described herein again.
If the electronic device does not determine Env1May determine a suitable brightness value for the screen based on the value of Env2, send the value to the screen or directly adjust the brightness of the screen by way of instructions, interfaces, or the like.
Optionally, in some embodiments of the present application, when the electronic device adjusts the brightness of the screen, the brightness of the screen may also be adjusted based on Env1And adjusting parameters such as contrast, color temperature and the like of the content displayed on the screen.
Understandably, when the readability enhancing function in sunlight is required, it is required to be based on Env2Determining Env1Let Env1Sending the screen brightness to a corresponding interface to realize the automatic screen brightness adjusting function and the readability improving function in sunlight; when readability is improved under the condition that sunlight is not needed, Env is used2Sending the data to a corresponding interface to realize the automatic screen brightness adjusting function, thus omitting the Env-based function2Determining Env1The power consumption can be saved.
And (6) ending.
It should be noted that, after the electronic device performs step S902, if the electronic device determines Env2Less than EnvthresholdOr at the electronic deviceUnder the weak light scene, the operating frequency of environmental sensor can be reduced appropriately.
Again, the following describes an exemplary implementation of the ambient light sensor-based screen brightness adjustment method provided in the present application in various scenarios with reference to the content shown in fig. 10.
Fig. 10 is an exemplary diagram of a scene for providing a screen brightness adjustment method according to an embodiment of the present application.
As shown in FIG. 10, when the parameter of the ambient light sensor changes as shown in FIG. 10, the electronic device determines the reading Env of the ambient light sensor from time T0 to time T1 and after time T22Is below the threshold EnvthresholdAt this point, the electronic device adjusts the screen brightness based on the ambient light sensor reading. And the function of adjusting the screen brightness at this time is realized by the screen brightness automatic adjustment function. During the time from T0 to T1, Env is determined because the electronic device does not need to calculate1The calculation amount is less, and the power consumption is lower.
During part or all of the time from time T1 to time T2, the electronic device determines the ambient light sensor reading Env2Is greater than or equal to a threshold value EnvthresholdAt this time, the electronic device first reads Env based on the ambient light sensor2Determining the light intensity Env of ambient light1Based on the light intensity Env of the ambient light1And adjusting the screen brightness. And the function of adjusting the screen brightness is realized by the readability-improving function in the sunlight. During part or all of the time from the time T1 to the time T2, Env is determined due to the need for calculation by the electronic device1The calculation amount is large, and the power consumption is high.
It is noted that the function of adjusting the screen brightness may be implemented by the screen brightness automatic adjustment function during a part of the time from the time T1 to the time T2.
The electronic device can determine whether the current scene is a low-light scene through the reading of the ambient light sensor, and if the current scene is the low-light scene, the electronic device can determine whether the current scene is the low-light scene based on the reading Env of the ambient light sensor2Adjusting the screen brightness; in the case of non-low light scenes, the light intensity Env of the ambient light may be based on1And adjusting the screen brightness.
In addition to what is shown in fig. 10, the electronic device may determine whether it is a low light scene through other information. With reference to the content shown in fig. 11, it is exemplarily described that the electronic device determines whether the scene is a low light scene through other information, and then selects a different system resource scheduling manner.
Fig. 11 is an exemplary schematic diagram of a low-light scene provided in an embodiment of the present application.
As shown in fig. 11, a user purchases an air ticket on line through an application on an electronic device, and the travel time of the air ticket is 8:00PM to 11:20 PM. The electronic device may obtain this information and consider the electronic device to be in a low light scene for a time period of 8:00PM to 11:20PM, based on the ambient light sensor reading Env2And adjusting the screen brightness. Corresponding to the contents shown in fig. 9, the electronic apparatus executes step S901 and step S904.
It will be appreciated that since the electronic device determines, through other information, a low light scene, it may be based on the ambient light sensor reading Env2Adjusting the screen brightness to avoid the calculation of the light intensity Env of the ambient light1The calculation amount of the electronic equipment is reduced, and the power consumption of the electronic equipment is further reduced.
Fig. 12A and 12B are another exemplary schematic diagrams of a low-light scene provided in an embodiment of the present application.
As shown in fig. 12A, the electronic device may be networked with other smart devices in the room through the WiFi function provided by the router, and acquire the operating states of the other smart devices. For example, the electronic device may know whether the intelligent lamp in the current room is working, and if none of the intelligent lamps in the current room is working, the electronic device determines that the current scene is a low-light scene, and the electronic device does not determine the reading Env of the ambient light sensor2And a threshold value EnvthresholdBased on Env2The brightness of the screen is adjusted.
As shown in fig. 12B, when the electronic device determines that the current scene is a dim light scene and a sleep scene, the electronic device determines that the current scene is a dim light scene, and the electronic device does not determine the ambient light sensorReading Env2With a threshold value EnvthresholdBased on Env2The brightness of the screen is adjusted.
Finally, the electronic device provided by the embodiment of the present application is described below.
Fig. 13 is an exemplary schematic diagram of a hardware architecture of an electronic device according to an embodiment of the present application.
The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device, and the specific type of the electronic device is not particularly limited by the embodiments of the present application.
The electronic device 100 may include a processor 110, an internal memory 121, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 180, a display screen 194, and a Subscriber Identification Module (SIM) card interface, etc. Wherein the sensor module 180 may include an ambient light sensor 180L, etc.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In some embodiments of the present application, the electronic device 100 may include more or fewer components than shown, but at least the display screen 194, the ambient light sensor 180L. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (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.
The MIPI interface may be used to connect the processor 110 with peripheral devices such as a display screen 194, a camera, etc. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. Processor 110 and display screen 194 communicate through a DSI interface in some embodiments to implement display functions of electronic device 100. Processor 110 and display screen 194 communicate through the DSI interface in some embodiments to adjust the screen brightness of display screen 194 of electronic device 100.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to a speaker, a receiver, etc.) or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 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 (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The internal memory 121 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVMs).
The random access memory may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), such as fifth generation DDR SDRAM generally referred to as DDR5 SDRAM, and the like;
the nonvolatile memory may include a magnetic disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, the FLASH memory may include single-level cells (SLC), multi-level cells (MLC), three-level cells (TLC), four-level cells (QLC), etc. according to the level order of the memory cell, and the FLASH memory may include universal FLASH memory (UFS), embedded multimedia memory Card (eMMC), etc. according to the storage specification.
The random access memory may be read directly by the processor 110, may be used to store executable programs (e.g., machine instructions) for an operating system or other programs that are running, and may also be used to store data for user and application programs, etc.
The nonvolatile memory may also store executable programs, data of users and application programs, and the like, and may be loaded in advance into the random access memory for the processor 110 to directly read and write.
The ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. In some embodiments, electronic device 100 may include 1 or N ambient light sensors 180L, N being a positive integer greater than 1.
When the electronic device implements the screen brightness adjustment method based on the ambient light sensor provided in the embodiment of the present application, the ambient light sensor 180L sends the reading to the processor 110 through the DSI interface, the processor determines whether the scene is a low light scene, and if the scene is a low light scene, the processor 110 may perform calculation based on the reading, calculate an appropriate screen brightness value, and adjust the brightness of the screen through the DSI interface; if the reading is not a low-light scene, the processor 110 first calculates the light intensity of the ambient light based on the reading and the relevant parameters of the display screen 194, further calculates the appropriate screen brightness value based on the light intensity of the ambient light, and adjusts the brightness of the screen through the DSI interface.
The software system of the electronic device 100 may employ a hierarchical architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a layered architecture as an example to exemplarily illustrate a software structure of the electronic device 100.
Fig. 14 is an exemplary schematic diagram of a software architecture of an electronic device according to an embodiment of the present application.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 14, the application package may include camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc. applications.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 14, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and answered, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions for the electronic device 100. Such as management of call status (including connection, hangup, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a brief dwell, and does not require user interaction. Such as a notification manager used to notify download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scrollbar text in a status bar at the top of the system, such as a notification of a running application in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following exemplarily illustrates a workflow of the electronic device 100 when implementing the method for adjusting the screen brightness based on the ambient light sensor according to the embodiment of the present application.
And an automatic Brightness controller class, a Brightness MappingStrategy class and the like are provided in the Android system to realize the adjustment of the screen brightness. Among them, the AutomaticBrightness controller class is responsible for processing data and some logic processing based on data, and the Brightness MappingStrategy class is responsible for exposing interfaces to the outside.
When the ambient light sensor 180L determines the reading, the reading is reported to the Android system. The displaymanageservice of the system framework layer in the Android system holds an instantiated DisplayPowerController object, and the instantiated DisplayPowerController object holds an instantiated AutomaticBrightnessController object. The AutomaticBrightness controller object has a LightSensor registered with it for receiving readings from the ambient light sensor.
The electronic equipment can judge whether the current scene is a weak light scene or not by reconstructing the constructor of the AutomaticBrightness controller and modifying the logic in the AutomaticBrightness controller. If the scene is not a weak light scene, processing can be carried out according to a default processing mode; in the case of a low light scene, the logic in the AutomaticBrightness controller class may be modified so that the AutomaticBrightness controller object does not process the readings received from the ambient light sensor but determines the brightness of the screen directly based on the ambient light sensor readings.
As used in the above embodiments, the term "when …" may be interpreted to mean "if …" or "after …" or "in response to determination …" or "in response to detection …", depending on the context. Similarly, depending on the context, the phrase "at the time of determination …" or "if (a stated condition or event) is detected" may be interpreted to mean "if the determination …" or "in response to the determination …" or "upon detection (a stated condition or event)" or "in response to detection (a stated condition or event)".
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the present application occur, in whole or in part, when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), among others.
Those skilled in the art can understand that all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer readable storage medium and can include the processes of the method embodiments described above when executed. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.

Claims (13)

1. A method of adjusting screen brightness based on an ambient light sensor, the method being applied to an electronic device having a screen and the ambient light sensor, the ambient light sensor being located below the screen, the method comprising:
the electronic device determining that a current scene is not a low-light scene;
after the electronic equipment determines that the current scene is not a weak light scene, the electronic equipment determines the light intensity of the ambient light based on the report value of the ambient light sensor, and then adjusts the brightness of the screen based on the light intensity of the ambient light;
the electronic equipment determines that the current scene is a low-light scene;
and after the electronic equipment determines that the current scene is a weak light scene, the electronic equipment adjusts the brightness of the screen based on the report value of the ambient light sensor.
2. The method as claimed in claim 1, wherein after the electronic device determines that the current scene is a low-light scene, the electronic device adjusts the brightness of the screen based on the report of the ambient light sensor, specifically including:
after the electronic equipment determines that the current scene is a low-light scene, at a first moment, the report value of the ambient light sensor is a first report value, and the electronic equipment determines that the brightness of the screen is first brightness based on the first report value;
after the first moment, the report value of the ambient light sensor is a second report value, and the electronic equipment determines that the brightness of the screen is a second brightness based on the second report value;
if the first report is greater than the second report, the first brightness is greater than the second brightness;
if the first report is smaller than the second report, the first brightness is smaller than the second brightness.
3. The method as claimed in claim 1, wherein after the electronic device determines that the current scene is a non-weak light scene, the electronic device determines the light intensity of the ambient light based on the report of the ambient light sensor, and then adjusts the brightness of the screen based on the light intensity of the ambient light, specifically including:
after the electronic device determines that the current scene is a non-weak light scene, at a third moment, the report value of the ambient light sensor is a third report value, the electronic device determines that the light intensity of the ambient light is a third intensity based on the third report value and the content displayed on the screen, and the electronic device determines that the brightness of the screen is a third brightness based on the third intensity;
after the third moment, the report value of the ambient light sensor is a fourth report value, the electronic device determines that the light intensity of the ambient light is a fourth intensity based on the fourth report value and the content displayed on the screen, and the electronic device determines that the brightness of the screen is a fourth brightness based on the fourth intensity;
if the third intensity is greater than the fourth intensity, the third brightness is greater than the fourth brightness;
if the third intensity is less than the fourth intensity, the third brightness is less than the fourth brightness.
4. The method of claim 3, wherein the third strength is less than the fourth strength when the third report is less than the fourth report.
5. The method of any of claims 1-4, wherein after the electronic device determines that the current scene is a low-light scene, further comprising:
the electronic device reduces the frequency at which the ambient light sensor determines the reward.
6. The method according to any one of claims 1 to 4, wherein the determining, by the electronic device, that the current scene is a low-light scene specifically includes:
and after the electronic equipment determines that the report value of the ambient light sensor is smaller than a threshold value, the electronic equipment determines that the current scene is a low-light scene.
7. The method according to any one of claims 1 to 4, wherein the determining, by the electronic device, that the current scene is a low-light scene specifically includes:
the electronic equipment determines that the current scene is a low-light scene after determining that the area where the electronic equipment is located is night based on the positioning information and the time information.
8. The method according to any one of claims 1 to 4, wherein the determining, by the electronic device, that the current scene is a low-light scene specifically includes:
and after the electronic equipment determines that the electric quantity is lower than the electric quantity threshold value, the electronic equipment determines that the current scene is a low-light scene.
9. The method according to any one of claims 1 to 4, wherein the determining, by the electronic device, that the current scene is a low-light scene specifically includes:
after the electronic device determines that the foreground application on the electronic device is a game application, the electronic device determines that the current scene is a low-light scene.
10. The method according to any one of claims 1 to 4, wherein the determining, by the electronic device, that the current scene is a low-light scene specifically includes:
and after the electronic equipment determines that the automatic screen brightness adjusting function is closed, the electronic equipment determines that the current scene is a low-light scene.
11. An electronic device, characterized in that the electronic device comprises: one or more processors and memory;
the memory coupled with the one or more processors, the memory to store computer program code, the computer program code comprising computer instructions that the one or more processors invoke to cause the electronic device to perform the method of any of claims 1-10.
12. A chip system for application in an electronic device, the chip system comprising one or more processors configured to invoke computer instructions to cause the electronic device to perform the method of any one of claims 1 to 10.
13. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-10.
CN202110627555.9A 2021-06-04 2021-06-04 Screen brightness adjusting method based on ambient light sensor Active CN113889053B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110627555.9A CN113889053B (en) 2021-06-04 2021-06-04 Screen brightness adjusting method based on ambient light sensor
PCT/CN2022/084689 WO2022252793A1 (en) 2021-06-04 2022-03-31 Screen brightness adjustment method based on ambient light sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110627555.9A CN113889053B (en) 2021-06-04 2021-06-04 Screen brightness adjusting method based on ambient light sensor

Publications (2)

Publication Number Publication Date
CN113889053A CN113889053A (en) 2022-01-04
CN113889053B true CN113889053B (en) 2022-07-22

Family

ID=79010175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110627555.9A Active CN113889053B (en) 2021-06-04 2021-06-04 Screen brightness adjusting method based on ambient light sensor

Country Status (2)

Country Link
CN (1) CN113889053B (en)
WO (1) WO2022252793A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113889053B (en) * 2021-06-04 2022-07-22 荣耀终端有限公司 Screen brightness adjusting method based on ambient light sensor
CN114727029B (en) * 2022-03-21 2024-03-22 北京百度网讯科技有限公司 Video processing method and device, electronic equipment and storage medium
CN116682367B (en) * 2022-10-14 2024-03-29 荣耀终端有限公司 Screen ambient light detection method, electronic equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332948A (en) * 2017-07-11 2017-11-07 广东欧珀移动通信有限公司 Display device, terminal device and proximity state detection method
CN108735157A (en) * 2018-06-12 2018-11-02 Oppo(重庆)智能科技有限公司 Light sensor processing method, device, storage medium and electronic equipment

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8242707B2 (en) * 2010-07-26 2012-08-14 Apple Inc. Ambient light calibration for energy efficiency in display systems
CN102954836B (en) * 2012-10-26 2015-04-15 京东方科技集团股份有限公司 Ambient light sensor, user applying device and display device
CN102938247B (en) * 2012-11-29 2015-03-04 广东欧珀移动通信有限公司 Brightness adjusting method and device
JP6285145B2 (en) * 2013-10-29 2018-02-28 浜松ホトニクス株式会社 Display device
CN103592787B (en) * 2013-11-13 2016-03-02 合肥京东方光电科技有限公司 Luminance detection device
CN108540594B (en) * 2018-02-05 2019-11-15 维沃移动通信有限公司 The determination method and device of mobile terminal, external environment luminous intensity
CN109196524B (en) * 2018-02-23 2020-05-05 深圳市汇顶科技股份有限公司 Electronic device for detecting fingerprint through optical sensing and operation method thereof
CN108716950A (en) * 2018-05-16 2018-10-30 北京小米移动软件有限公司 Environmental light brightness acquisition methods and device
CN108986724A (en) * 2018-08-17 2018-12-11 矽力杰半导体技术(杭州)有限公司 Ambient light sensing approach, sensing system and electronic equipment
CN109348123B (en) * 2018-10-25 2021-05-21 努比亚技术有限公司 Photographing method, mobile terminal and computer-readable storage medium
CN110161749A (en) * 2019-05-10 2019-08-23 武汉华星光电技术有限公司 Applied to the panel device for shielding lower camera
CN110658582A (en) * 2019-05-10 2020-01-07 武汉华星光电技术有限公司 Display device
CN110956939B (en) * 2019-11-27 2022-12-13 华为技术有限公司 Method for adjusting screen brightness and electronic equipment
CN111223432B (en) * 2020-01-10 2024-02-13 北京小米移动软件有限公司 Method and device for controlling screen display
CN111486950B (en) * 2020-04-20 2022-04-19 Oppo广东移动通信有限公司 Ambient light detection method, ambient light detection device, electronic apparatus, and storage medium
CN112289280B (en) * 2020-11-18 2022-03-22 深圳市锐尔觅移动通信有限公司 Screen brightness adjusting method and device, computer readable medium and electronic equipment
CN113889053B (en) * 2021-06-04 2022-07-22 荣耀终端有限公司 Screen brightness adjusting method based on ambient light sensor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332948A (en) * 2017-07-11 2017-11-07 广东欧珀移动通信有限公司 Display device, terminal device and proximity state detection method
CN108735157A (en) * 2018-06-12 2018-11-02 Oppo(重庆)智能科技有限公司 Light sensor processing method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113889053A (en) 2022-01-04
WO2022252793A1 (en) 2022-12-08

Similar Documents

Publication Publication Date Title
CN113889053B (en) Screen brightness adjusting method based on ambient light sensor
CN113553130B (en) Method for executing drawing operation by application and electronic equipment
WO2021143248A1 (en) Backlight adjustment method and electronic device
WO2023065916A1 (en) Notification processing method, chip, electronic device, and computer readable storage medium
CN115333941B (en) Method for acquiring application running condition and related equipment
CN116128571B (en) Advertisement exposure analysis method and related device
CN116483734B (en) Pile inserting method and system based on compiler and related electronic equipment
CN115145436A (en) Icon processing method and electronic equipment
WO2022206681A1 (en) Window display method and related apparatus
CN113885928B (en) Program updating method and electronic device
CN114489471B (en) Input and output processing method and electronic equipment
CN114222187B (en) Video editing method and electronic equipment
WO2023051357A1 (en) Method for running virtual device
WO2022262291A1 (en) Image data calling method and system for application, and electronic device and storage medium
WO2024083014A1 (en) Interface generation method and electronic device
CN117170560B (en) Image transformation method, electronic equipment and storage medium
WO2024082987A1 (en) Interface generation method and electronic device
CN116185245B (en) Page display method and electronic equipment
CN117097883B (en) Frame loss fault cause determining method, electronic equipment and storage medium
WO2022252805A1 (en) Display method and electronic device
CN117806745A (en) Interface generation method and electronic equipment
CN113963086A (en) Screen-off display method and electronic equipment
CN117909000A (en) Interface generation method and electronic equipment
CN117707563A (en) Application resource processing method and related equipment
CN117692507A (en) Desktop function pushing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant