CN108600546B - Environment light detection method and mobile terminal - Google Patents

Environment light detection method and mobile terminal Download PDF

Info

Publication number
CN108600546B
CN108600546B CN201810399809.4A CN201810399809A CN108600546B CN 108600546 B CN108600546 B CN 108600546B CN 201810399809 A CN201810399809 A CN 201810399809A CN 108600546 B CN108600546 B CN 108600546B
Authority
CN
China
Prior art keywords
ambient light
mobile terminal
photosensitive sensor
data
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810399809.4A
Other languages
Chinese (zh)
Other versions
CN108600546A (en
Inventor
杨锐斌
周玉林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810399809.4A priority Critical patent/CN108600546B/en
Publication of CN108600546A publication Critical patent/CN108600546A/en
Application granted granted Critical
Publication of CN108600546B publication Critical patent/CN108600546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/06Adjustment of display parameters
    • G09G2320/0626Adjustment of display parameters for control of overall brightness
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides an ambient light detection method and a mobile terminal, wherein the mobile terminal comprises a first photosensitive sensor arranged on a display screen and a second photosensitive sensor arranged outside the display screen, and the method comprises the following steps: acquiring initial data of ambient light in the current state, which is acquired by a first photosensitive sensor; and adjusting initial data of the ambient light according to preset ambient light calibration data to obtain actual data of the ambient light in the current state. According to the invention, through auxiliary photosensitive data calibration, the accuracy of the photosensitive device for acquiring the actual data of the ambient light in the current state is ensured, and further the effectiveness of backlight adjustment of the mobile terminal is ensured.

Description

Environment light detection method and mobile terminal
Technical Field
The invention relates to the technical field of communication, in particular to an ambient light detection method and a mobile terminal.
Background
Generally, a photosensitive sensor of a mobile terminal is disposed under a glass cover plate, wherein the glass cover plate has a stable light transmission characteristic, and a sampling environment of the device is relatively stable. If the sampling conditions (such as transmittance to each spectral band) of the device or the sampling environment changes due to aging of the glass cover plate material of the mobile terminal or changes of the interference source near the device, the accuracy of the sampling data of the photosensitive sensor is affected.
Based on sampling condition or sampling environment change, the accuracy of photosensitive sensor data can lose, and then can lead to mobile terminal's backlight unit dimming effect to seriously not conform to with current environment, influence user experience.
Disclosure of Invention
The embodiment of the invention provides an ambient light detection method and a mobile terminal, and aims to solve the problems that in the prior art, due to the fact that sampling conditions or sampling environments change, the accuracy of data of a photosensitive sensor is lost, the dimming effect of a backlight module of the mobile terminal is seriously inconsistent with the current environment, and user experience is affected.
In order to solve the above problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides an ambient light detection method, which is applied to a mobile terminal, where the mobile terminal includes a first photosensor disposed on a display screen and a second photosensor disposed outside the display screen, and the method includes:
acquiring initial data of ambient light in the current state, which is acquired by a first photosensitive sensor;
and adjusting initial data of the ambient light according to preset ambient light calibration data to obtain actual data of the ambient light in the current state.
In a second aspect, an embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes a first photosensor disposed on a display screen and a second photosensor disposed outside the display screen, and the mobile terminal further includes:
the first acquisition module is used for acquiring initial data of the ambient light in the current state, which is acquired by the first photosensitive sensor;
and the second acquisition module is used for adjusting the initial data of the ambient light according to the preset ambient light calibration data and acquiring the actual data of the ambient light in the current state.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program, when executed by the processor, implements the steps of the above-mentioned ambient light detection method.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the above-mentioned ambient light detection method.
In the embodiment of the invention, the initial data of the ambient light in the current state, which is acquired by the first photosensitive sensor arranged on the display screen of the mobile terminal, is acquired, the initial data of the ambient light is adjusted according to the preset ambient light calibration data, and the actual data of the ambient light in the current state is acquired, so that the accuracy of the data acquired by the first photosensitive sensor can be ensured, and the effectiveness of backlight adjustment of the mobile terminal is further ensured.
Drawings
FIG. 1 is a schematic diagram of a first method for detecting ambient light according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating two photosensitive sensor locations of a mobile terminal according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a second ambient light detection method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a state change of a mobile terminal according to an embodiment of the present invention;
FIG. 5 is a diagram of a mobile terminal according to an embodiment of the invention;
fig. 6 is a schematic diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention.
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 some, not all, embodiments of the present invention. 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.
An embodiment of the present invention provides an ambient light detection method, which is applied to a mobile terminal, where the mobile terminal includes a first photosensor disposed on a display screen and a second photosensor disposed outside the display screen, as shown in fig. 1, and the method includes:
step 101, acquiring initial data of the ambient light in the current state acquired by the first photosensitive sensor.
The mobile terminal needs to acquire initial data of ambient light acquired by the first photosensitive sensor in the current state, wherein the first photosensitive sensor is arranged on the display screen, and the first photosensitive sensor can be ensured to be synchronous with a visual angle of a user when the mobile terminal is normally used. The first photosensitive sensor and the second photosensitive sensor are arranged in the structural member made of the same material, and the second photosensitive sensor is arranged outside the display screen. Wherein, the luminousness of the apron material that the second photosensitive sensor top set up is more stable than the luminousness of the apron material that first photosensitive sensor top set up, and consequently the stability that sets up the sampling environment that the position corresponds of second photosensitive sensor is superior to the stability of first photosensitive sensor sampling environment, and then can realize obtaining predetermined environment light calibration data through second photosensitive sensor for the realization is to the calibration of first photosensitive sensor.
And 102, adjusting initial data of the ambient light according to preset ambient light calibration data to obtain actual data of the ambient light in the current state.
After acquiring the initial data of the ambient light collected by the first photosensitive sensor in the current state and detecting that the light calibration function is started, the initial data of the ambient light can be adjusted according to the preset ambient light calibration data, and the actual data of the ambient light in the current state can be obtained after adjustment.
The preset ambient light calibration data can be acquired through the second photosensitive sensor arranged outside the display screen, the initial data of the ambient light acquired by the first photosensitive sensor is calibrated through the preset ambient light calibration data, and the accuracy of the data acquired by the first photosensitive sensor can be guaranteed.
According to the embodiment of the invention, the initial data of the ambient light collected by the first photosensitive sensor arranged on the display screen in the current state needs to be acquired, and after the initial data of the ambient light is acquired, the initial data of the ambient light is calibrated according to the preset ambient light calibration data, so that the accuracy of the data acquired by the first photosensitive sensor is ensured, and the effectiveness of backlight regulation of the mobile terminal is further ensured.
In an embodiment of the present invention, before the step of acquiring initial data of the ambient light in the current state collected by the first photosensitive sensor, the method further includes: and acquiring preset ambient light calibration data.
Before the initial data of the ambient light in the current state is acquired by using the first photosensitive sensor arranged on the display screen, the preset ambient light calibration data can be acquired by using the second photosensitive sensor arranged outside the display screen, so that the first photosensitive sensor is calibrated by using the second photosensitive sensor.
Wherein, the step of obtaining preset ambient light calibration data comprises:
when detecting that a second photosensitive sensor of the mobile terminal faces a preset direction, acquiring first data of ambient light acquired by the second photosensitive sensor; when the change of the orientation of the second photosensitive sensor is detected, acquiring the time difference between the orientation of the first photosensitive sensor in the preset direction and the orientation change of the second photosensitive sensor; if the time difference is smaller than or equal to a preset time threshold, setting the first ambient light data as preset ambient light calibration data; wherein the first light sensitive sensor collects initial data of ambient light when facing a preset direction.
Before acquiring the preset calibration data of the ambient light, a preset direction needs to be determined, where the preset direction may be a direction of the opposite light source. After the preset direction is determined, the orientation of a second photosensitive sensor arranged outside the display screen is detected, when the second photosensitive sensor faces the preset direction, first data of ambient light collected by the second photosensitive sensor can be acquired, and the acquired first data of the ambient light is stored.
If a change in orientation of the second light sensitive sensor is detected, a first moment in time at which the change in orientation of the second light sensitive sensor occurs needs to be recorded. When the orientation of the second photosensitive sensor is changed and the first photosensitive sensor is detected to face the preset direction, recording a second moment when the first photosensitive sensor faces the preset direction, then acquiring a difference value between the second moment and the second moment, comparing the acquired difference value between the second moment and the first moment with a preset time threshold value, and when the time threshold value between the second moment and the first moment is smaller than or equal to the preset time threshold value, setting the first ambient light data as preset ambient light calibration data.
Because the time value of the mobile terminal from the change of the second photosensitive sensor towards the preset direction to the change of the first photosensitive sensor towards the preset direction is smaller than the preset time threshold, the corresponding time of the change process can be determined to be shorter, and the light environment states of the first photosensitive sensor and the second photosensitive sensor are the same.
The second photosensitive sensor faces to the preset direction, and when the first data of the ambient light are collected, the first data of the plurality of ambient lights in the current state can be obtained, then the average value is obtained, the obtained average value is stored and serves as preset ambient light calibration data, and the accuracy of the preset ambient light calibration data can be improved through the mode.
When the first photosensitive sensor faces the preset direction, the initial data of the ambient light is collected, that is, the initial data of the ambient light in the current state collected by the first photosensitive sensor is the corresponding ambient light data when the first photosensitive sensor faces the preset direction.
In the embodiment of the present invention, when detecting that the second photosensor of the mobile terminal faces the preset direction, the method further includes:
recording the placing state and/or the gravity acceleration component of the mobile terminal;
the step of obtaining the time difference between the orientation of the first photosensor in the preset direction and the orientation of the second photosensor when detecting the change of the orientation of the second photosensor includes:
when the placing state and/or the gravity acceleration component change of the mobile terminal is detected, determining that the orientation of the second photosensitive sensor changes; when the changed placing state of the mobile terminal meets a first preset condition and/or the changed gravitational acceleration component of the mobile terminal meets a second preset condition, determining that the first photosensitive sensor faces a preset direction, and acquiring a time difference value.
When the second photosensitive sensor of the mobile terminal faces the preset direction, at least one of the current placing state and the gravity acceleration component of the mobile terminal can be recorded, and the current placing state and the at least one of the gravity acceleration component of the mobile terminal can be recorded to be used as a comparison reference for judging whether the state of the mobile terminal changes or not.
Wherein the process of obtaining the time difference between the orientation of the first photosensor in the preset direction and the change in orientation of the second photosensor is: when the second photosensitive sensor of the mobile terminal faces the preset direction, after at least one of the current placing state and the gravity acceleration component of the mobile terminal is recorded, if the placing state and/or the gravity acceleration component of the mobile terminal is detected to be changed, the change of the orientation of the second photosensitive sensor can be determined, and at the moment, the first moment is recorded.
When the placing state of the mobile terminal after being changed meets a first preset condition and/or the gravity acceleration component of the mobile terminal after being changed meets a second preset condition is detected, the direction of the first photosensitive sensor towards the preset direction can be determined, the second moment is recorded at the moment, and the difference value between the second moment and the first moment is determined to be the time difference value between the direction of the first photosensitive sensor towards the preset direction and the direction of the second photosensitive sensor.
The following describes a movement track of the mobile terminal from the second photosensitive sensor facing the preset direction to the first photosensitive sensor facing the preset direction. Because the resultant force direction of the mobile terminal in the motion process is vertical downwards all the time, the gravity acceleration sensor on the mobile terminal can be used for calculating the gravity acceleration in each direction on the screen, so that the included angle between the mobile terminal and the vertical surface can be calculated, and the motion change process of the mobile terminal can be known by monitoring the change of the included angle.
On the other hand, the rotation angle within time can be calculated through the gyroscope, so that the motion track of the mobile terminal can be further known through the rotation angle after the gravity acceleration sensor is used for calculating the included angle between the initial position of the mobile terminal and the vertical plane.
When the second photosensitive sensor of the mobile terminal is detected to face the preset direction and the first data of the ambient light collected by the second photosensitive sensor is obtained, the current gravity acceleration component of the mobile terminal is recorded. When the gravity acceleration component of the mobile terminal is detected to meet a second preset condition within a preset time interval, it can be determined that the first photosensitive sensor of the current mobile terminal faces a preset direction, and at the moment, the first photosensitive sensor can acquire initial data of ambient light.
When the second photosensitive sensor of the mobile terminal is detected to face the preset direction and the first data of the ambient light collected by the second photosensitive sensor is acquired, the current placing state of the mobile terminal is recorded. When the placing state of the mobile terminal is detected to meet a first preset condition within a preset time interval, the first photosensitive sensor of the current mobile terminal can be determined to face a preset direction, and at the moment, the first photosensitive sensor can collect initial data of ambient light.
When the second photosensitive sensor of the mobile terminal is detected to face the preset direction and the first data of the ambient light collected by the second photosensitive sensor is acquired, the current placing state and the gravity acceleration component of the mobile terminal can be recorded. When the placing state of the mobile terminal is detected to meet a first preset condition and the gravity acceleration component of the mobile terminal meets a second preset condition within a preset time interval, it can be determined that the first photosensitive sensor of the current mobile terminal faces a preset direction, and at the moment, the first photosensitive sensor can collect initial data of ambient light.
In the embodiment of the invention, the arrangement position of the second photosensitive sensor is not influenced by the interference source, and the stability of the sampling environment corresponding to the second photosensitive sensor is better than that of the first photosensitive sensor. The sampling environment includes, but is not limited to, the interference of the interference source to the device sampling changes with aging of the device as the usage time increases, and the like.
In the embodiment of the present invention, after obtaining the actual data of the ambient light in the current state, the method further includes:
and carrying out backlight adjustment on a display screen of the mobile terminal according to the actual data of the ambient light in the current state.
After the actual data of the ambient light in the current state is determined, the backlight adjustment of the mobile terminal can be performed according to the actual data of the ambient light in the current state, and the effectiveness of the backlight adjustment is ensured on the basis of the data accuracy of the photosensitive device.
In the embodiment of the invention, the initial data of the ambient light in the current state, which is acquired by the first photosensitive sensor arranged on the display screen of the mobile terminal, is acquired, the initial data of the ambient light is adjusted according to the preset ambient light calibration data, and the actual data of the ambient light in the current state is acquired, so that the accuracy of the data acquired by the first photosensitive sensor can be ensured, and the effectiveness of backlight adjustment of the mobile terminal is further ensured.
It should be noted that the first photosensor and the second photosensor may be located on two different end faces of the mobile terminal, and when the two end faces respectively face the preset direction within a time threshold that is less than or equal to the preset time threshold, it may be determined that the first photosensor and the second photosensor are in the same ambient light state, and at this time, the second photosensor may be used to calibrate the first photosensor.
The aim of the embodiment of the invention is to ensure backlight adjustment, and the backlight adjustment is mainly to enable a user to see the display content of a display screen of the mobile terminal clearly in environments with different brightness, so that the first photosensitive sensor is arranged below a front glass cover plate of the mobile terminal, the actual data of the ambient light in the current state is acquired by using the first photosensitive sensor, and the actual data is used as a main data source of the backlight adjustment, so that the synchronization with the visual angle of the user can be kept. The technical scheme of the invention is explained in detail below by taking the example that the first photosensitive sensor is arranged below the front glass cover plate of the mobile terminal, the second photosensitive sensor is arranged at the top of the mobile terminal, and the end face where the second photosensitive sensor is arranged is vertical to the end face where the first photosensitive sensor is arranged.
The positions of the first photosensitive sensor and the second photosensitive sensor are shown in fig. 2, the first photosensitive sensor a is positioned on the front side of the mobile terminal and below the glass cover plate; an opening is formed in the top of the mobile terminal, the second photosensitive sensor B is arranged in the opening, and a transparent cover plate is arranged on the opening.
The sampling environment of the second photosensitive sensor is stable, the accuracy of data can be guaranteed, and due to structural limitation, the data of the second photosensitive sensor has angular deviation with the visual angle of a user and cannot be used as a source of backlight adjustment, and the data of the second photosensitive sensor is used as a data source of auxiliary calibration of the first photosensitive sensor.
It should be noted that, by disposing the first photosensitive sensor below the front glass cover plate of the mobile terminal, the sampling environment of the first photosensitive sensor may change due to aging of surrounding devices, where the sampling environment changes include, but are not limited to: the material of the glass cover plate is aged in the using process, so that the light transmittance is changed, the transmission of the spectrum is influenced, the light transmittance is changed, the old calibration coefficient is not matched with the current sampling environment, and the calibration is needed to be carried out again to compensate the deviation; interference sources can exist around the first photosensitive sensor, interference of the interference sources on device data can change to different degrees along with the use time, and the caused interference amount is variable along with the change of the time, so that the data of the first photosensitive sensor is deviated.
Along with the change of the sampling environment of the first photosensitive sensor, the precision loss of the acquired data of the first photosensitive sensor occurs, and at this time, the second photosensitive sensor which is positioned on other end faces of the mobile terminal and used as auxiliary equipment can be used for calibrating the data. In embodiments of the present invention, the second photosensor is required to remain stationary in the sampling environment, and the second photosensor is used to perform data calibration on the first photosensor. Wherein the fixed sampling environment of the second photosensitive sensor can be understood as: no interference source exists around the second photosensitive sensor, and/or the light transmittance of the cover plate above the second photosensitive sensor is kept stable when the second photosensitive sensor collects data.
The whole process of the embodiment of the invention is shown in fig. 3:
step 301, start the calibration process.
Step 302, when the mobile terminal is detected to be in a vertical state, acquiring first data of ambient light acquired by the second photosensitive sensor.
When detecting whether the mobile terminal is in a vertical state, the mobile terminal can be detected through a gravity acceleration sensor arranged in the mobile terminal, and when the gravity acceleration components on all coordinate axes of the mobile terminal are first preset values corresponding to all coordinate axes, the state of the mobile terminal is determined to be in the vertical state. When the mobile terminal is in a vertical state, the second photosensitive sensor faces upward to the light source, at the moment, the orientation of the second photosensitive sensor is a preset direction, and first data of ambient light collected by the second photosensitive sensor can be acquired.
And 303, acquiring initial data of the ambient light collected by the first photosensitive sensor when the mobile terminal is detected to be switched from the vertical state to the horizontal state within a preset time.
When the mobile terminal is in the vertical state, after the first data of the ambient light collected by the second photosensor is acquired, it is required to detect whether the mobile terminal is switched from the vertical state to the horizontal state within a preset time period, as shown in fig. 4, where a light source is above the mobile terminal.
When the state change of the mobile terminal is detected, the placing state of the mobile terminal and/or the change condition of the gravity acceleration component can be detected within the preset time. And when the change of the placing state of the mobile terminal is detected, a gyroscope can be adopted for calculation. The preset time is set to meet the condition that the ambient light of the two photosensitive sensors is consistent, and therefore the accuracy of calibration is ensured.
Step 304, setting the first ambient light data as preset ambient light calibration data.
The first data of the ambient light read to the second photosensor in the vertical direction can be regarded as the actual value of the current ambient light source and used as the preset ambient light calibration data. The mobile terminal can be rotated from the vertical state to the horizontal state in a short time, and then the first photosensitive sensor can be recalibrated by using preset ambient light calibration data, the calibration relationship is different according to devices, the relationship can be a one-time relationship between the two or other functional relationships between the two, and the method is not limited herein.
And 305, adjusting initial data of the ambient light according to preset ambient light calibration data to obtain actual data of the ambient light in the current state.
And adjusting initial data of the ambient light according to preset ambient light calibration data to achieve the purpose of calibration, and further obtaining actual data of the ambient light in the current state.
And step 306, adjusting backlight of the display screen of the mobile terminal according to the actual data of the ambient light in the current state.
In the embodiment of the invention, the second photosensitive sensor is used for acquiring the preset ambient light calibration data, and the initial data of the ambient light acquired by the first photosensitive sensor is adjusted according to the preset ambient light calibration data, so that the accuracy of the data acquired by the first photosensitive sensor can be ensured, and the effectiveness of backlight adjustment of the mobile terminal can be further ensured.
An embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes a first photosensitive sensor disposed on a display screen and a second photosensitive sensor disposed outside the display screen, and as shown in fig. 5, the mobile terminal further includes:
the first acquisition module 10 is configured to acquire initial data of ambient light in a current state, which is acquired by the first photosensor;
the second obtaining module 20 is configured to adjust initial data of the ambient light according to preset ambient light calibration data, and obtain actual data of the ambient light in the current state.
Wherein, mobile terminal still includes:
the third obtaining module 30 is configured to obtain preset ambient light calibration data before the first obtaining module 10 obtains the initial data of the ambient light in the current state, which is collected by the first photosensor.
Wherein, the third obtaining module 30 includes:
the first obtaining submodule 31 is configured to obtain first data of ambient light collected by a second photosensor of the mobile terminal when detecting that the second photosensor faces a preset direction;
a second obtaining sub-module 32, configured to obtain a time difference between the first photosensor facing the preset direction and the second photosensor facing when detecting that the second photosensor is facing the preset direction;
a setting submodule 33, configured to set the ambient light first data as preset ambient light calibration data if the time difference is smaller than or equal to a preset time threshold;
wherein the first light sensitive sensor collects initial data of ambient light when facing a preset direction.
Wherein, the third obtaining module 30 further includes:
the recording submodule 34 is configured to record the placing state and/or the gravitational acceleration component of the mobile terminal when the first obtaining submodule 31 detects that the second photosensor of the mobile terminal faces the preset direction;
the second acquisition submodule 32 includes:
a determining unit 321, configured to determine that an orientation of the second photosensor changes when a change in a placement state and/or a gravitational acceleration component of the mobile terminal is detected;
the processing unit 322 is configured to determine that the first photosensor faces the preset direction and acquire a time difference value when the changed placement state of the mobile terminal meets a first preset condition and/or the changed gravitational acceleration component of the mobile terminal meets a second preset condition.
Wherein, mobile terminal still includes:
and the adjusting module 40 is configured to perform backlight adjustment on the display screen of the mobile terminal according to the actual data of the ambient light in the current state after the second obtaining module 20 obtains the actual data of the ambient light in the current state.
The mobile terminal according to the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 and fig. 3, and is not described herein again to avoid repetition.
According to the embodiment of the invention, the initial data of the ambient light in the current state, which is acquired by the first photosensitive sensor arranged on the display screen of the mobile terminal, is acquired, the initial data of the ambient light is adjusted according to the preset ambient light calibration data, and the actual data of the ambient light in the current state is acquired, so that the accuracy of the data acquired by the first photosensitive sensor can be ensured, and the effectiveness of backlight adjustment of the mobile terminal is further ensured.
Fig. 6 is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, where the mobile terminal 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 6 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
Wherein, the mobile terminal further includes a first photosensor disposed on the display screen and a second photosensor disposed outside the display screen, and the processor 610 is configured to: acquiring initial data of ambient light in the current state, which is acquired by a first photosensitive sensor; and adjusting initial data of the ambient light according to preset ambient light calibration data to obtain actual data of the ambient light in the current state.
Before acquiring the initial data of the ambient light in the current state collected by the first photosensitive sensor, the processor 610 is further configured to perform the following steps: and acquiring preset ambient light calibration data.
Wherein, when acquiring the preset ambient light calibration data, the processor 610 is further configured to perform the following steps:
when detecting that a second photosensitive sensor of the mobile terminal faces a preset direction, acquiring first data of ambient light acquired by the second photosensitive sensor; when the change of the orientation of the second photosensitive sensor is detected, acquiring the time difference between the orientation of the first photosensitive sensor in the preset direction and the orientation change of the second photosensitive sensor; if the time difference is smaller than or equal to a preset time threshold, setting the first ambient light data as preset ambient light calibration data; wherein the first light sensitive sensor collects initial data of ambient light when facing a preset direction.
Wherein, when detecting that the second light sensor of the mobile terminal faces the preset direction, the processor 610 is further configured to perform the following steps: recording the placing state and/or the gravity acceleration component of the mobile terminal; the processor 610 is further configured to, upon detecting a change in orientation of the second photosensor, obtain a time difference between the first photosensor being oriented in the predetermined direction and the second photosensor being oriented, perform the following steps: when the placing state and/or the gravity acceleration component change of the mobile terminal is detected, determining that the orientation of the second photosensitive sensor changes; when the changed placing state of the mobile terminal meets a first preset condition and/or the changed gravitational acceleration component of the mobile terminal meets a second preset condition, determining that the first photosensitive sensor faces a preset direction, and acquiring a time difference value.
Wherein, after obtaining the actual data of the ambient light in the current state, the processor 610 is further configured to perform the following steps: and carrying out backlight adjustment on a display screen of the mobile terminal according to the actual data of the ambient light in the current state.
Therefore, the initial data of the ambient light in the current state collected by the first photosensitive sensor arranged on the display screen of the mobile terminal is obtained, the initial data of the ambient light is adjusted according to the preset ambient light calibration data, the actual data of the ambient light in the current state is obtained, the accuracy of the data obtained by the first photosensitive sensor can be guaranteed, and the effectiveness of backlight adjustment of the mobile terminal is further ensured.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 610; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 601 may also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 602, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output related to a specific function performed by the mobile terminal 600 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used to receive audio or video signals. The input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphic processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 601 in case of the phone call mode.
The mobile terminal 600 also includes at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 6061 and/or the backlight when the mobile terminal 600 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 605 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 606 is used to display information input by the user or information provided to the user. The Display unit 606 may include a Display panel 6061, and the Display panel 6061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 6071 using a finger, stylus, or any suitable object or accessory). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 610, receives a command from the processor 610, and executes the command. In addition, the touch panel 6071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, the other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 6071 can be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation on or near the touch panel 6071, the touch operation is transmitted to the processor 610 to determine the type of the touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although the touch panel 6071 and the display panel 6061 are shown in fig. 6 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 608 is an interface through which an external device is connected to the mobile terminal 600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 600 or may be used to transmit data between the mobile terminal 600 and external devices.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 609 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 610 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 609 and calling data stored in the memory 609, thereby integrally monitoring the mobile terminal. Processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The mobile terminal 600 may further include a power supply 611 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 611 is logically connected to the processor 610 via a power management system, so that functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the mobile terminal 600 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 610, a memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program is executed by the processor 610 to implement each process of the above-mentioned embodiment of the ambient light detection method, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned embodiment of the ambient light detection method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. An ambient light detection method is applied to a mobile terminal, and is characterized in that the mobile terminal comprises a first photosensitive sensor arranged on a display screen and a second photosensitive sensor arranged outside the display screen, and the method comprises the following steps:
acquiring initial data of ambient light in the current state, which is acquired by the first photosensitive sensor;
adjusting the initial data of the ambient light according to preset ambient light calibration data to obtain actual data of the ambient light in the current state;
before the step of acquiring the initial data of the ambient light in the current state collected by the first photosensitive sensor, the method further includes:
acquiring the preset ambient light calibration data;
the step of acquiring the preset ambient light calibration data comprises:
when detecting that a second photosensitive sensor of the mobile terminal faces a preset direction, acquiring first data of ambient light acquired by the second photosensitive sensor;
when the change of the orientation of the second photosensitive sensor is detected, acquiring the time difference between the orientation of the first photosensitive sensor in a preset direction and the orientation change of the second photosensitive sensor;
if the time difference is smaller than or equal to a preset time threshold, setting the ambient light first data as the preset ambient light calibration data;
wherein the first photosensitive sensor acquires initial data of the ambient light when facing a preset direction.
2. The ambient light detection method according to claim 1, wherein the detecting that the second photosensor of the mobile terminal is oriented in a preset direction further comprises:
recording the placing state and/or the gravity acceleration component of the mobile terminal;
the step of obtaining a time difference between the direction of the first photosensor changing to the preset direction and the direction of the second photosensor changing when detecting that the direction of the second photosensor is changing includes:
when the change of the placing state and/or the gravity acceleration component of the mobile terminal is detected, determining that the orientation of the second photosensitive sensor changes;
and when the changed placing state of the mobile terminal meets a first preset condition and/or the changed gravity acceleration component of the mobile terminal meets a second preset condition, determining that the first photosensitive sensor faces a preset direction, and acquiring the time difference.
3. The ambient light detection method according to claim 1, further comprising, after obtaining the actual data of the ambient light in the current state:
and carrying out backlight adjustment on the display screen of the mobile terminal according to the actual data of the ambient light in the current state.
4. A mobile terminal, characterized in that, mobile terminal is including setting up the first photosensor on the display screen and setting up in the second photosensor outside the display screen, mobile terminal still includes:
the first acquisition module is used for acquiring initial data of the ambient light in the current state, which is acquired by the first photosensitive sensor;
the second acquisition module is used for adjusting the initial data of the ambient light according to preset ambient light calibration data to acquire actual data of the ambient light in the current state;
a third obtaining module, configured to obtain the preset ambient light calibration data before the first obtaining module obtains the initial data of the ambient light in the current state, where the initial data is collected by the first photosensor;
the third obtaining module includes:
the first obtaining submodule is used for obtaining first data of ambient light collected by a second photosensitive sensor when the second photosensitive sensor of the mobile terminal is detected to face a preset direction;
the second acquisition sub-module is used for acquiring a time difference value between the direction of the first photosensitive sensor to the preset direction and the direction of the second photosensitive sensor to change when the direction of the second photosensitive sensor to the preset direction is detected to change;
the setting submodule is used for setting the first ambient light data as the preset ambient light calibration data if the time difference value is smaller than or equal to a preset time threshold value;
wherein the first photosensitive sensor acquires initial data of the ambient light when facing a preset direction.
5. The mobile terminal of claim 4, wherein the third obtaining module further comprises:
the recording submodule is used for recording the placing state and/or the gravity acceleration component of the mobile terminal when the first obtaining submodule detects that the second photosensitive sensor of the mobile terminal faces to the preset direction;
the second acquisition sub-module includes:
the determining unit is used for determining that the orientation of the second photosensitive sensor changes when the placing state and/or the gravity acceleration component change of the mobile terminal is detected;
and the processing unit is used for determining that the first photosensitive sensor faces the preset direction and acquiring the time difference when the changed placing state of the mobile terminal meets a first preset condition and/or the changed gravity acceleration component of the mobile terminal meets a second preset condition.
6. The mobile terminal of claim 4, wherein the mobile terminal further comprises:
and the adjusting module is used for adjusting backlight of the display screen of the mobile terminal according to the actual data of the ambient light in the current state after the second acquiring module acquires the actual data of the ambient light in the current state.
7. A mobile terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, realizes the steps of the ambient light detection method according to any of claims 1 to 3.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the ambient light detection method according to any one of claims 1 to 3.
CN201810399809.4A 2018-04-28 2018-04-28 Environment light detection method and mobile terminal Active CN108600546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810399809.4A CN108600546B (en) 2018-04-28 2018-04-28 Environment light detection method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810399809.4A CN108600546B (en) 2018-04-28 2018-04-28 Environment light detection method and mobile terminal

Publications (2)

Publication Number Publication Date
CN108600546A CN108600546A (en) 2018-09-28
CN108600546B true CN108600546B (en) 2020-04-24

Family

ID=63619268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810399809.4A Active CN108600546B (en) 2018-04-28 2018-04-28 Environment light detection method and mobile terminal

Country Status (1)

Country Link
CN (1) CN108600546B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109147681A (en) * 2018-10-15 2019-01-04 四川长虹电器股份有限公司 The eyeshield mode regulating method and display device of display device
CN109859689B (en) * 2019-04-09 2020-07-31 Oppo广东移动通信有限公司 Screen brightness adjusting method and related product
CN110708833A (en) * 2019-10-23 2020-01-17 广州奕至家居科技有限公司 Light source control method and lighting device
CN111142571B (en) * 2019-12-19 2023-05-05 杭州友邦演艺设备有限公司 Stage lamp orientation identification method
CN113747626B (en) * 2020-05-29 2023-08-29 北京小米移动软件有限公司 Ambient light determining method, device, terminal equipment and medium
CN111785230B (en) * 2020-06-22 2022-07-26 Oppo广东移动通信有限公司 Brightness adjusting method, terminal and storage medium
CN112345964B (en) * 2020-10-27 2023-02-24 歌尔微电子有限公司 Traffic signal lamp detection device and method
CN113793574A (en) * 2021-08-18 2021-12-14 南京巨鲨显示科技有限公司 Display device based on optical sensor and calibration method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818753A (en) * 2017-11-22 2018-03-20 广东欧珀移动通信有限公司 Screen brightness regulation method, device, storage medium and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI451160B (en) * 2012-03-05 2014-09-01 原相科技股份有限公司 Automatic detection method and portable electronic device using the same
CN107102864A (en) * 2017-05-16 2017-08-29 广东欧珀移动通信有限公司 One kind puts out screen control method, device, storage medium and terminal
CN107942306B (en) * 2017-11-22 2020-04-10 Oppo广东移动通信有限公司 Method and device for calibrating proximity sensor, storage medium and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818753A (en) * 2017-11-22 2018-03-20 广东欧珀移动通信有限公司 Screen brightness regulation method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN108600546A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
CN108600546B (en) Environment light detection method and mobile terminal
CN108182043B (en) Information display method and mobile terminal
CN107665698B (en) Ambient light intensity compensation method and device
CN109343759B (en) Screen-turning display control method and terminal
CN109078319B (en) Game interface display method and terminal
CN107832689B (en) Fingerprint identification method and mobile terminal
CN109710349B (en) Screen capturing method and mobile terminal
CN108108113B (en) Webpage switching method and device
CN108681413B (en) Control method of display module and mobile terminal
CN110933494A (en) Picture sharing method and electronic equipment
CN108984145B (en) Brightness adjusting method and electronic equipment
CN111510623B (en) Shooting method and electronic equipment
CN107832067B (en) Application updating method, mobile terminal and computer readable storage medium
CN111240567B (en) Display screen angle adjusting method and electronic equipment
CN110456923B (en) Gesture sensing data processing method and electronic equipment
CN109443261B (en) Method for acquiring folding angle of folding screen mobile terminal and mobile terminal
CN111142618A (en) Method for detecting folding angle and electronic equipment
CN108540642B (en) Mobile terminal and operation method thereof
CN108170310B (en) Touch screen control method and mobile terminal
CN110113490B (en) Information processing method, terminal and computer readable storage medium
CN111261128B (en) Screen brightness adjusting method and electronic equipment
CN110740270B (en) Camera adjusting method and device, electronic equipment and storage medium
CN110730013B (en) Method for improving transmission stray and mobile terminal
CN109739430B (en) Display method and mobile terminal
CN109067429B (en) Control method and terminal equipment

Legal Events

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