CN109343066B - Control method and device of proximity sensor, storage medium and mobile terminal - Google Patents
Control method and device of proximity sensor, storage medium and mobile terminal Download PDFInfo
- Publication number
- CN109343066B CN109343066B CN201811089882.8A CN201811089882A CN109343066B CN 109343066 B CN109343066 B CN 109343066B CN 201811089882 A CN201811089882 A CN 201811089882A CN 109343066 B CN109343066 B CN 109343066B
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- threshold value
- proximity sensor
- value
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000013459 approach Methods 0.000 claims abstract description 5
- 230000001960 triggered effect Effects 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 9
- 230000003287 optical effect Effects 0.000 description 9
- 230000036544 posture Effects 0.000 description 9
- 230000002093 peripheral effect Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 5
- 238000004519 manufacturing process Methods 0.000 description 5
- 230000001133 acceleration Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000033001 locomotion Effects 0.000 description 4
- 238000005259 measurement Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 206010039792 Seborrhoea Diseases 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000037312 oily skin Effects 0.000 description 1
- 230000036548 skin texture Effects 0.000 description 1
- 230000036555 skin type Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S17/00—Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
- G01S17/02—Systems using the reflection of electromagnetic waves other than radio waves
- G01S17/06—Systems determining position data of a target
- G01S17/08—Systems determining position data of a target for measuring distance only
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0346—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/12—Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Electromagnetism (AREA)
- Remote Sensing (AREA)
- Radar, Positioning & Navigation (AREA)
- Environmental & Geological Engineering (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
Abstract
本申请实施例公开了接近传感器的控制方法、装置、存储介质及移动终端。该方法包括:获取移动终端的姿态信息;根据所述姿态信息确定接近传感器的对应的目标门限值;控制所述接近传感器基于所述目标门限值进行接近状态或远离状态的判定。本申请实施例通过采用上述技术方案,可以根据移动终端的姿态信息来适应性确定接近传感器的用于判定接近状态或远离状态的门限值,从而能够合理设定门限值,保证接近传感器的判定准确度。
The embodiments of the present application disclose a control method, device, storage medium and mobile terminal for a proximity sensor. The method includes: obtaining the posture information of the mobile terminal; determining the corresponding target threshold value of the proximity sensor according to the posture information; and controlling the proximity sensor to determine the approach state or the distance state based on the target threshold value. By adopting the above technical solution, the embodiments of the present application can adaptively determine the threshold value of the proximity sensor for determining the approach state or the distance state according to the posture information of the mobile terminal, so that the threshold value can be reasonably set to ensure the determination accuracy of the proximity sensor.
Description
技术领域technical field
本申请实施例涉及移动终端技术领域,尤其涉及接近传感器的控制方法、装置、存储介质及移动终端。The embodiments of the present application relate to the technical field of mobile terminals, and in particular, to a control method, device, storage medium, and mobile terminal for a proximity sensor.
背景技术Background technique
目前,接近传感器已成为移动终端的标准配置,利用接近传感器可实现移动终端中的各种功能。At present, the proximity sensor has become the standard configuration of the mobile terminal, and various functions in the mobile terminal can be realized by using the proximity sensor.
移动终端中配置的最常见的接近传感器包括光接近传感器。光接近传感器向外发射光线,然后通过测量物体反射回来的光线强度来判断物体与传感器之间的距离。The most common proximity sensors deployed in mobile terminals include optical proximity sensors. The light proximity sensor emits light outward, and then determines the distance between the object and the sensor by measuring the intensity of the light reflected back by the object.
然而,环境中包含的光线会对光接近传感器的接近值造成一定影响,导致光接近传感器的工作状态容易发生异常,需要改进。However, the light contained in the environment will have a certain influence on the proximity value of the optical proximity sensor, resulting in an abnormal working state of the optical proximity sensor, which needs to be improved.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种接近传感器的控制方法、装置、存储介质及移动终端,可以优化移动终端中接近传感器的控制方案。Embodiments of the present application provide a method, device, storage medium, and mobile terminal for controlling a proximity sensor, which can optimize a control solution for a proximity sensor in a mobile terminal.
第一方面,本申请实施例提供了一种接近传感器的控制方法,包括:In a first aspect, an embodiment of the present application provides a method for controlling a proximity sensor, including:
获取移动终端的姿态信息;Obtain the attitude information of the mobile terminal;
根据所述姿态信息确定接近传感器的对应的目标门限值;Determine the corresponding target threshold value of the proximity sensor according to the attitude information;
控制所述接近传感器基于所述目标门限值进行接近状态或远离状态的判定。The proximity sensor is controlled to determine the proximity state or the distance state based on the target threshold value.
第二方面,本申请实施例提供了一种接近传感器的控制装置,包括:In a second aspect, an embodiment of the present application provides a control device for a proximity sensor, including:
姿态信息获取模块,用于获取移动终端的姿态信息;an attitude information acquisition module, used to acquire attitude information of the mobile terminal;
目标门限值确定模块,用于根据所述姿态信息确定接近传感器的对应的目标门限值;a target threshold value determination module, configured to determine the corresponding target threshold value of the proximity sensor according to the attitude information;
接近传感器控制模块,用于控制所述接近传感器基于所述目标门限值进行接近状态或远离状态的判定。The proximity sensor control module is configured to control the proximity sensor to determine the proximity state or the distance state based on the target threshold value.
第三方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请实施例所述的接近传感器的控制方法。In a third aspect, embodiments of the present application provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the method for controlling a proximity sensor according to the embodiments of the present application.
第四方面,本申请实施例提供了一种移动终端,包括存储器,处理器及存储在存储器上并可在处理器运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例所述的接近传感器的控制方法。In a fourth aspect, an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executed by the processor, and the processor executes the computer program to achieve the same implementation as the present application The control method of the proximity sensor described in the example.
本申请实施例中提供的接近传感器的控制方案,获取移动终端的姿态信息,根据姿态信息确定接近传感器的对应的目标门限值,控制接近传感器基于目标门限值进行接近状态或远离状态的判定。通过采用上述技术方案,可以根据移动终端的姿态信息来适应性确定接近传感器的用于判定接近状态或远离状态的门限值,从而能够合理设定门限值,保证接近传感器的判定准确度。The control scheme of the proximity sensor provided in the embodiment of the present application acquires the attitude information of the mobile terminal, determines the corresponding target threshold value of the proximity sensor according to the attitude information, and controls the proximity sensor to determine the proximity state or the distance state based on the target threshold value . By adopting the above technical solution, the threshold value of the proximity sensor for judging the approaching state or the distant state can be adaptively determined according to the attitude information of the mobile terminal, so that the threshold value can be reasonably set and the determination accuracy of the proximity sensor can be ensured.
附图说明Description of drawings
图1为本申请实施例提供的一种接近传感器的控制方法的流程示意图;1 is a schematic flowchart of a method for controlling a proximity sensor provided by an embodiment of the present application;
图2为本申请实施例提供的另一种接近传感器的控制方法的流程示意图;2 is a schematic flowchart of another method for controlling a proximity sensor provided by an embodiment of the present application;
图3为本申请实施例提供的又一种接近传感器的控制方法的流程示意图;3 is a schematic flowchart of another method for controlling a proximity sensor provided by an embodiment of the present application;
图4为本申请实施例提供的一种接近传感器的控制装置的结构框图;4 is a structural block diagram of a control device for a proximity sensor provided by an embodiment of the present application;
图5为本申请实施例提供的一种移动终端的结构示意图;FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application;
图6为本申请实施例提供的又一种移动终端的结构示意图。FIG. 6 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图并通过具体实施方式来进一步说明本申请的技术方案。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The technical solutions of the present application will be further described below with reference to the accompanying drawings and through specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all the structures related to the present application.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in greater detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowchart depicts the steps as a sequential process, many of the steps may be performed in parallel, concurrently, or concurrently. Furthermore, the order of the steps can be rearranged. The process may be terminated when its operation is complete, but may also have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, subroutines, and the like.
为了便于理解本申请实施例的技术方案,下面先对接近传感器进行相关介绍。目前,接近传感器已广泛应用于各种移动终端中,并利用接近传感器实现各种功能,例如,通话时防止因脸部触碰屏幕引起误操作、自动调整背光以及触摸屏熄屏手势识别等等。常见的接近传感器包括光学接近传感器(又称光接近传感器或接近光传感器),光接近传感器向外发射光线,然后通过测量物体反射回来的光线强度来判断物体与传感器之间的距离。其中,红外光接近传感器(又称红外接近传感器)是应用最广泛的光接近传感器之一。In order to facilitate the understanding of the technical solutions of the embodiments of the present application, a related introduction to the proximity sensor is given below. At present, proximity sensors have been widely used in various mobile terminals, and use proximity sensors to achieve various functions, such as preventing misoperation caused by the face touching the screen during a call, automatically adjusting the backlight, and recognizing the gesture of turning off the touch screen, etc. Common proximity sensors include optical proximity sensors (also known as optical proximity sensors or proximity light sensors), which emit light outward, and then determine the distance between the object and the sensor by measuring the intensity of the light reflected back by the object. Among them, the infrared optical proximity sensor (also known as the infrared proximity sensor) is one of the most widely used optical proximity sensors.
本申请实施例中,对光接近传感器的具体类型不做限定,为了便于说明,以下将以红外接近传感器为例进行说明,并在接下来的实施例中简称接近传感器。红外接近传感器向外发射红外线,然后通过测量物体反射回来的红外线强度来判断物体与传感器之间的距离,接收到的红外光强度越强,则表示其与物体之间的距离越小。在一定测量范围内,红外接近传感器会将测量到的红外线强度转化为与其呈正比例关系的测量值,可将该测量值称为接近(proximity)值。一般的,接近值可为红外接近传感器中的模数转换器(Analog-to-Digital Converter,ADC)的输出值,简称ADC值或AD值。红外接近传感器得出的接近值越大,表示其与物体之间的距离越小。In the embodiment of the present application, the specific type of the optical proximity sensor is not limited. For the convenience of description, the infrared proximity sensor will be used as an example for description below, and it will be referred to as a proximity sensor in the following embodiments. The infrared proximity sensor emits infrared rays outward, and then judges the distance between the object and the sensor by measuring the infrared intensity reflected back by the object. The stronger the received infrared light intensity, the smaller the distance between it and the object. Within a certain measurement range, the infrared proximity sensor will convert the measured infrared intensity into a measurement value that is proportional to the measurement value, which may be called a proximity value. Generally, the proximity value may be an output value of an analog-to-digital converter (Analog-to-Digital Converter, ADC) in the infrared proximity sensor, referred to as an ADC value or an AD value for short. The larger the proximity value from the infrared proximity sensor, the smaller the distance between it and the object.
为了让红外接近传感器检测物体的接近或远离,一般会预先设置用于判定接近状态或远离状态的判定门限值。判定门限值可包括接近门限值,也可包括接近门限值和远离门限值。示例性的,若判定门限值仅包括接近门限值,当红外接近传感器的当前接近值大于接近门限值时,可判定为接近状态;当红外接近传感器的当前接近值小于接近门限值时,可判定为远离状态。示例性的,若判定门限值包括接近门限值和远离门限值,当红外接近传感器的当前接近值大于接近门限值时,可判定为接近状态;当红外接近传感器的当前接近值小于远离门限值时,可判定为远离状态;当红外接近传感器的当前接近值处于远离门限值和接近门限值之间时,保持上一次判定时的状态不变。一般的,受环境等因素影响,在用户的使用状态基本不变的情况下,红外接近传感器的接近值也可能会在小范围内波动,为了避免在接近状态和远离状态之间发生频繁切换,一般判定门限值既包括接近门限值,又包括远离门限值。在判定出接近或远离状态后,可控制移动终端执行相应的操作,例如,在通话过程中,接近状态下熄灭屏幕,远离状态下点亮屏幕。In order for the infrared proximity sensor to detect the approaching or moving away of an object, a determination threshold value for determining the approaching state or the moving away state is generally set in advance. The determination threshold value may include a near threshold value, and may also include a near threshold value and a far away threshold value. Exemplarily, if it is determined that the threshold value only includes the proximity threshold value, when the current proximity value of the infrared proximity sensor is greater than the proximity threshold value, it can be determined as a proximity state; when the current proximity value of the infrared proximity sensor is less than the proximity threshold value , it can be judged to be in the far away state. Exemplarily, if the determination threshold value includes a proximity threshold value and a distance threshold value, when the current proximity value of the infrared proximity sensor is greater than the proximity threshold value, it can be determined as a proximity state; when the current proximity value of the infrared proximity sensor is less than When it is far away from the threshold value, it can be determined as the far away state; when the current proximity value of the infrared proximity sensor is between the far away threshold value and the near threshold value, the state at the last determination is kept unchanged. Generally, affected by the environment and other factors, the proximity value of the infrared proximity sensor may also fluctuate within a small range when the user's usage status is basically unchanged. Generally, the judgment threshold value includes both approaching the threshold value and far from the threshold value. After determining the approaching or away state, the mobile terminal can be controlled to perform corresponding operations, for example, during a call, the screen is turned off in the approaching state, and the screen is turned on in the away state.
然而,环境中包含的红外光线会对红外接近传感器的接近值造成一定影响,因为红外接近传感器在向外发射红外线后,所接收到的红外光不仅包括物体反射回来的红外光线,还包括环境中存在的红外光线,所以得到的接近值比实际数值要大。因此,如何合理设置接近传感器的判定门限值成为一个技术难题。However, the infrared light contained in the environment will have a certain influence on the proximity value of the infrared proximity sensor, because after the infrared proximity sensor emits infrared light, the infrared light received not only includes the infrared light reflected back by the object, but also includes the infrared light in the environment. Infrared light is present, so the approximate value obtained is larger than the actual value. Therefore, how to reasonably set the judgment threshold value of the proximity sensor becomes a technical problem.
图1为本申请实施例提供的一种接近传感器的控制方法的流程示意图,该方法可以由接近传感器的控制装置执行,其中该装置可由软件和/或硬件实现,一般可集成在移动终端中。如图1所示,该方法包括:1 is a schematic flowchart of a method for controlling a proximity sensor provided by an embodiment of the present application. The method may be executed by a control device for a proximity sensor, where the device may be implemented by software and/or hardware, and may generally be integrated in a mobile terminal. As shown in Figure 1, the method includes:
步骤101、获取移动终端的姿态信息。Step 101: Obtain attitude information of the mobile terminal.
示例性的,本申请实施例中的移动终端可包括手机及平板电脑等配有接近传感器的移动设备。Exemplarily, the mobile terminal in this embodiment of the present application may include mobile devices such as mobile phones and tablet computers equipped with proximity sensors.
一般的,为了顾及用户握持移动终端的习惯,会将接近传感器设置在移动终端正面的顶部,如前置摄像头附近,当然,也可能设置在升降式摄像头(如潜望式摄像头)的附近。Generally, in order to take into account the user's habit of holding the mobile terminal, the proximity sensor is arranged on the top of the front of the mobile terminal, for example, near the front camera, and of course, it may also be arranged near the lift camera (for example, the periscope camera).
在用户的日常使用过程中,环境中的光源,如灯光或太阳光等,一般位于用户的头部上方,所以,当移动终端的姿态不同时,接收到的环境光情况可能存在差异。例如,当移动终端处于平置状态时,接收到的环境光可能较多;而当移动终端处于竖立状态时,接收到的环境光可能较少。因此,当移动终端处于不同姿态情况下,环境光线对接近传感器的影响可能存在差异。本申请实施例中,获取移动终端的姿态信息,以便于后续步骤中更加合理地确定接近传感器的用于判定接近状态或远离状态的门限值。In the user's daily use process, the light source in the environment, such as light or sunlight, is generally located above the user's head. Therefore, when the posture of the mobile terminal is different, the received ambient light may be different. For example, when the mobile terminal is in a horizontal state, more ambient light may be received; and when the mobile terminal is in an upright state, less ambient light may be received. Therefore, when the mobile terminal is in different postures, the influence of ambient light on the proximity sensor may be different. In this embodiment of the present application, the attitude information of the mobile terminal is acquired, so as to more reasonably determine the threshold value of the proximity sensor for determining the approaching state or the distant state in the subsequent steps.
示例性的,移动终端中可能会设置有许多运动传感器,如加速度传感器、陀螺仪传感器以及磁力计等等。本申请实施例中,可通过移动终端中集成的或外置的一种或多种运动传感器来获取移动终端的姿态信息。可选的,姿态信息可包括移动终端的朝向、移动终端正面相对于参考面的夹角、移动终端的各边相对于参考坐标系各坐标轴的夹角,以及移动终端处于哪种预设分类的姿态类别等等。Exemplarily, a mobile terminal may be provided with many motion sensors, such as an acceleration sensor, a gyroscope sensor, a magnetometer, and the like. In this embodiment of the present application, the posture information of the mobile terminal may be acquired through one or more motion sensors integrated in or external to the mobile terminal. Optionally, the attitude information may include the orientation of the mobile terminal, the angle of the front of the mobile terminal relative to the reference plane, the angle of each side of the mobile terminal relative to each coordinate axis of the reference coordinate system, and which preset category the mobile terminal is in. The pose category and so on.
可选的,移动终端可以实时获取移动终端的姿态信息,也可定时获取移动终端的姿态信息,还可在接收到姿态信息获取指令时获取移动终端的姿态信息。例如,在检测到预设姿态获取事件被触发时,获取移动终端的姿态信息。预设姿态获取事件被触发的条件本申请实施例不做限定。例如,在检测到当前环境满足预设要求时,触发预设姿态获取事件;又如,在检测到接近传感器进入工作状态时,触发预设姿态获取事件;再如,在检测到听筒收听事件被触发时,触发预设姿态获取事件等等。Optionally, the mobile terminal may acquire the attitude information of the mobile terminal in real time, may also acquire the attitude information of the mobile terminal periodically, and may also acquire the attitude information of the mobile terminal when receiving an instruction for acquiring attitude information. For example, when it is detected that a preset gesture acquisition event is triggered, the gesture information of the mobile terminal is acquired. The conditions for triggering the preset gesture acquisition event are not limited in this embodiment of the present application. For example, when it is detected that the current environment meets the preset requirements, a preset posture acquisition event is triggered; for another example, when it is detected that the proximity sensor enters a working state, a preset posture acquisition event is triggered; When triggered, trigger a preset pose acquisition event and so on.
步骤102、根据所述姿态信息确定接近传感器的对应的目标门限值。Step 102: Determine the corresponding target threshold value of the proximity sensor according to the attitude information.
示例性的,可预先设置不同姿态信息分别对应的门限值,得到姿态与门限值的对应关系,存储于移动终端中,待执行本步骤时,读取该对应关系,并根据当前的姿态信息查找对应关系中相应的门限值作为目标门限值。为了简化对应关系,可对姿态信息进行分类,每类姿态信息分别对应一个门限值。Exemplarily, the threshold values corresponding to different attitude information can be preset, and the corresponding relationship between the attitude and the threshold value can be obtained and stored in the mobile terminal. The corresponding threshold value in the information search correspondence is taken as the target threshold value. In order to simplify the corresponding relationship, the attitude information can be classified, and each type of attitude information corresponds to a threshold value.
可选的,除了将姿态信息作为确定接近传感器的目标门限值的一个参考因素,还可以有其他参考因素用于确定目标门限值。例如,还可参考当前的环境情况,如当前环境的光强度值。示例性的,本步骤可包括根据所述姿态信息和当前环境的光强度值(为便于与接下来的其他光强度值进行区分,此处可称为第三光强度值)确定接近传感器的对应的目标门限值。这样设置的好处在于,能够更加合理地确定目标门限值。本申请实施例中对如何同时根据这两种参考因素确定目标门限值不做限定。示例性的,可以将光强度值划分多个区间,每个光强度区间分别对应一组姿态与门限值的对应关系。获取当前环境的第三光强度值,根据第三光强度值所属的光强度区间确定对应的姿态与门限值对应关系,再根据当前的姿态信息查询所确定的姿态与门限值对应关系,得到目标门限值。Optionally, in addition to using the attitude information as a reference factor for determining the target threshold value of the proximity sensor, other reference factors may also be used for determining the target threshold value. For example, it is also possible to refer to the current environmental conditions, such as the light intensity value of the current environment. Exemplarily, this step may include determining the correspondence of the proximity sensor according to the posture information and the light intensity value of the current environment (for the convenience of distinguishing from other light intensity values next, it may be referred to as a third light intensity value here). target threshold value. The advantage of this setting is that the target threshold value can be determined more reasonably. In the embodiment of the present application, how to determine the target threshold value according to the two reference factors at the same time is not limited. Exemplarily, the light intensity value may be divided into multiple intervals, and each light intensity interval corresponds to a set of correspondences between attitudes and threshold values. Obtain the third light intensity value of the current environment, determine the correspondence between the corresponding attitude and the threshold value according to the light intensity interval to which the third light intensity value belongs, and then query the determined correspondence between the attitude and the threshold value according to the current attitude information, Get the target threshold value.
步骤103、控制所述接近传感器基于所述目标门限值进行接近状态或远离状态的判定。Step 103: Control the proximity sensor to determine an approaching state or a distant state based on the target threshold value.
示例性的,根据姿态信息确定的目标门限值更加符合当前的测试场景,充分考虑了不同姿态下环境光线对接近值的影响,使得接近传感器能够更加准确地判定出接近状态或远离状态,防止误判情况发生。Exemplarily, the target threshold value determined according to the attitude information is more in line with the current test scene, and the influence of ambient light on the approach value under different attitudes is fully considered, so that the proximity sensor can more accurately determine the approaching state or the away state, preventing Misjudgment occurs.
在判定出接近或远离状态后,可控制移动终端执行相应的操作。例如,在通话过程中,接近状态下熄灭屏幕,远离状态下点亮屏幕。After determining the approaching or moving away state, the mobile terminal can be controlled to perform corresponding operations. For example, during a call, the screen is turned off in the approaching state, and the screen is turned on in the far-away state.
本申请实施例中提供的接近传感器的控制方法,获取移动终端的姿态信息,根据姿态信息确定接近传感器的对应的目标门限值,控制接近传感器基于目标门限值进行接近状态或远离状态的判定。通过采用上述技术方案,可以根据移动终端的姿态信息来适应性确定接近传感器的用于判定接近状态或远离状态的门限值,从而能够合理设定门限值,保证接近传感器的判定准确度。In the control method of the proximity sensor provided in the embodiment of the present application, the attitude information of the mobile terminal is obtained, the corresponding target threshold value of the proximity sensor is determined according to the attitude information, and the proximity sensor is controlled to determine the proximity state or the distance state based on the target threshold value. . By adopting the above technical solution, the threshold value of the proximity sensor for judging the approaching state or the distant state can be adaptively determined according to the attitude information of the mobile terminal, so that the threshold value can be reasonably set and the determination accuracy of the proximity sensor can be ensured.
在一些实施例中,在所述获取移动终端的姿态信息之前,包括:获取当前环境的第一光强度值;当所述第一光强度值大于第一预设光强度阈值时,触发获取移动终端的姿态信息。一般的,当移动终端周围环境光线不强时,对接近传感器的接近值影响较小,而在获取姿态信息时,运动传感器的工作可能产生一定的功耗,因此,可以在检测到当前环境的第一光强度值大于第一预设光强度阈值时,再触发获取移动终端的姿态信息,节省移动终端功耗。In some embodiments, before the acquiring the gesture information of the mobile terminal, the method includes: acquiring a first light intensity value of the current environment; when the first light intensity value is greater than a first preset light intensity threshold, triggering acquisition of movement Attitude information of the terminal. Generally, when the ambient light around the mobile terminal is not strong, the influence on the proximity value of the proximity sensor is small, and when acquiring attitude information, the operation of the motion sensor may generate a certain amount of power consumption. When the first light intensity value is greater than the first preset light intensity threshold, the acquisition of the attitude information of the mobile terminal is triggered again, so as to save the power consumption of the mobile terminal.
在一些实施例中,所述根据所述姿态信息确定接近传感器的对应的目标门限值,包括:在根据所述姿态信息确定所述移动终端的正面相对于水平面的夹角小于第一预设角度阈值时,确定接近传感器的对应的目标门限值为第一目标门限值;在根据所述姿态信息确定所述移动终端的正面相对于水平面的夹角大于第二预设角度阈值时,确定接近传感器的对应的目标门限值为第二目标门限值;其中,所述第一预设角度阈值小于所述第二预设角度阈值,所述第一目标门限值大于所述第二目标门限值。这样设置的好处在于,能够合理设置移动终端在平置状态和竖立状态下的接近传感器的门限值,防止发生误判。当移动终端正面相对于水平面的夹角较小时,说明移动终端基本处于平置状态,用户可能手持移动终端在查看屏幕内容,此处的平置状态并非绝对的水平,因为用户一般在握持移动终端时,为了便于观看屏幕,会有小幅度的倾斜,此时接近传感器对环境光接收量较大,容易受到环境光影响,因此,可将对应的目标门限值设置的大一些,防止误将远离状态判定为接近状态;而当移动终端相对于水平面的夹角较大时,说明移动终端基本处于竖立状态,用户可能竖起移动终端接听电话,此处的竖立状态并非绝对的与水平面垂直,因为用户一般将移动终端放在耳边时,也会有小幅度的倾斜,此时接近传感器对环境光接收量较小,不容易受到环境光影响,因此,可将对应的目标门限值设置的小一些,防止误将接近状态判定为远离状态。本申请实施例中,对第一预设角度阈值和第二预设角度阈值不做具体限定,例如可以分别为40度和70度。本申请实施例中,对第一目标门限值和第二目标门限值也不做具体限定,可根据接近传感器的具体配置以及其他具体情况设定。In some embodiments, the determining the corresponding target threshold value of the proximity sensor according to the attitude information includes: determining, according to the attitude information, that the angle between the front of the mobile terminal and the horizontal plane is smaller than a first preset When the angle threshold is determined, the corresponding target threshold value of the proximity sensor is determined as the first target threshold value; when it is determined according to the attitude information that the angle between the front of the mobile terminal and the horizontal plane is greater than the second preset angle threshold, Determine the corresponding target threshold value of the proximity sensor as the second target threshold value; wherein, the first preset angle threshold value is smaller than the second preset angle threshold value, and the first target threshold value is greater than the first target threshold value Two target thresholds. The advantage of this setting is that the threshold value of the proximity sensor of the mobile terminal in the horizontal state and the erect state can be reasonably set, so as to prevent misjudgment from occurring. When the angle between the front of the mobile terminal and the horizontal plane is small, it means that the mobile terminal is basically in a flat state, and the user may hold the mobile terminal to view the screen content. The flat state here is not absolutely horizontal, because the user is generally holding the mobile terminal. At this time, in order to facilitate the viewing of the screen, there will be a slight inclination. At this time, the proximity sensor receives a large amount of ambient light and is easily affected by ambient light. Therefore, the corresponding target threshold value can be set larger to prevent misunderstanding The far-away state is determined as the approaching state; and when the included angle of the mobile terminal relative to the horizontal plane is large, it means that the mobile terminal is basically in an erected state, and the user may erect the mobile terminal to answer the call. The erected state here is not absolutely perpendicular to the horizontal plane. Because the user generally puts the mobile terminal close to the ear, there will also be a slight tilt. At this time, the proximity sensor receives a small amount of ambient light and is not easily affected by the ambient light. Therefore, the corresponding target threshold value can be set. is smaller, to prevent misjudging the approaching state as the far-away state. In this embodiment of the present application, the first preset angle threshold and the second preset angle threshold are not specifically limited, for example, they may be 40 degrees and 70 degrees, respectively. In this embodiment of the present application, the first target threshold value and the second target threshold value are not specifically limited, and may be set according to the specific configuration of the proximity sensor and other specific conditions.
示例性的,对于强光环境,如阳光充足的环境下,红外线强度很高,容易导致红外接近传感器器件工作状态异常,接近值可能会频繁发生跳变,如在短时间内从一个比较小的值跳变到一个很大的值,再跳变回较小的值,进而导致对外界物体的接近状态的误判,可能发生屏幕频繁在熄灭和点亮之间切换的现象。假设用户在户外的阳光下进行通话的过程中,想要在屏幕上进行其他操作,如输入分机号、查看通讯录或查看地图等其他信息时,屏幕会远离用户头部,若红外接近传感器受到阳光中的红外线影响而使得接近值发生频繁的跳变,那么屏幕就会频繁在熄灭和点亮之间切换,严重影响用户在屏幕上的正常操作。为了避免上述问题发生,在强光环境下,如当所述第一光强度值大于第一预设光强度阈值时,将第一目标门限值设置的大一些,例如接近量程范围的最大边界,假设接近值量程范围的最大边界值为1023,第一目标门限值可以是接近门限值为900,远离门限值为850。Exemplarily, for a strong light environment, such as a sunny environment, the infrared intensity is very high, which may easily lead to abnormal working conditions of the infrared proximity sensor device, and the proximity value may jump frequently, such as from a relatively small one in a short time. The value jumps to a large value, and then jumps back to a smaller value, which in turn leads to a misjudgment of the approaching state of an external object, and the screen may frequently switch between off and on. Assuming that the user wants to perform other operations on the screen during the call in the outdoor sunshine, such as entering an extension number, viewing the address book or viewing the map and other information, the screen will be away from the user's head. Due to the influence of infrared rays in sunlight, the proximity value frequently jumps, so the screen will frequently switch between off and on, which seriously affects the normal operation of the user on the screen. In order to avoid the above problems, in a strong light environment, for example, when the first light intensity value is greater than the first preset light intensity threshold value, the first target threshold value is set to be larger, for example, close to the maximum boundary of the range. , assuming that the maximum boundary value of the proximity value range is 1023, the first target threshold value may be 900 for the proximity threshold and 850 for the remote threshold.
示例性的,由于第二目标门限值用于在环境光影响较小的情况,因此,可以将非强光环境下(如500lux)未遮挡时测量得到的最小接近值确定为第二目标门限值。第二目标门限值可以由移动终端出厂前默认设置,也可以由移动终端出厂后自动确定。例如,移动终端在每次开机时,检测当前环境的第四光强度值,若第四光强度值小于第四预设光强度阈值(如500lux)时,多次测量接近值,将所测量到的最小的接近值确定为第二目标门限值。可选的,移动终端出厂前一般会在产线进行校准,得到非强光环境下的校准接近值,若上述测量到的最小的接近值小于校准接近值,则可将校准接近值作为第二目标门限值。例如,第二目标门限值可以是接近门限值为450,远离门限值为350。Exemplarily, since the second target threshold value is used in the case where the influence of ambient light is small, the minimum proximity value measured when it is not blocked in a non-strong light environment (such as 500 lux) can be determined as the second target threshold. limit. The second target threshold value may be set by default before the mobile terminal leaves the factory, or may be automatically determined after the mobile terminal leaves the factory. For example, each time the mobile terminal is powered on, it detects the fourth light intensity value of the current environment, and if the fourth light intensity value is smaller than the fourth preset light intensity threshold (eg, 500 lux), it measures the proximity value multiple times, and the measured The smallest approach value of is determined as the second target threshold value. Optionally, the mobile terminal will generally be calibrated on the production line before leaving the factory to obtain the calibration proximity value in a non-strong light environment. If the minimum proximity value measured above is smaller than the calibration proximity value, the calibration proximity value can be used as the second value. target threshold value. For example, the second target threshold value may be 450 for the approaching threshold and 350 for the farthest threshold.
在一些实施例中,所述获取移动终端的姿态信息,包括:检测到听筒收听事件被触发时,获取移动终端的姿态信息。这样设置的好处在于,在检测到听筒收听事件被触发时,说明用户可能会有将移动终端放置到耳边的动作,需要对移动终端的姿态信息进行识别,以便及时确定对应的目标门限值。In some embodiments, the acquiring the gesture information of the mobile terminal includes: acquiring the gesture information of the mobile terminal when detecting that the handset listening event is triggered. The advantage of this setting is that when it is detected that the earpiece listening event is triggered, it means that the user may have the action of placing the mobile terminal to the ear, and the gesture information of the mobile terminal needs to be identified, so as to determine the corresponding target threshold value in time .
在一些实施例中,所述确定接近传感器的对应的目标门限值为第二目标门限值,包括:确定接近传感器的对应的目标门限值为第一预设门限值和预设叠加值的和,其中,所述预设叠加值与人类皮肤产生的油污对接近传感器的影响相关。这样设置的好处在于,根据预设门限值与油污影响对应的预设叠加值的和确定第二目标门限值,可以充分考虑用户将移动终端放到耳边时,脸部或耳部皮肤产生的油污对接近传感器的影响,进而更加准确的确定目标门限值。其中,预设叠加值可称为油污值,例如,可以采集多个移动终端在不同油污情况下,接近值相对于没有油污时的变化量,将最大的变化量确定为油污值。例如,油污值可以是60。第一预设门限值可以由移动终端出厂前默认设置,也可以由移动终端出厂后自动确定。例如,移动终端在每次开机时,获取当前环境的第二光强度值;当所述第二光强度值小于第二预设光强度阈值时,获取所述接近传感器的当前接近值作为所述第一预设门限值,其中,所述第二预设光强度阈值小于或等于所述第一预设光强度阈值。可选的,获取所述接近传感器的当前接近值作为所述第一预设门限值,可包括:多次获取所述接近传感器的当前接近值,将获取到的最小值作为所述第一预设门限值。可选的,移动终端出厂前一般会在产线进行校准,得到非强光环境下的校准接近值,若上述获取的最小的当前接近值小于校准接近值,则可将校准接近值作为第一预设门限值。In some embodiments, the determining that the corresponding target threshold value of the proximity sensor is the second target threshold value includes: determining the corresponding target threshold value of the proximity sensor as the first preset threshold value and the preset superposition The sum of the values, wherein the preset superimposed value is related to the influence of oil pollution produced by human skin on the proximity sensor. The advantage of this setting is that the second target threshold value is determined according to the sum of the preset threshold value and the preset superposition value corresponding to the influence of oil pollution, which can fully consider the skin on the face or ear when the user puts the mobile terminal to the ear. The influence of the generated oil pollution on the proximity sensor, so as to determine the target threshold value more accurately. The preset superimposed value may be referred to as the oil pollution value. For example, the variation of the proximity value of multiple mobile terminals under different oil pollution conditions relative to that without oil pollution may be collected, and the largest variation may be determined as the oil pollution value. For example, the oil stain value may be 60. The first preset threshold value may be set by default before the mobile terminal leaves the factory, or may be automatically determined after the mobile terminal leaves the factory. For example, each time the mobile terminal is powered on, the second light intensity value of the current environment is obtained; when the second light intensity value is smaller than the second preset light intensity threshold, the current proximity value of the proximity sensor is obtained as the A first preset threshold, wherein the second preset light intensity threshold is less than or equal to the first preset light intensity threshold. Optionally, acquiring the current proximity value of the proximity sensor as the first preset threshold value may include: acquiring the current proximity value of the proximity sensor multiple times, and using the acquired minimum value as the first preset threshold value. Preset threshold value. Optionally, the mobile terminal will generally be calibrated on the production line before leaving the factory to obtain the calibration proximity value in a non-strong light environment. If the minimum current proximity value obtained above is smaller than the calibration proximity value, the calibration proximity value can be used as the first value. Preset threshold value.
在一些实施例中,还可包括:获取当前用户的属性信息;根据所述属性信息确定相应的预设叠加值。这样设置的好处在于,由于不同用户的皮肤肤质等情况存在差异,出油程度可能不同,因此,油污对接近值的影响可能不相同,可以更加有针对性的确定预设叠加值,进而更加准确地确定第二目标门限值。示例性的,用户的属性信息可包括性别、年龄、职业以及肤质等等。可预先采用大数据方式,分析不同用户属性信息对应的用户的皮肤油污对接近传感器的接近值的影响,进而确定对应的预设叠加值,形成用户属性信息与预设叠加值的对应关系,并存储于移动终端中,或由服务器下发至移动终端中。在移动终端屏幕解锁时,可通过指纹等信息对用户进行身份识别,进而获取当前身份的用户对应的属性信息,并查询上述用户属性信息与预设叠加值的对应关系,得到相应的预设叠加值。进一步的,在不同的天气或不同时间段内,用户皮肤的出油情况也可能不同,例如春夏季或中午等情况下,皮肤容易出油,而秋冬季或早晚,皮肤不容易出油等,又如气温较高时,皮肤容易出油,而气温较低时,皮肤不容易出油等。因此,可结合如天气、季节或时间段进一步确定预设叠加值。例如,获取当前用户的属性信息、当前天气信息以及当前时间段,根据所述属性信息、所述当前天气信息以及所述当前时间段确定相应的预设叠加值。In some embodiments, the method may further include: acquiring attribute information of the current user; and determining a corresponding preset overlay value according to the attribute information. The advantage of this setting is that, due to the differences in the skin texture of different users, the degree of oil production may be different. Therefore, the influence of oil pollution on the proximity value may be different, and the preset superposition value can be determined more targetedly, and furthermore The second target threshold value is accurately determined. Exemplarily, the attribute information of the user may include gender, age, occupation, skin type, and the like. The big data method can be used in advance to analyze the influence of the user's skin oil corresponding to different user attribute information on the proximity value of the proximity sensor, and then determine the corresponding preset superimposed value to form the corresponding relationship between the user attribute information and the preset superimposed value, and Stored in the mobile terminal, or delivered to the mobile terminal by the server. When the screen of the mobile terminal is unlocked, the user can be identified through information such as fingerprints, and then the attribute information corresponding to the user with the current identity can be obtained, and the corresponding relationship between the above-mentioned user attribute information and the preset overlay value can be queried to obtain the corresponding preset overlay value. value. Further, in different weathers or different time periods, the oily situation of the user's skin may also be different. For example, in spring and summer or at noon, the skin is prone to oily skin, while in autumn and winter or in the morning and evening, the skin is not prone to oily production, etc. Another example is that when the temperature is high, the skin is prone to oil, and when the temperature is low, the skin is not easy to oil. Therefore, the preset overlay value may be further determined in combination with, for example, weather, season or time period. For example, attribute information, current weather information, and current time period of the current user are acquired, and a corresponding preset overlay value is determined according to the attribute information, the current weather information, and the current time period.
图2为本申请实施例提供的另一种接近传感器的控制方法的流程示意图,该方法包括如下步骤:FIG. 2 is a schematic flowchart of another method for controlling a proximity sensor provided by an embodiment of the present application, and the method includes the following steps:
步骤201、获取当前环境的第一光强度值。Step 201: Obtain a first light intensity value of the current environment.
示例性的,可以通过环境光传感器对环境光进行检测,将环境光传感器的当前测量值作为当前环境的第一光强度值;还可以通过接近传感器自身的光接收器对环境光进行检测,以红外接近传感器为例,可以以测量到的红外光强度的值作为第一预设光强度。Exemplarily, the ambient light can be detected by the ambient light sensor, and the current measurement value of the ambient light sensor can be used as the first light intensity value of the current environment; the ambient light can also be detected by the light receiver of the proximity sensor itself, to Taking an infrared proximity sensor as an example, the value of the measured infrared light intensity may be used as the first preset light intensity.
步骤202、判断第一光强度值是否大于第一预设光强度阈值,若是,则执行步骤203;否则,重复执行步骤202。
示例性的,可以根据第一光强度值的获取方式确定相应的第一预设光强度阈值,不同的接近传感器由于材料、制备工艺以及量程等差异,对应的第一预设光强度阈值也可能不同。示例性的,一般的,当环境光强度值大于3000lux(勒克斯)时,对接近值的影响较大,可认定为强光环境,可将与3000lux设定为第一预设光强度阈值。Exemplarily, the corresponding first preset light intensity threshold may be determined according to the acquisition method of the first light intensity value, and the corresponding first preset light intensity threshold may also be different for different proximity sensors due to differences in materials, manufacturing processes, and ranges. different. Exemplarily, generally, when the ambient light intensity value is greater than 3000 lux (lux), the influence on the proximity value is greater, and it can be regarded as a strong light environment, and 3000 lux can be set as the first preset light intensity threshold.
步骤203、检测听筒收听事件是否被触发,若是,则执行步骤204;否则,重复执行步骤203。Step 203: Detect whether the earpiece listening event is triggered, if yes, execute
示例性的,检测到来电或者电话呼出时,可触发听筒收听事件;或者,在检测到听筒即将播放声音时,可触发听筒收听事件。Exemplarily, when an incoming call or an outgoing phone call is detected, the earpiece listening event can be triggered; or when it is detected that the earpiece is about to play a sound, the earpiece listening event can be triggered.
步骤204、获取移动终端的姿态信息。Step 204: Acquire attitude information of the mobile terminal.
步骤205、根据姿态信息确定移动终端的正面相对于水平面的夹角。Step 205: Determine the included angle of the front face of the mobile terminal relative to the horizontal plane according to the attitude information.
示例性的,姿态信息可以通过三轴加速度传感器进行获取,根据三轴加速度传感器的输出值计算移动终端的正面相对于水平面的夹角。Exemplarily, the attitude information may be acquired by a triaxial acceleration sensor, and the angle between the front face of the mobile terminal and the horizontal plane is calculated according to the output value of the triaxial acceleration sensor.
步骤206、判断所述夹角是否小于第一预设角度阈值,若是,则执行步骤207;否则,执行步骤208。
示例性的,第一预设角度阈值可以是40度。Exemplarily, the first preset angle threshold may be 40 degrees.
步骤207、确定接近传感器的对应的目标门限值为第一目标门限值,执行步骤211。
示例性的,当移动终端正面与水平夹角小于40度时,说明移动终端基本处于水平状态,用户可能在通话过程中查看屏幕或在屏幕上进行操作,接近传感器的接近值受到强光影响较大,将此时的目标门限值确定为较大的第一目标门限值。Exemplarily, when the included angle between the front of the mobile terminal and the horizontal is less than 40 degrees, it means that the mobile terminal is basically in a horizontal state, the user may view the screen or perform operations on the screen during the call, and the proximity value of the proximity sensor is relatively affected by strong light. is larger, the target threshold value at this time is determined as the larger first target threshold value.
步骤208、判断所述夹角是否大于第二预设角度阈值,若是,则执行步骤209;否则,执行步骤210。
示例性的,第二预设角度阈值可以是70度。Exemplarily, the second preset angle threshold may be 70 degrees.
步骤209、确定接近传感器的对应的目标门限值为第二目标门限值,执行步骤211。
其中,所述第一预设角度阈值小于所述第二预设角度阈值,所述第一目标门限值大于所述第二目标门限值。Wherein, the first preset angle threshold is smaller than the second preset angle threshold, and the first target threshold value is greater than the second target threshold value.
示例性的,当移动终端正面与水平夹角大于70度时,说明移动终端基本处于竖直状态,用户可能将移动终端拿到耳边接听电话,此时即使是强光环境对接近传感器的接近值影响也较小,可将此时的目标门限值确定为较小的第二目标门限值。Exemplarily, when the angle between the front of the mobile terminal and the horizontal is greater than 70 degrees, it means that the mobile terminal is basically in a vertical state, and the user may hold the mobile terminal to the ear to answer the phone, even if the strong light environment is close to the proximity sensor. The influence of the value is also small, and the target threshold value at this time can be determined as the second smaller target threshold value.
步骤210、确定接近传感器的对应的目标门限值为第三目标门限值,执行步骤211。
可选的,第三目标门限值可以与第一目标门限值相同或与第二目标门限值相同,也可以是介于第一目标门限值和第二目标门限值之间的值。当夹角大于或等于40度,而小于或等于70度时,移动终端可能处于被抬起或被放下的过程中,接近状态或远离状态一般不会发生变化,可能不需要判断,因此,此时的目标门限值可以与第一目标门限值相同或与第二目标门限值相同,也可以是介于第一目标门限值和第二目标门限值之间的值,本申请实施例不作具体限定。Optionally, the third target threshold value may be the same as the first target threshold value or the same as the second target threshold value, or may be between the first target threshold value and the second target threshold value. value. When the included angle is greater than or equal to 40 degrees and less than or equal to 70 degrees, the mobile terminal may be in the process of being lifted or lowered, and the approaching state or the moving away state generally does not change, and judgment may not be required. Therefore, this The target threshold value can be the same as the first target threshold value or the same as the second target threshold value, or it can be a value between the first target threshold value and the second target threshold value. Examples are not specifically limited.
步骤211、控制接近传感器基于所述目标门限值进行接近状态或远离状态的判定。Step 211: Control the proximity sensor to determine the proximity state or the distance state based on the target threshold value.
示例性的,当判定为接近状态时,控制移动终端处于黑屏状态;当判定为远离状态时,控制移动终端处于亮屏状态。Exemplarily, when it is determined to be in the approaching state, the mobile terminal is controlled to be in a black screen state; when it is determined to be a far away state, the mobile terminal is controlled to be in a bright screen state.
本申请实施例提供的接近传感器的控制方法,在检测到环境光较强且用户即将通过听筒收听声音时,获取移动终端的姿态信息,根据姿态信息与水平面的夹角确定对应的目标门限值,再控制接近传感器根据该目标门限值进行接近状态或远离状态的判定,能够在节省功耗的前提下,更加合理地确定强光环境下不同姿态对应的目标门限值,准确地判定接近状态和远离状态。In the control method of the proximity sensor provided by the embodiment of the present application, when it is detected that the ambient light is strong and the user is about to listen to the sound through the earpiece, the attitude information of the mobile terminal is obtained, and the corresponding target threshold value is determined according to the angle between the attitude information and the horizontal plane. , and then control the proximity sensor to determine the approaching state or the distant state according to the target threshold value, which can more reasonably determine the target threshold value corresponding to different attitudes in the strong light environment under the premise of saving power consumption, and accurately determine the proximity state. state and away state.
图3为本申请实施例提供的又一种接近传感器的控制方法的流程示意图,如图3所示,该方法包括:FIG. 3 is a schematic flowchart of another method for controlling a proximity sensor provided by an embodiment of the present application. As shown in FIG. 3 , the method includes:
步骤301、在移动终端开机后,若当前环境的光强度值a小于预设光强度阈值A,则获取接近传感器的当前接近值作为预设门限值M。Step 301: After the mobile terminal is powered on, if the light intensity value a of the current environment is less than the preset light intensity threshold value A, obtain the current proximity value of the proximity sensor as the preset threshold value M.
示例性的,当移动终端开机时,基本处于未遮挡状态,若此时环境光强度不高,那么可及时获取当前接近值,作为预设门限值,用于后续与预设叠加值进行叠加。Exemplarily, when the mobile terminal is powered on, it is basically in an unblocked state. If the ambient light intensity is not high at this time, the current proximity value can be obtained in time as a preset threshold value for subsequent superimposition with the preset superimposition value. .
步骤302、获取当前用户的属性信息,并根据属性信息确定相应的预设叠加值N,将M与N的和记为第二目标门限值。Step 302: Acquire attribute information of the current user, and determine a corresponding preset superposition value N according to the attribute information, and record the sum of M and N as the second target threshold value.
其中,N值可用于表示当前用户的脸部或耳部皮肤产生的油污对接近传感器的接近值的影响值。例如,在没有油污干扰的情况下,接近值为400,但在油污干扰下,油污可能会反射回部分光线,所以导致接近值增加,例如可达到460,为了消除油污影响,可以在预设门限值M基础上加上预设叠加值N,来作为竖立状态下的目标门限值。Wherein, the N value can be used to represent the influence value of the oil pollution produced by the skin of the face or ear of the current user on the proximity value of the proximity sensor. For example, in the absence of oil pollution, the proximity value is 400, but under oil pollution, the oil pollution may reflect some light back, so the proximity value increases, for example, it can reach 460. In order to eliminate the influence of oil pollution, you can set the preset door On the basis of the limit value M, a preset superposition value N is added to serve as the target threshold value in the erect state.
步骤303、判断当前环境的光强度值b是否大于预设光强度阈值B,若是,则执行步骤304;否则,重复执行步骤303。Step 303: Determine whether the light intensity value b of the current environment is greater than the preset light intensity threshold value B, and if so, perform
步骤304、检测到听筒收听事件被触发时,获取移动终端的姿态信息。Step 304: When it is detected that the earpiece listening event is triggered, the gesture information of the mobile terminal is acquired.
步骤305、根据所述姿态信息确定移动终端的正面相对于水平面的夹角。Step 305: Determine the included angle of the front face of the mobile terminal relative to the horizontal plane according to the attitude information.
步骤306、判断夹角与第一预设角度阈值以及第二角度阈值的关系,在夹角小于第一预设角度阈值时,执行步骤307;在在夹角大于第二预设角度阈值时,执行步骤308。Step 306: Determine the relationship between the included angle and the first preset angle threshold and the second angle threshold. When the included angle is smaller than the first preset angle threshold, perform
示例性的,当夹角大于或等于第一预设角度阈值,且小于或等于第二预设角度阈值时,可采用接近传感器当前的门限值进行接近状态或远离状态的判定,即不会对当前门限值进行更改。Exemplarily, when the included angle is greater than or equal to the first preset angle threshold value and less than or equal to the second preset angle threshold value, the current threshold value of the proximity sensor can be used to determine the approaching state or the away state, that is, it will not be Make changes to the current threshold value.
步骤307、确定接近传感器的对应的目标门限值为第一目标门限值,执行步骤309。
步骤308、确定接近传感器的对应的目标门限值为第二目标门限值,执行步骤309。
步骤309、控制接近传感器基于目标门限值进行接近状态或远离状态的判定。
本申请实施例提供的接近传感器的控制方法,在移动终端开机时,确定预设门限值,并根据用户属性信息确定受油污影响的预设叠加值,将预设门限值和预设叠加值的和作为移动终端竖立姿态时对应的目标门限值,可以在考虑移动终端姿态对接近值影响的基础上,进一步考虑人体皮肤油污对接近值的影响,进一步合理地确定接近传感器的门限值,准确地判定接近状态和远离状态。In the control method of the proximity sensor provided by the embodiment of the present application, when the mobile terminal is powered on, a preset threshold value is determined, and a preset superimposition value affected by oil pollution is determined according to the user attribute information, and the preset threshold value and the preset value are superimposed. The sum of the values is used as the target threshold value corresponding to the standing posture of the mobile terminal. On the basis of considering the influence of the mobile terminal posture on the proximity value, the influence of human skin oil on the proximity value can be further considered, and the threshold of the proximity sensor can be further reasonably determined. value, and accurately determine the approaching state and the distant state.
图4为本申请实施例提供的一种接近传感器的控制装置的结构框图,该装置可由软件和/或硬件实现,一般集成在移动终端中,可通过执行接近传感器的控制方法来对接近传感器进行控制。如图4所示,该装置包括:FIG. 4 is a structural block diagram of a control device for a proximity sensor provided by an embodiment of the present application. The device can be implemented by software and/or hardware, and is generally integrated in a mobile terminal. The proximity sensor can be controlled by executing a control method for the proximity sensor. control. As shown in Figure 4, the device includes:
姿态信息获取模块401,用于获取移动终端的姿态信息;an attitude
目标门限值确定模块402,用于根据所述姿态信息确定接近传感器的对应的目标门限值;a target threshold
接近传感器控制模块403,用于控制所述接近传感器基于所述目标门限值进行接近状态或远离状态的判定。The proximity
本申请实施例中提供的接近传感器的控制装置,获取移动终端的姿态信息,根据姿态信息确定接近传感器的对应的目标门限值,控制接近传感器基于目标门限值进行接近状态或远离状态的判定。通过采用上述技术方案,可以根据移动终端的姿态信息来适应性确定接近传感器的用于判定接近状态或远离状态的门限值,从而能够合理设定门限值,保证接近传感器的判定准确度。The control device of the proximity sensor provided in the embodiment of the present application acquires the attitude information of the mobile terminal, determines the corresponding target threshold value of the proximity sensor according to the attitude information, and controls the proximity sensor to determine the proximity state or the distance state based on the target threshold value . By adopting the above technical solution, the threshold value of the proximity sensor for judging the approaching state or the distant state can be adaptively determined according to the attitude information of the mobile terminal, so that the threshold value can be reasonably set and the determination accuracy of the proximity sensor can be ensured.
可选的,该装置还包括:Optionally, the device further includes:
第一光强获取模块,用于在所述获取移动终端的姿态信息之前,获取当前环境的第一光强度值;a first light intensity acquisition module, configured to acquire the first light intensity value of the current environment before acquiring the attitude information of the mobile terminal;
姿态获取触发模块,用于在所述第一光强度值大于第一预设光强度阈值时,触发获取移动终端的姿态信息。An attitude acquisition trigger module, configured to trigger acquisition of attitude information of the mobile terminal when the first light intensity value is greater than a first preset light intensity threshold.
可选的,所述根据所述姿态信息确定接近传感器的对应的目标门限值,包括:Optionally, the determining the corresponding target threshold value of the proximity sensor according to the attitude information includes:
在根据所述姿态信息确定所述移动终端的正面相对于水平面的夹角小于第一预设角度阈值时,确定接近传感器的对应的目标门限值为第一目标门限值;When it is determined according to the attitude information that the angle between the front of the mobile terminal and the horizontal plane is smaller than a first preset angle threshold, determining that the corresponding target threshold of the proximity sensor is the first target threshold;
在根据所述姿态信息确定所述移动终端的正面相对于水平面的夹角大于第二预设角度阈值时,确定接近传感器的对应的目标门限值为第二目标门限值;When it is determined according to the attitude information that the angle between the front of the mobile terminal and the horizontal plane is greater than a second preset angle threshold, determining that the corresponding target threshold of the proximity sensor is the second target threshold;
其中,所述第一预设角度阈值小于所述第二预设角度阈值,所述第一目标门限值大于所述第二目标门限值。Wherein, the first preset angle threshold is smaller than the second preset angle threshold, and the first target threshold value is greater than the second target threshold value.
可选的,所述获取移动终端的姿态信息,包括:Optionally, the acquiring the posture information of the mobile terminal includes:
检测到听筒收听事件被触发时,获取移动终端的姿态信息。When it is detected that the handset listening event is triggered, the gesture information of the mobile terminal is acquired.
可选的,所述确定接近传感器的对应的目标门限值为第二目标门限值,包括:Optionally, the determining that the corresponding target threshold value of the proximity sensor is the second target threshold value, including:
确定接近传感器的对应的目标门限值为第一预设门限值和预设叠加值的和,其中,所述预设叠加值与人类皮肤产生的油污对所述接近传感器的影响相关。The corresponding target threshold value of the proximity sensor is determined to be the sum of a first preset threshold value and a preset superimposition value, wherein the preset superimposition value is related to the influence of oil pollution generated by human skin on the proximity sensor.
可选的,该装置还包括:Optionally, the device further includes:
属性信息获取模块,用于获取当前用户的属性信息;The attribute information acquisition module is used to obtain the attribute information of the current user;
叠加值确定模块,用于根据所述属性信息确定相应的预设叠加值。The superposition value determination module is configured to determine the corresponding preset superposition value according to the attribute information.
可选的,该装置还包括:Optionally, the device further includes:
第二光强获取模块,用于获取当前环境的第二光强度值;The second light intensity obtaining module is used to obtain the second light intensity value of the current environment;
第一门限值确定模块,用于当所述第二光强度值小于第二预设光强度阈值时,获取所述接近传感器的当前接近值作为所述第一预设门限值,其中,所述第二预设光强度阈值小于或等于所述第一预设光强度阈值。a first threshold value determination module, configured to acquire the current proximity value of the proximity sensor as the first preset threshold value when the second light intensity value is less than a second preset light intensity threshold value, wherein, The second preset light intensity threshold is less than or equal to the first preset light intensity threshold.
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行接近传感器的控制方法,该方法包括:Embodiments of the present application also provide a storage medium containing computer-executable instructions, where the computer-executable instructions are used to execute a method for controlling a proximity sensor when executed by a computer processor, and the method includes:
获取移动终端的姿态信息;Obtain the attitude information of the mobile terminal;
根据所述姿态信息确定接近传感器的对应的目标门限值;Determine the corresponding target threshold value of the proximity sensor according to the attitude information;
控制所述接近传感器基于所述目标门限值进行接近状态或远离状态的判定。The proximity sensor is controlled to determine the proximity state or the distance state based on the target threshold value.
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDRRAM、SRAM、EDORAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROMs, floppy disks, or tape devices; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Rambus RAM, etc.; non-volatile Volatile memory, such as flash memory, magnetic media (eg hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a second, different computer system connected to the first computer system through a network such as the Internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (eg, in different computer systems connected by a network). The storage medium may store program instructions (eg, embodied as a computer program) executable by one or more processors.
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的接近传感器的控制操作,还可以执行本申请任意实施例所提供的接近传感器的控制方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided by an embodiment of the present application, the computer-executable instructions of which are not limited to the control operations of the proximity sensor as described above, and can also execute the proximity sensor provided by any embodiment of the present application. related operations in the control method.
本申请实施例提供了一种移动终端,该移动终端中可集成本申请实施例提供的接近传感器的控制装置。图5为本申请实施例提供的一种移动终端的结构示意图。移动终端500可以包括:存储器501,处理器502及存储在存储器上并可在处理器运行的计算机程序,所述处理器502执行所述计算机程序时实现如本申请实施例所述的接近传感器的控制方法。The embodiments of the present application provide a mobile terminal, in which the control device of the proximity sensor provided by the embodiments of the present application can be integrated. FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. The
本申请实施例提供的移动终端,可以根据移动终端的姿态信息来适应性确定接近传感器的用于判定接近状态或远离状态的门限值,从而能够合理设定门限值,保证接近传感器的判定准确度。The mobile terminal provided by the embodiment of the present application can adaptively determine the threshold value of the proximity sensor for determining the approaching state or the distant state according to the attitude information of the mobile terminal, so that the threshold value can be reasonably set to ensure the determination of the proximity sensor. Accuracy.
图6为本申请实施例提供的另一种移动终端的结构示意图,该移动终端可以包括:壳体(图中未示出)、存储器601、中央处理器(central processing unit,CPU)602(又称处理器,以下简称CPU)、接近传感器(图中未示出)、加速度传感器(图中未示出)、电路板(图中未示出)和电源电路(图中未示出)。所述电路板安置在所述壳体围成的空间内部;所述CPU602和所述存储器601设置在所述电路板上;所述电源电路,用于为所述移动终端的各个电路或器件供电;所述存储器601,用于存储可执行程序代码;所述CPU602通过读取所述存储器601中存储的可执行程序代码来运行与所述可执行程序代码对应的计算机程序,以实现以下步骤:FIG. 6 is a schematic structural diagram of another mobile terminal provided by an embodiment of the present application, and the mobile terminal may include: a casing (not shown in the figure), a
获取移动终端的姿态信息;Obtain the attitude information of the mobile terminal;
根据所述姿态信息确定接近传感器的对应的目标门限值;Determine the corresponding target threshold value of the proximity sensor according to the attitude information;
控制所述接近传感器基于所述目标门限值进行接近状态或远离状态的判定。The proximity sensor is controlled to determine the proximity state or the distance state based on the target threshold value.
所述移动终端还包括:外设接口603、RF(Radio Frequency,射频)电路605、音频电路606、扬声器611、电源管理芯片608、输入/输出(I/O)子系统609、其他输入/控制设备610、触摸屏612、其他输入/控制设备610以及外部端口604,这些部件通过一个或多个通信总线或信号线607来通信。The mobile terminal further includes: a
应该理解的是,图示移动终端600仅仅是移动终端的一个范例,并且移动终端600可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated
下面就本实施例提供的用于接近传感器控制的移动终端进行详细的描述,该移动终端以手机为例。The following will describe in detail the mobile terminal used for proximity sensor control provided in this embodiment, where a mobile phone is taken as an example.
存储器601,所述存储器601可以被CPU602、外设接口603等访问,所述存储器601可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
外设接口603,所述外设接口603可以将设备的输入和输出外设连接到CPU602和存储器601。A
I/O子系统609,所述I/O子系统609可以将设备上的输入输出外设,例如触摸屏612和其他输入/控制设备610,连接到外设接口603。I/O子系统609可以包括显示控制器6091和用于控制其他输入/控制设备610的一个或多个输入控制器6092。其中,一个或多个输入控制器6092从其他输入/控制设备610接收电信号或者向其他输入/控制设备610发送电信号,其他输入/控制设备610可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器6092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/
触摸屏612,所述触摸屏612是用户移动终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。The
I/O子系统609中的显示控制器6091从触摸屏612接收电信号或者向触摸屏612发送电信号。触摸屏612检测触摸屏上的接触,显示控制器6091将检测到的接触转换为与显示在触摸屏612上的用户界面对象的交互,即实现人机交互,显示在触摸屏612上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。
RF电路605,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路605接收并发送RF信号,RF信号也称为电磁信号,RF电路605将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路605可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The
音频电路606,主要用于从外设接口603接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器611。The
扬声器611,用于将手机通过RF电路605从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 611 is used to restore the voice signal received by the mobile phone from the wireless network through the
电源管理芯片608,用于为CPU602、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The
上述实施例中提供的接近传感器的控制装置、存储介质及移动终端可执行本申请任意实施例所提供的接近传感器的控制方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本申请任意实施例所提供的接近传感器的控制方法。The proximity sensor control device, storage medium, and mobile terminal provided in the above embodiments can execute the proximity sensor control method provided by any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in the above embodiments, reference may be made to the control method of the proximity sensor provided by any embodiment of the present application.
注意,上述仅为本申请的较佳实施例及所运用技术原理。本领域技术人员会理解,本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由所附的权利要求范围决定。Note that the above are only preferred embodiments of the present application and applied technical principles. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present application. The scope is determined by the scope of the appended claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811089882.8A CN109343066B (en) | 2018-09-18 | 2018-09-18 | Control method and device of proximity sensor, storage medium and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811089882.8A CN109343066B (en) | 2018-09-18 | 2018-09-18 | Control method and device of proximity sensor, storage medium and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109343066A CN109343066A (en) | 2019-02-15 |
CN109343066B true CN109343066B (en) | 2020-07-21 |
Family
ID=65305589
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811089882.8A Active CN109343066B (en) | 2018-09-18 | 2018-09-18 | Control method and device of proximity sensor, storage medium and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109343066B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112277878A (en) * | 2019-07-11 | 2021-01-29 | 魏立江 | Keyless entry system |
CN110321879B (en) * | 2019-08-20 | 2020-06-05 | 成都数据天空科技有限公司 | Proximity judgment method, device, equipment and storage medium |
CN111182115B (en) * | 2019-12-27 | 2022-06-10 | 荣耀终端有限公司 | Method and device for detecting abnormity of proximity sensor and mobile terminal |
CN111366939B (en) * | 2020-02-20 | 2022-07-15 | Oppo(重庆)智能科技有限公司 | Calibration method and device of distance sensor, terminal and storage medium |
CN111965603B (en) * | 2020-07-12 | 2024-07-23 | 北京瑞蒙特科技有限公司 | Aerosol radar control method and device for railway transportation means |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104683598B (en) * | 2015-03-25 | 2017-06-09 | 广东欧珀移动通信有限公司 | Proximity transducer threshold value adjusting method, device and smart machine |
CN104935737A (en) * | 2015-05-25 | 2015-09-23 | 上海卓易科技股份有限公司 | Method and device for realizing screen turning on and off during a call |
CN106094055B (en) * | 2016-06-21 | 2018-07-03 | 广东欧珀移动通信有限公司 | Calibration method of proximity sensor and terminal |
WO2018000229A1 (en) * | 2016-06-29 | 2018-01-04 | 宋英楠 | Mobile phone and working mode switching control method therefor |
CN105939427B (en) * | 2016-07-06 | 2019-08-02 | Oppo广东移动通信有限公司 | Control method and device of infrared proximity sensor and mobile terminal |
CN108076210A (en) * | 2016-11-11 | 2018-05-25 | 中兴通讯股份有限公司 | The screen backlight control system and method for smart machine |
CN106791108B (en) * | 2016-12-22 | 2020-03-10 | Oppo广东移动通信有限公司 | Threshold updating method and device of proximity sensor and terminal |
CN106940633B (en) * | 2017-03-06 | 2019-09-13 | Oppo广东移动通信有限公司 | Display screen state control method and device |
CN107219515A (en) * | 2017-05-25 | 2017-09-29 | 深圳市金立通信设备有限公司 | The parameter calibrating method and terminal of a kind of range sensor |
CN107483712A (en) * | 2017-06-27 | 2017-12-15 | 捷开通讯(深圳)有限公司 | Mobile terminal and its control method, storage device |
CN107943345B (en) * | 2017-11-22 | 2020-10-02 | Oppo广东移动通信有限公司 | Calibration method, device, storage medium and electronic device for proximity sensor |
-
2018
- 2018-09-18 CN CN201811089882.8A patent/CN109343066B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109343066A (en) | 2019-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109343066B (en) | Control method and device of proximity sensor, storage medium and mobile terminal | |
CN108701043B (en) | A display processing method and device | |
EP3435199B1 (en) | Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen | |
CN107943345B (en) | Calibration method, device, storage medium and electronic device for proximity sensor | |
US10775932B2 (en) | Method, mobile terminal and non-transitory computer-readable storage medium for response control of touch screen | |
CN107942306B (en) | Method and device for calibrating proximity sensor, storage medium and electronic equipment | |
WO2018107903A1 (en) | Control method and device for touch screen of mobile terminal, mobile terminal, and storage medium | |
US10466849B2 (en) | Method and terminal for preventing unintentional triggering of a touch key and storage medium | |
CN107463290B (en) | Response control method and device for touch operation, storage medium and mobile terminal | |
CN103841258B (en) | Use the method and mancarried device of humidity sensor control mancarried device | |
CN108293080A (en) | A kind of method of contextual model switching | |
CN106225806B (en) | Method, device and mobile terminal for calibrating magnetic sensor | |
CN111182115B (en) | Method and device for detecting abnormity of proximity sensor and mobile terminal | |
CN107357458B (en) | Response method, device, storage medium and mobile terminal for touch key | |
CN109104521B (en) | Proximity state correction method, device, mobile terminal and storage medium | |
CN107222642A (en) | A kind of call processing method, antenna structure and mobile terminal | |
CN106506825A (en) | Touch screen control method, device and mobile terminal | |
CN106790978A (en) | The control method of mobile terminal screen state, device and mobile terminal | |
KR20160105245A (en) | Device for Sensing Input on Touch Panel and Method thereof | |
CN106791047B (en) | Foreign matter detection method and device of mobile terminal and mobile terminal | |
CN107508986B (en) | Volume adjustment method, device, storage medium and terminal device | |
US11429191B2 (en) | Input method and smart terminal device | |
CN106598521B (en) | Screen state control method, device and mobile terminal of mobile terminal | |
CN111083288B (en) | Screen control method and device, terminal equipment and storage medium | |
WO2019056214A1 (en) | Conversation processing method and related product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |