CN115719589A - Brightness control method and device, electronic equipment and storage medium - Google Patents

Brightness control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115719589A
CN115719589A CN202211430257.1A CN202211430257A CN115719589A CN 115719589 A CN115719589 A CN 115719589A CN 202211430257 A CN202211430257 A CN 202211430257A CN 115719589 A CN115719589 A CN 115719589A
Authority
CN
China
Prior art keywords
brightness
optical sensor
state
optical
value set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211430257.1A
Other languages
Chinese (zh)
Inventor
张逸帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202211430257.1A priority Critical patent/CN115719589A/en
Publication of CN115719589A publication Critical patent/CN115719589A/en
Pending legal-status Critical Current

Links

Images

Abstract

The present disclosure relates to a brightness control method, apparatus, electronic device and storage medium, the method is applied to a terminal device having a display screen and a plurality of optical sensors, the method includes: acquiring a brightness value collected by each optical sensor in the plurality of optical sensors within a preset time length; respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period, wherein the optical state of each optical sensor comprises a stable state and a fluctuation state; determining the optical state of the environment where the terminal equipment is located according to the optical state of each optical sensor, wherein the optical state of the environment comprises a point light source stable state, a multi-light source stable state and a fluctuation state; and controlling the brightness of the display screen according to the optical state of the environment where the terminal equipment is located.

Description

Brightness control method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of terminal devices, and in particular to a brightness control method and device, an electronic device and a storage medium.
Background
In recent years, the functions of terminal equipment are more and more abundant, and the performance of each function is gradually improved, so that the use experience of a user is continuously improved. For example, the brightness automatic adjustment function of the display screen can automatically adjust the adaptive brightness of the display screen along with the ambient light brightness, thereby providing clear and comfortable display brightness for users in real time. The terminal device is located in an environment, and the ambient light can be a plurality of light sources or a point light source. In the related art, the terminal device can perform relatively accurate brightness adjustment on the display screen in the environment of multiple light sources, and the accuracy of the brightness adjustment on the display screen in the environment of point light sources is relatively low, so that the definition and the comfort degree of the display screen are relatively poor.
Disclosure of Invention
In order to overcome the problems in the related art, embodiments of the present disclosure provide a brightness control method, device, electronic device and storage medium, so as to solve the defects in the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided a brightness control method applied to a terminal device having a display screen and a plurality of optical sensors, the method including:
acquiring a brightness value collected by each optical sensor in the plurality of optical sensors within a preset time length;
respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period, wherein the optical state of each optical sensor comprises a stable state and a fluctuation state;
determining the optical state of the environment where the terminal equipment is located according to the optical state of each optical sensor, wherein the optical state of the environment comprises a point light source stable state, a multi-light source stable state and a fluctuation state;
and controlling the brightness of the display screen according to the optical state of the environment where the terminal equipment is located.
In one embodiment, the acquiring the brightness value acquired by each of the plurality of optical sensors within the preset time period includes:
and acquiring the brightness value of each optical sensor collected in a preset time length according to a preset frequency to obtain the brightness value set of each optical sensor.
In one embodiment, the determining the optical state of each optical sensor according to the brightness value collected by each optical sensor within the preset time period includes:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the first brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and respectively determining the optical state of each optical sensor according to the brightness difference value set and the brightness variance set of each optical sensor.
In one embodiment, the determining the optical state of each optical sensor separately from the set of brightness differences and the set of brightness variances of each optical sensor comprises:
for each optical sensor, determining that the optical state of the optical sensor is a fluctuation state if there is a difference greater than a first threshold in the set of brightness difference values or a variance greater than a second threshold in the set of brightness variances;
for each optical sensor, determining that the optical state of the optical sensor is a steady state if there is no difference greater than or equal to a third threshold in the set of brightness differences and no variance greater than or equal to a fourth threshold in the set of brightness variances.
In one embodiment, the determining the optical state of each optical sensor according to the brightness value collected by each optical sensor within the preset time period includes:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain the brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and for each optical sensor, inputting the brightness value set, the first brightness mean value set, the brightness difference value set, the second brightness mean value set and the brightness variance set which are subjected to smoothing treatment into an optical state prediction model which is trained in advance, and obtaining the optical state of the optical sensor output by the optical state prediction model.
In one embodiment, the smoothing of the luminance values within the set of luminance values for each optical sensor, respectively, comprises:
converting the brightness value set of each optical sensor from a time domain form to a frequency domain form;
and filtering the brightness value set in each frequency domain form, and converting each filtered brightness value set from the frequency domain form into a time domain form to obtain the brightness value set of each optical sensor after smoothing.
In one embodiment, the determining the optical state of the environment in which the terminal device is located according to the optical state of each optical sensor includes:
under the condition that the optical state of each optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state;
under the condition that the optical state of each optical sensor is a fluctuation state, determining that the optical state of the environment where the terminal equipment is located is the fluctuation state;
and under the condition that the optical state of the at least one optical sensor is a fluctuation state and the optical state of the at least one optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a point light source stable state.
In one embodiment, the controlling the brightness of the display screen according to the optical state of the environment where the terminal device is located includes:
under the condition that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state or a fluctuation state, controlling the brightness of the display screen according to the brightness value acquired by each optical sensor;
and under the condition that the optical state of the environment where the terminal equipment is located is a stable state of the point light source, determining target brightness according to the brightness value collected by each optical sensor when the optical sensor enters the stable state of the point light source, and controlling the brightness of the display screen to be kept at the target brightness.
In one embodiment, further comprising:
and responding to the optical state of the environment where the terminal equipment is positioned, switching from a point light source stable state to a fluctuation state, and controlling the brightness of the display screen within a preset time length to keep the target brightness.
In one embodiment, further comprising:
responding to that the brightness value acquired by each optical sensor at the current moment is 0, and controlling the brightness of the display screen to be kept at a preset brightness;
the determining the optical state of each optical sensor according to the brightness value collected by each optical sensor within the preset time period includes:
and in response to that the brightness value acquired by at least one optical sensor at the current moment is not 0, respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period.
According to a second aspect of the embodiments of the present disclosure, there is provided a luminance control apparatus applied to a terminal device having a display screen and a plurality of optical sensors, the apparatus including:
the acquisition module is used for acquiring the brightness value of each optical sensor in the plurality of optical sensors, wherein the brightness value is acquired by each optical sensor within a preset time length;
the first state module is used for respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time, wherein the optical state of each optical sensor comprises a stable state and a fluctuation state;
the second state module is used for determining the optical state of the environment where the terminal equipment is located according to the optical state of each optical sensor, wherein the optical state of the environment comprises a point light source stable state, a multi-light source stable state and a fluctuation state;
and the control module is used for controlling the brightness of the display screen according to the optical state of the environment where the terminal equipment is located.
In one embodiment, the obtaining module is specifically configured to:
and acquiring the brightness value of each optical sensor collected in a preset time length according to a preset frequency to obtain the brightness value set of each optical sensor.
In one embodiment, the first status module is specifically configured to:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the first brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and respectively determining the optical state of each optical sensor according to the brightness difference value set and the brightness variance set of each optical sensor.
In an embodiment, the first state module, when being configured to determine the optical state of each optical sensor according to the set of brightness difference values and the set of brightness variance values of each optical sensor, is specifically configured to:
for each optical sensor, determining that the optical state of the optical sensor is a fluctuation state if there is a difference greater than a first threshold in the set of brightness difference values or a variance greater than a second threshold in the set of brightness variances;
for each optical sensor, determining that the optical state of the optical sensor is a stable state when there is no difference greater than or equal to a third threshold in the set of brightness difference values and no variance greater than or equal to a fourth threshold in the set of brightness variances.
In one embodiment, the first status module is specifically configured to:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and for each optical sensor, inputting the brightness value set after the smoothing treatment, the first brightness mean value set, the brightness difference value set, the second brightness mean value set and the brightness variance set to an optical state prediction model which is trained in advance, and obtaining the optical state of the optical sensor output by the optical state prediction model.
In one embodiment, the first status module, when being configured to respectively smooth the brightness values in the brightness value set of each optical sensor, is specifically configured to:
converting the brightness value set of each optical sensor from a time domain form to a frequency domain form;
and filtering the brightness value set in each frequency domain form, and converting each filtered brightness value set from the frequency domain form into a time domain form to obtain the brightness value set of each optical sensor after smoothing.
In one embodiment, the second status module is specifically configured to:
under the condition that the optical state of each optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state;
under the condition that the optical state of each optical sensor is a fluctuation state, determining that the optical state of the environment where the terminal equipment is located is the fluctuation state;
and under the condition that the optical state of the at least one optical sensor is a fluctuation state and the optical state of the at least one optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a point light source stable state.
In one embodiment, the control module is specifically configured to:
under the condition that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state or a fluctuation state, controlling the brightness of the display screen according to the brightness value acquired by each optical sensor;
and under the condition that the optical state of the environment where the terminal equipment is located is a point light source stable state, determining target brightness according to the brightness value collected by each optical sensor when the optical sensor enters the point light source stable state, and controlling the brightness of the display screen to be kept at the target brightness.
In one embodiment, the system further comprises a holding module for:
and responding to the optical state of the environment where the terminal equipment is located, switching from a point light source stable state to a fluctuation state, and controlling the brightness of the display screen to keep the target brightness within a preset time length.
In one embodiment, further comprising a darkness module for:
responding to that the brightness value acquired by each optical sensor at the current moment is 0, and controlling the brightness of the display screen to be kept at a preset brightness;
the second status module is specifically configured to:
and in response to that the brightness value acquired by at least one optical sensor at the current moment is not 0, respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, which includes a memory for storing computer instructions executable on a processor, and the processor is configured to perform the brightness control method according to the first aspect when executing the computer instructions.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the brightness control method provided by the embodiment of the disclosure, by acquiring the brightness value of each optical sensor in the plurality of optical sensors of the terminal device, the optical state of each optical sensor can be respectively determined according to the brightness value of each optical sensor in the preset time, the optical state of the environment where the terminal device is located is further determined according to the optical state of each optical sensor, and finally the brightness of the display screen can be controlled according to the optical state of the environment where the terminal device is located. The method realizes the detection of the optical state of the environment where the terminal equipment is located by determining the optical state of each optical sensor, and further realizes the control of the brightness of the display screen according to the optical state, for example, the brightness of the display screen is controlled by adopting different control strategies under different optical states (namely a point light source state and a multi-light source state). Therefore, the brightness control of the display screen is more accurate, and the definition and the comfort level of the display screen are improved; especially in the environment of point light sources, because the state of the point light sources is used as a factor for adjusting the brightness, and the brightness is adjusted by adopting a control strategy under the state of the point light sources, the brightness adjustment accuracy of the display screen, and the definition and the comfort of the display screen are obviously improved compared with the related technology.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flowchart illustrating a brightness control method according to an exemplary embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a brightness control method according to another exemplary embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a brightness control method according to still another exemplary embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a luminance controlling apparatus according to an exemplary embodiment of the present disclosure;
fig. 5 is a block diagram illustrating a structure of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if," as used herein, may be interpreted as "at \8230; \8230when" or "when 8230; \823030when" or "in response to a determination," depending on the context.
In recent years, the functions of terminal equipment are more and more abundant, and the performance of each function is also gradually improved, so that the use experience of a user is continuously improved. For example, the brightness automatic adjustment function of the display screen can automatically adjust the adaptive brightness of the display screen along with the ambient light brightness, thereby providing clear and comfortable display brightness for users in real time. The terminal device is located in an environment, and the ambient light can be a plurality of light sources or a point light source. In the correlation technique, the terminal equipment can carry out comparatively accurate brightness control to the display screen in the environment of many light sources, and is lower to the brightness control degree of accuracy of display screen in the environment of point light source for the definition and the comfort level of display screen are relatively poor.
A point light source is a light source commonly found in homes, often a desk lamp or a single bulb or similar scene, in which the accuracy of sensing ambient light by the human eye is much higher than that of an optical sensor because the FOV of the optical sensor is limited, and if the light is directed directly, the collected brightness value is slightly higher than that of the human eye, and if the light is not directed directly, the collected brightness value has a very low probability. Therefore, in the environment of a point light source, the brightness value acquired by the optical sensor of the terminal device is inaccurate and has frequent sudden change, and if the brightness of the display screen is controlled in real time, the definition and the comfort degree of the display screen are poor, and even the user cannot see the display screen clearly. In particular, the point light source scene is often in a low-light environment, and the brightness of the point light source scene is exponentially changed when being received by human eyes, so that the brightness change of the display screen in the low-light environment is more sensitive to the human eyes, that is, the slight change of the brightness of the display screen in the low-light environment also causes the human eyes to feel heavily, and is easily invisible and uncomfortable.
In view of this, in a first aspect, at least one embodiment of the present disclosure provides a brightness control method, please refer to fig. 1, which illustrates a flow of the brightness control method, including steps S101 to S104.
The method can be applied to a terminal device with a display screen and a plurality of optical sensors, namely, the brightness of the display screen of the terminal device is controlled. The optical sensor is capable of collecting the brightness values of the light rays within its FOV. For example, the terminal device may have two optical sensors, one of which may be mounted on the front side of the terminal device (i.e., the light-emitting side of the display screen) as a front optical sensor, and the other of which may be mounted on the back side of the terminal device (i.e., the backlight side of the display screen) as a rear optical sensor.
In step S101, a brightness value collected by each of the plurality of optical sensors within a preset time period is obtained.
Wherein, the optical sensor can record time when the light intensity (namely the environmental light brightness) in the FOV changes, and collect the brightness value after the change. For example, all the brightness values collected by the optical sensor within a preset time period may be obtained in this step, so as to form a brightness value set of the optical sensor. As another example, in this step, the brightness value acquired by each optical sensor within a preset time period may also be obtained according to a preset frequency (e.g., 30Hz, 50Hz, etc.), so as to obtain a brightness value set of each optical sensor; because the brightness value collected by the optical sensor every time has time, the brightness value can be conveniently obtained according to the preset frequency.
Wherein the preset duration can be set as required, for example, 30min, 20min, 10min, and the like; in addition, the preset time period may be the latest preset time period, for example, the latest 30min, that is, the preset time period is 30min ahead from the current time.
In the case where the terminal device has a front optical sensor and a rear optical sensor, the set of luminance values l1 of the front optical sensor and the set of luminance values l2 of the rear optical sensor can be obtained in this step.
In step S102, an optical state of each optical sensor is determined according to a brightness value acquired by each optical sensor within a preset time period, where the optical state of each optical sensor includes a steady state and a fluctuation state.
In one possible embodiment, the optical state of each optical sensor may be determined in the manner shown in fig. 2, including step S201 to step S205.
In step S201, the luminance values within the luminance value set of each optical sensor are subjected to smoothing processing, respectively.
Illustratively, first, the set of luminance values of each optical sensor is converted from a time domain form to a frequency domain form; and then, filtering the brightness value set in each frequency domain form, and converting each filtered brightness value set from the frequency domain form to a time domain form to obtain a smoothed brightness value set of each optical sensor. Wherein, the set of luminance values may be filtered using at least one of the following filter modes: low pass filter, band pass filter, infinite impulse filter.
The brightness values with abnormal large or small values in the brightness value set after the smoothing processing are corrected, so that a plurality of brightness values in the brightness value set are smooth, and the change between the adjacent brightness values is smooth.
In the case where the terminal device has a front optical sensor and a rear optical sensor, the smoothed luminance value set f _ l1 of the front optical sensor and the smoothed luminance value set f _ l2 of the rear optical sensor can be obtained in this step.
In step S202, for the smoothed brightness value set of each optical sensor, a preset time window is moved from a first brightness value to a last brightness value according to a preset step length within the brightness value set, and a mean value of a plurality of brightness values covered by the time window at each position is determined, so as to obtain a first brightness mean value set of the optical sensor.
If all the brightness values acquired by the optical sensor within the preset time duration are acquired in step S101, the time window may be slid according to the length of the time window and the time of each brightness value in the brightness value set; if the brightness value acquired by the optical sensor within the preset time duration is obtained according to the preset frequency in step S101, the time window may be slid according to the length of the time window and the preset frequency.
For example, if the preset frequency when the brightness value is obtained in step S101 is 50Hz, the interval between adjacent brightness values in the brightness value set is 20ms; the length of the time window is 400ms, and the step length is 1 brightness value; the time window first covers the 1 st to 20 th luminance values of the set of luminance values and then after a step covers the 2 nd to 21 nd luminance values 8230a full time until the last luminance value is covered. In this example, if there are n luminance values within the set of luminance values, a first set of luminance mean values with n-1 mean values may be obtained.
In the case where the terminal device has a front optical sensor and a rear optical sensor, the first set of luminance average values smooth _ fl1 of the front optical sensor and the first set of luminance average values smooth _ fl2 of the rear optical sensor may be obtained in this step.
In step S203, for the first brightness mean value set of each optical sensor, the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value is determined, so as to obtain a brightness difference value set of the optical sensor.
If the first luminance mean value set has n-1 mean values, a luminance difference value set having n-2 difference values can be obtained in this step.
In the case where the terminal device has a front optical sensor and a rear optical sensor, the set of luminance difference values diff _ fl1 of the front optical sensor and the set of luminance difference values diff _ fl2 of the rear optical sensor can be obtained in this step.
In step S204, for the unsmooth-processed brightness value set of each optical sensor, the brightness value set is divided into a plurality of brightness value subsets according to a preset time interval, and a mean and a variance of a plurality of brightness values in each brightness value subset are determined, so as to obtain a second brightness mean set and a brightness variance set of the optical sensor.
If all the brightness values acquired by the optical sensor within the preset time duration are acquired in step S101, the brightness value subsets may be divided according to the time interval and the time of each brightness value in the brightness value set; if the brightness values acquired by the optical sensor within the preset time duration are acquired according to the preset frequency in step S101, the brightness value subset may be divided according to the time interval and the preset frequency.
Illustratively, if the preset frequency when the brightness value is obtained in step S101 is 50Hz, the interval between adjacent brightness values in the brightness value set is 20ms; the time interval is 400ms; the 1 st to 20 th luminance values within the set of luminance values are divided into the 1 st subset of luminance values and the 21 st to 40 th luminance values are divided into the 2 nd subset of luminance values \8230, and \8230, until all luminance values have been divided.
When the mean and the variance of the plurality of luminance values in each luminance value subset are determined, the mean may be calculated according to each luminance value in the luminance value subset, and then the variance may be calculated according to the mean and each luminance value.
In the case where the terminal device has a front optical sensor and a rear optical sensor, the second set of luminance mean values avg _ l1 and the set of luminance variances std _ l1 of the front optical sensor, and the second set of luminance mean values avg _ l2 and the set of luminance variances std _ l2 of the rear optical sensor may be obtained in this step.
In step S205, the optical state of each optical sensor is determined according to the set of brightness differences and the set of brightness variances of each optical sensor.
For example, for each optical sensor, in the case that there is a difference greater than a first threshold in the set of brightness difference values or there is a variance greater than a second threshold in the set of brightness variances, determining that the optical state of the optical sensor is a fluctuating state; for each optical sensor, determining that the optical state of the optical sensor is a stable state when there is no difference greater than or equal to a third threshold in the set of brightness difference values and no variance greater than or equal to a fourth threshold in the set of brightness variances.
In the case where the terminal device has a front optical sensor and a rear optical sensor, in this step: if the difference value larger than the first threshold value exists in the brightness difference value set diff _ fl1 or the variance larger than the second threshold value exists in the brightness variance set std _ l1, determining that the optical state of the front optical sensor is a fluctuation state; if the difference value larger than or equal to the third threshold value does not exist in the brightness difference value set diff _ fl1 and the variance larger than or equal to the fourth threshold value does not exist in the brightness variance set std _ l1, determining that the optical state of the front optical sensor is a stable state; if the difference value larger than the first threshold value exists in the brightness difference value set diff _ fl2 or the variance larger than the second threshold value exists in the brightness variance set std _ l2, determining that the optical state of the rear optical sensor is a fluctuation state; if there is no difference greater than or equal to the third threshold in the brightness difference set diff _ fl2 and there is no variance greater than or equal to the fourth threshold in the brightness variance set std _ l2, it is determined that the optical state of the post-optical sensor is in a stable state.
It will be appreciated that the first and second thresholds may be equal, for example 5; the third threshold and the fourth threshold may be equal, for example 1. The first threshold and the third threshold may be equal or unequal; when the difference values are not equal, if the set of brightness difference values and the set of brightness variance do not satisfy any of the two cases, determining the optical state of the optical sensor to be the last determined optical state, i.e. keeping the optical state unchanged. Therefore, the optical state can be switched once when the difference value or the variance crosses two thresholds, and the instability of the brightness control of the display screen caused by frequent switching of the optical state is avoided.
In another embodiment, the optical state of each optical sensor may be determined in the manner as shown in fig. 3, including step S301 to step S305.
In step S301, the luminance values within the luminance value set of each optical sensor are subjected to smoothing processing, respectively.
In step S302, for the smoothed brightness value set of each optical sensor, a preset time window is moved from a first brightness value to a last brightness value according to a preset step length within the brightness value set, and a mean value of a plurality of brightness values covered by the time window at each position is determined, so as to obtain a first brightness mean value set of the optical sensor.
In step S303, for the brightness mean value set of each optical sensor, the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value is determined, so as to obtain a brightness difference value set of the optical sensor.
In step S304, for the unsmooth-processed brightness value set of each optical sensor, the brightness value set is divided into a plurality of brightness value subsets according to a preset time interval, and a mean value and a variance of a plurality of brightness values in each brightness value subset are determined, so as to obtain a second brightness mean value set and a brightness variance set of the optical sensor.
In step S305, for each optical sensor, the smoothed luminance value set, the first luminance mean value set, the luminance difference value set, the second luminance mean value set, and the luminance variance set are input to an optical state prediction model that is trained in advance, so as to obtain an optical state of the optical sensor output by the optical state prediction model.
Steps S301 to S304 are the same as steps S201 to S204 in the manner shown in fig. 2, and are not repeated here.
The optical state prediction model may be a neural network model, and training is performed by using a training sample in a training set until convergence, where the training sample includes a smoothed luminance value set, a first luminance mean value set, a luminance difference value set, a second luminance mean value set, and a luminance variance set, and the training sample is labeled with a label, that is, a steady state or a fluctuation state. The optical state of the optical sensor is predicted by adopting the optical state prediction model, so that the method is accurate and high in automation degree.
In the case where the terminal device has a front optical sensor and a rear optical sensor, in this step: inputting f _ l1, smooth _ fl1, diff _ fl1, avg _ l1 and std _ l1 into an optical state prediction model which is trained in advance to obtain an optical state of a front-mounted optical sensor output by the optical state prediction model; and f _ l2, smooth _ fl2, diff _ fl2, avg _ l2 and std _ l2 are input into an optical state prediction model which is trained in advance, so that the optical state of the rear optical sensor output by the optical state prediction model is obtained.
It will be appreciated that the two embodiments described above may be used alone or in combination. For example, the two can be combined to yield the following determination: if the set of luminance difference values and the set of luminance variance values satisfy either of the two conditions in step S205, the optical state of the optical sensor is determined in step S205, and if the set of luminance difference values and the set of luminance variance values do not satisfy either of the two conditions in step S205, the optical state of the optical sensor may be determined in step S305, that is, the optical state of the optical sensor is predicted by using an optical state prediction model.
It is understood that the optical state of each optical sensor determined in step S102 is necessary to be determined in the non-dark state, and if it is determined in the dark state, the optical state of each optical sensor has no practical meaning. Therefore, in step S102, in response to that the brightness value collected by at least one optical sensor at the current time is not 0, the optical state of each optical sensor may be determined according to the brightness value collected by each optical sensor within the preset time period.
In addition, in response to that the brightness value acquired by each optical sensor at the current moment is 0, the brightness of the display screen is controlled to be kept at the preset brightness. The preset brightness can be a preset brightness value of the display screen in a dark environment, and the brightness value is low, so that the eyes of a user are prevented from being injured. The brightness of the display screen is directly adjusted in a dark environment, and power consumption waste caused by the steps S102 to S104 is avoided.
In step S103, an optical state of an environment in which the terminal device is located is determined according to an optical state of each optical sensor, where the optical state of the environment includes a point light source steady state, a multi-light source steady state, and a fluctuation state.
Under the environment of multiple light sources, the optical state of each optical sensor can reach a stable state; in the environment of a point light source, if the FOVs of the optical sensors are different, only the optical states of part of the optical sensors can reach a stable state; in both a multi-light-source environment and a point-light-source environment, when the terminal device is turned over or the like, the optical state of each optical sensor is often in a fluctuating state. Therefore, for example, in a case where the optical state of each optical sensor is a stable state, it is determined that the optical state of the environment in which the terminal device is located is a multi-light-source stable state; under the condition that the optical state of each optical sensor is a fluctuation state, determining that the optical state of the environment where the terminal equipment is located is the fluctuation state; and under the condition that the optical state of the at least one optical sensor is a fluctuation state and the optical state of the at least one optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a point light source stable state.
Under the condition that the terminal equipment is provided with a front optical sensor and a rear optical sensor, if the optical states of the front optical sensor and the rear optical sensor are stable states, the optical state of the environment where the terminal equipment is located is a multi-light-source stable state; if the optical states of the front optical sensor and the rear optical sensor are both in a fluctuation state, the optical state of the environment where the terminal equipment is located is in the fluctuation state; and if the optical state of one of the front optical sensor and the rear optical sensor is a fluctuation state and the fluctuation state of the other one is a stable state, the optical state of the environment where the terminal equipment is located is a point light source stable state.
In step S104, the brightness of the display screen is controlled according to the optical state of the environment where the terminal device is located.
Under the stable state of multiple light sources, the brightness value acquired by each optical sensor can represent the ambient brightness more accurately; in a fluctuation state, because the terminal equipment has posture change, the brightness value acquired by each optical sensor can represent the ambient brightness more accurately; in a steady state of the point light source, the angle between the FOV of the optical sensor in a fluctuation state and the light direction frequently changes, so that the change of the brightness value collected by the optical sensor cannot accurately represent the change of the ambient brightness, that is, when the ambient brightness is stable, the brightness value collected by the optical sensor may change greatly. Therefore, for example, in the case that the optical state of the environment in which the terminal device is located is a multi-light-source steady state or a fluctuation state, the brightness of the display screen is controlled according to the brightness value collected by each optical sensor (the currently collected brightness value or the brightness value collected within a time period before the current time); and under the condition that the optical state of the environment where the terminal equipment is located is a point light source stable state, determining target brightness according to the brightness value collected by each optical sensor when the optical sensor enters the point light source stable state, and controlling the brightness of the display screen to be kept at the target brightness.
When the environment is in a multi-light-source state and a fluctuation state, the brightness change acquired by the optical sensor can accurately represent the brightness change of the environment light, so that the brightness of the display screen can be adjusted along with the acquired brightness value, namely, the brightness of the display screen is controlled according to a mode of automatically adjusting the brightness of the display screen in the related art. When the environment is in the point light source stable state, the brightness value change collected by the optical sensor cannot accurately represent the brightness change of the environment light (for example, the brightness in the point light source environment does not change, but the brightness value collected by at least one optical sensor frequently changes and has a large variation), so that if the brightness of the display screen is adjusted along with the collected brightness value, the brightness adjustment is inaccurate, and the brightness mutation and other problems frequently occur.
Under the environment of multiple light sources, the time of the terminal equipment in the stable state of the multiple light sources is far more than that of the fluctuation state, because the fluctuation state is caused when the user turns over the terminal equipment; under the point light source environment, the terminal device is in the stable state of the point light source for a far longer time than in the fluctuation state, because the fluctuation state is caused when the user turns over the terminal device. Therefore, when the terminal device is in the surge state, the terminal device tends to return to any one of the stable states in a short time, and tends to return to the state before the surge state because the environment does not change in a short time. Based on the above, in response to the optical state of the environment where the terminal device is located being switched from the point light source stable state to the fluctuation state, the brightness of the display screen is controlled within a preset time (for example, 2 min) to maintain the target brightness. Therefore, the brightness of the display screen can be kept unchanged when the terminal equipment enters a fluctuation state in a point light source environment for a short time, so that the problems of inaccurate brightness adjustment, sudden change and the like caused by frequent adjustment of the brightness of the display screen in the point light source environment are further avoided, and the use experience of a user is improved.
According to the brightness control method provided by the embodiment of the disclosure, by acquiring the brightness value of each optical sensor in the plurality of optical sensors of the terminal device, the optical state of each optical sensor can be respectively determined according to the brightness value of each optical sensor in the preset time, the optical state of the environment where the terminal device is located is further determined according to the optical state of each optical sensor, and finally the brightness of the display screen can be controlled according to the optical state of the environment where the terminal device is located. The method realizes detection of the optical state of the environment where the terminal device is located by determining the optical state of each optical sensor, and further realizes control of the brightness of the display screen according to the optical state, for example, different control strategies are adopted to control the brightness of the display screen under different optical states (namely a point light source state and a multi-light source state). Therefore, the brightness control of the display screen is more accurate, and the definition and the comfort level of the display screen are improved; especially in the environment of point light sources, because the state of the point light sources is used as a factor for adjusting the brightness, and the brightness is adjusted by adopting a control strategy under the state of the point light sources, the brightness adjustment accuracy of the display screen, and the definition and the comfort of the display screen are obviously improved compared with the related technology.
According to a second aspect of the embodiments of the present disclosure, there is provided a brightness control apparatus applied to a terminal device having a display screen and a plurality of optical sensors, referring to fig. 4, the apparatus includes:
an obtaining module 401, configured to obtain a brightness value, collected by each optical sensor in the plurality of optical sensors within a preset time period;
a first state module 402, configured to determine an optical state of each optical sensor according to a brightness value acquired by each optical sensor within a preset time period, where the optical state of each optical sensor includes a steady state and a fluctuation state;
a second status module 403, configured to determine an optical status of an environment where the terminal device is located according to an optical status of each optical sensor, where the optical status of the environment includes a point light source steady state, a multiple light source steady state, and a fluctuation state;
and a control module 404, configured to control the brightness of the display screen according to an optical state of an environment where the terminal device is located.
In some embodiments of the disclosure, the obtaining module is specifically configured to:
and acquiring the brightness value of each optical sensor collected in a preset time period according to a preset frequency to obtain the brightness value set of each optical sensor.
In some embodiments of the disclosure, the first status module is specifically configured to:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the first brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and respectively determining the optical state of each optical sensor according to the brightness difference value set and the brightness variance set of each optical sensor.
In some embodiments of the present disclosure, the first state module, when configured to respectively determine the optical state of each optical sensor according to the brightness difference set and the brightness variance set of each optical sensor, is specifically configured to:
for each optical sensor, determining that the optical state of the optical sensor is a fluctuation state if there is a difference greater than a first threshold in the set of brightness difference values or a variance greater than a second threshold in the set of brightness variances;
for each optical sensor, determining that the optical state of the optical sensor is a stable state when there is no difference greater than or equal to a third threshold in the set of brightness difference values and no variance greater than or equal to a fourth threshold in the set of brightness variances.
In some embodiments of the present disclosure, the first status module is specifically configured to:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and for each optical sensor, inputting the brightness value set, the first brightness mean value set, the brightness difference value set, the second brightness mean value set and the brightness variance set which are subjected to smoothing treatment into an optical state prediction model which is trained in advance, and obtaining the optical state of the optical sensor output by the optical state prediction model.
In some embodiments of the present disclosure, the first status module, when being configured to respectively smooth the brightness values in the brightness value set of each optical sensor, is specifically configured to:
converting the brightness value set of each optical sensor from a time domain form to a frequency domain form;
and filtering the brightness value set in each frequency domain form, and converting each filtered brightness value set from the frequency domain form into a time domain form to obtain the brightness value set of each optical sensor after smoothing.
In some embodiments of the present disclosure, the second status module is specifically configured to:
under the condition that the optical state of each optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state;
under the condition that the optical state of each optical sensor is a fluctuation state, determining that the optical state of the environment where the terminal equipment is located is a fluctuation state;
and under the condition that the optical state of the at least one optical sensor is a fluctuation state and the optical state of the at least one optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a point light source stable state.
In some embodiments of the present disclosure, the control module is specifically configured to:
under the condition that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state or a fluctuation state, controlling the brightness of the display screen according to the brightness value acquired by each optical sensor;
and under the condition that the optical state of the environment where the terminal equipment is located is a stable state of the point light source, determining target brightness according to the brightness value collected by each optical sensor when the optical sensor enters the stable state of the point light source, and controlling the brightness of the display screen to be kept at the target brightness.
In some embodiments of the present disclosure, a holding module is further included for:
and responding to the optical state of the environment where the terminal equipment is located, switching from a point light source stable state to a fluctuation state, and controlling the brightness of the display screen to keep the target brightness within a preset time length.
In some embodiments of the present disclosure, a dark module is further included for:
responding to that the brightness value collected by each optical sensor at the current moment is 0, and controlling the brightness of the display screen to be kept at the preset brightness;
the second status module is specifically configured to:
and in response to the fact that the brightness value acquired by at least one optical sensor at the current moment is not 0, respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period.
With regard to the apparatus in the above-mentioned embodiments, the specific manner in which each module performs the operation has been described in detail in the first aspect with respect to the embodiment of the method, and will not be elaborated here.
According to a third aspect of the embodiments of the present disclosure, please refer to fig. 5, which schematically illustrates a block diagram of an electronic device. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operation at the device 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile and non-volatile storage devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 506 provide power to the various components of device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect the open/closed status of the device 500, the relative positioning of the components, such as the display and keypad of the device 500, the change in position of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration/deceleration of the device 500, and the change in temperature of the device 500. The sensor assembly 514 may also include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The device 500 may access a wireless network based on a communication standard, such as WiFi,2G or 3g,4g or 5G or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described power supply method of the electronic device.
In a fourth aspect, the present disclosure also provides, in an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the apparatus 500 to perform the method for powering the electronic device. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (22)

1. A luminance control method applied to a terminal device having a display screen and a plurality of optical sensors, the method comprising:
acquiring a brightness value collected by each optical sensor in the plurality of optical sensors within a preset time length;
respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period, wherein the optical state of each optical sensor at least comprises a stable state and/or a fluctuation state;
determining an optical state of an environment in which the terminal device is located according to the optical state of each optical sensor, wherein the optical state of the environment at least comprises one of a point light source stable state, a multi-light source stable state and a fluctuation state;
and controlling the brightness of the display screen according to the optical state of the environment where the terminal equipment is located.
2. The method according to claim 1, wherein the obtaining the brightness value collected by each of the plurality of optical sensors within a preset time period comprises:
and acquiring the brightness value of each optical sensor collected in a preset time period according to a preset frequency to obtain the brightness value set of each optical sensor.
3. The brightness control method according to claim 2, wherein the determining the optical state of each optical sensor according to the brightness value collected by each optical sensor in the preset time period comprises:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the first brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and respectively determining the optical state of each optical sensor according to the brightness difference value set and the brightness variance set of each optical sensor.
4. The method according to claim 3, wherein the determining the optical state of each optical sensor separately according to the set of brightness difference values and the set of brightness variances of each optical sensor comprises:
for each optical sensor, determining that the optical state of the optical sensor is a fluctuation state if there is a difference greater than a first threshold in the set of brightness difference values or a variance greater than a second threshold in the set of brightness variances;
for each optical sensor, determining that the optical state of the optical sensor is a steady state if there is no difference greater than or equal to a third threshold in the set of brightness differences and no variance greater than or equal to a fourth threshold in the set of brightness variances.
5. The brightness control method according to claim 2, wherein the determining the optical state of each optical sensor according to the brightness value collected by each optical sensor in the preset time period comprises:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain the brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and for each optical sensor, inputting the brightness value set, the first brightness mean value set, the brightness difference value set, the second brightness mean value set and the brightness variance set which are subjected to smoothing treatment into an optical state prediction model which is trained in advance, and obtaining the optical state of the optical sensor output by the optical state prediction model.
6. The luminance control method according to any one of claims 2 to 5, wherein the smoothing of the luminance values within the set of luminance values of each optical sensor, respectively, comprises:
converting the brightness value set of each optical sensor from a time domain form to a frequency domain form;
and carrying out filtering processing on the brightness value set of each frequency domain form, and converting each filtered brightness value set from the frequency domain form to a time domain form to obtain a smoothed brightness value set of each optical sensor.
7. The brightness control method according to claim 1, wherein the determining the optical state of the environment in which the terminal device is located according to the optical state of each optical sensor comprises:
under the condition that the optical state of each optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state;
under the condition that the optical state of each optical sensor is a fluctuation state, determining that the optical state of the environment where the terminal equipment is located is the fluctuation state;
and under the condition that the optical state of the at least one optical sensor is a fluctuation state and the optical state of the at least one optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a point light source stable state.
8. The brightness control method according to claim 7, wherein the controlling the brightness of the display screen according to the optical state of the environment where the terminal device is located comprises:
under the condition that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state or a fluctuation state, controlling the brightness of the display screen according to the brightness value acquired by each optical sensor;
and under the condition that the optical state of the environment where the terminal equipment is located is a stable state of the point light source, determining target brightness according to the brightness value collected by each optical sensor when the optical sensor enters the stable state of the point light source, and controlling the brightness of the display screen to be kept at the target brightness.
9. The luminance control method according to claim 8, further comprising:
and responding to the optical state of the environment where the terminal equipment is located, switching from a point light source stable state to a fluctuation state, and controlling the brightness of the display screen to keep the target brightness within a preset time length.
10. The luminance control method according to claim 1, characterized by further comprising:
responding to that the brightness value collected by each optical sensor at the current moment is 0, and controlling the brightness of the display screen to be kept at the preset brightness;
the determining the optical state of each optical sensor according to the brightness value collected by each optical sensor within the preset time period includes:
and in response to the fact that the brightness value acquired by at least one optical sensor at the current moment is not 0, respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period.
11. A luminance control apparatus applied to a terminal device having a display screen and a plurality of optical sensors, the apparatus comprising:
the acquisition module is used for acquiring the brightness value acquired by each optical sensor in the plurality of optical sensors within a preset time length;
the first state module is used for respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period, wherein the optical state of each optical sensor comprises a stable state and a fluctuation state;
the second state module is used for determining the optical state of the environment where the terminal equipment is located according to the optical state of each optical sensor, wherein the optical state of the environment comprises a point light source stable state, a multi-light source stable state and a fluctuation state;
and the control module is used for controlling the brightness of the display screen according to the optical state of the environment where the terminal equipment is located.
12. The luminance control device according to claim 11, wherein the obtaining module is specifically configured to:
and acquiring the brightness value of each optical sensor collected in a preset time length according to a preset frequency to obtain the brightness value set of each optical sensor.
13. The brightness control device according to claim 12, wherein the first state module is specifically configured to:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the first brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and respectively determining the optical state of each optical sensor according to the brightness difference value set and the brightness variance set of each optical sensor.
14. The brightness control apparatus according to claim 13, wherein the first state module, when determining the optical state of each optical sensor according to the brightness difference set and the brightness variance set of each optical sensor, is specifically configured to:
for each optical sensor, determining that the optical state of the optical sensor is a fluctuation state if there is a difference greater than a first threshold in the set of brightness difference values or a variance greater than a second threshold in the set of brightness variances;
for each optical sensor, determining that the optical state of the optical sensor is a stable state when there is no difference greater than or equal to a third threshold in the set of brightness difference values and no variance greater than or equal to a fourth threshold in the set of brightness variances.
15. The apparatus according to claim 12, wherein the first status module is specifically configured to:
respectively smoothing the brightness values in the brightness value set of each optical sensor;
for the brightness value set after the smoothing processing of each optical sensor, moving a preset time window from a first brightness value to a last brightness value according to a preset step length in the brightness value set, and determining the average value of a plurality of brightness values covered by the time window at each position to obtain a first brightness average value set of the optical sensor;
for the brightness mean value set of each optical sensor, determining the difference value between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference value set of the optical sensor;
for the unsmooth brightness value set of each optical sensor, dividing the brightness value set into a plurality of brightness value subsets according to a preset time interval, and determining the mean value and the variance of a plurality of brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor;
and for each optical sensor, inputting the brightness value set, the first brightness mean value set, the brightness difference value set, the second brightness mean value set and the brightness variance set which are subjected to smoothing treatment into an optical state prediction model which is trained in advance, and obtaining the optical state of the optical sensor output by the optical state prediction model.
16. The luminance control device according to any one of claims 12 to 15, wherein the first state module is configured to, when performing smoothing processing on the luminance values in the luminance value set of each optical sensor, specifically:
converting the brightness value set of each optical sensor from a time domain form to a frequency domain form;
and filtering the brightness value set in each frequency domain form, and converting each filtered brightness value set from the frequency domain form into a time domain form to obtain the brightness value set of each optical sensor after smoothing.
17. The brightness control device according to claim 11, wherein the second state module is specifically configured to:
under the condition that the optical state of each optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state;
under the condition that the optical state of each optical sensor is a fluctuation state, determining that the optical state of the environment where the terminal equipment is located is the fluctuation state;
and under the condition that the optical state of the at least one optical sensor is a fluctuation state and the optical state of the at least one optical sensor is a stable state, determining that the optical state of the environment where the terminal equipment is located is a point light source stable state.
18. The luminance control apparatus according to claim 17, wherein the control module is specifically configured to:
under the condition that the optical state of the environment where the terminal equipment is located is a multi-light-source stable state or a fluctuation state, controlling the brightness of the display screen according to the brightness value acquired by each optical sensor;
and under the condition that the optical state of the environment where the terminal equipment is located is a point light source stable state, determining target brightness according to the brightness value collected by each optical sensor when the optical sensor enters the point light source stable state, and controlling the brightness of the display screen to be kept at the target brightness.
19. The luminance control apparatus as claimed in claim 18, further comprising a holding module for:
and responding to the optical state of the environment where the terminal equipment is located, switching from a point light source stable state to a fluctuation state, and controlling the brightness of the display screen to keep the target brightness within a preset time length.
20. The brightness control apparatus according to claim 11, further comprising a dark module for:
responding to that the brightness value collected by each optical sensor at the current moment is 0, and controlling the brightness of the display screen to be kept at the preset brightness;
the second status module is specifically configured to:
and in response to the fact that the brightness value acquired by at least one optical sensor at the current moment is not 0, respectively determining the optical state of each optical sensor according to the brightness value acquired by each optical sensor within a preset time period.
21. An electronic device, comprising a memory for storing computer instructions executable on a processor, the processor being configured to perform the brightness control method according to any one of claims 1 to 10 when executing the computer instructions.
22. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of any one of claims 1 to 10.
CN202211430257.1A 2022-11-15 2022-11-15 Brightness control method and device, electronic equipment and storage medium Pending CN115719589A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211430257.1A CN115719589A (en) 2022-11-15 2022-11-15 Brightness control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211430257.1A CN115719589A (en) 2022-11-15 2022-11-15 Brightness control method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115719589A true CN115719589A (en) 2023-02-28

Family

ID=85255200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211430257.1A Pending CN115719589A (en) 2022-11-15 2022-11-15 Brightness control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115719589A (en)

Similar Documents

Publication Publication Date Title
CN110796988B (en) Backlight adjusting method and device
CN107872576B (en) Alarm clock reminding method and device and computer readable storage medium
CN108200279B (en) Backlight adjusting method, device and equipment
CN111128091B (en) Screen brightness adjusting method, screen brightness adjusting device and computer storage medium
CN111611034A (en) Screen display adjusting method and device and storage medium
CN111901459A (en) Color temperature adjusting method, device, terminal and storage medium
CN109522058B (en) Wake-up method, device, terminal and storage medium
CN107247535B (en) Intelligent mirror adjusting method and device and computer readable storage medium
CN109711282A (en) Light adjusting method and device
CN108597456B (en) Backlight brightness adjusting method and device
CN114187874B (en) Brightness adjusting method, device and storage medium
CN106775246B (en) Screen brightness adjusting method and device
CN108682400B (en) Brightness adjusting method and device
CN108156381B (en) Photographing method and device
CN115719589A (en) Brightness control method and device, electronic equipment and storage medium
CN112086075B (en) Screen display parameter adjusting method and device and storage medium
CN111405115B (en) Display brightness adjusting method and device, mobile terminal and storage medium
CN111314550A (en) Display control method and device, mobile terminal and storage medium
CN112037719A (en) Screen brightness adjusting method and device
CN113241044B (en) Screen brightness adjusting method, device, equipment and storage medium
CN111385400A (en) Backlight brightness adjusting method and device
CN111880642A (en) Method and device for controlling terminal and storage medium
CN112087539A (en) Screen light adjusting method for terminal equipment and terminal equipment
US11798516B2 (en) Method and device for adjusting display brightness, mobile terminal and storage medium
CN109166512B (en) Display screen brightness adjusting method and device and electronic equipment

Legal Events

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