Movatterモバイル変換


[0]ホーム

URL:


CN106101450B - Ambient light intensity compensation method and mobile terminal - Google Patents

Ambient light intensity compensation method and mobile terminal
Download PDF

Info

Publication number
CN106101450B
CN106101450BCN201610665837.7ACN201610665837ACN106101450BCN 106101450 BCN106101450 BCN 106101450BCN 201610665837 ACN201610665837 ACN 201610665837ACN 106101450 BCN106101450 BCN 106101450B
Authority
CN
China
Prior art keywords
proximity sensor
sensor data
ambient light
light intensity
data
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.)
Expired - Fee Related
Application number
CN201610665837.7A
Other languages
Chinese (zh)
Other versions
CN106101450A (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.)
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 LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610665837.7ApriorityCriticalpatent/CN106101450B/en
Publication of CN106101450ApublicationCriticalpatent/CN106101450A/en
Application grantedgrantedCritical
Publication of CN106101450BpublicationCriticalpatent/CN106101450B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention belongs to the technical field of communication, and provides a method for compensating ambient light intensity and a mobile terminal, wherein the method comprises the following steps: when a proximity sensor is in a far state, acquiring N groups of data of the proximity sensor; obtaining first proximity sensor data according to the data of the N groups of proximity sensors; if the first proximity sensor data is larger than a preset standard value of the proximity sensor data, calculating an increase proportion of the proximity sensor data according to the standard value and the first proximity sensor data; obtaining a reduction ratio of the ambient light intensity corresponding to the increase ratio of the proximity sensor data according to the increase ratio of the proximity sensor data; acquiring the current ambient light intensity of the mobile terminal; and correcting the current ambient light intensity according to the reduction proportion of the ambient light intensity so as to compensate the current ambient light intensity. The invention can improve the accuracy of detecting the ambient light intensity and more accurately adjust the backlight of the screen of the mobile terminal.

Description

Translated fromChinese
一种环境光强度的补偿方法及移动终端A kind of compensation method of ambient light intensity and mobile terminal

技术领域technical field

本发明属于通信技术领域,尤其涉及一种环境光强度的补偿方法及移动终端。The invention belongs to the technical field of communications, and in particular relates to a compensation method for ambient light intensity and a mobile terminal.

背景技术Background technique

目前,移动终端的屏幕侧都设置有光线传感器,用于检测移动终端所处环境的环境光强度,不同的环境光强度可以对应不同的移动终端屏幕的背光等级。以手机为例,用户在使用手机通话时,手机屏幕一般都是贴着耳朵的,这样可能会将屏幕沾上一层油污,如果油污沾在光线传感器附近,就会影响光线传感器检测到的环境光强度,从而导致检测到的环境光强度不准确。Currently, light sensors are provided on the screen side of the mobile terminal to detect the ambient light intensity of the environment where the mobile terminal is located, and different ambient light intensities can correspond to different backlight levels of the mobile terminal screen. Taking a mobile phone as an example, when a user uses a mobile phone to talk, the screen of the mobile phone is usually close to the ear, which may stain the screen with a layer of oil. If the oil is stained near the light sensor, it will affect the environment detected by the light sensor. light intensity, resulting in an inaccurate detected ambient light intensity.

故,有必要提出一种新的技术方案,以解决上述技术问题。Therefore, it is necessary to propose a new technical solution to solve the above-mentioned technical problems.

发明内容SUMMARY OF THE INVENTION

鉴于此,本发明实施例提供一种环境光强度的补偿方法及移动终端,以提高检测环境光强度的准确度,进而更加准确地调整移动终端屏幕的背光。In view of this, embodiments of the present invention provide a compensation method for ambient light intensity and a mobile terminal, so as to improve the accuracy of detecting the ambient light intensity, and then more accurately adjust the backlight of the screen of the mobile terminal.

本发明实施例的第一方面,提供一种环境光强度的补偿方法,所述方法包括:In a first aspect of the embodiments of the present invention, a method for compensating ambient light intensity is provided, and the method includes:

当接近传感器处于远离状态时,获取N组所述接近传感器的数据,其中,N为大于零的整数;When the proximity sensor is in the away state, acquire data of N groups of the proximity sensor, where N is an integer greater than zero;

根据所述N组所述接近传感器的数据,获得第一接近传感器数据;obtaining first proximity sensor data according to the data of the N groups of the proximity sensors;

若所述第一接近传感器数据大于预先设置的接近传感器数据的标准值,则根据该标准值和所述第一接近传感器数据,计算所述接近传感器数据的增加比例;If the first proximity sensor data is greater than a preset standard value of the proximity sensor data, calculating the increase ratio of the proximity sensor data according to the standard value and the first proximity sensor data;

根据所述接近传感器数据的增加比例,获得与所述接近传感器数据的增加比例对应的环境光强度的减少比例;obtaining, according to the increase ratio of the proximity sensor data, a reduction ratio of the ambient light intensity corresponding to the increase ratio of the proximity sensor data;

获取移动终端的当前环境光强度;Obtain the current ambient light intensity of the mobile terminal;

根据所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度。The current ambient light intensity is corrected according to the reduction ratio of the ambient light intensity to compensate for the current ambient light intensity.

本发明实施例的第二方面,提供一种移动终端,所述移动终端包括:A second aspect of the embodiments of the present invention provides a mobile terminal, where the mobile terminal includes:

第一获取单元,用于当接近传感器处于远离状态时,获取N组所述接近传感器的数据,其中,N为大于零的整数;a first acquiring unit, configured to acquire data of N groups of the proximity sensors when the proximity sensor is in a remote state, where N is an integer greater than zero;

第一获得单元,用于根据所述N组所述接近传感器的数据,获得第一接近传感器数据;a first obtaining unit, configured to obtain first proximity sensor data according to the data of the N groups of the proximity sensors;

计算单元,用于若所述第一接近传感器数据大于预先设置的接近传感器数据的标准值,则根据该标准值和所述第一接近传感器数据,计算所述接近传感器数据的增加比例;a calculation unit, configured to calculate an increase ratio of the proximity sensor data according to the standard value and the first proximity sensor data if the first proximity sensor data is greater than a preset standard value of the proximity sensor data;

第二获得单元,用于根据所述接近传感器数据的增加比例,获得与所述接近传感器数据的增加比例对应的环境光强度的减少比例;a second obtaining unit, configured to obtain a reduction ratio of ambient light intensity corresponding to the increase ratio of the proximity sensor data according to the increase ratio of the proximity sensor data;

第二获取单元,用于获取所述移动终端的当前环境光强度;a second acquiring unit, configured to acquire the current ambient light intensity of the mobile terminal;

修改单元,用于根据所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度。A modification unit, configured to correct the current ambient light intensity according to the reduction ratio of the ambient light intensity to compensate for the current ambient light intensity.

本发明实施例与现有技术相比存在的有益效果是:本发明实施例通过在接近传感器处于远离状态时,根据获取的N组接近传感器的而数据获得第一接近传感器数据,在该第一接近传感器数据大于预先设置的接近传感器数据的标准值时,根据该标准值和第一接近传感器数据计算接近传感器数据的增加比例,根据该增加比例可以获得对应的环境光强度的减少比例,通过该减少比例修改移动终端的当前环境光强度,从而实现补充该当前环境光强度。本发明实施例通过比较第一接近传感器数据与接近传感器数据的标准值来确定光线传感器上是否沾上一层油污,如果确认有油污,获得接近传感器数据的增加比例,进而获得相应的环境光强度的减少比例,移动终端可以根据环境光强度的减少比例修正当前环境光强度,补偿该当前环境光强度,解决了光线传感器被油污遮挡而导致环境光强度检测不准确的问题,提高了检测环境度强度的准确度,进而更加准确地调整移动终端屏幕的背光。Compared with the prior art, the embodiment of the present invention has the beneficial effect that the embodiment of the present invention obtains the first proximity sensor data according to the acquired data of the N groups of proximity sensors when the proximity sensor is in a remote state. When the proximity sensor data is greater than the preset standard value of the proximity sensor data, the increase ratio of the proximity sensor data is calculated according to the standard value and the first proximity sensor data, and the corresponding reduction ratio of the ambient light intensity can be obtained according to the increase ratio. The reduction ratio modifies the current ambient light intensity of the mobile terminal, so as to supplement the current ambient light intensity. In the embodiment of the present invention, it is determined whether the light sensor is stained with a layer of oil pollution by comparing the first proximity sensor data and the standard value of the proximity sensor data. The mobile terminal can correct the current ambient light intensity according to the reduction ratio of the ambient light intensity to compensate the current ambient light intensity, which solves the problem of inaccurate ambient light intensity detection caused by the light sensor being blocked by oil pollution, and improves the detection environment. Intensity accuracy, and then adjust the backlight of the mobile terminal screen more accurately.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present invention. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1是本发明实施例一提供的环境光强度的补偿方法的示意流程图;1 is a schematic flowchart of a compensation method for ambient light intensity provided in Embodiment 1 of the present invention;

图2是本发明实施例二提供的环境光强度的补偿方法的示意流程图;2 is a schematic flowchart of a compensation method for ambient light intensity provided by Embodiment 2 of the present invention;

图3是本发明实施例三提供的移动终端的示意性框图;3 is a schematic block diagram of a mobile terminal according to Embodiment 3 of the present invention;

图4是本发明实施例四提供的移动终端的示意性框图;4 is a schematic block diagram of a mobile terminal according to Embodiment 4 of the present invention;

图5是本发明实施例五提供的移动终端的示意性框图。FIG. 5 is a schematic block diagram of a mobile terminal according to Embodiment 5 of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the terms "comprising" and "comprising" indicate the presence of the described features, integers, steps, operations, elements and/or components, but do not exclude one or The presence or addition of a number of other features, integers, steps, operations, elements, components, and/or sets thereof.

还应当理解,在此本发明说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本发明。如在本发明说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则“该”意在包括复数形式。It is also to be understood that the terminology used in this specification of the present invention is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in this specification and the appended claims, "the" is intended to include the plural unless the context clearly dictates otherwise.

如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting" . Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".

具体实现中,本发明实施例中描述的移动终端包括但不限于诸如具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的移动电话、膝上型计算机或平板计算机之类的其它便携式设备。还应当理解的是,在某些实施例中,所述设备并非便携式通信设备,而是具有触摸敏感表面(例如,触摸屏显示器和/或触摸板)的台式计算机。In specific implementations, the mobile terminals described in the embodiments of the present invention include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (eg, touch screen displays and/or touch pads). . It should also be understood that in some embodiments, the device is not a portable communication device, but rather a desktop computer with a touch-sensitive surface (eg, a touch screen display and/or a touch pad).

在接下来的讨论中,描述了包括显示器和触摸敏感表面的移动终端。然而,应当理解的是,移动终端可以包括诸如物理键盘、鼠标和/或控制杆的一个或多个其它物理用户接口设备。In the discussion that follows, a mobile terminal including a display and a touch-sensitive surface is described. However, it should be understood that the mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and/or joystick.

移动终端支持各种应用程序,例如以下中的一个或多个:绘图应用程序、演示应用程序、文字处理应用程序、网站创建应用程序、盘刻录应用程序、电子表格应用程序、游戏应用程序、电话应用程序、视频会议应用程序、电子邮件应用程序、即时消息收发应用程序、锻炼支持应用程序、照片管理应用程序、数码相机应用程序、数字摄影机应用程序、web浏览应用程序、数字音乐播放器应用程序和/或数字视频播放器应用程序。The mobile terminal supports various applications such as one or more of the following: drawing application, presentation application, word processing application, website creation application, disc burning application, spreadsheet application, gaming application, telephone Apps, Video Conferencing Apps, Email Apps, Instant Messaging Apps, Workout Support Apps, Photo Management Apps, Digital Camera Apps, Digital Video Camera Apps, Web Browsing Apps, Digital Music Player Apps and/or digital video player applications.

可以在移动终端上执行的各种应用程序可以使用诸如触摸敏感表面的至少一个公共物理用户接口设备。可以在应用程序之间和/或相应应用程序内调整和/或改变触摸敏感表面的一个或多个功能以及终端上显示的相应信息。这样,终端的公共物理架构(例如,触摸敏感表面)可以支持具有对用户而言直观且透明的用户界面的各种应用程序。Various applications that may be executed on the mobile terminal may use at least one common physical user interface device, such as a touch sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal may be adjusted and/or changed between applications and/or within respective applications. In this way, the common physical architecture of the terminal (eg, touch-sensitive surface) can support various applications with a user interface that is intuitive and transparent to the user.

参见图1,是本发明实施例一提供的环境光强度的补偿方法的示意流程图,如图所示该方法可以包括以下步骤:Referring to FIG. 1 , it is a schematic flowchart of a method for compensating ambient light intensity provided by Embodiment 1 of the present invention. As shown in the figure, the method may include the following steps:

在步骤S101中,当接近传感器处于远离状态时,获取N组所述接近传感器的数据,其中,N为大于零的整数。In step S101, when the proximity sensor is in a remote state, data of N groups of the proximity sensor is acquired, where N is an integer greater than zero.

在本发明实施例中,移动终端的正面即屏幕侧设置有接近传感器和光线传感器,通常将接近传感器和光线传感器设置在一起,具体可设置在移动终端正面听筒周围。In the embodiment of the present invention, a proximity sensor and a light sensor are arranged on the front of the mobile terminal, that is, on the screen side. The proximity sensor and the light sensor are usually arranged together, and may be arranged around the earpiece on the front of the mobile terminal.

其中,所述接近传感器是在移动终端的芯片内部有一个红外发射管和一个红外接收管,当遮挡物越靠近所述接近传感器时(例如人接打电话),红外反射的量就越大,红外线强度越大。所述光线传感器可以用于检测外界环境的光线强度。然而当移动终端屏幕沾上油污时会影响所述接近传感器和所述光线传感器的检测。以手机为例,用户在接打电话时,手机屏幕上都会沾上一层油污,如果油污沾在接近传感器和光线传感器的附件,可能就会增大接近传感器检测的红外线强度以及减小光线传感器检测的环境光强度。Wherein, the proximity sensor has an infrared emitting tube and an infrared receiving tube inside the chip of the mobile terminal. The higher the infrared intensity. The light sensor can be used to detect the light intensity of the external environment. However, when the screen of the mobile terminal is stained with oil, the detection of the proximity sensor and the light sensor will be affected. Taking a mobile phone as an example, when a user makes a call, the screen of the mobile phone will be stained with a layer of oil. If the oil is stained on the accessories of the proximity sensor and the light sensor, it may increase the infrared intensity detected by the proximity sensor and reduce the light sensor. Detected ambient light intensity.

在本发明实施例中,所述接近传感器的数据包括但不限于所述接近传感器检测的红外线强度。由于当遮挡物越靠近所述接近传感器时,所检测的红外线强度越大,在红外线强度很大时并不能很好的反应出油污对所述接近传感器的干扰,故可以预先设置一个阈值,在红外线强度小于该阈值,即所述接近传感器处于远离状态时才分析油污对所述接近传感器和所述光线传感器的影响,其中,所述远离状态为红外线强度小于阈值时的状态。In this embodiment of the present invention, the data of the proximity sensor includes, but is not limited to, the intensity of infrared rays detected by the proximity sensor. Because when the obstruction is closer to the proximity sensor, the detected infrared intensity is greater, and when the infrared intensity is very high, the interference of oil pollution on the proximity sensor cannot be well reflected, so a threshold can be set in advance. When the infrared intensity is less than the threshold, that is, the proximity sensor is in a far away state to analyze the influence of oil pollution on the proximity sensor and the light sensor, wherein the far away state is a state when the infrared intensity is less than the threshold.

在步骤S102中,根据所述N组所述接近传感器的数据,获得第一接近传感器数据。In step S102, first proximity sensor data is obtained according to the data of the N groups of the proximity sensors.

在本发明实施例中,为了防止移动终端的抖动对接近传感器的数据的影响,可以获取N组所述接近传感器的数据以获得更为精确的所述接近传感器的数据,即第一接近传感器数据。In this embodiment of the present invention, in order to prevent the influence of the jitter of the mobile terminal on the data of the proximity sensor, N groups of data of the proximity sensor may be acquired to obtain more accurate data of the proximity sensor, that is, the first proximity sensor data .

在步骤S103中,若所述第一接近传感器数据大于预先设置的接近传感器数据的标准值,则根据该标准值和所述第一接近传感器数据,计算所述接近传感器数据的增加比例。In step S103, if the first proximity sensor data is greater than a preset standard value of the proximity sensor data, the increase ratio of the proximity sensor data is calculated according to the standard value and the first proximity sensor data.

在本发明实施例中,预先设置的接近传感器数据的标准值为未受到油污干扰时,接近传感器检测的数据,如果所述第一接近传感器数据大于预先设置的接近传感器数据的标准值或者所述第一接近传感器数据减去预先设置的接近传感器数据的标准值,相减所得值大于预设阈值时,说明移动终端中的接近传感器受到了油污干扰,导致接近传感器检测的接近传感器数据增大,由于接近传感器和光线传感器一般都设置在一起,光线传感器也受到了油污干扰,导致光线传感器检测的环境光强度减小。In this embodiment of the present invention, the preset standard value of the proximity sensor data is the data detected by the proximity sensor when no oil pollution is disturbed, if the first proximity sensor data is greater than the preset standard value of the proximity sensor data or the The first proximity sensor data is subtracted from the preset standard value of the proximity sensor data, and when the value obtained by the subtraction is greater than the preset threshold, it means that the proximity sensor in the mobile terminal has been interfered by oil pollution, resulting in an increase in the proximity sensor data detected by the proximity sensor. Since the proximity sensor and the light sensor are generally arranged together, the light sensor is also interfered by oil pollution, which causes the ambient light intensity detected by the light sensor to decrease.

在本发明实施例中,所述第一接近传感器数据减去预先设置的接近传感器数据的标准值,可以将相减所得值与预先设置的接近传感器数据的标准值的比值作为所述接近传感器数据的增加比例。In this embodiment of the present invention, a preset standard value of the proximity sensor data is subtracted from the first proximity sensor data, and the ratio of the subtracted value to the preset standard value of the proximity sensor data may be used as the proximity sensor data increase ratio.

在步骤S104中,根据所述接近传感器数据的增加比例,获得与所述接近传感器数据的增加比例对应的环境光强度的减少比例。In step S104, according to the increase ratio of the proximity sensor data, a decrease ratio of the ambient light intensity corresponding to the increase ratio of the proximity sensor data is obtained.

在本发明实施例中,由于在所述接近传感器和所述光线传感器受到油污干扰时,在所述接近传感器数据增大的同时所述环境光强度也会减小,就可以获知所述接近传感器数据的增加比例与所述环境光强度的减少比例存在一定的对应关系。In the embodiment of the present invention, when the proximity sensor and the light sensor are disturbed by oil pollution, the ambient light intensity also decreases when the data of the proximity sensor increases, so that the proximity sensor can be known. There is a certain corresponding relationship between the increase ratio of the data and the decrease ratio of the ambient light intensity.

在步骤S105中,获取移动终端的当前环境光强度。In step S105, the current ambient light intensity of the mobile terminal is acquired.

在本发明实施例中,可通过所述移动终端中的光线传感器获取所处环境的当前环境光强度。In this embodiment of the present invention, the current ambient light intensity of the environment in which it is located may be acquired through a light sensor in the mobile terminal.

在步骤S106中,根据所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度。In step S106, the current ambient light intensity is corrected according to the reduction ratio of the ambient light intensity to compensate for the current ambient light intensity.

在本发明实施例中,由于检测所述当前环境光强度的光线传感器受到油污干扰时,会导致所述当前环境光强度减少,可以通过步骤S104中获得所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度的减少量,得到准确的当前环境光强度。In this embodiment of the present invention, since the light sensor for detecting the current ambient light intensity is interfered by oil pollution, the current ambient light intensity will be reduced, and the reduction ratio of the ambient light intensity can be obtained in step S104 to correct the The current ambient light intensity is used to compensate for the decrease in the current ambient light intensity to obtain an accurate current ambient light intensity.

示例性的,所述环境光强度的减少比例为A,所述环境光强度的减少比例为B,则准确的当前环境光强度为A+A*B。Exemplarily, the reduction ratio of the ambient light intensity is A, and the reduction ratio of the ambient light intensity is B, then the accurate current ambient light intensity is A+A*B.

本发明实施例通过比较第一接近传感器数据与接近传感器数据的标准值来确定光线传感器上是否沾上一层油污,如果确认有油污,获得接近传感器数据的增加比例,进而获得相应的环境光强度的减少比例,移动终端可以根据环境光强度的减少比例修正当前环境光强度,补偿该当前环境光强度,解决了光线传感器被油污遮挡而导致环境光强度检测不准确的问题,提高了检测环境度强度的准确度,进而更加准确地调整移动终端屏幕的背光。In the embodiment of the present invention, it is determined whether the light sensor is stained with a layer of oil pollution by comparing the first proximity sensor data and the standard value of the proximity sensor data. The mobile terminal can correct the current ambient light intensity according to the reduction ratio of the ambient light intensity to compensate the current ambient light intensity, which solves the problem of inaccurate ambient light intensity detection caused by the light sensor being blocked by oil pollution, and improves the detection environment. Intensity accuracy, and then adjust the backlight of the mobile terminal screen more accurately.

参见图2,是本发明实施例二提供的环境光强度的补偿方法的示意流程图,如图所示该方法可以包括以下步骤:Referring to FIG. 2 , it is a schematic flowchart of a compensation method for ambient light intensity provided by Embodiment 2 of the present invention. As shown in the figure, the method may include the following steps:

在步骤S201中,设置接近传感器数据的增加比例与环境光强度的减少比例的对应关系。In step S201, a corresponding relationship between the increase ratio of the proximity sensor data and the decrease ratio of the ambient light intensity is set.

在本发明实施例中,移动终端的正面即屏幕侧设置有接近传感器和光线传感器,通常将接近传感器和光线传感器设置在一起,具体可设置在移动终端正面听筒周围。In the embodiment of the present invention, a proximity sensor and a light sensor are arranged on the front of the mobile terminal, that is, on the screen side. The proximity sensor and the light sensor are usually arranged together, and may be arranged around the earpiece on the front of the mobile terminal.

其中,所述接近传感器是在移动终端的芯片内部有一个红外发射管和一个红外接收管,当遮挡物越靠近所述接近传感器时(例如人接打电话),红外反射的量就越大,红外线强度越大。所述光线传感器可以用于检测外界环境的光线强度。然而当移动终端屏幕沾上油污时会影响所述接近传感器和所述光线传感器的检测。以手机为例,用户在接打电话时,手机屏幕上都会沾上一层油污,如果油污沾在接近传感器和光线传感器的附件,可能就会增大接近传感器检测的红外线强度以及减小光线传感器检测的环境光强度。Wherein, the proximity sensor has an infrared emitting tube and an infrared receiving tube inside the chip of the mobile terminal. The higher the infrared intensity. The light sensor can be used to detect the light intensity of the external environment. However, when the screen of the mobile terminal is stained with oil, the detection of the proximity sensor and the light sensor will be affected. Taking a mobile phone as an example, when a user makes a call, the screen of the mobile phone will be stained with a layer of oil. If the oil is stained on the accessories of the proximity sensor and the light sensor, it may increase the infrared intensity detected by the proximity sensor and reduce the light sensor. Detected ambient light intensity.

在本发明实施例中,所述接近传感器的数据包括但不限于所述接近传感器检测的红外线强度。由于当遮挡物越靠近所述接近传感器时,所检测的红外线强度越大,在红外线强度很大时并不能很好的反应出油污对所述接近传感器的干扰,故可以预先设置一个阈值,在红外线强度小于该阈值,即所述接近传感器处于远离状态时才分析油污对所述接近传感器和所述光线传感器的影响,其中,所述远离状态为红外线强度小于阈值时的状态。In this embodiment of the present invention, the data of the proximity sensor includes, but is not limited to, the intensity of infrared rays detected by the proximity sensor. Because when the obstruction is closer to the proximity sensor, the detected infrared intensity is greater, and when the infrared intensity is very high, the interference of oil pollution on the proximity sensor cannot be well reflected, so a threshold can be set in advance. When the infrared intensity is less than the threshold, that is, the proximity sensor is in a far away state to analyze the influence of oil pollution on the proximity sensor and the light sensor, wherein the far away state is a state when the infrared intensity is less than the threshold.

在本发明实施例中,在移动终端出厂时,可以预先设置所述移动终端中接近传感器处于远离状态时,接近传感器检测的接近传感器数据的增加比例与光线传感器检测的环境光强度的减少比例的对应关系。In this embodiment of the present invention, when the mobile terminal is shipped from the factory, it can be preset that when the proximity sensor in the mobile terminal is in a remote state, the ratio of the increase ratio of the proximity sensor data detected by the proximity sensor to the decrease ratio of the ambient light intensity detected by the light sensor can be preset. Correspondence.

进一步的,所述设置所述接近传感器数据的增加比例与所述环境光强度的减少比例的对应关系包括:Further, the setting of the corresponding relationship between the increase ratio of the proximity sensor data and the decrease ratio of the ambient light intensity includes:

获取所述接近传感器数据的标准值和环境光强度的标准值;obtaining the standard value of the proximity sensor data and the standard value of the ambient light intensity;

获取多组不同的接近传感器数据以及与所述多组不同的接近传感器数据对应的多组环境光强度,其中,所述接近传感器数据大于所述接近传感器数据的标准值;acquiring multiple sets of different proximity sensor data and multiple sets of ambient light intensities corresponding to the multiple sets of different proximity sensor data, wherein the proximity sensor data is greater than a standard value of the proximity sensor data;

根据所述多组不同的接近传感器数据和所述接近传感器数据的标准值,计算所述接近传感器数据的增加比例;calculating the increase ratio of the proximity sensor data according to the multiple sets of different proximity sensor data and the standard value of the proximity sensor data;

根据所述多组环境光强度和所述环境光强度的标准值,计算所述环境光强度的减少比例,以获得所述环境光强度的减少比例与所述接近传感器数据的增加比例的对应关系。According to the multiple sets of ambient light intensities and the standard values of the ambient light intensity, the reduction ratio of the ambient light intensity is calculated to obtain the corresponding relationship between the reduction ratio of the ambient light intensity and the increase ratio of the proximity sensor data .

在本发明实施例中,所述接近传感器数据的标准值和环境光强度的标准值在预定的环境内获取,所述预定的环境可以为环境光线固定的室内环境,在该固定的室内环境中,在移动终端中所述接近传感器和所述光线传感器未受到油污干扰时,将所述接近传感器检测的接近传感器数据作为所述接近传感器数据的标准值,将所述光线传感器检测的环境光强度作为所述环境光强度的标准值。In this embodiment of the present invention, the standard value of the proximity sensor data and the standard value of the ambient light intensity are acquired in a predetermined environment, and the predetermined environment may be an indoor environment with fixed ambient light, and in the fixed indoor environment , when the proximity sensor and the light sensor in the mobile terminal are not disturbed by oil pollution, the proximity sensor data detected by the proximity sensor is used as the standard value of the proximity sensor data, and the ambient light intensity detected by the light sensor is used. as the standard value of the ambient light intensity.

在本发明实施例中,为了在所述接近传感器受到油污干扰时获取所述接近传感器数据的不同增加比例,可以通过改变油污对所述接近传感器的干扰程度获取不同的接近传感器数据和相应的多组不同的环境光强度,进而获得多组不同的接近传感器数据的增加比例以及与其对应的环境光强度的减少比例。In this embodiment of the present invention, in order to obtain different increasing ratios of the proximity sensor data when the proximity sensor is disturbed by oil pollution, different proximity sensor data and corresponding multi-level data can be obtained by changing the degree of interference of oil pollution on the proximity sensor. Different groups of ambient light intensities are obtained, and then the increase ratios of multiple sets of different proximity sensor data and the corresponding reduction ratios of ambient light intensities are obtained.

示例性的,接近传感器数据的标准值为B,环境光强度的标准值为C,在油污干扰程度为A1时,接近传感器数据为B1,环境光强度为C1;在油污干扰程度为A2时,接近传感器数据为B2,环境光强度为C2;在油污干扰程度为A3时,接近传感器数据为B3,环境光强度为C3;则油污干扰程度为A1时的接近传感器增加比例为(B1-B)/B、与该接近传感器增加比例对应的环境光强度减少比例为(C-C1)/C;油污干扰程度为A2时的接近传感器增加比例为(B2-B)/B、与该接近传感器增加比例对应的环境光强度减少比例为(C-C2)/C;油污干扰程度为A3时的接近传感器增加比例为(B3-B)/B、与该接近传感器增加比例对应的环境光强度减少比例为(C-C3)/C。Exemplarily, the standard value of the proximity sensor data is B, and the standard value of the ambient light intensity is C. When the oil pollution interference level is A1, the proximity sensor data is B1 and the ambient light intensity is C1; when the oil pollution interference level is A2, The proximity sensor data is B2, and the ambient light intensity is C2; when the oil pollution degree is A3, the proximity sensor data is B3, and the ambient light intensity is C3; when the oil pollution degree is A1, the proximity sensor increase ratio is (B1-B) /B, the reduction ratio of the ambient light intensity corresponding to the increase ratio of the proximity sensor is (C-C1)/C; the increase ratio of the proximity sensor when the oil pollution degree is A2 is (B2-B)/B, and the increase ratio of the proximity sensor The reduction ratio of ambient light intensity corresponding to the ratio is (C-C2)/C; the increase ratio of the proximity sensor when the oil pollution degree is A3 is (B3-B)/B, and the reduction ratio of ambient light intensity corresponding to the increase ratio of the proximity sensor is (C-C3)/C.

在步骤S202中,当接近传感器处于远离状态时,获取N组所述接近传感器的数据,其中,N为大于零的整数。In step S202, when the proximity sensor is in the remote state, data of N groups of the proximity sensor is acquired, where N is an integer greater than zero.

进一步的,所述方法还包括:Further, the method also includes:

开启所述移动终端的自动背光功能。Turn on the automatic backlight function of the mobile terminal.

在本发明实施例中,移动终端用户在开启所述移动终端的自动背光功能时,可以通过交互界面向所述移动终端发送开启自动背光功能指令,在开启所述移动中的自动背光功能时,同时启动接近传感器和光线传感器。In this embodiment of the present invention, when the mobile terminal user enables the automatic backlight function of the mobile terminal, he may send an instruction to enable the automatic backlight function to the mobile terminal through an interactive interface. Activate the proximity sensor and light sensor at the same time.

在步骤S203中,根据所述N组所述接近传感器的数据,获得第一接近传感器数据。In step S203, first proximity sensor data is obtained according to the data of the N groups of the proximity sensors.

在本发明实施例中,为了防止移动终端的抖动对接近传感器的数据的影响,可以获取N组所述接近传感器的数据以获得更为精确的所述接近传感器的数据,即第一接近传感器数据。In this embodiment of the present invention, in order to prevent the influence of the jitter of the mobile terminal on the data of the proximity sensor, N groups of data of the proximity sensor may be acquired to obtain more accurate data of the proximity sensor, that is, the first proximity sensor data .

进一步的,所述根据所述N组所述接近传感器的数据,获得第一接近传感器包括:Further, the obtaining the first proximity sensor according to the data of the N groups of the proximity sensors includes:

计算所述N组所述接近传感器的数据的平均值,并将该平均值作为所述第一接近传感器数据。Calculate the average value of the data of the N groups of the proximity sensors, and use the average value as the first proximity sensor data.

进一步的,所述根据所述N组所述接近传感器的数据,获得第一接近传感器包括:Further, the obtaining the first proximity sensor according to the data of the N groups of the proximity sensors includes:

从所述N组所述接近传感器的数据中选取出最小值作为所述第一接近传感器数据。A minimum value is selected from the data of the N groups of the proximity sensors as the first proximity sensor data.

在步骤S204中,若所述第一接近传感器数据大于预先设置的接近传感器数据的标准值,则根据该标准值和所述第一接近传感器数据,计算所述接近传感器数据的增加比例。In step S204, if the first proximity sensor data is greater than a preset standard value of the proximity sensor data, the increase ratio of the proximity sensor data is calculated according to the standard value and the first proximity sensor data.

在本发明实施例中,预先设置的接近传感器数据的标准值为未受到油污干扰时,接近传感器检测的数据,如果所述第一接近传感器数据大于预先设置的接近传感器数据的标准值或者所述第一接近传感器数据减去预先设置的接近传感器数据的标准值,相减所得值大于预设阈值时,说明移动终端中的接近传感器受到了油污干扰,导致接近传感器检测的接近传感器数据增大,由于接近传感器和光线传感器一般都设置在一起,光线传感器也受到了油污干扰,导致光线传感器检测的环境光强度减小。In this embodiment of the present invention, the preset standard value of the proximity sensor data is the data detected by the proximity sensor when no oil pollution is disturbed, if the first proximity sensor data is greater than the preset standard value of the proximity sensor data or the The first proximity sensor data is subtracted from the preset standard value of the proximity sensor data, and when the value obtained by the subtraction is greater than the preset threshold, it means that the proximity sensor in the mobile terminal has been interfered by oil pollution, resulting in an increase in the proximity sensor data detected by the proximity sensor. Since the proximity sensor and the light sensor are generally arranged together, the light sensor is also interfered by oil pollution, which causes the ambient light intensity detected by the light sensor to decrease.

在步骤S205中,根据所述接近传感器数据的增加比例,获得与所述接近传感器数据的增加比例对应的所述环境光强度的减少比例。In step S205, according to the increase ratio of the proximity sensor data, the decrease ratio of the ambient light intensity corresponding to the increase ratio of the proximity sensor data is obtained.

在本发明实施例中,在获得所述接近传感器数据的增加比例后,可以根据步骤S201设置的接近传感器数据的增加比例与环境光强度的减少比例的对应关系,获得所述环境光强度的减少比例。In this embodiment of the present invention, after the increase ratio of the proximity sensor data is obtained, the reduction of the ambient light intensity may be obtained according to the corresponding relationship between the increase ratio of the proximity sensor data and the decrease ratio of the ambient light intensity set in step S201 Proportion.

在步骤S206中,获取移动终端的当前环境光强度。In step S206, the current ambient light intensity of the mobile terminal is acquired.

在本发明实施例中,可通过所述移动终端中的光线传感器获取所处环境的当前环境光强度。In this embodiment of the present invention, the current ambient light intensity of the environment in which it is located may be acquired through a light sensor in the mobile terminal.

在步骤S207中,根据所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度。In step S207, the current ambient light intensity is corrected according to the reduction ratio of the ambient light intensity to compensate for the current ambient light intensity.

在本发明实施例中,由于检测所述当前环境光强度的光线传感器受到油污干扰时,会导致所述当前环境光强度减少,可以通过步骤S205中获得所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度的减少量,得到准确的当前环境光强度。In the embodiment of the present invention, when the light sensor for detecting the current ambient light intensity is interfered by oil pollution, the current ambient light intensity will be reduced, and the reduction ratio of the ambient light intensity can be obtained in step S205 to correct the The current ambient light intensity is used to compensate for the decrease in the current ambient light intensity to obtain an accurate current ambient light intensity.

示例性的,所述环境光强度的减少比例为A,所述环境光强度的减少比例为B,则准确的当前环境光强度为A+A*B。Exemplarily, the reduction ratio of the ambient light intensity is A, and the reduction ratio of the ambient light intensity is B, then the accurate current ambient light intensity is A+A*B.

本发明实施例通过预先设置接近传感器数据的增加比例与环境光强度的减少比例的对应关系,比较第一接近传感器数据与接近传感器数据的标准值来确定光线传感器上是否沾上一层油污,如果确认有油污,获得接近传感器数据的增加比例,进而获得相应的环境光强度的减少比例,移动终端可以根据环境光强度的减少比例修正当前环境光强度,补偿该当前环境光强度,解决了光线传感器被油污遮挡而导致环境光强度检测不准确的问题,提高了检测环境度强度的准确度,进而更加准确地调整移动终端屏幕的背光。In the embodiment of the present invention, the corresponding relationship between the increase ratio of the proximity sensor data and the decrease ratio of the ambient light intensity is preset, and the first proximity sensor data and the standard value of the proximity sensor data are compared to determine whether a layer of oil is stained on the light sensor. Confirm that there is oil pollution, obtain the increase ratio of the proximity sensor data, and then obtain the corresponding reduction ratio of the ambient light intensity. The mobile terminal can correct the current ambient light intensity according to the reduction ratio of the ambient light intensity to compensate for the current ambient light intensity. Solve the problem of light sensor The problem of inaccurate detection of ambient light intensity caused by being blocked by oil pollution improves the accuracy of detecting the ambient light intensity, thereby adjusting the backlight of the mobile terminal screen more accurately.

参见图3,是本发明实施例三提供的移动终端的示意框图,如图所示该移动终端可以包括:第一获取单元31、第一获得单元32、计算单元33、第二获得单元34、第二获取单元35以及修改单元36。Referring to FIG. 3, it is a schematic block diagram of a mobile terminal provided in Embodiment 3 of the present invention. As shown in the figure, the mobile terminal may include: a first obtaining unit 31, a first obtaining unit 32, a computing unit 33, a second obtaining unit 34, The second acquisition unit 35 and the modification unit 36 .

第一获取单元31,用于当接近传感器处于远离状态时,获取N组所述接近传感器的数据,其中,N为大于零的整数;a first acquisition unit 31, configured to acquire data of N groups of the proximity sensors when the proximity sensor is in a remote state, where N is an integer greater than zero;

第一获得单元32,用于根据所述N组所述接近传感器的数据,获得第一接近传感器数据;a first obtaining unit 32, configured to obtain first proximity sensor data according to the data of the N groups of the proximity sensors;

计算单元33,用于若所述第一接近传感器数据大于预先设置的接近传感器数据的标准值,则根据该标准值和所述第一接近传感器数据,计算所述接近传感器数据的增加比例;A calculation unit 33, configured to calculate the increase ratio of the proximity sensor data according to the standard value and the first proximity sensor data if the first proximity sensor data is greater than a preset standard value of the proximity sensor data;

第二获得单元34,用于根据所述接近传感器数据的增加比例,获得与所述接近传感器数据的增加比例对应的环境光强度的减少比例;The second obtaining unit 34 is configured to obtain, according to the increase ratio of the proximity sensor data, a decrease ratio of the ambient light intensity corresponding to the increase ratio of the proximity sensor data;

第二获取单元35,用于获取所述移动终端的当前环境光强度;a second obtaining unit 35, configured to obtain the current ambient light intensity of the mobile terminal;

修改单元36,用于根据所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度。A modification unit 36, configured to correct the current ambient light intensity according to the reduction ratio of the ambient light intensity to compensate for the current ambient light intensity.

本发明实施例提供的移动终端可以使用在前述对应的方法实施例一中,详情参见上述方法实施例一的描述,在此不再累述。The mobile terminal provided by the embodiment of the present invention can be used in the corresponding method embodiment 1 above. For details, refer to the description of the above method embodiment 1, which is not repeated here.

参见图4,是本发明实施例四提供的移动终端的示意框图,如图所示该可以包括:设置单元41、第一获取单元42、第一获得单元43、计算单元44、第二获得单元45、第二获取单元46以及修改单元47。Referring to FIG. 4, it is a schematic block diagram of a mobile terminal according to Embodiment 4 of the present invention. As shown in the figure, the mobile terminal may include: a setting unit 41, a first obtaining unit 42, a first obtaining unit 43, a computing unit 44, and a second obtaining unit 45 , a second acquiring unit 46 and a modifying unit 47 .

设置单元41,用于设置接近传感器数据的增加比例与环境光强度的减少比例的对应关系;The setting unit 41 is used for setting the corresponding relationship between the increase ratio of the proximity sensor data and the decrease ratio of the ambient light intensity;

第一获取单元42,用于当接近传感器处于远离状态时,获取N组所述接近传感器的数据,其中,N为大于零的整数;a first acquiring unit 42, configured to acquire data of N groups of the proximity sensors when the proximity sensor is in a remote state, where N is an integer greater than zero;

第一获得单元43,用于根据所述N组所述接近传感器的数据,获得第一接近传感器数据;a first obtaining unit 43, configured to obtain first proximity sensor data according to the data of the N groups of the proximity sensors;

计算单元44,用于若所述第一接近传感器数据大于预先设置的接近传感器数据的标准值,则根据该标准值和所述第一接近传感器数据,计算所述接近传感器数据的增加比例;A calculation unit 44, configured to calculate the increase ratio of the proximity sensor data according to the standard value and the first proximity sensor data if the first proximity sensor data is greater than a preset standard value of the proximity sensor data;

第二获得单元45,用于根据所述接近传感器数据的增加比例,获得与所述接近传感器数据的增加比例对应的环境光强度的减少比例;The second obtaining unit 45 is configured to obtain, according to the increase ratio of the proximity sensor data, a decrease ratio of the ambient light intensity corresponding to the increase ratio of the proximity sensor data;

第二获取单元46,用于获取所述移动终端的当前环境光强度;a second obtaining unit 46, configured to obtain the current ambient light intensity of the mobile terminal;

修改单元47,用于根据所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度。A modifying unit 47, configured to modify the current ambient light intensity according to the reduction ratio of the ambient light intensity to compensate for the current ambient light intensity.

进一步的,所述第一获得单元43用于:Further, the first obtaining unit 43 is used for:

计算所述N组所述接近传感器的数据的平均值,并将该平均值作为所述第一接近传感器数据。Calculate the average value of the data of the N groups of the proximity sensors, and use the average value as the first proximity sensor data.

进一步的,所述第一获得单元43用于:Further, the first obtaining unit 43 is used for:

从所述N组所述接近传感器的数据中选取出最小值作为所述第一接近传感器数据。A minimum value is selected from the data of the N groups of the proximity sensors as the first proximity sensor data.

进一步的,所述设置单元41包括:Further, the setting unit 41 includes:

第一获取子单元411,用于获取所述接近传感器数据的标准值和环境光强度的标准值;The first acquisition subunit 411 is used to acquire the standard value of the proximity sensor data and the standard value of the ambient light intensity;

第二获取子单元412,用于获取多组不同的接近传感器数据以及与所述多组不同的接近传感器数据对应的多组环境光强度,其中,所述接近传感器数据大于所述接近传感器数据的标准值;The second acquiring subunit 412 is configured to acquire multiple sets of different proximity sensor data and multiple sets of ambient light intensities corresponding to the multiple sets of different proximity sensor data, wherein the proximity sensor data is greater than the proximity sensor data standard value;

第一计算子单元413,用于根据所述多组不同的接近传感器数据和所述接近传感器数据的标准值,计算所述接近传感器数据的增加比例;a first calculation subunit 413, configured to calculate the increase ratio of the proximity sensor data according to the multiple sets of different proximity sensor data and the standard value of the proximity sensor data;

第二计算子单元414,用于根据所述多组环境光强度和所述环境光强度的标准值,计算所述环境光强度的减少比例,以获得所述环境光强度的减少比例与所述接近传感器数据的增加比例的对应关系。The second calculation subunit 414 is configured to calculate the reduction ratio of the ambient light intensity according to the multiple sets of ambient light intensities and the standard values of the ambient light intensity, so as to obtain the reduction ratio of the ambient light intensity and the Correspondence of increasing proportion of proximity sensor data.

本发明实施例提供的移动终端可以使用在前述对应的方法实施例二中,详情参见上述方法实施例二的描述,在此不再累述。The mobile terminal provided by the embodiment of the present invention can be used in the foregoing corresponding method embodiment 2. For details, refer to the description of the foregoing method embodiment 2, which is not repeated here.

参见图5,是本发明实施例五提供的一种移动终端的示意框图。如图所示的该移动终端可以包括:一个或多个处理器501(图中仅示出一个);一个或多个输入设备502(图中仅示出一个),一个或多个输出设备503(图中仅示出一个)和存储器504。上述处理器501、输入设备502、输出设备503和存储器504通过总线505连接。其中:Referring to FIG. 5 , it is a schematic block diagram of a mobile terminal according to Embodiment 5 of the present invention. As shown in the figure, the mobile terminal may include: one or more processors 501 (only one is shown in the figure); one or more input devices 502 (only one is shown in the figure), one or more output devices 503 (only one is shown in the figure) and memory 504. The above-mentioned processor 501 , input device 502 , output device 503 and memory 504 are connected through a bus 505 . in:

所述处理器501,用于当接近传感器处于远离状态时,通过所述输入设备502获取N组所述接近传感器的数据,其中,N为大于零的整数,根据所述N组所述接近传感器的数据,获得第一接近传感器数据,若所述第一接近传感器数据大于所述存储器504中预先设置的接近传感器数据的标准值,则根据该标准值和所述第一接近传感器数据,计算所述接近传感器数据的增加比例,根据所述接近传感器数据的增加比例,获得与所述接近传感器数据的增加比例对应的环境光强度的减少比例,并通过所述输入设备502获取所述移动终端的当前环境光强度,根据所述环境光强度的减少比例修正所述当前环境光强度,以补偿所述当前环境光强度。The processor 501 is configured to acquire data of N groups of the proximity sensors through the input device 502 when the proximity sensors are in a remote state, where N is an integer greater than zero, according to the N groups of the proximity sensors The first proximity sensor data is obtained, and if the first proximity sensor data is greater than the standard value of the proximity sensor data preset in the memory 504, then according to the standard value and the first proximity sensor data, calculate the The increase ratio of the proximity sensor data, according to the increase ratio of the proximity sensor data, obtain the reduction ratio of the ambient light intensity corresponding to the increase ratio of the proximity sensor data, and obtain the mobile terminal through the input device 502. The current ambient light intensity is corrected according to the reduction ratio of the ambient light intensity to compensate for the current ambient light intensity.

进一步的,further,

所述处理器502,用于计算所述N组所述接近传感器的数据的平均值,并将该平均值作为所述第一接近传感器数据。The processor 502 is configured to calculate an average value of the data of the N groups of the proximity sensors, and use the average value as the first proximity sensor data.

进一步的,further,

所述处理器502,用于从所述N组所述接近传感器的数据中选取出最小值作为所述第一接近传感器数据。The processor 502 is configured to select a minimum value from the data of the N groups of the proximity sensors as the first proximity sensor data.

进一步的,further,

所述处理器501,还用于设置所述接近传感器数据的增加比例与所述环境光强度的减少比例的对应关系。The processor 501 is further configured to set a corresponding relationship between the increase ratio of the proximity sensor data and the decrease ratio of the ambient light intensity.

进一步的,further,

所述处理器501,具体用于通过所述输入设备502获取所述接近传感器数据的标准值和环境光强度的标准值,通过所述输入设备502获取多组不同的接近传感器数据以及与所述多组不同的接近传感器数据对应的多组环境光强度,其中,所述接近传感器数据大于所述接近传感器数据的标准值,根据所述多组不同的接近传感器数据和所述接近传感器数据的标准值,计算所述接近传感器数据的增加比例,根据所述多组环境光强度和所述环境光强度的标准值,计算所述环境光强度的减少比例,以获得所述环境光强度的减少比例与所述接近传感器数据的增加比例的对应关系。The processor 501 is specifically configured to obtain the standard value of the proximity sensor data and the standard value of the ambient light intensity through the input device 502, and obtain multiple sets of different proximity sensor data through the input device 502. Multiple sets of ambient light intensities corresponding to multiple sets of different proximity sensor data, wherein the proximity sensor data is greater than the standard value of the proximity sensor data, according to the multiple sets of different proximity sensor data and the standard value of the proximity sensor data value, calculate the increase ratio of the proximity sensor data, and calculate the reduction ratio of the ambient light intensity according to the multiple sets of ambient light intensities and the standard values of the ambient light intensity, so as to obtain the reduction ratio of the ambient light intensity Correspondence to the increasing proportion of the proximity sensor data.

所述输出设备503,用于向用户反馈执行结果信息。The output device 503 is used to feed back execution result information to the user.

所述存储器504,用于存储软件程序以及单元,所述处理器501通过运行存储在所述存储器504的软件程序以及单元,从而执行各种功能应用以及数据处理,即实现提高检测环境光强度的准确度的功能。The memory 504 is used to store software programs and units, and the processor 501 executes various functional applications and data processing by running the software programs and units stored in the memory 504, that is, to improve the detection of ambient light intensity. function of accuracy.

应当理解,在本发明实施例中,所称处理器501可以是中央处理单元(CentralProcessing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DigitalSignal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment of the present invention, the so-called processor 501 may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), special-purpose processors Integrated circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

输入设备502可以包括触控板、指纹采传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风等,输出设备503可以包括显示器(LCD等)、扬声器等。The input device 502 may include a touchpad, a fingerprint sensor (for collecting user's fingerprint information and fingerprint direction information), a microphone, and the like, and the output device 503 may include a display (LCD, etc.), a speaker, and the like.

该存储器504可以包括只读存储器和随机存取存储器,并向处理器801提供指令和数据。存储器504的一部分还可以包括非易失性随机存取存储器。例如,存储器504还可以存储设备类型的信息。The memory 504 may include read only memory and random access memory, and provides instructions and data to the processor 801 . A portion of memory 504 may also include non-volatile random access memory. For example, memory 504 may also store device type information.

具体实现中,本发明实施例中所描述的处理器501、输入设备502、输出设备503可执行本发明实施例提供的环境光强度的补偿方法的所有实施例中所描述的实现方式,也可执行本发明实施例所描述的移动终端的实现方式,在此不再赘述。In specific implementation, the processor 501 , the input device 502 , and the output device 503 described in the embodiments of the present invention can perform the implementations described in all the embodiments of the compensation method for ambient light intensity provided in the embodiments of the present invention, or can also The implementation manner of executing the mobile terminal described in the embodiments of the present invention is not repeated here.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the relationship between hardware and software Accomputeability, in the above description, has described the composition and steps of each example in general. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的移动终端和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the mobile terminal and unit described above, reference may be made to the corresponding process in the foregoing method embodiments, which will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的移动终端和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed mobile terminal and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present invention.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium In, several instructions are included to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed by the present invention. Modifications or substitutions should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (8)

CN201610665837.7A2016-08-122016-08-12Ambient light intensity compensation method and mobile terminalExpired - Fee RelatedCN106101450B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610665837.7ACN106101450B (en)2016-08-122016-08-12Ambient light intensity compensation method and mobile terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610665837.7ACN106101450B (en)2016-08-122016-08-12Ambient light intensity compensation method and mobile terminal

Publications (2)

Publication NumberPublication Date
CN106101450A CN106101450A (en)2016-11-09
CN106101450Btrue CN106101450B (en)2019-07-19

Family

ID=57457168

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610665837.7AExpired - Fee RelatedCN106101450B (en)2016-08-122016-08-12Ambient light intensity compensation method and mobile terminal

Country Status (1)

CountryLink
CN (1)CN106101450B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106791047B (en)*2016-12-052019-09-27Oppo广东移动通信有限公司Foreign matter detection method and device of mobile terminal and mobile terminal
CN107665698B (en)*2017-11-132020-01-03维沃移动通信有限公司Ambient light intensity compensation method and device
CN107945769B (en)*2017-11-222020-04-10Oppo广东移动通信有限公司Ambient light intensity detection method and device, storage medium and electronic equipment
CN109067967A (en)*2018-06-212018-12-21维沃移动通信有限公司 A method for synchronous compensation of ambient light and terminal equipment
CN108833716A (en)*2018-06-292018-11-16北京小米移动软件有限公司 Method and device for determining light intensity
CN109257507B (en)*2018-11-192021-03-12Oppo(重庆)智能科技有限公司Method for adjusting screen brightness, mobile terminal and storage medium
CN111210792A (en)*2020-02-112020-05-29北京小米移动软件有限公司Method and device for determining ambient light brightness, terminal and storage medium
KR102234612B1 (en)*2020-07-302021-04-01어보브반도체 주식회사Environmental compensation methods in proximity sensors and proximity sensors with improved environmental compensation

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102883061A (en)*2012-09-262013-01-16广东欧珀移动通信有限公司 A method and system for controlling the working state of a touch screen by a mobile terminal
CN105025159A (en)*2015-06-052015-11-04广东欧珀移动通信有限公司 Proximity sensor adjustment method and device
CN105609085A (en)*2015-12-292016-05-25广东欧珀移动通信有限公司 A screen brightness adjustment method and mobile terminal
WO2016107505A1 (en)*2014-12-302016-07-07华为技术有限公司Method for displaying graphical user interface, and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102883061A (en)*2012-09-262013-01-16广东欧珀移动通信有限公司 A method and system for controlling the working state of a touch screen by a mobile terminal
WO2016107505A1 (en)*2014-12-302016-07-07华为技术有限公司Method for displaying graphical user interface, and mobile terminal
CN105025159A (en)*2015-06-052015-11-04广东欧珀移动通信有限公司 Proximity sensor adjustment method and device
CN105609085A (en)*2015-12-292016-05-25广东欧珀移动通信有限公司 A screen brightness adjustment method and mobile terminal

Also Published As

Publication numberPublication date
CN106101450A (en)2016-11-09

Similar Documents

PublicationPublication DateTitle
CN106101450B (en)Ambient light intensity compensation method and mobile terminal
CN106454139B (en)Photographing method and mobile terminal
US10761642B2 (en)Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen
CN107219515A (en)The parameter calibrating method and terminal of a kind of range sensor
CN106648326B (en) Method and mobile terminal for adjusting screen-off time
CN106211292A (en) A navigation method for a mobile terminal and the mobile terminal
CN105224216B (en)A kind of user terminal control method and user terminal
CN109510896B (en) Proximity sensor selection method, device, storage medium and electronic device
CN111213354A (en) Method and terminal for adjusting screen brightness
CN110196422A (en)Test method, test device and the mobile terminal of laser ranging
CN111142650B (en)Screen brightness adjusting method, screen brightness adjusting device and terminal
CN113033584B (en)Data processing method and related equipment
CN108801321A (en)Sensor calibrating method, electronic device and computer readable storage medium
CN108733299A (en)Application split screen method and device, storage medium and electronic equipment
WO2021092806A1 (en)Screen parameter adjustment method and apparatus, and terminal device
CN106371732A (en)Method for controlling electronic curtain and electronic terminal
CN110618852A (en)View processing method, view processing device and terminal equipment
TWI502427B (en)Touch device and measuring voltage dynamic adjustment method thereof
CN102495691B (en)touch point sensing method
CN105677104B (en)A kind of user terminal control method and user terminal
WO2019071380A1 (en)Sleep control method, terminal, and computer readable medium
CN104516570B (en)Flip-type electronic device and calibration method thereof
WO2020103027A1 (en)Network power consumption adjustment method, network power consumption adjustment device, and mobile terminal
WO2019051738A1 (en)List switching method, and terminal
CN116204073A (en)Touch control method, touch control device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information
CB02Change of applicant information

Address after:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before:523841 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20190719


[8]ページ先頭

©2009-2025 Movatter.jp