WO2022252793A1 - 基于环境光传感器的屏幕亮度调整方法 - Google Patents

基于环境光传感器的屏幕亮度调整方法 Download PDF

Info

Publication number
WO2022252793A1
WO2022252793A1 PCT/CN2022/084689 CN2022084689W WO2022252793A1 WO 2022252793 A1 WO2022252793 A1 WO 2022252793A1 CN 2022084689 W CN2022084689 W CN 2022084689W WO 2022252793 A1 WO2022252793 A1 WO 2022252793A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
brightness
ambient light
screen
scene
Prior art date
Application number
PCT/CN2022/084689
Other languages
English (en)
French (fr)
Inventor
汤中峰
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2022252793A1 publication Critical patent/WO2022252793A1/zh

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

Definitions

  • the present application relates to the field of electronic technology, in particular to a screen brightness adjustment method based on an ambient light sensor.
  • a feasible method is: the electronic device continuously calculates the light intensity of the current ambient light, and adjusts the brightness of the screen and the content displayed on the screen based on the light intensity of the ambient light contrast to improve the visibility of what is displayed on the screen.
  • the ambient light sensor since the ambient light sensor is located at the bottom of 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 it needs to consume computing resources to calculate the value according to the reading/reporting value of the ambient light sensor, the screen Calculating the content displayed on the screen to determine the light intensity of the ambient light on the screen consumes a large amount of computing resources of electronic devices and increases power consumption.
  • An embodiment of the present application provides a screen brightness adjustment method based on an ambient light sensor.
  • the method includes: the electronic device first determines the scene, and if the scene is a low-light scene, adjusts the brightness of the screen based on the reading of the ambient light sensor; if the scene is not a low-light scene, first calculates the brightness of the ambient light based on the reading of the ambient light sensor Intensity, and then adjust screen brightness, contrast, color temperature and other parameters based on the light intensity of the ambient light.
  • the present application provides a screen brightness adjustment method based on an ambient light sensor, the method comprising: the electronic device determines that the current scene is a low-light scene; after the electronic device determines that the current scene is a low-light scene, the electronic device The brightness of the screen is adjusted based on the value reported by the ambient light sensor.
  • the electronic device when the electronic device determines that the current scene is a low-light scene, it does not need to calculate and determine the light intensity of the ambient light based on the readings of the ambient light sensor, and adjust the brightness of the screen directly based on the readings/reported values of the ambient light sensor.
  • the calculation overhead of the electronic equipment is reduced, and the power consumption is reduced.
  • the electronic device before the electronic device determines that the current scene is a low-light scene, the electronic device further includes: the electronic device determines that the current scene is not a low-light scene; the electronic device determines that the current scene is not a low-light scene After the scene, the electronic device first determines the light intensity of the ambient light based on the reported 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 device when the electronic device determines that the current scene is not a low-light scene, it first calculates and determines the light intensity of the ambient light based on the readings of the ambient light sensor, and then adjusts the brightness, contrast, color temperature, etc. of the screen based on the light intensity of the ambient light. parameter.
  • the electronic device adjusts the brightness of the screen based on the reported value of the ambient light sensor, specifically including: the electronic device determines After the current scene is a low-light scene, at the first moment, the report value of the ambient light sensor is the first report value, and the electronic device determines that the brightness of the screen is the first brightness based on the first report value; at the first moment Afterwards, the report value of the ambient light sensor is the second report value, and the electronic device determines that the brightness of the screen is the second brightness based on the second report value; if the first report value is greater than the second report value, the second report value A brightness is greater than the second brightness; if the first reported value is smaller than the second reported value, then the first brightness is smaller than the second brightness.
  • the electronic device adjusts the brightness of the screen based on the reported value of the ambient light sensor, so that the brightness of the screen is not negatively correlated with the reported value of the ambient light sensor.
  • the electronic device after the electronic device determines that the current scene is not a low-light scene, the electronic device first determines the light intensity of the ambient light based on the value reported by the ambient light sensor, and then determines the light intensity of the ambient light based on the The light intensity of the ambient light adjusts the brightness of the screen, which specifically includes: after the electronic device determines that the current scene is a non-weak light scene, at the third moment, the reported value of the ambient light sensor is the third reported value, and the electronic device is based on the first reported value.
  • the three reported values and the content displayed on the screen determine that the light intensity of the ambient light is the third intensity, and the electronic device determines that the brightness of the screen is the third brightness based on the third intensity; after the third moment, the report of the ambient light sensor value is a fourth reported value, the electronic device determines that the light intensity of the ambient light is the fourth intensity based on the fourth reported value and the content displayed on the screen, and the electronic device determines that the brightness of the screen is the 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 smaller than the fourth intensity, the third brightness is smaller than the fourth brightness.
  • the electronic device adjusts the brightness of the screen based on the value reported by the ambient light sensor, so that the brightness of the screen is not negatively correlated with the light intensity of the ambient light.
  • the third intensity is smaller than the fourth intensity
  • the electronic device when the electronic device is in a non-weak light scene, there is a non-negative correlation between the reading of the ambient light sensor and the light intensity of the ambient light, and the light intensity of the ambient light can be determined based on the reading of the ambient light sensor.
  • the electronic device further includes: the electronic device reduces the frequency of determining the alarm value by the ambient light sensor.
  • the electronic device may reduce the operating frequency of the ambient light sensor, so as to further reduce power consumption.
  • the electronic device determines that the current scene is a low-light scene, which specifically includes: after the electronic device determines that the report value of the ambient light sensor is less than a threshold, the electronic device determines that the current scene For low light scenes.
  • the electronic device can simply determine that the current scene is a low-light scene through the reported value of the ambient light sensor.
  • the electronic device determines that the current scene is a low-light scene, which specifically includes: after the electronic device determines that the area where the electronic device is located is night based on the positioning information and time information, the electronic device The device determines that the current scene is a low-light scene.
  • the electronic device may determine that the current scene is a low-light scene according to the time zone information.
  • the electronic device determines that the current scene is a low-light scene, specifically including: after the electronic device determines that the power is lower than a power threshold, the electronic device determines that the current scene is a low-light scene .
  • the battery of the electronic device when the battery of the electronic device is low, it may be determined that the current scene is a low-light scene.
  • the electronic device determines that the current scene is a low-light scene, specifically including: after the electronic device determines that the foreground application on the electronic device is a game application, the electronic device Determine that the current scene is a low-light scene.
  • 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.
  • the electronic device determines that the current scene is a low-light scene, which specifically includes: after the electronic device determines that the automatic screen brightness adjustment function is off, the electronic device determines that the current scene is low light scene.
  • an embodiment of the present application provides an electronic device, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes,
  • the computer program code includes computer instructions, and the one or more processors call the computer instructions to make the electronic device execute: determine that the current scene is a low-light scene; after determining that the current scene is a low-light scene, based on the report of the ambient light sensor value to adjust the brightness of the screen.
  • the electronic device when the electronic device determines that the current scene is a low-light scene, it does not need to calculate and determine the light intensity of the ambient light based on the readings of the ambient light sensor, and adjust the brightness of the screen directly based on the readings/reported values of the ambient light sensor.
  • the calculation overhead of the electronic equipment is reduced, and the power consumption is reduced.
  • the one or more processors are further configured to call the computer instructions so that the electronic device executes: determining that the current scene is not a low-light scene; determining that the current scene is not a low-light scene; After the light scene, first determine the light intensity of the ambient light based on the reported value of the ambient light sensor, and then adjust the brightness of the screen based on the light intensity of the ambient light.
  • the one or more processors are specifically configured to invoke the computer instructions so that the electronic device executes: after determining that the current scene is a low-light scene, at the first moment , the reported value of the ambient light sensor is the first reported value, and the brightness of the screen is determined to be the first brightness based on the first reported value; after the first moment, the reported value of the ambient light sensor is the second reported value, Determine the brightness of the screen as the second brightness based on the second reported value; if the first reported value is greater than the second reported value, then the first brightness is greater than the second brightness; if the first reported value is smaller than the second reported value report value, the first brightness is smaller than the second brightness.
  • the one or more processors are specifically configured to call the computer instructions to make the electronic device perform: after determining that the current scene is not a low-light scene, in the third At this moment, the reported value of the ambient light sensor is the third reported value, the light intensity of the ambient light is determined to be the third intensity based on the third reported value and the content displayed on the screen, and the brightness of the screen is determined to be the third intensity based on the third intensity.
  • the reported value of the ambient light sensor is the fourth reported value
  • the light intensity of the ambient light is determined to be the fourth intensity based on the fourth reported value and the content displayed on the screen, based on the fourth intensity Determine the brightness of the screen as the fourth brightness; if the third intensity is greater than the fourth intensity, then the third brightness is greater than the fourth brightness; if the third intensity is less than the fourth intensity, then the third brightness is less than the fourth intensity Four brightness.
  • the third intensity is smaller than the fourth intensity
  • the one or more processors are further configured to call the computer instruction to make the electronic device perform: reducing the frequency of determining the alarm value by the ambient light sensor.
  • the one or more processors are specifically configured to call the computer instructions to make the electronic device perform: determining based on the positioning information and time information that the area where the electronic device is located is After night, determine that the current scene is a low-light scene.
  • the one or more processors are specifically configured to call the computer instructions to make the electronic device perform: after determining that the power is lower than the power threshold, determine that the current scene is weak; light scene.
  • the one or more processors are specifically configured to call the computer instruction to make the electronic device execute: after determining that the foreground application on the electronic device is a game application to determine that the current scene is a low-light scene.
  • the one or more processors are specifically configured to call the computer instruction to make the electronic device perform: after determining that the automatic screen brightness adjustment function is off, determine the current scene For low light scenes.
  • the embodiment of the present application provides a chip system, the chip system is applied to an electronic device, and the chip system includes one or more processors, and the processor is used to invoke computer instructions so that the electronic device executes the first Aspect and the method described in any possible implementation manner of the first aspect.
  • the embodiment of the present application provides a computer program product containing instructions, when the above-mentioned computer program product is run on the electronic device, the electronic device is made to execute any of the possible implementations in the first aspect and the first aspect described method.
  • the embodiment of the present application provides a computer-readable storage medium, including instructions.
  • the electronic device can execute any possible implementation method according to the first aspect and the first aspect. described method.
  • the above-mentioned electronic device provided in the second aspect, the chip system provided in the third aspect, the computer program product provided in the fourth aspect, and the computer storage medium provided in the fifth aspect are all used to execute the method provided in the embodiment of the present application . Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method, and will not be repeated here.
  • FIG. 1A and FIG. 1B are an exemplary schematic diagram of ambient light involved in the present application.
  • FIG. 2 is an exemplary schematic diagram of the screen brightness automatic adjustment function involved in the present application
  • FIG. 3A and FIG. 3B are exemplary schematic diagrams of the process of the user adjusting the screen brightness reference value involved in the present application
  • FIG. 4 is an exemplary schematic diagram of automatic adjustment of screen brightness when the light intensity of ambient light is not accurately obtained according to the embodiment of the present application;
  • Fig. 5 is an exemplary schematic diagram of the functional effect of improving readability under sunlight involved in the present application.
  • FIG. 6A and FIG. 6B are an exemplary schematic diagram of a method for determining the light intensity of ambient light provided by the embodiment of the present application.
  • Fig. 7 is an exemplary schematic diagram of the data flow of a mobile phone brightness adjustment method designed by the present application.
  • FIG. 8A and FIG. 8B are an exemplary schematic diagram of the data flow of the screen brightness adjustment method based on the ambient light sensor provided by the embodiment of the present application;
  • FIG. 9 is an exemplary schematic diagram of a screen brightness adjustment method based on an ambient light sensor provided in an embodiment of the present application.
  • FIG. 10 is an exemplary schematic diagram of a scene where a method for adjusting screen brightness is provided in an embodiment of the present application.
  • FIG. 11 is an exemplary schematic diagram of a low-light scene provided by an embodiment of the present application.
  • FIG. 12A and FIG. 12B are another exemplary schematic diagrams of a low-light scene provided by the embodiment of the present application.
  • FIG. 13 is an exemplary schematic diagram of a hardware architecture of an electronic device provided by an embodiment of the present application.
  • FIG. 14 is an exemplary schematic diagram of an electronic device software architecture provided by an embodiment of the present application.
  • first and second are used for descriptive purposes only, and cannot be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, the “multiple” The meaning is two or more.
  • Ambient light is the superposition of light waves transmitted, refracted, and reflected by all light sources in the environment to the screen on the electronic device.
  • the light intensity of the ambient light may be used to measure the intensity of the light irradiated on the screen.
  • the measurement unit of light intensity is the luminous flux of visible light received on a single surface area, referred to as illuminance.
  • the unit of measure for light intensity is Lux (Lux or Ix).
  • the light source can be natural or artificial.
  • the light sources may include many types, for example, direct sunlight, refraction or reflection of sunlight by buildings, incandescent lamps, LED lamps, etc., which are not limited herein.
  • the ambient light and the impact of the ambient light on the user's use of the electronic device will be exemplarily introduced below.
  • FIG. 1A and FIG. 1B are exemplary schematic diagrams of ambient light involved in the present application.
  • the ambient light includes the light that is directly irradiated by the sun on the mobile phone and the light that is reflected or refracted by buildings on the mobile phone.
  • the electronic device needs to increase the brightness of the screen so that the user can clearly see the content displayed on the screen.
  • increasing the brightness of the screen mainly includes two methods, which are the automatic adjustment function of the screen brightness and the sunlight readability function.
  • the function of automatic adjustment of screen brightness and the function of sunlight readability can refer to the text descriptions in (2) Automatic adjustment of screen brightness and (3) Improvement of readability in sunlight in the explanation of terms, and will not be repeated here.
  • Automatic adjustment of screen brightness is a function that can make the backlight intensity of the screen of an electronic device that supports this function change as the ambient light changes.
  • the screen brightness automatic adjustment function makes the change trend of the screen brightness positively correlated with the light intensity change trend of the ambient light.
  • the reading from the ambient light sensor is a linear or non-linear overlay of ambient light and what is displayed on the screen.
  • the reading of the ambient light sensor is positively correlated with the change trend of the light intensity of the ambient light.
  • the automatic adjustment of screen brightness may be based on the reading of the ambient light sensor, not necessarily based on the light intensity of the ambient light.
  • the reading of the ambient light sensor is not necessarily positively correlated with the variation trend of the light intensity of the ambient light.
  • the reading of the ambient light sensor can also be the reported value of the ambient light sensor.
  • the unit of the backlight intensity of the screen may be nits.
  • the brightness of the screen refers to the backlight intensity of the screen hereinafter.
  • the brightness range of the screen is about tens of nits to hundreds of nits; for a professional OLED display, the upper limit of the brightness range of the screen is about several thousand nits.
  • the brightness of the screen of the electronic device when the brightness of the screen of the electronic device is maintained at a relatively high value range, the user can clearly browse the content displayed on the screen.
  • the brightness of the screen directly affects the power consumption of the mobile phone. The higher the brightness of the screen, the higher the energy consumption of electronic equipment; the lower the brightness of the screen, the lower the energy consumption of electronic equipment.
  • the brightness of the screen can be automatically adjusted to an appropriate value without maintaining the brightness of the screen in a high range.
  • the following takes the content shown in FIG. 2 as an example to introduce the automatic adjustment function of the screen brightness on the mobile phone.
  • FIG. 2 is an exemplary schematic diagram of the screen brightness automatic adjustment function involved in the present application.
  • the user can call out the drop-down menu bar through operations such as sliding down.
  • the user can decide to enable or disable this function. If the user enables this function, the mobile phone can determine the light intensity of the ambient light according to sensor devices such as the ambient light sensor, and then adjust the brightness of the mobile phone screen to improve the user experience.
  • A is determined by the sensors on the mobile phone, such as the ambient light sensor and the front camera, etc.
  • B is the brightness specified by the developer/user.
  • the following takes the content shown in FIG. 3A and FIG. 3B as an example, and takes a mobile phone as an example to introduce a process for a user to adjust a reference value of screen brightness.
  • FIG. 3A and FIG. 3B are exemplary schematic diagrams of a process for a user to adjust a screen brightness reference value involved in the present application.
  • the screen brightness ranges from [50 nits to 400 nits].
  • the user can reset the screen brightness reference value to adjust the range of the screen brightness. For example, the user decides that the screen brightness is too high by default on the phone. After resetting, as shown in FIG. 3B , the brightness range of the screen becomes [50 nits, 200 nits].
  • Resetting the reference value of the screen brightness by the user can be considered as adjusting the H() function, or can be considered as adjusting the maximum value of the screen brightness and the minimum value of the screen brightness.
  • the estimated error value between the reading of the ambient light sensor on the electronic device and the real light intensity of the ambient light is equivalent to resetting the benchmark value of the screen brightness.
  • the estimated error value will not change the result that the change trend of the brightness of the screen is positively correlated with the change trend of the light intensity of the ambient light. Therefore, when the electronic device realizes the function of automatically adjusting the brightness of the screen, it may obtain inaccurate light intensity of the ambient light. That is, when the electronic device realizes the automatic adjustment function of the screen brightness, it can adjust the screen brightness based on the reading of the ambient light sensor.
  • the following takes the content shown in FIG. 4 as an example to introduce, as an example, the result of automatic screen brightness adjustment performed by the electronic device when the electronic device does not obtain accurate light intensity of ambient light.
  • FIG. 4 is an exemplary schematic diagram of automatic adjustment of screen brightness under the condition that the light intensity of ambient light is not accurately obtained according to the embodiment of the present application.
  • the pre-configured algorithm inside the electronic device cannot be accurately based on the environment in these cases.
  • the light sensor readings are calculated to determine the exact light intensity of the ambient light.
  • Sunlight readability improvement means that when the electronic device perceives that the light intensity of the ambient light is higher than the set threshold, the electronic device will adjust the contrast, color temperature, backlight and other parameters of the content displayed on the screen to improve the user experience.
  • the electronic device when the sunlight readability improvement function is turned on, if the light intensity of the ambient light is higher than the set threshold, the electronic device will increase the brightness (backlight) and contrast of the screen, and adapt to the increase of the light intensity of the ambient light. Permanently adjust parameters such as color temperature.
  • the brightness and contrast of the screen are increased, it is easier for users to see the content on the screen under strong light, which improves the readability of the content on the screen, thereby improving the user experience.
  • the following mainly takes adjusting the brightness of the screen as an example to exemplarily introduce the relationship between the improvement of readability under sunlight and the light intensity of ambient light.
  • the screen brightness can only be adjusted to [Light min , light max ] through the screen brightness automatic adjustment function; if the sunlight readability enhancement function is enabled on the electronic device, the screen brightness automatic adjustment function The adjustment function adjusts the brightness of the screen in the range of [Light min , light sun ], where light sun >light max .
  • the screen brightness automatic adjustment function takes effect; if the light intensity value of the ambient light is greater than env sun , the sunlight readability improvement function takes effect.
  • env sun is greater than or equal to env max .
  • the power consumption of the screen increases by at least 20%.
  • the brightness of the screen is high, for example, when the brightness of the screen is [Light max , light sun ], it may cause discomfort to the user's eyes. Therefore, when the function of improving readability under sunlight takes effect, it is necessary to accurately determine the ambient light value. This is because: first, if the brightness of the screen is not enough, the user still cannot see the screen clearly; second, if the brightness of the screen Exceeding the appropriate value, greatly increased power consumption, and strong screen brightness may cause discomfort to the user.
  • the following takes the content shown in FIG. 5 as an example to exemplarily introduce the influence of whether the ambient light estimation is accurate on the readability improvement function under sunlight.
  • FIG. 5 is an exemplary schematic diagram of the sunlight readability-improving functional effect involved in the present application.
  • the sunlight readability enhancement function when the electronic device estimates the light intensity of ambient light accurately, the sunlight readability enhancement function will adjust 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 enhancement function will adjust the brightness of the screen to a reasonable value. When the brightness of the adjusted screen is lower than a reasonable value, the user basically cannot see the contents of the screen clearly; discomfort.
  • one functional module can be used to implement the function of improving readability under sunlight and the function of automatically adjusting screen brightness.
  • the following uses the content shown in FIG. 6A and FIG. 6B as an example to exemplarily introduce the method for determining the light intensity of ambient light provided by the embodiment of the present application.
  • FIG. 6A and FIG. 6B are exemplary schematic diagrams of the method for determining the light intensity of ambient light provided by the embodiment of the present application.
  • an ambient light sensor is disposed under the screen of the electronic device.
  • the input of the ambient light sensor is the ambient light passing through the screen.
  • Env 1 is referred to as the ambient light irradiated on the screen
  • Env 2 is referred to as the light irradiated on the ambient light sensor through the screen.
  • Env 2 f(Env 1 ), where f is a function related to the screen itself and the content displayed on the screen.
  • determining the relationship f between Env 1 and Env 2 is very complicated. Specifically, first of all, it is necessary to periodically calculate the content displayed on the screen above the ambient light sensor in real time; secondly, it is necessary to estimate the influence of the content displayed on the screen on the reading of the ambient light sensor through more complex integration and multivariate analysis methods; finally, due to The influence in the previous step may be non-linear and non-independent, that is, the influence is also related to the reading of the ambient light sensor itself, and further analysis is required to remove the influence to determine the light intensity of the ambient light.
  • the electronic device may determine Env 1 without passing f, and may directly construct f -1 through methods such as function fitting and deep learning, and then determine Env 1 .
  • the electronic device can independently calculate and determine a different or the same Env 2 based on the readings of each ambient light sensor, and then determine a more accurate Env 1 .
  • determining the light intensity of ambient light requires determining f -1 , and f -1 is related to the content displayed on the screen of the electronic device, so f -1 needs to be updated continuously, which greatly occupies the computing resources of the electronic device and Increased power consumption of electronic equipment.
  • the mobile phone brightness adjustment scheme is exemplarily introduced below.
  • FIG. 7 is an exemplary schematic diagram of a data flow of a method for adjusting brightness of a mobile phone designed in the present application.
  • the ambient light sensor periodically determines the reading of Env 2 and sends the reading to the CPU of the electronic device.
  • the CPU of the electronic device may determine the value of Env 1 as the light intensity of the ambient light on the screen of the electronic device.
  • the CPU of the electronic device calculates and determines the appropriate screen brightness value, and sends the value to the screen or directly adjusts the brightness of the screen through instructions, interfaces, etc.
  • the realization of the screen automatic brightness adjustment function and the sunlight readability function both depend on the value of Env 1 calculated and determined by the CPU of the electronic device. Since the value of Env 1 can better represent the light intensity of the ambient light on the screen of the electronic device, the electronic device can realize the function of automatic adjustment of screen brightness and the function of sunlight readability.
  • the CPU of the electronic device determines the value of Env 1 based on the reading of Env 2 of the ambient light sensor.
  • a large number of calculations are involved.
  • the process of matrix inversion is also involved, and the amount of calculation is further increased.
  • the frequency of the ambient light sensor to determine the Env 2 reading is often as high as tens of Hz, which further increases the amount of calculation.
  • the present application proposes a screen brightness adjustment method based on an ambient light sensor.
  • the data flow of the screen brightness adjustment method based on the ambient light sensor provided by the embodiment of the present application will be exemplarily introduced below.
  • FIG. 8A and FIG. 8B are exemplary schematic diagrams of a data flow of a method for adjusting screen brightness based on an ambient light sensor provided by an embodiment of the present application.
  • the ambient light sensor periodically determines the reading of Env 2 and sends the reading to the CPU of the electronic device. After the CPU of the electronic device obtains the reading of Env 2 , it can first judge the size of Env 2 and the threshold value Env threshold . If Env 2 is smaller than the threshold value Env threshold , the electronic device directly determines the appropriate brightness value of the screen based on Env 2 , and uses the Send the value to the screen or adjust the brightness of the screen directly through instructions, interfaces, etc.
  • the electronic device can first determine Env 1 according to the value of Env 2 , and use the value of Env 1 as the light intensity of the ambient light on the screen of the electronic device. Secondly, the electronic device determines the appropriate brightness value of the screen based on Env 1 , and sends the value to the screen or directly adjusts the brightness of the screen through instructions and interfaces.
  • Env 2 when Env 2 is smaller than the threshold Env threshold , the electronic device is usually in an indoor scene. In an indoor scene, the electronic device does not need the sunlight readability function to take effect, so the electronic device does not need to calculate and determine an accurate light intensity of ambient light, that is, does not need to determine the value of Env 1 . Since the electronic device does not need to determine Env 1 according to Env 2 , the amount of calculation is reduced, thereby reducing the power consumption of the electronic device.
  • the screen brightness adjustment method based on the ambient light sensor proposed by this application includes: when the electronic device is in a low-light scene, directly determine the appropriate brightness of the screen based on Env 2 ; when the electronic device is in a non-low-light scene or the electronic device cannot judge the current scene , after determining Env 1 based on Env 2 , determine the appropriate brightness of the screen based on Env 1 . Moreover, when the ambient light sensor determines that the reading of Env 2 is lower than the threshold Env threshold , the operating frequency of the ambient light sensor may be reduced.
  • whether the electronic device is located in a low-light scene can be determined based on the relationship between the reading of Env 2 determined by the ambient light sensor and the threshold value Env threshold . For example, when the ambient light sensor determines that the reading of Env 2 is lower than the threshold Env threshold , the electronic device determines that it is in a low light scene; when the ambient light sensor determines that the reading of Env 2 is greater than or equal to the threshold Env threshold , the electronic device determines that it is in a non In low-light scenes.
  • FIG. 9 is an exemplary schematic diagram of a screen brightness adjustment method based on an ambient light sensor provided by an embodiment of the present application.
  • the screen brightness adjustment method based on the ambient light sensor includes:
  • S901 The electronic device determines the reported value of the ambient light sensor.
  • the electronic device periodically obtains readings as Env 2 from the ambient light sensor. Execute step S902.
  • S902 Whether the reported value of the ambient light sensor is greater than or equal to a threshold.
  • the electronic device After acquiring Env 2 each time, the electronic device makes a judgment to determine the size of Env 2 and Env threshold .
  • Env 2 is less than Env threshold , perform step S904; when Env 2 is greater than or equal to Env threshold , perform step S903.
  • the electronic device judges the size of Env 2 and Env threshold to determine the scene where the current device is located, and performs subsequent different steps in combination with the scene.
  • the electronic device may not perform steps S901 and S902, but may use other information to determine that the current scene where the electronic device is located is a scene with low ambient light intensity.
  • a scene with low light intensity of ambient light is called a low-light scene.
  • step S904 may be directly performed without performing steps S902 and S903.
  • the electronic device determines that the user has entered a sleep state through a wristband or other smart devices, and may directly execute step S904 without executing steps S902 and S903.
  • step S904 may be directly executed without executing step S902 and step S903.
  • the electronic device may read the program information of the travel APP, and when it is determined that the user takes public transportation such as an airplane during a certain period of time, step S904 may be directly performed without performing steps S902 and S903 during this period of time.
  • step S904 may be directly performed without performing step S903.
  • step S901 and step S902 may not be executed, for example, when the electronic device is in power saving mode, energy saving mode or the power is low , Step S904 may be directly executed without executing Step S902 and Step S903.
  • step S904 may be directly performed without performing steps S902 and S903.
  • S903 The electronic device determines a value of the light intensity of the ambient light.
  • the electronic device may determine the value Env 1 of the light intensity of the ambient light according to the reported value Env 2 of the ambient light sensor determined in step S901 .
  • how the electronic device determines Env 1 according to Env 2 can refer to the textual description in (4) Determining the light intensity of ambient light in the terminology explanation, which will not be repeated here.
  • S904 The electronic device adjusts the brightness of the screen.
  • the electronic device determines the value of Env 1 , it can determine an appropriate brightness value of the screen based on the value of Env 1 , and send the value to the screen or directly adjust the brightness of the screen through instructions, interfaces, and the like.
  • adjusting the brightness value of the screen may be automatic adjustment of screen brightness or improvement of readability under sunlight. That is to say, determining the appropriate brightness value of the screen based on the value of Env 1 can be used to realize the function of automatically adjusting the brightness of the screen or to realize the function of improving the readability under sunlight.
  • the automatic adjustment of screen brightness and the improvement of readability in sunlight can refer to the text descriptions in (2) Automatic adjustment of screen brightness and (3) Improvement of readability in sunlight in the terminology explanation, and will not be repeated here.
  • the electronic device does not determine the value of Env 1 , it can determine the appropriate brightness value of the screen based on the value of Env 2 , and send the value to the screen or directly adjust the brightness of the screen through instructions, interfaces, etc.
  • parameters such as contrast and color temperature of content displayed on the screen may also be adjusted based on Env 1 .
  • Env 1 needs to be determined based on Env 2 , and Env 1 is sent to the corresponding interface to realize the automatic adjustment function of screen brightness and the function of improving readability under sunlight;
  • Env 2 sends Env 2 to the corresponding interface to realize the automatic adjustment of screen brightness. This saves the process of determining Env 1 based on Env 2 and saves power consumption.
  • step S902 if it is determined that Env 2 is smaller than Env threshold or the electronic device is in a low-light scene, the operating frequency of the environmental sensor may be appropriately reduced.
  • FIG. 10 is an exemplary schematic diagram of a scene in which a method for adjusting screen brightness is provided in an embodiment of the present application.
  • the electronic device determines that the value of the reading Env 2 of the ambient light sensor is lower than the threshold value Env threshold from time T0 to time T1 and after time T2, At this point the electronic device adjusts the screen brightness based on the ambient light sensor readings. And the function of adjusting the brightness of the screen at this time is realized by the automatic adjustment function of the screen brightness. From time T0 to time T1, since the electronic device does not need to calculate and determine Env 1 , the amount of calculation is less and the power consumption is lower.
  • the electronic device determines that the value of the reading Env 2 of the ambient light sensor is greater than or equal to the threshold value Env threshold , and at this time, the electronic device first determines the light intensity of the ambient light based on the reading Env 2 of the ambient light sensor Env 1 , and then adjust the screen brightness based on the light intensity Env 1 of the ambient light. And at this time, the function of adjusting the brightness of the screen is realized by the function of improving readability under sunlight.
  • the electronic device since the electronic device needs to calculate and determine Env 1 , the amount of calculation is large and the power consumption is high.
  • the function of adjusting the brightness of the screen can be realized by the function of automatically adjusting the brightness of the screen.
  • the electronic device can determine whether the current scene is a low-light scene through the reading of the ambient light sensor. If it is a low-light scene, the screen brightness can be adjusted based on the reading Env 2 of the ambient light sensor; if it is not a low-light scene, it can be based on the ambient light. Intensity Env 1 adjusts screen brightness.
  • the electronic device may also determine whether it is a low-light scene through other information.
  • the electronic device determines whether it is a low-light scene through other information, and then selects different system resource scheduling methods.
  • FIG. 11 is an exemplary schematic diagram of a low-light scene provided by an embodiment of the present application.
  • the user purchases an air ticket online through an application program on the electronic device, and the corresponding travel time of the air ticket is from 8:00PM to 11:20PM.
  • the electronic device can acquire this information, and within the time period from 8:00PM to 11:20PM, consider that the electronic device is in a low-light scene, and adjust the brightness of the screen based on the reading Env 2 of the ambient light sensor.
  • the electronic device executes step S901 and step S904.
  • the brightness of the screen can be adjusted based on the reading Env 2 of the ambient light sensor, so as to avoid calculating and determining the light intensity Env 1 of the ambient light, which reduces the calculation amount of the electronic device, thereby reducing power consumption of electronic equipment.
  • FIG. 12A and FIG. 12B are another exemplary schematic diagrams of a low-light scene provided by an embodiment of the present application.
  • the electronic device can form a network with other smart devices in the room through the WiFi function provided by the router, and obtain the working status of other smart devices. For example, the electronic device can know whether the smart lamps in the current room are working. If none of the smart lamps in the current room are working, the electronic device determines that the current scene is a low-light scene, and the electronic device does not judge the reading of the ambient light sensor Env 2 The size relationship with the threshold Env threshold , adjust the brightness of the screen based on Env 2 .
  • the electronic device determines that the current scene is a low-light scene, and the electronic device does not judge the reading Env 2 of the ambient light sensor and the threshold value Env
  • the size relationship of threshold is based on Env 2 to adjust the brightness of the screen.
  • FIG. 13 is an exemplary schematic diagram of a hardware architecture of an electronic device provided by an embodiment of the present application.
  • the electronic device 100 may be a cell phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (personal digital assistant) digital assistant (PDA), augmented reality (augmented reality, AR) device, virtual reality (virtual reality, VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, vehicle-mounted device, smart home device and/or
  • PDA personal digital assistant
  • augmented reality augmented reality, AR
  • VR virtual reality
  • AI artificial intelligence
  • wearable device wearable device
  • vehicle-mounted device smart home device
  • smart home device smart home device
  • smart home device smart home device
  • the embodiment of the present application does not specifically limit the specific type of the electronic equipment.
  • 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 (subscriber identification module, SIM) card interface Wait.
  • the sensor module 180 may include an ambient light sensor 180L and the like.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, but at least includes a display screen 194 and an ambient light sensor 180L.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, camera and other peripheral devices.
  • MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 communicates with the display screen 194 through a DSI interface to realize the display function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through a DSI interface to adjust the screen brightness of the display screen 194 of the electronic device 100 .
  • the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the wireless communication function of the electronic device 100 can be realized 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.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speakers, receivers, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • 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 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband Code division multiple access
  • WCDMA wideband code division multiple access
  • time division code division multiple access time-division code division multiple access
  • TD-SCDMA time-division code division multiple access
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 realizes the display function through 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 the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (non-volatile memory, NVM).
  • RAM random access memory
  • NVM non-volatile memory
  • Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous dynamic random access memory, SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.;
  • SRAM static random-access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double data rate synchronous Dynamic random access memory double data rate synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • DDR5SDRAM double data rate synchronous dynamic random access memory
  • Non-volatile memory may include magnetic disk storage devices, flash memory (flash memory).
  • flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.
  • it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), triple-level cell (TLC), quad-level cell (QLC), etc.
  • SLC single-level storage cells
  • MLC multi-level storage cells
  • TLC triple-level cell
  • QLC quad-level cell
  • UFS universal flash storage
  • embedded multimedia memory card embedded multi media Card
  • the random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other running programs, and can also be used to store data of users and application programs.
  • the non-volatile memory can also store executable programs and store data of users and application programs, etc., and can be loaded into the random access memory in advance for the processor 110 to directly read and write.
  • the ambient light sensor 180L is used for sensing ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the electronic device 100 may include 1 or N ambient light sensors 180L, where N is a positive integer greater than 1.
  • the ambient light sensor 180L sends the reading to the processor 110 through the DSI interface, and the processor determines whether it is a low-light scene. scene, the processor 110 can calculate based on the reading, calculate the appropriate screen brightness value, and adjust the brightness of the screen through the DSI interface; The light intensity of the ambient light is obtained, and then an appropriate screen brightness value is calculated based on the light intensity of the ambient light, and the brightness of the screen is adjusted through the DSI interface.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the software structure of the electronic device 100 is exemplarily described by taking an Android system with a layered architecture as an example.
  • FIG. 14 is an exemplary schematic diagram of an electronic device software architecture provided by an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
  • the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
  • the application layer can consist of a series of application packages.
  • the application package may include application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
  • the view system can be used to build applications.
  • a display interface can consist of one or more views.
  • a display interface including a text 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 of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears on the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application program running in the background, or a notification that appears on the screen in the form of a dialog window.
  • prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
  • the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
  • the following exemplarily describes the workflow when the electronic device 100 implements the method for adjusting screen brightness based on the ambient light sensor provided by the embodiment of the present application.
  • the Android system provides the AutomaticBrightnessController class, BrightnessMappingStrategy class, etc. to adjust the screen brightness.
  • the AutomaticBrightnessController class is responsible for data processing and some logical processing based on the data
  • the BrightnessMappingStrategy class is responsible for exposing the interface to the outside.
  • the ambient light sensor 180L When the ambient light sensor 180L confirms the reading, it will report the reading to the Android system.
  • the DisplayManagerService of the system framework layer in the Android system holds the instantiated DisplayPowerController object, and the instantiated DisplayPowerController object holds the instantiated AutomaticBrightnessController object.
  • a LightSensor is registered with the AutomaticBrightnessController object to receive readings from the ambient light sensor.
  • the electronic device can determine whether the current scene is a low-light scene. If it is not a low-light scene, it can be processed according to the default processing method; if it is a low-light scene, you can modify the logic in the AutomaticBrightnessController class so that the AutomaticBrightnessController object does not process the readings received from the ambient light sensor, but directly based on the ambient light sensor. The reading determines the brightness of the screen.
  • the term “when” may be interpreted to mean “if” or “after” or “in response to determining" or “in response to detecting".
  • the phrases “in determining” or “if detected (a stated condition or event)” may be interpreted to mean “if determining" or “in response to determining" or “on detecting (a stated condition or event)” or “in response to detecting (a stated condition or event)”.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it 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. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (eg, floppy disk, hard disk, magnetic tape), an optical medium (eg, DVD), or a semiconductor medium (eg, a solid-state hard disk), and the like.
  • the processes can be completed by computer programs to instruct related hardware.
  • the programs can be stored in computer-readable storage media.
  • When the programs are executed may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Telephone Function (AREA)

Abstract

本申请实施例提供一种基于环境光传感器的屏幕亮度调整方法。本申请提供的基于环境光传感器的屏幕亮度调整方法包括:电子设备在确定场景为弱光场景后,基于环境光传感器的读数去调节屏幕亮度,进而无需通过复杂的计算确定环境光的光强度,降低了电子设备的计算开销、耗电。

Description

基于环境光传感器的屏幕亮度调整方法
本申请要求于2021年06月04日提交中国专利局、申请号为202110627555.9、申请名称为“基于环境光传感器的屏幕亮度调整方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及基于环境光传感器的屏幕亮度调整方法。
背景技术
随着材料技术的发展和电子设备的普及,越来越多的电子设备配置有屏幕,并且屏幕的大小、素质都在不断提升。例如,手机、智能手环、智能手表等电子设备均配置有大小不同的屏幕。
屏幕表面有一层玻璃,在光照之下会自然反光,当用户在光强度较大的光源下使用电子设备时,光在玻璃会反射后的强度高于或者接近于屏幕发光的光强度,进而导致用户无法看清屏幕上显示的内容。
为了提升在强光环境下用户使用电子设备的体验,一种可行的方法为:电子设备不断的计算当前的环境光的光强度,并基于环境光的光强度调整屏幕的亮度以及屏幕上显示内容的对比度来提升屏幕上显示内容的可见性。
但是,由于环境光传感器位于屏幕下方,电子设备的环境光传感器的读数/报值并不能准确的反映屏幕上环境光的光强度,需要消耗计算资源去根据环境光传感器的读数/报值、屏幕上显示的内容计算确定屏幕上环境光的光强度,消耗了大量电子设备的计算资源,增加了耗电。
发明内容
本申请实施例提供了一种基于环境光传感器的屏幕亮度调整方法。该方法包括:电子设备首先确定场景,若该场景为弱光场景,则基于环境光传感器的读数调整屏幕亮度;若该场景不是弱光场景,则先基于环境光传感器的读数计算环境光的光强度,进而基于环境光的光强度调整屏幕亮度、对比度、色温等其他参数。
第一方面,本申请提供了一种基于环境光传感器的屏幕亮度调整方法,该方法包括:该电子设备确定当前场景为弱光场景;该电子设备确定当前场景为弱光场景后,该电子设备基于该环境光传感器的报值调节屏幕的亮度。
在上述实施例中,当电子设备确定当前场景为弱光场景情况下,不需要基于环境光传感器的读数计算确定环境光的光强度,直接基于环境光传感器的读数/报值调整屏幕的亮度,降低了电子设备的计算开销,降低耗电。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为弱光场景前,还包括:该电子设备确定当前场景不是弱光场景;该电子设备确定当前场景不是弱光场景后,该电子设备先基于该环境光传感器的报值确定环境光的光强度,然后基于该环境 光的光强度调节屏幕的亮度。
在上述实施例中,当电子设备确定当前场景不是弱光场景情况下,先基于环境光传感器的读数计算确定环境光的光强度,再基于环境光的光强度调节屏幕的亮度、对比度、色温等参数。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为弱光场景后,该电子设备基于该环境光传感器的报值调节屏幕的亮度,具体包括:该电子设备确定当前场景为弱光场景后,在第一时刻,该环境光传感器的报值为第一报值,该电子设备基于该第一报值确定该屏幕的亮度为第一亮度;在该第一时刻后,该环境光传感器的报值为第二报值,该电子设备基于该第二报值确定该屏幕的亮度为第二亮度;若该第一报值大于该第二报值,则该第一亮度大于该第二亮度;若该第一报值小于该第二报值,则该第一亮度小于该第二亮度。
在上述实施例中,电子设备基于环境光传感器的报值调节屏幕的亮度,使得屏幕的亮度与环境光传感器的报值非负相关。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为非弱光场景后,该电子设备先基于该环境光传感器的报值确定环境光的光强度,然后基于该环境光的光强度调节屏幕的亮度,具体包括:该电子设备确定当前场景为非弱光场景后,在第三时刻,该环境光传感器的报值为第三报值,该电子设备基于该第三报值和该屏幕上显示的内容确定环境光的光强度为第三强度,该电子设备基于第三强度确定屏幕的亮度为第三亮度;在该第三时刻后,该环境光传感器的报值为第四报值,该电子设备基于该第四报值和该屏幕上显示的内容确定环境光的光强度为第四强度,该电子设备基于第四强度确定屏幕的亮度为第四亮度;若该第三强度大于该第四强度,则该第三亮度大于该第四亮度;若该第三强度小于该第四强度,则该第三亮度小于该第四亮度。
在上述实施例中,电子设备基于环境光传感器的报值调节屏幕的亮度,使得屏幕的亮度与环境光的光强度非负相关。
结合第一方面的一些实施例,在一些实施例中,该第三报值小于该第四报值时,该第三强度小于该第四强度。
在上述实施例中,电子设备在非弱光场景下,环境光传感器读数与环境光的光强度之间为非负相关,可以基于环境光传感器的读数确定环境光的光强度。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为弱光场景后,还包括:该电子设备降低该环境光传感器确定报值的频率。
在上述实施例中,电子设备确定为弱光场景后,可以降低环境光传感器的工作频率,以进一步降低功耗。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为弱光场景,具体包括:该电子设备确定该环境光传感器的报值小于阈值后,该电子设备确定当前场景为弱光场景。
在上述实施例中,电子设备可以简单的通过环境光传感器的报值确定当前场景为弱光场景。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为弱光场景, 具体包括:该电子设备基于定位信息和时间信息确定该电子设备所在地区为晚上后,该电子设备确定当前场景为弱光场景。
在上述实施例中,电子设备可以依据时区信息确定当前场景为弱光场景。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为弱光场景,具体包括:该电子设备确定电量低于电量阈值后,该电子设备确定当前场景为弱光场景。
在上述实施例中,电子设备低电量时可以确定当前场景为弱光场景。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为弱光场景,具体包括:该电子设备上确定该电子设备上的前台应用为游戏类应用后,该电子设备确定当前场景为弱光场景。
在上述实施例中,当电子设备前台应用为需要资源较多的应用时,确定当前场景为弱光场景。
结合第一方面的一些实施例,在一些实施例中,该电子设备确定当前场景为弱光场景,具体包括:该电子设备的确定屏幕亮度自动调节功能为关闭后,该电子设备确定当前场景为弱光场景。
在上述实施例中,当电子设备的屏幕亮度自动调节功能关闭后,确定当前场景为弱光场景。
第二方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器和存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行:确定当前场景为弱光场景;确定当前场景为弱光场景后,基于该环境光传感器的报值调节屏幕的亮度。
在上述实施例中,当电子设备确定当前场景为弱光场景情况下,不需要基于环境光传感器的读数计算确定环境光的光强度,直接基于环境光传感器的读数/报值调整屏幕的亮度,降低了电子设备的计算开销,降低耗电。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:确定当前场景不是弱光场景;确定当前场景不是弱光场景后,先基于该环境光传感器的报值确定环境光的光强度,然后基于该环境光的光强度调节屏幕的亮度。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:确定当前场景为弱光场景后,在第一时刻,该环境光传感器的报值为第一报值,基于该第一报值确定该屏幕的亮度为第一亮度;在该第一时刻后,该环境光传感器的报值为第二报值,基于该第二报值确定该屏幕的亮度为第二亮度;若该第一报值大于该第二报值,则该第一亮度大于该第二亮度;若该第一报值小于该第二报值,则该第一亮度小于该第二亮度。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:确定当前场景为非弱光场景后,在第三时刻,该环境光传感器的报值为第三报值,基于该第三报值和该屏幕上显示的内容确定环境光的光强 度为第三强度,基于第三强度确定屏幕的亮度为第三亮度;在该第三时刻后,该环境光传感器的报值为第四报值,基于该第四报值和该屏幕上显示的内容确定环境光的光强度为第四强度,基于第四强度确定屏幕的亮度为第四亮度;若该第三强度大于该第四强度,则该第三亮度大于该第四亮度;若该第三强度小于该第四强度,则该第三亮度小于该第四亮度。
结合第二方面的一些实施例,在一些实施例中,该第三报值小于该第四报值时,该第三强度小于该第四强度。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:降低该环境光传感器确定报值的频率。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:基于定位信息和时间信息确定该电子设备所在地区为晚上后,确定当前场景为弱光场景。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:确定电量低于电量阈值后,确定当前场景为弱光场景。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:确定该电子设备上的前台应用为游戏类应用后,确定当前场景为弱光场景。
结合第二方面的一些实施例,在一些实施例中,该一个或多个处理器,具体用于调用该计算机指令以使得该电子设备执行:确定屏幕亮度自动调节功能为关闭后,确定当前场景为弱光场景。
第三方面,本申请实施例提供了一种芯片系统,该芯片系统应用于电子设备,该芯片系统包括一个或多个处理器,该处理器用于调用计算机指令以使得该电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
第四方面,本申请实施例提供一种包含指令的计算机程序产品,当上述计算机程序产品在电子设备上运行时,使得该电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
第五方面,本申请实施例提供一种计算机可读存储介质,包括指令,当上述指令在电子设备上运行时,得该电子设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
可以理解地,上述第二方面提供的电子设备、第三方面提供的芯片系统、第四方面提供的计算机程序产品以及第五方面提供的计算机存储介质均用于执行本申请实施例所提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
图1A与图1B为本申请涉及的环境光一个示例性示意图;
图2为本申请涉及的屏幕亮度自动调节功能的一个示例性示意图;
图3A与图3B为本申请涉及的用户调节屏幕亮度基准值过程的一个示例性示意图;
图4为本申请实施例提供的未准确获取环境光的光强度情况下屏幕亮度自动调节的一个示例性示意图;
图5为本申请涉及的阳光下可读性提升功能效果的一个示例性示意图;
图6A与图6B为本申请实施例提供的确定环境光的光强度方法的一个示例性示意图;
图7为本申请设计的一种手机亮度调整方法的数据流程的一个示例性示意图;
图8A与图8B为本申请实施例提供的基于环境光传感器的屏幕亮度调整方法的数据流程的一个示例性示意图;
图9为本申请实施例提供的基于环境光传感器的屏幕亮度调整方法一个示例性示意图;
图10为本申请实施例提供屏幕亮度调整方法的场景的一个示例性示意图;
图11为本申请实施例提供的弱光场景的一个示例性示意图;
图12A与图12B为本申请实施例提供的弱光场景的另一个示例性示意图;
图13为本申请实施例提供的电子设备的硬件架构的一个示例性示意图;
图14为本申请实施例提供的电子设备软件架构的一个示例性示意图。
具体实施方式
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“该”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
为了便于理解,首先,下面对本申请实施例涉及的相关术语及相关概念进行介绍。本发明的实施方式部分使用的术语仅用于对本发明的具体实施例进行解释,而非旨在限定本发明。
(1)环境光
环境光为环境中所有光源发射、折射、反射的光波传播到电子设备上屏幕的叠加。其中,可以用环境光的光强度衡量照射到屏幕上光线的强度。其中,光线的强度的度量单位为单面面积上所接受可见光的光通量,简称照度。光强度的度量单位为勒克斯(Lux或Ix)。
其中,光源可以是天然的,也可以是人造的。光源可以包括很多种类型,例如,太阳光直射、建筑物对太阳光的折射或反射、白炽灯、LED灯等,在此不作限定。
下面以图1A、图1B所示的内容为例,示例性的介绍环境光以及环境光对用户使用电子设备的影响。
图1A与图1B为本申请涉及的环境光一个示例性示意图。
如图1A所示,环境光包括阳光直射到手机上的光线和经过建筑物反射或折射到手机上的光线。
如图1B所示,当电子设备的屏幕反射或折射的环境光强度大于屏幕显示内容的光强度时,用户很难看清楚电子设备的屏幕上显示的内容。
可以理解的是,在图1B所示的情况下,电子设备需要增加屏幕的亮度,以使得用户可以清楚的看到屏幕上显示的内容。其中,增加屏幕亮度主要包括两种方法,分别为屏幕亮度自动调节功能和阳光可读性功能。其中,屏幕亮度自动调节功能、阳光可读性功能可以参考术语解释中(2)屏幕亮度自动调节以及(3)阳光下可读性提升中的文字描述,此处不再赘述。
(2)屏幕亮度自动调节
屏幕亮度自动调节是一种功能,可以使支持该功能的电子设备的屏幕的背光强度随着环境光变化而变化。屏幕亮度自动调节功能使得屏幕的亮度的变化趋势与环境光的光强度变化趋势正相关。
环境光传感器的读数为环境光与屏幕上显示内容的线性叠加或非线性叠加。当屏幕上显示内容变化不大或没有变化时,环境光传感器的读数与环境光的光强度的变化趋势正相关。在该情况下,屏幕亮度自动调节可以基于环境光传感器的读数,而不需要一定基于环境光的光强度。而当屏幕上显示的内容变化较大时,环境光传感器的读数与环境光的光强度的变化趋势不一定正相关。其中,环境光传感器的读数也可以成为环境光传感器的报值。
其中,屏幕的背光强度的单位可以为尼特(nits)。为了便于描述,下文中以屏幕的亮度指代屏幕的背光强度。
例如,以配置有OLED屏幕的手机为例,其屏幕的亮度范围约为几十尼特至数百尼特;对于专业OLED显示器,其屏幕的亮度范围上限约为数千尼特。
很显然的,在非黑暗环境下,当电子设备的屏幕的亮度一直维持在较高的数值范围能够确保用户清楚的浏览屏幕上显示的内容。但是,屏幕的亮度的高低直接影响到手机的功耗。屏幕的亮度越高,电子设备的能耗越高;屏幕的亮度越低,电子设备的能耗越低。
为了同时保证用户的体验和电子设备的低能耗,通过屏幕亮度自动调节功能,自动调节屏幕的亮度至合适的值,而无需将屏幕亮度维持在较高的范围。
下面以图2所示的内容为例,示例性的介绍手机上的屏幕亮度自动调节功能。
图2为本申请涉及的屏幕亮度自动调节功能的一个示例性示意图。
如图2所示,用户通过下滑等操作,可以调出下拉菜单栏。在下拉菜单栏中,可以看到屏幕亮度自动调节功能。其中,用户可以决定开启或关闭该功能。若用户开启该功能,手机可以根据环境光传感器等传感器设备确定环境光的光强度,进而调整手机屏幕的亮度,提升用户的体验。
值得说明的是,手机上的屏幕亮度自动调节功能在实现时需要确定一个基准亮度与环境光的对应性,即当环境光的光强度=A时,确定屏幕的亮度=B。其中,A为手机上的传感器如环境光传感器、前置摄像头等确定的,B为开发人员/用户指定的亮度。
下面以图3A、图3B所示的内容为例,以手机为例示例性的介绍用户调节屏幕亮度基准值的过程。
图3A与图3B为本申请涉及的用户调节屏幕亮度基准值过程的一个示例性示意图。
如图3A所示,当手机采用默认设置时,随着环境光的光强度的变化,屏幕亮度的范围为[50尼特,400尼特]。
当屏幕亮度自动调节功能开启时,用户可以重新设置屏幕亮度基准值以调整屏幕亮度的范围。例如,用户决定手机默认设置情况下,屏幕亮度过高。经过重新设置如图3B所示,屏幕的亮度范围变为[50尼特,200尼特]。
可以理解的是,基于图3A以及图3B所示的内容,可以认为环境光与屏幕亮度的关系如式:
Figure PCTCN2022084689-appb-000001
其中,Light min为屏幕亮度最小值,light max为屏幕亮度最大值,Light Screen为被调整后的屏幕的亮度,Light env可以为环境光传感器的读数或者可以为基于环境光传感器读数计算得到的环境光的光强度,H()为单调增函数,env max为环境光最大值,env min为环境光最小值。
用户重新设置屏幕亮度基准值可以认为是调整H()函数,或者可以认为是调整屏幕亮度最大值以及屏幕亮度最小值。
当电子设备没有获取准确的环境光的光强度时,电子设备上环境光传感器的读数与真实的环境光的光强度之间的估计误差值相当于重新设定了屏幕亮度的基准值。但是,估计误差值并不会改变屏幕的亮度的变化趋势与环境光的光强度变化趋势正相关这一结果。所以,电子设备在实现屏幕亮度自动调节功能时,可以获取不准确的环境光的光强度。即,电子设备在实现屏幕亮度自动调节功能时,可以基于环境光传感器的读数调整屏幕亮度。
值得说明的是,当屏幕上显示的内容变化较大时,基于环境光传感器的读数调整屏幕亮度虽然不能非常准确的调节,但是屏幕上显示的内容的变化对环境光传感器读数的影响较小,等价于动态调整了屏幕亮度的基准值,对屏幕亮度自动调节功能正常运行的影响较小。
下面以图4所示的内容为例,示例性的介绍,当电子设备没有获取准确的环境光的光强度情况下,电子设备进行屏幕亮度自动调节的结果。
图4为本申请实施例提供的未准确获取环境光的光强度情况下屏幕亮度自动调节的一个示例性示意图。
如图4所示,当环境光估计准确时,屏幕亮度自动调节功能正常工作;当环境光估计不准确时,屏幕亮度自动调节功能正常工作。
结合图4以及图3A、图3B所示的内容,可以理解的是,当环境光传感器的读数能够反映环境光的光强度变化趋势,环境光传感器的读数是否准确不影响屏幕亮度自动调节功能正常工作。
并且,在一些情况下,例如不同用户眼睛对光敏感程度不同,或者用户给电子设备的屏幕贴上了保护膜、防窥膜,电子设备内部预配置的算法无法在这些情况下准确的依据环 境光传感器的读数计算确定准确的环境光的光强度。
(3)阳光下可读性提升
阳光下可读性提升为当电子设备感知到环境光的光强度高于设定阈值时,电子设备会通过调整屏幕上显示内容的对比度、色温、背光等参数,以提升用户体验的功能。
例如,当阳光下可读性提升功能开启时,若环境光的光强度高于设定阈值时,随着环境光的光强度增加,电子设备会增加屏幕的亮度(背光)、对比度,并适应性的调整色温等参数。当屏幕的亮度、对比度增加后,在强光下用户更容易看清屏幕上的内容,提升了屏幕上内容的可读性,进而提升了用户的体验。
但是,在强光下调整屏幕的亮度、对比度、色温等参数会导致原显示内容的一些失真等一些负面效果。为了降低阳光下可读性提升功能对屏幕上显示内容的改变,需要电子设备准确的估计环境光的光强度。也就是说阳光下可读性提升功能需要更加准确的环境光的光强度。
下面主要以调整屏幕的亮度为例,示例性的介绍阳光下可读性提升与环境光的光强度之间的关系。
若电子设备未开启阳光下可读性提升功能,仅通过屏幕亮度自动调节功能调节屏幕亮度的范围为[Light min,light max];若电子设备开启阳光下可读性提升功能,通过屏幕亮度自动调节功能调节屏幕亮度的范围为[Light min,light sun],其中light sun>light max
即,若环境光的光强度范围在[0,env max]时,屏幕亮度自动调节功能生效;若环境光的光强度的值大于env sun时,阳光下可读性提升功能生效。其中,env sun大于等于env max
基于LCD或OLED屏幕的发光机理,当屏幕的亮度增加10%,屏幕的耗电至少增加20%以上。并且,当屏幕的亮度的较高时,例如当屏幕的亮度[Light max,light sun],有可能会对用户的眼睛造成不适感。所以,当阳光下可读性提升的功能生效时,需要准确的确定环境光值,这是因为:其一,若屏幕的亮度不够时,用户仍然看不清屏幕;其二,若屏幕的亮度超过合适的值,极大的增加的功耗,并且较强的屏幕的亮度可能对用户造成不适。
下面以图5所示的内容为例,示例性的介绍环境光估计是否准确对阳光下可读性提升功能的影响。
图5为本申请涉及的阳光下可读性提升功能效果的一个示例性示意图。
如图5所示,当电子设备估计环境光的光强度准确时,阳光可读性提升功能会调整屏幕的亮度至合理值。若电子设备估计环境光的光强度不准确时,阳光可读性提升功能会调整屏幕的亮度在合理值附近。当调整屏幕的亮度低于合理值时,用户基本上看不清屏幕的内容;当调整屏幕的亮度大于合理值时,电子设备耗电增加过多,且过亮的屏幕的亮度可能会用户造成不适。
可以理解的是,与图5所示的内容类似,若电子设备估计环境光的光强度不准确时,不合适的对比度、色温等参数会降低用户的体验。所以,阳关下可读性提升功能在调整屏幕上显示内容的对比度、色温等其他参数时,也需要准确估计环境光的光强度。值得说明 的是,在本申请一些实施例中,可以使用一个功能模块实现阳光下可读性提升功能以及屏幕亮度自动调节功能。
(4)确定环境光的光强度
由于不同电子设备上屏幕的材质、环境光传感器与屏幕的相对位置等内容的不同,不同的电子设备有不同的方法确定环境光的光强度。
下面以图6A以及图6B所示的内容为例,示例性的介绍本申请实施例提供的确定环境光的光强度的方法。
图6A与图6B为本申请实施例提供的确定环境光的光强度方法的一个示例性示意图。
如图6A以及图6B所示,电子设备的屏幕下方配置有环境光传感器。环境光传感器的输入为透过屏幕的环境光。为了方便描述,称Env 1为照射到屏幕上的环境光,Env 2为透过屏幕照射到环境光传感器上的光。
很显然的,当电子设备的环境相对固定时,即Env 1不变时,屏幕上显示的内容会直接影响Env 2的值。为了便于描述Env 1与Env 2之间的关系,可以认为Env 2=f(Env 1),其中f为与屏幕本身以及屏幕上显示内容有关的函数。
通过确定f的反函数f -1,电子设备基于环境光传感器确定Env 2,通过反函数Env 1=f -1(Env 2)。
但是,确定Env 1与Env 2之间的关系f是十分复杂的。具体的,首先,需要周期性的实时计算环境光传感器上方屏幕显示的内容;其次,需要通过较为复杂的积分、多元分析等方法估计屏幕显示的内容对环境光传感器的读数的影响;最后,由于上一步中的影响可能是非线性、非独立的,即该影响与环境光传感器的读数本身还有关联,需要进一步分析去除该影响以确定环境光的光强度。
在本申请一些实施例中,电子设备确定Env 1可以无需通过f,可以直接通过函数拟合、深度学习等方法直接的构建f -1,进而确定Env 1
类似的,当有多个环境光传感器时,电子设备可以基于各个环境光传感器的读数,独立的计算并确定不同或相同的Env 2,进而确定一个更加准确的Env 1
值得说明的是,确定环境光的光强度需要确定f -1,而f -1与电子设备上屏幕显示的内容有关,所以需要不断更新f -1,极大的占据了电子设备的计算资源并且增加了电子设备的耗电。
其次,下面介绍与本申请有关的一种手机亮度调整方案。
下面结合图7所示的内容,示例性的介绍手机亮度调整方案。
图7为本申请设计的一种手机亮度调整方法的数据流程的一个示例性示意图。
如图7所示,环境光传感器周期性的确定Env 2的读数,并将该读数发送给电子设备的CPU。电子设备的CPU在获取到Env 2的读数后,可以确定Env 1的值作为电子设备上屏幕的环境光的光强度。根据电子设备屏幕的参数,电子设备的CPU计算并确定合适的屏幕亮度值,并将该值发送给屏幕或者直接通过指令、接口等方式调整屏幕的亮度。
很显然的,在图7所示的方法中,屏幕自动亮度调节功能和阳光可读性功能的实现都 依赖于电子设备的CPU计算确定的Env 1的值。由于Env 1的值更能够表征电子设备上屏幕的环境光的光强度,所以电子设备可以实现屏幕亮度自动调节功能和阳光可读性功能。
但是,电子设备的CPU基于环境光传感器的Env 2的读数去确定Env 1的值时,涉及到大量的运算。并且在一些情况下,还涉及到矩阵求逆的过程,计算量进一步增加。其次,考虑到电子设备可能处于变化的场景中,环境光传感器确定Env 2读数的频率往往高达数十Hz,又进一步的增加了计算量。
为了解决图7所示方法的缺陷,本申请提出基于环境光传感器的屏幕亮度调整方法。下面以图8A、图8B所示的内容为例,示例性的介绍本申请实施例提供的基于环境光传感器的屏幕亮度调整方法的数据流程。
图8A与图8B为本申请实施例提供的基于环境光传感器的屏幕亮度调整方法的数据流程的一个示例性示意图。
对比图7所示的内容,如图8A所示,环境光传感器周期性的确定Env 2的读数,并将该读数发送给电子设备的CPU。电子设备的CPU在获取到Env 2的读数后,首先可以判断Env 2与阈值Env threshold的大小,若Env 2小于阈值Env threshold,则电子设备直接基于Env 2确定屏幕合适的亮度值,并将该值发送给屏幕或者直接通过指令、接口等方式调整屏幕的亮度。
如图8B所示,若Env 2大于等于阈值Env threshold,则电子设备首先可以根据Env 2的值确定Env 1,并将的Env 1值作为电子设备上屏幕的环境光的光强度。其次,电子设备基于Env 1确定屏幕合适的亮度值,将该值发送给屏幕或者直接通过指令、接口等方式调整屏幕的亮度。
值得说明的是,Env 2小于阈值Env threshold时,电子设备往往处于室内场景下。在室内场景中,电子设备不需要阳光可读性功能生效,故电子设备不需要计算确定准确的环境光的光强度,即不需要确定Env 1的值。由于电子设备不需要根据Env 2去确定Env 1,减少了计算量,进而降低了电子设备的功耗。
再次,下面具体的介绍本申请实施例提供的基于环境光传感器的屏幕亮度调整方法。
本申请提出的基于环境光传感器的屏幕亮度调整方法包括:当电子设备位于弱光场景下,直接基于Env 2确定屏幕合适的亮度;当电子设备位于非弱光场景下或者电子设备不能判断当前场景时,基于Env 2确定Env 1后,基于Env 1确定屏幕合适的亮度。并且,在环境光传感器确定Env 2的读数低于阈值Env threshold时,可以降低环境光传感器的工作频率。
其中,电子设备是否位于弱光场景下,可以基于环境光传感器确定Env 2的读数与阈值Env threshold的大小关系判断确定。例如,当环境光传感器确定Env 2的读数低于阈值Env threshold时,电子设备确定本身位于弱光场景下;当环境光传感器确定Env 2的读数大于等于阈值Env threshold时,电子设备确定本身位于非弱光场景下。
图9为本申请实施例提供的基于环境光传感器的屏幕亮度调整方法一个示例性示意图。
如图9所示,本申请实施例提供的基于环境光传感器的屏幕亮度调整方法包括:
S901:电子设备确定环境光传感器的报值。
具体的,电子设备周期性的从环境光传感器获取读数为Env 2。执行步骤S902。
S902:环境光传感器的报值是否大于等于阈值。
具体的,电子设备在每一次获取到Env 2后,进行判断,判断Env 2与Env threshold的大小。当Env 2小于Env threshold时,执行步骤S904;当Env 2大于等于Env threshold时,执行步骤S903。
可以理解的是,电子设备判断Env 2与Env threshold的大小是为了确定当前设备所处的场景,并结合场景的执行后续的不同的步骤。
值得说明的是,电子设备可以不执行步骤S901、步骤S902,而通过其他信息去判断当前电子设备所处的场景为环境光的光强度较低的场景。为了方便描述,称环境光的光强度较低的场景为弱光场景。
例如,当电子设备通过定位信息、时间确定电子设备所处时区为晚上,可以不执行步骤S902以及步骤S903而直接执行步骤S904。或者,电子设备通过手环或其他智能设备判断用户已经进入睡眠状态,可以不执行步骤S902以及步骤S903而直接执行步骤S904。或者,在智能家居场景中,电子设备确定室内的部分或全部灯光关闭时,可以不执行步骤S902以及步骤S903而直接执行步骤S904。或者,电子设备可以读取旅行类APP的程序的信息,当确定用户在某个时间段乘坐公共交通工具如飞机时,可以在该时间段不执行步骤S902以及步骤S903而直接执行步骤S904。或者,电子设备通过路由器信息等确定位于电影院、密室逃脱等环境中时,可以不执行步骤S903而直接执行步骤S904。
值得说明的是,当电子设备电量较低时,或者前台应用需要占据较多的系统资源时,可以不执行步骤S901、步骤S902,例如,电子设备处于省电模式、节能模式或者电量较低时,可以不执行步骤S902以及步骤S903而直接执行步骤S904。电子设备前台应用为大型游戏时等,可以不执行步骤S902以及步骤S903而直接执行步骤S904。
S903:电子设备确定环境光的光强度的值。
具体的,电子设备可以根据步骤S901中确定的环境光传感器的报值Env 2,去确定环境光的光强度的值Env 1。其中,电子设备如何根据Env 2确定Env 1可以参考术语解释中(4)确定环境光的光强度中的文字描述,此处不再赘述。
S904:电子设备调节屏幕的亮度。
具体的,若电子设备确定Env 1的值,则可以基于Env 1的值确定屏幕合适的亮度值,将该值发送给屏幕或者直接通过指令、接口等方式调整屏幕的亮度。其中,调整屏幕的亮度值可以是屏幕亮度自动调节或者也可以是阳光下可读性提升。也就是说,基于Env 1的值确定屏幕合适的亮度值可以用于实现屏幕亮度自动调节功能或者用于实现阳光下可读性提升功能。其中,屏幕亮度自动调节功能以及阳光下可读性提升工可以参考术语解释中(2)屏幕亮度自动调节、(3)阳光下可读性提升中的文字描述,此处不再赘述。
若电子设备未确定Env 1的值,则可以基于Env 2的值确定屏幕合适的亮度值,将该值发送给屏幕或者直接通过指令、接口等方式调整屏幕的亮度。
可选的,在本申请一些实施例中,电子设备调节屏幕的亮度时,还可以基于Env 1调节 屏幕上显示的内容的对比度、色温等参数。
可以理解地,当需要阳光下可读性提升功能时,需要基于Env 2确定Env 1,将Env 1发送给对应的接口去实现屏幕亮度自动调节功能和阳光下可读性提升功能;当在不需要阳光下可读性提升功能,将Env 2发送给对应的接口去实现屏幕亮度自动调节功能,这样就省去基于Env 2确定Env 1的过程,可以节省功耗。
结束。
值得说明的是,电子设备在执行步骤S902后,若判断Env 2小于Env threshold或者判断电子设备处于弱光场景下,则可以适当的降低环境传感器的工作频率。
再次,下面结合图10所示的内容,示例性的介绍多种场景下实施本申请提供的基于环境光传感器的屏幕亮度调整方法。
图10为本申请实施例提供屏幕亮度调整方法的场景的一个示例性示意图。
如图10所示,当环境光传感器的参数变化如图10中所示,在T0时刻至T1时刻内以及T2时刻以后,电子设备确定环境光传感器的读数Env 2的值低于阈值Env threshold,此时电子设备基于环境光传感器读数调节屏幕亮度。并且此时调节屏幕亮度的功能由屏幕亮度自动调节功能实现。在T0时刻至T1时刻内,由于电子设备不需要计算确定Env 1,计算量较少,功耗较低。
在T1时刻至T2时刻内的部分或全部时间内,电子设备确定环境光传感器的读数Env 2的值大于等于阈值Env threshold,此时电子设备先基于环境光传感器读数Env 2确定环境光的光强度Env 1,再基于环境光的光强度Env 1调整屏幕亮度。并且此时调节屏幕亮度的功能由阳光下可读性提升功能实现。在T1时刻至T2时刻内的部分或全部时间内,由于电子设备需要计算确定Env 1,计算量较大,功耗较高。
值得说明的是,在T1时刻至T2时刻内的部分时间内,调节屏幕亮度的功能可以由屏幕亮度自动调节功能实现。
电子设备可以通过环境光传感器读数确定当前场景是否是弱光场景,若是弱光场景,则可以基于环境光传感器的读数Env 2的调整屏幕亮度;若是非弱光场景,则可以基于环境光的光强度Env 1调整屏幕亮度。
除图10所示的内容之外,电子设备还可以通过其他信息确定是否是弱光场景。下面结合图11所示的内容,示例性的说明电子设备通过其他信息确定是否是弱光场景,进而选择不同的系统资源调度方式。
图11为本申请实施例提供的弱光场景的一个示例性示意图。
如图11所示,用户通过电子设备上的应用程序在线购买了一张机票,该机票对应的出行时间为8:00PM至11:20PM。电子设备可以获取该信息,并在时间段8:00PM至11:20PM内,认为电子设备处于弱光场景中,基于环境光传感器读数Env 2调节屏幕亮度。对应于图9中所示的内容,电子设备执行步骤S901和步骤S904。
可以理解的是,由于电子设备通过其他信息确定为弱光场景,可以基于环境光传感器读数Env 2调节屏幕亮度,避免计算确定环境光的光强度Env 1,降低了电子设备的计算量,进而降低了电子设备的功耗。
图12A与图12B为本申请实施例提供的弱光场景的另一个示例性示意图。
如图12A所示,电子设备可以通过路由器提供的WiFi功能与房间内的其他智能设备组网,并获取其他智能设备的工作状态。例如,电子设备可以得知当前房间内的智能灯具是否正在工作,若当前房间内的智能灯具均未工作,电子设备确定当前场景为弱光场景,电子设备不去判断环境光传感器的读数Env 2与阈值Env threshold的大小关系,基于Env 2调节屏幕的亮度。
如图12B所示,当电子设备判断当前房间内的智能场景为微光场景、睡眠场景时,电子设备确定当前场景为弱光场景,电子设备不去判断环境光传感器的读数Env 2与阈值Env threshold的大小关系,基于Env 2调节屏幕的亮度。
最后,下面介绍本申请实施例提供的电子设备。
图13为本申请实施例提供的电子设备的硬件架构的一个示例性示意图。
电子设备100可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备,本申请实施例对该电子设备的具体类型不作特殊限制。
电子设备100可以包括处理器110,内部存储器121,天线1,天线2,移动通信模块150,无线通信模块160,传感器模块180,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口等。其中传感器模块180可以包括环境光传感器180L等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请一些实施例中,电子设备100可以包括比图示更多或更少的部件,但是至少要包括显示屏194、环境光传感器180L。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal  asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。在一些实施例中处理器110和显示屏194通过DSI接口通信,调整电子设备100的显示屏194的屏幕亮度。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器,受话器等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的 信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。
随机存取存储器可以包括静态随机存储器(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,例如第五代DDR SDRAM一般称为DDR5SDRAM)等;
非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。
快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)、多阶存储单元(multi-level cell,MLC)、三阶储存单元(triple-level cell,TLC)、四阶储存单元(quad-level cell,QLC)等,按照存储规范划分可以包括通用闪存存储(英文:universal flash storage,UFS)、嵌入式多媒体存储卡(embedded multi media Card,eMMC)等。
随机存取存储器可以由处理器110直接进行读写,可以用于存储操作系统或其他正在运行中的程序的可执行程序(例如机器指令),还可以用于存储用户及应用程序的数据等。
非易失性存储器也可以存储可执行程序和存储用户及应用程序的数据等,可以提前加 载到随机存取存储器中,用于处理器110直接进行读写。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。在一些实施例中,电子设备100可以包括1个或N个环境光传感器180L,N为大于1的正整数。
电子设备实施本申请实施例提供的基于环境光传感器的屏幕亮度调整方法时,环境光传感器180L将读数通过DSI接口将该读数发送给处理器110,处理器确定是否是弱光场景,若是弱光场景,处理器110可以基于该读数进行计算,计算出合适的屏幕亮度值,并通过DSI接口调节屏幕的亮度;若不是弱光场景,处理器110首先基于该读书以及显示屏194的相关参数计算出环境光的光强度,进而基于环境光的光强度计算出合适的屏幕亮度值,并通过DSI接口调节屏幕的亮度。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图14为本申请实施例提供的电子设备软件架构的一个示例性示意图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图14所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图14所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例 如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
下面示例性的说明电子设备100实施本申请实施例提供基于环境光传感器的屏幕亮度调整方法时的工作流程。
Android系统中提供AutomaticBrightnessController类、BrightnessMappingStrategy类等实现调节屏幕亮度。其中,AutomaticBrightnessController类负责对数据进行处理以及基于数据进行一些逻辑处理,BrightnessMappingStrategy类负责对外部暴露接口。
当环境光传感器180L确定读数后,会将读数报给Android系统。Android系统中系统框架层的DisplayManagerService持有实例化的DisplayPowerController对象,而实例化的DisplayPowerController对象持有实例化的AutomaticBrightnessController对象。AutomaticBrightnessController对象中注册有LightSensor,用于接收环境光传感器的读数。
通过重构AutomaticBrightnessController的构造函数,修改AutomaticBrightnessController中的逻辑,可以实现电子设备判断当前场景是否是弱光场景。若是非弱光场景,可以按照默认的处理方式进行处理;若是弱光场景,可以修改AutomaticBrightnessController类中的逻辑,使得AutomaticBrightnessController对象不对接收到环境光传感器的读数进行处理,而是直接基于环境光传感器的读数确定屏幕的亮度。
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。 当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (14)

  1. 一种基于环境光传感器的屏幕亮度调整方法的方法,所述方法应用于具有屏幕和环境光传感器的电子设备,所述环境光传感器位于所述屏幕下方,其特征在于,包括:
    所述电子设备确定当前场景为弱光场景;
    所述电子设备确定当前场景为弱光场景后,所述电子设备基于所述环境光传感器的报值调节屏幕的亮度。
  2. 如权利要求1所述的方法,其特征在于,所述电子设备确定当前场景为弱光场景前,还包括:
    所述电子设备确定当前场景不是弱光场景;
    所述电子设备确定当前场景不是弱光场景后,所述电子设备先基于所述环境光传感器的报值确定环境光的光强度,然后基于所述环境光的光强度调节屏幕的亮度。
  3. 如权利要求1或2所述的方法,其特征在于,所述电子设备确定当前场景为弱光场景后,所述电子设备基于所述环境光传感器的报值调节屏幕的亮度,具体包括:
    所述电子设备确定当前场景为弱光场景后,在第一时刻,所述环境光传感器的报值为第一报值,所述电子设备基于所述第一报值确定所述屏幕的亮度为第一亮度;
    在所述第一时刻后,所述环境光传感器的报值为第二报值,所述电子设备基于所述第二报值确定所述屏幕的亮度为第二亮度;
    若所述第一报值大于所述第二报值,则所述第一亮度大于所述第二亮度;
    若所述第一报值小于所述第二报值,则所述第一亮度小于所述第二亮度。
  4. 如权利要求2所述的方法,其特征在于,所述电子设备确定当前场景为非弱光场景后,所述电子设备先基于所述环境光传感器的报值确定环境光的光强度,然后基于所述环境光的光强度调节屏幕的亮度,具体包括:
    所述电子设备确定当前场景为非弱光场景后,在第三时刻,所述环境光传感器的报值为第三报值,所述电子设备基于所述第三报值和所述屏幕上显示的内容确定环境光的光强度为第三强度,所述电子设备基于第三强度确定屏幕的亮度为第三亮度;
    在所述第三时刻后,所述环境光传感器的报值为第四报值,所述电子设备基于所述第四报值和所述屏幕上显示的内容确定环境光的光强度为第四强度,所述电子设备基于第四强度确定屏幕的亮度为第四亮度;
    若所述第三强度大于所述第四强度,则所述第三亮度大于所述第四亮度;
    若所述第三强度小于所述第四强度,则所述第三亮度小于所述第四亮度。
  5. 如权利要求4所述的方法,其特征在于,所述第三报值小于所述第四报值时,所述第三强度小于所述第四强度。
  6. 如权利要求1至5中任一项所述的方法,其特征在于,所述电子设备确定当前场景为弱光场景后,还包括:
    所述电子设备降低所述环境光传感器确定报值的频率。
  7. 如权利要求1至6中任一项所述的方法,其特征在于,所述电子设备确定当前场景为弱光场景,具体包括:
    所述电子设备确定所述环境光传感器的报值小于阈值后,所述电子设备确定当前场景为弱光场景。
  8. 如权利要求1至6中任一项所述的方法,其特征在于,所述电子设备确定当前场景为弱光场景,具体包括:
    所述电子设备基于定位信息和时间信息确定所述电子设备所在地区为晚上后,所述电子设备确定当前场景为弱光场景。
  9. 如权利要求1至6中任一项所述的方法,其特征在于,所述电子设备确定当前场景为弱光场景,具体包括:
    所述电子设备确定电量低于电量阈值后,所述电子设备确定当前场景为弱光场景。
  10. 如权利要求1至6中任一项所述的方法,其特征在于,所述电子设备确定当前场景为弱光场景,具体包括:
    所述电子设备确定所述电子设备上的前台应用为游戏类应用后,所述电子设备确定当前场景为弱光场景。
  11. 如权利要求1至6中任一项所述的方法,其特征在于,所述电子设备确定当前场景为弱光场景,具体包括:
    所述电子设备确定屏幕亮度自动调节功能为关闭后,所述电子设备确定当前场景为弱光场景。
  12. 一种电子设备,其特征在于,所述电子设备包括:一个或多个处理器和存储器;
    所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得所述电子设备执行如权利要求1至11中任一项所述的方法。
  13. 一种芯片系统,所述芯片系统应用于电子设备,所述芯片系统包括一个或多个处理器,所述处理器用于调用计算机指令以使得所述电子设备执行如权利要求1至11中任一项所述的方法。
  14. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求1至11中任一项所述的方法。
PCT/CN2022/084689 2021-06-04 2022-03-31 基于环境光传感器的屏幕亮度调整方法 WO2022252793A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110627555.9 2021-06-04
CN202110627555.9A CN113889053B (zh) 2021-06-04 2021-06-04 基于环境光传感器的屏幕亮度调整方法

Publications (1)

Publication Number Publication Date
WO2022252793A1 true WO2022252793A1 (zh) 2022-12-08

Family

ID=79010175

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/084689 WO2022252793A1 (zh) 2021-06-04 2022-03-31 基于环境光传感器的屏幕亮度调整方法

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117857696A (zh) * 2024-02-07 2024-04-09 荣耀终端有限公司 环境光数据上报方法及电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113889053B (zh) * 2021-06-04 2022-07-22 荣耀终端有限公司 基于环境光传感器的屏幕亮度调整方法
CN114727029B (zh) * 2022-03-21 2024-03-22 北京百度网讯科技有限公司 视频的处理方法、装置、电子设备及存储介质
CN116682367B (zh) * 2022-10-14 2024-03-29 荣耀终端有限公司 一种屏幕环境光检测方法、电子设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102938247A (zh) * 2012-11-29 2013-02-20 广东欧珀移动通信有限公司 一种亮度调整方法及装置
CN102954836A (zh) * 2012-10-26 2013-03-06 京东方科技集团股份有限公司 环境光传感器、用户使用装置及显示装置
CN108540594A (zh) * 2018-02-05 2018-09-14 维沃移动通信有限公司 移动终端、外界环境光强度的确定方法及装置
CN111223432A (zh) * 2020-01-10 2020-06-02 北京小米移动软件有限公司 控制屏幕显示的方法及装置
CN113889053A (zh) * 2021-06-04 2022-01-04 荣耀终端有限公司 基于环境光传感器的屏幕亮度调整方法

Family Cites Families (14)

* 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
JP6285145B2 (ja) * 2013-10-29 2018-02-28 浜松ホトニクス株式会社 表示装置
CN103592787B (zh) * 2013-11-13 2016-03-02 合肥京东方光电科技有限公司 亮度检测装置
CN107332948A (zh) * 2017-07-11 2017-11-07 广东欧珀移动通信有限公司 显示装置、终端设备及接近状态检测方法
CN109196524B (zh) * 2018-02-23 2020-05-05 深圳市汇顶科技股份有限公司 通过光学感测检测指纹的电子设备及其操作方法
CN108716950A (zh) * 2018-05-16 2018-10-30 北京小米移动软件有限公司 环境光亮度获取方法及装置
CN108735157B (zh) * 2018-06-12 2020-04-10 Oppo(重庆)智能科技有限公司 光线传感器处理方法、装置、存储介质及电子设备
CN108986724A (zh) * 2018-08-17 2018-12-11 矽力杰半导体技术(杭州)有限公司 环境光感测方法、感测系统及电子设备
CN109348123B (zh) * 2018-10-25 2021-05-21 努比亚技术有限公司 拍照方法、移动终端及计算机可读存储介质
CN110161749A (zh) * 2019-05-10 2019-08-23 武汉华星光电技术有限公司 应用于屏下摄像头的面板装置
CN210894768U (zh) * 2019-05-10 2020-06-30 武汉华星光电技术有限公司 显示装置
CN110956939B (zh) * 2019-11-27 2022-12-13 华为技术有限公司 调节屏幕亮度的方法及电子设备
CN111486950B (zh) * 2020-04-20 2022-04-19 Oppo广东移动通信有限公司 环境光检测方法、装置、电子设备及存储介质
CN112289280B (zh) * 2020-11-18 2022-03-22 深圳市锐尔觅移动通信有限公司 屏幕亮度调整方法及装置、计算机可读介质和电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102954836A (zh) * 2012-10-26 2013-03-06 京东方科技集团股份有限公司 环境光传感器、用户使用装置及显示装置
CN102938247A (zh) * 2012-11-29 2013-02-20 广东欧珀移动通信有限公司 一种亮度调整方法及装置
CN108540594A (zh) * 2018-02-05 2018-09-14 维沃移动通信有限公司 移动终端、外界环境光强度的确定方法及装置
CN111223432A (zh) * 2020-01-10 2020-06-02 北京小米移动软件有限公司 控制屏幕显示的方法及装置
CN113889053A (zh) * 2021-06-04 2022-01-04 荣耀终端有限公司 基于环境光传感器的屏幕亮度调整方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117857696A (zh) * 2024-02-07 2024-04-09 荣耀终端有限公司 环境光数据上报方法及电子设备

Also Published As

Publication number Publication date
CN113889053A (zh) 2022-01-04
CN113889053B (zh) 2022-07-22

Similar Documents

Publication Publication Date Title
WO2022252793A1 (zh) 基于环境光传感器的屏幕亮度调整方法
WO2022262530A1 (zh) 内存管理的方法及电子设备
CN113553130B (zh) 应用执行绘制操作的方法及电子设备
WO2022089208A1 (zh) 一种文件拖拽方法及电子设备
WO2023016012A9 (zh) 一种信息显示方法及电子设备
WO2023065916A1 (zh) 通知处理方法、芯片、电子设备及计算机可读存储介质
CN116048933A (zh) 一种流畅度检测方法
CN117079596B (zh) 屏幕亮度调节方法、终端设备及存储介质
US20240028175A1 (en) Window display method and related apparatus
CN116128571B (zh) 广告曝光量分析方法及相关装置
CN115145436A (zh) 一种图标处理方法及电子设备
WO2023005751A1 (zh) 渲染方法及电子设备
WO2023071929A1 (zh) 熄屏显示方法和终端设备
WO2023016014A1 (zh) 视频编辑方法和电子设备
WO2022089216A1 (zh) 一种界面显示的方法和电子设备
CN116257235A (zh) 绘制方法及电子设备
CN115994006A (zh) 动画效果显示方法及电子设备
WO2023051357A1 (zh) 一种虚拟设备运行方法
WO2024083014A1 (zh) 界面生成方法及电子设备
CN116185245B (zh) 一种页面显示方法及电子设备
WO2024082987A1 (zh) 界面生成方法及电子设备
WO2023051036A1 (zh) 加载着色器的方法和装置
CN116688494B (zh) 生成游戏预测帧的方法和电子设备
WO2022262291A1 (zh) 应用的图像数据调用方法、系统、电子设备及存储介质
CN117097883B (zh) 一种丢帧故障原因确定方法、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22814840

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE