Brightness Control Method, Device, Electronic Device and Storage Medium

Through multiple optical sensors, the environmental status of the terminal equipment and the brightness of the display screen is solved, and the problem of inaccurate brightness adjustment in the point light source environment is improved, the clarity and comfort of the display screen are improved, and the user experience is improved.

CN115719589BActive Publication Date: 2025-07-08BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211430257.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-15
Publication Date
2025-07-08
Estimated Expiration
2042-11-15

AI Technical Summary

Technical Problem

The accuracy of display brightness adjustment of terminal devices in point light source environments is low, resulting in poor clarity and comfort, especially in low-light environments, brightness changes are sensitive to the human eye and affect the user experience.

Method used

The brightness values are collected by multiple optical sensors, the optical state of each sensor is determined, and the optical state of the environment in which the terminal device is located is judged according to the sensor state. Different control strategies are used to adjust the brightness of the display screen, including keeping the brightness unchanged in the stable state of the point light source to avoid frequent adjustments.

Benefits of technology

It improves the accuracy and clarity of the brightness adjustment of the display in a point light source environment, improves the user experience, and reduces the sudden change in brightness and discomfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115719589B_ABST
    Figure CN115719589B_ABST
Patent Text Reader

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: obtaining the brightness values collected by each of the plurality of optical sensors within a preset time period; respectively determining the optical state of each optical sensor according to the brightness values collected by each optical sensor within the preset time period, where the optical state of the optical sensor includes a stable state and a fluctuating state; determining the optical state of the environment in which the terminal device is located according to the optical state of each optical sensor, where the optical state of the environment includes a point light source stable state, a multi-light source stable state, and a fluctuating state; and controlling the brightness of the display screen according to the optical state of the environment in which the terminal device is located.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of terminal devices, and particularly to a brightness control method, apparatus, electronic device, and storage medium. Background Art

[0002] In recent years, the functions of terminal devices have become increasingly rich, and the performance of each function has gradually improved, resulting in an increasingly improved user experience. For example, the automatic brightness adjustment function of the display screen can adaptively adjust the brightness of the display screen according to the ambient light brightness, thereby providing a relatively clear and comfortable display brightness for the user in real time. In the environment where the terminal device is located, the ambient light can be multi-source light or point-source light. In the related art, the terminal device can perform relatively accurate brightness adjustment on the display screen in a multi-source light environment, but the accuracy of the brightness adjustment of the display screen in a point-source light environment is relatively low, resulting in poor clarity and comfort of the display screen. Summary of the Invention

[0003] To overcome the problems existing in the related art, embodiments of the present disclosure provide a brightness control method, apparatus, electronic device, and storage medium to solve the defects in the related art.

[0004] According to a first aspect of the embodiments of the present disclosure, a brightness control method is provided, which is applied to a terminal device having a display screen and a plurality of optical sensors. The method includes:

[0005] Obtain the brightness values collected by each optical sensor in the plurality of optical sensors within a preset time period;

[0006] According to the brightness values collected by each optical sensor within a preset time period, respectively determine the optical state of each optical sensor, where the optical state of the optical sensor includes a stable state and a fluctuating state;

[0007] According to the optical state of each optical sensor, determine the optical state of the environment where the terminal device is located, where the optical state of the environment includes a point-source stable state, a multi-source stable state, and a fluctuating state;

[0008] Control the brightness of the display screen according to the optical state of the environment where the terminal device is located.

[0009] In one embodiment, the obtaining the brightness values collected by each optical sensor in the plurality of optical sensors within a preset time period includes:

[0010] Obtain the brightness values collected by each optical sensor within a preset time period at a preset frequency to obtain a set of brightness values of each optical sensor.

[0011] In one embodiment, determining the optical state of each optical sensor according to the brightness values collected by each optical sensor within a preset time period includes:

[0012] Smoothing the brightness values in the brightness value set of each optical sensor respectively;

[0013] For the brightness value set after smoothing of each optical sensor, moving a preset time window from the first brightness value to the last brightness value within the brightness value set at a preset step length, and determining the mean value of the multiple brightness values covered by the time window at each position, to obtain the first brightness mean value set of the optical sensor;

[0014] For the first brightness mean value set of each optical sensor, determining the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value, to obtain the brightness difference set of the optical sensor;

[0015] For the brightness value set of each optical sensor that has not been smoothed, dividing the brightness value set into multiple brightness value subsets at a preset time interval, and determining the mean value and variance of the multiple brightness values in each brightness value subset, to obtain the second brightness mean value set and the brightness variance set of the optical sensor;

[0016] Determining the optical state of each optical sensor according to the brightness difference set and the brightness variance set of each optical sensor respectively.

[0017] In one embodiment, determining the optical state of each optical sensor according to the brightness difference set and the brightness variance set of each optical sensor respectively includes:

[0018] For each optical sensor, when there is a difference greater than a first threshold in the brightness difference set, or there is a variance greater than a second threshold in the brightness variance set, determining the optical state of the optical sensor as a fluctuating state;

[0019] For each optical sensor, when there is no difference greater than or equal to a third threshold in the brightness difference set, and there is no variance greater than or equal to a fourth threshold in the brightness variance set, determining the optical state of the optical sensor as a stable state.

[0020] In one embodiment, determining the optical state of each optical sensor according to the brightness values collected by each optical sensor within a preset time period includes:

[0021] Smoothing the brightness values in the brightness value set of each optical sensor respectively;

[0022] For the set of smoothed brightness values of each optical sensor, within the set of brightness values, move a preset time window from the first brightness value to the last brightness value at a preset step size, and determine the mean value of the multiple brightness values covered by the time window at each position, to obtain the first set of brightness mean values of the optical sensor;

[0023] For the set of brightness mean values of each optical sensor, determine the difference between each brightness mean value except the first one and the previous brightness mean value, to obtain the set of brightness differences of the optical sensor;

[0024] For the set of unsmoothed brightness values of each optical sensor, divide the set of brightness values into multiple subsets of brightness values at a preset time interval, and determine the mean value and variance of the multiple brightness values within each subset of brightness values, to obtain the second set of brightness mean values and the set of brightness variances of the optical sensor;

[0025] For each optical sensor, input the set of smoothed brightness values, the first set of brightness mean values, the set of brightness differences, the second set of brightness mean values, and the set of brightness variances into a pre-trained optical state prediction model, to obtain the optical state of the optical sensor output by the optical state prediction model.

[0026] In one embodiment, the smoothing the brightness values within the set of brightness values of each optical sensor respectively includes:

[0027] Convert the set of brightness values of each optical sensor from the time domain form to the frequency domain form;

[0028] Perform filtering processing on each set of brightness values in the frequency domain form, and convert each set of filtered brightness values from the frequency domain form to the time domain form, to obtain the set of smoothed brightness values of each optical sensor.

[0029] In one embodiment, the determining the optical state of the environment where the terminal device is located according to the optical state of each optical sensor includes:

[0030] When the optical state of each optical sensor is in a stable state, determine that the optical state of the environment where the terminal device is located is a multi-light source stable state;

[0031] When the optical state of each optical sensor is in a fluctuating state, determine that the optical state of the environment where the terminal device is located is a fluctuating state;

[0032] When the optical state of at least one optical sensor is in a fluctuating state and the optical state of at least one optical sensor is in a stable state, determine that the optical state of the environment where the terminal device is located is a point light source stable state.

[0033] In one embodiment, controlling the brightness of the display screen according to the optical state of the environment where the terminal device is located includes:

[0034] When the optical state of the environment where the terminal device is located is a multi-light-source stable state or a fluctuating state, controlling the brightness of the display screen according to the brightness values collected by each optical sensor;

[0035] When the optical state of the environment where the terminal device is located is a point-light-source stable state, determining a target brightness according to the brightness values collected by each optical sensor when entering the point-light-source stable state, and controlling the brightness of the display screen to remain at the target brightness.

[0036] In one embodiment, it further includes:

[0037] In response to the optical state of the environment where the terminal device is located switching from the point-light-source stable state to the fluctuating state, controlling the brightness of the display screen to remain at the target brightness within a preset duration.

[0038] In one embodiment, it further includes:

[0039] In response to the brightness values collected by each optical sensor at the current moment being all 0, controlling the brightness of the display screen to remain at a preset brightness;

[0040] Determining the optical state of each optical sensor according to the brightness values collected by each optical sensor within a preset duration includes:

[0041] In response to the brightness value collected by at least one optical sensor at the current moment not being 0, determining the optical state of each optical sensor according to the brightness values collected by each optical sensor within a preset duration.

[0042] According to the second aspect of the embodiments of the present disclosure, a brightness control device is provided, which is applied to a terminal device having a display screen and a plurality of optical sensors. The device includes:

[0043] An acquisition module, configured to acquire the brightness values collected by each optical sensor among the plurality of optical sensors within a preset duration;

[0044] A first state module, configured to determine the optical state of each optical sensor according to the brightness values collected by each optical sensor within a preset duration, where the optical state of the optical sensor includes a stable state and a fluctuating state;

[0045] A second state module, configured to determine the optical state of the environment where the terminal device is located according to the optical state of each optical sensor, where the optical state of the environment includes a point-light-source stable state, a multi-light-source stable state, and a fluctuating state;

[0046] A control module, configured to control the brightness of the display screen according to the optical state of the environment where the terminal device is located.

[0047] In one embodiment, the obtaining module is specifically configured to:

[0048] Obtain the brightness values collected by each optical sensor within a preset duration at a preset frequency, to obtain a set of brightness values of each optical sensor.

[0049] In one embodiment, the first state module is specifically configured to:

[0050] Perform smoothing processing on the brightness values within the set of brightness values of each optical sensor respectively;

[0051] For the set of smoothed brightness values of each optical sensor, move a preset time window from the first brightness value to the last brightness value within the set of brightness values at a preset step length, and determine the mean value of the multiple brightness values covered by the time window at each position, to obtain a first set of brightness mean values of the optical sensor;

[0052] For the first set of brightness mean values of each optical sensor, determine the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value, to obtain a set of brightness differences of the optical sensor;

[0053] For the set of unsmoothed brightness values of each optical sensor, divide the set of brightness values into multiple subsets of brightness values at a preset time interval, and determine the mean value and variance of the multiple brightness values within each subset of brightness values, to obtain a second set of brightness mean values and a set of brightness variances of the optical sensor;

[0054] Determine the optical state of each optical sensor respectively according to the set of brightness differences and the set of brightness variances of each optical sensor.

[0055] In one embodiment, when the first state module is used to determine the optical state of each optical sensor respectively according to the set of brightness differences and the set of brightness variances of each optical sensor, it is specifically configured to:

[0056] For each optical sensor, when there is a difference greater than a first threshold in the set of brightness differences, or there is a variance greater than a second threshold in the set of brightness variances, determine that the optical state of the optical sensor is a fluctuating state;

[0057] For each optical sensor, when there is no difference greater than or equal to a third threshold in the set of brightness differences, and there is no variance greater than or equal to a fourth threshold in the set of brightness variances, determine that the optical state of the optical sensor is a stable state.

[0058] In one embodiment, the first status module is specifically configured to:

[0059] Smooth the brightness values in the brightness value set of each optical sensor respectively;

[0060] For the set of smoothed brightness values of each optical sensor, move a preset time window from the first brightness value to the last brightness value in the brightness value set at a preset step length, and determine the mean value of the multiple brightness values covered by the time window at each position, to obtain the first brightness mean value set of the optical sensor;

[0061] For the brightness mean value set of each optical sensor, determine the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value, to obtain the brightness difference set of the optical sensor;

[0062] For the set of unsmoothed brightness values of each optical sensor, divide the brightness value set into multiple brightness value subsets at a preset time interval, and determine the mean value and variance of the multiple brightness values in each brightness value subset, to obtain the second brightness mean value set and the brightness variance set of the optical sensor;

[0063] For each optical sensor, input the set of smoothed brightness values, the first brightness mean value set, the brightness difference set, the second brightness mean value set, and the brightness variance set into a pre-trained optical status prediction model, to obtain the optical status of the optical sensor output by the optical status prediction model.

[0064] In one embodiment, when the first status module is used to smooth the brightness values in the brightness value set of each optical sensor respectively, it is specifically configured to:

[0065] Convert the brightness value set of each optical sensor from the time domain form to the frequency domain form;

[0066] Perform filtering processing on each brightness value set in the frequency domain form, and convert each filtered brightness value set from the frequency domain form to the time domain form, to obtain the set of smoothed brightness values of each optical sensor.

[0067] In one embodiment, the second status module is specifically configured to:

[0068] When the optical status of each optical sensor is in a stable state, determine that the optical status of the environment where the terminal device is located is a multi-light source stable state;

[0069] When the optical status of each optical sensor is in a fluctuating state, determine that the optical status of the environment where the terminal device is located is a fluctuating state;

[0070] When the optical state of at least one optical sensor is in a fluctuating state and the optical state of at least one optical sensor is in a stable state, it is determined that the optical state of the environment where the terminal device is located is a point light source stable state.

[0071] In one embodiment, the control module is specifically configured to:

[0072] When the optical state of the environment where the terminal device is located is in a multi-light source stable state or a fluctuating state, control the brightness of the display screen according to the brightness values collected by each optical sensor;

[0073] When the optical state of the environment where the terminal device is located is in a point light source stable state, determine the target brightness according to the brightness values collected by each optical sensor when entering the point light source stable state, and control the brightness of the display screen to remain at the target brightness.

[0074] In one embodiment, it further includes a holding module, which is used for:

[0075] In response to the optical state of the environment where the terminal device is located switching from the point light source stable state to the fluctuating state, control the brightness of the display screen to remain at the target brightness within a preset time period.

[0076] In one embodiment, it further includes a darkness module, which is used for:

[0077] In response to the brightness values collected by each optical sensor at the current moment being all 0, control the brightness of the display screen to remain at a preset brightness;

[0078] The second state module is specifically used for:

[0079] In response to the brightness values collected by at least one optical sensor at the current moment not being 0, determine the optical states of each optical sensor respectively according to the brightness values collected by each optical sensor within a preset time period.

[0080] According to the third aspect of the embodiments of the present disclosure, there is provided an electronic device, which includes a memory and a processor. The memory is used to store computer instructions that can be run on the processor, and the processor is used to perform the brightness control method according to the first aspect when executing the computer instructions.

[0081] According to the fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method according to the first aspect is implemented.

[0082] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

[0083] The brightness control method provided by the embodiments of the present disclosure can determine the optical state of each optical sensor according to the brightness values collected by each optical sensor of the terminal device within a preset duration by obtaining the brightness values collected by each optical sensor of the terminal device within the preset duration. Further, according to the optical state of each optical sensor, the optical state of the environment where the terminal device is located can be determined. Finally, the brightness of the display screen can be controlled according to the optical state of the environment where the terminal device is located. By determining the optical state of each optical sensor, this method realizes the detection of the optical state of the environment where the terminal device is located, and further realizes the 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 in different optical states (i.e., point light source state and multi-light source state). Therefore, the brightness control of the display screen is more accurate, and the clarity and comfort of the display screen are improved. Especially in the environment of a point light source, since the point light source state is used as a factor for brightness adjustment and the control strategy in the point light source state is adopted to adjust the brightness, the accuracy of brightness adjustment, the clarity and comfort of the display screen are significantly improved compared with the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] The accompanying drawings are incorporated herein and form a part of this specification, showing embodiments consistent with the present invention and, together with the specification, are used to explain the principles of the present invention.

[0085] Figure 1 is a flowchart of a brightness control method shown in an exemplary embodiment of the present disclosure;

[0086] Figure 2 is a flowchart of a brightness control method shown in another exemplary embodiment of the present disclosure;

[0087] Figure 3 is a flowchart of a brightness control method shown in yet another exemplary embodiment of the present disclosure;

[0088] Figure 4 is a schematic structural diagram of a brightness control device shown in an exemplary embodiment of the present disclosure;

[0089] Figure 5 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0090] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0091] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms "a", "the", and "said" used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly dictates 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.

[0092] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0093] In recent years, the functions of terminal devices have become increasingly rich, and the performance of each function has gradually improved, resulting in a continuous improvement in the user experience. For example, the automatic brightness adjustment function of the display screen can adaptively adjust the brightness of the display screen according to the ambient light brightness, so as to provide a relatively clear and comfortable display brightness for the user in real time. In the environment where the terminal device is located, the ambient light can be multi-source light or point light source. In the related art, the terminal device can adjust the brightness of the display screen more accurately in a multi-source light environment, but the accuracy of adjusting the brightness of the display screen in a point light source environment is relatively low, resulting in poor clarity and comfort of the display screen.

[0094] A point light source is a type of light source commonly found in homes, often a table lamp or a single light bulb or a similar scenario. In such scenarios, the human eye perceives the ambient light much more accurately than an optical sensor. Because the FOV of the optical sensor is limited, if it is directly irradiated, the collected brightness value will be slightly higher than the brightness value perceived by the human eye. If it is not directly irradiated, the collected brightness value will very likely be extremely low. Therefore, in a point light source environment, the brightness value collected by the optical sensor of the terminal device is inaccurate and there are frequent mutations. If the brightness of the display screen is controlled in real time based on this, it will result in poor clarity and comfort of the display screen, and even cause the user to be unable to clearly see the display screen normally. It should be particularly noted that the point light source scene is often a low-light environment, and the human eye's perception of brightness shows an exponential change. Therefore, the brightness change of the display screen in a low-light environment is more sensitive to the human eye, that is, a slight change in the brightness of the display screen in a low-light environment will also cause a strong perception by the human eye, easily resulting in being unable to see clearly and discomfort.

[0095] Based on this, in a first aspect, at least one embodiment of this disclosure provides a brightness control method. Please refer to the appendixFigure 1 , which shows the flow of the brightness control method, including steps S101 to S104.

[0096] Among them, this method can be applied to a terminal device with a display screen and multiple optical sensors, that is, to control the brightness of the display screen of the terminal device. The optical sensor can collect the brightness value of the light within its FOV. Exemplarily, the terminal device can have two optical sensors, one of which can be installed on the front of the terminal device (i.e., the light-emitting side of the display screen) as a front optical sensor, and the other can be installed on the back of the terminal device (i.e., the backlight side of the display screen) as a rear optical sensor.

[0097] In step S101, obtain the brightness value collected by each optical sensor within a preset time period among the multiple optical sensors.

[0098] Among them, the optical sensor can record the time when the light intensity (i.e., ambient light brightness) within its FOV changes and collect the changed brightness value. Exemplarily, in this step, all the brightness values collected by the optical sensor within the preset time period can be obtained to form a brightness value set of the optical sensor. Another exemplarily, in this step, the brightness values collected by each optical sensor within the preset time period can also be obtained at a preset frequency (such as 30Hz, 50Hz, etc.) to obtain a brightness value set for each optical sensor; since the time is recorded for each brightness value collected by the optical sensor, it is convenient to obtain the brightness value at the preset frequency.

[0099] Among them, the preset time period can be set as needed, such as 30min, 20min, 10min, etc.; in addition, the preset time period can be the most recent preset time period, such as the most recent 30min, that is, the preset time period is 30min forward from the current moment.

[0100] In the case where the terminal device has a front optical sensor and a rear optical sensor, the brightness value set l1 of the front optical sensor and the brightness value set l2 of the rear optical sensor can be obtained in this step.

[0101] In step S102, according to the brightness value collected by each optical sensor within the preset time period, determine the optical state of each optical sensor respectively, where the optical state of the optical sensor includes a stable state and a fluctuating state.

[0102] In a possible embodiment, the optical state of each optical sensor can be determined in the manner as Figure 2 shown, including steps S201 to S205.

[0103] In step S201, perform smoothing processing on the brightness values within the brightness value set of each optical sensor respectively.

[0104] Exemplarily, first, the brightness value sets of each optical sensor are converted from the time domain form to the frequency domain form; next, the brightness value sets in the frequency domain form are filtered, and each filtered brightness value set is converted from the frequency domain form to the time domain form to obtain the smoothed brightness value sets of each optical sensor. Among them, at least one of the following filter methods can be used to filter the brightness value sets: low-pass filter, band-pass filter, infinite impulse filter.

[0105] The abnormally large or small brightness values in the smoothed brightness value sets are corrected, so that the multiple brightness values in the brightness value sets are relatively smooth, and the change between adjacent brightness values is relatively gentle.

[0106] In the case where the terminal device has a front optical sensor and a rear optical sensor, the smoothed brightness value set f_l1 of the front optical sensor and the smoothed brightness value set f_l2 of the rear optical sensor can be obtained in this step.

[0107] In step S202, for the smoothed brightness value set of each optical sensor, a preset time window is moved from the first brightness value to the last brightness value within the brightness value set at a preset step length, and the mean value of the multiple brightness values covered by the time window at each position is determined to obtain the first brightness mean value set of the optical sensor.

[0108] Among them, if all the brightness values collected by the optical sensor within a preset duration are obtained in step S101, the time window can 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 values collected by the optical sensor within a preset duration are obtained at a preset frequency in step S101, the time window can be slid according to the length of the time window and the preset frequency.

[0109] Exemplarily, if the preset frequency for obtaining brightness values in step S101 is 50 Hz, the interval between adjacent brightness values in the brightness value set is 20 ms; the length of the time window is 400 ms, and the step length is 1 brightness value; then the time window first covers the 1st to 20th brightness values in the brightness value set, and then moves one step to cover the 2nd to 21st brightness values... until it covers the last brightness value. In this example, if there are n brightness values in the brightness value set, a first brightness mean value set with n - 1 means can be obtained.

[0110] In the case where the terminal device has a front optical sensor and a rear optical sensor, the first brightness mean value set smooth_fl1 of the front optical sensor and the first brightness mean value set smooth_fl2 of the rear optical sensor can be obtained in this step.

[0111] In step S203, for the first brightness mean value set of each optical sensor, determine the difference between each brightness mean value except the first one and the previous brightness mean value, so as to obtain the brightness difference set of the optical sensor.

[0112] If the first brightness mean value set has n - 1 mean values, then in this step, a brightness difference set with n - 2 differences can be obtained.

[0113] When the terminal device has a front optical sensor and a rear optical sensor, the brightness difference set diff_fl1 of the front optical sensor and the brightness difference set diff_fl2 of the rear optical sensor can be obtained in this step.

[0114] In step S204, for the set of unsmoothed brightness values of each optical sensor, divide the set of brightness values into multiple subsets of brightness values at a preset time interval, and determine the mean value and variance of the multiple brightness values within each subset of brightness values, so as to obtain the second brightness mean value set and the brightness variance set of the optical sensor.

[0115] Among them, if all the brightness values collected by the optical sensor within a preset duration are obtained in step S101, the subsets of brightness values can be divided according to the time interval and the time of each brightness value in the set of brightness values; if the brightness values collected by the optical sensor within a preset duration are obtained at a preset frequency in step S101, the subsets of brightness values can be divided according to the time interval and the preset frequency.

[0116] Exemplarily, if the preset frequency for obtaining brightness values in step S101 is 50 Hz, then the interval between adjacent brightness values in the set of brightness values is 20 ms; the time interval is 400 ms; then the 1st to 20th brightness values in the set of brightness values are divided into the 1st subset of brightness values, the 21st - 40th brightness values are divided into the 2nd subset of brightness values... until all the brightness values are divided.

[0117] When determining the mean value and variance of the multiple brightness values within each subset of brightness values, the average value can be calculated first according to each brightness value within the subset of brightness values, and then the variance can be calculated according to the average value and each brightness value.

[0118] When the terminal device has a front optical sensor and a rear optical sensor, the second brightness mean value set avg_l1, the brightness variance set std_l1 of the front optical sensor, the second brightness mean value set avg_l2, and the brightness variance set std_l2 of the rear optical sensor can be obtained in this step.

[0119] In step S205, according to the brightness difference set and the brightness variance set of each optical sensor, the optical state of each optical sensor is determined respectively.

[0120] Exemplarily, for each optical sensor, when there is a difference greater than the first threshold in the brightness difference set, or there is a variance greater than the second threshold in the brightness variance set, it is determined that the optical state of the optical sensor is a fluctuating state; for each optical sensor, when there is no difference greater than or equal to the third threshold in the brightness difference set, and there is no variance greater than or equal to the fourth threshold in the brightness variance set, it is determined that the optical state of the optical sensor is a stable state.

[0121] In the case where the terminal device has a front optical sensor and a rear optical sensor, in this step: if there is a difference greater than the first threshold in the brightness difference set diff_fl1, or there is a variance greater than the second threshold in the brightness variance set std_l1, it is determined that the optical state of the front optical sensor is a fluctuating state; if there is no difference greater than or equal to the third threshold in the brightness difference set diff_fl1, and there is no variance greater than or equal to the fourth threshold in the brightness variance set std_l1, it is determined that the optical state of the front optical sensor is a stable state; if there is a difference greater than the first threshold in the brightness difference set diff_fl2, or there is a variance greater than the second threshold in the brightness variance set std_l2, it is determined that the optical state of the rear optical sensor is a fluctuating 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 rear optical sensor is a stable state.

[0122] It can be understood that the first threshold and the second threshold can be equal, for example, 5; the third threshold and the fourth threshold can be equal, for example, 1. The first threshold and the third threshold can be equal or not; when they are not equal, for each optical sensor, if the brightness difference set and the brightness variance set do not meet any of the above two situations, it is determined that the optical state of the optical sensor is the previously determined optical state, that is, the optical state remains unchanged. Thus, the optical state can be switched once when the difference or variance crosses two thresholds, thereby avoiding frequent switching of the optical state, which may cause unstable brightness control of the display screen.

[0123] In another embodiment, the optical state of each optical sensor can be determined in the manner as Figure 3 shown, including steps S301 to S305.

[0124] In step S301, the brightness values in the brightness value set of each optical sensor are smoothed respectively.

[0125] In step S302, for the set of smoothed brightness values of each optical sensor, within the set of brightness values, the preset time window is moved from the first brightness value to the last brightness value at a preset step size, and the mean value of the multiple brightness values covered by the time window at each position is determined, obtaining the first brightness mean value set of the optical sensor.

[0126] In step S303, for the set of brightness mean values of each optical sensor, the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value is determined, obtaining the set of brightness differences of the optical sensor.

[0127] In step S304, for the set of unsmoothed brightness values of each optical sensor, the set of brightness values is divided into multiple subsets of brightness values at a preset time interval, and the mean value and variance of the multiple brightness values within each subset of brightness values are determined, obtaining the second brightness mean value set and the brightness variance set of the optical sensor.

[0128] In step S305, for each optical sensor, the set of smoothed brightness values, the first brightness mean value set, the set of brightness differences, the second brightness mean value set, and the brightness variance set are input into the pre-trained optical state prediction model, obtaining the optical state of the optical sensor output by the optical state prediction model.

[0129] Among them, steps S301 to S304 are the same as steps S201 to S204 in the manner shown in the appendix Figure 2 and will not be repeated here.

[0130] Among them, the optical state prediction model can be a neural network model and is trained to convergence using the training samples in the training set. Among them, the training samples include the set of smoothed brightness values, the first brightness mean value set, the set of brightness differences, the second brightness mean value set, and the brightness variance set, and the training samples are labeled with labels, namely the stable state or the fluctuating state. Using the optical state prediction model to predict the optical state of the optical sensor is relatively accurate and has a high degree of automation.

[0131] When the terminal device is equipped with a front optical sensor and a rear optical sensor, in this step: input f_l1, smooth_fl1, diff_fl1, avg_l1, and std_l1 into the pre-trained optical state prediction model to obtain the optical state of the front optical sensor output by the optical state prediction model; input f_l2, smooth_fl2, diff_fl2, avg_l2, and std_l2 into the pre-trained optical state prediction model to obtain the optical state of the rear optical sensor output by the optical state prediction model.

[0132] It can be understood that the above two embodiments can be used alone or in combination. For example, they can be combined to obtain the following determination method: If the brightness difference set and the brightness variance set satisfy any one of the two situations in step S205, determine the optical state of the optical sensor according to step S205; if the brightness difference set and the brightness variance set do not satisfy any one of the two situations in step S205, then the method in step S305 can be used to determine the optical state of the optical sensor, that is, use the optical state prediction model to predict the optical state of the optical sensor.

[0133] It can be understood that the optical state of each optical sensor determined in step S102 is only necessary to be determined in a non-dark state. If it is in a dark state, determining the optical state of each optical sensor has no practical significance. Therefore, in step S102, in response to the brightness value collected by at least one optical sensor at the current moment not being 0, determine the optical state of each optical sensor according to the brightness values collected by each optical sensor within a preset duration.

[0134] In addition, in response to the brightness values collected by each optical sensor at the current moment being all 0, control the brightness of the display screen to remain at a preset brightness. The preset brightness can be the brightness value of the display screen in a pre-set dark environment, and this brightness value is relatively low to avoid hurting the user's eyes. Directly adjusting the brightness of the display screen in a dark environment can avoid wasting power consumption in performing steps S102 to S104.

[0135] In step S103, determine the optical state of the environment where the terminal device is located according to the optical state of each optical sensor, where the optical state of the environment includes a point light source stable state, a multi-light source stable state, and a fluctuating state.

[0136] In a multi-light-source environment, the optical state of each optical sensor can reach a stable state; in a point-light-source environment, if the FOVs of multiple optical sensors are different, only the optical states of some optical sensors can reach a stable state; whether in a multi-light-source environment or a point-light-source environment, when the terminal device undergoes attitude changes such as flipping, the optical state of each optical sensor often fluctuates. Therefore, exemplarily, when the optical state of each optical sensor is in a stable state, it is determined that the optical state of the environment where the terminal device is located is a multi-light-source stable state; when the optical state of each optical sensor is in a fluctuating state, it is determined that the optical state of the environment where the terminal device is located is a fluctuating state; when the optical state of at least one optical sensor is in a fluctuating state and the optical state of at least one optical sensor is in a stable state, it is determined that the optical state of the environment where the terminal device is located is a point-light-source stable state.

[0137] When the terminal device has a front optical sensor and a rear optical sensor, if the optical states of both the front optical sensor and the rear optical sensor are in a stable state, then the optical state of the environment where the terminal device is located is a multi-light-source stable state; if the optical states of both the front optical sensor and the rear optical sensor are in a fluctuating state, then the optical state of the environment where the terminal device is located is a fluctuating state; if one of the front optical sensor and the rear optical sensor has an optical state in a fluctuating state and the other has an optical state in a stable state, then the optical state of the environment where the terminal device is located is a point-light-source stable state.

[0138] 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.

[0139] In a multi-light-source stable state, the brightness values collected by each optical sensor can more accurately represent the ambient brightness; in a fluctuating state, since the terminal device undergoes attitude changes, the brightness values collected by each optical sensor can more accurately represent the ambient brightness; in a point-light-source stable state, the angle between the FOV of the optical sensor in a fluctuating state and the light direction changes frequently, so the change in the brightness value collected by this optical sensor cannot accurately represent the change in the ambient brightness, that is, when the ambient brightness is stable, the brightness value collected by this optical sensor may change greatly. Therefore, exemplarily, when the optical state of the environment where the terminal device is located is a multi-light-source stable state or a fluctuating state, the brightness of the display screen is controlled according to the brightness values collected by each optical sensor (the currently collected brightness value or the brightness values collected during a period of time before the current moment); when the optical state of the environment where the terminal device is located is a point-light-source stable state, the target brightness is determined according to the brightness values collected by each optical sensor when entering the point-light-source stable state, and the brightness of the display screen is controlled to remain at the target brightness.

[0140] When the environment is in a multi-light-source state and a fluctuating state, the change in the brightness value collected by the optical sensor can accurately represent the change in the ambient light brightness. Therefore, the display screen can be adjusted according to the collected brightness value, that is, the brightness of the display screen is controlled in the same way as in the related art for automatically adjusting the brightness of the display screen. When the environment is in a point-light-source stable state, the change in the brightness value collected by the optical sensor cannot accurately represent the change in the ambient light brightness (for example, in a point-light-source environment, the brightness does not change, but the brightness values collected by at least one optical sensor change frequently and by a large amount). Therefore, if the display screen is adjusted according to the collected brightness value, problems such as inaccurate brightness adjustment and frequent brightness mutations will occur. In this embodiment, the display screen is kept at the brightness when it just enters this state in the point-light-source stable state, so as to avoid frequent adjustment of the display screen brightness in the point-light-source stable state, resulting in problems such as inaccurate brightness adjustment and mutations, and improving the user experience.

[0141] In a multi-light-source environment, the terminal device is in a multi-light-source stable state for much more time than in a fluctuating state, because the fluctuating state is caused by the user flipping the terminal device; in a point-light-source environment, the terminal device is in a point-light-source stable state for much more time than in a fluctuating state, because the fluctuating state is caused by the user flipping the terminal device. Therefore, when the terminal device is in a fluctuating state, it often returns to any stable state in a short time and often returns to the state before the fluctuating state, because the environment does not change in a short time. Based on this, in response to the optical state of the environment where the terminal device is located switching from a point-light-source stable state to a fluctuating state, the brightness of the display screen is controlled to maintain the target brightness within a preset duration (such as 2 min). This can keep the brightness of the display screen unchanged when the terminal device briefly enters a fluctuating state in a point-light-source environment, thus further avoiding problems such as inaccurate brightness adjustment and mutations caused by frequent adjustment of the display screen brightness in a point-light-source environment, and improving the user experience.

[0142] The brightness control method provided by the embodiments of the present disclosure can, by obtaining the brightness values collected by each of the multiple optical sensors of the terminal device within a preset duration, determine the optical state of each optical sensor respectively according to the brightness values collected by each optical sensor within the preset duration, and further determine the optical state of the environment where the terminal device is located according to the optical state of each optical sensor. Finally, the brightness of the display screen can be controlled according to the optical state of the environment where the terminal device is located. By determining the optical state of each optical sensor, this method realizes the detection of the optical state of the environment where the terminal device is located, and further realizes the 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 in different optical states (i.e., point light source state and multi-light source state). Therefore, the brightness control of the display screen is more accurate, and the clarity and comfort of the display screen are improved. Especially in an environment with a point light source, since the point light source state is used as a factor for brightness adjustment and the control strategy in the point light source state is adopted to adjust the brightness, the accuracy of brightness adjustment, the clarity and comfort of the display screen are significantly improved compared with the related art.

[0143] According to a second aspect of the embodiments of the present disclosure, a brightness control device is provided, which is applied to a terminal device having a display screen and multiple optical sensors. Please refer to the appended Figure 4 , and the device includes:

[0144] An acquisition module 401, configured to acquire the brightness values collected by each of the multiple optical sensors within a preset duration;

[0145] A first state module 402, configured to determine the optical state of each optical sensor respectively according to the brightness values collected by each optical sensor within the preset duration, where the optical state of the optical sensor includes a stable state and a fluctuating state;

[0146] A second state module 403, configured to determine the optical state of the environment where the terminal device is located according to the optical state of each optical sensor, where the optical state of the environment includes a point light source stable state, a multi-light source stable state, and a fluctuating state;

[0147] A control module 404, configured to control the brightness of the display screen according to the optical state of the environment where the terminal device is located.

[0148] In some embodiments of the present disclosure, the acquisition module is specifically configured to:

[0149] Acquire the brightness values collected by each optical sensor within a preset duration at a preset frequency to obtain a set of brightness values of each optical sensor.

[0150] In some embodiments of the present disclosure, the first state module is specifically configured to:

[0151] Smooth the luminance values in the set of luminance values of each optical sensor respectively;

[0152] For the set of smoothed luminance values of each optical sensor, move a preset time window from the first luminance value to the last luminance value within the set of luminance values at a preset step size, and determine the mean value of the multiple luminance values covered by the time window at each position, to obtain the first set of luminance mean values of the optical sensor;

[0153] For the first set of luminance mean values of each optical sensor, determine the difference between each luminance mean value except the first luminance mean value and the previous luminance mean value, to obtain the set of luminance differences of the optical sensor;

[0154] For the set of unsmoothed luminance values of each optical sensor, divide the set of luminance values into multiple subsets of luminance values at a preset time interval, and determine the mean value and variance of the multiple luminance values in each subset of luminance values, to obtain the second set of luminance mean values and the set of luminance variances of the optical sensor;

[0155] Determine the optical state of each optical sensor respectively according to the set of luminance differences and the set of luminance variances of each optical sensor.

[0156] In some embodiments of the present disclosure, when the first state module is used to determine the optical state of each optical sensor respectively according to the set of luminance differences and the set of luminance variances of each optical sensor, it is specifically used for:

[0157] For each optical sensor, when there is a difference greater than a first threshold value in the set of luminance differences, or there is a variance greater than a second threshold value in the set of luminance variances, determine that the optical state of the optical sensor is a fluctuating state;

[0158] For each optical sensor, when there is no difference greater than or equal to a third threshold value in the set of luminance differences, and there is no variance greater than or equal to a fourth threshold value in the set of luminance variances, determine that the optical state of the optical sensor is a stable state.

[0159] In some embodiments of the present disclosure, the first state module is specifically used for:

[0160] Smooth the luminance values in the set of luminance values of each optical sensor respectively;

[0161] For the set of smoothed brightness values of each optical sensor, within the set of brightness values, move a preset time window from the first brightness value to the last brightness value at a preset step size, and determine the mean value of the multiple brightness values covered by the time window at each position, to obtain the first set of brightness mean values of the optical sensor;

[0162] For the set of brightness mean values of each optical sensor, determine the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value, to obtain the set of brightness differences of the optical sensor;

[0163] For the set of unsmoothed brightness values of each optical sensor, divide the set of brightness values into multiple subsets of brightness values at a preset time interval, and determine the mean value and variance of the multiple brightness values within each subset of brightness values, to obtain the second set of brightness mean values and the set of brightness variances of the optical sensor;

[0164] For each optical sensor, input the set of smoothed brightness values, the first set of brightness mean values, the set of brightness differences, the second set of brightness mean values, and the set of brightness variances into an optical state prediction model that has been pre-trained, to obtain the optical state of the optical sensor output by the optical state prediction model.

[0165] In some embodiments of the present disclosure, when the first state module is specifically used to perform smoothing processing on the brightness values within the set of brightness values of each optical sensor, it is specifically used for:

[0166] Convert the set of brightness values of each optical sensor from the time domain form to the frequency domain form;

[0167] Perform filtering processing on each set of brightness values in the frequency domain form, and convert each set of brightness values after filtering processing from the frequency domain form to the time domain form, to obtain the set of smoothed brightness values of each optical sensor.

[0168] In some embodiments of the present disclosure, the second state module is specifically used for:

[0169] When the optical state of each optical sensor is in a stable state, determine that the optical state of the environment where the terminal device is located is a multi-light source stable state;

[0170] When the optical state of each optical sensor is in a fluctuating state, determine that the optical state of the environment where the terminal device is located is a fluctuating state;

[0171] When the optical state of at least one optical sensor is in a fluctuating state and the optical state of at least one optical sensor is in a stable state, determine that the optical state of the environment where the terminal device is located is a point light source stable state.

[0172] In some embodiments of the present disclosure, the control module is specifically configured to:

[0173] When the optical state of the environment where the terminal device is located is a multi-light-source stable state or a fluctuating state, control the brightness of the display screen according to the brightness values collected by each optical sensor;

[0174] When the optical state of the environment where the terminal device is located is a point-light-source stable state, determine a target brightness according to the brightness values collected by each optical sensor when entering the point-light-source stable state, and control the brightness of the display screen to remain at the target brightness.

[0175] In some embodiments of the present disclosure, it further includes a holding module for:

[0176] In response to the optical state of the environment where the terminal device is located switching from the point-light-source stable state to the fluctuating state, control the brightness of the display screen to remain at the target brightness within a preset duration.

[0177] In some embodiments of the present disclosure, it further includes a dark module for:

[0178] In response to the brightness values collected by each optical sensor at the current moment being all 0, control the brightness of the display screen to remain at a preset brightness;

[0179] The second state module is specifically configured to:

[0180] In response to the brightness value collected by at least one optical sensor at the current moment not being 0, determine the optical state of each optical sensor respectively according to the brightness values collected by each optical sensor within a preset duration.

[0181] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments of the method in the first aspect, and will not be elaborated herein.

[0182] According to the third aspect of the embodiments of the present disclosure, please refer to the appendix Figure 5 , which exemplarily shows a block diagram of an electronic device. For example, the device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0183] Referring to Figure 5 , the device 500 may include one or more of the following components: a processing component 502, a memory 504, a power supply component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.

[0184] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing element 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0185] The memory 504 is configured to store various types of data to support the operation of the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk, or optical disk.

[0186] The power component 506 provides power to various components of the device 500. The power component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 500.

[0187] 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 can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operation mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0188] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC) that is configured to receive external audio signals when the device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 further includes a speaker for outputting audio signals.

[0189] The I / O interface 512 provides an interface between the processing component 502 and a peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a power button, and a lock button.

[0190] The sensor component 514 includes one or more sensors for providing an assessment of various aspects of the state of the device 500. For example, the sensor component 514 can detect the on / off state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, the sensor component 514 can also detect a change in the 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 temperature change of the device 500. The sensor component 514 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 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 component 514 may further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0191] The communication component 516 is configured to facilitate communication between the device 500 and other devices in a wired or wireless manner. The device 500 can access a wireless network based on communication standards, 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-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0192] 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, microcontrollers, microprocessors, or other electronic components for performing the power supply method of the above electronic device.

[0193] In a fourth aspect, in an exemplary embodiment of the present disclosure, there is also provided a non-transitory computer-readable storage medium including instructions, such as a memory 504 including instructions, where the above instructions can be executed by a processor 520 of the apparatus 500 to complete the power supply method of the above electronic device. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, magnetic tape, a floppy disk, and an optical data storage device, etc.

[0194] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and embodiments are only to be regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0195] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A brightness control method, characterized in that, Applied to a terminal device having a display screen and a plurality of optical sensors, the method includes: Obtaining the brightness values collected by each of the plurality of optical sensors within a preset time period; Respectively determining the optical state of each optical sensor according to the brightness values collected by each optical sensor within the preset time period, wherein the optical state of the optical sensor at least includes a stable state and / or a fluctuating state; Determining the optical state of the environment where the terminal device is located according to the optical state of each optical sensor, wherein the optical state of the environment at least includes one of a point light source stable state, a multi-light source stable state, and a fluctuating state; Controlling the brightness of the display screen according to the optical state of the environment where the terminal device is located; The obtaining the brightness values collected by each of the plurality of optical sensors within a preset time period includes: Obtaining the brightness values collected by each optical sensor within the preset time period at a preset frequency to obtain a brightness value set of each optical sensor; The respectively determining the optical state of each optical sensor according to the brightness values collected by each optical sensor within the preset time period includes: Respectively performing smoothing processing on the brightness values in the brightness value set of each optical sensor; For the brightness value set after smoothing processing of each optical sensor, moving a preset time window from the first brightness value to the last brightness value within the brightness value set at a preset step length, and determining the mean value of the plurality of brightness values covered by the time window at each position, to obtain a first brightness mean value set of the optical sensor; For the first brightness mean value set of each optical sensor, determining the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference set of the optical sensor; For the brightness value set of each optical sensor that has not been smoothed, dividing the brightness value set into a plurality of brightness value subsets at a preset time interval, and determining the mean value and variance of the 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; Respectively determining the optical state of each optical sensor according to the brightness difference set and the brightness variance set of each optical sensor.

2. The brightness control method according to claim 1, wherein The respectively determining the optical state of each optical sensor according to the brightness difference set and the brightness variance set of each optical sensor includes: For each optical sensor, when there is a difference greater than a first threshold in the brightness difference set, or there is a variance greater than a second threshold in the brightness variance set, determining that the optical state of the optical sensor is a fluctuating state; For each optical sensor, when there is no difference greater than or equal to a third threshold in the brightness difference set, and there is no variance greater than or equal to a fourth threshold in the brightness variance set, determining that the optical state of the optical sensor is a stable state.

3. The brightness control method according to claim 1, characterized in that, The respectively determining the optical state of each optical sensor according to the brightness values collected by each optical sensor within the preset time period includes: Respectively performing smoothing processing on the brightness values in the brightness value set of each optical sensor; For the set of smoothed brightness values of each optical sensor, within the set of brightness values, move a preset time window from the first brightness value to the last brightness value at a preset step size, and determine the mean value of the multiple brightness values covered by the time window at each position, to obtain the first brightness mean value set of the optical sensor; For the first brightness mean value set of each optical sensor, determine the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value, to obtain the brightness difference set of the optical sensor; For the set of unsmoothed brightness values of each optical sensor, divide the set of brightness values into multiple subsets of brightness values at a preset time interval, and determine the mean value and variance of the multiple brightness values within each subset of brightness values, to obtain the second brightness mean value set and the brightness variance set of the optical sensor; For each optical sensor, input the set of smoothed brightness values, the first brightness mean value set, the brightness difference set, the second brightness mean value set, and the brightness variance set into a pre-trained optical state prediction model, to obtain the optical state of the optical sensor output by the optical state prediction model; 4. The brightness control method according to any one of claims 1 to 3, characterized in that The smoothing the brightness values within the set of brightness values of each optical sensor respectively includes: Convert the set of brightness values of each optical sensor from the time domain form to the frequency domain form; Perform filtering processing on each set of brightness values in the frequency domain form, and convert each set of brightness values after filtering processing from the frequency domain form to the time domain form, to obtain the set of smoothed brightness values of each optical sensor; 5. The brightness control method according to claim 1, characterized in that, The determining the optical state of the environment where the terminal device is located according to the optical state of each optical sensor includes: When the optical state of each optical sensor is in a stable state, determine that the optical state of the environment where the terminal device is located is a multi-light source stable state; When the optical state of each optical sensor is in a fluctuating state, determine that the optical state of the environment where the terminal device is located is a fluctuating state; When the optical state of at least one optical sensor is in a fluctuating state and the optical state of at least one optical sensor is in a stable state, determine that the optical state of the environment where the terminal device is located is a point light source stable state; 6. The brightness control method according to claim 5, wherein The controlling the brightness of the display screen according to the optical state of the environment where the terminal device is located includes: When the optical state of the environment where the terminal device is located is a multi-light source stable state or a fluctuating state, control the brightness of the display screen according to the brightness values collected by each optical sensor; When the optical state of the environment where the terminal device is located is a point light source stable state, determine a target brightness according to the brightness values collected by each optical sensor when entering the point light source stable state, and control the brightness of the display screen to remain at the target brightness; 7. The brightness control method according to claim 6, wherein Further includes: In response to the optical state of the environment where the terminal device is located switching from the point light source stable state to the fluctuating state, control the brightness of the display screen to remain at the target brightness within a preset duration; 8. The brightness control method according to claim 1, characterized in that, Further includes: In response to the brightness values collected by each optical sensor at the current moment being all 0, control the brightness of the display screen to remain at a preset brightness; Determining the optical states of each optical sensor respectively according to the brightness values collected by each optical sensor within a preset time period includes: In response to the brightness values collected by at least one optical sensor at the current moment not being 0, determining the optical states of each optical sensor respectively according to the brightness values collected by each optical sensor within a preset time period.

9. A brightness control device, characterized in that, Applied to a terminal device having a display screen and a plurality of optical sensors, the device includes: An acquisition module, configured to acquire the brightness values collected by each optical sensor among the plurality of optical sensors within a preset time period; A first state module, configured to determine the optical states of each optical sensor respectively according to the brightness values collected by each optical sensor within a preset time period, wherein the optical states of the optical sensor include a stable state and a fluctuating state; A second state module, configured to determine the optical state of the environment where the terminal device is located according to the optical states of each optical sensor, wherein the optical state of the environment includes a point light source stable state, a multi-light source stable state, and a fluctuating state; A control module, configured to control the brightness of the display screen according to the optical state of the environment where the terminal device is located; Wherein, the acquisition module is specifically configured to: Acquire the brightness values collected by each optical sensor within a preset time period according to a preset frequency to obtain a brightness value set of each optical sensor; The first state module is specifically configured to: Perform smoothing processing on the brightness values in the brightness value set of each optical sensor respectively; For the smoothed brightness value set of each optical sensor, move a preset time window from the first brightness value to the last brightness value within the brightness value set according to a preset step length, and determine the mean value of the multiple brightness values covered by the time window at each position to obtain a first brightness mean value set of the optical sensor; For the first brightness mean value set of each optical sensor, determine the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value to obtain a brightness difference set of the optical sensor; For the unsmoothed brightness value set of each optical sensor, divide the brightness value set into multiple brightness value subsets according to a preset time interval, and determine the mean value and variance of the multiple brightness values in each brightness value subset to obtain a second brightness mean value set and a brightness variance set of the optical sensor; Determine the optical states of each optical sensor respectively according to the brightness difference set and the brightness variance set of each optical sensor.

10. The brightness control device according to claim 9, characterized in that, When the first state module is configured to determine the optical states of each optical sensor respectively according to the brightness difference set and the brightness variance set of each optical sensor, it is specifically configured to: For each optical sensor, when there is a difference greater than a first threshold in the brightness difference set, or there is a variance greater than a second threshold in the brightness variance set, determine that the optical state of the optical sensor is a fluctuating state; For each optical sensor, when there is no difference greater than or equal to a third threshold in the brightness difference set, and there is no variance greater than or equal to a fourth threshold in the brightness variance set, determine that the optical state of the optical sensor is a stable state.

11. The brightness control device according to claim 9, wherein, The first state module is specifically configured to: Perform smoothing processing on the brightness values in the brightness value set of each optical sensor respectively; For the brightness value set after smoothing processing of each optical sensor, move the preset time window from the first brightness value to the last brightness value in the brightness value set at a preset step length, and determine the mean value of the multiple brightness values covered by the time window at each position, so as to obtain the first brightness mean value set of the optical sensor; For the first brightness mean value set of each optical sensor, determine the difference between each brightness mean value except the first brightness mean value and the previous brightness mean value, so as to obtain the brightness difference set of the optical sensor; For the brightness value set of each optical sensor that has not been smoothed, divide the brightness value set into multiple brightness value subsets at a preset time interval, and determine the mean value and variance of the multiple brightness values in each brightness value subset, so as to obtain the second brightness mean value set and the brightness variance set of the optical sensor; For each optical sensor, input the brightness value set after smoothing processing, the first brightness mean value set, the brightness difference set, the second brightness mean value set, and the brightness variance set into the pre-trained optical state prediction model, so as to obtain the optical state of the optical sensor output by the optical state prediction model.

12. The brightness control device according to any one of claims 9 to 11, characterized in that, When the first state module is used to perform smoothing processing on the brightness values in the brightness value set of each optical sensor respectively, it is specifically configured to: Convert the brightness value set of each optical sensor from the time domain form to the frequency domain form; Perform filtering processing on each brightness value set in the frequency domain form, and convert each brightness value set after filtering processing from the frequency domain form to the time domain form, so as to obtain the brightness value set after smoothing processing of each optical sensor.

13. The brightness control device according to claim 9, wherein The second state module is specifically configured to: When the optical state of each optical sensor is in a stable state, determine that the optical state of the environment where the terminal device is located is a multi-light source stable state; When the optical state of each optical sensor is in a fluctuating state, determine that the optical state of the environment where the terminal device is located is a fluctuating state; When the optical state of at least one optical sensor is in a fluctuating state and the optical state of at least one optical sensor is in a stable state, determine that the optical state of the environment where the terminal device is located is a point light source stable state.

14. The brightness control device according to claim 13, characterized in that, The control module is specifically configured to: When the optical state of the environment where the terminal device is located is a multi-light source stable state or a fluctuating state, control the brightness of the display screen according to the brightness values collected by each optical sensor; When the optical state of the environment where the terminal device is located is a point light source stable state, determine the target brightness according to the brightness values collected by each optical sensor when entering the point light source stable state, and control the brightness of the display screen to remain at the target brightness.

15. The brightness control device according to claim 14, characterized in that, It further includes a holding module, which is used for: In response to the optical state of the environment where the terminal device is located switching from the point light source stable state to the fluctuating state, control the brightness of the display screen to remain at the target brightness within a preset duration.

16. The brightness control device according to claim 9, characterized in that, It further includes a darkness module, which is used for: In response to the brightness values collected by each optical sensor at the current moment being all 0, control the brightness of the display screen to remain at a preset brightness; The second state module is specifically configured to: In response to the brightness value collected by at least one optical sensor at the current moment not being 0, determine the optical state of each optical sensor respectively according to the brightness values collected by each optical sensor within a preset duration.

17. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory is used to store computer instructions that can run on the processor, and the processor is used to, when executing the computer instructions, perform the brightness control method according to any one of claims 1 to 8.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Ambient light sensation value acquisition method, electronic equipment and computer readable storage medium

    CN114495862A