[go: up one dir, main page]

CN110753155A - Proximity detection method and terminal equipment - Google Patents

Proximity detection method and terminal equipment Download PDF

Info

Publication number
CN110753155A
CN110753155A CN201910907360.2A CN201910907360A CN110753155A CN 110753155 A CN110753155 A CN 110753155A CN 201910907360 A CN201910907360 A CN 201910907360A CN 110753155 A CN110753155 A CN 110753155A
Authority
CN
China
Prior art keywords
terminal device
screen
state
information
blocked
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
CN201910907360.2A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910907360.2A priority Critical patent/CN110753155A/en
Publication of CN110753155A publication Critical patent/CN110753155A/en
Priority to PCT/CN2020/116783 priority patent/WO2021057712A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0267Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components
    • H04W52/027Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components by controlling a display operation or backlight unit
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明实施例公开了一种接近检测方法及终端设备,涉及通信技术领域,用以解决传统技术超声检测方案检测终端设备的屏幕被遮挡的准确性较低的问题。该方法包括:在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。

Figure 201910907360

Embodiments of the present invention disclose a proximity detection method and a terminal device, which relate to the field of communication technologies and are used to solve the problem of low accuracy in detecting that a screen of a terminal device is blocked by a conventional ultrasonic detection solution. The method includes: when it is determined according to an ultrasonic sensor of the terminal device that a first object blocks the terminal device within a first preset distance, acquiring state information of the terminal device, where the state information is used to determine whether the first object blocks the terminal device is the first screen of the terminal device; if it is determined that the first screen is blocked by the first object, the first screen is controlled to be switched from the bright screen state to the off screen state.

Figure 201910907360

Description

一种接近检测方法及终端设备A proximity detection method and terminal device

技术领域technical field

本发明实施例涉及通信技术领域,尤其涉及一种接近检测方法及终端设备。Embodiments of the present invention relate to the field of communication technologies, and in particular, to a proximity detection method and a terminal device.

背景技术Background technique

随着终端技术的不断发展,终端设备的应用越来越广泛。例如,在通话过程中,当接近传感器检测到终端设备的屏幕被遮挡时,灭屏以防误触的应用。With the continuous development of terminal technology, the application of terminal equipment is becoming more and more extensive. For example, during a call, when the proximity sensor detects that the screen of the terminal device is blocked, the screen is turned off to prevent accidental touch applications.

目前,为了适应大屏幕、窄边框的设计要求,终端设备的屏幕所在的表面必须要减少开孔,如此,不能采用传统红外接近传感器需要在屏幕所在的表面开孔的方案。随之出现了非开孔的超声检测方案,具体检测过程为:受话器发出超声信号,麦克风根据接收到的返回的超声信号来判断终端设备是否被遮挡。At present, in order to meet the design requirements of large screens and narrow borders, the surface where the screen of the terminal device is located must have fewer openings. Therefore, the traditional infrared proximity sensor cannot use the solution that requires openings on the surface where the screen is located. Subsequently, a non-perforated ultrasonic detection scheme has emerged. The specific detection process is as follows: the receiver sends out an ultrasonic signal, and the microphone determines whether the terminal device is blocked according to the received ultrasonic signal.

然而,超声检测方案检测终端设备的屏幕被遮挡的准确性较低。However, the ultrasonic detection scheme has low accuracy in detecting that the screen of the terminal device is blocked.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种接近检测方法及终端设备,以解决传统技术超声检测方案检测终端设备的屏幕被遮挡的准确性较低的问题。Embodiments of the present invention provide a proximity detection method and a terminal device, so as to solve the problem of low accuracy in detecting that the screen of the terminal device is blocked by the ultrasonic detection solution of the traditional technology.

为了解决上述技术问题,本发明是这样实现的:In order to solve the above-mentioned technical problems, the present invention is achieved in this way:

第一方面,本发明实施例提供了一种接近检测方法,应用于终端设备,该方法包括:在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。In a first aspect, an embodiment of the present invention provides a proximity detection method, which is applied to a terminal device. The method includes: a situation where a first object blocks the terminal device within a first preset distance determined according to an ultrasonic sensor of the terminal device , obtain the state information of the terminal device, the state information is used to determine whether the first screen of the terminal device is blocked by the first object; if it is determined that the first screen is blocked by the first object, control the first screen Switch from the on-screen state to the off-screen state.

第二方面,本发明实施例提供了一种终端设备,该终端设备包括:获取模块和控制模块;该获取模块,用于在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;该控制模块,用于在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。In a second aspect, an embodiment of the present invention provides a terminal device, the terminal device includes: an acquisition module and a control module; the acquisition module is configured to have a first preset distance determined according to an ultrasonic sensor of the terminal device within a first preset distance. In the case that the terminal device is blocked by an object, the status information of the terminal device is obtained, and the status information is used to determine whether the first screen of the terminal device is blocked by the first object; the control module is used for determining whether the first object blocks the first screen of the terminal device; In the case of the first screen, control the first screen to switch from the bright screen state to the off screen state.

第三方面,本发明实施例提供了一种终端设备,包括处理器、存储器及存储在该存储器上并可在该处理器上运行的计算机程序,该计算机程序被该处理器执行时实现如第一方面中的接近检测方法的步骤。In a third aspect, an embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and running on the processor, the computer program being executed by the processor to achieve the The steps of a proximity detection method in an aspect.

第四方面,本发明实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储计算机程序,该计算机程序被处理器执行时实现如第一方面中的接近检测方法的步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, implements the steps of the proximity detection method in the first aspect.

在本发明实施例中,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。In this embodiment of the present invention, the terminal device may acquire the state information of the terminal device in the case where it is determined according to the ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within the first preset distance, and the state information is used as for determining whether the first screen of the terminal device is blocked by the first object; if it is determined that the first screen is blocked by the first object, the first screen is controlled to be switched from a bright screen state to an off screen state. Through this solution, when the ultrasonic sensor determines that the first object is blocking the terminal device, it can combine the status information of the terminal device to determine whether the first object is blocking the first screen; when it is determined that the first object is blocking the first screen In the case of the terminal device, the terminal device can control the first screen to be switched from the bright screen state to the off screen state, so that the occurrence of false touches can be avoided when a foreign object blocks the first screen of the terminal device in the bright screen state. The ultrasonic detection and the state detection of the terminal device can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting the blocked screen of the terminal device.

附图说明Description of drawings

图1为本发明实施例提供的一种可能的安卓操作系统的架构示意图;1 is a schematic diagram of the architecture of a possible Android operating system provided by an embodiment of the present invention;

图2为本发明实施例提供的接近检测方法的流程图之一;FIG. 2 is one of the flowcharts of the proximity detection method provided by the embodiment of the present invention;

图3为本发明实施例提供的接近检测方法的流程图之二;FIG. 3 is the second flow chart of the proximity detection method provided by the embodiment of the present invention;

图4为本发明实施例提供的接近检测方法的流程图之三;4 is a third flowchart of a proximity detection method provided by an embodiment of the present invention;

图5为本发明实施例提供的接近检测方法的流程图之四;FIG. 5 is a fourth flowchart of a proximity detection method provided by an embodiment of the present invention;

图6为本发明实施例提供的终端设备的结构示意图;6 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention;

图7为本发明实施例提供的终端设备的硬件示意图。FIG. 7 is a schematic diagram of hardware of a terminal device according to an embodiment of the present invention.

具体实施方式Detailed ways

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

本文中术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。本文中符号“/”表示关联对象是或者的关系,例如A/B表示A或者B。The term "and/or" in this paper is an association relationship that describes an associated object, indicating that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone these three situations. The symbol "/" in this document indicates the relationship in which the associated object is or, for example, A/B indicates A or B.

本发明的说明书和权利要求书中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一输入、第二输入、第三输入和第四输入等是用于区别不同的输入,而不是用于描述输入的特定顺序。The terms "first", "second", "third" and "fourth" in the description and claims of the present invention are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first input, the second input, the third input, and the fourth input, etc. are used to distinguish different inputs, rather than to describe a specific order of the inputs.

在本发明实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本发明实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as an example, illustration or illustration. Any embodiments or designs described as "exemplary" or "such as" in the embodiments of the present invention should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present the related concepts in a specific manner.

在本发明实施例的描述中,除非另有说明,“多个”的含义是指两个或者两个以上,例如,多个处理单元是指两个或者两个以上的处理单元;多个元件是指两个或者两个以上的元件等。In the description of the embodiments of the present invention, unless otherwise stated, the meaning of "plurality" refers to two or more, for example, a plurality of processing units refers to two or more processing units; a plurality of elements Refers to two or more elements, etc.

本发明实施例提供一种接近检测方法,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。An embodiment of the present invention provides a proximity detection method, in which a terminal device can acquire state information of the terminal device when it is determined according to an ultrasonic sensor of the terminal device that a first object blocks the terminal device within a first preset distance, The state information is used to determine whether the first screen of the terminal device is blocked by the first object; if it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from a bright screen state to an off screen state. Through this solution, when the ultrasonic sensor determines that the first object is blocking the terminal device, it can combine the status information of the terminal device to determine whether the first object is blocking the first screen; when it is determined that the first object is blocking the first screen In the case of the terminal device, the terminal device can control the first screen to be switched from the bright screen state to the off screen state, so that the occurrence of false touches can be avoided when a foreign object blocks the first screen of the terminal device in the bright screen state. The ultrasonic detection and the state detection of the terminal device can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting the blocked screen of the terminal device.

下面以安卓操作系统为例,介绍一下本发明实施例提供的接近检测方法所应用的软件环境。The following takes the Android operating system as an example to introduce the software environment to which the proximity detection method provided by the embodiment of the present invention is applied.

如图1所示,为本发明实施例提供的一种可能的安卓操作系统的架构示意图。在图1中,安卓操作系统的架构包括4层,分别为:应用程序层、应用程序框架层、系统运行库层和内核层(具体可以为Linux内核层)。As shown in FIG. 1 , it is a schematic structural diagram of a possible Android operating system provided by an embodiment of the present invention. In FIG. 1, the architecture of the Android operating system includes four layers, namely: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).

其中,应用程序层包括安卓操作系统中的各个应用程序(包括系统应用程序和第三方应用程序)。The application layer includes various applications (including system applications and third-party applications) in the Android operating system.

应用程序框架层是应用程序的框架,开发人员可以在遵守应用程序的框架的开发原则的情况下,基于应用程序框架层开发一些应用程序。The application framework layer is the framework of the application, and developers can develop some applications based on the application framework layer under the condition of complying with the development principles of the framework of the application.

系统运行库层包括库(也称为系统库)和安卓操作系统运行环境。库主要为安卓操作系统提供其所需的各类资源。安卓操作系统运行环境用于为安卓操作系统提供软件环境。The system runtime layer includes libraries (also called system libraries) and the Android operating system runtime environment. The library mainly provides various resources required by the Android operating system. The Android operating system operating environment is used to provide a software environment for the Android operating system.

内核层是安卓操作系统的操作系统层,属于安卓操作系统软件层次的最底层。内核层基于Linux内核为安卓操作系统提供核心系统服务和与硬件相关的驱动程序。The kernel layer is the operating system layer of the Android operating system and belongs to the bottom layer of the Android operating system software layer. The kernel layer provides core system services and hardware-related drivers for the Android operating system based on the Linux kernel.

以安卓操作系统为例,本发明实施例中,开发人员可以基于上述如图1所示的安卓操作系统的系统架构,开发实现本发明实施例提供的接近检测方法的软件程序,从而使得该接近检测方法可以基于如图1所示的安卓操作系统运行。即处理器或者终端设备可以通过在安卓操作系统中运行该软件程序实现本发明实施例提供的接近检测方法。Taking the Android operating system as an example, in this embodiment of the present invention, a developer can develop a software program for implementing the proximity detection method provided by the embodiment of the present invention based on the system architecture of the Android operating system as shown in FIG. The detection method can be run based on the Android operating system as shown in FIG. 1 . That is, the processor or the terminal device can implement the proximity detection method provided by the embodiment of the present invention by running the software program in the Android operating system.

本发明实施例中的终端设备可以为移动终端设备,也可以为非移动终端设备。移动终端设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、超级移动个人计算机(ultra-mobilepersonal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等;非移动终端设备可以为个人计算机(personalcomputer,PC)、电视机(television,TV)、柜员机或者自助机等;本发明实施例不作具体限定。The terminal device in this embodiment of the present invention may be a mobile terminal device or a non-mobile terminal device. The mobile terminal device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted terminal, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc.; The non-mobile terminal device may be a personal computer (personal computer, PC), a television (television, TV), a teller machine, or a self-service machine, etc. The embodiment of the present invention does not make any specific limitations.

本发明实施例提供的接近检测方法的执行主体可以为上述的终端设备(包括移动终端设备和非移动终端设备),也可以为该终端设备中能够实现该方法的功能模块和/或功能实体,具体的可以根据实际使用需求确定,本发明实施例不作限定。下面以终端设备为例,对本发明实施例提供的接近检测方法进行示例性的说明。The execution subject of the proximity detection method provided by the embodiment of the present invention may be the above-mentioned terminal equipment (including mobile terminal equipment and non-mobile terminal equipment), or may be a functional module and/or functional entity in the terminal equipment capable of implementing the method, The specifics can be determined according to actual usage requirements, which are not limited in the embodiments of the present invention. The following takes a terminal device as an example to illustrate the proximity detection method provided by the embodiment of the present invention.

传统技术中,基于超声检测方案的接近检测方法,由于超声信号没有方向性,其他物体从屏幕所在的表面以外的其他表面(侧面、顶部或屏幕的背面等)靠近终端设备时,终端设备也会因检测到被遮挡而误灭屏,从而导致用户的操作不便。In the traditional technology, the proximity detection method based on the ultrasonic detection scheme, since the ultrasonic signal has no directionality, when other objects approach the terminal device from other surfaces (the side, the top, or the back of the screen, etc.) The screen is mistakenly turned off due to the detection of being blocked, resulting in inconvenience for the user to operate.

参考图2所示,本发明实施例提供了一种接近检测方法,应用于终端设备,该方法可以包括下述的步骤201-步骤202。Referring to FIG. 2, an embodiment of the present invention provides a proximity detection method, which is applied to a terminal device, and the method may include the following steps 201-202.

步骤201、终端设备在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息。Step 201: The terminal device acquires state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within a first preset distance.

该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏。The status information is used to determine whether the first screen of the terminal device is blocked by the first object.

第一预设距离为根据实际使用需求预先设置的距离,本发明实施例不作限定。The first preset distance is a distance preset according to an actual use requirement, which is not limited in the embodiment of the present invention.

示例性的,终端设备可以通过超声传感器发射超声波信号,并通过该超声传感器接收反射回来的超声波信号;若反射回来的超声波信号的信号强度大于预设阈值(预先根据实际使用需求设置的信号强度阈值,本发明实施例不作限定),则确定第一预设距离内有第一物体遮挡该终端设备,否则,确定没有物体遮挡该终端设备。Exemplarily, the terminal device can transmit an ultrasonic signal through an ultrasonic sensor, and receive the reflected ultrasonic signal through the ultrasonic sensor; , the embodiment of the present invention is not limited), then it is determined that there is a first object within the first preset distance that blocks the terminal device; otherwise, it is determined that there is no object that blocks the terminal device.

示例性的,终端设备可以通过超声传感器发送超声波信号并获取发送时间;接收该超声波信号并获取接收时间;根据该接收时间和该发送时间的差值,确定被测物距离;当该被测物距离小于第一预设距离时,确定第一预设距离内有第一物体遮挡该终端设备,否则,确定没有物体遮挡该终端设备。Exemplarily, the terminal device can send an ultrasonic signal through an ultrasonic sensor and obtain the sending time; receive the ultrasonic signal and obtain the receiving time; determine the distance of the measured object according to the difference between the receiving time and the sending time; When the distance is less than the first preset distance, it is determined that there is a first object blocking the terminal device within the first preset distance, otherwise, it is determined that there is no object blocking the terminal device.

本发明实施例中,不限定终端设备根据超声传感器确定第一预设距离内有第一物体遮挡该终端设备的检测方法,具体可以参考任意相关技术,本发明实施例不再一一赘述。In this embodiment of the present invention, the method for detecting that the terminal device determines that the terminal device is blocked by a first object within the first preset distance according to the ultrasonic sensor is not limited. For details, reference may be made to any related technology, which is not repeated in this embodiment of the present invention.

可选的,该状态信息包括下述至少一项:该终端设备的重力加速度信息,该终端设备的角速度信息。Optionally, the state information includes at least one of the following: gravitational acceleration information of the terminal device, and angular velocity information of the terminal device.

示例性的,该状态信息可以为该终端设备的重力加速度信息,该状态信息也可以为该终端设备的角速度信息,该状态信息还可以为该终端设备的重力加速度信息和角速度信息,该状态信息还可以包括其他可行性信息,具体可以根据实际使用需求确定,本发明实施例不作限定。Exemplarily, the state information may be the gravitational acceleration information of the terminal device, the state information may also be the angular velocity information of the terminal device, the state information may also be the gravitational acceleration information and angular velocity information of the terminal device, the state information Other feasible information may also be included, which may be specifically determined according to actual usage requirements, which is not limited in this embodiment of the present invention.

本发明实施例中,终端设备可以通过重力加速度传感器获取重力加速度信息,终端设备还可以通过其它传感器获取重力加速度信息,本发明实施例不作限定。In this embodiment of the present invention, the terminal device may obtain the gravitational acceleration information through a gravitational acceleration sensor, and the terminal device may also obtain the gravitational acceleration information through other sensors, which is not limited in the embodiment of the present invention.

本发明实施例中,终端设备可以通过陀螺仪传感器获取角速度信息,终端设备还可以通过其它传感器获取角速度信息,本发明实施例不作限定。In this embodiment of the present invention, the terminal device may obtain angular velocity information through a gyro sensor, and the terminal device may also obtain angular velocity information through other sensors, which is not limited in this embodiment of the present invention.

在终端设备根据该状态信息确定第一物体遮挡的为第一屏幕时,终端设备控制第一屏由亮屏状态切换为灭屏状态。When the terminal device determines according to the state information that the first screen is blocked by the first object, the terminal device controls the first screen to switch from the bright-screen state to the off-screen state.

在终端设备根据该状态信息确定第一物体遮挡的不是第一屏幕时,分为以下两种情况:When the terminal device determines according to the state information that the first screen is not blocked by the first object, it can be divided into the following two cases:

第一种情况,终端设备为单面屏终端设备,则在终端设备根据该状态信息确定第一物体遮挡的不是第一屏幕时,终端设备保持第一屏处于亮屏状态。In the first case, if the terminal device is a single-screen terminal device, when the terminal device determines according to the state information that the first screen is not blocked by the first object, the terminal device keeps the first screen in a bright screen state.

第二种情况,终端设备为多面屏终端设备,若终端设备根据该状态信息确定第一物体遮挡的为第二屏(判断方法与确定第一物体遮挡第一屏类似,本发明实施例不予赘述),则终端设备控制该第二屏由亮屏状态切换为灭屏状态;若终端设备根据该状态信息确定第一物体没有遮挡终端设备的任意一个屏,终端设备控制处于亮屏状态的屏保持亮屏状态。In the second case, the terminal device is a multi-screen terminal device. If the terminal device determines, according to the status information, that the second screen is blocked by the first object (the determination method is similar to that of determining that the first object blocks the first screen, this embodiment of the present invention does not allow the screen to be blocked by the first object). Repeat), the terminal device controls the second screen to switch from the bright-screen state to the off-screen state; if the terminal device determines according to the state information that the first object does not block any screen of the terminal device, the terminal device controls the screen in the bright-screen state. Keep the screen on.

步骤202、终端设备在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。Step 202: The terminal device controls the first screen to be switched from a bright screen state to an off screen state when it is determined that the first screen is blocked by the first object.

本发明实施例中,终端设备在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。则可以在有物体遮挡处于亮屏状态的第一屏时,避免误触的发生。In this embodiment of the present invention, the terminal device controls the first screen to be switched from a bright-screen state to an off-screen state when it is determined that the first screen is blocked by the first object. Then, when an object blocks the first screen in the bright screen state, the occurrence of false touches can be avoided.

本发明实施例提供了一种接近检测方法,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。An embodiment of the present invention provides a method for proximity detection, in which a terminal device can acquire state information of the terminal device when it is determined according to an ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within a first preset distance , the status information is used to determine whether the first screen of the terminal device is blocked by the first object; if it is determined that the first screen is blocked by the first object, control the first screen to switch from the bright screen state to the off screen state . Through this solution, when the ultrasonic sensor determines that the first object is blocking the terminal device, it can combine the status information of the terminal device to determine whether the first object is blocking the first screen; when it is determined that the first object is blocking the first screen In the case of the terminal device, the terminal device can control the first screen to be switched from the bright screen state to the off screen state, so that the occurrence of false touches can be avoided when a foreign object blocks the first screen of the terminal device in the bright screen state. The ultrasonic detection and the state detection of the terminal device can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting the blocked screen of the terminal device.

可选的,在终端设备获取该终端设备的状态信息之后,终端设备需要根据该状态信息,确定是否第一物体遮挡的为第一屏。Optionally, after the terminal device acquires the state information of the terminal device, the terminal device needs to determine whether the first screen is blocked by the first object according to the state information.

示例性的,结合图2,如图3所示,在步骤201之后,本发明实施例提供的接近检测方法还可以包括下述的步骤203-步骤205。Exemplarily, with reference to FIG. 2 , as shown in FIG. 3 , after step 201 , the proximity detection method provided by the embodiment of the present invention may further include the following steps 203 to 205 .

步骤203、终端设备判断该状态信息是否满足目标条件。Step 203: The terminal device determines whether the state information satisfies the target condition.

其中,该目标条件包括以下至少一项:该重力加速度信息在第一范围内,该角速度信息在第二范围内。Wherein, the target condition includes at least one of the following: the gravitational acceleration information is within a first range, and the angular velocity information is within a second range.

在终端设备确定在第一预设距离内有第一物体遮挡终端设备的情况下,若该重力加速度信息在第一范围内,则可以确定第一物体遮挡的为第一屏。第一范围可以为预先设置的,也可以为实时获取的,本发明实施例不作限定。本发明实施例中,若该重力加速度信息在第一范围内,则该状态信息满足目标条件。In the case where the terminal device determines that there is a first object blocking the terminal device within the first preset distance, if the gravitational acceleration information is within the first range, it can be determined that the first screen is blocked by the first object. The first range may be preset or acquired in real time, which is not limited in this embodiment of the present invention. In the embodiment of the present invention, if the gravitational acceleration information is within the first range, the state information satisfies the target condition.

在终端设备确定在第一预设距离内有第一物体遮挡终端设备的情况下,若该角速度信息在第二范围内,则可以确定第一物体遮挡的为第一屏。第二范围可以为预先设置的,也可以为实时获取的,本发明实施例不作限定。本发明实施例中,若该角速度信息在第二范围内,则该状态信息满足目标条件。In the case where the terminal device determines that there is a first object blocking the terminal device within the first preset distance, if the angular velocity information is within the second range, it can be determined that the first screen is blocked by the first object. The second range may be preset or acquired in real time, which is not limited in this embodiment of the present invention. In the embodiment of the present invention, if the angular velocity information is within the second range, the state information satisfies the target condition.

在终端设备确定在第一预设距离内有第一物体遮挡终端设备的情况下,若该重力加速度信息在第一范围内,且该角速度信息在第二范围内,则可以确定第一物体遮挡的为第一屏。第一范围和第二范围可以为预先设置的,也可以为实时获取的,本发明实施例不作限定。本发明实施例中,若该重力加速度信息在第一范围内,且该角速度信息在第二范围内,则该状态信息满足目标条件。In the case where the terminal device determines that there is a first object blocking the terminal device within the first preset distance, if the gravitational acceleration information is within the first range and the angular velocity information is within the second range, it can be determined that the first object blocks the terminal device is the first screen. The first range and the second range may be preset or acquired in real time, which is not limited in this embodiment of the present invention. In the embodiment of the present invention, if the gravitational acceleration information is within the first range and the angular velocity information is within the second range, the state information satisfies the target condition.

示例性的,终端设备可以根据终端设备的状态信息(如加速度传感器采集的手机三轴重力加速度数据和陀螺仪采集的三轴角速度数据)计算出终端设备的姿态和手势动作,这里定义一种手势和三种姿态:Exemplarily, the terminal device can calculate the posture and gesture action of the terminal device according to the state information of the terminal device (such as the three-axis gravitational acceleration data of the mobile phone collected by the acceleration sensor and the three-axis angular velocity data collected by the gyroscope), and a gesture is defined here. and three gestures:

a)拿起终端设备靠近耳朵手势(简称为接听手势);a) Pick up the terminal device and approach the ear gesture (referred to as answering gesture);

b)竖直放置姿态(即终端设备放置耳边时的姿态);b) Vertical placement posture (that is, the posture when the terminal device is placed near the ear);

c)屏幕向上平放姿态;c) The screen is up and flat;

d)未知姿态。d) Unknown pose.

结合超声传感器确定第一预设距离内是否有物体遮挡终端设备(有物体遮挡则为是,没有物体遮挡则为否),以及惯性传感器(重力和陀螺仪)上报的手势姿态信息(状态信息),确定是否有物体遮挡第一屏(遮挡第一屏则为是,没有遮挡第一屏则为否),具体如下表所示。Combining the ultrasonic sensor to determine whether there is an object blocking the terminal device within the first preset distance (yes if there is an object blocking, no if there is no object blocking), and the gesture and attitude information (status information) reported by the inertial sensor (gravity and gyroscope) , to determine whether there is an object blocking the first screen (Yes if the first screen is blocked, and No if the first screen is not blocked), as shown in the following table.

Figure BDA0002213671190000051
Figure BDA0002213671190000051

根据上表可以得知:在超声传感器确定有物体遮挡终端设备的情况下,只有在终端设备处于接听手势或垂直姿态时,可以确定遮挡的为第一屏。According to the above table, it can be known that when the ultrasonic sensor determines that there is an object blocking the terminal device, only when the terminal device is in the answering gesture or vertical posture, it can be determined that the first screen is blocked.

在该状态变化信息满足目标条件的情况下,执行下述的步骤204;在该状态变化信息不满足该目标条件的情况下,执行下述的步骤205。When the state change information satisfies the target condition, the following step 204 is performed; when the state change information does not satisfy the target condition, the following step 205 is performed.

步骤204、终端设备确定第一物体遮挡的为第一屏。Step 204: The terminal device determines that the first screen is blocked by the first object.

终端设备在该状态信息满足目标条件的情况下,确定第一物体遮挡的为第一屏。When the state information satisfies the target condition, the terminal device determines that the first screen is blocked by the first object.

步骤205、终端设备确定第一物体遮挡的不是第一屏。Step 205: The terminal device determines that the first screen is not blocked by the first object.

终端设备在该状态信息未满足该目标条件的情况下,确定第一物体遮挡的不是第一屏。In the case that the state information does not meet the target condition, the terminal device determines that the first screen is not blocked by the first object.

可选的,在终端设备根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备之前,终端设备需要先开启超声传感器。Optionally, before the terminal device determines according to the ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within the first preset distance, the terminal device needs to turn on the ultrasonic sensor first.

本发明实施例中,终端设备可以根据该状态信息是否满足目标条件,从而快速确定是否第一物体遮挡的为第一屏。In this embodiment of the present invention, the terminal device can quickly determine whether the first screen is blocked by the first object according to whether the state information satisfies the target condition.

示例性的,结合图3,如图4所示,在步骤201之前,本发明实施例提供的接近检测方法还可以包括下述的步骤206-步骤207。Exemplarily, with reference to FIG. 3 , as shown in FIG. 4 , before step 201 , the proximity detection method provided by the embodiment of the present invention may further include the following steps 206 to 207 .

步骤206、终端设备确定该第一屏是否处于亮屏状态,且该第一屏是否显示通话界面。Step 206: The terminal device determines whether the first screen is in a bright screen state, and whether the first screen displays a call interface.

终端设备确定该第一屏是否处于亮屏状态的方法,以及确定第一屏是否显示通话界面的方法可以参考任意相关技术,本发明实施例不作限定。For the method for the terminal device to determine whether the first screen is in a bright screen state, and the method for determining whether the first screen displays a call interface, reference may be made to any related technology, which is not limited in the embodiment of the present invention.

在终端设备在确定该第一屏处于亮屏状态,且该第一屏显示通话界面的情况下,开启该超声传感器;否则不开启超声传感器。When the terminal device determines that the first screen is in a bright screen state and the first screen displays a call interface, the ultrasonic sensor is turned on; otherwise, the ultrasonic sensor is not turned on.

步骤207、终端设备在确定该第一屏处于亮屏状态,且该第一屏显示通话界面的情况下,开启该超声传感器。Step 207: The terminal device turns on the ultrasonic sensor when it is determined that the first screen is in a bright screen state and the first screen displays a call interface.

本发明实施例中,在终端设备未处于亮屏状态(即处于灭屏状态),或者处于亮屏状态但第一屏未显示通话界面的情况下,终端设备可以关闭超声传感器,从而可以节约耗电,而且,可以在第一屏处于亮屏状态时,避免影响终端设备对其他内容的显示。In this embodiment of the present invention, when the terminal device is not in a bright screen state (that is, in an off screen state), or is in a bright screen state but the call interface is not displayed on the first screen, the terminal device can turn off the ultrasonic sensor, thereby saving power consumption. Moreover, when the first screen is in the bright screen state, it can avoid affecting the display of other contents by the terminal device.

可选的,终端设备在确定该第一屏处于灭屏状态,且该第一屏未处于通话状态的情况下,开启红外传感器。Optionally, the terminal device turns on the infrared sensor when it is determined that the first screen is in an off-screen state and the first screen is not in a call state.

示例性的,结合图4,如图5所示,在步骤206之后,本发明实施例提供的接近检测方法还可以包括下述的步骤208-步骤209。Exemplarily, with reference to FIG. 4 , as shown in FIG. 5 , after step 206 , the proximity detection method provided by the embodiment of the present invention may further include the following steps 208 to 209 .

步骤208、终端设备在确定该第一屏处于灭屏状态,且该第一屏未处于通话状态的情况下,开启红外传感器。Step 208: The terminal device turns on the infrared sensor when it is determined that the first screen is in the off-screen state and the first screen is not in the call state.

步骤209、终端设备在根据该红外传感器确定第二预设距离内有物体遮挡第一屏的情况下,执行下述至少一项:控制该第一屏保持灭屏状态,禁止所述第一屏在灭屏状态下点亮预设区域,该预设区域用于显示提示信息。Step 209: In the case where it is determined according to the infrared sensor that there is an object blocking the first screen within the second preset distance, the terminal device performs at least one of the following: controlling the first screen to remain in an off-screen state, and prohibiting the first screen The preset area is lit when the screen is off, and the preset area is used to display prompt information.

第二预设距离为根据实际使用需求预先设置的距离,本发明实施例不作限定。The second preset distance is a distance preset according to an actual use requirement, which is not limited in this embodiment of the present invention.

第二预设距离与第一预设距离可以相同,也可以不相同,本发明实施例不作限定。The second preset distance and the first preset distance may be the same or different, which is not limited in the embodiment of the present invention.

终端设备根据该红外传感器确定第二预设距离内有第二物体遮挡第一屏的方法可以参考任意相关技术,本发明实施例不作限定。For the method for the terminal device to determine, according to the infrared sensor, that there is a second object within the second preset distance blocking the first screen, reference may be made to any related technology, which is not limited in the embodiment of the present invention.

该提示信息可以为时钟信息、电量信息、天气信息、指纹提示图标(用于提示用户指纹采集区域)、即时社交应用的短信息的提示信息等,具体可以根据实际使用需求确定,本发明实施例不作限定。The prompt information can be clock information, battery information, weather information, fingerprint prompt icon (used to prompt the user for the fingerprint collection area), prompt information of short messages of instant social applications, etc., which can be specifically determined according to actual use requirements. The embodiment of the present invention Not limited.

本发明实施例中,终端设备在根据该红外传感器确定第二预设距离内有第二物体遮挡第一屏的情况下,控制该第一屏保持灭屏状态,可以防止在有物体遮挡第一屏时,者来电不亮屏或由于用户的误触发使得终端设备点亮屏幕,进而可以降低耗电。终端设备在根据该红外传感器确定第二预设距离内有第二物体遮挡第一屏的情况下,禁止第一屏在灭屏状态下点亮预设区域,该预设区域用于显示提示信息,可以在有物体遮挡第一屏(说明用户不需要查看该提示信息)时,禁止灭屏状态下显示提示信息(包括在当前灭屏状态下的预设区域被点亮并显示提示信息的情况下,取消显示该提示信息并熄灭该预设区域),可以节约耗电。而且通过红外传感器在灭屏状态下进行接近检测的方案,可以在不损伤屏幕寿命的前提下,提高遮挡检测准确度。In the embodiment of the present invention, when the terminal device determines that there is a second object blocking the first screen within the second preset distance according to the infrared sensor, the terminal device controls the first screen to keep the screen off state, which can prevent the first screen from being blocked by an object. When the screen is turned on, the screen is not turned on by the incoming call, or the terminal device lights the screen due to the user's false trigger, thereby reducing power consumption. In the case where the terminal device determines that there is a second object blocking the first screen within the second preset distance according to the infrared sensor, it prohibits the first screen from lighting up a preset area in the off-screen state, and the preset area is used to display prompt information , when there is an object blocking the first screen (indicating that the user does not need to view the prompt information), it is forbidden to display the prompt information in the off-screen state (including the case where the preset area in the current off-screen state is lit and the prompt information is displayed) , cancel the display of the prompt message and turn off the preset area), which can save power consumption. Moreover, through the solution of proximity detection by the infrared sensor in the off-screen state, the accuracy of occlusion detection can be improved without damaging the life of the screen.

本发明实施例中,终端设备也可在确定该第一屏处于灭屏状态的情况下,开启超声传感器;且在根据该超声传感器确定第一预设距离内有物体遮挡第一屏的情况下,执行下述至少一项:控制该第一屏保持灭屏状态,禁止第一屏在灭屏状态下点亮预设区域,该预设区域用于显示提示信息。In this embodiment of the present invention, the terminal device may also turn on the ultrasonic sensor when it is determined that the first screen is in an off-screen state; and when it is determined according to the ultrasonic sensor that there is an object blocking the first screen within the first preset distance , and perform at least one of the following: controlling the first screen to remain in an off-screen state, and prohibiting the first screen from lighting up a preset area in the off-screen state, where the preset area is used to display prompt information.

本发明实施例中的各个附图均是结合独权实施例附图示例的,具体实现时,各个附图还可以结合其它任意可以结合的附图实现,本发明实施例不作限定。例如,结合图2,本发明实施例提供的接近检测方法还可以包括上述的步骤203或步骤204。Each accompanying drawing in the embodiment of the present invention is exemplified by combining with the accompanying drawing of the exclusive embodiment. During specific implementation, each accompanying drawing can also be implemented by combining with any other accompanying drawings, which is not limited by the embodiment of the present invention. For example, with reference to FIG. 2 , the proximity detection method provided by the embodiment of the present invention may further include the foregoing step 203 or step 204 .

如图6所示,本发明实施例提供一种终端设备120,该终端设备120包括:获取模块121和控制模块122;该获取模块121,用于在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否该第一物体遮挡的为该终端设备的第一屏;该控制模块122,用于在确定该第一物体遮挡的为该第一屏的情况下,控制该第一屏由亮屏状态切换为灭屏状态。As shown in FIG. 6, an embodiment of the present invention provides a terminal device 120. The terminal device 120 includes: an acquisition module 121 and a control module 122; the acquisition module 121 is configured to determine a first preset according to an ultrasonic sensor of the terminal device. In the case where a first object blocks the terminal device within the distance, the state information of the terminal device is acquired, and the state information is used to determine whether the first screen of the terminal device is blocked by the first object; the control module 122, It is used to control the first screen to be switched from a bright screen state to an off screen state when it is determined that the first screen is blocked by the first object.

可选的,该状态信息包括下述至少一项:该终端设备的重力加速度信息,该终端设备的角速度信息。Optionally, the state information includes at least one of the following: gravitational acceleration information of the terminal device, and angular velocity information of the terminal device.

可选的,该终端设备120还包括:确定模块123;该确定模块123,用于在该获取模块121获取该终端设备的状态信息之后,在该状态信息满足目标条件的情况下,确定该第一物体遮挡的为该第一屏;在该状态信息未满足该目标条件的情况下,确定该第一物体遮挡的不是该第一屏;其中,该目标条件包括以下至少一项:该重力加速度信息在第一范围内,该角速度信息在第二范围内。Optionally, the terminal device 120 further includes: a determining module 123; the determining module 123 is configured to, after the acquiring module 121 acquires the state information of the terminal device, in the case that the state information satisfies the target condition, determine the first The first screen is blocked by an object; if the state information does not meet the target condition, it is determined that the first screen is not blocked by the first object; wherein the target condition includes at least one of the following: the gravitational acceleration The information is within a first range, and the angular velocity information is within a second range.

可选的,该终端设备120还包括:开启模块124;该开启模块124,用于在该根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备之前,在确定该第一屏处于亮屏状态,且该第一屏显示通话界面的情况下,开启该超声传感器。Optionally, the terminal device 120 further includes: an opening module 124; the opening module 124 is configured to, before determining according to the ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within the first preset distance, to determine The ultrasonic sensor is turned on when the first screen is in a bright screen state and a call interface is displayed on the first screen.

可选的,该终端设备120还包括:开启模块124;该开启模块124,用于在确定该第一屏处于灭屏状态,且该第一屏未处于通话状态的情况下,开启红外传感器;该控制模块122,还用于在根据该红外传感器确定第二预设距离内有物体遮挡该第一屏的情况下,执行下述至少一项:控制该第一屏保持灭屏状态,控制该第一屏取消显示灭屏状态下的提示信息。Optionally, the terminal device 120 further includes: an opening module 124; the opening module 124 is configured to turn on the infrared sensor when it is determined that the first screen is in an off-screen state and the first screen is not in a call state; The control module 122 is further configured to perform at least one of the following when it is determined according to the infrared sensor that there is an object blocking the first screen within the second preset distance: controlling the first screen to keep the screen off, controlling the first screen The first screen cancels the prompt information when the screen is off.

需要说明的是,如图6所示,终端设备120中一定包括的模块用实线框示意,如获取模块121和控制模块122;终端设备120中可以包括也可以不包括的模块用虚线框示意,如确定模块123和开启模块124。It should be noted that, as shown in FIG. 6 , the modules that must be included in the terminal device 120 are indicated by solid-line boxes, such as the acquisition module 121 and the control module 122 ; the modules that may or may not be included in the terminal device 120 are indicated by dashed-line boxes , such as the determining module 123 and the opening module 124 .

本发明实施例提供的终端设备能够实现上述方法实施例中图2至图5任意之一所示的各个过程,为避免重复,此处不再赘述。The terminal device provided in the embodiment of the present invention can implement each process shown in any one of FIG. 2 to FIG. 5 in the foregoing method embodiment, and to avoid repetition, details are not described herein again.

本发明实施例提供了一种终端设备,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。An embodiment of the present invention provides a terminal device. The terminal device can obtain the state information of the terminal device by determining that there is a first object blocking the terminal device within a first preset distance according to an ultrasonic sensor of the terminal device, The state information is used to determine whether the first screen of the terminal device is blocked by the first object; if it is determined that the first screen is blocked by the first object, the first screen is controlled to switch from a bright screen state to an off screen state. Through this solution, when the ultrasonic sensor determines that the first object is blocking the terminal device, it can combine the status information of the terminal device to determine whether the first object is blocking the first screen; when it is determined that the first object is blocking the first screen In the case of the terminal device, the terminal device can control the first screen to be switched from the bright screen state to the off screen state, so that the occurrence of false touches can be avoided when a foreign object blocks the first screen of the terminal device in the bright screen state. The ultrasonic detection and the state detection of the terminal device can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting the blocked screen of the terminal device.

图7为实现本发明各个实施例的一种终端设备的硬件结构示意图。如图7所示,该终端设备100包括但不限于:射频单元101、网络模块102、音频输出单元103、输入单元104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、处理器110、以及电源111等部件。本领域技术人员可以理解,图7中示出的终端设备结构并不构成对终端设备的限定,终端设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,终端设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端设备、可穿戴设备、以及计步器等。FIG. 7 is a schematic diagram of a hardware structure of a terminal device implementing various embodiments of the present invention. As shown in FIG. 7 , the terminal device 100 includes but is not limited to: a radio frequency unit 101 , a network module 102 , an audio output unit 103 , an input unit 104 , a sensor 105 , a display unit 106 , a user input unit 107 , an interface unit 108 , and a memory 109 , the processor 110, and the power supply 111 and other components. Those skilled in the art can understand that the structure of the terminal device shown in FIG. 7 does not constitute a limitation on the terminal device, and the terminal device may include more or less components than the one shown, or combine some components, or different components layout. In the embodiment of the present invention, the terminal device includes but is not limited to a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle terminal device, a wearable device, a pedometer, and the like.

其中,处理器110,用于在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。The processor 110 is configured to acquire state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within a first preset distance, and the state information is used to determine whether What is blocked by the first object is the first screen of the terminal device; if it is determined that what is blocked by the first object is the first screen, the first screen is controlled to be switched from a bright-screen state to an off-screen state.

本发明实施例提供的终端设备,终端设备可以通过在根据该终端设备的超声传感器确定第一预设距离内有第一物体遮挡该终端设备的情况下,获取该终端设备的状态信息,该状态信息用于确定是否第一物体遮挡的为该终端设备的第一屏;在确定第一物体遮挡的为第一屏的情况下,控制第一屏由亮屏状态切换为灭屏状态。通过该方案,终端设备在通过超声传感器确定有第一物体遮挡的情况下,可以结合该终端设备的状态信息,确定是否是第一物体遮挡第一屏;在确定是第一物体遮挡第一屏的情况下,终端设备可以控制该第一屏由亮屏状态切换为灭屏状态,从而可以在有异物遮挡终端设备处于亮屏状态的第一屏时,避免误触的发生,而且该方案结合超声检测和终端设备的状态检测,可以准确判断是终端设备处于亮屏状态的第一屏被遮挡,提高了超声检测方案检测终端设备的屏幕被遮挡的准确性。In the terminal device provided by the embodiment of the present invention, the terminal device can obtain the status information of the terminal device by determining, according to the ultrasonic sensor of the terminal device, that there is a first object blocking the terminal device within a first preset distance. The information is used to determine whether the first screen of the terminal device is blocked by the first object; if it is determined that the first screen is blocked by the first object, the first screen is controlled to be switched from a bright screen state to an off screen state. Through this solution, when the ultrasonic sensor determines that the first object is blocking the terminal device, it can combine the status information of the terminal device to determine whether the first object is blocking the first screen; when it is determined that the first object is blocking the first screen In the case of the terminal device, the terminal device can control the first screen to be switched from the bright screen state to the off screen state, so that the occurrence of false touches can be avoided when a foreign object blocks the first screen of the terminal device in the bright screen state. The ultrasonic detection and the state detection of the terminal device can accurately determine that the first screen of the terminal device in the bright screen state is blocked, which improves the accuracy of the ultrasonic detection solution for detecting the blocked screen of the terminal device.

应理解的是,本发明实施例中,射频单元101可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器110处理;另外,将上行的数据发送给基站。通常,射频单元101包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元101还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals in the process of sending and receiving information or during a call. Specifically, after receiving the downlink data from the base station, it is processed by the processor 110; The uplink data is sent to the base station. Generally, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with the network and other devices through a wireless communication system.

终端设备通过网络模块102为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The terminal device provides the user with wireless broadband Internet access through the network module 102, such as helping the user to send and receive emails, browse web pages, and access streaming media.

音频输出单元103可以将射频单元101或网络模块102接收的或者在存储器109中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元103还可以提供与终端设备100执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元103包括扬声器、蜂鸣器以及受话器等。The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into audio signals and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the terminal device 100 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.

输入单元104用于接收音频或视频信号。输入单元104可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元106上。经图形处理器1041处理后的图像帧可以存储在存储器109(或其它存储介质)中或者经由射频单元101或网络模块102进行发送。麦克风1042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元101发送到移动通信基站的格式输出。The input unit 104 is used to receive audio or video signals. The input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042. The graphics processor 1041 captures images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode data is processed. The processed image frames may be displayed on the display unit 106 . The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102 . The microphone 1042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 for output in the case of a telephone call mode.

终端设备100还包括至少一种传感器105,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1061的亮度,接近传感器可在终端设备100移动到耳边时,关闭显示面板1061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别终端设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器105还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The terminal device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and the display panel 1061 when the terminal device 100 moves to the ear. / or backlight. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the terminal device (such as horizontal and vertical screen switching, related games , magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 105 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, Infrared sensors, etc., are not repeated here.

显示单元106用于显示由用户输入的信息或提供给用户的信息。显示单元106可包括显示面板1061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1061。The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

用户输入单元107可用于接收输入的数字或字符信息,以及产生与终端设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元107包括触控面板1071以及其他输入设备1072。触控面板1071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1071上或在触控面板1071附近的操作)。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器110,接收处理器110发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1071。除了触控面板1071,用户输入单元107还可以包括其他输入设备1072。具体地,其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 107 may be used to receive input numerical or character information, and generate key signal input related to user setting and function control of the terminal device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072 . The touch panel 1071, also referred to as a touch screen, can collect the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable object or attachment on or near the touch panel 1071). operate). The touch panel 1071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 110, the command sent by the processor 110 is received and executed. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1071 , the user input unit 107 may also include other input devices 1072 . Specifically, other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described herein again.

进一步的,触控面板1071可覆盖在显示面板1061上,当触控面板1071检测到在其上或附近的触摸操作后,传送给处理器110以确定触摸事件的类型,随后处理器110根据触摸事件的类型在显示面板1061上提供相应的视觉输出。虽然在图7中,触控面板1071与显示面板1061是作为两个独立的部件来实现终端设备的输入和输出功能,但是在某些实施例中,可以将触控面板1071与显示面板1061集成而实现终端设备的输入和输出功能,具体此处不做限定。Further, the touch panel 1071 can be covered on the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits it to the processor 110 to determine the type of the touch event, and then the processor 110 determines the type of the touch event according to the touch The type of event provides corresponding visual output on display panel 1061 . Although in FIG. 7 , the touch panel 1071 and the display panel 1061 are used as two independent components to realize the input and output functions of the terminal device, but in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated The input and output functions of the terminal device are implemented, which is not specifically limited here.

接口单元108为外部装置与终端设备100连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元108可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到终端设备100内的一个或多个元件或者可以用于在终端设备100和外部装置之间传输数据。The interface unit 108 is an interface for connecting an external device to the terminal device 100 . For example, external devices may include wired or wireless headset ports, external power (or battery charger) ports, wired or wireless data ports, memory card ports, ports for connecting devices with identification modules, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 108 may be used to receive input from external devices (eg, data information, power, etc.) and transmit the received input to one or more elements within the terminal device 100 or may be used between the terminal device 100 and external Transfer data between devices.

存储器109可用于存储软件程序以及各种数据。存储器109可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器109可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc. Additionally, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

处理器110是终端设备的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储器109内的软件程序和/或模块,以及调用存储在存储器109内的数据,执行终端设备的各种功能和处理数据,从而对终端设备进行整体监控。处理器110可包括一个或多个处理单元;可选的,处理器110可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。The processor 110 is the control center of the terminal device, uses various interfaces and lines to connect various parts of the entire terminal device, runs or executes the software programs and/or modules stored in the memory 109, and calls the data stored in the memory 109. , perform various functions of the terminal equipment and process data, so as to monitor the terminal equipment as a whole. The processor 110 may include one or more processing units; optionally, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem The modulation processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 110 .

终端设备100还可以包括给各个部件供电的电源111(比如电池),可选的,电源111可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The terminal device 100 may further include a power supply 111 (such as a battery) for supplying power to various components. Optionally, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power consumption through the power management system management and other functions.

另外,终端设备100包括一些未示出的功能模块,在此不再赘述。In addition, the terminal device 100 includes some unshown functional modules, which will not be repeated here.

可选的,本发明实施例还提供一种终端设备,可以包括上述如图7所示的处理器110,存储器109,以及存储在存储器109上并可在该处理器110上运行的计算机程序,该计算机程序被处理器110执行时实现上述方法实施例中图2至图5任意之一所示的接近检测方法的各个过程,且能达到相同的技术效果,为避免重复,此处不再赘述。Optionally, an embodiment of the present invention further provides a terminal device, which may include the processor 110 shown in FIG. 7 , a memory 109 , and a computer program stored in the memory 109 and running on the processor 110 , When the computer program is executed by the processor 110, each process of the proximity detection method shown in any one of FIG. 2 to FIG. 5 in the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, details are not repeated here. .

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述方法实施例中图2至图5任意之一所示的接近检测方法的各个过程,且能达到相同的技术效果,为避免重复,此处不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program shown in any one of FIG. 2 to FIG. 5 in the foregoing method embodiment is implemented. The various processes of the proximity detection method can achieve the same technical effect. In order to avoid repetition, they will not be repeated here. The computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disk.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对传统技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on such understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to traditional technologies, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) ), including several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of the present invention, without departing from the spirit of the present invention and the scope protected by the claims, many forms can be made, which all belong to the protection of the present invention.

Claims (12)

1.一种接近检测方法,应用于终端设备,其特征在于,所述方法包括:1. A method for proximity detection, applied to a terminal device, wherein the method comprises: 在根据所述终端设备的超声传感器确定第一预设距离内有第一物体遮挡所述终端设备的情况下,获取所述终端设备的状态信息,所述状态信息用于确定是否所述第一物体遮挡的为所述终端设备的第一屏;In the case where it is determined according to the ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within a first preset distance, state information of the terminal device is acquired, and the state information is used to determine whether the first object The object occluded is the first screen of the terminal device; 在确定所述第一物体遮挡的为所述第一屏的情况下,控制所述第一屏由亮屏状态切换为灭屏状态。In a case where it is determined that the first screen is blocked by the first object, the first screen is controlled to be switched from a bright screen state to an off screen state. 2.根据权利要求1所述的方法,其特征在于,所述状态信息包括下述至少一项:2. The method according to claim 1, wherein the state information comprises at least one of the following: 所述终端设备的重力加速度信息,所述终端设备的角速度信息。Gravitational acceleration information of the terminal device, and angular velocity information of the terminal device. 3.根据权利要求2所述的方法,其特征在于,所述获取所述终端设备的状态信息之后,还包括:3. The method according to claim 2, wherein after acquiring the state information of the terminal device, the method further comprises: 在所述状态信息满足目标条件的情况下,确定所述第一物体遮挡的为所述第一屏;In the case that the state information satisfies the target condition, it is determined that the first screen is blocked by the first object; 其中,所述目标条件包括以下至少一项:所述重力加速度信息在第一范围内,所述角速度信息在第二范围内。Wherein, the target condition includes at least one of the following: the gravitational acceleration information is within a first range, and the angular velocity information is within a second range. 4.根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:4. The method according to any one of claims 1 to 3, wherein the method further comprises: 所述根据所述终端设备的超声传感器确定第一预设距离内有第一物体遮挡所述终端设备之前,还包括:Before determining according to the ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within the first preset distance, the method further includes: 在确定所述第一屏处于亮屏状态,且所述第一屏显示通话界面的情况下,开启所述超声传感器。When it is determined that the first screen is in a bright screen state and the first screen displays a call interface, the ultrasonic sensor is turned on. 5.根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:5. The method according to any one of claims 1 to 3, wherein the method further comprises: 在确定所述第一屏处于灭屏状态,且所述第一屏未处于通话状态的情况下,开启红外传感器;Turning on the infrared sensor when it is determined that the first screen is in an off-screen state and the first screen is not in a call state; 在根据所述红外传感器确定第二预设距离内有物体遮挡所述第一屏的情况下,执行下述至少一项:控制所述第一屏保持灭屏状态,禁止所述第一屏在灭屏状态下点亮预设区域,所述预设区域用于显示提示信息。When it is determined according to the infrared sensor that there is an object blocking the first screen within a second preset distance, at least one of the following is performed: controlling the first screen to remain in an off-screen state, and prohibiting the first screen from When the screen is off, the preset area is lit, and the preset area is used to display prompt information. 6.一种终端设备,其特征在于,所述终端设备包括:获取模块和控制模块;6. A terminal device, characterized in that the terminal device comprises: an acquisition module and a control module; 所述获取模块,用于在根据所述终端设备的超声传感器确定第一预设距离内有第一物体遮挡所述终端设备的情况下,获取所述终端设备的状态信息,所述状态信息用于确定是否所述第一物体遮挡的为所述终端设备的第一屏;The acquisition module is configured to acquire the state information of the terminal device when it is determined according to the ultrasonic sensor of the terminal device that there is a first object blocking the terminal device within a first preset distance, and the state information is used for determining whether the first screen of the terminal device is blocked by the first object; 所述控制模块,用于在确定所述第一物体遮挡的为所述第一屏的情况下,控制所述第一屏由亮屏状态切换为灭屏状态。The control module is configured to control the first screen to be switched from a bright screen state to an off screen state when it is determined that the first screen is blocked by the first object. 7.根据权利要求6所述的终端设备,其特征在于,所述状态信息包括下述至少一项:7. The terminal device according to claim 6, wherein the status information comprises at least one of the following: 所述终端设备的重力加速度信息,所述终端设备的角速度信息。Gravitational acceleration information of the terminal device, and angular velocity information of the terminal device. 8.根据权利要求7所述的终端设备,其特征在于,所述终端设备还包括:确定模块;8. The terminal device according to claim 7, wherein the terminal device further comprises: a determining module; 所述确定模块,用于在所述获取模块获取所述终端设备的状态信息之后,在所述状态信息满足目标条件的情况下,确定所述第一物体遮挡的为所述第一屏;The determining module is configured to, after the acquiring module acquires the state information of the terminal device, in the case that the state information satisfies the target condition, determine that the first screen is blocked by the first object; 其中,所述目标条件包括以下至少一项:所述重力加速度信息在第一范围内,所述角速度信息在第二范围内。Wherein, the target condition includes at least one of the following: the gravitational acceleration information is within a first range, and the angular velocity information is within a second range. 9.根据权利要求6至8中任一项所述的终端设备,其特征在于,所述终端设备还包括:开启模块;9. The terminal device according to any one of claims 6 to 8, wherein the terminal device further comprises: an opening module; 所述开启模块,用于在所述根据所述终端设备的超声传感器确定第一预设距离内有第一物体遮挡所述终端设备之前,在确定所述第一屏处于亮屏状态,且所述第一屏显示通话界面的情况下,开启所述超声传感器。The opening module is configured to determine that the first screen is in a bright screen state, and the When the first screen displays the call interface, the ultrasonic sensor is turned on. 10.根据权利要求6至8中任一项所述的终端设备,其特征在于,所述终端设备还包括:开启模块;10. The terminal device according to any one of claims 6 to 8, wherein the terminal device further comprises: an opening module; 所述开启模块,用于在确定所述第一屏处于灭屏状态,且所述第一屏未处于通话状态的情况下,开启红外传感器;The turning-on module is configured to turn on the infrared sensor when it is determined that the first screen is in an off-screen state and the first screen is not in a call state; 所述控制模块,还用于在根据所述红外传感器确定第二预设距离内有物体遮挡所述第一屏的情况下,执行下述至少一项:控制所述第一屏保持灭屏状态,禁止所述第一屏在灭屏状态下点亮预设区域,所述预设区域用于显示提示信息。The control module is further configured to perform at least one of the following when it is determined according to the infrared sensor that there is an object blocking the first screen within a second preset distance: controlling the first screen to maintain a screen-off state , prohibiting the first screen from lighting up a preset area in an off-screen state, where the preset area is used to display prompt information. 11.一种终端设备,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至5中任一项所述的接近检测方法的步骤。11. A terminal device, characterized by comprising a processor, a memory and a computer program stored on the memory and running on the processor, the computer program being executed by the processor to achieve the The steps of the proximity detection method of any one of claims 1 to 5. 12.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5中任一项所述的接近检测方法的步骤。12. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the approach according to any one of claims 1 to 5 is implemented The steps of the detection method.
CN201910907360.2A 2019-09-24 2019-09-24 Proximity detection method and terminal equipment Pending CN110753155A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910907360.2A CN110753155A (en) 2019-09-24 2019-09-24 Proximity detection method and terminal equipment
PCT/CN2020/116783 WO2021057712A1 (en) 2019-09-24 2020-09-22 Proximity detection method and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910907360.2A CN110753155A (en) 2019-09-24 2019-09-24 Proximity detection method and terminal equipment

Publications (1)

Publication Number Publication Date
CN110753155A true CN110753155A (en) 2020-02-04

Family

ID=69276946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910907360.2A Pending CN110753155A (en) 2019-09-24 2019-09-24 Proximity detection method and terminal equipment

Country Status (2)

Country Link
CN (1) CN110753155A (en)
WO (1) WO2021057712A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111638522A (en) * 2020-04-30 2020-09-08 维沃移动通信有限公司 Proximity detection method and electronic device
WO2021057712A1 (en) * 2019-09-24 2021-04-01 维沃移动通信有限公司 Proximity detection method and terminal device
CN113596248A (en) * 2020-04-30 2021-11-02 华为技术有限公司 Display screen control method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115079804B (en) * 2021-12-09 2023-11-07 荣耀终端有限公司 A control processing method for electronic equipment
CN118672378A (en) * 2023-03-14 2024-09-20 华为技术有限公司 Display screen control method and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520852A (en) * 2011-11-29 2012-06-27 华为终端有限公司 Control method of mobile equipment screen status and associated mobile equipment
CN107896272A (en) * 2017-08-11 2018-04-10 广东欧珀移动通信有限公司 Call control method and device
EP3313125A1 (en) * 2016-10-24 2018-04-25 Beijing Xiaomi Mobile Software Co., Ltd. Method and device for controlling screen state, computer program and recording medium
CN108391001A (en) * 2018-02-05 2018-08-10 广东欧珀移动通信有限公司 Screen control method and device of terminal, readable storage medium and terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6122355B2 (en) * 2013-06-26 2017-04-26 京セラ株式会社 Mobile terminal device
CN108966323B (en) * 2017-05-17 2021-06-08 上海中兴软件有限责任公司 Bright screen control method and device and terminal
CN112995410B (en) * 2018-06-15 2022-06-17 Oppo广东移动通信有限公司 Proximity detection method and related equipment
CN110753155A (en) * 2019-09-24 2020-02-04 维沃移动通信有限公司 Proximity detection method and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520852A (en) * 2011-11-29 2012-06-27 华为终端有限公司 Control method of mobile equipment screen status and associated mobile equipment
EP3313125A1 (en) * 2016-10-24 2018-04-25 Beijing Xiaomi Mobile Software Co., Ltd. Method and device for controlling screen state, computer program and recording medium
CN107896272A (en) * 2017-08-11 2018-04-10 广东欧珀移动通信有限公司 Call control method and device
CN108391001A (en) * 2018-02-05 2018-08-10 广东欧珀移动通信有限公司 Screen control method and device of terminal, readable storage medium and terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057712A1 (en) * 2019-09-24 2021-04-01 维沃移动通信有限公司 Proximity detection method and terminal device
CN111638522A (en) * 2020-04-30 2020-09-08 维沃移动通信有限公司 Proximity detection method and electronic device
CN113596248A (en) * 2020-04-30 2021-11-02 华为技术有限公司 Display screen control method and device
CN113596248B (en) * 2020-04-30 2022-11-11 华为技术有限公司 Display screen control method and device

Also Published As

Publication number Publication date
WO2021057712A1 (en) 2021-04-01

Similar Documents

Publication Publication Date Title
KR102640072B1 (en) Screen display control methods and electronic devices
WO2021057267A1 (en) Image processing method and terminal device
WO2019080775A1 (en) Notification message prompting method and mobile terminal
CN110753155A (en) Proximity detection method and terminal equipment
CN109379484B (en) An information processing method and terminal
CN110058836B (en) An audio signal output method and terminal device
CN110855830A (en) Information processing method and electronic equipment
CN109995933B (en) Method for controlling alarm clock of terminal device and terminal device
CN111414143A (en) Display control method, electronic device, and medium
CN108848256B (en) Key control method of double-screen terminal and double-screen terminal
CN109257505B (en) Screen control method and mobile terminal
WO2021121099A1 (en) Message notification method and electronic device
WO2019228296A1 (en) Display processing method and terminal device
WO2021164716A1 (en) Display method and electronic device
CN110209323A (en) A kind of method and terminal device showing unread message
WO2020215982A1 (en) Desktop icon management method and terminal device
WO2020181954A1 (en) Application program control method and terminal device
US11526320B2 (en) Multi-screen interface control method and terminal device
WO2020192297A1 (en) Screen interface switching method and terminal device
WO2021093772A1 (en) Notification message processing method and electronic device
CN110058686B (en) Control method and terminal equipment
WO2020211602A1 (en) Application control method and terminal device
WO2020151490A1 (en) Application control method and terminal device
WO2020238372A1 (en) Method for displaying unread message, and terminal device
WO2020015529A1 (en) Terminal device control method and terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200204

RJ01 Rejection of invention patent application after publication