[go: up one dir, main page]

CN107566161A - Parameter configuration method and related products - Google Patents

Parameter configuration method and related products Download PDF

Info

Publication number
CN107566161A
CN107566161A CN201710673367.3A CN201710673367A CN107566161A CN 107566161 A CN107566161 A CN 107566161A CN 201710673367 A CN201710673367 A CN 201710673367A CN 107566161 A CN107566161 A CN 107566161A
Authority
CN
China
Prior art keywords
parameter value
proximity sensor
mobile terminal
working
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710673367.3A
Other languages
Chinese (zh)
Inventor
周意保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710673367.3A priority Critical patent/CN107566161A/en
Publication of CN107566161A publication Critical patent/CN107566161A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a parameter configuration method and a related product, comprising the following steps: when detecting that the mobile terminal is in a communication state, acquiring system information of the mobile terminal; determining the working mode of the proximity sensor according to the system information; and configuring the working parameters of the proximity sensor according to the working mode. The embodiment of the invention is beneficial to improving the accuracy and intelligence of the mobile terminal proximity sensor parameter configuration.

Description

参数配置方法及相关产品Parameter configuration method and related products

技术领域technical field

本发明涉及移动终端技术领域,具体涉及一种参数配置方法及相关产品。The invention relates to the technical field of mobile terminals, in particular to a parameter configuration method and related products.

背景技术Background technique

随着智能手机的快速发展,手机已经成为人们手中不可或缺的产品之一,为了方便用户的使用,手机的各种智能性设置层出不穷,各种各样的传感器应用在手机的不同方面,例如接近传感器,光感传感器等。With the rapid development of smart phones, mobile phones have become one of the indispensable products in people's hands. In order to facilitate the use of users, various intelligent settings of mobile phones emerge in an endless stream. Various sensors are applied to different aspects of mobile phones, such as Proximity sensor, light sensor, etc.

目前,接近传感器可根据物体的红外光反射值,在检测到物体靠近时,例如通过人耳打电话时,关闭显示屏以及背光,使降低电量消耗的同时避免显示屏亮屏时的人耳误触操作,但是接近传感器会被外界环境干扰,使手机出现闪屏等情况。At present, the proximity sensor can turn off the display and backlight according to the infrared light reflection value of the object when it detects that the object is approaching, such as when making a phone call through the human ear, so as to reduce power consumption and avoid human ear error when the display is on. Touch operation, but the proximity sensor will be interfered by the external environment, causing the mobile phone to flicker and so on.

发明内容Contents of the invention

本发明实施例提供了一种参数配置方法及相关产品,以期提高移动终端接近传感器参数配置的准确性和智能性。The embodiment of the present invention provides a parameter configuration method and related products, in order to improve the accuracy and intelligence of the parameter configuration of the proximity sensor of the mobile terminal.

第一方面,本发明实施例提供了一种参数配置方法,上述方法包括:In a first aspect, an embodiment of the present invention provides a parameter configuration method, the method includes:

当检测到移动终端处于通信状态时,获取上述移动终端的系统信息;When detecting that the mobile terminal is in a communication state, acquiring system information of the mobile terminal;

根据上述系统信息确定接近传感器的工作模式;Determine the working mode of the proximity sensor according to the above system information;

根据上述工作模式配置上述接近传感器的工作参数。The working parameters of the proximity sensor are configured according to the working mode.

第二方面,本发明实施例提供一种移动终端,包括处理器,与上述处理器连接的重力传感器、光感传感器、接近传感器,其中:In the second aspect, an embodiment of the present invention provides a mobile terminal, including a processor, a gravity sensor, a light sensor, and a proximity sensor connected to the processor, wherein:

上述重力传感器,用于检测第一参数值,上述第一参数值为上述移动终端与水平面的夹角;The above-mentioned gravity sensor is used to detect a first parameter value, and the above-mentioned first parameter value is an angle between the above-mentioned mobile terminal and a horizontal plane;

上述光感传感器,用于检测第二参数值,上述第二参数值为上述移动终端的光线强度;The above light sensor is used to detect a second parameter value, and the above second parameter value is the light intensity of the above mobile terminal;

上述接近传感器,用于检测第三参数值,上述第三参数值为上述移动终端与人脸之间的距离;The above-mentioned proximity sensor is used to detect a third parameter value, and the above-mentioned third parameter value is the distance between the above-mentioned mobile terminal and the human face;

上述处理器,用于当检测到移动终端处于通信状态时,获取上述移动终端的系统信息,并根据上述系统信息确定上述接近传感器的工作模式;以及用于根据上述工作模式配置上述接近传感器的工作参数,上述系统信息包括以下至少一种:上述第一参数值,上述第二参数值,上述第三参数值。The processor is configured to acquire system information of the mobile terminal when it is detected that the mobile terminal is in a communication state, and determine the working mode of the proximity sensor according to the system information; and configure the operation of the proximity sensor according to the working mode Parameters, the above-mentioned system information includes at least one of the following: the above-mentioned first parameter value, the above-mentioned second parameter value, and the above-mentioned third parameter value.

第三方面,本发明实施例提供了一种移动终端,该移动终端具有实现上述方法设计中移动终端的行为的功能。上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。上述硬件或软件包括一个或多个与上述功能相对应的模块。In a third aspect, an embodiment of the present invention provides a mobile terminal, and the mobile terminal has a function of realizing the behavior of the mobile terminal in the design of the above method. The above functions can be implemented by hardware, or can be implemented by executing corresponding software by hardware. The aforementioned hardware or software includes one or more modules corresponding to the aforementioned functions.

第四方面,本发明实施例提供了一种移动终端,包括:处理器,存储器,以及一个或多个程序;上述一个或多个程序被存储在上述存储器中,并且被配置成由上述处理器执行,上述程序包括用于执行本发明实施例第一方面任一方法中所描述的步骤的指令。In a fourth aspect, an embodiment of the present invention provides a mobile terminal, including: a processor, a memory, and one or more programs; the one or more programs are stored in the memory, and are configured to be executed by the processor Execution, the above program includes instructions for executing the steps described in any method of the first aspect of the embodiments of the present invention.

第五方面,本发明实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储有用于电子数据交换的计算机程序,该计算机程序具体包括指令,上述指令用于执行如本发明实施例第一方面任一方法中所描述的部分或全部步骤,上述计算机包括移动终端。In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, and the computer program specifically includes instructions, and the above-mentioned instructions are used to execute the For some or all of the steps described in any method of the first aspect of the embodiments of the invention, the above-mentioned computer includes a mobile terminal.

第六方面,本发明实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本发明实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。In a sixth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable the computer to execute the computer program as implemented in the present invention. For example, some or all of the steps described in any method of the first aspect. The computer program product may be a software installation package, and the above-mentioned computer includes a mobile terminal.

可以看出,本发明实施例中,移动终端首先当检测到移动终端处于通信状态时,获取上述移动终端的系统信息,其次,根据上述系统信息确定接近传感器的工作模式;最后,根据上述工作模式配置上述接近传感器的工作参数。可见,移动终端根据通信状态时移动终端的系统信息确定接近传感器的工作模式,并根据不同的工作模式配置不同的接近传感器的工作参数,而不是将接近传感器的工作参数固定在某一个参数值,有利于提升了移动终端接近传感器参数配置的准确性和智能性。It can be seen that in the embodiment of the present invention, the mobile terminal first obtains the system information of the mobile terminal when it detects that the mobile terminal is in the communication state, and secondly, determines the working mode of the proximity sensor according to the above system information; finally, according to the above working mode Configure the working parameters of the proximity sensor above. It can be seen that the mobile terminal determines the working mode of the proximity sensor according to the system information of the mobile terminal in the communication state, and configures different working parameters of the proximity sensor according to different working modes, instead of fixing the working parameters of the proximity sensor at a certain parameter value, It is beneficial to improve the accuracy and intelligence of the parameter configuration of the proximity sensor of the mobile terminal.

附图说明Description of drawings

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

图1A是本发明实施例公开的一种参数配置方法的流程示意图;FIG. 1A is a schematic flowchart of a parameter configuration method disclosed in an embodiment of the present invention;

图1B是本发明实施例公开的一种移动终端倾斜角度示意图;FIG. 1B is a schematic diagram of a tilt angle of a mobile terminal disclosed in an embodiment of the present invention;

图1C是本发明实施例公开的另一种移动终端倾斜角度示意图;FIG. 1C is a schematic diagram of another mobile terminal tilt angle disclosed by an embodiment of the present invention;

图2是本发明实施例公开的另一种参数配置方法的流程示意图;Fig. 2 is a schematic flowchart of another parameter configuration method disclosed in the embodiment of the present invention;

图3是本发明实施例公开的另一种参数配置方法的流程示意图;FIG. 3 is a schematic flowchart of another parameter configuration method disclosed in an embodiment of the present invention;

图4是本发明实施例公开的一种移动终端的结构示意图;FIG. 4 is a schematic structural diagram of a mobile terminal disclosed in an embodiment of the present invention;

图5是本发明实施例公开的一种移动终端的功能单元组成框图;FIG. 5 is a block diagram of functional units of a mobile terminal disclosed in an embodiment of the present invention;

图6是本发明实施例公开的另一种移动终端的结构示意图。Fig. 6 is a schematic structural diagram of another mobile terminal disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the description and claims of the present invention and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or devices.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

本发明实施例所涉及到的移动终端可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminaldevice)等等。为方便描述,上面提到的设备统称为移动终端。下面对本发明实施例进行详细介绍。The mobile terminals involved in the embodiments of the present invention may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to wireless modems, as well as various forms of user equipment (User Equipment, UE), mobile station (Mobile Station, MS), terminal device (terminal device) and so on. For convenience of description, the devices mentioned above are collectively referred to as mobile terminals. The following describes the embodiments of the present invention in detail.

请参阅图1A,图1A是本发明实施例提供了一种参数配置方法的流程示意图,如图所示,本参数配置方法包括:Please refer to FIG. 1A. FIG. 1A is a schematic flowchart of a parameter configuration method provided by an embodiment of the present invention. As shown in the figure, the parameter configuration method includes:

S101,移动终端当检测到上述移动终端处于通信状态时,获取上述移动终端的系统信息;S101. When the mobile terminal detects that the mobile terminal is in a communication state, acquire system information of the mobile terminal;

其中,上述通信状态可以包括:通话状态,通过第三方社交应用的语音或者视频状态,上述第三方社交应用例如可以是微信,QQ等。Wherein, the above-mentioned communication state may include: a call state, a voice or video state through a third-party social application, and the above-mentioned third-party social application may be WeChat, QQ, etc., for example.

其中,上述移动终端内置重力传感器,光感传感器,接近传感器等传感器,上述系统信息包括上述重力传感器的第一参数值,上述光感传感器的第二参数值,上述接近传感器的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器的最大参数值。Wherein, the above-mentioned mobile terminal has built-in sensors such as a gravity sensor, a light sensor, and a proximity sensor, and the above-mentioned system information includes the first parameter value of the above-mentioned gravity sensor, the second parameter value of the light sensor, and the third parameter value of the proximity sensor, The third parameter value includes a maximum parameter value of the proximity sensor when the mobile terminal is in a screen-off state.

其中,当接近传感器内部的集成电路为10位的器件时,满量程为1024时,接近传感器在工作之前的初始值约为200。Wherein, when the integrated circuit inside the proximity sensor is a 10-bit device and the full scale is 1024, the initial value of the proximity sensor before working is about 200.

其中,上述第一参数值为上述移动终端与水平面的夹角,上述第一参数值的取值范围是0-90度,如图1B所示,当夹角1为0-90度时,上述第一参数值为夹角1的角度值,或者如图1C所示,当夹角2为0-90度时,上述第一参数值为夹角2的角度值,上述第二参数值为上述移动终端的光线强度,上述第三参数值为上述移动终端与人脸之间的距离。Wherein, the above-mentioned first parameter value is the angle between the above-mentioned mobile terminal and the horizontal plane, and the value range of the above-mentioned first parameter value is 0-90 degrees, as shown in Figure 1B, when the angle 1 is 0-90 degrees, the above-mentioned The first parameter value is the angle value of the included angle 1, or as shown in Figure 1C, when the included angle 2 is 0-90 degrees, the above-mentioned first parameter value is the angle value of the included angle 2, and the above-mentioned second parameter value is the above-mentioned For the light intensity of the mobile terminal, the above-mentioned third parameter value is the distance between the above-mentioned mobile terminal and the human face.

S102,上述移动终端根据上述系统信息确定接近传感器的工作模式;S102, the above mobile terminal determines the working mode of the proximity sensor according to the above system information;

其中,上述工作模式包括水平工作模式,和垂直工作模式,上述垂直工作模式包括普通模式,高光模式和油污模式。Wherein, the above-mentioned working mode includes a horizontal working mode and a vertical working mode, and the above-mentioned vertical working mode includes a normal mode, a highlight mode and an oil stain mode.

其中,当上述第一参数值小于第一预设阈值时,上述工作模式为水平工作模式,当上述第一参数值大于或等于上述第一预设阈值时,上述工作模式为垂直工作模式,在上述垂直工作模式中,当上述第二参数值大于或等于上述第二预设阈值时,上述工作模式为高光模式,当上述第三参数值大于或等于上述第三预设阈值时,上述工作模式为油污模式,当上述第二参数值小于上述第二预设阈值,且上述第三工作参数小于上述第三预设阈值时,上述工作模式为普通模式。Wherein, when the above-mentioned first parameter value is less than the first preset threshold value, the above-mentioned working mode is the horizontal working mode; when the above-mentioned first parameter value is greater than or equal to the above-mentioned first preset threshold value, the above-mentioned working mode is the vertical working mode. In the above-mentioned vertical working mode, when the above-mentioned second parameter value is greater than or equal to the above-mentioned second preset threshold value, the above-mentioned working mode is a highlight mode; when the above-mentioned third parameter value is greater than or equal to the above-mentioned third preset threshold value, the above-mentioned working mode is It is an oil pollution mode, and when the value of the second parameter is smaller than the second preset threshold and the third working parameter is smaller than the third preset threshold, the working mode is the normal mode.

S103,上述移动终端根据上述工作模式配置上述接近传感器的工作参数;S103, the mobile terminal configures the working parameters of the proximity sensor according to the working mode;

其中,上述移动终端可以预存上述工作模式与上述接近传感器的工作参数之间的映射关系。Wherein, the above-mentioned mobile terminal may pre-store the mapping relationship between the above-mentioned working mode and the above-mentioned working parameters of the proximity sensor.

其中,上述工作模式与上述接近传感器的工作参数之间的映射关系可以是开发人员在移动终端出厂前预设置,也可以是移动终端通过智能学习用户习惯,根据用户的历史使用数据确定工作模式与上述接近传感器的工作参数之间的映射关系,建立并预存在上述移动终端中,在此不作限定。Wherein, the mapping relationship between the above-mentioned working modes and the working parameters of the above-mentioned proximity sensor may be preset by the developer before the mobile terminal leaves the factory, or the mobile terminal may determine the working mode and the working parameters according to the user's historical usage data through intelligent learning of user habits. The mapping relationship between the working parameters of the above proximity sensors is established and pre-stored in the above mobile terminal, which is not limited here.

其中,上述接近传感器的工作参数为触发上述移动终端在熄屏状态和亮屏状态之间切换的距离阈值。Wherein, the working parameter of the proximity sensor is a distance threshold that triggers the mobile terminal to switch between the off-screen state and the on-screen state.

其中,上述接近传感器包括接近感应(Proximity Sensor,PS)和红外线(InfraredRadiation,IR)发射LED两部分,当移动终端处于通话状态时,移动终端通过检测IR LED发射红外光来判断移动终端是否贴近脸部,贴近时可以关闭LCD背光,其中,上述接近传感器含有一个发射端,即LED灯发射红外光;一个接收端,即接受红外光,当物体接近移动终端的时候,会有红外光的反射,接收端包括模数转换器,根据接收的反射红外光得出具体红外光强值。当没有任何物体遮挡的时候,接收端的数值是最小的,在物体不断靠近的时候,数值不断变大。Among them, the proximity sensor includes two parts: proximity sensor (Proximity Sensor, PS) and infrared (Infrared Radiation, IR) emitting LED. The LCD backlight can be turned off when close to it. The above-mentioned proximity sensor includes a transmitting end, that is, the LED lamp emits infrared light; a receiving end, that is, receiving infrared light. When the object approaches the mobile terminal, there will be reflection of infrared light. The receiving end includes an analog-to-digital converter, and obtains a specific infrared light intensity value according to the received reflected infrared light. When there is no object occlusion, the value at the receiving end is the smallest, and when the object is getting closer, the value keeps getting larger.

可以看出,本发明实施例中,移动终端首先当检测到移动终端处于通信状态时,获取上述移动终端的系统信息,其次,根据上述系统信息确定接近传感器的工作模式;最后,根据上述工作模式配置上述接近传感器的工作参数。可见,移动终端根据通信状态时移动终端的系统信息确定接近传感器的工作模式,并根据不同的工作模式配置不同的接近传感器的工作参数,而不是将接近传感器的工作参数固定在某一个参数值,有利于提升了移动终端接近传感器参数配置的准确性和智能性。It can be seen that in the embodiment of the present invention, the mobile terminal first obtains the system information of the mobile terminal when it detects that the mobile terminal is in the communication state, and secondly, determines the working mode of the proximity sensor according to the above system information; finally, according to the above working mode Configure the working parameters of the proximity sensor above. It can be seen that the mobile terminal determines the working mode of the proximity sensor according to the system information of the mobile terminal in the communication state, and configures different working parameters of the proximity sensor according to different working modes, instead of fixing the working parameters of the proximity sensor at a certain parameter value, It is beneficial to improve the accuracy and intelligence of the parameter configuration of the proximity sensor of the mobile terminal.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值;上述获取上述移动终端的系统信息,包括:In a possible example, the above-mentioned system information includes the first parameter value of the gravity sensor; the above-mentioned acquisition of the above-mentioned system information of the mobile terminal includes:

获取上述移动终端的上述重力传感器的第一参数值;Acquiring the first parameter value of the above-mentioned gravity sensor of the above-mentioned mobile terminal;

上述根据上述系统信息确定接近传感器的工作模式,包括:The above-mentioned determination of the working mode of the proximity sensor according to the above-mentioned system information includes:

当检测到上述第一参数值小于上述第一预设阈值时,确定上述接近传感器的工作模式为第一工作模式;When it is detected that the above-mentioned first parameter value is less than the above-mentioned first preset threshold value, it is determined that the working mode of the above-mentioned proximity sensor is the first working mode;

上述根据上述工作模式配置上述接近传感器的工作参数,包括:The above-mentioned configuration of the above-mentioned working parameters of the proximity sensor according to the above-mentioned working mode includes:

根据上述第一工作模式配置上述接近传感器的工作参数为第一工作参数,上述第一工作参数为第一预设值。According to the first working mode, the working parameter of the proximity sensor is configured as a first working parameter, and the first working parameter is a first preset value.

其中,上述第一预设阈值可以为45度,上述第一工作模式为水平工作模式,例如第一参数值为0度,移动终端这时平放在桌面上,移动终端不处于接近人脸的通信状态,不会出现人脸误触现象,这时,可以配置第一工作参数较大,即第一预设值较大,例如当接近传感器内部的集成电路为10位的器件时,满量程为1024,可以配置第一工作参数值为700或者800,或者可以使移动终端处于常亮状态。Wherein, the above-mentioned first preset threshold value may be 45 degrees, and the above-mentioned first working mode is a horizontal working mode, for example, the first parameter value is 0 degrees, and the mobile terminal is placed flat on the table at this time, and the mobile terminal is not in a position close to the human face. In the communication state, there will be no accidental face touch phenomenon. At this time, the first working parameter can be configured to be larger, that is, the first preset value is larger. For example, when the integrated circuit inside the proximity sensor is a 10-bit device, the full-scale In step 1024, the value of the first working parameter may be configured to be 700 or 800, or the mobile terminal may be in a constant light state.

可见,本示例中,移动终端通过判断重力传感器的第一参数值,确定移动终端的姿态信息,然后根据移动终端的水平姿态信息,配置适合的传感器第一工作参数,有利于提升移动终端参数配置的智能性和合理性。It can be seen that in this example, the mobile terminal determines the attitude information of the mobile terminal by judging the first parameter value of the gravity sensor, and then configures the appropriate first working parameter of the sensor according to the horizontal attitude information of the mobile terminal, which is conducive to improving the parameter configuration of the mobile terminal intelligence and rationality.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,光感传感器的第二参数值,接近传感器的第三参数值;上述获取上述移动终端的系统信息,包括:In a possible example, the above system information includes the first parameter value of the gravity sensor, the second parameter value of the light sensor, and the third parameter value of the proximity sensor; the above acquisition of the system information of the mobile terminal includes:

获取上述移动终端的上述重力传感器的第一参数值;Acquiring the first parameter value of the above-mentioned gravity sensor of the above-mentioned mobile terminal;

当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述光感传感器的第二参数值和上述接近传感器的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器的最大参数值;When it is detected that the above-mentioned first parameter value is greater than or equal to the above-mentioned first preset threshold value, the second parameter value of the above-mentioned photosensitive sensor and the third parameter value of the above-mentioned proximity sensor are obtained, and the above-mentioned third parameter value includes The maximum parameter value of the above-mentioned proximity sensor in the screen state;

上述根据上述系统信息确定接近传感器的工作模式,包括:The above-mentioned determination of the working mode of the proximity sensor according to the above-mentioned system information includes:

当上述第二参数值小于第二预设阈值,上述第三参数值小于第三预设阈值时,确定上述接近传感器的工作模式为第二工作模式;When the second parameter value is less than a second preset threshold and the third parameter value is less than a third preset threshold, it is determined that the working mode of the proximity sensor is the second working mode;

上述根据上述工作模式配置上述接近传感器的工作参数,包括:The above-mentioned configuration of the above-mentioned working parameters of the proximity sensor according to the above-mentioned working mode includes:

根据上述第二工作模式配置上述接近传感器的工作参数为第二工作参数,上述第二工作参数为第二预设值。According to the second working mode, the working parameter of the proximity sensor is configured as a second working parameter, and the second working parameter is a second preset value.

其中,上述第一预设阈值可以为45度,上述第二工作模式为普通模式,例如第一参数值为80度时,移动终端处于垂直状态,且当上述第二参数值小于第二预设阈值,上述第三参数值小于第三预设阈值时,移动终端处于垂直状态,且为靠近耳朵听筒通讯的普通模式,可以配置第二工作参数为第二预设值。Wherein, the above-mentioned first preset threshold value may be 45 degrees, and the above-mentioned second working mode is normal mode, for example, when the first parameter value is 80 degrees, the mobile terminal is in a vertical state, and when the above-mentioned second parameter value is less than the second preset Threshold, when the above-mentioned third parameter value is less than the third preset threshold, the mobile terminal is in a vertical state and is in a normal mode of communication close to the earpiece, and the second working parameter can be configured as the second preset value.

其中,上述第二预设值可以由开发人员在移动终端出厂前设置,也可以由系统通过与用户交互确定数值后设置,在此不作限定。Wherein, the above-mentioned second preset value may be set by the developer before the mobile terminal leaves the factory, or may be set by the system after interacting with the user to determine the value, which is not limited herein.

其中,上述移动终端通过交互方法设置第二预设值的具体实现方式可以是:Wherein, the specific implementation manner for the above-mentioned mobile terminal to set the second preset value through an interactive method may be:

上述移动终端输出引导信息;The above-mentioned mobile terminal outputs guide information;

上述移动终端当检测到上述移动终端处于预设位置时,获取接近传感器的接近值;When the above-mentioned mobile terminal detects that the above-mentioned mobile terminal is at a preset position, acquire the proximity value of the proximity sensor;

上述移动终端设置上述接近传感器的接近值与第五预设值之和为上述第二预设值。The mobile terminal sets the sum of the proximity value of the proximity sensor and the fifth preset value as the second preset value.

其中,上述预设位置为用户根据上述引导信息移动上述移动终端到达的位置,上述预设位置为上述移动终端处于正常听筒通信时移动终端放置的位置。Wherein, the preset position is a position where the user moves the mobile terminal according to the guide information, and the preset position is a position where the mobile terminal is placed when the mobile terminal is in normal handset communication.

其中,上述引导信息可以是文本,也可以是动画画面等,在次不作限定。Wherein, the above-mentioned guide information may be text, or an animation picture, etc., which is not limited here.

其中,当接近传感器内部的集成电路为10位的器件时,满量程为1024时,第五预设值可以为40或者50。Wherein, when the integrated circuit inside the proximity sensor is a 10-bit device and the full scale is 1024, the fifth preset value may be 40 or 50.

可见,本示例中,移动终端根据多个传感器的参数值确定第二工作模式,并根据第二工作模式设置适合当前模式的移动终端接近传感器的第二工作参数,有利于提升移动终端参数配置的合理性和精确性。It can be seen that in this example, the mobile terminal determines the second working mode according to the parameter values of multiple sensors, and sets the second working parameter of the proximity sensor of the mobile terminal suitable for the current mode according to the second working mode, which is conducive to improving the parameter configuration of the mobile terminal. rationality and accuracy.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,光感传感器的第二参数值;上述获取上述移动终端的系统信息,包括:In a possible example, the above system information includes the first parameter value of the gravity sensor and the second parameter value of the light sensor; the above acquisition of the system information of the mobile terminal includes:

获取上述移动终端的上述重力传感器的第一参数值;Acquiring the first parameter value of the above-mentioned gravity sensor of the above-mentioned mobile terminal;

当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述光感传感器的第二参数值;When it is detected that the above-mentioned first parameter value is greater than or equal to the above-mentioned first preset threshold value, acquiring a second parameter value of the above-mentioned light sensor;

上述根据上述系统信息确定接近传感器的工作模式,包括:The above-mentioned determination of the working mode of the proximity sensor according to the above-mentioned system information includes:

当上述第二参数值大于或等于上述第二预设阈值时,确定上述接近传感器的工作模式为第三工作模式;When the above-mentioned second parameter value is greater than or equal to the above-mentioned second preset threshold value, it is determined that the working mode of the above-mentioned proximity sensor is the third working mode;

上述根据上述工作模式配置上述接近传感器的工作参数,包括:The above-mentioned configuration of the above-mentioned working parameters of the proximity sensor according to the above-mentioned working mode includes:

根据上述第三工作模式配置上述接近传感器的工作参数为第三工作参数,上述第三工作参数为上述接近传感器的最小参数值与第三预设值之和,上述最小参数值为上述接近传感器在上述光感传感器的参数值小于上述第二预设阈值时采集到的最小参数值。According to the above-mentioned third working mode, the working parameter of the above-mentioned proximity sensor is configured as a third working parameter, and the above-mentioned third working parameter is the sum of the minimum parameter value of the above-mentioned proximity sensor and the third preset value, and the above-mentioned minimum parameter value is the above-mentioned proximity sensor. The minimum parameter value collected when the parameter value of the light sensor is smaller than the second preset threshold.

其中,上述第三工作模式为上述移动终端处于垂直状态下的高光工作模式,上述高光模式为移动终端处于垂直状态下,环境光强大于或等于上述第二预设阈值时的模式,由于高光环境下存在较强的红外线,接近传感器接收端会接收到很强的红外线,使接近传感器芯片的线性度随着低燥值变大而趋于平缓,在强光下,致使接近值反而变小,无法达到熄屏参数,因此,需要将接近传感器的工作参数设置的较小,配置为第三工作参数。Wherein, the above-mentioned third working mode is a high-light working mode when the above-mentioned mobile terminal is in a vertical state, and the above-mentioned high-light mode is a mode when the mobile terminal is in a vertical state and the ambient light intensity is greater than or equal to the above-mentioned second preset threshold. There is a strong infrared ray under the environment, and the receiving end of the proximity sensor will receive a strong infrared ray, so that the linearity of the proximity sensor chip becomes flat as the low noise value increases. Under strong light, the proximity value becomes smaller instead. The screen-off parameter cannot be reached, therefore, it is necessary to set the working parameter of the proximity sensor to be smaller and configure it as the third working parameter.

其中,上述接近传感器的最小参数值可以为移动终端根据接近传感器的历史接近值记录中,获取的上述接近传感器的接近值记录中的最小值,上述最小值为高光模式之前,上述光感传感器的参数值小于上述第二预设阈值时,即非高光模式下接近传感器的值。Wherein, the minimum parameter value of the proximity sensor may be the minimum value in the proximity value record of the proximity sensor obtained by the mobile terminal according to the historical proximity value record of the proximity sensor, and the minimum value is the value of the light sensor before the highlight mode. When the parameter value is less than the above-mentioned second preset threshold, that is, the value of the proximity sensor in the non-high light mode.

其中,当接近传感器内部的集成电路为10位的器件时,满量程为1024时,第三预设值可以为100或者200。Wherein, when the integrated circuit inside the proximity sensor is a 10-bit device and the full scale is 1024, the third preset value may be 100 or 200.

可见,本示例中,移动终端确定当前的环境参数,根据环境参数确定第三工作模式,并设置接近传感器的值为第三工作参数,有利于提升移动终端接近传感器参数的适应性和智能性。It can be seen that in this example, the mobile terminal determines the current environmental parameters, determines the third working mode according to the environmental parameters, and sets the value of the proximity sensor as the third working parameter, which is conducive to improving the adaptability and intelligence of the proximity sensor parameters of the mobile terminal.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,接近传感器的第三参数值;上述获取上述移动终端的系统信息,包括:In a possible example, the system information includes the first parameter value of the gravity sensor and the third parameter value of the proximity sensor; the acquisition of the system information of the mobile terminal includes:

获取上述移动终端的上述重力传感器的第一参数值;Acquiring the first parameter value of the above-mentioned gravity sensor of the above-mentioned mobile terminal;

当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述接近传感器的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器的最大参数值;When it is detected that the above-mentioned first parameter value is greater than or equal to the above-mentioned first preset threshold value, the third parameter value of the above-mentioned proximity sensor is obtained, and the above-mentioned third parameter value includes the maximum parameter value of the above-mentioned proximity sensor when the above-mentioned mobile terminal is in a screen-off state ;

上述根据上述系统信息确定接近传感器的工作模式,包括:The above-mentioned determination of the working mode of the proximity sensor according to the above-mentioned system information includes:

当上述第三参数值大于或等于上述第三预设阈值时,确定上述接近传感器的工作模式为第四工作模式;When the above-mentioned third parameter value is greater than or equal to the above-mentioned third preset threshold value, it is determined that the working mode of the above-mentioned proximity sensor is the fourth working mode;

上述根据上述工作模式配置上述接近传感器的工作参数,包括:The above-mentioned configuration of the above-mentioned working parameters of the proximity sensor according to the above-mentioned working mode includes:

根据上述第四工作模式配置上述接近传感器的工作参数为第四工作参数,上述第四工作参数为上述接近传感器的参数值与第四预设值之和,上述参数值为上述接近传感器所采集到的参数值,且上述参数值用于上述移动终端由亮屏状态切换为上述熄屏状态。Configure the working parameter of the proximity sensor according to the fourth working mode as the fourth working parameter, the fourth working parameter is the sum of the parameter value of the proximity sensor and the fourth preset value, and the parameter value is collected by the proximity sensor The parameter value, and the above parameter value is used for the mobile terminal to switch from the on-screen state to the above-mentioned off-screen state.

其中,上述第四工作模式为油污工作模式,在油污工作模式中,当移动终端在通信状态下与人脸接触时,会沾染人脸上面的油污,由于油污遮挡接近传感器的摄像头,使移动终端远离人脸时,接近传感器仍然处于较大值,无法达到亮屏参数,因此,需要将接近传感器的工作参数设置的较大,配置为第四工作参数。Among them, the above-mentioned fourth working mode is the oil pollution working mode. In the oil pollution working mode, when the mobile terminal is in contact with the human face in the communication state, it will be contaminated with the oil on the face. Since the oil pollution blocks the camera of the proximity sensor, the mobile terminal When away from the face, the proximity sensor is still at a large value and cannot reach the bright screen parameter. Therefore, it is necessary to set the working parameter of the proximity sensor to a large value and configure it as the fourth working parameter.

其中,上述第四工作参数为上述接近传感器的参数值与第四预设值之和,上述参数值为上述接近传感器所采集到的参数值,且上述参数值用于上述移动终端由亮屏状态切换为上述熄屏状态,即上述参数值可以是上述移动终端由亮屏切换为熄屏时上述接近传感器的参数值。Wherein, the above-mentioned fourth working parameter is the sum of the parameter value of the above-mentioned proximity sensor and the fourth preset value, the above-mentioned parameter value is the parameter value collected by the above-mentioned proximity sensor, and the above-mentioned parameter value is used for the above-mentioned mobile terminal from the bright screen state Switching to the above-mentioned off-screen state, that is, the above-mentioned parameter value may be the parameter value of the above-mentioned proximity sensor when the above-mentioned mobile terminal is switched from on-screen to off-screen.

其中,当接近传感器内部的集成电路为10位的器件时,满量程为1024时,第四预设值可以为100或者200。Wherein, when the integrated circuit inside the proximity sensor is a 10-bit device and the full scale is 1024, the fourth preset value may be 100 or 200.

可见,本示例中,移动终端确定第四工作模式,并根据第四工作模式配置第四工作参数,有利于提升移动终端工作模式的全面覆盖性,进一步提升接近传感器参数的适应性和合理性。It can be seen that in this example, the mobile terminal determines the fourth working mode and configures the fourth working parameter according to the fourth working mode, which is beneficial to improve the comprehensive coverage of the working mode of the mobile terminal and further improve the adaptability and rationality of the proximity sensor parameters.

与上述图1A所示的实施例一致的,请参阅图2,图2是本发明实施例提供的另一种参数配置方法的流程示意图,如图所示,本参数配置方法包括:Consistent with the embodiment shown in FIG. 1A above, please refer to FIG. 2. FIG. 2 is a schematic flowchart of another parameter configuration method provided by the embodiment of the present invention. As shown in the figure, this parameter configuration method includes:

S201,移动终端当检测到上述移动终端处于通信状态时,获取上述移动终端的重力传感器的第一参数值;S201. When the mobile terminal detects that the mobile terminal is in a communication state, acquire a first parameter value of the gravity sensor of the mobile terminal;

S202,上述移动终端当检测到上述第一参数值小于第一预设阈值时,确定上述接近传感器的工作模式为第一工作模式;S202. When the above-mentioned mobile terminal detects that the above-mentioned first parameter value is less than a first preset threshold value, determine that the working mode of the above-mentioned proximity sensor is the first working mode;

S203,上述移动终端根据上述第一工作模式配置上述接近传感器的工作参数为第一工作参数,上述第一工作参数为第一预设值。S203. The mobile terminal configures the working parameter of the proximity sensor as a first working parameter according to the first working mode, and the first working parameter is a first preset value.

可以看出,本发明实施例中,移动终端首先当检测到移动终端处于通信状态时,获取上述移动终端的系统信息,其次,根据上述系统信息确定接近传感器的工作模式;最后,根据上述工作模式配置上述接近传感器的工作参数。可见,移动终端根据通信状态时移动终端的系统信息确定接近传感器的工作模式,并根据不同的工作模式配置不同的接近传感器的工作参数,而不是将接近传感器的工作参数固定在某一个参数值,有利于提升了移动终端接近传感器参数配置的准确性和智能性。It can be seen that in the embodiment of the present invention, the mobile terminal first obtains the system information of the mobile terminal when it detects that the mobile terminal is in the communication state, and secondly, determines the working mode of the proximity sensor according to the above system information; finally, according to the above working mode Configure the working parameters of the proximity sensor above. It can be seen that the mobile terminal determines the working mode of the proximity sensor according to the system information of the mobile terminal in the communication state, and configures different working parameters of the proximity sensor according to different working modes, instead of fixing the working parameters of the proximity sensor at a certain parameter value, It is beneficial to improve the accuracy and intelligence of the parameter configuration of the proximity sensor of the mobile terminal.

此外,移动终端通过判断重力传感器的第一参数值,确定移动终端的姿态信息,然后根据移动终端的水平姿态信息,配置适合的传感器第一工作参数,有利于提升移动终端参数配置的智能性和合理性。In addition, the mobile terminal determines the attitude information of the mobile terminal by judging the first parameter value of the gravity sensor, and then configures the appropriate first working parameter of the sensor according to the horizontal attitude information of the mobile terminal, which is conducive to improving the intelligence and performance of the parameter configuration of the mobile terminal. rationality.

与上述图1A所示的实施例一致的,请参阅图3,图3是本发明实施例提供的另一种参数配置方法的流程示意图,如图所示,本参数配置方法包括:Consistent with the embodiment shown in FIG. 1A above, please refer to FIG. 3. FIG. 3 is a schematic flowchart of another parameter configuration method provided by the embodiment of the present invention. As shown in the figure, this parameter configuration method includes:

S301,移动终端当检测到上述移动终端处于通信状态时,获取上述移动终端的重力传感器的第一参数值;S301. When the mobile terminal detects that the mobile terminal is in a communication state, acquire a first parameter value of the gravity sensor of the mobile terminal;

S302,上述移动终端当检测到上述第一参数值大于或等于第一预设阈值时,获取光感传感器的第二参数值和接近传感器的第三参数值;S302. When the above-mentioned mobile terminal detects that the above-mentioned first parameter value is greater than or equal to the first preset threshold value, acquire the second parameter value of the light sensor and the third parameter value of the proximity sensor;

其中,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器的最大参数值。Wherein, the third parameter value includes a maximum parameter value of the proximity sensor when the mobile terminal is in a screen-off state.

S303,当上述第二参数值小于第二预设阈值,上述第三参数值小于第三预设阈值时,上述移动终端确定上述接近传感器的工作模式为第二工作模式,并根据上述第二工作模式配置上述接近传感器的工作参数为第二工作参数,上述第二工作参数为第二预设值。S303. When the value of the second parameter is less than the second preset threshold and the value of the third parameter is less than the third preset threshold, the mobile terminal determines that the working mode of the proximity sensor is the second working mode, and according to the second working mode Mode configuration The working parameter of the proximity sensor is a second working parameter, and the second working parameter is a second preset value.

S304,当上述第二参数值大于或等于上述第二预设阈值时,上述移动终端确定上述接近传感器的工作模式为第三工作模式,并根据上述第三工作模式配置上述接近传感器的工作参数为第三工作参数;S304. When the second parameter value is greater than or equal to the second preset threshold, the mobile terminal determines that the working mode of the proximity sensor is the third working mode, and configures the working parameters of the proximity sensor according to the third working mode as The third working parameter;

其中,上述第三工作参数为上述接近传感器的最小参数值与第三预设值之和,上述最小参数值为上述接近传感器在上述光感传感器的参数值小于上述第二预设阈值时采集到的最小参数值。Wherein, the above-mentioned third working parameter is the sum of the minimum parameter value of the above-mentioned proximity sensor and the third preset value, and the above-mentioned minimum parameter value is collected by the above-mentioned proximity sensor when the parameter value of the above-mentioned light sensor is less than the above-mentioned second preset threshold value The minimum parameter value of .

S305,当上述第三参数值大于或等于上述第三预设阈值时,上述移动终端确定上述接近传感器的工作模式为第四工作模式,并根据上述第四工作模式配置上述接近传感器的工作参数为第四工作参数;S305, when the above-mentioned third parameter value is greater than or equal to the above-mentioned third preset threshold, the above-mentioned mobile terminal determines that the working mode of the above-mentioned proximity sensor is the fourth working mode, and configures the working parameters of the above-mentioned proximity sensor according to the above-mentioned fourth working mode as The fourth working parameter;

其中,上述第四工作参数为上述接近传感器的参数值与第四预设值之和,上述参数值为上述接近传感器所采集到的参数值,且上述参数值用于上述移动终端由亮屏状态切换为上述熄屏状态。Wherein, the above-mentioned fourth working parameter is the sum of the parameter value of the above-mentioned proximity sensor and the fourth preset value, the above-mentioned parameter value is the parameter value collected by the above-mentioned proximity sensor, and the above-mentioned parameter value is used for the above-mentioned mobile terminal from the bright screen state Switch to the screen off state mentioned above.

可以看出,本发明实施例中,移动终端首先当检测到移动终端处于通信状态时,获取上述移动终端的系统信息,其次,根据上述系统信息确定接近传感器的工作模式;最后,根据上述工作模式配置上述接近传感器的工作参数。可见,移动终端根据通信状态时移动终端的系统信息确定接近传感器的工作模式,并根据不同的工作模式配置不同的接近传感器的工作参数,而不是将接近传感器的工作参数固定在某一个参数值,有利于提升了移动终端接近传感器参数配置的准确性和智能性。It can be seen that in the embodiment of the present invention, the mobile terminal first obtains the system information of the mobile terminal when it detects that the mobile terminal is in the communication state, and secondly, determines the working mode of the proximity sensor according to the above system information; finally, according to the above working mode Configure the working parameters of the proximity sensor above. It can be seen that the mobile terminal determines the working mode of the proximity sensor according to the system information of the mobile terminal in the communication state, and configures different working parameters of the proximity sensor according to different working modes, instead of fixing the working parameters of the proximity sensor at a certain parameter value, It is beneficial to improve the accuracy and intelligence of the parameter configuration of the proximity sensor of the mobile terminal.

此外,移动终端根据多个传感器的参数值确定第二工作模式、第三工作模式和第四工作模式,并根据各个工作模式配置接近传感器不同的工作参数,有利于提升移动终端工作模式的全面覆盖性,进一步提升接近传感器参数配置的适应性、合理性和智能性。In addition, the mobile terminal determines the second working mode, the third working mode, and the fourth working mode according to the parameter values of multiple sensors, and configures different working parameters of the proximity sensor according to each working mode, which is conducive to improving the comprehensive coverage of the working modes of the mobile terminal The adaptability, rationality and intelligence of the parameter configuration of the proximity sensor are further improved.

请参阅图4,图4是本发明实施例提供了一种移动终端100的结构示意图,上述移动终端100包括:壳体、显示屏、主板、电池和副板,主板上设置有重力传感器21、光感传感器22、接近传感器23、处理器110、存储器120、前置摄像头和SIM卡槽等,副板上设置有振子、一体音腔、VOOC闪充接口和指纹模组24,其中,Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of a mobile terminal 100 provided by an embodiment of the present invention. The mobile terminal 100 includes: a housing, a display screen, a main board, a battery and a sub-board. The main board is provided with a gravity sensor 21, Light sensor 22, proximity sensor 23, processor 110, memory 120, front camera and SIM card slot, etc., vibrator, integrated sound cavity, VOOC flash charging interface and fingerprint module 24 are arranged on the sub-board, wherein,

上述重力传感器21,用于检测第一参数值,上述第一参数值为上述移动终端与水平面的夹角;The above-mentioned gravity sensor 21 is used to detect a first parameter value, and the above-mentioned first parameter value is an angle between the above-mentioned mobile terminal and a horizontal plane;

上述光感传感器22,用于检测第二参数值,上述第二参数值为上述移动终端的光线强度;The photosensitive sensor 22 is used to detect a second parameter value, and the second parameter value is the light intensity of the mobile terminal;

上述接近传感器23,用于检测第三参数值,上述第三参数值为上述移动终端与人脸之间的距离;The above-mentioned proximity sensor 23 is used to detect a third parameter value, and the above-mentioned third parameter value is the distance between the above-mentioned mobile terminal and the human face;

上述处理器110,用于当检测到移动终端处于通信状态时,获取上述移动终端的系统信息,并根据上述系统信息确定上述接近传感器23的工作模式;以及用于根据上述工作模式配置上述接近传感器23的工作参数,上述系统信息包括以下至少一种:上述第一参数值,上述第二参数值,上述第三参数值。The processor 110 is configured to acquire system information of the mobile terminal when it is detected that the mobile terminal is in a communication state, and determine the working mode of the proximity sensor 23 according to the system information; and configure the proximity sensor according to the working mode 23, the above-mentioned system information includes at least one of the following: the above-mentioned first parameter value, the above-mentioned second parameter value, and the above-mentioned third parameter value.

其中,处理器110是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。可选的,处理器110可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。Among them, the processor 110 is the control center of the mobile terminal, which uses various interfaces and lines to connect various parts of the entire mobile terminal, and runs or executes software programs and/or modules stored in the memory 120, and calls stored in the memory 120. data, execute various functions of the mobile terminal and process data, so as to monitor the mobile terminal as a whole. Optionally, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 110 .

其中,移动终端还可以包括上述存储器120,上述存储器120可以存储根据工作模式配置接近传感器工作参数的配置方式,上述存储器120可用于存储软件程序以及模块,处理器110通过运行存储在存储器120的软件程序以及模块,从而执行移动终端的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据移动终端的使用所创建的数据等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Wherein, the mobile terminal can also include the above-mentioned memory 120, the above-mentioned memory 120 can store the configuration mode of configuring the working parameters of the proximity sensor according to the working mode, and the above-mentioned memory 120 can be used to store software programs and modules, and the processor 110 can run the software stored in the memory 120. Programs and modules to execute various functional applications and data processing of the mobile terminal. The memory 120 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function, etc.; the data storage area may store data created according to usage of the mobile terminal, and the like. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

其中,接近传感器可在物体靠近时,关闭显示屏和/或背光,光感传感器可检测环境光强,重力传感器可检测移动终端与水平面的夹角,另外,移动终端还可以包括加速计传感器,可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Among them, the proximity sensor can turn off the display screen and/or the backlight when the object approaches, the light sensor can detect the ambient light intensity, the gravity sensor can detect the angle between the mobile terminal and the horizontal plane, and the mobile terminal can also include an accelerometer sensor, It can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary. It can be used to identify the application of mobile phone posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition Related functions (such as pedometer, tap), etc.; As for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. that can also be configured on the mobile phone, I will not repeat them here.

可以看出,本发明实施例中,移动终端首先当检测到移动终端处于通信状态时,获取上述移动终端的系统信息,其次,根据上述系统信息确定接近传感器的工作模式;最后,根据上述工作模式配置上述接近传感器的工作参数。可见,移动终端根据通信状态时移动终端的系统信息确定接近传感器的工作模式,并根据不同的工作模式配置不同的接近传感器的工作参数,而不是将接近传感器的工作参数固定在某一个参数值,有利于提升了移动终端接近传感器参数配置的准确性和智能性。It can be seen that in the embodiment of the present invention, the mobile terminal first obtains the system information of the mobile terminal when it detects that the mobile terminal is in the communication state, and secondly, determines the working mode of the proximity sensor according to the above system information; finally, according to the above working mode Configure the working parameters of the proximity sensor above. It can be seen that the mobile terminal determines the working mode of the proximity sensor according to the system information of the mobile terminal in the communication state, and configures different working parameters of the proximity sensor according to different working modes, instead of fixing the working parameters of the proximity sensor at a certain parameter value, It is beneficial to improve the accuracy and intelligence of the parameter configuration of the proximity sensor of the mobile terminal.

在一个可能的示例中,在上述获取上述移动终端的系统信息方面,上述处理器110具体用于:获取上述移动终端的上述重力传感器21的第一参数值;In a possible example, in terms of acquiring the system information of the mobile terminal, the processor 110 is specifically configured to: acquire the first parameter value of the gravity sensor 21 of the mobile terminal;

在上述根据上述系统信息确定接近传感器23的工作模式方面,上述处理器110具体用于:当检测到上述第一参数值小于第一预设阈值时,确定上述接近传感器23的工作模式为第一工作模式;In terms of determining the working mode of the proximity sensor 23 according to the above-mentioned system information, the processor 110 is specifically configured to: determine that the working mode of the proximity sensor 23 is the first when detecting that the first parameter value is smaller than the first preset threshold. Operating mode;

在上述根据上述工作模式配置上述接近传感器23的工作参数方面,上述处理器110具体用于:根据上述第一工作模式配置上述接近传感器23的工作参数为第一工作参数,上述第一工作参数为第一预设值。In terms of configuring the working parameters of the proximity sensor 23 according to the working mode, the processor 110 is specifically configured to: configure the working parameters of the proximity sensor 23 according to the first working mode as the first working parameter, and the first working parameter is The first default value.

在一个可能的示例中,在上述获取上述移动终端的系统信息方面,上述处理器110具体用于:获取上述移动终端的上述重力传感器21的第一参数值;以及用于当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述光感传感器22的第二参数值和上述接近传感器23的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器23的最大参数值;In a possible example, in terms of acquiring the system information of the mobile terminal, the processor 110 is specifically configured to: acquire the first parameter value of the gravity sensor 21 of the mobile terminal; When the parameter value is greater than or equal to the above-mentioned first preset threshold value, the second parameter value of the above-mentioned photosensitive sensor 22 and the third parameter value of the above-mentioned proximity sensor 23 are obtained, and the above-mentioned third parameter value includes the above-mentioned The maximum parameter value of the proximity sensor 23;

在上述根据上述系统信息确定接近传感器23的工作模式方面,上述处理器110具体用于:当上述第二参数值小于第二预设阈值,上述第三参数值小于第三预设阈值时,确定上述接近传感器23的工作模式为第二工作模式;In terms of determining the working mode of the proximity sensor 23 according to the above-mentioned system information, the above-mentioned processor 110 is specifically configured to: when the above-mentioned second parameter value is smaller than the second preset threshold value, and the above-mentioned third parameter value is smaller than the third preset threshold value, determine The working mode of the proximity sensor 23 is the second working mode;

在上述根据上述工作模式配置上述接近传感器23的工作参数方面,上述处理器110具体用于:根据上述第二工作模式配置上述接近传感器23的工作参数为第二工作参数,上述第二工作参数为第二预设值。In terms of configuring the working parameters of the proximity sensor 23 according to the working mode, the processor 110 is specifically configured to: configure the working parameters of the proximity sensor 23 according to the second working mode as a second working parameter, and the second working parameter is Second default value.

在一个可能的示例中,在上述获取上述移动终端的系统信息方面,上述处理器110具体用于:获取上述移动终端的上述重力传感器21的第一参数值;以及用于当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述光感传感器22的第二参数值;In a possible example, in terms of acquiring the system information of the mobile terminal, the processor 110 is specifically configured to: acquire the first parameter value of the gravity sensor 21 of the mobile terminal; When the parameter value is greater than or equal to the first preset threshold, acquire the second parameter value of the light sensor 22;

在上述根据上述系统信息确定接近传感器23的工作模式方面,上述处理器110具体用于:当上述第二参数值大于或等于上述第二预设阈值时,确定上述接近传感器23的工作模式为第三工作模式;In terms of determining the working mode of the proximity sensor 23 according to the above-mentioned system information, the processor 110 is specifically configured to determine that the working mode of the proximity sensor 23 is the first when the second parameter value is greater than or equal to the second preset threshold. Three working modes;

在上述根据上述工作模式配置上述接近传感器23的工作参数方面,上述处理器110具体用于:根据上述第三工作模式配置上述接近传感器23的工作参数为第三工作参数,上述第三工作参数为上述接近传感器23的最小参数值与第三预设值之和,上述最小参数值为上述接近传感器23在上述光感传感器22的参数值小于上述第二预设阈值时采集到的最小参数值。In terms of configuring the working parameters of the proximity sensor 23 according to the working mode, the processor 110 is specifically configured to: configure the working parameters of the proximity sensor 23 according to the third working mode as a third working parameter, and the third working parameter is The sum of the minimum parameter value of the proximity sensor 23 and the third preset value, where the minimum parameter value is the minimum parameter value collected by the proximity sensor 23 when the parameter value of the light sensor 22 is less than the second preset threshold.

在一个可能的示例中,在上述获取上述移动终端的系统信息方面,上述处理器110具体用于:获取上述移动终端的上述重力传感器21的第一参数值;以及用于当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述接近传感器23的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器23的最大参数值;In a possible example, in terms of acquiring the system information of the mobile terminal, the processor 110 is specifically configured to: acquire the first parameter value of the gravity sensor 21 of the mobile terminal; When the parameter value is greater than or equal to the first preset threshold value, the third parameter value of the proximity sensor 23 is obtained, and the third parameter value includes the maximum parameter value of the proximity sensor 23 when the mobile terminal is in a screen-off state;

在上述根据上述系统信息确定接近传感器23的工作模式方面,上述处理器110具体用于:当上述第三参数值大于或等于上述第三预设阈值时,确定上述接近传感器23的工作模式为第四工作模式;In terms of determining the working mode of the proximity sensor 23 according to the above-mentioned system information, the processor 110 is specifically configured to determine that the working mode of the proximity sensor 23 is the first when the third parameter value is greater than or equal to the third preset threshold. Four working modes;

在上述根据上述工作模式配置上述接近传感器23的工作参数方面,上述处理器110具体用于:根据上述第四工作模式配置上述接近传感器23的工作参数为第四工作参数,上述第四工作参数为上述接近传感器23的参数值与第四预设值之和,上述参数值为上述接近传感器23所采集到的参数值,且上述参数值用于上述移动终端由亮屏状态切换为上述熄屏状态。In terms of configuring the working parameters of the proximity sensor 23 according to the above working mode, the processor 110 is specifically configured to: configure the working parameters of the proximity sensor 23 according to the fourth working mode as a fourth working parameter, and the fourth working parameter is The sum of the parameter value of the above-mentioned proximity sensor 23 and the fourth preset value, the above-mentioned parameter value is the parameter value collected by the above-mentioned proximity sensor 23, and the above-mentioned parameter value is used for the above-mentioned mobile terminal to switch from the bright screen state to the above-mentioned off-screen state .

上述主要从方法侧执行过程的角度对本发明实施例的方案进行了介绍。可以理解的是,移动终端为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。The foregoing mainly introduces the solutions of the embodiments of the present invention from the perspective of executing the process on the method side. It can be understood that, in order to realize the above functions, the mobile terminal includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that the present invention can be realized in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

本发明实施例可以根据上述方法示例对移动终端进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本发明实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the embodiment of the present invention, the functional units of the mobile terminal may be divided according to the above method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of the units in the embodiment of the present invention is schematic, and is only a logical function division, and there may be another division manner in actual implementation.

在采用集成的单元的情况下,图5示出了本实施例提供的一种移动终端的结构示意图。移动终端500包括:处理单元502和通信单元503。处理单元502用于对移动终端的动作进行控制管理,例如,处理单元502用于支持移动终端执行图1A中的步骤S101至S103、图2中的步骤S201至203以及图3中的步骤S301至S305和/或用于本文所描述的技术的其它过程。通信单元503用于支持移动终端与其他设备的通信,或者支持处理单元502与移动终端的外设(如传感器等)之间的通信。移动终端还可以包括存储单元501,用于移动终端的程序代码和数据。In the case of using integrated units, FIG. 5 shows a schematic structural diagram of a mobile terminal provided in this embodiment. The mobile terminal 500 includes: a processing unit 502 and a communication unit 503 . The processing unit 502 is used to control and manage the actions of the mobile terminal. For example, the processing unit 502 is used to support the mobile terminal to execute steps S101 to S103 in FIG. 1A, steps S201 to 203 in FIG. S305 and/or other processes for the techniques described herein. The communication unit 503 is configured to support communication between the mobile terminal and other devices, or support communication between the processing unit 502 and peripherals (such as sensors, etc.) of the mobile terminal. The mobile terminal may also include a storage unit 501 for program codes and data of the mobile terminal.

其中,处理单元502可以是处理器或控制器,例如可以是中央处理器(CentralProcessing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本发明公开内容所描述的各种示例性的逻辑方框,模块和电路。上述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信单元503可以是通信接口、收发器、收发电路、内部通信接口(处理器与外设之间的通信端口)等,可以包括一个或多个接口。存储单元501可以是存储器。Wherein, the processing unit 502 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), Field Programmable Gate Array (Field Programmable Gate Array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The above-mentioned processors may also be a combination of computing functions, for example, a combination of one or more microprocessors, a combination of DSP and a microprocessor, and so on. The communication unit 503 may be a communication interface, a transceiver, a transceiver circuit, an internal communication interface (communication port between the processor and peripherals), etc., and may include one or more interfaces. The storage unit 501 may be a memory.

其中,上述处理单元502用于当检测到移动终端处于通过上述通信单元503的通信状态时,获取上述移动终端的系统信息;以及用于根据上述系统信息确定接近传感器的工作模式;以及用于根据上述工作模式配置上述接近传感器的工作参数。Wherein, the above-mentioned processing unit 502 is used to obtain the system information of the above-mentioned mobile terminal when it is detected that the mobile terminal is in the communication state through the above-mentioned communication unit 503; and is used to determine the working mode of the proximity sensor according to the above-mentioned system information; The above working mode configures the working parameters of the above proximity sensor.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值;在上述获取上述移动终端的系统信息方面,上述处理单元502具体用于:获取上述移动终端的上述重力传感器的第一参数值;In a possible example, the system information includes a first parameter value of the gravity sensor; in terms of acquiring the system information of the mobile terminal, the processing unit 502 is specifically configured to: acquire the first parameter of the gravity sensor of the mobile terminal value;

在上述根据上述系统信息确定接近传感器的工作模式方面,上述处理单元502具体用于:当检测到上述第一参数值小于上述第一预设阈值时,确定上述接近传感器的工作模式为第一工作模式;In terms of determining the working mode of the proximity sensor based on the above system information, the processing unit 502 is specifically configured to: determine that the working mode of the proximity sensor is the first working mode when it is detected that the first parameter value is less than the first preset threshold model;

在上述根据上述工作模式配置上述接近传感器的工作参数方面,上述处理单元502具体用于:根据上述第一工作模式配置上述接近传感器的工作参数为第一工作参数,上述第一工作参数为第一预设值。In terms of configuring the working parameters of the proximity sensor according to the working mode, the processing unit 502 is specifically configured to configure the working parameters of the proximity sensor as the first working parameter according to the first working mode, and the first working parameter is the first default value.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,光感传感器的第二参数值,接近传感器的第三参数值;在上述获取上述移动终端的系统信息方面,上述处理单元502具体用于:获取上述移动终端的上述重力传感器的第一参数值;以及用于当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述光感传感器的第二参数值和上述接近传感器的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器的最大参数值;In a possible example, the system information includes a first parameter value of the gravity sensor, a second parameter value of the light sensor, and a third parameter value of the proximity sensor; in terms of obtaining the system information of the mobile terminal, the processing unit 502 is specifically used to: obtain the first parameter value of the above-mentioned gravity sensor of the above-mentioned mobile terminal; and to obtain the second parameter value of the above-mentioned light sensor when it is detected that the above-mentioned first parameter value is greater than or equal to the above-mentioned first preset threshold value value and the third parameter value of the above-mentioned proximity sensor, the above-mentioned third parameter value includes the maximum parameter value of the above-mentioned proximity sensor when the above-mentioned mobile terminal is in a screen-off state;

在上述根据上述系统信息确定接近传感器的工作模式方面,上述处理单元502具体用于:当上述第二参数值小于第二预设阈值,上述第三参数值小于第三预设阈值时,确定上述接近传感器的工作模式为第二工作模式;In terms of determining the working mode of the proximity sensor based on the above system information, the processing unit 502 is specifically configured to: determine the above-mentioned The working mode of the proximity sensor is the second working mode;

在上述根据上述工作模式配置上述接近传感器的工作参数方面,上述处理单元502具体用于:根据上述第二工作模式配置上述接近传感器的工作参数为第二工作参数,上述第二工作参数为第二预设值。In terms of configuring the working parameters of the proximity sensor according to the working mode, the processing unit 502 is specifically configured to configure the working parameters of the proximity sensor as the second working parameter according to the second working mode, and the second working parameter is the second working parameter. default value.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,光感传感器的第二参数值;在上述获取上述移动终端的系统信息方面,上述处理单元502具体用于:获取上述移动终端的上述重力传感器的第一参数值;以及用于当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述光感传感器的第二参数值;In a possible example, the system information includes the first parameter value of the gravity sensor and the second parameter value of the light sensor; in terms of acquiring the system information of the mobile terminal, the processing unit 502 is specifically configured to: acquire the mobile terminal The first parameter value of the above-mentioned gravity sensor of the terminal; and when it is detected that the above-mentioned first parameter value is greater than or equal to the above-mentioned first preset threshold value, acquiring the second parameter value of the above-mentioned light sensor;

在上述根据上述系统信息确定接近传感器的工作模式方面,上述处理单元502具体用于:当上述第二参数值大于或等于上述第二预设阈值时,确定上述接近传感器的工作模式为第三工作模式;In terms of determining the working mode of the proximity sensor based on the above system information, the processing unit 502 is specifically configured to: determine that the working mode of the proximity sensor is the third working mode when the second parameter value is greater than or equal to the second preset threshold model;

在上述根据上述工作模式配置上述接近传感器的工作参数方面,上述处理单元502具体用于:根据上述第三工作模式配置上述接近传感器的工作参数为第三工作参数,上述第三工作参数为上述接近传感器的最小参数值与第三预设值之和,上述最小参数值为上述接近传感器在上述光感传感器的参数值小于上述第二预设阈值时采集到的最小参数值。In terms of configuring the working parameters of the proximity sensor according to the working mode, the processing unit 502 is specifically configured to: configure the working parameters of the proximity sensor according to the third working mode as a third working parameter, and the third working parameter is the proximity The sum of the minimum parameter value of the sensor and a third preset value, where the minimum parameter value is the minimum parameter value collected by the proximity sensor when the parameter value of the light sensor is less than the second preset threshold.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,接近传感器的第三参数值;在上述获取上述移动终端的系统信息方面,上述处理单元502具体用于:获取上述移动终端的上述重力传感器的第一参数值;以及当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述接近传感器的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器的最大参数值;In a possible example, the above-mentioned system information includes the first parameter value of the gravity sensor and the third parameter value of the proximity sensor; in terms of obtaining the system information of the above-mentioned mobile terminal, the above-mentioned processing unit 502 is specifically configured to: obtain the above-mentioned mobile terminal the first parameter value of the above-mentioned gravity sensor; and when it is detected that the above-mentioned first parameter value is greater than or equal to the above-mentioned first preset threshold value, obtain the third parameter value of the above-mentioned proximity sensor, and the above-mentioned third parameter value includes that the above-mentioned mobile terminal is in The maximum parameter value of the proximity sensor mentioned above when the screen is off;

在上述根据上述系统信息确定接近传感器的工作模式方面,上述处理单元502具体用于:当上述第三参数值大于或等于上述第三预设阈值时,确定上述接近传感器的工作模式为第四工作模式;In terms of determining the working mode of the proximity sensor based on the above system information, the processing unit 502 is specifically configured to: determine that the working mode of the proximity sensor is the fourth working mode when the third parameter value is greater than or equal to the third preset threshold model;

在上述根据上述工作模式配置上述接近传感器的工作参数方面,上述处理单元502具体用于:根据上述第四工作模式配置上述接近传感器的工作参数为第四工作参数,上述第四工作参数为上述接近传感器的参数值与第四预设值之和,上述参数值为上述接近传感器所采集到的参数值,且上述参数值用于上述移动终端由亮屏状态切换为上述熄屏状态。In terms of configuring the working parameters of the proximity sensor according to the working mode, the processing unit 502 is specifically configured to: configure the working parameters of the proximity sensor according to the fourth working mode as the fourth working parameter, and the fourth working parameter is the proximity The sum of the parameter value of the sensor and the fourth preset value, the above parameter value is the parameter value collected by the proximity sensor, and the above parameter value is used for the above mobile terminal to switch from the on-screen state to the above-mentioned off-screen state.

可以理解的是,本实施例的移动终端500的各程序模块的功能可根据上述方法实施例中的方法具体实现,其具体实现过程可以参照上述方法实施例的相关描述,此处不再赘述。It can be understood that the functions of the program modules of the mobile terminal 500 in this embodiment can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can refer to the relevant descriptions of the above method embodiments, and will not be repeated here.

与上述图1A所示的实施例一致的,请参阅图6,图6是本发明实施例提供的一种移动终端,包括:处理器,存储器,通信接口以及一个或多个程序;其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述一个或多个处理器执行,上述程序包括用于执行以下步骤的指令;Consistent with the above-mentioned embodiment shown in FIG. 1A, please refer to FIG. 6. FIG. 6 is a mobile terminal provided by an embodiment of the present invention, including: a processor, a memory, a communication interface, and one or more programs; wherein, the above-mentioned One or more programs are stored in the above-mentioned memory and are configured to be executed by the above-mentioned one or more processors, the above-mentioned programs include instructions for performing the following steps;

当检测到移动终端处于通信状态时,获取上述移动终端的系统信息;When detecting that the mobile terminal is in a communication state, acquiring system information of the mobile terminal;

根据上述系统信息确定接近传感器的工作模式;Determine the working mode of the proximity sensor according to the above system information;

根据上述工作模式配置上述接近传感器的工作参数。The working parameters of the proximity sensor are configured according to the working mode.

可以看出,本发明实施例中,移动终端首先当检测到移动终端处于通信状态时,获取上述移动终端的系统信息,其次,根据上述系统信息确定接近传感器的工作模式;最后,根据上述工作模式配置上述接近传感器的工作参数。可见,移动终端根据通信状态时移动终端的系统信息确定接近传感器的工作模式,并根据不同的工作模式配置不同的接近传感器的工作参数,而不是将接近传感器的工作参数固定在某一个参数值,有利于提升了移动终端接近传感器参数配置的准确性和智能性。It can be seen that in the embodiment of the present invention, the mobile terminal first obtains the system information of the mobile terminal when it detects that the mobile terminal is in the communication state, and secondly, determines the working mode of the proximity sensor according to the above system information; finally, according to the above working mode Configure the working parameters of the proximity sensor above. It can be seen that the mobile terminal determines the working mode of the proximity sensor according to the system information of the mobile terminal in the communication state, and configures different working parameters of the proximity sensor according to different working modes, instead of fixing the working parameters of the proximity sensor at a certain parameter value, It is beneficial to improve the accuracy and intelligence of the parameter configuration of the proximity sensor of the mobile terminal.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值;在上述获取上述移动终端的系统信息方面,上述程序中的指令具体用于执行以下步骤:获取上述移动终端的上述重力传感器的第一参数值;In a possible example, the above-mentioned system information includes the first parameter value of the gravity sensor; in terms of obtaining the above-mentioned system information of the above-mentioned mobile terminal, the instructions in the above-mentioned program are specifically used to perform the following steps: obtaining the above-mentioned gravity sensor of the above-mentioned mobile terminal The value of the first parameter;

在上述根据上述系统信息确定接近传感器的工作模式方面,上述程序中的指令具体用于执行以下步骤:当检测到上述第一参数值小于上述第一预设阈值时,确定上述接近传感器的工作模式为第一工作模式;In terms of determining the working mode of the proximity sensor according to the above-mentioned system information, the instructions in the above-mentioned program are specifically used to perform the following steps: when it is detected that the first parameter value is less than the first preset threshold value, determine the working mode of the proximity sensor is the first working mode;

在上述根据上述工作模式配置上述接近传感器的工作参数方面,上述程序中的指令具体用于执行以下步骤:根据上述第一工作模式配置上述接近传感器的工作参数为第一工作参数,上述第一工作参数为第一预设值。In terms of configuring the working parameters of the above-mentioned proximity sensor according to the above-mentioned working mode, the instructions in the above-mentioned program are specifically used to perform the following steps: according to the above-mentioned first working mode, the working parameters of the above-mentioned proximity sensor are configured as the first working parameter, and the above-mentioned first working The parameter is a first preset value.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,光感传感器的第二参数值,接近传感器的第三参数值;在上述获取上述移动终端的系统信息方面,上述程序中的指令具体用于执行以下步骤:获取上述移动终端的上述重力传感器的第一参数值;以及用于当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述光感传感器的第二参数值和上述接近传感器的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器的最大参数值;In a possible example, the above system information includes the first parameter value of the gravity sensor, the second parameter value of the light sensor, and the third parameter value of the proximity sensor; The instructions are specifically used to perform the following steps: acquire the first parameter value of the above-mentioned gravity sensor of the above-mentioned mobile terminal; The second parameter value of the above-mentioned proximity sensor and the third parameter value of the above-mentioned proximity sensor, the above-mentioned third parameter value includes the maximum parameter value of the above-mentioned proximity sensor when the above-mentioned mobile terminal is in a screen-off state;

在上述根据上述系统信息确定接近传感器的工作模式方面,上述程序中的指令具体用于执行以下步骤:当上述第二参数值小于第二预设阈值,上述第三参数值小于第三预设阈值时,确定上述接近传感器的工作模式为第二工作模式;In terms of determining the working mode of the proximity sensor based on the above system information, the instructions in the above program are specifically used to perform the following steps: when the above second parameter value is less than the second preset threshold value, the above third parameter value is less than the third preset threshold value , determine that the working mode of the proximity sensor is the second working mode;

在上述根据上述工作模式配置上述接近传感器的工作参数方面,上述程序中的指令具体用于执行以下步骤:根据上述第二工作模式配置上述接近传感器的工作参数为第二工作参数,上述第二工作参数为第二预设值。In terms of configuring the working parameters of the above-mentioned proximity sensor according to the above-mentioned working mode, the instructions in the above-mentioned program are specifically used to perform the following steps: according to the above-mentioned second working mode, the working parameters of the above-mentioned proximity sensor are configured as the second working parameter, and the above-mentioned second working The parameter is a second preset value.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,光感传感器的第二参数值;在上述获取上述移动终端的系统信息方面,上述程序中的指令具体用于执行以下步骤:获取上述移动终端的上述重力传感器的第一参数值;以及用于当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述光感传感器的第二参数值;In a possible example, the above system information includes the first parameter value of the gravity sensor and the second parameter value of the light sensor; in terms of obtaining the system information of the above mobile terminal, the instructions in the above program are specifically used to perform the following steps : Acquiring a first parameter value of the gravity sensor of the mobile terminal; and acquiring a second parameter value of the light sensor when it is detected that the first parameter value is greater than or equal to the first preset threshold;

在上述根据上述系统信息确定接近传感器的工作模式方面,上述程序中的指令具体用于执行以下步骤:当上述第二参数值大于或等于上述第二预设阈值时,确定上述接近传感器的工作模式为第三工作模式;In terms of determining the working mode of the proximity sensor according to the above-mentioned system information, the instructions in the above-mentioned program are specifically used to perform the following steps: when the value of the second parameter is greater than or equal to the second preset threshold, determine the working mode of the proximity sensor is the third working mode;

在上述根据上述工作模式配置上述接近传感器的工作参数方面,上述程序中的指令具体用于执行以下步骤:根据上述第三工作模式配置上述接近传感器的工作参数为第三工作参数,上述第三工作参数为上述接近传感器的最小参数值与第三预设值之和,上述最小参数值为上述接近传感器在上述光感传感器的参数值小于上述第二预设阈值时采集到的最小参数值。In terms of configuring the working parameters of the above-mentioned proximity sensor according to the above-mentioned working mode, the instructions in the above-mentioned program are specifically used to perform the following steps: according to the above-mentioned third working mode, the working parameters of the above-mentioned proximity sensor are configured as the third working parameter, and the above-mentioned third working The parameter is the sum of the minimum parameter value of the proximity sensor and the third preset value, and the minimum parameter value is the minimum parameter value collected by the proximity sensor when the parameter value of the light sensor is less than the second preset threshold.

在一个可能的示例中,上述系统信息包括重力传感器的第一参数值,接近传感器的第三参数值;在上述获取上述移动终端的系统信息,上述程序中的指令具体用于执行以下步骤:获取上述移动终端的上述重力传感器的第一参数值;以及用于当检测到上述第一参数值大于或等于上述第一预设阈值时,获取上述接近传感器的第三参数值,上述第三参数值包括上述移动终端处于熄屏状态时上述接近传感器的最大参数值;In a possible example, the above-mentioned system information includes the first parameter value of the gravity sensor and the third parameter value of the proximity sensor; in the above-mentioned acquisition of the system information of the mobile terminal, the instructions in the above-mentioned program are specifically used to perform the following steps: The first parameter value of the above-mentioned gravity sensor of the above-mentioned mobile terminal; and when it is detected that the above-mentioned first parameter value is greater than or equal to the above-mentioned first preset threshold value, acquiring the third parameter value of the above-mentioned proximity sensor, the above-mentioned third parameter value Including the maximum parameter value of the above-mentioned proximity sensor when the above-mentioned mobile terminal is in the off-screen state;

在上述根据上述系统信息确定接近传感器的工作模式上述程序中的指令具体用于执行以下步骤:当上述第三参数值大于或等于上述第三预设阈值时,确定上述接近传感器的工作模式为第四工作模式;The instructions in the above program for determining the working mode of the proximity sensor according to the above system information are specifically used to perform the following steps: when the value of the third parameter is greater than or equal to the third preset threshold value, determine the working mode of the proximity sensor as the first Four working modes;

在上述根据上述工作模式配置上述接近传感器的工作参数上述程序中的指令具体用于执行以下步骤:根据上述第四工作模式配置上述接近传感器的工作参数为第四工作参数,上述第四工作参数为上述接近传感器的参数值与第四预设值之和,上述参数值为上述接近传感器所采集到的参数值,且上述参数值用于上述移动终端由亮屏状态切换为上述熄屏状态。The instructions in the above program for configuring the working parameters of the proximity sensor according to the above working mode are specifically used to perform the following steps: configuring the working parameters of the proximity sensor according to the fourth working mode as the fourth working parameter, and the fourth working parameter is The sum of the parameter value of the proximity sensor and the fourth preset value, the parameter value is the parameter value collected by the proximity sensor, and the parameter value is used for the mobile terminal to switch from the screen-on state to the screen-off state.

本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种参数配置方法的部分或全部步骤,上述计算机包括移动终端。An embodiment of the present invention also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables the computer to execute any part of the parameter configuration method described in the above method embodiments or all the steps, the above-mentioned computer includes a mobile terminal.

本发明实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种参数配置方法的部分或全部步骤,上述计算机包括移动终端。An embodiment of the present invention also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable the computer to execute any one of the methods described in the above method embodiments. Part or all of the steps of the parameter configuration method, the above-mentioned computer includes a mobile terminal.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Because of the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

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

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

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

上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the above-mentioned integrated units are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable memory. Based on this understanding, the essence of the technical solution of the present invention 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 memory. Several instructions are included to make a computer device (which may be a personal computer, server or network device, etc.) execute all or part of the steps of the above-mentioned methods in various embodiments of the present invention. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviated: ROM), random access device (English: Random Access Memory, abbreviated: RAM), magnetic disk or optical disk, etc.

以上对本发明实施例进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The embodiments of the present invention have been described in detail above, and specific examples have been used in this paper to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only used to help understand the method and core idea of the present invention; at the same time, for Those skilled in the art will have changes in the specific implementation and scope of application according to the idea of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims (13)

1.一种参数配置方法,其特征在于,包括:1. A parameter configuration method, characterized in that, comprising: 当检测到移动终端处于通信状态时,获取所述移动终端的系统信息;When detecting that the mobile terminal is in a communication state, acquiring system information of the mobile terminal; 根据所述系统信息确定接近传感器的工作模式;determining the working mode of the proximity sensor according to the system information; 根据所述工作模式配置所述接近传感器的工作参数。Working parameters of the proximity sensor are configured according to the working mode. 2.根据权利要求1所述的方法,其特征在于,所述系统信息包括重力传感器的第一参数值;所述获取所述移动终端的系统信息,包括:2. The method according to claim 1, wherein the system information includes the first parameter value of the gravity sensor; the acquiring the system information of the mobile terminal includes: 获取所述移动终端的所述重力传感器的第一参数值;acquiring a first parameter value of the gravity sensor of the mobile terminal; 所述根据所述系统信息确定接近传感器的工作模式,包括:The determining the working mode of the proximity sensor according to the system information includes: 当检测到所述第一参数值小于所述第一预设阈值时,确定所述接近传感器的工作模式为第一工作模式;When it is detected that the first parameter value is less than the first preset threshold, determine that the working mode of the proximity sensor is the first working mode; 所述根据所述工作模式配置所述接近传感器的工作参数,包括:The configuring the working parameters of the proximity sensor according to the working mode includes: 根据所述第一工作模式配置所述接近传感器的工作参数为第一工作参数,所述第一工作参数为第一预设值。The working parameter of the proximity sensor is configured as a first working parameter according to the first working mode, and the first working parameter is a first preset value. 3.根据权利要求1所述的方法,其特征在于,所述系统信息包括重力传感器的第一参数值,光感传感器的第二参数值,接近传感器的第三参数值;所述获取所述移动终端的系统信息,包括:3. The method according to claim 1, wherein the system information includes a first parameter value of a gravity sensor, a second parameter value of a light sensor, and a third parameter value of a proximity sensor; System information of the mobile terminal, including: 获取所述移动终端的所述重力传感器的第一参数值;acquiring a first parameter value of the gravity sensor of the mobile terminal; 当检测到所述第一参数值大于或等于所述第一预设阈值时,获取所述光感传感器的第二参数值和所述接近传感器的第三参数值,所述第三参数值包括所述移动终端处于熄屏状态时所述接近传感器的最大参数值;When it is detected that the first parameter value is greater than or equal to the first preset threshold, acquire a second parameter value of the light sensor and a third parameter value of the proximity sensor, the third parameter value includes The maximum parameter value of the proximity sensor when the mobile terminal is in a screen-off state; 所述根据所述系统信息确定接近传感器的工作模式,包括:The determining the working mode of the proximity sensor according to the system information includes: 当所述第二参数值小于第二预设阈值,所述第三参数值小于第三预设阈值时,确定所述接近传感器的工作模式为第二工作模式;When the second parameter value is less than a second preset threshold and the third parameter value is less than a third preset threshold, it is determined that the working mode of the proximity sensor is the second working mode; 所述根据所述工作模式配置所述接近传感器的工作参数,包括:The configuring the working parameters of the proximity sensor according to the working mode includes: 根据所述第二工作模式配置所述接近传感器的工作参数为第二工作参数,所述第二工作参数为第二预设值。The working parameter of the proximity sensor is configured as a second working parameter according to the second working mode, and the second working parameter is a second preset value. 4.根据权利要求1所述的方法,其特征在于,所述系统信息包括重力传感器的第一参数值,光感传感器的第二参数值;所述获取所述移动终端的系统信息,包括:4. The method according to claim 1, wherein the system information includes a first parameter value of a gravity sensor and a second parameter value of a light sensor; the acquisition of the system information of the mobile terminal includes: 获取所述移动终端的所述重力传感器的第一参数值;acquiring a first parameter value of the gravity sensor of the mobile terminal; 当检测到所述第一参数值大于或等于所述第一预设阈值时,获取所述光感传感器的第二参数值;When it is detected that the first parameter value is greater than or equal to the first preset threshold value, acquiring a second parameter value of the light sensor; 所述根据所述系统信息确定接近传感器的工作模式,包括:The determining the working mode of the proximity sensor according to the system information includes: 当所述第二参数值大于或等于所述第二预设阈值时,确定所述接近传感器的工作模式为第三工作模式;When the second parameter value is greater than or equal to the second preset threshold, determine that the working mode of the proximity sensor is a third working mode; 所述根据所述工作模式配置所述接近传感器的工作参数,包括:The configuring the working parameters of the proximity sensor according to the working mode includes: 根据所述第三工作模式配置所述接近传感器的工作参数为第三工作参数,所述第三工作参数为所述接近传感器的最小参数值与第三预设值之和,所述最小参数值为所述接近传感器在所述光感传感器的参数值小于所述第二预设阈值时采集到的最小参数值。Configure the working parameter of the proximity sensor as a third working parameter according to the third working mode, the third working parameter is the sum of the minimum parameter value of the proximity sensor and a third preset value, the minimum parameter value is the minimum parameter value collected by the proximity sensor when the parameter value of the light sensor is less than the second preset threshold. 5.根据权利要求1所述的方法,其特征在于,所述系统信息包括重力传感器的第一参数值,接近传感器的第三参数值;所述获取所述移动终端的系统信息,包括:5. The method according to claim 1, wherein the system information includes a first parameter value of a gravity sensor and a third parameter value of a proximity sensor; the acquisition of the system information of the mobile terminal includes: 获取所述移动终端的所述重力传感器的第一参数值;acquiring a first parameter value of the gravity sensor of the mobile terminal; 当检测到所述第一参数值大于或等于所述第一预设阈值时,获取所述接近传感器的第三参数值,所述第三参数值包括所述移动终端处于熄屏状态时所述接近传感器的最大参数值;When it is detected that the first parameter value is greater than or equal to the first preset threshold value, a third parameter value of the proximity sensor is obtained, and the third parameter value includes the The maximum parameter value of the proximity sensor; 所述根据所述系统信息确定接近传感器的工作模式,包括:The determining the working mode of the proximity sensor according to the system information includes: 当所述第三参数值大于或等于所述第三预设阈值时,确定所述接近传感器的工作模式为第四工作模式;When the third parameter value is greater than or equal to the third preset threshold, determine that the working mode of the proximity sensor is a fourth working mode; 所述根据所述工作模式配置所述接近传感器的工作参数,包括:The configuring the working parameters of the proximity sensor according to the working mode includes: 根据所述第四工作模式配置所述接近传感器的工作参数为第四工作参数,所述第四工作参数为所述接近传感器的参数值与第四预设值之和,所述参数值为所述接近传感器所采集到的参数值,且所述参数值用于所述移动终端由亮屏状态切换为所述熄屏状态。According to the fourth working mode, the working parameter of the proximity sensor is configured as a fourth working parameter, the fourth working parameter is the sum of the parameter value of the proximity sensor and a fourth preset value, and the parameter value is set as The parameter value collected by the proximity sensor is used for the mobile terminal to switch from the screen-on state to the screen-off state. 6.一种移动终端,其特征在于,包括处理器,与所述处理器连接的重力传感器、光感传感器、接近传感器,其中:6. A mobile terminal, characterized in that it includes a processor, a gravity sensor connected to the processor, a light sensor, and a proximity sensor, wherein: 所述重力传感器,用于检测第一参数值,所述第一参数值为所述移动终端与水平面的夹角;The gravity sensor is used to detect a first parameter value, and the first parameter value is an angle between the mobile terminal and a horizontal plane; 所述光感传感器,用于检测第二参数值,所述第二参数值为所述移动终端的光线强度;The photosensitive sensor is used to detect a second parameter value, and the second parameter value is the light intensity of the mobile terminal; 所述接近传感器,用于检测第三参数值,所述第三参数值为所述移动终端与人脸之间的距离;The proximity sensor is used to detect a third parameter value, and the third parameter value is the distance between the mobile terminal and the human face; 所述处理器,用于当检测到移动终端处于通信状态时,获取所述移动终端的系统信息,并根据所述系统信息确定所述接近传感器的工作模式;以及用于根据所述工作模式配置所述接近传感器的工作参数,所述系统信息包括以下至少一种:所述第一参数值,所述第二参数值,所述第三参数值。The processor is configured to acquire system information of the mobile terminal when it is detected that the mobile terminal is in a communication state, and determine the working mode of the proximity sensor according to the system information; and configure the proximity sensor according to the working mode The working parameters of the proximity sensor, the system information includes at least one of the following: the first parameter value, the second parameter value, and the third parameter value. 7.根据权利要求6所述的移动终端,其特征在于,在所述获取所述移动终端的系统信息方面,所述处理器具体用于:获取所述移动终端的所述重力传感器的第一参数值;7. The mobile terminal according to claim 6, wherein, in terms of acquiring the system information of the mobile terminal, the processor is specifically configured to: acquire the first value of the gravity sensor of the mobile terminal parameter value; 在所述根据所述系统信息确定接近传感器的工作模式方面,所述处理器具体用于:当检测到所述第一参数值小于第一预设阈值时,确定所述接近传感器的工作模式为第一工作模式;In terms of determining the working mode of the proximity sensor according to the system information, the processor is specifically configured to: when detecting that the first parameter value is less than a first preset threshold, determine that the working mode of the proximity sensor is first working mode; 在所述根据所述工作模式配置所述接近传感器的工作参数方面,所述处理器具体用于:根据所述第一工作模式配置所述接近传感器的工作参数为第一工作参数,所述第一工作参数为第一预设值。In terms of configuring the working parameters of the proximity sensor according to the working mode, the processor is specifically configured to: configure the working parameters of the proximity sensor according to the first working mode as a first working parameter, the second A working parameter is a first preset value. 8.根据权利要求6所述的移动终端,其特征在于,在所述获取所述移动终端的系统信息方面,所述处理器具体用于:获取所述移动终端的所述重力传感器的第一参数值;以及用于当检测到所述第一参数值大于或等于所述第一预设阈值时,获取所述光感传感器的第二参数值和所述接近传感器的第三参数值,所述第三参数值包括所述移动终端处于熄屏状态时所述接近传感器的最大参数值;8. The mobile terminal according to claim 6, wherein, in terms of acquiring the system information of the mobile terminal, the processor is specifically configured to: acquire the first value of the gravity sensor of the mobile terminal parameter value; and used to obtain a second parameter value of the light sensor and a third parameter value of the proximity sensor when it is detected that the first parameter value is greater than or equal to the first preset threshold value, the The third parameter value includes the maximum parameter value of the proximity sensor when the mobile terminal is in a screen-off state; 在所述根据所述系统信息确定接近传感器的工作模式方面,所述处理器具体用于:当所述第二参数值小于第二预设阈值,所述第三参数值小于第三预设阈值时,确定所述接近传感器的工作模式为第二工作模式;In terms of determining the working mode of the proximity sensor according to the system information, the processor is specifically configured to: when the second parameter value is less than a second preset threshold, the third parameter value is less than a third preset threshold , determining that the working mode of the proximity sensor is the second working mode; 在所述根据所述工作模式配置所述接近传感器的工作参数方面,所述处理器具体用于:根据所述第二工作模式配置所述接近传感器的工作参数为第二工作参数,所述第二工作参数为第二预设值。In terms of configuring the working parameters of the proximity sensor according to the working mode, the processor is specifically configured to: configure the working parameters of the proximity sensor according to the second working mode as a second working parameter, the first The second working parameter is a second preset value. 9.根据权利要求6所述的移动终端,其特征在于,在所述获取所述移动终端的系统信息方面,所述处理器具体用于:获取所述移动终端的所述重力传感器的第一参数值;以及用于当检测到所述第一参数值大于或等于所述第一预设阈值时,获取所述光感传感器的第二参数值;9. The mobile terminal according to claim 6, wherein, in terms of acquiring the system information of the mobile terminal, the processor is specifically configured to: acquire the first value of the gravity sensor of the mobile terminal a parameter value; and for obtaining a second parameter value of the light sensor when it is detected that the first parameter value is greater than or equal to the first preset threshold; 在所述根据所述系统信息确定接近传感器的工作模式方面,所述处理器具体用于:当所述第二参数值大于或等于所述第二预设阈值时,确定所述接近传感器的工作模式为第三工作模式;In terms of determining the working mode of the proximity sensor according to the system information, the processor is specifically configured to: determine the working mode of the proximity sensor when the second parameter value is greater than or equal to the second preset threshold The mode is the third working mode; 在所述根据所述工作模式配置所述接近传感器的工作参数方面,所述处理器具体用于:根据所述第三工作模式配置所述接近传感器的工作参数为第三工作参数,所述第三工作参数为所述接近传感器的最小参数值与第三预设值之和,所述最小参数值为所述接近传感器在所述光感传感器的参数值小于所述第二预设阈值时采集到的最小参数值。In terms of configuring the working parameters of the proximity sensor according to the working mode, the processor is specifically configured to: configure the working parameters of the proximity sensor according to the third working mode as a third working parameter, the first The three working parameters are the sum of the minimum parameter value of the proximity sensor and the third preset value, and the minimum parameter value is collected by the proximity sensor when the parameter value of the light sensor is less than the second preset threshold to the minimum parameter value. 10.根据权利要求6所述的移动终端,其特征在于,在所述获取所述移动终端的系统信息方面,所述处理器具体用于:获取所述移动终端的所述重力传感器的第一参数值;以及用于当检测到所述第一参数值大于或等于所述第一预设阈值时,获取所述接近传感器的第三参数值,所述第三参数值包括所述移动终端处于熄屏状态时所述接近传感器的最大参数值;10. The mobile terminal according to claim 6, wherein, in terms of acquiring the system information of the mobile terminal, the processor is specifically configured to: acquire the first value of the gravity sensor of the mobile terminal parameter value; and used to obtain a third parameter value of the proximity sensor when it is detected that the first parameter value is greater than or equal to the first preset threshold value, the third parameter value includes that the mobile terminal is in The maximum parameter value of the proximity sensor when the screen is off; 在所述根据所述系统信息确定接近传感器的工作模式方面,所述处理器具体用于:当所述第三参数值大于或等于所述第三预设阈值时,确定所述接近传感器的工作模式为第四工作模式;In terms of determining the working mode of the proximity sensor according to the system information, the processor is specifically configured to: determine the working mode of the proximity sensor when the third parameter value is greater than or equal to the third preset threshold The mode is the fourth working mode; 在所述根据所述工作模式配置所述接近传感器的工作参数方面,所述处理器具体用于:根据所述第四工作模式配置所述接近传感器的工作参数为第四工作参数,所述第四工作参数为所述接近传感器的参数值与第四预设值之和,所述参数值为所述接近传感器所采集到的参数值,且所述参数值用于所述移动终端由亮屏状态切换为所述熄屏状态。In terms of configuring the working parameter of the proximity sensor according to the working mode, the processor is specifically configured to: configure the working parameter of the proximity sensor according to the fourth working mode as a fourth working parameter, the first The fourth working parameter is the sum of the parameter value of the proximity sensor and the fourth preset value, the parameter value is the parameter value collected by the proximity sensor, and the parameter value is used for the bright screen of the mobile terminal The state switches to the screen-off state. 11.一种移动终端,其特征在于,所述移动终端包括处理单元和通信单元,11. A mobile terminal, characterized in that the mobile terminal includes a processing unit and a communication unit, 所述处理单元用于当检测到移动终端处于通过所述通信单元的通信状态时,获取所述移动终端的系统信息;以及用于根据所述系统信息确定接近传感器的工作模式;以及用于根据所述工作模式配置所述接近传感器的工作参数。The processing unit is used to obtain the system information of the mobile terminal when it is detected that the mobile terminal is in the communication state through the communication unit; and to determine the working mode of the proximity sensor according to the system information; The working mode configures working parameters of the proximity sensor. 12.一种移动终端,其特征在于,包括:处理器,存储器,以及一个或多个程序;所述一个或多个程序被存储在所述存储器中,并且被配置成由所述处理器执行,所述程序包括用于执行如权利要求1-5任一项所描述的方法中的步骤的指令。12. A mobile terminal, comprising: a processor, a memory, and one or more programs; the one or more programs are stored in the memory and are configured to be executed by the processor , the program includes instructions for executing the steps in the method described in any one of claims 1-5. 13.一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-5任一项所述的方法,所述计算机包括移动终端。13. A computer-readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes the computer to execute the method according to any one of claims 1-5, the computer including mobile terminals.
CN201710673367.3A 2017-08-08 2017-08-08 Parameter configuration method and related products Pending CN107566161A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710673367.3A CN107566161A (en) 2017-08-08 2017-08-08 Parameter configuration method and related products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710673367.3A CN107566161A (en) 2017-08-08 2017-08-08 Parameter configuration method and related products

Publications (1)

Publication Number Publication Date
CN107566161A true CN107566161A (en) 2018-01-09

Family

ID=60975032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710673367.3A Pending CN107566161A (en) 2017-08-08 2017-08-08 Parameter configuration method and related products

Country Status (1)

Country Link
CN (1) CN107566161A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989576A (en) * 2018-09-11 2018-12-11 Oppo广东移动通信有限公司 Variable value adjustment method and device, storage medium and mobile terminal
CN109510896A (en) * 2018-10-24 2019-03-22 Oppo广东移动通信有限公司 Selection method, device, storage medium and the electronic equipment of proximity sensor
CN109547629A (en) * 2018-11-07 2019-03-29 华为技术有限公司 A kind of control method and electronic equipment close to optical sensor
CN110381200A (en) * 2019-07-08 2019-10-25 维沃移动通信有限公司 It goes out and shields control method and mobile terminal
WO2025194917A1 (en) * 2024-03-22 2025-09-25 华为技术有限公司 Accidental touch prevention method and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150077354A1 (en) * 2013-09-13 2015-03-19 Inventec Appliances (Jiangning) Corporation Screen Control System of Handheld Devices and Method Thereof
CN104618565A (en) * 2013-11-04 2015-05-13 深圳富泰宏精密工业有限公司 Anti-misoperation electronic device and method
CN106094055A (en) * 2016-06-21 2016-11-09 广东欧珀移动通信有限公司 Calibration method and terminal for proximity sensor
CN106131345A (en) * 2016-08-29 2016-11-16 广东欧珀移动通信有限公司 The control method of a kind of proximity transducer, device and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150077354A1 (en) * 2013-09-13 2015-03-19 Inventec Appliances (Jiangning) Corporation Screen Control System of Handheld Devices and Method Thereof
CN104618565A (en) * 2013-11-04 2015-05-13 深圳富泰宏精密工业有限公司 Anti-misoperation electronic device and method
CN106094055A (en) * 2016-06-21 2016-11-09 广东欧珀移动通信有限公司 Calibration method and terminal for proximity sensor
CN106131345A (en) * 2016-08-29 2016-11-16 广东欧珀移动通信有限公司 The control method of a kind of proximity transducer, device and mobile terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989576A (en) * 2018-09-11 2018-12-11 Oppo广东移动通信有限公司 Variable value adjustment method and device, storage medium and mobile terminal
CN109510896A (en) * 2018-10-24 2019-03-22 Oppo广东移动通信有限公司 Selection method, device, storage medium and the electronic equipment of proximity sensor
CN109510896B (en) * 2018-10-24 2020-12-01 Oppo广东移动通信有限公司 Proximity sensor selection method, device, storage medium and electronic device
CN109547629A (en) * 2018-11-07 2019-03-29 华为技术有限公司 A kind of control method and electronic equipment close to optical sensor
WO2020093833A1 (en) * 2018-11-07 2020-05-14 华为技术有限公司 Method for controlling proximity light sensor, and electronic device
CN110381200A (en) * 2019-07-08 2019-10-25 维沃移动通信有限公司 It goes out and shields control method and mobile terminal
WO2025194917A1 (en) * 2024-03-22 2025-09-25 华为技术有限公司 Accidental touch prevention method and electronic device

Similar Documents

Publication Publication Date Title
CN107943345B (en) Calibration method, device, storage medium and electronic device for proximity sensor
CN106412249B (en) Drop information detection method and device
CN111106821B (en) A touch control method and wearable device
CN106357897B (en) Method and device for acquiring falling information
CN106357925B (en) Switching method, device and terminal for screen brightness adjustment mode
CN106303023B (en) Screen state adjusting method and device
EP3435199A2 (en) Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen
JP7329150B2 (en) Touch button, control method and electronic device
CN107102864A (en) One kind puts out screen control method, device, storage medium and terminal
CN107731146A (en) Brightness adjusting method and related product
CN107566161A (en) Parameter configuration method and related products
CN109067981B (en) Split-screen application switching method, device, storage medium and electronic device
CN106453829A (en) Method and device for detecting drop height
US11327639B2 (en) Split view exiting method, split view exiting device, and electronic device
CN105141854A (en) Flash control method, device and terminal equipment
CN107942306A (en) Calibration method, device, storage medium and electronic equipment for proximity sensor
CN108595000A (en) screen brightness adjusting method and device
JP2023521661A (en) Display method and electronic equipment
CN106850983A (en) Screen off control method, device and terminal
CN106951850A (en) Method and mobile terminal for controlling fingerprint identification module
CN106646440A (en) Drop height detection method and drop height detection device
CN111064847B (en) False touch prevention method and device, storage medium and electronic equipment
CN108418969A (en) Antenna feed point switching method and device, storage medium and electronic equipment
CN107317918B (en) Parameter setting method and related products
CN104915625B (en) A method and device for face recognition

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
CB02 Change of applicant information
CB02 Change of applicant information

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

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

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

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180109