Disclosure of Invention
The embodiment of the invention discloses a screen brightness adjusting method and a mobile terminal, which can improve the accuracy of screen brightness adjustment of the mobile terminal.
The embodiment of the invention discloses a screen brightness adjusting method which is applied to a mobile terminal, wherein the mobile terminal comprises a light sensor and an RGB sensor, the light sensor is arranged on the front side of the mobile terminal, the RGB sensor is arranged on the back side of the mobile terminal, and the method comprises the following steps:
acquiring first light intensity detected by the light sensor when the mobile terminal is in call completion, and determining a first variation amplitude of the first light intensity relative to second light intensity detected by the light sensor before the mobile terminal is in call;
determining a second variation amplitude of the light intensity detected by the RGB sensor when the mobile terminal is in call termination relative to the light intensity detected by the RGB sensor before the mobile terminal is in call;
judging whether the difference value of the first variation amplitude and the second variation amplitude is larger than a preset threshold value or not;
if the difference value is larger than the preset threshold value, correcting the first light intensity by using the difference value to obtain target light intensity;
and adjusting the screen brightness of the mobile terminal according to the target light intensity.
As a possible implementation manner, after determining a second variation amplitude of the light intensity detected by the RGB sensor at the end of the mobile terminal call relative to the light intensity detected by the RGB sensor before the mobile terminal call, the method further includes:
when the first light intensity is smaller than the second light intensity, judging whether the first variation amplitude is larger than the second variation amplitude;
if the first variation amplitude is larger than the second variation amplitude, executing the step of judging whether the difference value between the first variation amplitude and the second variation amplitude is larger than a preset threshold value;
and if the first variation amplitude is smaller than or equal to the second variation amplitude, adjusting the screen brightness of the mobile terminal according to the first light intensity.
As another possible implementation manner, after determining a second variation amplitude of the light intensity detected by the RGB sensor at the end of the mobile terminal call relative to the light intensity detected by the RGB sensor before the mobile terminal call, the method further includes:
when the first light intensity is greater than the second light intensity, judging whether the first variation amplitude is smaller than the second variation amplitude;
if the first variation amplitude is smaller than the second variation amplitude, executing the step of judging whether the difference value between the first variation amplitude and the second variation amplitude is larger than a preset threshold value;
and if the first variation amplitude is larger than or equal to the second variation amplitude, adjusting the screen brightness of the mobile terminal according to the first light intensity.
As another possible implementation, the adjusting the screen brightness of the mobile terminal according to the target light intensity includes:
acquiring target screen brightness corresponding to the target light intensity from a preset relation between the light intensity and the screen brightness;
and adjusting the current screen brightness of the mobile terminal to the target screen brightness.
As another possible implementation, the method further includes:
receiving a sliding operation input in a designated area of the mobile terminal;
and adjusting the screen brightness of the mobile terminal according to the sliding direction and the sliding force of the sliding operation.
Correspondingly, the embodiment of the invention discloses a mobile terminal, which comprises a light sensor and an RGB sensor, wherein the light sensor is arranged on the front side of the mobile terminal, the RGB sensor is arranged on the back side of the mobile terminal, and the mobile terminal also comprises:
the acquisition unit is used for acquiring first light intensity detected by the light sensor when the mobile terminal finishes a call;
a determining unit, configured to determine a first variation amplitude of the first light intensity relative to a second light intensity detected by the light sensor before a call of the mobile terminal is completed, and determine a second variation amplitude of the light intensity detected by the RGB sensor when the call of the mobile terminal is completed relative to the light intensity detected by the RGB sensor before the call of the mobile terminal is completed;
the judging unit is used for judging whether the difference value of the first change amplitude and the second change amplitude is larger than a preset threshold value or not;
the correcting unit is used for correcting the first light intensity by using the difference value to obtain target light intensity when the judging unit judges that the difference value is larger than the preset threshold value;
and the first adjusting unit is used for adjusting the screen brightness of the mobile terminal according to the target light intensity.
As a possible implementation manner, the determining unit is further configured to determine whether the first variation width is larger than the second variation width when the first light intensity is smaller than the second light intensity, and if so, perform the operation of determining whether a difference between the first variation width and the second variation width is larger than a preset threshold;
the mobile terminal further includes:
and the second adjusting unit is used for adjusting the screen brightness of the mobile terminal according to the first light intensity when the judging unit judges that the first variation amplitude is smaller than or equal to the second variation amplitude.
As another possible implementation manner, the determining unit is further configured to determine whether the first variation width is smaller than the second variation width when the first light intensity is greater than the second light intensity, and if so, perform the operation of determining whether a difference between the first variation width and the second variation width is greater than a preset threshold;
the mobile terminal further includes:
and the third adjusting unit is used for adjusting the screen brightness of the mobile terminal according to the first light intensity when the judging unit judges that the first variation amplitude is larger than or equal to the second variation amplitude.
As yet another possible implementation, the first adjusting unit includes an obtaining subunit and an adjusting subunit, wherein:
the obtaining subunit is configured to obtain, from a preset relationship between light intensity and screen brightness, a target screen brightness corresponding to the target light intensity;
and the adjusting subunit is used for adjusting the current screen brightness of the mobile terminal to the target screen brightness.
As another possible implementation, the mobile terminal further includes:
a receiving unit for receiving a slide operation input in a designated area of the mobile terminal;
and the fourth adjusting unit is used for adjusting the screen brightness of the mobile terminal according to the sliding direction and the sliding force of the sliding operation.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the mobile terminal comprises the light sensor and the RGB sensor, wherein the light sensor is arranged on the front side of the mobile terminal, the RGB sensor is arranged on the back side of the mobile terminal, when the light sensor detects the first light intensity when the mobile terminal is in call ending, the mobile terminal determines a first magnitude of change in the first light intensity relative to a second light intensity detected by the light sensor before the mobile terminal talks, and determining a second variation amplitude of the light intensity detected by the RGB sensor at the end of the call relative to the light intensity detected by the RGB sensor before the call, and when the difference value between the first variation amplitude and the second variation amplitude is larger than the preset threshold value, correcting the first light intensity by using the difference value to obtain the target light intensity, and finally adjusting the screen brightness of the mobile terminal according to the target light intensity. According to the embodiment of the invention, when the user finishes the call, the mobile terminal can determine whether the light sensor is stained with a layer of oil stain by combining the change range of the light intensity detected by the light sensor and the RGB sensor before the call and when the call is finished, if yes, the mobile terminal can correct the light intensity detected by the light sensor and then adjust the screen brightness, so that the problem that the light intensity is inaccurate to detect due to the fact that the light sensor is shielded by the oil stain can be solved, and the accuracy of adjusting the screen brightness of the mobile terminal can be improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a screen brightness adjusting method and a mobile terminal, which can improve the accuracy of screen brightness adjustment of the mobile terminal. The following are detailed below.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for adjusting screen brightness according to an embodiment of the present invention. The method shown in fig. 1 may be applied to mobile terminals such as smart phones (e.g., Android phones, iOS phones, etc.), tablet computers, palmtop computers, Personal Digital Assistants (PDAs), Mobile Internet Devices (MIDs), and smart wearable devices, where the mobile terminals include a light sensor and an RGB sensor. As shown in fig. 1, the screen brightness adjusting method may include the steps of:
101. the mobile terminal obtains a first light intensity detected by the light sensor when the mobile terminal is in a call end state, and determines a first variation amplitude of the first light intensity relative to a second light intensity detected by the light sensor before the mobile terminal is in the call.
In the embodiment of the invention, the light sensor is arranged on the front side of the mobile terminal, namely the screen side, the light sensor is mainly arranged near the receiver and can detect the light intensity of the external environment, and therefore, the mobile terminal can automatically adjust the screen brightness according to the light intensity. The back of mobile terminal is the back lid side promptly and is provided with the RGB sensor, and this RGB sensor is the components and parts in the mobile terminal camera, mainly used for providing the parameter of red R, green G, blue B three primary colors for the camera to promote the white balance parameter that the camera was shot, thereby can obtain the better photo of effect. The RGB sensor is usually installed near the rear camera, and the RGB sensor can also calculate the light intensity through a specific algorithm according to the detected parameters of the RGB three primary colors. That is, the RGB sensor can also detect the intensity of light in the environment.
In the embodiment of the invention, the light sensor and the RGB sensor can detect the light intensity in the environment in real time. Therefore, when the mobile terminal detects that the user call is ended, the first light intensity detected by the light sensor in the current environment, that is, the first light intensity detected by the light sensor when the user call is ended, is obtained. Meanwhile, the mobile terminal can acquire a second light intensity detected by the user before the call from the historical light intensity detected by the prerecorded light sensor, so that a first variation amplitude of the first light intensity relative to the second light intensity can be determined.
In general, after a user makes a call, a layer of oil stains appears on a screen of a mobile phone, and if the oil stains near the light sensor, the accuracy of the light intensity detected by the light sensor may be affected. Therefore, the mobile phone can acquire the first variation amplitude of the light intensity respectively detected by the light sensor after the user makes a call and before the user makes a call.
102. The mobile terminal determines a second variation amplitude of the light intensity detected by the RGB sensor when the mobile terminal finishes the call relative to the light intensity detected by the RGB sensor before the mobile terminal calls.
In the embodiment of the invention, the mobile terminal obtains a first variation amplitude of the light intensity of the light sensor relative to the light intensity before the call when the user finishes the call, and also obtains a second variation amplitude of the light intensity of the user when the user finishes the call relative to the light intensity of the user before the call, which is detected by the RGB sensor. Therefore, step 102 may be executed simultaneously with step 101, and the embodiment of the present invention is not limited thereto.
It should be noted that, under normal conditions, although the light intensity of the current environment detected by the light sensor and the RGB sensor at the same time is not necessarily equal, the variation amplitudes of the light intensities detected by the light sensor and the RGB sensor at the same two times should be relatively small. However, if the light sensor is shielded, for example, stained with a layer of oil stain, the variation range of the light intensity detected by the light sensor at two moments may be different from the variation range of the light intensity detected by RGB at the same two moments.
103. The mobile terminal judges whether the difference value of the first variation amplitude and the second variation amplitude is larger than a preset threshold value, if so, the step 104 is executed; if not, the flow is ended.
In the embodiment of the invention, after the mobile terminal respectively obtains the first variation amplitude of the light intensity detected by the light sensor and the second variation amplitude of the light intensity detected by the RGB sensor, the mobile terminal further determines the difference value between the first variation amplitude and the second variation amplitude, so as to determine whether the light sensor is blocked according to the difference value.
Specifically, the mobile terminal determines whether the light sensor is shielded by determining whether a difference between the first variation range and the second variation range is greater than a preset threshold. The preset threshold is mainly an average value of the difference between the variation amplitudes of the light intensities detected by the two sensors at the same two moments in a certain time period, such as in a week, and mainly is the variation amplitude of the light intensities detected when no call is made, the preset threshold may be set to be very small, such as 5cd (where cd is candela is a unit for measuring the magnitude of the light intensities), and the specific value needs to be determined according to the sensitivities of the two light sensors and the light source, such as a point light source or a surface light source, of the environment where the mobile terminal is often located.
Therefore, if the mobile terminal determines that the difference between the first variation amplitude and the second variation amplitude is greater than the preset threshold, the mobile terminal corrects the first light intensity by using the difference to obtain the target light intensity. If the mobile terminal judges that the difference value between the first variation amplitude and the second variation amplitude is smaller than or equal to the preset threshold value, the light sensor is possibly not shielded, namely after the user calls, oil stains on the face or hair of the user are not attached to the position near the light sensor, so that the light intensity detected by the light sensor is accurate, and the mobile terminal can adjust the screen brightness according to the first light intensity detected by the light sensor.
104. The mobile terminal corrects the first light intensity by using the difference value to obtain the target light intensity.
In the embodiment of the invention, when the mobile terminal judges that the difference value between the first variation amplitude and the second variation amplitude is greater than the preset threshold value, the light sensor is shielded, that is, after the user finishes the conversation, oil stains on the face or hair of the user are adhered to the vicinity of the light sensor, so that the light intensity detected by the light sensor is not accurate, and the mobile terminal needs to correct the light intensity detected by the light sensor. Therefore, the mobile terminal can use the difference to correct the first light intensity detected by the light sensor to obtain the target light intensity.
It should be noted that the main way for the mobile terminal to correct the first light intensity detected by the light sensor by using the difference is to add the difference to the first light intensity to obtain the target light intensity. Through this kind of mode can reduce the decay of the light intensity that light ray sensor detected that leads to because the greasy dirt to when making mobile terminal adjust screen brightness according to light intensity, screen brightness's regulation accords with the actual light intensity of environment more, that is to say can improve screen brightness adjustment's the degree of accuracy, thereby promotes user experience.
Optionally, the mobile terminal may also calculate an attenuation ratio of the light intensity detected by the light sensor after being stained with the oil stain according to a difference between the first variation amplitude and the second variation amplitude, so that the first light intensity detected by the light sensor may be corrected according to the attenuation ratio to obtain the target light intensity.
105. And the mobile terminal adjusts the screen brightness of the mobile terminal according to the target light intensity and ends the process.
In the embodiment of the invention, after the mobile terminal corrects the first light intensity by using the difference value between the first variation amplitude and the second variation amplitude to obtain the target light intensity, the screen brightness of the mobile terminal can be further adjusted according to the target light intensity, so that the accuracy of adjusting the screen brightness can be improved.
Specifically, the specific manner of adjusting the screen brightness of the mobile terminal according to the target light intensity by the mobile terminal may include the following steps:
11) acquiring target screen brightness corresponding to the target light intensity from a preset relation between the light intensity and the screen brightness;
12) and adjusting the current screen brightness of the mobile terminal to the target screen brightness.
In a specific implementation, the mobile terminal may preset a relationship between the light intensity and the screen brightness, specifically, the relationship may be a linear relationship between the light intensity and the screen brightness, or the light intensity may be divided into a plurality of ranges, and each range corresponds to one level of screen brightness, which is not limited in the embodiment of the present invention.
Therefore, after the mobile terminal corrects the first light intensity by using the difference value between the first variation amplitude and the second variation amplitude, the target screen brightness corresponding to the target light intensity is further obtained from the relationship between the preset light intensity and the screen brightness, so that the current screen brightness of the mobile terminal is adjusted to the target screen brightness.
Therefore, in the method described in fig. 1, when the user finishes the call, the mobile terminal may determine whether the light sensor is stained with a layer of oil stain by combining the variation range of the light intensity detected by the light sensor and the RGB sensor before the call and when the call is finished, and if yes, the mobile terminal may correct the light intensity detected by the light sensor and then adjust the screen brightness, so that the problem that the light intensity detection is inaccurate due to the light sensor being blocked by the oil stain can be solved, and the accuracy of adjusting the screen brightness of the mobile terminal can be improved.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating another method for adjusting screen brightness according to an embodiment of the present invention. The method shown in fig. 2 may be applied to mobile terminals such as smart phones (e.g., Android phones, iOS phones, etc.), tablet computers, palmtop computers, personal digital assistants, mobile internet devices, and smart wearable devices, where the mobile terminals include light sensors and RGB sensors. As shown in fig. 2, the screen brightness adjusting method may include the steps of:
201. the mobile terminal obtains a first light intensity detected by the light sensor when the mobile terminal is in a call end state, and determines a first variation amplitude of the first light intensity relative to a second light intensity detected by the light sensor before the mobile terminal is in the call.
202. The mobile terminal determines a second variation amplitude of the light intensity detected by the RGB sensor when the mobile terminal finishes the call relative to the light intensity detected by the RGB sensor before the mobile terminal calls.
203. When the first light intensity is smaller than the second light intensity, the mobile terminal determines whether the first variation amplitude is larger than the second variation amplitude, if so, step 205 is executed; if not, go to step 204.
In the embodiment of the invention, the first light intensity is lower than the second light intensity in two ways, one way is that the light intensity in the environment when the user finishes the conversation is actually reduced from the light intensity before the conversation, and the other way is that the light intensity in the environment before and after the user converses is not changed, but only the light sensor is stained with a layer of oil stain, so that the light intensity detected by the light sensor is lower than the light intensity before the user converses.
Therefore, when the first light intensity is smaller than the second light intensity, the mobile terminal can determine whether the light intensity detected by the light sensor is reduced due to the reduction of the light in the environment or the blocking of the light sensor by judging the magnitudes of the first variation amplitude and the second variation amplitude. That is, if the light sensor is shielded by oil, the first variation range is larger than the second variation range, regardless of whether the light intensity in the environment is not changed or the light intensity in the environment is actually reduced. Conversely, if the light sensor is not obscured by oil, the first amplitude of variation may be less than or equal to the second amplitude of variation.
Therefore, when the first variation amplitude is larger than the second variation amplitude, it is indicated that the light sensor may be shielded by oil stains, so that the mobile terminal is required to further judge whether the difference value between the first variation amplitude and the second variation amplitude is larger than a preset threshold value, so that whether the light sensor is shielded by the oil stains can be further determined. And when the first variation amplitude is judged to be smaller than or equal to the second variation amplitude, the mobile terminal adjusts the screen brightness according to the first light intensity.
As a possible implementation manner, when the first light intensity is greater than the second light intensity, the mobile terminal may further determine whether the first variation amplitude is smaller than the second variation amplitude, and if so, determine whether a difference between the first variation amplitude and the second variation amplitude is greater than a preset threshold; if the first light intensity is larger than or equal to the second light intensity, the screen brightness is adjusted according to the first light intensity.
In a specific implementation, the condition that the first light intensity is greater than the second light intensity is that the light intensity in the environment is higher when the user ends the call than the light intensity before the call. The first variation range should be smaller than the second variation range if the light sensor is shielded by oil, and the first variation range should be almost different from the second variation range if the light sensor is not shielded by oil. The mobile terminal needs to further determine the relationship between the first variation width and the second variation width.
If the first variation amplitude is smaller than the second variation amplitude, it is indicated that the light sensor is possibly shielded by oil stains, so that the mobile terminal is required to further judge whether the difference value between the first variation amplitude and the second variation amplitude is larger than a preset threshold value, and further determine whether the light sensor is shielded by the oil stains. If the first variation amplitude is larger than or equal to the second variation amplitude, the mobile terminal adjusts the screen brightness according to the first light intensity.
204. And the mobile terminal adjusts the screen brightness of the mobile terminal according to the first light intensity and ends the process.
In the embodiment of the invention, when the first light intensity is less than the second light intensity, that is, the light intensity in the environment after the user calls is detected by the light sensor to be lower than the light intensity in the environment before the user calls, if the mobile terminal judges that the first variation amplitude of the light intensity detected by the light sensor is less than or equal to the second variation amplitude of the light intensity detected by the RGB sensor, it indicates that the light sensor is not shielded by the oil stain, and the mobile terminal can directly adjust the screen brightness according to the first light intensity.
In addition, when first light intensity is greater than second light intensity, that is to say when light sensor detects that the light intensity in the environment will be higher than the light intensity in the environment before the conversation after the user converses, if mobile terminal judges that the first range of variation of light intensity that light sensor detected is greater than or equal to the second range of variation of light intensity that RGB sensor detected, then also can show that light sensor is not sheltered from by the greasy dirt, thereby mobile terminal can directly adjust screen brightness according to first light intensity.
205. The mobile terminal judges whether the difference value of the first variation amplitude and the second variation amplitude is larger than a preset threshold value, if so, the step 206-207 is executed; if not, the flow is ended.
206. The mobile terminal corrects the first light intensity by using the difference value to obtain the target light intensity.
207. And the mobile terminal adjusts the screen brightness of the mobile terminal according to the target light intensity and ends the process.
Optionally, when the mobile terminal determines that the difference between the first variation range and the second variation range is greater than the preset threshold, that is, when the mobile terminal determines that the light sensor is shielded by the oil stain, the mobile terminal may further output prompt information to prompt the user to remove the oil stain.
As a feasible implementation manner, the scheme is mainly performed by the mobile terminal in a mode of starting automatic adjustment of screen brightness, and if the user needs to manually adjust the screen brightness, the mobile terminal may further perform the following steps:
21) receiving a sliding operation input in a designated area of the mobile terminal;
22) and adjusting the screen brightness of the mobile terminal according to the sliding direction and the sliding force of the sliding operation.
In a specific implementation, in a mode that the mobile terminal starts to automatically adjust the screen brightness, if a user wants to manually adjust, the user can slide in a designated area of the mobile terminal. The designated area may be a certain area in the touch screen of the mobile terminal, and the embodiment of the present invention is not limited. The mobile terminal can pre-store the screen brightness adjusting direction corresponding to the sliding direction, for example, the upward sliding represents that the screen brightness is increased, and the downward sliding represents that the screen brightness is reduced; the screen brightness change rate corresponding to different sliding force can be determined, and if the sliding force is larger, the screen brightness change is larger when the screen brightness is adjusted; or determining that different sliding distances correspond to different screen brightness variation amounts, and the like. The sliding force degree may be an average force in the sliding process or a minimum force, and the embodiment of the present invention is not limited.
Therefore, when the user inputs the sliding operation in the designated area, the mobile terminal can receive the sliding operation and determine the sliding direction and the sliding force of the sliding operation, so that the screen brightness of the mobile terminal can be adjusted according to the sliding direction and the sliding force. By the method, if the user is not satisfied with the screen brightness automatically adjusted by the mobile terminal, the user can directly adjust the screen brightness in the designated area of the mobile terminal, so that the screen brightness adjusting efficiency is improved, and the user experience is improved.
For example, when the user slides upwards in the designated area of the mobile terminal, the mobile terminal may increase the screen brightness according to the determination that the user needs to increase the screen brightness, and thus the mobile terminal may obtain the sliding force of the user, such as 5N. Assuming that the screen brightness variation amount corresponding to 5N is 2cd, the mobile terminal increases the current screen brightness by 2 cd.
It can be seen that in the method described in fig. 2, the mobile terminal may preliminarily determine whether the light in the environment changes, or becomes dark or bright, according to the intensity of the light detected by the light sensor. If the light in the environment is dark, the light sensor can be confirmed to be shielded only when the first variation amplitude of the light intensity detected by the light sensor is larger than the second variation amplitude of the light intensity detected by the RGB sensor; if the light in the environment becomes bright, it can be confirmed that the light sensor is blocked only when the first variation range of the light intensity detected by the light sensor is smaller than the second variation range of the light intensity detected by the RGB sensor. Through this kind of mode, mobile terminal can be in the environment of complicacy accurate determine light sensor whether sheltered from by the greasy dirt to can improve screen brightness control's the degree of accuracy.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention. The mobile terminal 300 shown in fig. 3 may include, but is not limited to, a mobile terminal having a light sensor and an RGB sensor, such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a personal digital assistant, a mobile internet device, and an intelligent wearable device. As shown in fig. 3, the mobile terminal 300 may include the following elements:
the acquiring unit 301 is configured to acquire a first light intensity detected by the light sensor when the mobile terminal 300 ends a call.
The determining unit 302 is configured to determine a first variation range of the first light intensity relative to a second light intensity detected by the light sensor before the mobile terminal 300 calls, and determine a second variation range of the light intensity detected by the RGB sensor at the end of the call of the mobile terminal 300 relative to the light intensity detected by the RGB sensor before the call of the mobile terminal 300.
The determining unit 303 is configured to determine whether a difference between the first variation width and the second variation width is greater than a preset threshold.
A correcting unit 304, configured to correct the first light intensity obtained by the obtaining unit 301 by using the difference value when the determining unit 303 determines that the difference value is greater than a preset threshold, so as to obtain a target light intensity.
An adjusting unit 305 for adjusting the screen brightness of the mobile terminal 300 according to the target light intensity.
Referring to fig. 4, fig. 4 is a schematic structural diagram of another mobile terminal according to an embodiment of the present invention. The mobile terminal 300 shown in fig. 4 is optimized based on the mobile terminal 300 shown in fig. 3. As shown in fig. 4, the mobile terminal 300 may further include:
the determining unit 303 is further configured to determine whether the first variation range is smaller than the second variation range when the first light intensity is larger than the second light intensity, and if so, further determine whether a difference between the first variation range and the second variation range is larger than a preset threshold.
The adjusting unit 305 is further configured to adjust the screen brightness of the mobile terminal 300 according to the first light intensity when the determining unit 303 determines that the first variation width is greater than or equal to the second variation width.
As a possible implementation manner, the determining unit 303 is further configured to determine whether the first variation width is larger than the second variation width when the first light intensity is smaller than the second light intensity, and if so, further determine whether a difference between the first variation width and the second variation width is larger than a preset threshold.
The adjusting unit 305 is further configured to adjust the screen brightness of the mobile terminal 300 according to the first light intensity when the determining unit 303 determines that the first variation width is smaller than or equal to the second variation width.
As another possible implementation, the adjusting unit 305 may include an obtaining subunit 3051 and an adjusting subunit 3052, where:
the obtaining subunit 3051 is configured to obtain, from a relationship between a preset light intensity and screen brightness, a target screen brightness corresponding to the target light intensity.
An adjusting subunit 3052, configured to adjust the current screen brightness of the mobile terminal 300 to a target screen brightness.
As still another possible implementation, the mobile terminal 300 may further include:
a receiving unit 306 for receiving a slide operation input in a designated area of the mobile terminal 300.
The adjusting unit 305 is further configured to adjust the screen brightness of the mobile terminal 300 according to the sliding direction and the sliding force of the sliding operation.
It should be noted that, in the embodiment of the present invention, the adjusting unit 305 may adjust the screen brightness of the mobile terminal 300, that is, may perform operations performed by the first adjusting unit, the second adjusting unit, the third adjusting unit, and the fourth adjusting unit, which are mentioned in the claims, and details of the embodiment of the present invention are not repeated herein.
As can be seen, in the mobile terminal described in fig. 3 and 4, the mobile terminal includes a light sensor and an RGB sensor, wherein, the light sensor is arranged on the front side of the mobile terminal, the RGB sensor is arranged on the back side of the mobile terminal, when the light sensor detects the first light intensity when the mobile terminal finishes the call, the mobile terminal determines a first magnitude of change in the first light intensity relative to a second light intensity detected by the light sensor before the mobile terminal talks, and determining a second variation amplitude of the light intensity detected by the RGB sensor at the end of the call relative to the light intensity detected by the RGB sensor before the call, and when the difference value between the first variation amplitude and the second variation amplitude is larger than the preset threshold value, correcting the first light intensity by using the difference value to obtain the target light intensity, and finally adjusting the screen brightness of the mobile terminal according to the target light intensity. According to the embodiment of the invention, when the user finishes the call, the mobile terminal can determine whether the light sensor is stained with a layer of oil stain by combining the change range of the light intensity detected by the light sensor and the RGB sensor before the call and when the call is finished, if yes, the mobile terminal can correct the light intensity detected by the light sensor and then adjust the screen brightness, so that the problem that the light intensity is inaccurate to detect due to the fact that the light sensor is shielded by the oil stain can be solved, and the accuracy of adjusting the screen brightness of the mobile terminal can be improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of another mobile terminal according to an embodiment of the present invention. The mobile terminal 500 shown in fig. 5 includes, but is not limited to, a mobile terminal having a light sensor and an RGB sensor, such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a personal digital assistant, a mobile internet device, and an intelligent wearable device. The mobile terminal 500 may comprise at least one processor 501, such as a CPU, a communication interface 502, a memory 503 and at least one communication bus 504, where the memory 503 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory, and optionally, the memory 503 may also be at least one storage device located remotely from the processor 501. Wherein:
the communication bus 504 is used for realizing connection and communication among the components such as the processor 501, the communication interface 502, the memory 503 and the like.
A set of program codes is stored in the memory 503 and the processor 501 is configured to call the program codes stored in the memory 503 to perform the following operations:
acquiring a first light intensity detected by a light sensor when the call of the mobile terminal 500 is ended, and determining a first variation amplitude of the first light intensity relative to a second light intensity detected by the light sensor before the call of the mobile terminal 500;
determining a second variation amplitude of the light intensity detected by the RGB sensor when the mobile terminal 500 finishes the call relative to the light intensity detected by the RGB sensor before the mobile terminal 500 calls;
judging whether the difference value of the first variation amplitude and the second variation amplitude is larger than a preset threshold value or not;
if the first light intensity is larger than the preset threshold, correcting the first light intensity by using the difference value to obtain the target light intensity;
the screen brightness of the mobile terminal 500 is adjusted according to the target light intensity.
In some possible embodiments, the processor 501 is further configured to call the program code stored in the memory 503 to perform the following operations:
when the first light intensity is smaller than the second light intensity, judging whether the first variation amplitude is larger than the second variation amplitude;
if the first variation amplitude is larger than the second variation amplitude, executing an operation of judging whether the difference value between the first variation amplitude and the second variation amplitude is larger than a preset threshold value;
if the first variation amplitude is smaller than or equal to the second variation amplitude, the screen brightness of the mobile terminal 500 is adjusted according to the first light intensity.
In some possible embodiments, the processor 501 is further configured to call the program code stored in the memory 503 to perform the following operations:
when the first light intensity is greater than the second light intensity, judging whether the first variation amplitude is smaller than the second variation amplitude;
if the first variation amplitude is smaller than the second variation amplitude, executing an operation of judging whether the difference value between the first variation amplitude and the second variation amplitude is larger than a preset threshold value;
if the first variation amplitude is greater than or equal to the second variation amplitude, the screen brightness of the mobile terminal 500 is adjusted according to the first light intensity.
In some possible embodiments, the specific way for the processor 501 to adjust the screen brightness of the mobile terminal 500 according to the target light intensity may be:
acquiring target screen brightness corresponding to the target light intensity from a preset relation between the light intensity and the screen brightness;
the current screen brightness of the mobile terminal 500 is adjusted to the target screen brightness.
In some possible embodiments, the processor 501 is further configured to call the program code stored in the memory 503 to perform the following operations:
receiving a slide operation input in a designated area of the mobile terminal 500 through the communication interface 502;
the screen brightness of the mobile terminal 500 is adjusted according to the sliding direction and the sliding force of the sliding operation.
As can be seen, in the mobile terminal depicted in fig. 5, the mobile terminal includes a light sensor and an RGB sensor, wherein, the light sensor is arranged on the front side of the mobile terminal, the RGB sensor is arranged on the back side of the mobile terminal, when the light sensor detects the first light intensity when the mobile terminal finishes the call, the mobile terminal determines a first magnitude of change in the first light intensity relative to a second light intensity detected by the light sensor before the mobile terminal talks, and determining a second variation amplitude of the light intensity detected by the RGB sensor at the end of the call relative to the light intensity detected by the RGB sensor before the call, and when the difference value between the first variation amplitude and the second variation amplitude is larger than the preset threshold value, correcting the first light intensity by using the difference value to obtain the target light intensity, and finally adjusting the screen brightness of the mobile terminal according to the target light intensity. According to the embodiment of the invention, when the user finishes the call, the mobile terminal can determine whether the light sensor is stained with a layer of oil stain by combining the change range of the light intensity detected by the light sensor and the RGB sensor before the call and when the call is finished, if yes, the mobile terminal can correct the light intensity detected by the light sensor and then adjust the screen brightness, so that the problem that the light intensity is inaccurate to detect due to the fact that the light sensor is shielded by the oil stain can be solved, and the accuracy of adjusting the screen brightness of the mobile terminal can be improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.