Display brightness adjustment method and device

By using the light information of the image acquisition module and the ambient light acquisition module respectively in the terminal device to adjust the brightness when the light supplement module is turned on and off, the problem of inaccurate display brightness adjustment in the existing technology is solved and the accuracy of the brightness adjustment is improved. sex and user experience.

CN118135928BActive Publication Date: 2024-09-17HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410545049.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2024-09-17
Estimated Expiration
2044-05-06

AI Technical Summary

Technical Problem

In the existing technology, the display brightness adjustment of the terminal device is not accurate enough, especially when the light supplement module is turned on, the light intensity data collected by the ambient light collection module is greatly affected, resulting in inaccurate brightness adjustment.

Method used

When the fill light module is turned on, the image brightness information collected by the image acquisition module is used for brightness adjustment, and when it is turned off, the light intensity information collected by the ambient light acquisition module is used for adjustment, thereby reducing state misjudgments and improving the accuracy of brightness adjustment.

Benefits of technology

Through this method, the corresponding light information can be used when turning on and off the fill light module, improving the accuracy of display brightness adjustment, improving user experience, and reducing the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118135928B
    Figure CN118135928B
Patent Text Reader

Abstract

The embodiment of the present application provides a display brightness adjustment method and device, which relates to the field of terminal technology. The method includes: when the state of the fill light module is turned on, the target brightness information is obtained by using the brightness information of the image collected by the image acquisition module, and when the state of the fill light module is turned off, the target brightness information is obtained by using the first light intensity information collected by the ambient light acquisition module, so that when the fill light is turned off, the display brightness of the electronic device can be adjusted by using the ambient light acquisition module that is not affected by the fill light module, and when the fill light is turned on, the target brightness information can be obtained by using the brightness information of the image that is less affected by the fill light module or not affected by the fill light module, so that the accuracy of the target brightness information can be improved, and then the adjustment accuracy of the display brightness of the electronic device can be improved, and the user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a display brightness adjustment method and device. Background Art

[0002] With the development of terminal technology, the functions of terminals are becoming more and more abundant, such as the function of adjusting display brightness.

[0003] In the related art, a terminal is provided with a sensor for collecting ambient light, and the terminal can adjust the display brightness of the terminal by using the light intensity data collected by the sensor.

[0004] However, the adjustment of display brightness in the related art is not accurate enough. Summary of the invention

[0005] The embodiments of the present application provide a display brightness adjustment method and device, which are applied in the field of terminal technology and can improve the accuracy of display brightness adjustment of electronic devices.

[0006] In a first aspect, an embodiment of the present application provides a display brightness adjustment method, which is applied to an electronic device, wherein the electronic device includes a fill light module, an ambient light acquisition module, and an image acquisition module, and the method includes:

[0007] When the fill light module is turned on, the target brightness information is obtained by using the brightness information of the image collected by the image collection module, and the target brightness information is used to indicate the adjustment of the display brightness of the electronic device. When the fill light module is turned off, the target brightness information is obtained by using the first light intensity information collected by the ambient light collection module.

[0008] Among them, the fill light module may refer to a module for fill light. The fill light module is generally turned on when the environment is dark, so as to improve the brightness of the image collected by the image acquisition module. Optionally, the fill light module of the embodiment of the present application may include a soft light or an array formed by multiple soft light. The fill light module of the embodiment of the present application may be one or more, and the multiple fill light modules may include a first fill light module and a second fill light module. The ambient light acquisition module may refer to a module for collecting the light intensity of ambient light. The ambient light acquisition module may include an ambient light sensor or an array formed by multiple ambient light sensors. The ambient light acquisition module of the embodiment of the present application may be one or more, and the multiple ambient light acquisition modules may include a first ambient light acquisition module and a second ambient light acquisition module. The image acquisition module may refer to a module for collecting images. Optionally, the image acquisition module of the embodiment of the present application may include a camera or an array formed by cameras. The image acquisition module of the embodiment of the present application may include a first image acquisition module and a second image acquisition module. The first light intensity information may be light intensity data collected by the ambient light acquisition module. Among them, the first light intensity information can refer to the description of the physical ambient light data of the embodiment of the present application, which is not repeated here.

[0009] In the embodiment of the present application, when the fill light module is on, the target brightness information is obtained by using the brightness information of the image collected by the image collection module, and when the fill light module is off, the target brightness information is obtained by using the first light intensity information collected by the ambient light collection module. In this way, when the fill light is off, the display brightness of the electronic device can be adjusted by using the ambient light collection module which is not affected by the fill light module, and when the fill light is on, the target brightness information can be obtained by using the brightness information of the image which is less affected by the fill light module or not affected by the fill light module. In this way, the accuracy of the target brightness information can be improved, and then the adjustment accuracy of the display brightness of the electronic device can be improved, thereby improving the user experience.

[0010] Optionally, the first fill light module and the second fill light module may be arranged on opposite sides. The first ambient light acquisition module and the second ambient light acquisition module may be arranged on opposite sides. The first image acquisition module and the second image acquisition module may be arranged on opposite sides. Optionally, the first fill light module, the first ambient light acquisition module and the first image acquisition module are arranged on the same side, and the second fill light module, the second ambient light acquisition module and the second image acquisition module are arranged on the same side.

[0011] In a possible implementation, the method further includes:

[0012] The state information of the fill light module is obtained, where the state information includes first state information or second state information, where the first state information indicates that the state of the fill light module is on, and the second state information indicates that the state of the fill light module is off.

[0013] When the fill light module is in the on state, the target brightness information is obtained by using the brightness information of the image collected by the image collection module, including: when the state information is the first state information, the target brightness information is obtained by using the brightness information of the image collected by the image collection module.

[0014] When the fill light module is in off state, the target brightness information is obtained using the first light intensity information collected by the ambient light collection module, including: when the state information is the second state information, the target brightness information is obtained using the first light intensity information collected by the ambient light collection module.

[0015] In the embodiment of the present application, when the state information is the first state information, it can be known that the state of the fill light module is on, and the target brightness information is obtained by using the brightness information of the image collected by the image acquisition module. When the state information is the second state information, it can be known that the state of the fill light module is off, and the target brightness information is obtained by using the first light intensity information collected by the ambient light acquisition module, which can reduce the situation of misjudgment of the state of the fill light module caused by the loss of state information during transmission, thereby improving the accuracy of judging the state of the fill light module, and further improving the accuracy of display brightness adjustment.

[0016] In a possible implementation, the method further includes:

[0017] The method comprises: displaying a first interface, displaying a second interface in response to a first operation of a camera application on the first interface, turning on a fill light module in response to a second operation of a first control on the second interface, and obtaining status information of the fill light module, including: recording the status information of the fill light module as first status information.

[0018] In this implementation, it corresponds to the situation where the fill light module is turned on in the photo-taking scene.

[0019] The first interface may be an interface for opening a camera application. The first operation may be an operation for triggering the opening of a camera application. The second interface may be an interface for turning on or off a fill light module. The first control may be a control for triggering the filling light module to be turned on or off. The second operation may be an operation for triggering the filling light module to be turned on, that is, an operation for controlling the filling light module to be switched from an off state to an on state.

[0020] Exemplarily, the first interface may be, for example, Figure 1 The second interface can be, for example, Figure 1 In the interface 20 or the interface 30 shown, the first control may be, for example, Figure 1 The first operation may be, for example, a user operation acting on a camera application, and the second operation may be, for example, a user operation acting on the “soft light switch button”.

[0021] It should be noted that if the fill light module includes a rear soft light, and the ambient light collection module includes a rear ambient light sensor arranged on the same side of the rear soft light, the second interface can be interface 20; if the fill light module includes a front soft light, and the ambient light collection module includes a front ambient light sensor arranged on the same side of the front soft light.

[0022] The embodiment of the present application turns on the fill light module in response to the second operation on the first control of the second interface, and records the status information of the fill light module as the first status information. That is, the acquisition of the first status information is generated based on the user's operation. In this way, the first status information can be recorded more accurately, which can improve the accuracy of controlling the turning on of the soft light and improve the triggering accuracy of obtaining the target brightness information using the brightness of the image.

[0023] In a possible implementation, after the fill light module is turned on in response to the second operation on the first control of the second interface, the method further includes: turning off the fill light module in response to the third operation on the first control. Obtaining the state information of the fill light module includes: recording the state information of the fill light module as the second state information.

[0024] In one implementation of the present invention, the fill light module is turned off in the corresponding photo-taking scene.

[0025] The third operation may be an operation of turning off the fill light module, that is, an operation of controlling the fill light module to switch from an on state to an off state.

[0026] Exemplarily, the third operation may be, for example, a user operation acting on a “soft light switch button”.

[0027] The embodiment of the present application turns on the fill light module in response to the second operation on the first control of the second interface, and then turns off the fill light module in response to the third operation on the first control, and records the status information of the fill light module as the second status information. That is, the acquisition of the first status information is generated based on the user's operation, so that the second status information can be recorded more accurately.

[0028] In a possible implementation, the electronic device further includes a kernel layer, an application layer, and a hardware abstraction layer HAL, and obtains the status information of the fill light module, including:

[0029] The kernel layer obtains the status information of the fill light module and transmits the status information to the hardware abstraction layer HAL.

[0030] When the fill light module is turned on, the target brightness information is obtained by using the brightness information of the image collected by the image collection module, including:

[0031] The image acquisition module transmits the acquired image to the hardware abstraction layer HAL. The hardware abstraction layer HAL obtains the brightness information of the image and obtains the second light intensity information using the brightness information of the image. When the state information is the first state information, the hardware abstraction layer HAL transmits the second light intensity information to the application layer. The application layer obtains the target brightness information using the second light intensity information.

[0032] In the embodiment of the present application, the image acquisition module transmits the acquired image to the hardware abstraction layer HAL. The hardware abstraction layer HAL obtains the brightness information of the image and obtains the second light intensity information using the brightness information of the image. When the state information of the hardware abstraction layer HAL is the first state information, the second light intensity information is transmitted to the application layer. The application layer obtains the target brightness information using the second light intensity information, that is, the processing flow of obtaining the target brightness information using the brightness information of the image is split into different layers, which can improve the efficiency of obtaining the target brightness information and thus improve the accuracy of display brightness adjustment.

[0033] In a possible implementation, the hardware abstraction layer HAL includes an algorithm module and a first HAL module, and the hardware abstraction layer HAL obtains brightness information of an image and obtains second light intensity information using the brightness information of the image, including:

[0034] The algorithm module obtains the brightness information of the image, and obtains the second light intensity information using the brightness information of the image. The algorithm module transmits the second light intensity information to the first HAL module. When the state information of the hardware abstraction layer HAL is the first state information, the second light intensity information is transmitted to the application layer, including: when the state information of the first HAL module is the first state information, the second light intensity information is transmitted to the application layer.

[0035] In an embodiment of the present application, the brightness information of the image is obtained through the algorithm module, and the second light intensity information is obtained by using the brightness information of the image. Moreover, the second light intensity information is transmitted to the application layer through the first HAL module when the state information is the first state information. In this way, different modules can be used for processing in the hardware abstraction layer HAL, which can improve the efficiency of transmitting the second light intensity information to the application layer, thereby improving the timeliness of display brightness adjustment.

[0036] In a possible implementation, the kernel layer includes a target driver, and the algorithm module obtains brightness information of the image and obtains the second light intensity information using the brightness information of the image, including:

[0037] When the state information is the first state information, the target driver instructs the algorithm module to obtain the brightness information of the image, and obtains the second light intensity information using the brightness information of the image.

[0038] In an embodiment of the present application, through target driving, when the state information is the first state information, the algorithm module is instructed to obtain the brightness information of the image, that is, the algorithm module obtains the second light intensity information only when the instruction is received, and when no instruction is received, the processing of obtaining the second light intensity information using the brightness information of the image may not be performed. In this way, the computing power resources of the electronic device can be saved.

[0039] In a possible implementation, the hardware abstraction layer HAL includes a second HAL module, and the kernel layer obtains the status information of the fill light module, including:

[0040] The application layer transmits status information to the kernel layer through the second HAL module.

[0041] In the embodiment of the present application, the first HAL module and the second HAL module may be different modules. If the second HAL module and the first HAL module may be different HAL modules, that is, the HAL module that transmits the status information to the kernel layer and the HAL module that transmits the first light intensity information / the second light intensity information to the application layer are different modules, in this way, the fill light module can be controlled more smoothly and the display brightness can be adjusted, thereby improving the control of the application program on / off of the fill light module and improving the fluency and timeliness of the application program layer on the display brightness adjustment.

[0042] In a possible implementation, when the fill light module is in a turned-off state, obtaining target brightness information using first light intensity information collected by the ambient light collection module includes:

[0043] The ambient light acquisition module transmits the collected first light intensity information to the hardware abstraction layer HAL. When the state information is the second state information, the hardware abstraction layer HAL transmits the first light intensity information to the application layer. The application layer obtains the target brightness information using the first light intensity information.

[0044] In the embodiment of the present application, the first light intensity information collected is transmitted to the hardware abstraction layer HAL by the ambient light collection module. When the state information is the second state information, the hardware abstraction layer HAL transmits the first light intensity information to the application layer. The application layer obtains the target brightness information using the first light intensity information, that is, the processing flow of obtaining the target brightness information using the first light intensity information is split in different layers, which can improve the efficiency of obtaining the target brightness information, thereby improving the accuracy of display brightness adjustment.

[0045] In a possible implementation, when the state information is the second state information, the hardware abstraction layer HAL transmits the first light intensity information to the application layer, including:

[0046] When the state information is the second state information, the first HAL module transmits the first light intensity information to the application layer.

[0047] In an embodiment of the present application, the first HAL module is used to transmit the first light intensity information to the application layer when the status information is the second status information. That is to say, the same HAL module is used to transmit the second light intensity information to the application layer when the status information is the first status information, or to transmit the first light intensity information to the application layer when the status information is the second status information. In this way, the accuracy of transmitting the first light intensity information or the second light intensity information to the application layer can be improved, and the risk of abnormal light intensity information transmission caused by transmission from different modules can be reduced.

[0048] In one possible implementation, the fill light module and the ambient light collection module are arranged on the same side of the electronic device, a first distance between the fill light module and the ambient light collection module is less than a first threshold, a second distance between the fill light module and the image collection module is greater than a second threshold and / or the first distance is less than the second distance, and the first threshold is less than or equal to the second threshold.

[0049] In an embodiment of the present application, if the fill light module and the ambient light collection module are arranged on the same side of the electronic device, the accuracy of the light intensity data collected by the ambient light collection module is greatly affected by the turned-on fill light module, and therefore it is necessary to adopt the display brightness adjustment method of the embodiment of the present application.

[0050] In an embodiment of the present application, if the first distance between the fill light module and the ambient light collection module is less than the first threshold, the accuracy of the light intensity data collected by the ambient light collection module is greatly affected by the turned-on fill light module, and therefore it is necessary to adopt the display brightness adjustment method of the embodiment of the present application.

[0051] In the embodiment of the present application, if the second distance between the fill light module and the image acquisition module is greater than the second threshold, the brightness of the image acquired by the image acquisition module is less affected by the turned-on fill light module, and therefore the display brightness adjustment method of the embodiment of the present application can be adopted.

[0052] In the embodiment of the present application, the first distance is smaller than the second distance, that is, the distance between the fill light module and the ambient light collection module is smaller than the distance between the fill light module and the image collection module. The brightness of the image collected by the image collection module is affected by the turned-on fill light module, which is smaller than the ambient light collection module is affected by the turned-on fill light module. Therefore, the display brightness method of the embodiment of the present application can be adopted.

[0053] In a possible implementation, obtaining target brightness information using brightness information of an image acquired by an image acquisition module includes:

[0054] When the state of the fill light module is switched from off to on, the display brightness of the electronic device is kept unchanged.

[0055] While keeping the display brightness of the electronic device unchanged, if the first condition is met, the target brightness information is obtained by using the brightness information of the image captured by the image acquisition module. The first condition includes that the duration of the fill light module being turned on exceeds the third threshold, the moving distance of the electronic device exceeds the fourth threshold, the brightness of the image captured by the image acquisition module is lower than the fifth threshold, the brightness of the image captured by the image acquisition module is higher than the sixth threshold and / or the brightness difference between the first image and the second image captured by the image acquisition module exceeds the seventh threshold.

[0056] In the embodiment of the present application, if the state of the fill light module is switched from off to on, the possibility of sudden changes in the environment of the electronic device is relatively small, so the display brightness of the electronic device can be kept unchanged, so that the user experience caused by sudden changes in display brightness can be reduced. In addition, if the first condition is met, the brightness information of the image collected by the image acquisition module can be used to obtain the target brightness information. In this way, the brightness information of the image collected by the image acquisition module can be used to obtain the target brightness information when needed, which can save computing resources.

[0057] In a possible implementation, obtaining target brightness information using brightness information of an image acquired by an image acquisition module includes:

[0058] The second light intensity information is obtained by using the brightness information of the image collected by the image collection module, the second light intensity information indicates the intensity of the ambient light, and the brightness of the image collected by the image collection module is positively correlated with the intensity of the ambient light. The target brightness information is obtained by using the second light intensity information.

[0059] In an embodiment of the present application, the brightness information of the image captured by the image acquisition module can be used to obtain the second light intensity information, and then the target brightness information can be obtained using the second light intensity information. In this way, the algorithm and code for obtaining the target brightness information using the light intensity information can be reused, that is, whether it is the first light intensity information or the second light intensity information, the algorithm and code for obtaining the target brightness information using the light intensity information can be reused, thereby reducing the number of codes required to implement the present solution and reducing the storage space requirements for storing the codes, and reducing the complexity of display brightness adjustment.

[0060] In a possible implementation, the method further includes:

[0061] When the fill light module is turned on, if the light intensity indicated by the second light intensity information is greater than the eighth threshold, the fill light module is turned off.

[0062] In the embodiment of the present application, if the light intensity indicated by the second light intensity information is greater than the eighth threshold, it means that the electronic device is in a brighter environment at this time, so the fill light module can be turned off to reduce the power consumption of the electronic device.

[0063] In a possible implementation, obtaining the second light intensity information using brightness information of an image acquired by an image acquisition module includes:

[0064] The exposure is obtained by using the brightness information of the image collected by the image collection module, and the exposure is negatively correlated with the brightness of the image; the second light intensity information is obtained by using the exposure, and the exposure is negatively correlated with the intensity of the ambient light.

[0065] Among them, the exposure, also known as the exposure value (EV), is a parameter that describes the total amount of light received by the photosensitive element in front of the camera lens. The exposure is the combined effect of the three key parameters of aperture size, shutter speed and sensitivity. The larger the aperture, the more light enters; the slower the shutter speed, the longer the light shines on the photosensitive element; the higher the sensitivity, the higher the sensitivity of the photosensitive element to light. These factors together determine the total amount of light received by the camera, that is, the exposure. Generally speaking, the darker the brightness of the captured image, the greater the exposure, thereby increasing the brightness of the next frame of the captured image; the brighter the image, the smaller the exposure, thereby increasing the overexposure of the next frame of the captured image. The greater the exposure, the darker the brightness of the image, and the smaller the intensity of the ambient light at this time; the smaller the exposure, the brighter the image, and the greater the intensity of the ambient light at this time. Negative correlation means that the two variables change in opposite directions. When one variable changes from large to small or from small to large, the other variable changes from small to large or from large to small. Positive correlation means that when one variable increases, the other variable also increases.

[0066] In an embodiment of the present application, the exposure amount is obtained by utilizing the brightness information of the image captured by the image acquisition module, and the second light intensity information is obtained by utilizing the exposure amount. Generally, when shooting, it is necessary to obtain the exposure amount by utilizing the brightness information of the image captured by the image acquisition module. In this way, the second light intensity information can be obtained by utilizing the intermediate parameters obtained during shooting, thereby reducing the computing power resources required for data processing.

[0067] In a possible implementation manner, the light intensity indicated by the second light intensity information is in a logarithmic relationship with the exposure.

[0068] Among them, the logarithmic relationship is a relationship in mathematics. If a x=N(a>0, and a≠1), then x is called the logarithm of N with a as the base, recorded as x=logaN, where a is called the base of the logarithm, and N is called a real number. In the embodiment of the present application, the light intensity indicated by the second light intensity information is in a logarithmic relationship with the exposure, and can be expressed as the logarithm of the light intensity indicated by the second light intensity information with a as the base of the exposure.

[0069] It has been found through research that the light intensity indicated by the second light intensity information is in a logarithmic relationship with the exposure amount, thus, the accuracy of obtaining the second light intensity information using the exposure amount can be improved.

[0070] In a possible implementation, the light intensity indicated by the second light intensity information and the exposure amount satisfy the following relationship:

[0071] .

[0072] Wherein, lux represents the light intensity indicated by the second light intensity information, a represents the exposure, and X, Y and b are constants.

[0073] In the embodiment of the present application, X and b can be understood as correction parameters. It should be understood that at least one of X and b may not be required to participate in the calculation of the second light intensity information.

[0074] In the embodiment of the present application, the second light intensity information is corrected by setting X and b, which can further improve the accuracy of obtaining the second light intensity information using the exposure amount.

[0075] In a second aspect, an embodiment of the present application provides a display brightness adjustment device, which may be an electronic device, or a chip or chip system in an electronic device. The display brightness adjustment device may include a display unit and a processing unit. When the display brightness adjustment device is an electronic device, the display unit may be a display screen. The display unit is used to perform the display step so that the electronic device implements a display brightness adjustment method described in the first aspect or any possible implementation of the first aspect. When the display brightness adjustment device is an electronic device, the processing unit may be a processor. The display brightness adjustment device may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit so that the electronic device implements a display brightness adjustment method described in the first aspect or any possible implementation of the first aspect. When the display brightness adjustment device is a chip or chip system in an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit so that the electronic device implements a display brightness adjustment method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, a cache, etc.), or a storage unit within the electronic device that is located outside the chip (e.g., a read-only memory, a random access memory, etc.). In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, the memory being used to store code instructions, and the processor being used to execute the code instructions to execute the method described in the first aspect or any possible implementation of the first aspect.

[0076] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0077] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program runs on a computer, the computer executes the method described in the first aspect or any possible implementation manner of the first aspect.

[0078] In a sixth aspect, the present application provides a chip or a chip system, the chip or chip system comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, a pin or a circuit, etc.

[0079] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside the chip, such as a register, a cache, etc., or a storage unit of the chip (such as a read-only memory, a random access memory, etc.).

[0080] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 A schematic diagram of a photo-taking scene provided in an embodiment of the present application;

[0082] Figure 2 A schematic diagram of a hardware framework of an electronic device provided in an embodiment of the present application;

[0083] Figure 3 A schematic diagram of a software framework of an electronic device provided in an embodiment of the present application;

[0084] Figure 4 A schematic diagram of a flow chart of a display brightness adjustment method provided in an embodiment of the present application;

[0085] Figure 5 A timing diagram of a display brightness adjustment method provided in an embodiment of the present application;

[0086] Figure 6 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0087] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0088] 1. Auto exposure (AE): AE is one of the 3A algorithms (AE, auto focus and auto white balance). It is a mechanism for the camera to automatically adjust the exposure and gain according to the strength of the external light to prevent overexposure or underexposure. AE is also an important module in the entire debugging module and is often associated with other modules. A well-debugged module must be based on a better auto exposure. There has always been a misunderstanding that AE controls brightness. This is actually an imprecise statement. The factors affecting auto exposure are mainly sensitivity (international standards organization, ISO), aperture size, and exposure time. The final result is only reflected in the brightness level. There are other factors that also affect the brightness, such as global mapping, high dynamic range (HDR) rendering of each frame, etc. The input of AE is the brightness value of the image taken by the electronic device, and the output is the exposure time and gain of the camera sensor.

[0089] 2. Automatic adjustment of display brightness: Electronic devices are equipped with ambient light sensors. The information collected by the ambient light sensor is mainly about the light intensity of the surrounding environment. The information collected by the ambient light sensor will be transmitted to the processing chip of the electronic device, and the processing chip will automatically adjust the backlight brightness of the display screen of the electronic device based on this information. For example, when the ambient light is dim, the electronic device will automatically reduce the display brightness to reduce eye stimulation and save power; when the ambient light is bright, the electronic device will increase the display brightness to ensure that the user can clearly see the screen content. Ambient light sensors generally use components such as photoresistors or photodiodes to sense and measure the surrounding light conditions. A photodiode is a diode with semiconductor characteristics. When light shines on a photodiode, the semiconductor material in it will generate a photocurrent. The strength of the photocurrent is proportional to the light intensity. Therefore, by measuring the photocurrent of the photodiode, the light intensity information of the surrounding environment can be obtained.

[0090] 3. Other terms

[0091] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0092] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0093] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0094] 4. Electronic equipment

[0095] The electronic device of the embodiment of the present application may include a handheld device with a shooting function, a vehicle-mounted device, etc. For example, some electronic devices are: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (public landmobile networks). The embodiments of the present application do not limit this.

[0096] As an example but not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.

[0097] In addition, in the embodiments of the present application, the electronic device may also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.

[0098] The electronic device in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0099] In an embodiment of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0100] The following is an example of the scenario of the embodiment of the present application.

[0101] In some exemplary cases, such as Figure 1 As shown in (a) in the figure, the electronic device displays an interface 10 (also called the main interface). The interface 10 may include a page on which application icons are placed, and the page may include multiple application icons (for example, a camera application, a weather application icon, a calendar application icon, an album application icon, a note application icon, an email application icon, an application store application icon, a setting application icon, etc.). A page indicator may also be displayed below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages. There are multiple application icons below the page indicator (for example, a camera application icon 101, a browser application icon, a message application icon, and a dial application icon). These application icons remain displayed when the page is switched.

[0102] It can be understood that the camera application icon 101 is an icon of a camera application (ie, a camera application). The camera application icon 101 can be used to trigger the start of the camera application.

[0103] In the embodiment of the present application, the electronic device may detect a user operation on the camera application icon 101, and in response to the operation, the electronic device may display a Figure 1 The interface 20 (also called the initial shooting preview interface) shown in (b) of FIG. 2 can display the image captured by the rear camera of the electronic device.

[0104] It is understandable that the user operations mentioned in this application may include but are not limited to touch (for example, click, etc.), voice control, gestures and other operations, and this application does not impose any restrictions on this.

[0105] like Figure 1 As shown in (b) of FIG. 1 , the interface 20 is a default shooting mode shooting interface of the camera application, on which the user can preview the image and complete the shooting. The interface 20 may include a soft light switch button 201, camera mode options, album shortcut buttons, a shutter button (also called a shooting button), and a camera flip button 202.

[0106] Among them, the soft light switch button 201 can be used to control the front soft light 50 on the electronic device to turn on and off. Optionally, the initial state of the front soft light 50 is off, and the soft light switch button 201 is in an unselected state. That is, when entering the interface 20 from the interface 10, the soft light switch button 201 is in an unselected state, and the front soft light 50 is also in an off state. The camera flip button 202 can control the switching between cameras for capturing images, such as controlling the switching between the front camera 40 and the rear camera (also known as the main camera). Optionally, when the front soft light 50 is in the on state, it can be always on, or it can be lit when taking pictures, which is not limited here.

[0107] Then, the electronic device may detect a user operation on the camera flip button 202, and in response to the operation, the electronic device may display a Figure 1 The interface 30 shown in (c) in FIG. 30 may display an image captured by a front camera 40 of the electronic device.

[0108] Then, if Figure 1 As shown in (d), the electronic device can detect a user operation on the soft light switch button 201. In response to the user operation, the electronic device can control the front soft light 50 to turn on, and at this time the soft light switch button 201 is in a selected state (also called a selected state).

[0109] Since the front soft light 50 is turned on, the turned-on front soft light 50 will leak light to the ambient light collection module 60 of the electronic device. In the related art, the electronic device generally uses the light intensity (lux) information collected by the ambient light collection module 60 to adjust the display brightness of the electronic device. However, since the front soft light 50 leaks light to the ambient light collection module 60 of the electronic device, this will cause the light intensity data (also known as physical ambient light data) collected by the ambient light collection module 60 to be greater than the actual ambient light intensity. In this way, since the light intensity data collected by the ambient light collection module 60 is inaccurate, the display brightness adjustment of the electronic device will be inaccurate. Especially in dark scenes, when the front soft light 50 is turned on, the light intensity collected by the ambient light collection module 60 is much greater than the actual ambient light intensity. In this way, the display brightness adjustment may be much greater than the normal display brightness, which will make the user feel very uncomfortable.

[0110] In view of this, an embodiment of the present application proposes a display brightness adjustment method and device, which can adjust the display brightness by using the brightness of the image captured by the camera of the electronic device when the soft light is turned on, or adjust the display brightness of the electronic device by using the light intensity data (also called first light intensity information) collected by the ambient light sensor when the soft light is turned off.

[0111] In order to better understand the embodiments of the present application, the structure of the electronic device in the embodiments of the present application is introduced below:

[0112] Figure 2 A schematic diagram of the hardware structure of the electronic device 100 is shown.

[0113] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a subscriber identification module (SIM) card interface 195, a fill light module 196, and a sensor hub 197, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0114] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0115] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0116] In the embodiment of the present application, the fill light module 196 can perform fill light, so that the brightness of the image collected by the electronic device 100 is higher. When the fill light module 196 is turned on, the brightness of the image collected by the camera 193 can be used to adjust the display brightness of the display screen 194; when the fill light module 196 is turned off, the light intensity data collected by the ambient light sensor 180L can be used to adjust the display brightness of the display screen 194. In another possible implementation, the fill light module 196 can be integrated in the camera 193.

[0117] Figure 3 Schematic diagram of the software structure of the electronic device 100 is shown. The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0118] Figure 3 1 is a software structure diagram of the electronic device 100 of an embodiment of the present invention. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into multiple layers, from top to bottom, respectively, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.

[0119] The application layer can include a series of application packages.

[0120] like Figure 3 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, dimming, etc.

[0121] The application framework layer (framework, FWK) provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. The application framework layer can include camera FWK, sensor FWK, etc.

[0122] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0123] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0124] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0125] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application 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.

[0126] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0127] The hardware abstraction layer is an interface layer located between the operating system kernel and the upper software, and its purpose is to abstract the hardware. The hardware abstraction layer is an abstract interface driven by the device kernel, which is used to provide an application programming interface for accessing the underlying device to a higher-level Java API framework. HAL includes multiple library modules, at least one of the camera HAL, sensor HAL, camera algorithm library or display screen HAL. Data / information can be transmitted between the sensor HAL and the sensor control center. The camera algorithm library can include an AE algorithm module (referred to as AE module). The AE algorithm module can automatically adjust the exposure according to the intensity of the external light, and can use the brightness information of the image to estimate the intensity of the ambient light to obtain AE data. Optionally, the AE algorithm module includes an algorithm 1 submodule and an algorithm 2 submodule, and the algorithm 1 submodule can automatically adjust the exposure according to the intensity of the external light or according to the brightness of the collected image, and the algorithm 2 submodule can use the brightness information of the image to estimate the intensity of the ambient light to obtain AE data. Optionally, another algorithm module independent of the AE algorithm module can also be set to use the brightness information of the image to estimate the intensity of the ambient light.

[0128] Each library module implements an interface for a specific type of hardware component. It can be understood that the camera HAL can provide the camera FWK with an interface to access hardware components such as the camera. The sensor HAL can provide the sensor FWK with an interface to access hardware components such as the front soft light and an interface to transmit information from the kernel layer to the application layer. When the system framework layer API requires access to the hardware of the portable device, the Android operating system will load the library module for the hardware component.

[0129] The kernel layer is the layer between hardware and software. The kernel layer includes at least a camera driver, a sensor driver, a display driver, and an audio driver. For example, the camera is controlled by the camera driver to collect image data. Optionally, the camera driver may include a front camera driver and a rear camera driver, the front camera driver may control the front camera to collect image data, and the rear camera driver may control the rear camera to collect image data. The sensor driver may drive the ambient light sensor to collect the light intensity information of the ambient light and / or drive the front soft light to turn on or off. In an embodiment of the present application, the sensor driver may obtain the status information of the front soft light, thereby identifying whether the front soft light is in an on or off state.

[0130] Optionally, the status information of the front soft light and the AE data obtained by the AE algorithm module can be transmitted to the sensor HAL through the input subsystem. Among them, the input system is the core component responsible for processing user input operations. Its main function is to obtain raw input events (such as keys, touches, slides, etc.) from various input devices (such as screens, keyboards, mice, etc.) and convert these events into objects that can be understood and consumed by applications. The input system is crucial to providing a smooth, sensitive and consistent user interaction experience. It needs to ensure the correctness, timeliness and security of input events in different devices, scenarios and applications.

[0131] Combine the following Figure 3 and Figure 4 The workflow of electronic device software is illustrated by way of example.

[0132] First, if Figure 4 As shown, in general, the front camera is turned on, and then it can be determined whether the state of the soft light has changed. If it is determined that the state of the front soft light is on, the camera HAL transmits the first state information to the sensor HAL through the input subsystem, and the soft light is turned on and AE works to obtain AE data. AE transmits AE data to the sensor HAL through the input subsystem. The sensor HAL can know that the state of the soft light is on based on the first state information, and then transmits AE data to the application layer, and then the upper layer dimming can be performed, for example, dimming is performed by using AE data through the application layer. If it is determined that the state of the front soft light is off, the camera HAL transmits the second state information to the sensor HAL through the input subsystem, then AE stops working, and the soft light is turned off. Based on the second state information, the sensor HAL can know that the state of the soft light is off, and then transmits light intensity data to the application layer, for example, dimming is performed by using light intensity data through the application layer.

[0133] Then, combine Figure 3The software framework of the application program is described as follows. When the touch sensor in the terminal device receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into raw input events (including touch coordinates, touch strength, timestamp of the touch operation, etc.). The raw input events are stored in the kernel layer. The application framework layer obtains the raw input events from the kernel layer and identifies the button corresponding to the input event.

[0134] Exemplarily, when the touch sensor in the terminal device receives a touch operation acting on the camera application, the camera application sequentially calls the rear camera through the camera FWK, the camera HAL, and the rear camera driver to collect image data. Then, when the touch sensor receives a touch operation acting on the camera flip button, the camera application sequentially calls the front camera through the camera FWK, the camera HAL, and the front camera driver to collect image data (also called turning on the front camera). Then, when the touch sensor receives a touch operation acting on the "soft light switch button" (also called judging that the state of the front soft light is turned on), the camera application sequentially transmits the first state information (referred to as state 1) to the sensor driver through the camera FWK and the camera HAL. After the sensor driver obtains the first state information, it can control the front soft light to turn on, and transmit the first state information to the sensor HAL (also called the camera HAL transmitting the first state information to the sensor HAL through the input subsystem). If the touch sensor receives the "soft light switch button" again (also known as determining that the state of the front soft light is off), the camera application transmits the second state information (referred to as state 2) to the sensor driver through the camera FWK and the camera HAL in turn. After the sensor driver obtains the second state information, it can control the front soft light to turn off and transmit the second state information to the sensor HAL (also known as the camera HAL transmitting the second state information to the sensor HAL through the input subsystem).

[0135] After the sensor driver obtains the first state information, it can instruct the AE algorithm module to work, thereby obtaining AE data using the brightness of the image captured by the front camera, and transmitting the AE data to the sensor HAL (also known as transmitting AE data to the sensor HAL through the input system). When the sensor driver obtains the second state information, it may not send a work instruction to the AE algorithm module. If the AE algorithm module does not obtain a work instruction from the sensor driver, the AE algorithm module stops working.

[0136] The ambient light sensor continuously transmits the collected light intensity data to the sensor HAL through the sensor control center. If the sensor HAL determines that the state of the front soft light is on based on the most recently acquired state information, it transmits AE data to the dimming application, and the dimming application can adjust the display brightness according to the AE data (also called upper dimming); if the state of the front soft light is off, it transmits the light intensity data collected by the ambient light sensor to the dimming application, and the dimming application can adjust the display brightness according to the collected light intensity data (also called upper dimming). At this point, one dimming session ends.

[0137] Combine the following Figure 5 The timing of the display brightness adjustment method is described.

[0138] Figure 5 A timing diagram of a display brightness adjustment method provided in an embodiment of the present application, such as Figure 5 The timing shown may include:

[0139] S502: The camera application receives an operation to open the front camera.

[0140] In the embodiment of the present application, the operation of opening the front camera may be, for example, as follows: Figure 1 As shown, when the image captured by the rear camera is displayed, the user operation acting on the camera flip button 202 is received. Optionally, if the image captured by the front camera is displayed by default when the camera application is opened, that is, the front camera is opened by default when the camera application is opened, the operation of opening the front camera can be as follows: Figure 1 User operations acting on the camera application icon 101 are shown.

[0141] S504: The camera application transmits a front camera opening instruction to the camera HAL through the camera FWK.

[0142] The front camera opening instruction may be an instruction to open the front camera.

[0143] S506 , the camera HAL transmits a front camera opening instruction to the front camera driver through input and output control (ioctl).

[0144] Among them, ioctl is a function in the device driver that manages the input and output (I / O) channels of the device. The so-called management of the I / O channel is to control some characteristics of the device, such as the transmission baud rate of the serial port, etc. In the embodiment, ioctrl is used to transmit a front camera opening instruction to the front camera driver, so that the front camera driver responds to the front camera opening instruction and controls the front camera to open.

[0145] S508: The front camera driver controls the front camera to turn on.

[0146] S510: The camera application receives an operation to turn on the front soft light.

[0147] The operation of turning on the front soft light can be, for example, as follows: Figure 1 The user operation shown acts on the front soft light switch button 201. It should be understood that the camera application may refer to an application for controlling the camera to turn on and displaying images collected by the camera, but does not specifically refer to a certain application.

[0148] S512: The camera application transmits first status information to the camera HAL through the camera FWK.

[0149] The first status information is used to indicate the status of the front soft light. In the embodiment of the present application, the first status information is used to indicate that the status of the front soft light is turned on.

[0150] S514: The camera HAL transmits the first status information to the sensor driver through ioctl.

[0151] S516, the sensor drives and controls the front soft light to turn on.

[0152] In the embodiment of the present application, if the sensor driver obtains the first state information, it can be known that the front soft light needs to be turned on, so the sensor driver controls the front soft light to be turned on.

[0153] S518 , the sensor drives the AE algorithm module to work and obtain AE data.

[0154] Among them, the AE algorithm module may include one or more algorithm submodules, for example, an algorithm 1 submodule and an algorithm 2 submodule. In the embodiment of the present application, instructing the AE algorithm module to work may be to instruct each algorithm submodule in the AE algorithm module to work, or to instruct some algorithm submodules in the AE algorithm module to work. Exemplarily, the algorithm 1 submodule can automatically adjust the exposure according to the intensity of the external light, and the algorithm 2 submodule can use the brightness information of the image to estimate the intensity of the ambient light to obtain AE data. Then, the algorithm 1 submodule may start working when the camera application is opened, and the algorithm 2 submodule works based on the instruction driven by the sensor.

[0155] Among them, the AE data may be the result output by the AE algorithm module for data processing. Optionally, if the AE algorithm module includes an algorithm 1 submodule and an algorithm 2 submodule, the AE data may be the result output by the algorithm 2 submodule for data processing. In an embodiment of the present application, the AE data is used to indicate the estimated light intensity of the ambient light estimated by the AE algorithm module. Optionally, the AE data may be obtained by the AE algorithm module using the brightness of the image captured by the front camera. Generally, the estimated light intensity is related to the brightness of the image captured by the front camera. For example, the estimated light intensity is positively correlated with the brightness of the image captured by the front camera. That is to say, the greater the brightness of the image captured by the front camera, the greater the estimated light intensity. Generally, the brightness of the image captured by the camera is also used by the AE algorithm module to automatically adjust the exposure.

[0156] S520 , the AE algorithm module transmits AE data to the sensor driver.

[0157] S522: The sensor driver transmits AE data and first state information to the sensor HAL through the input subsystem.

[0158] S524: The sensor control center transmits physical ambient light data to the sensor HAL.

[0159] Among them, the physical ambient light data can be the ambient light data obtained by using ambient light collection. The difference between it and the AE data is that the physical ambient light data is the measured ambient light data, while the AE data is the ambient light data estimated using other parameters, and the other parameters may be, for example, the brightness of the image.

[0160] In an embodiment of the present application, the sensor control center may continuously transmit physical ambient light data to the sensor HAL. For example, after the electronic device is turned on, or the automatic dimming function is turned on, the physical ambient light data may be transmitted to the sensor HAL according to the operating frequency of the ambient light sensor, or the physical ambient light data may be transmitted to the sensor HAL at a regular interval. There is no limitation here.

[0161] S526: The sensor HAL replaces the AE data with the ambient light data and transmits it to the dimming application.

[0162] In an embodiment of the present application, when the sensor HAL obtains the first state information, it replaces the AE data with the ambient light data and transmits it to the dimming application. Among them, the dimming application can be an application for adjusting the display brightness. In an embodiment of the present application, the dimming application is configured with a dimming algorithm. In an embodiment of the present application, after receiving the first state information, the sensor HAL can know that the front soft light is on. At this time, due to the light leakage of the front soft light, the physical ambient light data collected by the ambient light is quite different from the actual ambient light. Therefore, the sensor HAL transmits AE data to the dimming application. Compared with the physical ambient light data, the AE data is closer to the actual ambient light. In this way, the accuracy of the dimming application in adjusting the display brightness can be improved.

[0163] S528: The dimming application uses the ambient light data to obtain a target brightness value.

[0164] Among them, the target brightness value can be a target brightness value obtained by the dimming application based on its configured algorithm using ambient light data. In an embodiment of the present application, the target brightness value can be used as a basis for determining whether to adjust the display brightness, or as a basis for display brightness adjustment. In an embodiment of the present application, the ambient light data can be physical ambient light data or AE data. In an embodiment of the present application, if the sensor HAL sends AE data to the dimming application, the ambient light data is AE data, that is, the dimming application uses AE data to obtain the target brightness value. If the sensor HAL sends physical ambient light data to the dimming application, the ambient light data includes physical ambient light data, that is, the dimming application uses physical ambient light data to obtain the target brightness value. Optionally, in an embodiment of the present application, the greater the light intensity indicated by the ambient light data, the greater the target brightness value.

[0165] It should be understood that the dimming application may refer to an application for adjusting display brightness, but does not refer to a specific application.

[0166] S530: The dimming application determines whether the difference between the target brightness value and the current brightness value is greater than a preset difference.

[0167] The preset difference value can be set as needed and is not limited here. If yes, then execute step S532. In a possible implementation, if no, that is, the difference between the target brightness value and the current brightness value is less than or equal to the preset difference value, then keep the display brightness of the electronic device unchanged.

[0168] S532: The dimming application adjusts the display brightness of the electronic device to a target brightness value.

[0169] In an embodiment of the present application, if the difference between the target brightness value and the current brightness value is greater than a preset difference, it means that the current brightness value of the electronic device is too high or too low, and the display brightness of the electronic device is adjusted to the target brightness value.

[0170] S534: The camera application receives an operation to turn off the front soft light.

[0171] The operation of turning off the front soft light may be a user operation on the front soft light switch button 201 when the front soft light is turned on.

[0172] S536: The camera application transmits the second status information to the camera HAL through the camera FWK.

[0173] The second status information is used to indicate the status of the front soft light. In the embodiment of the present application, the second status information is used to indicate that the status of the front soft light is turned on.

[0174] S538. The camera HAL transmits the second status information to the sensor driver through ioctl.

[0175] S540, the sensor drives the front soft light to turn off.

[0176] In the embodiment of the present application, if the sensor driver obtains the second state information, it can be known that the front soft light needs to be turned off, so the sensor driver controls the front soft light to be turned off.

[0177] S542: The sensor driver transmits second status information to the sensor HAL.

[0178] S544: The sensor HAL transmits the physical ambient light data as ambient light data to the dimming application.

[0179] In the embodiment of the present application, when the sensor HAL obtains the second state information, it transmits the physical ambient light data as the ambient light data to the dimming application. After the sensor HAL transmits the physical ambient light data as the ambient light data to the dimming application, it can return to the step of executing step S528. In the embodiment of the present application, since the front soft light is turned off, the physical ambient light data is close to the actual ambient light. Therefore, the physical ambient light data can be transmitted to the dimming application, so that the dimming application can use the physical ambient light data to adjust the display brightness. In this way, the AE algorithm module does not need to use the brightness of the image to obtain the AE data. In other words, the embodiment of the present application can accurately adjust the display brightness while saving the computing power resources for obtaining the AE data using the brightness of the image.

[0180] In the embodiment of the present application, the AE algorithm module may optionally stop working. The AE algorithm module may stop working by stopping each algorithm submodule in the AE algorithm module, or by stopping some operator submodules in the AE algorithm module, such as stopping the algorithm 2 submodule.

[0181] In another possible implementation, when taking pictures with the rear camera, the rear fill light can be turned on. When the rear fill light is turned on, the display brightness of the electronic device is adjusted using the brightness of the image captured by the rear camera. In addition, when the front soft light is turned on, the display brightness can be adjusted using the brightness of the image captured by the rear camera, or when the rear soft light is turned on, the display brightness can be adjusted using the brightness of the image captured by the front camera.

[0182] In another possible implementation, steps S518-S522 and S526-S528 can be replaced by the sensor driver transmitting the image or the brightness information of the image and the first state information to the sensor HAL through the input subsystem, and then the sensor HAL transmits the image or the brightness information of the image to the dimming application, and then the dimming application can adjust the display brightness based on the image or the brightness information of the image, without having to first obtain AE data based on the brightness information of the image and then use the AE data to obtain the target brightness information. Correspondingly, after step S544, the dimming application obtains the target brightness information based on the ambient light data.

[0183] In the embodiment of the present application, AE data is first obtained based on the brightness information of the image, and then the target brightness information is obtained using the AE data. In this way, the algorithm and code for obtaining the target brightness information using the light intensity information can be reused, thereby reducing the amount of code required to implement the present solution and the storage space requirement for storing the code, and reducing the complexity of display brightness adjustment.

[0184] In another possible implementation, step S510 may be replaced by the front soft light automatically turning on when the ambient light intensity is lower than a preset light intensity. Exemplarily, the front soft light is in an off state. At this time, when the display brightness is adjusted using the physical ambient light data, the ambient light intensity can also be determined using the physical ambient light data. If the ambient light intensity is lower than the preset light intensity, the dimming application transmits a front soft light turn-on instruction to the sensor driver, thereby controlling the front soft light to turn on. After the front soft light is turned on, the display brightness is adjusted using the brightness of the image captured by the front camera.

[0185] In another possible implementation, step S534 can be replaced by the front soft light automatically turning off when the ambient light intensity is higher than the preset light intensity. Exemplarily, when the front soft light is on, the AE data can be used to adjust the display brightness, and the AE data is also used to determine the ambient light intensity. If the ambient light intensity is higher than the preset light intensity, the dimming application transmits a front soft light off instruction to the sensor driver, thereby controlling the front soft light to turn off. After the front soft light is turned off, the physical ambient light data is used to adjust the display brightness.

[0186] In another possible implementation, in step S518, the AE algorithm module may also be always working, that is, continuously using the brightness of the image to obtain AE data.

[0187] In the embodiment of the present application, after the sensor driver obtains the first state information, it instructs the AE algorithm module to work, that is, when the soft light is turned on, it instructs the AE algorithm module to work. In this way, the computing power resources required for the operation of the AE algorithm module can be reduced.

[0188] In another possible implementation, the AE data and the first state information in step S522 may be transmitted separately. For example, the first state information may be transmitted when the soft light is turned on, and the AE data is continuously transmitted to the sensor HAL after the AE data from the AE algorithm module is acquired.

[0189] In another possible implementation, steps S530-S532 may also be replaced by: adjusting the display brightness of the electronic device to a target brightness value without determining the difference between the target brightness value and the current brightness value.

[0190] In the embodiment of the present application, the display brightness is updated to the target brightness value only when the difference between the target brightness value and the current brightness value is greater than the preset brightness difference value. This can reduce the poor user experience and shortened service life of the display screen caused by frequent adjustment of the display brightness.

[0191] In another possible implementation, S520 - S522 may also be replaced by the AE algorithm module directly transmitting the AE data to the sensor HAL, and the sensor driver transmits the first state information to the sensor HAL.

[0192] It should be understood that the interaction mode between modules or layers can be adjusted / set as needed and is not limited here.

[0193] The following is an example of the process of the display brightness adjustment method according to the embodiment of the present application.

[0194] The present application embodiment provides a display brightness adjustment method, which is applied to an electronic device, wherein the electronic device includes a fill light module, an ambient light acquisition module, and an image acquisition module. The method includes:

[0195] When the fill light module is turned on, the target brightness information is obtained by using the brightness information of the image collected by the image collection module, and the target brightness information is used to indicate the adjustment of the display brightness of the electronic device. When the fill light module is turned off, the target brightness information is obtained by using the first light intensity information collected by the ambient light collection module.

[0196] Exemplarily, the first fill light module may include a front soft light as in the above embodiment, the first ambient light acquisition module may include a front ambient light sensor, and the first image acquisition module may include a front camera as in the above embodiment. The second fill light module may include a rear soft light as in the above embodiment, the second ambient light acquisition module may include a rear ambient light sensor, and the second image acquisition module may include a rear camera as in the above embodiment.

[0197] The following describes how to identify whether the fill light module is in the on state or the off state.

[0198] In a possible implementation, the display brightness adjustment method further includes:

[0199] The state information of the fill light module is obtained, and the state information includes the first state information or the second state information. The first state information indicates that the state of the fill light module is on, and the second state information indicates that the state of the fill light module is off. Then, it can be identified whether the fill light module is on or off according to the first state information and the second state information. In this way, when the state information is the first state information, it can be known that the state of the fill light module is on, and the target brightness information is obtained using the brightness information of the image collected by the image acquisition module. When the state information is the second state information, it can be known that the state of the fill light module is off, and the target brightness information is obtained using the first light intensity information collected by the ambient light acquisition module.

[0200] In another possible implementation, the first state information may be obtained, and if the first state information is not obtained, it is considered that the fill light module is in the off state; or the second state information may be obtained, and if the second state information is not obtained, it is considered that the fill light module is in the on state, that is, one of the first state information and the second state information may be selected for transmission.

[0201] The following describes how to obtain the first status information and the second status information.

[0202] In a possible implementation, the method further includes:

[0203] The method comprises: displaying a first interface, displaying a second interface in response to a first operation of a camera application on the first interface, turning on a fill light module in response to a second operation of a first control on the second interface, and obtaining status information of the fill light module, including: recording the status information of the fill light module as first status information.

[0204] In the embodiment of the present application, how to respond to the second operation of the first control of the second interface and turn on the fill light module can refer to Figure 5 The relevant descriptions of S510 - S516 in the illustrated embodiment are not repeated here.

[0205] In a possible implementation, after the fill light module is turned on in response to the second operation on the first control of the second interface, the method further includes:

[0206] In response to a third operation on the first control, the fill light module is turned off. Acquiring the state information of the fill light module includes: recording the state information of the fill light module as second state information.

[0207] In the embodiment of the present application, how to respond to the third operation on the first control and turn off the fill light module can be referred to. Figure 5 The relevant description of S534-S540 of the illustrated embodiment is not repeated here.

[0208] In another possible implementation, the filling light module may be turned on and off through adaptive adjustment by an electronic device, which can improve the intelligence level of turning on or off the filling light module.

[0209] In a possible implementation, the electronic device further includes a kernel layer, an application layer, and a hardware abstraction layer HAL, and obtains the status information of the fill light module, including:

[0210] The kernel layer obtains the status information of the fill light module and transmits the status information to the hardware abstraction layer HAL.

[0211] Correspondingly, when the fill light module is turned on, the target brightness information is obtained by using the brightness information of the image collected by the image collection module, including:

[0212] The image acquisition module transmits the acquired image to the hardware abstraction layer HAL. The hardware abstraction layer HAL obtains the brightness information of the image and obtains the second light intensity information using the brightness information of the image. When the state information is the first state information, the hardware abstraction layer HAL transmits the second light intensity information to the application layer. The application layer obtains the target brightness information using the second light intensity information.

[0213] The second light intensity information may be light intensity information calculated using the brightness information of the image. In an embodiment of the present application, the second light intensity information may reflect the actual light intensity of the ambient light. Exemplarily, the second light intensity information may be, for example, the AE data of the above embodiment.

[0214] In another possible implementation, obtaining the brightness information of the image, using the brightness information of the image to obtain the second light intensity information, and using the second light intensity information to obtain the target brightness information can be performed at the same layer, such as at the hardware abstraction layer HAL or the application layer, which is not limited here. In this way, the complexity of the software framework of the electronic device can be reduced.

[0215] In a possible implementation, the hardware abstraction layer HAL includes an algorithm module and a first HAL module, and the hardware abstraction layer HAL obtains brightness information of an image and obtains second light intensity information using the brightness information of the image, including:

[0216] The algorithm module obtains the brightness information of the image, and obtains the second light intensity information using the brightness information of the image. The algorithm module transmits the second light intensity information to the first HAL module. When the state information of the hardware abstraction layer HAL is the first state information, the second light intensity information is transmitted to the application layer, including: when the state information of the first HAL module is the first state information, the second light intensity information is transmitted to the application layer.

[0217] Among them, the algorithm module can be a module configured with an algorithm for processing an image. Optionally, the algorithm module can include an AE algorithm module. The AE algorithm module can refer to the description of the embodiment of the present application and will not be described in detail here. The first HAL module can be a module that transmits data / information to the application layer. In the embodiment of the present application, the first HAL module transmits the first light intensity information or transmits the second light intensity information to the application layer. Exemplarily, the first HAL module can include the sensor HAL of the above embodiment.

[0218] In another possible implementation, the brightness information of the image may be obtained in the same module of the hardware abstraction layer HAL, and the second light intensity information may be obtained by using the brightness information of the image, and when the state information is the first state information, the second light intensity information may be transmitted to the application layer. In this way, the complexity of the software framework of the electronic device may be reduced.

[0219] In a possible implementation, the kernel layer includes a target driver, and the algorithm module obtains brightness information of the image and obtains the second light intensity information using the brightness information of the image, including:

[0220] When the state information is the first state information, the target driver instructs the algorithm module to obtain the brightness information of the image, and obtains the second light intensity information using the brightness information of the image.

[0221] The target driver may be a driver that instructs the algorithm module to work. Optionally, the target driver may be Figure 5 The sensor drive of the illustrated embodiment.

[0222] In a possible implementation, the hardware abstraction layer HAL includes a second HAL module, and the kernel layer obtains the status information of the fill light module, including:

[0223] The application layer transmits status information to the kernel layer through the second HAL module.

[0224] Among them, the second HAL module can be a module that transmits data / information to the kernel layer. In an embodiment of the present application, the second HAL module can transmit state information to the kernel layer. Optionally, the state information transmitted by the second HAL module to the kernel layer can come from the application layer. The second HAL module and the first HAL module can be different HAL modules. Exemplarily, the second HAL module can be, for example, the camera HAL of the above embodiment.

[0225] In another possible implementation manner, the second HAL module and the first HAL module may be the same module.

[0226] In a possible implementation, when the fill light module is in a turned-off state, obtaining target brightness information using first light intensity information collected by the ambient light collection module includes:

[0227] The ambient light acquisition module transmits the collected first light intensity information to the hardware abstraction layer HAL. When the state information is the second state information, the hardware abstraction layer HAL transmits the first light intensity information to the application layer. The application layer obtains the target brightness information using the first light intensity information.

[0228] The first light intensity information may be information directly collected by the ambient light collection module. In the embodiment of the present application, the first light intensity information may reflect the actual intensity of the ambient light. Exemplarily, the first light intensity information may be, for example, the physical ambient light data of the above embodiment.

[0229] In another possible implementation, obtaining the first light intensity information and obtaining the target brightness information using the first light intensity information may be performed at the same layer, such as at the hardware abstraction layer HAL or the application layer, which is not limited here. In this way, the complexity of the software framework of the electronic device can be reduced.

[0230] In a possible implementation, when the state information is the second state information, the hardware abstraction layer HAL transmits the first light intensity information to the application layer, including:

[0231] When the state information is the second state information, the first HAL module transmits the first light intensity information to the application layer.

[0232] In one possible implementation, the fill light module and the ambient light collection module are arranged on the same side of the electronic device, a first distance between the fill light module and the ambient light collection module is less than a first threshold, a second distance between the fill light module and the image collection module is greater than a second threshold and / or the first distance is less than the second distance, and the first threshold is less than or equal to the second threshold.

[0233] In a possible implementation, obtaining target brightness information using brightness information of an image acquired by an image acquisition module includes:

[0234] When the state of the fill light module is switched from off to on, the display brightness of the electronic device is kept unchanged.

[0235] While keeping the display brightness of the electronic device unchanged, if the first condition is met, the target brightness information is obtained by using the brightness information of the image captured by the image acquisition module. The first condition includes that the duration of the fill light module being turned on exceeds the third threshold, the moving distance of the electronic device exceeds the fourth threshold, the brightness of the image captured by the image acquisition module is lower than the fifth threshold, the brightness of the image captured by the image acquisition module is higher than the sixth threshold and / or the brightness difference between the first image and the second image captured by the image acquisition module exceeds the seventh threshold.

[0236] Among them, if the duration of the fill light module being turned on exceeds the third threshold, the electronic device may move, that is, the environment of the electronic device may change, and the intensity of the ambient light may also change. At this time, the brightness information of the image captured by the image acquisition module can be used to obtain the target brightness information, thereby improving the accuracy of display brightness adjustment and improving user experience.

[0237] Among them, the moving distance of the electronic device exceeds the fourth threshold, that is, the environment of the electronic device may have changed, and the intensity of the ambient light may also have changed. At this time, the brightness information of the image captured by the image acquisition module can be used to obtain the target brightness information, thereby improving the accuracy of display brightness adjustment and improving user experience.

[0238] Among them, if the brightness of the image captured by the image acquisition module is lower than the fifth threshold, it means that the electronic device is in a darker environment at this time, and if the brightness of the image captured by the image acquisition module is higher than the sixth threshold, it means that the electronic device is in a brighter environment at this time. At this time, the brightness information of the image captured by the image acquisition module can be used to obtain the target brightness information, thereby improving the accuracy of display brightness adjustment and improving user experience.

[0239] Among them, the first image and the second image can be two adjacent frames of images, or there can be at least one frame of image between the first image and the second image, which is not limited here. If the brightness difference between the first image and the second image captured by the image acquisition module exceeds the seventh threshold, it means that a large change has occurred in the environment of the electronic device, such as from a darker environment to a brighter environment, or from a brighter environment to a darker environment. At this time, the brightness information of the image captured by the image acquisition module can be used to obtain the target brightness information, thereby improving the accuracy of display brightness adjustment and improving user experience.

[0240] It should be noted that in the embodiment of the present application, the sensor driver may be used to determine whether the first condition is met. If so, the algorithm module is instructed to obtain the target brightness information using the brightness information of the image captured by the image acquisition module.

[0241] In a possible implementation, obtaining target brightness information using brightness information of an image acquired by an image acquisition module includes:

[0242] The second light intensity information is obtained by using the brightness information of the image collected by the image collection module, the second light intensity information indicates the intensity of the ambient light, and the brightness of the image collected by the image collection module is positively correlated with the intensity of the ambient light. The target brightness information is obtained by using the second light intensity information.

[0243] The brightness of the image is positively correlated with the intensity of the ambient light, that is, the greater the brightness of the image, the greater the intensity of the ambient light estimated based on the brightness of the image.

[0244] In a possible implementation, the method further includes:

[0245] When the fill light module is turned on, if the light intensity indicated by the second light intensity information is greater than the eighth threshold, the fill light module is turned off.

[0246] It should be noted that the sensor may be used to drive and determine whether the light intensity indicated by the second light intensity information is greater than the eighth threshold value. If so, the fill light module is controlled to be turned off.

[0247] In a possible implementation, obtaining the second light intensity information using brightness information of an image acquired by an image acquisition module includes:

[0248] The exposure is obtained by using the brightness information of the image collected by the image collection module, and the exposure is negatively correlated with the brightness of the image; the second light intensity information is obtained by using the exposure, and the exposure is negatively correlated with the intensity of the ambient light.

[0249] Optionally, the second light intensity information may be directly obtained by using the brightness information of the image through the algorithm 1 module, and then the second light intensity information may be obtained by using the exposure through the algorithm 2 module.

[0250] In another possible implementation, the second light intensity information can also be directly obtained by using the brightness information of the image. For example, by constructing a relationship between the brightness information and the light intensity information, the second light intensity information can be determined based on the brightness information of the acquired image and the relationship between the brightness information and the light intensity information. In this way, data processing of intermediate parameters can be reduced, thereby improving the efficiency of obtaining the second light intensity information.

[0251] In a possible implementation manner, the light intensity indicated by the second light intensity information is in a logarithmic relationship with the exposure.

[0252] In another possible implementation, the light intensity indicated by the second light intensity information may be in a linear relationship with the exposure, so that the computing resources required to obtain the second light intensity information using the exposure can be reduced.

[0253] In a possible implementation, the light intensity indicated by the second light intensity information and the exposure amount satisfy the following relationship:

[0254] .

[0255] In another possible implementation, the light intensity indicated by the second light intensity information and the exposure amount satisfy the following relationship:

[0256] or .

[0257] It should be understood that through or , which can reduce the computing resources required to obtain the second light intensity information using the exposure amount.

[0258] Among them, the specific values ​​of X, Y and b can be determined according to experiments, or can be obtained by fitting, which is not limited here.

[0259] For example, it can be applied This formula, combined with the exposure output by the algorithm mode, obtains the calculated light intensity, which is then compared with the actual measured light intensity. If the error is large, the values ​​of X, Y, and b are adjusted until the light intensity calculated by the values ​​of X, Y, and b has a smaller error than the actual measured light intensity.

[0260] The following is an example of an application scenario of the display brightness adjustment method of the above embodiment.

[0261] Scenario 1: In the embodiment of the present application, the display brightness adjustment method can be applied to Figure 1 The photo-taking scene shown.

[0262] Scenario 2: In the embodiment of the present application, the display brightness adjustment method can also be applied to the video call scenario. For example, in the video call scenario, the user is in a dark environment and needs to turn on the fill light module for fill light. At this time, the electronic device can adopt the display brightness adjustment method of the embodiment of the present application to reduce the problem of excessive display brightness in the video call scenario.

[0263] It should be noted that the module names involved in the embodiments of the present application can be defined as other names as long as the functions of each module can be achieved, and there is no specific restriction on the names of the modules.

[0264] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0265] The display brightness adjustment method of the embodiment of the present application has been described above, and the device for executing the above method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above list sorting method.

[0266] The display brightness adjustment method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic devices include terminal devices, and the specific device form of the terminal devices can refer to the above related descriptions, which will not be repeated here.

[0267] An embodiment of the present application provides a terminal device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the terminal device executes the above method.

[0268] like Figure 6 A schematic diagram of the structure of a chip provided in an embodiment of the present application: The chip 600 includes one or more (including two) processors 601 , a communication line 602 , a communication interface 603 and a memory 604 .

[0269] In some implementations, the memory 604 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0270] The method described in the above embodiment of the present application can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 601 or an instruction in the form of software. The above processor 601 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 601 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.

[0271] The steps of the method described in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 604, and the processor 601 reads the information in the memory 604 and completes the steps of the above method in combination with its hardware.

[0272] The processor 601 , the memory 604 , and the communication interface 603 may communicate with each other via the communication line 602 .

[0273] The embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The above method is implemented when the computer program is executed by the processor. The method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium that can be accessed by a computer.

[0274] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave are included in the definition of medium. Disks and optical disks as used herein include optical disks, laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer-readable media.

[0275] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0276] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0277] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection of the present invention.

Claims

1. A display brightness adjustment method, characterized in that: Applied to an electronic device, the electronic device comprises a fill light module, an ambient light collection module and an image collection module, the fill light module and the ambient light collection module are arranged on the same side of the electronic device, a first distance between the fill light module and the ambient light collection module is less than a first threshold, a second distance between the fill light module and the image collection module is greater than a second threshold, and the first threshold is less than or equal to the second threshold, the method comprises: When the fill light module is turned on, the target brightness information is obtained by using the brightness information of the image acquired by the image acquisition module, and the target brightness information is used to indicate the adjustment of the display brightness of the electronic device; When the state of the fill light module is off, the target brightness information is obtained by using the first light intensity information collected by the ambient light collection module.

2. The method according to claim 1, characterized in that: The method further comprises: Acquire status information of the fill light module, where the status information includes first status information or second status information, where the first status information indicates that the status of the fill light module is on, and the second status information indicates that the status of the fill light module is off; When the fill light module is in the on state, obtaining the target brightness information by using the brightness information of the image acquired by the image acquisition module includes: When the state information is the first state information, obtaining target brightness information by using brightness information of the image acquired by the image acquisition module; When the state of the fill light module is off, obtaining the target brightness information by using the first light intensity information collected by the ambient light collection module includes: When the state information is the second state information, the target brightness information is obtained by using the first light intensity information collected by the ambient light collection module.

3. The method according to claim 2, characterized in that The method further comprises: Display the first interface; In response to a first operation of the camera application on the first interface, displaying a second interface; In response to a second operation on the first control of the second interface, turning on the fill light module; Recording the state information of the fill light module as the first state information; In response to a third operation on the first control, turning off the fill light module; The state information of the fill light module is recorded as the second state information.

4. The method according to claim 2, characterized in that: The electronic device further includes a kernel layer, an application layer and a hardware abstraction layer HAL, and the step of obtaining the status information of the fill light module includes: The kernel layer obtains the status information of the fill light module and transmits the status information to the hardware abstraction layer HAL; When the fill light module is in the on state, obtaining the target brightness information by using the brightness information of the image acquired by the image acquisition module includes: The image acquisition module transmits the acquired image to the hardware abstraction layer HAL; The hardware abstraction layer HAL obtains brightness information of the image, and obtains second light intensity information using the brightness information of the image; The hardware abstraction layer HAL transmits the second light intensity information to the application layer when the state information is the first state information; The application layer obtains target brightness information using the second light intensity information.

5. The method according to claim 4, characterized in that The hardware abstraction layer HAL includes an algorithm module and a first HAL module. The hardware abstraction layer HAL obtains brightness information of the image and obtains second light intensity information using the brightness information of the image, including: The algorithm module obtains brightness information of the image, and obtains the second light intensity information using the brightness information of the image; The algorithm module transmits the second light intensity information to the first HAL module; The hardware abstraction layer HAL transmits the second light intensity information to the application layer when the state information is the first state information, including: The first HAL module transmits the second light intensity information to the application layer when the state information is the first state information.

6. The method according to claim 5, characterized in that The kernel layer includes a target driver, the algorithm module obtains the brightness information of the image, and obtains the second light intensity information using the brightness information of the image, including: When the state information is the first state information, the target driver instructs the algorithm module to obtain the brightness information of the image, and obtains the second light intensity information by using the brightness information of the image.

7. The method according to claim 4, characterized in that The hardware abstraction layer HAL includes a second HAL module, and the kernel layer obtains the status information of the fill light module, including: The application layer transmits the status information to the kernel layer through the second HAL module.

8. The method according to claim 4, characterized in that When the state of the fill light module is off, obtaining the target brightness information by using the first light intensity information collected by the ambient light collection module includes: The collected first light intensity information transmitted by the ambient light collection module to the hardware abstraction layer HAL; The hardware abstraction layer HAL transmits the first light intensity information to the application layer when the state information is the second state information; The application layer obtains the target brightness information using the first light intensity information.

9. The method according to claim 8, characterized in that The hardware abstraction layer HAL includes a first HAL module. When the state information is the second state information, the hardware abstraction layer HAL transmits the first light intensity information to the application layer, including: The first HAL module transmits the first light intensity information to the application layer when the state information is the second state information.

10. The method according to any one of claims 1 to 9, characterized in that The step of obtaining target brightness information by using the brightness information of the image acquired by the image acquisition module includes: Obtaining second light intensity information using brightness information of the image collected by the image collection module, wherein the second light intensity information indicates the intensity of ambient light, and the brightness of the image collected by the image collection module is positively correlated with the intensity of the ambient light; The target brightness information is obtained using the second light intensity information.

11. The method according to claim 10, characterized in that The step of obtaining the second light intensity information by using the brightness information of the image collected by the image collection module includes: Obtaining exposure using brightness information of the image acquired by the image acquisition module, wherein the exposure is negatively correlated with the brightness of the image; The second light intensity information is obtained by using the exposure amount, and the exposure amount is negatively correlated with the light intensity of the ambient light.

12. The method according to claim 11, characterized in that The light intensity indicated by the second light intensity information is in a logarithmic relationship with the exposure amount.

13. The method according to claim 12, characterized in that The light intensity indicated by the second light intensity information and the exposure amount satisfy the following relationship: ; Wherein, lux represents the light intensity indicated by the second light intensity information, a represents the exposure, and X, Y and b are constants.

14. The method according to claim 10, characterized in that The method further comprises: When the fill light module is in the on state, if the light intensity indicated by the second light intensity information is greater than an eighth threshold, the fill light module is turned off.

15. The method according to any one of claims 1 to 9, characterized in that The step of obtaining target brightness information by using the brightness information of the image acquired by the image acquisition module includes: When the state of the fill light module is switched from off to on, the display brightness of the electronic device is kept unchanged; While keeping the display brightness of the electronic device unchanged, if the first condition is met, the target brightness information is obtained by using the brightness information of the image captured by the image acquisition module, and the first condition includes that the duration of the fill light module being turned on exceeds a third threshold, the moving distance of the electronic device exceeds a fourth threshold, the brightness of the image captured by the image acquisition module is lower than a fifth threshold, the brightness of the image captured by the image acquisition module is higher than a sixth threshold, and / or the brightness difference between the first image and the second image captured by the image acquisition module exceeds a seventh threshold.

16. An electronic device, characterized in that: The electronic device comprises: 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, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 15.

17. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes the method as described in any one of claims 1-15.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 15.

19. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is caused to perform the method according to any one of claims 1 to 15.