CN107300417A - Detection method, device, storage medium and the terminal of ambient light - Google Patents

Detection method, device, storage medium and the terminal of ambient light Download PDF

Info

Publication number
CN107300417A
CN107300417A CN201710380447.XA CN201710380447A CN107300417A CN 107300417 A CN107300417 A CN 107300417A CN 201710380447 A CN201710380447 A CN 201710380447A CN 107300417 A CN107300417 A CN 107300417A
Authority
CN
China
Prior art keywords
value
light sensation
light
sensor group
parameter sets
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710380447.XA
Other languages
Chinese (zh)
Inventor
周意保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710380447.XA priority Critical patent/CN107300417A/en
Publication of CN107300417A publication Critical patent/CN107300417A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J1/00Photometry, e.g. photographic exposure meter
    • 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

Abstract

The present invention provides a kind of detection method of ambient light, including:Obtain the first light sensation parameter sets that the first sensor group is sensed according to current environment light;The first light sensation parameter sets are calculated according to preset rules, the first light sensation value of first sensor group is determined;Obtain the second light sensation parameter sets that the second sensor group is sensed according to current environment light;The second light sensation parameter sets are calculated according to preset rules, the second light sensation value of second sensor group is determined;Sizes values are carried out based on the first light sensation value and the second light sensation value to be compared, and the bigger light sensation value of value is defined as actual light sensation value.The present invention obtains the light sensation parameter sets of current environment light by two sensors respectively, and calculate corresponding light sensation value according to light sensation parameter sets, the bigger light sensation value of value is defined as actual light sensation value, the problem of solving ambient light error detection improves the accuracy rate of ambient light detection.

Description

Detection method, device, storage medium and the terminal of ambient light
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of detection method of ambient light, device, storage medium and end End.
Background technology
At present, with the popularization and development of terminal, the function of terminal also correspond to it is stronger and stronger, can be with integrated many in terminal Sensor is planted, with user-friendly.Such as, photosensitive sensors, photosensitive sensors are generally positioned at the display screen one of terminal Side, the light intensity for sensing current environment, terminal can carry out corresponding screen intensity according to the light intensity and adjust automatically Section and press key lamp, which are lighted or closed etc., to be operated.
But, if existing photosensitive sensors are blocked, will mistake the light intensity of current environment judged For the light intensity of dark surrounds, thus by mistake the screen intensity of terminal adjust it is very dark or press key lamp is overdue bright, to use Make troubles at family.
The content of the invention
The embodiment of the present invention provides a kind of detection method of ambient light, device, storage medium and terminal, can lift environment The accuracy rate of light detection.
The embodiment of the present invention provides following technical scheme:
A kind of detection method of ambient light, applied in terminal, the terminal includes the first biography for being arranged on diverse location Sensor group and second sensor group, the first sensor group and the second sensor group include multiple ambient light sensings respectively Device, including:
Obtain the first light sensation parameter sets that the first sensor group is sensed according to current environment light;
The first light sensation parameter sets are calculated according to preset rules, the first light of first sensor group is determined Inductance value;
Obtain the second light sensation parameter sets that the second sensor group is sensed according to current environment light;
The second light sensation parameter sets are calculated according to preset rules, the second light of second sensor group is determined Inductance value;
Sizes values are carried out based on the first light sensation value and the second light sensation value to be compared, the bigger light sensation value of value is true It is set to actual light sensation value.
The embodiment of the present invention also provides following technical scheme:
A kind of detection means of ambient light, including:
First acquisition module, joins for obtaining the first light sensation that the first sensor group is sensed according to current environment light Manifold is closed;
First computing module, for being calculated according to preset rules the first light sensation parameter sets, determines First light sensation value of one sensor group;
Second acquisition module, joins for obtaining the second light sensation that the second sensor group is sensed according to current environment light Manifold is closed;
Second computing module, for being calculated according to preset rules the second light sensation parameter sets, determines Second light sensation value of two sensor groups;
Comparison module, is compared for carrying out sizes values based on the first light sensation value and the second light sensation value, by value Bigger light sensation value is defined as actual light sensation value.
The embodiment of the present invention also provides following technical scheme:
A kind of computer-readable recording medium, including:
Computer program is stored thereon with, the program is realized provided in an embodiment of the present invention any when being executed by processor The step of detection method of ambient light.
The embodiment of the present invention also provides following technical scheme:
A kind of terminal, including:
Be stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, performs provided in an embodiment of the present invention A kind of detection method of ambient light.
Detection method, device, storage medium and the terminal for a kind of ambient light that the present embodiment is provided, pass through two sensors The light sensation parameter sets of current environment light are obtained respectively, and calculate corresponding light sensation value according to light sensation parameter sets, by value Bigger light sensation value is defined as actual light sensation value, and the problem of solving ambient light error detection improves the accurate of ambient light detection Rate.
Brief description of the drawings
Below in conjunction with the accompanying drawings, it is described in detail by the embodiment to the present invention, technical scheme will be made And other beneficial effects are apparent.
Fig. 1 is the structural representation of terminal provided in an embodiment of the present invention.
Fig. 2 is the decomposing schematic representation of terminal shown in Fig. 1.
Fig. 3 is the schematic flow sheet of the detection method of ambient light provided in an embodiment of the present invention.
Fig. 4 is another schematic flow sheet of the detection method of ambient light provided in an embodiment of the present invention.
Fig. 5 is the module diagram of the detection means of ambient light provided in an embodiment of the present invention.
Fig. 6 is another module diagram of the detection means of ambient light provided in an embodiment of the present invention.
Fig. 7 is another structural representation of terminal provided in an embodiment of the present invention.
Embodiment
It refer to schema, wherein identical element numbers represent identical component, principle of the invention is to implement one Illustrated in appropriate computing environment.The following description is that, based on the illustrated specific embodiment of the invention, it should not be by It is considered as the limitation present invention other specific embodiments not detailed herein.
Term as used herein " module " can regard the software object to be performed in the arithmetic system as.It is somebody's turn to do herein not Same component, module, engine and service can be regarded as the objective for implementation in the arithmetic system.And the device and method being somebody's turn to do herein is excellent Being implemented in the way of software for choosing, can also be implemented on hardware, within the scope of the present invention certainly.
Concrete analysis explanation is carried out below.
In the present embodiment, the angle of the detection means from ambient light is described, the detection means tool of the ambient light Body can be integrated in terminal, such as mobile phone, tablet personal computer, palm PC (PDA, Personal Digital Assistant) Deng.
Refer to 1 and Fig. 2, terminal 100 includes cover plate 10, display screen 20, printed circuit board 30, battery 40, housing 50, the One sensor group 60 and second sensor group 70.
Wherein, cover plate 10 is installed on display screen 20, to cover display screen 20.Cover plate 10 can be transparent glass cover plate. In one embodiment, cover plate 10 can be the glass cover-plate being made of materials such as sapphires.The cover plate 10 includes display Region 101 and non-display area 102.The viewing area 101 can be touched for the picture of display terminal or for user Manipulation etc..The top area of the non-display area 102 opens up the perforate for sound and light conduction, the bottom of non-display area 102 The functional units such as fingerprint module, touch controlled key can be set in portion.
The display screen 20 is jointly mounted under the cover plate 10.To form the display surface of electronic equipment 100.
Printed circuit board 30 is arranged on inside housing 50.Printed circuit board 30 can be the mainboard of terminal 100.Printed circuit The functional units such as antenna, microphone, camera, light sensor, receiver and processor can be integrated with plate 30.Together When, display screen 20 is electrically connected on printed circuit board 30.
The battery 40 is arranged in bonnet 50, is electrically connected with the printed circuit board 30, to provide electricity to terminal 100 Source.
The bonnet 50 can be combined with cover plate 10, form closed space, and the top area of the bonnet 50 is opened up for shooting The perforate of head light conduction.
The first sensor group 60 may be mounted in the perforate of the top area of the non-display area 102 of cover plate 10, should First sensor group 60 can be with multiple including multiple ambient light sensors.
In the perforate for the top area that the second sensor group 70 may be mounted at bonnet 50, the second sensor group 70 can With including multiple ambient light sensors.
Referring to Fig. 3, Fig. 3 is the schematic flow sheet of the detection method of ambient light provided in an embodiment of the present invention.It is specific and Speech, this method includes:
In step S101, the first light sensation parameter sets that first sensor group is sensed according to current environment light are obtained.
Wherein, the first sensor group can include multiple ambient light sensors.Multiple ambient light sensors can be laid out In different positions so that the equilibrium of the light angle of acquisition.
Further, the light by multiple ambient light sensors acquisition current environment light in the first sensor group is strong Degree, the light intensity that each ambient light sensor can be obtained according to correspondence generates corresponding light sensation value, and by all light sensation values Store into the first light sensation parameter sets.
In step s 102, the first light sensation parameter sets are calculated according to preset rules, determines first sensor First light sensation value of group.
Wherein, the preset rules refer to default light sensation value-based algorithm.
In a kind of possible embodiment, the quantity of the ambient light sensor in first sensor group is two, and this Light sensation value in one light sensation parameter sets corresponds to two, obtains the absolute value and two light sensation values of the difference of two light sensation values Average value, judge whether the value after the absolute value divided by average value is more than predetermined threshold value, when judge the absolute value divided by When value after average value is more than predetermined threshold value, illustrate that the diversity ratio of current environment light is larger, by value in two light sensation values more Big value is defined as the first light sensation value.When the value after judging the absolute value divided by average value is not more than predetermined threshold value, say The average value less, is defined as the first light sensation value by the difference of bright current environment light.
In alternatively possible embodiment, the quantity of the ambient light sensor in first sensor group for two with On, light sensation value in the first light sensation parameter sets correspondence is also two or more, obtain more than two light sensation values obtain it is flat Average, the first light sensation value is defined as by the average value.
In step s 103, the second light sensation parameter sets that second sensor group is sensed according to current environment light are obtained.
It should be noted that the first sensor group and second sensor group are arranged on the diverse location of terminal.
Wherein, the second sensor group can include multiple ambient light sensors.Multiple ambient light sensors can be laid out In different positions so that the equilibrium of the light angle of acquisition.
Further, the light by multiple ambient light sensors acquisition current environment light in the second sensor group is strong Degree, the light intensity that each ambient light sensor can be obtained according to correspondence generates corresponding light sensation value, and by all light sensation values Store into the second light sensation parameter sets.
In one embodiment, the first sensor group and the second sensor group can be along perpendicular to display screen directions point The both sides of display screen are distributed in, such as, first sensor group is arranged on the display screen one side of mobile phone, and second sensor group is arranged on hand The one side at the machine back side.
In step S104, the second light sensation parameter sets are calculated according to preset rules, second sensor is determined Second light sensation value of group.
In a kind of possible embodiment, the quantity of the ambient light sensor in second sensor group is two, and this Light sensation value in two light sensation parameter sets corresponds to two, obtains the absolute value and two light sensation values of the difference of two light sensation values Average value, judge whether the value after the absolute value divided by average value is more than predetermined threshold value, when judge the absolute value divided by When value after average value is more than predetermined threshold value, illustrate that the diversity ratio of current environment light is larger, by value in two light sensation values more Big value is defined as the second light sensation value.When the value after judging the absolute value divided by average value is not more than predetermined threshold value, say The average value less, is defined as the second light sensation value by the difference of bright current environment light.
In alternatively possible embodiment, the quantity of the ambient light sensor in second sensor group for two with On, light sensation value in the second light sensation parameter sets correspondence is also two or more, obtain more than two light sensation values obtain it is flat Average, the second light sensation value is defined as by the average value.
In step S105, sizes values are carried out based on the first light sensation value and the second light sensation value and compared, by the bigger light of value Inductance value is defined as actual light sensation value.
Wherein, the first light sensation value first sensor group for the diverse location being arranged in terminal obtained and the second sensing The second light sensation value that device group is obtained carries out sizes values comparison, and the bigger light sensation value of value is defined as into actual light sensation value, Ke Yibao When demonstrate,proving one group of sensor error detection wherein, the light sensation value of another set sensor detection meets the intensity of actual environment light, has The situation for avoiding ambient light error detection of effect.
From the foregoing, a kind of detection method for ambient light that the present embodiment is provided, is obtained respectively by two sensors The light sensation parameter sets of current environment light, and corresponding light sensation value is calculated according to light sensation parameter sets, by the bigger light of value Inductance value is defined as actual light sensation value, and the problem of solving ambient light error detection improves the accuracy rate of ambient light detection.
Citing, is described in further detail by the method according to described by above-described embodiment below.
Referring to Fig. 4, another schematic flow sheets of the Fig. 4 for the detection method of ambient light provided in an embodiment of the present invention.
Specifically, this method includes:
It should be noted that the detection method for the ambient light that the present embodiment is provided is applied in terminal, the terminal includes the One sensor group and second sensor group, the first sensor group and the second sensor group include two ambient light sensings respectively Device.The terminal also includes display screen, the first sensor group and second sensor group along perpendicular to display screen directional spreding in aobvious The both sides of display screen.
In step s 201, the first light sensation parameter sets that first sensor group is sensed according to current environment light are obtained.
Wherein, the first sensor group is arranged on the side of the display screen of terminal, passes through two in the first sensor group Individual ambient light sensor obtains the light intensity of current environment light, and the light that each ambient light sensor can be obtained according to correspondence is strong The corresponding light sensation value of degree generation, and the light sensation value of two is stored into the first light sensation parameter sets.
Such as, two optical sensors acquisition by being arranged on the first sensor on the positive side of display screen of mobile phone The light intensity of current environment light, two light sensation values of generation, such as 80 and 100, and 80 and 100 are stored to the first light sensation parameter set In conjunction.
In step S202, obtain the first light sensation parameter sets in two light sensation values difference the first absolute value and two First average value of light sensation value.
Such as, it is 20 to obtain the first absolute value according to two light sensation values 80 and 100, and the first average value is 90.
In step S203, judge whether the value after the first absolute value divided by the first average value is more than predetermined threshold value.
Specifically, when the value after judging the first absolute value divided by the first average value is more than predetermined threshold value, perform Step S204;When the value after judging the first absolute value divided by the first average value is not more than predetermined threshold value, step is performed S205。
Wherein, the predetermined threshold value is terminal preset value.In one embodiment, the predetermined threshold value is 0.3.
Such as, the value after the first absolute value 20 divided by the first average value 90 is compared with predetermined threshold value 0.3, drawn Less than predetermined threshold value, step S205 is performed.
In step S204, the bigger value of value in two light sensation values is defined as the first light sensation value.
Wherein, when the value after the first absolute value divided by the first average value is more than predetermined threshold value, illustrate to work as the first two ring Light comparison in difference between the optical sensor of border is big, and two bigger values of light sensation value value are defined as into the first light sensation value.
In step S205, the first average value is defined as the first light sensation value.
Wherein, when the value after the first absolute value divided by the first average value is not more than predetermined threshold value, illustrate to work as the first two Light comparison in difference between ambient light sensor is big, and the first average value is defined as into the first light sensation value.
Such as, value after the first absolute value 20 divided by the first average value 90 is not more than predetermined threshold value 0.3, flat by first Average 90 is defined as the first light sensation value.
In one embodiment, when the first light sensation value exceedes predetermined luminance threshold value, second sensor group is closed.When this When first light sensation value is more than predetermined luminance threshold value, illustrate light intensity detected by current first sensor group exceeded with Brightness range, the light intensity of current environment light is very bright, now, by second sensor group temporary close, to save terminal Electricity.
In step S206, the second light sensation parameter sets that second sensor group is sensed according to current environment light are obtained.
Wherein, the second sensor group is arranged on the opposite side of the display screen side of terminal, passes through the second sensor group On two ambient light sensors obtain current environment light light intensity, each ambient light sensor can according to correspondence acquisition Light intensity generates corresponding light sensation value, and the light sensation value of two is stored into the second light sensation parameter sets.
Such as, obtained by two optical sensors being arranged in the second sensor on the reverse side of mobile phone and work as front ring The light intensity of border light, two light sensation values of generation, such as 60 and 120, and by 60 and 120 storages into the second light sensation parameter sets.
In step S207, the second absolute value and two light of the difference of two light sensation values in the second light sensation parameter sets are obtained Second average value of inductance value.
Such as, it is 60 to obtain the second absolute value according to two light sensation values 60 and 120, and the second average value is 90.
In step S208, judge whether the value after the second absolute value divided by the second average value is more than predetermined threshold value.
Specifically, when the value after judging the second absolute value divided by the second average value is more than predetermined threshold value, perform Step S209;When the value after judging the second absolute value divided by the second average value is not more than predetermined threshold value, step is performed S210。
Wherein, the predetermined threshold value is terminal preset value.In one embodiment, the predetermined threshold value is 0.3.
Such as, the value after the second absolute value 60 divided by the second average value 90 is compared with predetermined threshold value 0.3, drawn More than predetermined threshold value, step S209 is performed.
In step S209, the bigger value of value in two light sensation values is defined as the second light sensation value.
Wherein, when the value after the second absolute value divided by the second average value is more than predetermined threshold value, illustrate to work as the first two ring Light comparison in difference between the optical sensor of border is big, and two bigger values of light sensation value value are defined as into the second light sensation value.
Such as, value after the first absolute value 60 divided by the first average value 90 is more than predetermined threshold value 0.3, by two light sensations Value is bigger between value 60 and 120 120 are defined as the second photosensitive value.
In step S210, the second average value is defined as the second light sensation value.
Wherein, when the value after the second absolute value divided by the second average value is not more than predetermined threshold value, illustrate to work as the first two Light difference between ambient light sensor is smaller, and the second average value is defined as into the second light sensation value.
In one embodiment, when the second light sensation value exceedes predetermined luminance threshold value, first sensor group is closed.When this When second light sensation value is more than predetermined luminance threshold value, illustrate light intensity detected by current second sensor group exceeded with Brightness range, the light intensity of current environment light is very bright, now, by first sensor group temporary close, to save terminal Electricity.
In step S211, sizes values are carried out based on the first light sensation value and the second light sensation value and compared, by the bigger light of value Inductance value is defined as actual light sensation value.
Wherein, it will be arranged at what is obtained along the first sensor group perpendicular to display screen directional spreding in the both sides of display screen First light sensation value carries out sizes values with the second light sensation value that second sensor group is obtained and compared, and the bigger light sensation value of value is determined For actual light sensation value, it is ensured that wherein during one group of sensor error detection, the light sensation value of another set sensor detection meets The intensity of actual environment light, effectively avoids the situation of ambient light error detection.
Such as, the first light sensation value 90 of display screen side of mobile phone will be arranged at setting the with the reverse side of mobile phone Two light sensation values 120 are compared, and actual light sensation value is used as using 120.
From the foregoing, a kind of detection method for ambient light that the present embodiment is provided, is obtained respectively by two sensors The light sensation parameter sets of current environment light, two sensors include two ambient light sensors respectively, and according to default light sensation Value-based algorithm calculates the corresponding light sensation value of every group of light sensation parameter sets, and the bigger light sensation value of value is defined as into actual light sensation value, The problem of solving ambient light error detection, improves the accuracy rate of ambient light detection.
For ease of preferably implementing the detection method of ambient light provided in an embodiment of the present invention, the embodiment of the present invention is also provided A kind of device of the detection method based on above-mentioned ambient light.The wherein implication of noun and phase in the detection method of above-mentioned ambient light Together, implement details and may be referred to explanation in embodiment of the method.
Referring to Fig. 5, module diagrams of the Fig. 5 for the detection means of ambient light provided in an embodiment of the present invention.It is specific and Speech, the detection means 300 of the ambient light, including:First acquisition module 31, the first computing module 32, the second acquisition module 33, Two computing modules 34 and comparison module 35.
First acquisition module 31, for obtaining the first light sensation that the first sensor group is sensed according to current environment light Parameter sets.
Wherein, first acquisition module 31 is obtained by multiple ambient light sensors in the first sensor group works as front ring The light intensity of border light, the light intensity that each ambient light sensor can be obtained according to correspondence generates corresponding light sensation value, and will All light sensation values are stored into the first light sensation parameter sets.
First computing module 32, for being calculated according to preset rules the first light sensation parameter sets, is determined First light sensation value of first sensor group.
In alternatively possible embodiment, the quantity of the ambient light sensor in first sensor group for two with On, light sensation value in the first light sensation parameter sets correspondence is also two or more, obtain more than two light sensation values obtain it is flat Average, the first light sensation value is defined as by the average value.
Second acquisition module 33, for obtaining the second light sensation that the second sensor group is sensed according to current environment light Parameter sets.
It should be noted that the first sensor group and second sensor group are arranged on the diverse location of terminal.
Wherein, the second acquisition module 33 obtains current environment by multiple ambient light sensors in the second sensor group The light intensity of light, the light intensity that each ambient light sensor can be obtained according to correspondence generates corresponding light sensation value, and by institute Some light sensation value storages are into the second light sensation parameter sets.
Second computing module 34, for being calculated according to preset rules the second light sensation parameter sets, is determined Second light sensation value of second sensor group.
In alternatively possible embodiment, the quantity of the ambient light sensor in second sensor group for two with On, light sensation value in the second light sensation parameter sets correspondence is also two or more, obtain more than two light sensation values obtain it is flat Average, the second light sensation value is defined as by the average value.
The comparison module 35, is compared for carrying out sizes values based on the first light sensation value and the second light sensation value, by value Bigger light sensation value is defined as actual light sensation value.
Wherein, the first light sensation that the comparison module 35 obtains the first sensor group for the diverse location being arranged in terminal It is worth the second light sensation value progress sizes values obtained with second sensor group to be compared, the bigger light sensation value of value is defined as actual light Inductance value, it is ensured that wherein during one group of sensor error detection, the light sensation value of another set sensor detection meets actual environment The intensity of light, effectively avoids the situation of ambient light error detection.
Fig. 6 can be referred in the lump, and Fig. 6 illustrates for another module of the detection means of ambient light provided in an embodiment of the present invention Figure, the detection means 300 of the ambient light can also include:
It should be noted that the detection means of ambient light that the present embodiment is provided is installed in terminal, the terminal includes the One sensor group and second sensor group, the first sensor group and the second sensor group include two ambient light sensings respectively Device.The terminal also includes display screen, the first sensor group and second sensor group along perpendicular to display screen directional spreding in aobvious The both sides of display screen.
Wherein, first computing module 32 can also include acquisition submodule 321, determination of judging submodule 322, first The determination sub-module 324 of module 323 and second.
Specifically, the acquisition submodule 321, the difference for obtaining two light sensation values in the first light sensation parameter sets First average value of the first absolute value and two light sensation values.The judging submodule 322, for judging first absolute value divided by Whether the value after one average value is more than predetermined threshold value.First determination sub-module 323, first absolute value is judged for working as Divided by the first value after average value is when being more than predetermined threshold value, the bigger value of value in two light sensation values is defined as the first light sensation Value.Second determination sub-module 324, is not more than pre- for value after first absolute value divided by the first average value is judged If during threshold value, the average value is defined as into the first light sensation value.
Wherein, second computing module 34 can also include acquisition submodule 341, determination of judging submodule 342, first The determination sub-module 344 of module 343 and second.
Specifically, the acquisition submodule 321, for obtaining the difference of two light sensation values in the second light sensation parameter sets Second average value of two absolute values and two light sensation values.The judging submodule 322, for judging second absolute value divided by second Whether the value after average value is more than predetermined threshold value.First determination sub-module 323, judges that second absolute value is removed for working as When being more than predetermined threshold value with the value after the second average value, the bigger value of value in two light sensation values is defined as the second light sensation Value.Second determination sub-module 324, is not more than pre- for value after second absolute value divided by the second average value is judged If during threshold value, second average value is defined as into the second light sensation value.
From the foregoing, a kind of detection means for ambient light that the present embodiment is provided, is obtained respectively by two sensors The light sensation parameter sets of current environment light, two sensors include two ambient light sensors respectively, and according to default light sensation Value-based algorithm calculates the corresponding light sensation value of every group of light sensation parameter sets, and the bigger light sensation value of value is defined as into actual light sensation value, The problem of solving ambient light error detection, improves the accuracy rate of ambient light detection.
The embodiment of the present invention also provides a kind of terminal, as shown in fig. 7, the terminal 400 can include one or one with The memory 401 of upper computer-readable recording medium, sensor 402, input block 403, display unit 404, power supply 405 and Include one or the grade part of processor 406 of more than one processing core.It will be understood by those skilled in the art that in Fig. 7 The restriction of the terminal structure shown not structure paired terminal, can include than illustrating more or less parts, or combine certain A little parts, or different part arrangements.
Memory 401 can be used for storage application program and data.Include and can hold in the application program that memory 401 is stored Line code.Application program can constitute various functions module.Processor 406 is stored in the application journey of memory 401 by operation Sequence, so as to perform various function application and data processing.In addition, memory 401 can include high-speed random access memory, Nonvolatile memory can also be included, for example, at least one disk memory, flush memory device or other volatile solid-states are deposited Memory device.Correspondingly, memory 401 can also include Memory Controller, to provide 403 pairs of processor 406 and input block The access of memory 401.
Terminal may also include at least one sensor 402, such as optical sensor, gravity accelerometer and other biographies Sensor.Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to ring The light and shade of environmental light adjusts the brightness of display panel, and proximity transducer can close display panel when terminal is moved in one's ear And/or backlight.As one kind of motion sensor, gravity accelerometer can detect in all directions (generally three axles) and add The size of speed, can detect that size and the direction of gravity when static, application (the such as horizontal/vertical screen available for identification mobile phone posture Switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;As for terminal also The other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Input block 403 can be used for numeral, character information or the user's characteristic information (such as fingerprint) for receiving input, and Keyboard, mouse, action bars, optics or the trace ball signal relevant with user's setting and function control is produced to input.Specifically Ground, in a specific embodiment, input block 403 may include touch sensitive surface and other input equipments.Touch sensitive surface, Referred to as touch display screen or Trackpad, collect user on or near it touch operation (such as user using finger, touch The operations of any suitable object or annex on touch sensitive surface or near touch sensitive surface such as pen), and according to set in advance Formula drives corresponding attachment means.Optionally, touch sensitive surface may include both touch detecting apparatus and touch controller. Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation is brought, and transmits a signal to touch Controller;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processing Device 406, and the order sent of reception processing device 406 and can be performed.Furthermore, it is possible to using resistance-type, condenser type, infrared ray And the polytype such as surface acoustic wave realizes touch sensitive surface.Except touch sensitive surface, input block 403 can also include other inputs Equipment.Specifically, other input equipments can include but is not limited to physical keyboard, function key (such as volume control button, switch Button etc.), fingerprint recognition module, trace ball, mouse, the one or more in action bars etc..
Display unit 404 can be used for the various of the information that is inputted by user of display or the information for being supplied to user and terminal Graphical user interface, these graphical user interface can be made up of figure, text, icon, video and its any combination.Display Unit 404 may include display panel.Optionally, can using liquid crystal display (LCD, Liquid Crystal Display), The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display panel.Further , touch sensitive surface can cover display panel, after touch sensitive surface detects the touch operation on or near it, send processing to Device 406 is provided accordingly on a display panel with determining the type of touch event with preprocessor 406 according to the type of touch event Visual output.Although in the figure 7, touch sensitive surface is that input is realized as two independent parts and is inputted with display panel Function, but in some embodiments it is possible to by touch sensitive surface and display panel it is integrated and realize input and output function.
Mobile terminal also includes the power supply 405 (such as battery) powered to all parts.It is preferred that, power supply can pass through electricity Management system and processor 406 are logically contiguous, so as to realize management charging, electric discharge and power consumption by power-supply management system The functions such as management.Power supply 405 can also include one or more direct current or AC power, recharging system, power supply event The random component such as barrier detection circuit, power supply changeover device or inverter, power supply status indicator.
Processor 406 is the control centre of terminal, using various interfaces and the various pieces of the whole terminal of connection, is led to Cross operation or perform the application program being stored in memory 401, and call the data being stored in memory 401, perform The various functions and processing data of terminal, so as to carry out integral monitoring to terminal.Optionally, processor 406 may include one or Multiple processing cores;It is preferred that, processor 406 can integrated application processor and modem processor, wherein, application processor Main processing operating system, user interface and application program etc..
Although not shown in Fig. 7, terminal can also include camera, bluetooth module, mixed-media network modules mixed-media etc., no longer go to live in the household of one's in-laws on getting married herein State.
Specifically in the present embodiment, the processor 406 in terminal can be according to following instruction, will be one or more The corresponding executable code of process of application program is loaded into memory 401, and is run by processor 406 and be stored in storage Application program in device 401, so as to realize various functions:
The first light sensation parameter set that the first sensor group is sensed according to current environment light is obtained by processor 406 Close.
The first light sensation parameter sets are calculated according to preset rules by processor 406, the first sensing is determined First light sensation value of device group.
The second light sensation parameter set that the second sensor group is sensed according to current environment light is obtained by processor 406 Close.
The second light sensation parameter sets are calculated according to preset rules by processor 406, the second sensing is determined Second light sensation value of device group.
By processor 406, sizes values are carried out based on the first light sensation value and the second light sensation value and compared, value is bigger Light sensation value be defined as actual light sensation value.
By the terminal can perform the detection method for any ambient light that inventive embodiments are provided, it therefore, it can The beneficial effect achieved by the detection method for any ambient light that inventive embodiments are provided is realized, implementation above is referred to Example, will not be repeated here.
It when it is implemented, above unit can be realized as independent entity, can also be combined, be made Realized for same or several entities, the specific implementation of above unit can be found in embodiment of the method above, herein not Repeat again.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment Point, the detailed description of the detection method above with respect to ambient light is may refer to, here is omitted.
Detection method, device, storage medium and the terminal of ambient light provided in an embodiment of the present invention are for example mobile phone, flat Plate computer, palm PC (PDA, Personal Digital Assistant) etc., the terminal, the detection means of ambient light and The detection method of ambient light belongs to same design, and the detection method of the ambient light can be run in the detection means of the ambient light The either method provided in embodiment, it implements the detection method embodiment that process refers to the ambient light, no longer goes to live in the household of one's in-laws on getting married herein State.
It should be noted that for the detection method of the ambient light of the invention, this area common test personnel can manage Solution realizes all or part of flow of the detection method of ambient light of the embodiment of the present invention, can be by computer program to control Related hardware is completed, and the computer program can be stored in a computer read/write memory medium, as being stored in terminal In memory, and by least one computing device in the terminal, the detection such as the ambient light is may include in the process of implementation The flow of the embodiment of method.Wherein, the storage medium can be magnetic disc, CD, read-only storage (ROM, Read Only Memory), random access memory (RAM, Random Access Memory) etc..
For the detection means of the ambient light of the embodiment of the present invention, its each functional module can be integrated in a processing In chip or modules are individually physically present, can also two or more modules be integrated in a module. Above-mentioned integrated module can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.The collection If into module realized and as independent production marketing or in use, can also be stored in using in the form of software function module In one computer read/write memory medium, the storage medium is for example read-only storage, disk or CD etc..
Detection method, device, storage medium and the terminal of a kind of ambient light provided above the embodiment of the present invention are entered Go and be discussed in detail, specific case used herein is set forth to the principle and embodiment of the present invention, and the above is implemented The explanation of example is only intended to the method and its core concept for helping to understand the present invention;Simultaneously for those skilled in the art, according to It according to the thought of the present invention, will change, be to sum up somebody's turn to do, this specification content is not in specific embodiments and applications It is interpreted as limitation of the present invention.

Claims (11)

1. a kind of detection method of ambient light, applied in terminal, it is characterised in that:The terminal includes being arranged on diverse location First sensor group and second sensor group, the first sensor group and the second sensor group include multiple rings respectively Border optical sensor, the detection method of the ambient light includes:
Obtain the first light sensation parameter sets that the first sensor group is sensed according to current environment light;
The first light sensation parameter sets are calculated according to preset rules, the first light sensation of first sensor group is determined Value;
Obtain the second light sensation parameter sets that the second sensor group is sensed according to current environment light;
The second light sensation parameter sets are calculated according to preset rules, the second light sensation of second sensor group is determined Value;
Sizes values are carried out based on the first light sensation value and the second light sensation value to be compared, and the bigger light sensation value of value is defined as Actual light sensation value.
2. the detection method of ambient light as claimed in claim 1, it is characterised in that the first sensor group includes two rings Border optical sensor, the second sensor group includes two ambient light sensors, and the terminal also includes display screen, described first Sensor group and second sensor group edge are perpendicular to display screen directional spreding in the both sides of display screen.
3. the detection method of ambient light as claimed in claim 2, it is characterised in that it is described according to preset rules to described first Light sensation parameter sets are calculated, and determine the first light sensation value of first sensor group, including:
Obtain the first absolute value of the difference of two light sensation values in the first light sensation parameter sets and the first of two light sensation values is averaged Value;
Judge whether the value after first absolute value divided by the first average value is more than predetermined threshold value;
When the value after judging first absolute value divided by the first average value is more than predetermined threshold value, by two light sensation values The bigger value of value is defined as the first light sensation value;
When the value after judging first absolute value divided by the first average value is not more than predetermined threshold value, by the average value It is defined as the first light sensation value.
4. the detection method of ambient light as claimed in claim 2, it is characterised in that it is described according to preset rules to described second Light sensation parameter sets are calculated, and determine the second light sensation value of second sensor group, including:
Obtain the second absolute value of the difference of two light sensation values and the second average value of two light sensation values in the second light sensation parameter sets;
Judge whether the value after second absolute value divided by the second average value is more than predetermined threshold value;
When the value after judging second absolute value divided by the second average value is more than predetermined threshold value, by two light sensation values The bigger value of value is defined as the second light sensation value;
It is flat by described second when the value after judging second absolute value divided by the second average value is not more than predetermined threshold value Average is defined as the second light sensation value.
5. the detection method of ambient light as claimed in claim 1, it is characterised in that methods described also includes:
When the first light sensation value exceedes predetermined luminance threshold value, second sensor group is closed;
When the second light sensation value exceedes predetermined luminance threshold value, first sensor group is closed.
6. a kind of detection means of ambient light, it is characterised in that including:
First acquisition module, for obtaining the first light sensation parameter set that the first sensor group is sensed according to current environment light Close;
First computing module, for being calculated according to preset rules the first light sensation parameter sets, determines the first biography First light sensation value of sensor group;
Second acquisition module, for obtaining the second light sensation parameter set that the second sensor group is sensed according to current environment light Close;
Second computing module, for being calculated according to preset rules the second light sensation parameter sets, determines the second biography Second light sensation value of sensor group;
Comparison module, is compared for carrying out sizes values based on the first light sensation value and the second light sensation value, and value is bigger Light sensation value be defined as actual light sensation value.
7. the detection means of ambient light as claimed in claim 1, it is characterised in that first computing module, including:
Acquisition submodule, the first absolute value and two light of the difference for obtaining two light sensation values in the first light sensation parameter sets First average value of inductance value;
Judging submodule, for judging whether the value after first absolute value divided by the first average value is more than predetermined threshold value;
First determination sub-module, is more than default threshold for value after first absolute value divided by the first average value is judged During value, the bigger value of value in two light sensation values is defined as the first light sensation value;
Second determination sub-module, is not more than default for value after first absolute value divided by the first average value is judged During threshold value, the average value is defined as the first light sensation value.
8. the detection means of ambient light as claimed in claim 1, it is characterised in that second computing module, including:
Acquisition submodule, the second absolute value and two light sensations for obtaining the difference of two light sensation values in the second light sensation parameter sets Second average value of value;
Judging submodule, for judging whether the value after second absolute value divided by the second average value is more than predetermined threshold value;
First determination sub-module, is more than default threshold for value after second absolute value divided by the second average value is judged During value, the bigger value of value in two light sensation values is defined as the second light sensation value;
Second determination sub-module, is not more than default for value after second absolute value divided by the second average value is judged During threshold value, second average value is defined as the second light sensation value.
9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that described program is by processor During execution the step of the detection method of ambient light of the realization as described in claim 1 to any one of claim 5.
10. a kind of terminal, it is characterised in that including:
Be stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, performs such as claim 1 to right It is required that the detection method of the ambient light described in 5 any one.
11. a kind of terminal, including memory, processor, control circuit and ambient light sensor, it is characterised in that:
The processor is electrically connected with the memory, control circuit and ambient light sensor, and the memory is used to deposit Storage instruction, the control circuit is used to control the ambient light sensor to obtain current environment light;
The processor, for obtaining the first light sensation parameter set that the first sensor group is sensed according to current environment light Close;
The processor, for being calculated according to preset rules the first light sensation parameter sets, determines the first sensing First light sensation value of device group;
The processor, for obtaining the second light sensation parameter set that the second sensor group is sensed according to current environment light Close;
The processor, for being calculated according to preset rules the second light sensation parameter sets, determines the second sensing Second light sensation value of device group;
The processor, is compared, by value more for carrying out sizes values based on the first light sensation value and the second light sensation value Big light sensation value is defined as actual light sensation value.
CN201710380447.XA 2017-05-25 2017-05-25 Detection method, device, storage medium and the terminal of ambient light Pending CN107300417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710380447.XA CN107300417A (en) 2017-05-25 2017-05-25 Detection method, device, storage medium and the terminal of ambient light

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710380447.XA CN107300417A (en) 2017-05-25 2017-05-25 Detection method, device, storage medium and the terminal of ambient light

Publications (1)

Publication Number Publication Date
CN107300417A true CN107300417A (en) 2017-10-27

Family

ID=60137359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710380447.XA Pending CN107300417A (en) 2017-05-25 2017-05-25 Detection method, device, storage medium and the terminal of ambient light

Country Status (1)

Country Link
CN (1) CN107300417A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948445A (en) * 2017-12-20 2018-04-20 西安易朴通讯技术有限公司 Audio reproducing apparatus, light sensation detecting system and method
CN107966209A (en) * 2017-11-22 2018-04-27 广东欧珀移动通信有限公司 Environment light detection method, device, storage medium and electronic equipment
CN108257581A (en) * 2017-12-22 2018-07-06 维沃移动通信有限公司 A kind of method of adjustment of light intensity sensing device, mobile terminal and brightness of display screen
CN109922203A (en) * 2017-12-11 2019-06-21 北京小米移动软件有限公司 Terminal puts out screen method and apparatus
CN110146161A (en) * 2019-06-10 2019-08-20 Oppo广东移动通信有限公司 Detection method, device and the terminal of environment illumination intensity
CN110390912A (en) * 2018-04-18 2019-10-29 通用电气航空系统有限公司 Method and apparatus for display module control system
US10528091B2 (en) 2017-11-22 2020-01-07 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Electronic device
CN110660087A (en) * 2019-08-16 2020-01-07 深圳市万普拉斯科技有限公司 Light sensation correction method and device, electronic equipment and storage medium
CN114495862A (en) * 2022-01-24 2022-05-13 上海闻泰信息技术有限公司 Method for acquiring ambient light sensitivity value, electronic device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968558A (en) * 2005-11-17 2007-05-23 建美电子股份有限公司 Method for updating light brightness of luminous component of portable electronic device
CN103033262A (en) * 2012-12-14 2013-04-10 京东方科技集团股份有限公司 Light sensor element, display unit and brightness detection method thereof
CN104765414A (en) * 2014-01-03 2015-07-08 义明科技股份有限公司 Portable electronic device
CN204498425U (en) * 2015-03-25 2015-07-22 重庆交通大学 Safety-type tunnel illumination control system
CN105654923A (en) * 2016-03-30 2016-06-08 广东欧珀移动通信有限公司 Method for adjusting backlight brightness and user terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968558A (en) * 2005-11-17 2007-05-23 建美电子股份有限公司 Method for updating light brightness of luminous component of portable electronic device
CN103033262A (en) * 2012-12-14 2013-04-10 京东方科技集团股份有限公司 Light sensor element, display unit and brightness detection method thereof
CN104765414A (en) * 2014-01-03 2015-07-08 义明科技股份有限公司 Portable electronic device
CN204498425U (en) * 2015-03-25 2015-07-22 重庆交通大学 Safety-type tunnel illumination control system
CN105654923A (en) * 2016-03-30 2016-06-08 广东欧珀移动通信有限公司 Method for adjusting backlight brightness and user terminal

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107966209A (en) * 2017-11-22 2018-04-27 广东欧珀移动通信有限公司 Environment light detection method, device, storage medium and electronic equipment
US10528091B2 (en) 2017-11-22 2020-01-07 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Electronic device
CN107966209B (en) * 2017-11-22 2020-07-07 Oppo广东移动通信有限公司 Ambient light detection method, ambient light detection device, storage medium, and electronic apparatus
CN109922203A (en) * 2017-12-11 2019-06-21 北京小米移动软件有限公司 Terminal puts out screen method and apparatus
CN109922203B (en) * 2017-12-11 2021-07-23 北京小米移动软件有限公司 Terminal, screen off method and device
CN107948445B (en) * 2017-12-20 2020-09-18 西安易朴通讯技术有限公司 Audio reproducing apparatus, light sensation detecting system and method
CN107948445A (en) * 2017-12-20 2018-04-20 西安易朴通讯技术有限公司 Audio reproducing apparatus, light sensation detecting system and method
CN108257581A (en) * 2017-12-22 2018-07-06 维沃移动通信有限公司 A kind of method of adjustment of light intensity sensing device, mobile terminal and brightness of display screen
CN108257581B (en) * 2017-12-22 2019-12-06 维沃移动通信有限公司 Light intensity detection device, mobile terminal and display screen brightness adjustment method
CN110390912A (en) * 2018-04-18 2019-10-29 通用电气航空系统有限公司 Method and apparatus for display module control system
CN110146161A (en) * 2019-06-10 2019-08-20 Oppo广东移动通信有限公司 Detection method, device and the terminal of environment illumination intensity
CN110146161B (en) * 2019-06-10 2021-08-13 Oppo广东移动通信有限公司 Method and device for detecting ambient illumination intensity and terminal
WO2021032034A1 (en) * 2019-08-16 2021-02-25 深圳市万普拉斯科技有限公司 Light sensing calibration method, device, electronic apparatus, and storage medium
CN110660087A (en) * 2019-08-16 2020-01-07 深圳市万普拉斯科技有限公司 Light sensation correction method and device, electronic equipment and storage medium
CN110660087B (en) * 2019-08-16 2022-05-13 深圳市万普拉斯科技有限公司 Light sensation correction method and device, electronic equipment and storage medium
CN114495862A (en) * 2022-01-24 2022-05-13 上海闻泰信息技术有限公司 Method for acquiring ambient light sensitivity value, electronic device and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN107300417A (en) Detection method, device, storage medium and the terminal of ambient light
CN107181559B (en) Processing method, device, storage medium and the terminal of radio frequency interference
CN105306709B (en) Control method, device and the mobile terminal of mobile terminal
CN103365393B (en) A kind of display methods and electronic equipment
CN107609439A (en) Processing method, device, storage medium and the terminal of Radio frequency interference
CN107402667A (en) Electronic equipment comprising display
US20080152263A1 (en) Data transfer using hand-held device
CN108536365A (en) A kind of images share method and terminal
KR20140028084A (en) Method for auto-switching user interface of handheld terminal device and handheld terminal device thereof
CN107943551A (en) A kind of screen display method and mobile terminal
CN110874117B (en) Method for operating handheld device, and computer-readable recording medium
CN107395871A (en) A kind of method, apparatus, storage medium and terminal for opening application
CN105874413A (en) System and method for host-augmented touch processing
CN104423835B (en) Based on supporting to adjust the device and method of display to computing device
CN107276685A (en) Processing method, device, storage medium and the terminal of Radio frequency interference
CN108037796B (en) Electronic device, display control method and Related product
CN109240577A (en) A kind of screenshotss method and terminal
JP2013150129A (en) Portable terminal
CN110231900A (en) A kind of application icon display methods and terminal
CN109558000A (en) A kind of man-machine interaction method and electronic equipment
CN109857289A (en) Display control method and terminal device
CN108733282A (en) A kind of page moving method and terminal device
CN107783747A (en) A kind of interface display processing method and mobile terminal
CN108563383A (en) A kind of image viewing method and mobile terminal
CN107665162A (en) A kind of applied program processing method and mobile terminal

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171027