patents.google.com

CN108833683B - Dynamic antenna adjustment implementation method and related product - Google Patents

  • ️Tue Feb 02 2021
动态天线调整实现方法及相关产品Dynamic antenna adjustment realization method and related products

技术领域technical field

本申请涉及通信以及终端领域,具体涉及一种动态天线调整实现方法及相关产品。The present application relates to the fields of communications and terminals, and in particular to a method for realizing dynamic antenna adjustment and related products.

背景技术Background technique

现有技术中,移动终端(如手机、平板电脑等)已经成为用户首选和使用频率最高的电子设备。随着手机全面屏机身设计的普及,手机天线性能受到了极大挑战。当手机处于人头手场景下通话时,手持对天线信号衰减影响极大,需要动态天线调整(DynamicAntenna Turner,后面简称DAT),现有的DAT调整的方案为随机从移动终端的天线中选择一个天线作为调整后的天线,这样调整后的天线信号可能也不好,导致通话质量降低,这样影响用户使用手机的体验度。In the prior art, mobile terminals (such as mobile phones, tablet computers, etc.) have become the electronic devices that are preferred and most frequently used by users. With the popularization of full-screen body design of mobile phones, the performance of mobile phone antennas has been greatly challenged. When the mobile phone is in the head-to-hand scenario, the hand-held has a great influence on the attenuation of the antenna signal, which requires dynamic antenna adjustment (Dynamic Antenna Turner, hereinafter referred to as DAT). The existing DAT adjustment scheme is to randomly select an antenna from the antennas of the mobile terminal As the adjusted antenna, the signal of the adjusted antenna may not be good, resulting in lower call quality, which affects the user's experience of using the mobile phone.

申请内容Application content

本申请实施例提供了一种动态天线调整实现方法及相关产品,在执行DAT天线调整时,依据天线与障碍物的距离来选择DAT调整的天线,减少障碍物对天线信号的影响,提高用户体验度。The embodiments of the present application provide a method for implementing dynamic antenna adjustment and related products. When performing DAT antenna adjustment, the antenna for DAT adjustment is selected according to the distance between the antenna and the obstacle, so as to reduce the influence of the obstacle on the antenna signal and improve the user experience. Spend.

第一方面,本申请实施例提供一种动态天线调整实现方法,所述方法应用于电子设备,所述电子设备包括:多根天线、触控显示屏和传感器;所述方法包括如下步骤:In a first aspect, an embodiment of the present application provides a method for implementing dynamic antenna adjustment. The method is applied to an electronic device, where the electronic device includes: a plurality of antennas, a touch display screen, and a sensor; the method includes the following steps:

在语音通话时,检测所述语音通话的第一天线的信号强度以及触控显示屏是否处于熄屏状态;During a voice call, detect the signal strength of the first antenna of the voice call and whether the touch screen is in a screen-off state;

如所述信号强度低于信号阈值且触控显示屏处于熄屏状态,检测所述第一天线与阻碍物之间的第一距离;If the signal strength is lower than the signal threshold and the touch display screen is in a screen-off state, detect the first distance between the first antenna and the obstacle;

依据所述第一距离确定是否启动动态天线调整DAT将所述语音通话切换至其他天线,所述其他天线为所述多根天线中除第一天线以外的天线。Whether to activate the dynamic antenna adjustment DAT to switch the voice call to another antenna is determined according to the first distance, and the other antenna is an antenna other than the first antenna among the plurality of antennas.

第二方面,提供一种电子设备,所述电子设备包括:多根天线、触控显示屏、传感器和处理器,In a second aspect, an electronic device is provided, the electronic device comprising: a plurality of antennas, a touch display screen, a sensor and a processor,

所述处理器,用于在语音通话时,检测所述语音通话的第一天线的信号强度以及触控显示屏是否处于熄屏状态;The processor is configured to detect the signal strength of the first antenna of the voice call and whether the touch display screen is in a screen-off state during a voice call;

所述传感器,用于如所述信号强度低于信号阈值且触控显示屏处于熄屏状态,检测所述第一天线与阻碍物之间的第一距离;the sensor, configured to detect the first distance between the first antenna and the obstacle when the signal strength is lower than the signal threshold and the touch display screen is in a screen-off state;

所述处理器,还用于依据所述第一距离确定是否启动动态天线调整DAT将所述语音通话切换至其他天线,所述其他天线为所述多根天线中除第一天线以外的天线。The processor is further configured to determine, according to the first distance, whether to activate the dynamic antenna adjustment DAT to switch the voice call to another antenna, where the other antenna is an antenna other than the first antenna among the plurality of antennas.

第三方面,提供一种计算机可读存储介质,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行第一方面提供的所述的方法。In a third aspect, a computer-readable storage medium is provided, which stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method provided in the first aspect.

第四方面,提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行第一方面提供的方法。In a fourth aspect, a computer program product is provided, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform the method provided by the first aspect.

实施本申请实施例,具有如下有益效果:Implementing the embodiments of the present application has the following beneficial effects:

可以看出,本申请提供的技术方案在进行语音通话时,检测语音通话的信号强度的第一天线的信号强度以及触控显示屏是否处于熄屏状态,如该信号强度低于信号阈值且处于熄屏状态,检测第一天线与阻碍物之间的距离,当距离低于距离阈值且维持一时间时,启动DAT将该语音通话切换至其他天线,这样在执行DAT切换时,考虑了阻碍物的距离以及持续时间,避免了由于瞬时距离低于距离阈值执行DAT切换的问题,这样可以减少不必要的DAT切换,提高语音通话质量、降低功耗,提高用户体验度。It can be seen that the technical solution provided by the present application detects the signal strength of the first antenna for the signal strength of the voice call and whether the touch screen is in a screen-off state, if the signal strength is lower than the signal threshold and is in the off-screen state. When the screen is off, the distance between the first antenna and the obstacle is detected. When the distance is lower than the distance threshold and maintained for a period of time, DAT is activated to switch the voice call to other antennas. In this way, the obstacle is considered when performing DAT switching. This avoids the problem of performing DAT switching due to the instantaneous distance being lower than the distance threshold, which can reduce unnecessary DAT switching, improve voice call quality, reduce power consumption, and improve user experience.

附图说明Description of drawings

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

图1是本申请实施例提供的一种电子设备的结构示意图。FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

图2是本申请实施例公开的一种电子设备的示意图。FIG. 2 is a schematic diagram of an electronic device disclosed in an embodiment of the present application.

图3是本申请实施例提供的一种动态天线调整实现方法的流程示意图。FIG. 3 is a schematic flowchart of a method for implementing dynamic antenna adjustment provided by an embodiment of the present application.

图4是本申请实施例提供的一种电子设备的另一种结构示意图。FIG. 4 is another schematic structural diagram of an electronic device provided by an embodiment of the present application.

图5是本申请实施例公开的一种手机的结构示意图。FIG. 5 is a schematic structural diagram of a mobile phone disclosed in an embodiment of the present application.

具体实施方式Detailed ways

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

本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" in the description and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order . Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover 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 also includes For other steps or units inherent to 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 application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

请参阅图1,图1是本申请实施例提供了一种电子设备,请参阅图1,图1是本发明实施例提供了一种电子设备100的结构示意图,上述电子设备100包括:壳体110、电路板120、电池130、盖板140、触控显示屏150和收发器180,所述壳体110上设置所述电路板120、所述电池130和所述盖板140,所述电路板120还设置有连接所述触控显示屏150的电路;所述电路板120还可以包括:应用处理器AP190。上述收发器180具体可以为多根天线以及与该天线配套的电路,本申请中的电子设备中的天线为多根。Please refer to FIG. 1. FIG. 1 is an electronic device provided by an embodiment of the present application. Please refer to FIG. 1. FIG. 1 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present invention. The electronic device 100 includes: a casing 110 , the circuit board 120 , the battery 130 , the cover 140 , the touch display screen 150 and the transceiver 180 , the circuit board 120 , the battery 130 and the cover 140 are arranged on the casing 110 , the circuit The board 120 is further provided with a circuit connected to the touch display screen 150; the circuit board 120 may further include: an application processor AP190. Specifically, the transceiver 180 may be a plurality of antennas and a circuit matched with the antennas, and there are multiple antennas in the electronic device in this application.

上述触控显示屏具体可以为薄膜晶体管液晶显示器(Thin Film Transistor-Liquid Crystal Display,TFT-LCD)、发光二极管(Light Emitting Diode,LED)显示屏、有机发光二极管(Organic Light-Emitting Diode,OLED)显示屏等。The above-mentioned touch display screen may specifically be a thin film transistor liquid crystal display (Thin Film Transistor-Liquid Crystal Display, TFT-LCD), a light emitting diode (Light Emitting Diode, LED) display screen, an organic light emitting diode (Organic Light-Emitting Diode, OLED) display etc.

请参阅图2,图2是本申请实施例公开的另一种电子设备100的结构示意图,电子设备100包括存储和处理电路110,以及与所述存储和处理电路110连接的通信电路120和音频组件140,其中,在一些特定的电子设备100内,还可以设置显示组件130或触控组件。Please refer to FIG. 2 . FIG. 2 is a schematic structural diagram of another electronic device 100 disclosed in an embodiment of the present application. The electronic device 100 includes a storage and processing circuit 110 , and a communication circuit 120 and audio frequency connected to the storage and processing circuit 110 . The component 140, wherein, in some specific electronic devices 100, a display component 130 or a touch component may also be provided.

电子设备100可以包括控制电路,该控制电路可以包括存储和处理电路110。该存储和处理电路110可以存储器,例如硬盘驱动存储器,非易失性存储器(例如闪存或用于形成固态驱动器的其它电子可编程只读存储器等),易失性存储器(例如静态或动态随机存取存储器等)等,本申请实施例不作限制。存储和处理电路110中的处理电路可以用于控制电子设备100的运转。该处理电路可以基于一个或多个微处理器,微控制器,数字信号处理器,基带处理器,功率管理单元,音频编解码器芯片,专用集成电路,显示驱动器集成电路等来实现。Electronic device 100 may include control circuitry, which may include storage and processing circuitry 110 . The storage and processing circuit 110 may be memory, such as hard drive memory, non-volatile memory (such as flash memory or other electronically programmable read only memory used to form solid state drives, etc.), volatile memory (such as static or dynamic random access memory, etc.) memory, etc.), etc., which are not limited in the embodiments of the present application. Processing circuitry in storage and processing circuitry 110 may be used to control the operation of electronic device 100 . The processing circuit may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.

存储和处理电路110可用于运行电子设备100中的软件,例如互联网协议语音(Voice over Internet Protocol,VOIP)电话呼叫应用程序,同声翻译功能,媒体播放应用程序,操作系统功能等。这些软件可以用于执行一些控制操作,例如,基于照相机的图像采集,基于环境光传感器的环境光测量,基于接近传感器的接近传感器测量,基于诸如发光二极管的状态指示灯等状态指示器实现的信息显示功能,基于触摸传感器的触摸事件检测,与执行无线通信功能相关联的操作,与收集和产生音频信号相关联的操作,与收集和处理按钮按压事件数据相关联的控制操作,以及电子设备100中的其它功能等,本申请实施例不作限制。The storage and processing circuit 110 may be used to run software in the electronic device 100, such as Voice over Internet Protocol (VOIP) phone calling applications, simultaneous translation functions, media playback applications, operating system functions, and the like. These software can be used to perform some control operations, for example, camera-based image acquisition, ambient light measurement based on ambient light sensor, proximity sensor measurement based on proximity sensor, information based on status indicator implementation such as status indicators of light emitting diodes Display functions, touch sensor based touch event detection, operations associated with performing wireless communication functions, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and electronic device 100 Other functions and the like in this application are not limited in the embodiments of the present application.

电子设备100还可以包括输入-输出电路150。输入-输出电路150可用于使电子设备100实现数据的输入和输出,即允许电子设备100从外部设备接收数据和也允许电子设备100将数据从电子设备100输出至外部设备。输入-输出电路150可以进一步包括传感器170。传感器170可以包括环境光传感器,基于光和电容的接近传感器,触摸传感器(例如,基于光触摸传感器和/或电容式触摸传感器,其中,触摸传感器可以是触控显示屏的一部分,也可以作为一个触摸传感器结构独立使用),加速度传感器,和其它传感器等。Electronic device 100 may also include input-output circuitry 150 . The input-output circuit 150 may be used to enable the electronic device 100 to input and output data, ie, allowing the electronic device 100 to receive data from an external device and also allow the electronic device 100 to output data from the electronic device 100 to an external device. The input-output circuit 150 may further include a sensor 170 . Sensors 170 may include ambient light sensors, light and capacitance-based proximity sensors, touch sensors (eg, light-based touch sensors and/or capacitive touch sensors, where the touch sensor may be part of a touch-sensitive display screen, or may be used as a The touch sensor structure is used independently), acceleration sensor, and other sensors.

输入-输出电路150还可以包括触摸传感器阵列(即,显示器130可以是触控显示屏)。触摸传感器可以是由透明的触摸传感器电极(例如氧化铟锡(ITO)电极)阵列形成的电容式触摸传感器,或者可以是使用其它触摸技术形成的触摸传感器,例如音波触控,压敏触摸,电阻触摸,光学触摸等,本申请实施例不作限制。Input-output circuitry 150 may also include an array of touch sensors (ie, display 130 may be a touch display). The touch sensor can be a capacitive touch sensor formed from an array of transparent touch sensor electrodes, such as indium tin oxide (ITO) electrodes, or can be a touch sensor formed using other touch technologies, such as sonic touch, pressure sensitive touch, resistive touch Touch, optical touch, etc., are not limited in the embodiments of the present application.

电子设备100还可以包括音频组件140。音频组件140可以用于为电子设备100提供音频输入和输出功能。电子设备100中的音频组件140可以包括扬声器,麦克风,蜂鸣器,音调发生器以及其它用于产生和检测声音的组件。The electronic device 100 may also include an audio component 140 . Audio component 140 may be used to provide audio input and output functionality for electronic device 100 . Audio components 140 in electronic device 100 may include speakers, microphones, buzzers, tone generators, and other components for generating and detecting sounds.

通信电路120可以用于为电子设备100提供与外部设备通信的能力。通信电路120可以包括模拟和数字输入-输出接口电路,和基于射频信号和/或光信号的无线通信电路。通信电路120中的无线通信电路可以包括射频收发器电路、功率放大器电路、低噪声放大器、开关、滤波器和天线。举例来说,通信电路120中的无线通信电路可以包括用于通过发射和接收近场耦合电磁信号来支持近场通信(Near Field Communication,NFC)的电路。例如,通信电路120可以包括近场通信天线和近场通信收发器。通信电路120还可以包括蜂窝电话收发器和天线,无线局域网收发器电路和天线等。Communication circuitry 120 may be used to provide electronic device 100 with the ability to communicate with external devices. Communication circuitry 120 may include analog and digital input-output interface circuitry, and wireless communication circuitry based on radio frequency signals and/or optical signals. Wireless communication circuitry in communication circuitry 120 may include radio frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless communication circuitry in the communication circuitry 120 may include circuitry for supporting Near Field Communication (NFC) by transmitting and receiving near-field coupled electromagnetic signals. For example, the communication circuit 120 may include a near field communication antenna and a near field communication transceiver. Communication circuitry 120 may also include cellular telephone transceivers and antennas, wireless local area network transceiver circuits and antennas, and the like.

电子设备100还可以进一步包括电池,电力管理电路和其它输入-输出单元160。输入-输出单元160可以包括按钮,操纵杆,点击轮,滚动轮,触摸板,小键盘,键盘,照相机,发光二极管或其它状态指示器等。The electronic device 100 may further include batteries, power management circuits and other input-output units 160 . Input-output unit 160 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes or other status indicators, and the like.

用户可以通过输入-输出电路150输入命令来控制电子设备100的操作,并且可以使用输入-输出电路150的输出数据以实现接收来自电子设备100的状态信息和其它输出。A user may input commands through the input-output circuit 150 to control the operation of the electronic device 100 , and the output data of the input-output circuit 150 may be used to effect receiving status information and other outputs from the electronic device 100 .

参阅图3,图3提供了一种动态天线调整实现方法,该方法在如图1或图2所示的电子设备中实现,该电子设备包括多根天线、触控显示屏、传感器以及处理器,该处理器与触控显示屏和传感器连接,该传感器可以用于检测距离,如图3所示,该方法包括如下步骤:Referring to FIG. 3, FIG. 3 provides a method for implementing dynamic antenna adjustment. The method is implemented in the electronic device as shown in FIG. 1 or FIG. 2. The electronic device includes multiple antennas, a touch display screen, a sensor and a processor. , the processor is connected with the touch display screen and the sensor, the sensor can be used to detect the distance, as shown in Figure 3, the method includes the following steps:

步骤S301、在语音通话时,电子设备检测语音通话的第一天线的信号强度以及触控显示屏是否处于熄屏状态;Step S301, during the voice call, the electronic device detects the signal strength of the first antenna of the voice call and whether the touch screen is in a screen-off state;

上述步骤S301中语音通信的可以采用通信标准或协议实现,该通信标准或协议包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division MultipleAccess,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)中的任意一种或任意组合。In the above-mentioned step S301, the voice communication can be realized by using a communication standard or a protocol, and the communication standard or protocol includes but is not limited to the Global System of Mobile Communication (GSM), the General Packet Radio Service (GPRS) , any one or any combination of Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), and Long Term Evolution (Long Term Evolution, LTE).

本步骤中的熄屏状态是为了避免在免提时执行DAT切换,因为如果在语音通话为免提状态或未用听筒接听时,此时各个天线的信号强度一般都很好,所以此时无需启动DAT增加额外的开销,只有在熄屏状态下启动DAT才具有一定的实际的意义。The screen-off state in this step is to avoid performing DAT switching when hands-free, because if the voice call is in the hands-free state or the handset is not used to answer the call, the signal strength of each antenna is generally good at this time, so there is no need at this time. Starting DAT adds extra overhead, and only starting DAT in the off-screen state has certain practical significance.

步骤S302、如信号强度低于信号阈值且触控显示屏处于熄屏状态,电子设备检测该第一天线与阻碍物之间的第一距离;Step S302, if the signal strength is lower than the signal threshold and the touch display screen is in a screen-off state, the electronic device detects the first distance between the first antenna and the obstacle;

上述步骤S302中电子设备检测第一天线与阻碍物之间的第一距离的方式包括但不限于:通过传感器来检测第一天线与阻碍物之间的距离,该传感器包括但不限于:超声波传感器、近距离传感器或红外传感器中的一种或任意组合。The manner in which the electronic device detects the first distance between the first antenna and the obstacle in the above-mentioned step S302 includes but is not limited to: detecting the distance between the first antenna and the obstacle through a sensor, and the sensor includes but is not limited to: an ultrasonic sensor , one or any combination of proximity sensor or infrared sensor.

步骤S303、电子设备依据该第一距离确定是否启动动态天线调整DAT将该语音通话切换至其他天线,该其他天线为多根天线中除第一天线以外的天线。Step S303 , the electronic device determines whether to activate the dynamic antenna adjustment DAT to switch the voice call to another antenna according to the first distance, and the other antenna is an antenna other than the first antenna among the plurality of antennas.

本申请提供的技术方案在进行语音通话时,检测语音通话的信号强度的第一天线的信号强度以及触控显示屏是否处于熄屏状态,如该信号强度低于信号阈值且处于熄屏状态,检测第一天线与阻碍物之间的距离,当距离低于距离阈值且维持一时间时,启动DAT将该语音通话切换至其他天线,这样在执行DAT切换时,考虑了阻碍物的距离以及持续时间,避免了由于瞬时距离低于距离阈值执行DAT切换的问题,这样可以减少不必要的DAT切换,提高语音通话质量、降低功耗,提高用户体验度。The technical solution provided by the present application detects the signal strength of the first antenna for the signal strength of the voice call and whether the touch screen is in a screen-off state during a voice call. If the signal strength is lower than the signal threshold and the screen is off, Detect the distance between the first antenna and the obstacle. When the distance is lower than the distance threshold and maintain for a period of time, start DAT to switch the voice call to other antennas. In this way, when performing DAT switching, the distance and duration of the obstacle are considered. It avoids the problem of performing DAT switching due to the instantaneous distance being lower than the distance threshold, which can reduce unnecessary DAT switching, improve the quality of voice calls, reduce power consumption, and improve user experience.

可选的,上述电子设备依据该第一距离确定是否启动DAT将该语音通话切换至其他天线具体可以包括:Optionally, the above-mentioned electronic device determining whether to start the DAT to switch the voice call to another antenna according to the first distance may specifically include:

电子设备确定该第一距离是否小于距离阈值,如小于距离阈值且持续一时间,电子设备启动DAT将该语音通话切换至其他天线。The electronic device determines whether the first distance is less than the distance threshold, and if it is less than the distance threshold for a period of time, the electronic device activates DAT to switch the voice call to another antenna.

可选的,上述方法还可以包括:Optionally, the above method may further include:

如电子设备移动,电子设备再次检测第一天线与阻碍物之间的第二距离,如第二距离大于距离阈值,启动DAT将该语音通话切换回第一天线。If the electronic device moves, the electronic device detects the second distance between the first antenna and the obstacle again. If the second distance is greater than the distance threshold, the DAT is activated to switch the voice call back to the first antenna.

此技术方案是在第一天线与阻碍物之间的距离大于距离阈值以后切换回该第一天线,因为对于电子设备来说,语音通话选择的第一天线一般为多根天线中最合适的天线,所以当阻碍物对第一天线的信号质量不影响时,切换回第一天线即可。This technical solution is to switch back to the first antenna after the distance between the first antenna and the obstacle is greater than the distance threshold, because for electronic devices, the first antenna selected for voice calls is generally the most suitable antenna among multiple antennas , so when the obstacle does not affect the signal quality of the first antenna, just switch back to the first antenna.

可选的,如该电子设备包括超声波传感器和角度传感器,则依据该第一距离确定是否启动DAT将该语音通话切换至其他天线具体包括:Optionally, if the electronic device includes an ultrasonic sensor and an angle sensor, determining whether to activate DAT to switch the voice call to another antenna according to the first distance specifically includes:

角度传感器检测电子设备的角度,如该角度发生变化时,控制超声波传感器在第一时间区间内发射超声波信号,该第一时间区间的起始时间为角度发生变化的第一时间t1,第一时间区间的持续时间为一设定值(例如2秒),接收该超声波信号的反射信号,采集反射信号中n个信号强度值,如n个信号强度值中的最大值与最小值差的绝对值低于差值阈值且n个信号强度值的平均值大于信号强度阈值,确定第一距离小于距离阈值,启动DAT将语音通话切换至其他天线。上述n取值为大于等于2的整数。The angle sensor detects the angle of the electronic device. If the angle changes, the ultrasonic sensor is controlled to transmit ultrasonic signals in a first time interval. The starting time of the first time interval is the first time t1 when the angle changes. The first time The duration of the interval is a set value (for example, 2 seconds), receive the reflected signal of the ultrasonic signal, and collect n signal strength values in the reflected signal, such as the absolute value of the difference between the maximum value and the minimum value among the n signal strength values. If it is lower than the difference threshold and the average value of the n signal strength values is greater than the signal strength threshold, it is determined that the first distance is less than the distance threshold, and DAT is activated to switch the voice call to another antenna. The value of n above is an integer greater than or equal to 2.

本申请提供的技术方案在角度传感器检测到角度变化时,发射超声波信号,并接收超声波反射信号,采集反射信号的n个信号强度值,依据该n个信号强度值的最大值与最小值之间的差值的绝对值以及n个信号强度值的平均值来确定角度对障碍物的影响来判断其第一距离是否小于距离阈值,进而来确定是否启动DAT。其基于的原因为,对于超声波信号以及反射信号,一般反射信号为与超声波信号垂直的面的阻碍物将超声波信号反射过来的,角度对发射信号的强度的变化影响很大,本申请的技术方案选择的为角度变化的第一时间区间,在这个时间区间,由于电子设备的角度变化了,电子设备上的超声波传感器与阻碍物之间的角度也会发生变化,此种情况下阻碍物的距离一般与电子设备较远,因为较远距离的阻碍物,电子设备角度变化以后,相对于超声波信号垂直面的面积也会发生变化,这个面积变化在反射信号上主要表现是信号强度降低或增加。另外一种情况是阻碍物与电子设备的第一距离非常小,此种情况电子设备的角度变化以后,由于与阻碍物非常近,相对于超声波信号垂直面的面积变化不大,其在反射信号的表现来看就是信号强度基本不变,即n个信号强度值中的最大值与最小值差的绝对值低于差值阈值。此外,还有一种情况是阻碍物面积大但是距离比较远,此种情况电子设备角度的变化对阻碍物垂直面的面积影响也很小,但是由于距离比较远,所以其反射信号由于传输距离远,所以其信号强度的平均值会比较小,所以上述方案通过n个信号强度值的平均值大于信号强度阈值这个特征将该情况排除。所以通过上述两个方向的设置,即如n个信号强度值中的最大值与最小值差的绝对值低于差值阈值且n个信号强度值的平均值大于信号强度阈值的设置,将情况设定在阻碍物非常近的情况,从而对DAT的启动提供判断的依据,可以减少不必要的DAT切换,提高语音通话质量、降低功耗,提高用户体验度。The technical solution provided by the present application transmits ultrasonic signals and receives ultrasonic reflected signals when the angle sensor detects an angle change, and collects n signal strength values of the reflected signals, according to the difference between the maximum value and the minimum value of the n signal strength values. The absolute value of the difference and the average value of n signal strength values are used to determine the influence of the angle on the obstacle to determine whether the first distance is less than the distance threshold, and then to determine whether to start the DAT. The reason for this is that, for ultrasonic signals and reflected signals, generally, the reflected signal is reflected by the obstacle on the surface perpendicular to the ultrasonic signal, and the angle has a great influence on the change of the intensity of the transmitted signal. The first time interval of the angle change is selected. In this time interval, due to the change of the angle of the electronic device, the angle between the ultrasonic sensor on the electronic device and the obstacle will also change. In this case, the distance of the obstacle will change. Generally, it is farther from the electronic equipment. Because of the obstacles at a long distance, after the angle of the electronic equipment changes, the area relative to the vertical plane of the ultrasonic signal will also change. This area change is mainly reflected in the reflected signal. The signal strength decreases or increases. Another situation is that the first distance between the obstacle and the electronic device is very small. In this case, after the angle of the electronic device changes, because it is very close to the obstacle, the area of the vertical plane relative to the ultrasonic signal does not change much. From the performance point of view, the signal strength is basically unchanged, that is, the absolute value of the difference between the maximum value and the minimum value among the n signal strength values is lower than the difference threshold. In addition, there is also a situation where the area of the obstacle is large but the distance is relatively far. In this case, the change of the angle of the electronic device has little effect on the area of the vertical surface of the obstacle, but because the distance is relatively long, the reflected signal is transmitted due to the long distance. , so the average value of its signal strength will be relatively small, so the above scheme excludes this situation by the feature that the average value of n signal strength values is greater than the signal strength threshold. Therefore, through the settings of the above two directions, that is, if the absolute value of the difference between the maximum value and the minimum value of the n signal strength values is lower than the difference threshold and the average value of the n signal strength values is greater than the signal strength threshold, the situation will be changed. It is set when the obstacle is very close, so as to provide a basis for judging the activation of DAT, which can reduce unnecessary DAT switching, improve the quality of voice calls, reduce power consumption, and improve user experience.

可选的,如该电子设备包括超声波传感器和角度传感器,则依据该第一距离确定是否启动DAT将该语音通话切换至其他天线具体包括:Optionally, if the electronic device includes an ultrasonic sensor and an angle sensor, determining whether to activate DAT to switch the voice call to another antenna according to the first distance specifically includes:

角度传感器检测电子设备的角度,如该角度变化的频率高于频率阈值时,控制超声波传感器在第二时间区间内发射超声波信号,该第二时间区间的起始时间为确定角度变化的频率高于频率阈值的第二时间t1,第二时间区间的持续时间为一设定值(例如2秒),接收该超声波信号的反射信号,采集反射信号中m个信号强度值,如m个信号强度值中的最大值与最小值差的绝对值低于差值阈值且m个信号强度值的平均值大于信号强度阈值,确定第一距离小于距离阈值,启动DAT将语音通话切换至其他天线。上述m取值为大于等于2的整数。The angle sensor detects the angle of the electronic device, and if the frequency of the angle change is higher than the frequency threshold, the ultrasonic sensor is controlled to transmit the ultrasonic signal in the second time interval, and the starting time of the second time interval is to determine that the frequency of the angle change is higher than the frequency of the angle change. The second time t1 of the frequency threshold, the duration of the second time interval is a set value (for example, 2 seconds), receive the reflected signal of the ultrasonic signal, and collect m signal strength values in the reflected signal, such as m signal strength values. If the absolute value of the difference between the maximum value and the minimum value is lower than the difference threshold and the average value of m signal strength values is greater than the signal strength threshold, it is determined that the first distance is less than the distance threshold, and DAT is activated to switch the voice call to other antennas. The value of m above is an integer greater than or equal to 2.

本申请提供的技术方案在角度传感器检测到角度变化时,检测角度变化的频率是否高于频率阈值,如高于频率阈值,在第二时间区间发射超声波信号,并接收超声波反射信号,采集反射信号的n个信号强度值,依据该n个信号强度值的最大值与最小值之间的差值的绝对值以及n个信号强度值的平均值来确定角度对障碍物的影响来判断其第一距离是否小于距离阈值,进而来确定是否启动DAT。其基于的原因为,对于超声波信号以及反射信号,一般反射信号为与超声波信号垂直的面的阻碍物将超声波信号反射过来的,角度对发射信号的强度的变化影响很大,本申请的技术方案选择的为角度变化的第一时间区间,在这个时间区间,由于电子设备的角度变化了,电子设备上的超声波传感器与阻碍物之间的角度也会发生变化,此种情况下阻碍物的距离一般与电子设备较远,因为较远距离的阻碍物,电子设备角度变化以后,相对于超声波信号垂直面的面积也会发生变化,这个面积变化在反射信号上主要表现是信号强度降低或增加。另外一种情况是阻碍物与电子设备的第一距离非常小,此种情况电子设备的角度变化以后,由于与阻碍物非常近,相对于超声波信号垂直面的面积变化不大,其在反射信号的表现来看就是信号强度基本不变,即m个信号强度值中的最大值与最小值差的绝对值低于差值阈值。此外,还有一种情况是阻碍物面积大但是距离比较远,此种情况电子设备角度的变化对阻碍物垂直面的面积影响也很小,但是由于距离比较远,所以其反射信号由于传输距离远,所以其信号强度的平均值会比较小,所以上述方案通过m个信号强度值的平均值大于信号强度阈值这个特征将该情况排除。所以通过上述两个方向的设置,即如m个信号强度值中的最大值与最小值差的绝对值低于差值阈值且m个信号强度值的平均值大于信号强度阈值的设置,将情况设定在阻碍物非常近的情况,从而对DAT的启动提供判断的依据,可以减少不必要的DAT切换,提高语音通话质量、降低功耗,提高用户体验度。In the technical solution provided by the present application, when the angle sensor detects the angle change, it detects whether the frequency of the angle change is higher than the frequency threshold. According to the n signal strength values of the n signal strength values, the absolute value of the difference between the maximum value and the minimum value of the n signal strength values and the average value of the n signal strength values are used to determine the influence of the angle on the obstacle to determine its first Whether the distance is less than the distance threshold is used to determine whether to start DAT. The reason for this is that, for ultrasonic signals and reflected signals, generally, the reflected signal is reflected by the obstacle on the surface perpendicular to the ultrasonic signal, and the angle has a great influence on the change of the intensity of the transmitted signal. The first time interval of the angle change is selected. In this time interval, due to the change of the angle of the electronic device, the angle between the ultrasonic sensor on the electronic device and the obstacle will also change. In this case, the distance of the obstacle will change. Generally, it is farther from the electronic equipment. Because of the obstacles at a long distance, after the angle of the electronic equipment changes, the area relative to the vertical plane of the ultrasonic signal will also change. This area change is mainly reflected in the reflected signal. The signal strength decreases or increases. Another situation is that the first distance between the obstacle and the electronic device is very small. In this case, after the angle of the electronic device changes, because it is very close to the obstacle, the area of the vertical plane relative to the ultrasonic signal does not change much. From the performance point of view, the signal strength is basically unchanged, that is, the absolute value of the difference between the maximum value and the minimum value among the m signal strength values is lower than the difference threshold. In addition, there is also a situation where the area of the obstacle is large but the distance is relatively far. In this case, the change of the angle of the electronic device has little effect on the area of the vertical surface of the obstacle, but because the distance is relatively long, the reflected signal is transmitted due to the long distance. , so the average value of its signal strength will be relatively small, so the above scheme excludes this situation by the feature that the average value of m signal strength values is greater than the signal strength threshold. Therefore, through the settings in the above two directions, that is, if the absolute value of the difference between the maximum value and the minimum value among the m signal strength values is lower than the difference threshold and the average value of the m signal strength values is greater than the signal strength threshold, the situation will be changed. It is set when the obstacle is very close, so as to provide a basis for judging the activation of DAT, which can reduce unnecessary DAT switching, improve the quality of voice calls, reduce power consumption, and improve user experience.

参阅图4,图4提供了一种电子设备,所述电子设备包括:多根天线401、触控显示屏402、传感器403和处理器404,多根天线401、触控显示屏402、传感器403与处理器404连接,其连接方式可以为多种方式,例如如图4所示的采用总线405的方式连接,当然在实际应用中,也可以采用其他连接方式,本申请并不限制上述连接的具体方式。Referring to FIG. 4, FIG. 4 provides an electronic device, the electronic device includes: a plurality of antennas 401, a touch display screen 402, a sensor 403 and a processor 404, a plurality of antennas 401, a touch display screen 402, and a sensor 403 It is connected to the processor 404, and its connection mode can be in various ways, for example, as shown in FIG. specific way.

处理器404,用于在语音通话时,检测所述语音通话的第一天线的信号强度以及触控显示屏是否处于熄屏状态;The processor 404 is configured to detect the signal strength of the first antenna of the voice call and whether the touch display screen is in a screen-off state during a voice call;

传感器403,用于如所述信号强度低于信号阈值且触控显示屏处于熄屏状态,检测所述第一天线与阻碍物之间的第一距离;a sensor 403, configured to detect a first distance between the first antenna and an obstacle if the signal strength is lower than a signal threshold and the touch screen is in a screen-off state;

处理器404,还用于依据所述第一距离确定是否启动动态天线调整DAT将所述语音通话切换至其他天线,所述其他天线为所述多根天线中除第一天线以外的天线。The processor 404 is further configured to determine, according to the first distance, whether to activate the dynamic antenna adjustment DAT to switch the voice call to another antenna, where the other antenna is an antenna other than the first antenna among the plurality of antennas.

可选的,处理器404,具体用于确定所述第一距离是否小于距离阈值,如小于距离阈值且持续一时间,启动DAT将所述语音通话切换至其他天线。Optionally, the processor 404 is specifically configured to determine whether the first distance is less than a distance threshold, if it is less than the distance threshold for a period of time, start DAT to switch the voice call to another antenna.

可选的,传感器403,还用于如所述电子设备移动,再次检测第一天线与阻碍物之间的第二距离;Optionally, the sensor 403 is further configured to detect the second distance between the first antenna and the obstacle again as the electronic device moves;

处理器404,还用于如所述第二距离大于距离阈值,启动DAT将所述语音通话切换回所述第一天线。The processor 404 is further configured to start the DAT to switch the voice call back to the first antenna if the second distance is greater than a distance threshold.

可选的,如传感器403包括:超声波传感器4031和角度传感器4032;Optionally, for example, the sensor 403 includes: an ultrasonic sensor 4031 and an angle sensor 4032;

角度传感器4032,用于检测电子设备的角度;The angle sensor 4032 is used to detect the angle of the electronic device;

处理器404,还用于如所述角度发生变化时,控制超声波传感器在第一时间区间内发射超声波信号,所述第一时间区间的起始时间为角度发生变化的第一时间t1,第一时间区间的持续时间为一设定值,接收所述超声波信号的反射信号,采集所述反射信号中n个信号强度值,如所述n个信号强度值中的最大值与最小值差值低于差值阈值且n个信号强度值的平均值大于信号强度阈值,确定第一距离小于距离阈值,启动DAT将语音通话切换至其他天线,所述n取大于等于2的整数。The processor 404 is further configured to control the ultrasonic sensor to transmit ultrasonic signals in a first time interval when the angle changes, and the start time of the first time interval is the first time t1 when the angle changes, and the first time interval is the first time t1 when the angle changes. The duration of the time interval is a set value, the reflected signal of the ultrasonic signal is received, and n signal strength values in the reflected signal are collected, for example, the difference between the maximum value and the minimum value among the n signal strength values is low. At the difference threshold and the average value of n signal strength values is greater than the signal strength threshold, it is determined that the first distance is less than the distance threshold, and DAT is activated to switch the voice call to other antennas, where n is an integer greater than or equal to 2.

本申请提供的处理器在角度传感器检测到角度变化时,发射超声波信号,并接收超声波反射信号,采集反射信号的n个信号强度值,依据该n个信号强度值的最大值与最小值之间的差值的绝对值以及n个信号强度值的平均值来确定角度对障碍物的影响来判断其第一距离是否小于距离阈值,进而来确定是否启动DAT。其基于的原因为,对于超声波信号以及反射信号,一般反射信号为与超声波信号垂直的面的阻碍物将超声波信号反射过来的,角度对发射信号的强度的变化影响很大,本申请的技术方案选择的为角度变化的第一时间区间,在这个时间区间,由于电子设备的角度变化了,电子设备上的超声波传感器与阻碍物之间的角度也会发生变化,此种情况下阻碍物的距离一般与电子设备较远,因为较远距离的阻碍物,电子设备角度变化以后,相对于超声波信号垂直面的面积也会发生变化,这个面积变化在反射信号上主要表现是信号强度降低或增加。另外一种情况是阻碍物与电子设备的第一距离非常小,此种情况电子设备的角度变化以后,由于与阻碍物非常近,相对于超声波信号垂直面的面积变化不大,其在反射信号的表现来看就是信号强度基本不变,即n个信号强度值中的最大值与最小值差的绝对值低于差值阈值。此外,还有一种情况是阻碍物面积大但是距离比较远,此种情况电子设备角度的变化对阻碍物垂直面的面积影响也很小,但是由于距离比较远,所以其反射信号由于传输距离远,所以其信号强度的平均值会比较小,所以上述方案通过n个信号强度值的平均值大于信号强度阈值这个特征将该情况排除。所以通过上述两个方向的设置,即如n个信号强度值中的最大值与最小值差的绝对值低于差值阈值且n个信号强度值的平均值大于信号强度阈值的设置,将情况设定在阻碍物非常近的情况,从而对DAT的启动提供判断的依据,可以减少不必要的DAT切换,提高语音通话质量、降低功耗,提高用户体验度。When the angle sensor detects the angle change, the processor provided by the present application transmits ultrasonic signals, receives ultrasonic reflected signals, and collects n signal strength values of the reflected signals, according to the difference between the maximum value and the minimum value of the n signal strength values. The absolute value of the difference and the average value of n signal strength values are used to determine the influence of the angle on the obstacle to determine whether the first distance is less than the distance threshold, and then to determine whether to start the DAT. The reason for this is that, for ultrasonic signals and reflected signals, generally, the reflected signal is reflected by the obstacle on the surface perpendicular to the ultrasonic signal, and the angle has a great influence on the change of the intensity of the transmitted signal. The first time interval of the angle change is selected. In this time interval, due to the change of the angle of the electronic device, the angle between the ultrasonic sensor on the electronic device and the obstacle will also change. In this case, the distance of the obstacle will change. Generally, it is farther from the electronic equipment. Because of the obstacles at a long distance, after the angle of the electronic equipment changes, the area relative to the vertical plane of the ultrasonic signal will also change. This area change is mainly reflected in the reflected signal. The signal strength decreases or increases. Another situation is that the first distance between the obstacle and the electronic device is very small. In this case, after the angle of the electronic device changes, because it is very close to the obstacle, the area of the vertical plane relative to the ultrasonic signal does not change much. From the performance point of view, the signal strength is basically unchanged, that is, the absolute value of the difference between the maximum value and the minimum value among the n signal strength values is lower than the difference threshold. In addition, there is also a situation where the area of the obstacle is large but the distance is relatively far. In this case, the change of the angle of the electronic device has little effect on the area of the vertical surface of the obstacle, but because the distance is relatively long, the reflected signal is transmitted due to the long distance. , so the average value of its signal strength will be relatively small, so the above scheme excludes this situation by the feature that the average value of n signal strength values is greater than the signal strength threshold. Therefore, through the settings of the above two directions, that is, if the absolute value of the difference between the maximum value and the minimum value of the n signal strength values is lower than the difference threshold and the average value of the n signal strength values is greater than the signal strength threshold, the situation will be changed. It is set when the obstacle is very close, so as to provide a basis for judging the activation of DAT, which can reduce unnecessary DAT switching, improve the quality of voice calls, reduce power consumption, and improve user experience.

可选的,角度传感器,用于检测电子设备的角度,Optional, an angle sensor to detect the angle of the electronics,

处理器,还用于如该角度变化的频率高于频率阈值时,控制超声波传感器在第二时间区间内发射超声波信号,该第二时间区间的起始时间为确定角度变化的频率高于频率阈值的第二时间t1,第二时间区间的持续时间为一设定值(例如2秒),接收该超声波信号的反射信号,采集反射信号中m个信号强度值,如m个信号强度值中的最大值与最小值差的绝对值低于差值阈值且m个信号强度值的平均值大于信号强度阈值,确定第一距离小于距离阈值,启动DAT将语音通话切换至其他天线。上述m取值为大于等于2的整数。The processor is further configured to control the ultrasonic sensor to transmit ultrasonic signals in a second time interval when the frequency of the angle change is higher than the frequency threshold, and the start time of the second time interval is to determine that the frequency of the angle change is higher than the frequency threshold At the second time t1, the duration of the second time interval is a set value (for example, 2 seconds), receive the reflected signal of the ultrasonic signal, and collect m signal strength values in the reflected signal, such as m signal strength values. If the absolute value of the difference between the maximum value and the minimum value is lower than the difference threshold and the average value of m signal strength values is greater than the signal strength threshold, it is determined that the first distance is less than the distance threshold, and DAT is activated to switch the voice call to another antenna. The value of m above is an integer greater than or equal to 2.

本申请提供的处理器在角度传感器检测到角度变化时,检测角度变化的频率是否高于频率阈值,如高于频率阈值,在第二时间区间发射超声波信号,并接收超声波反射信号,采集反射信号的n个信号强度值,依据该n个信号强度值的最大值与最小值之间的差值的绝对值以及n个信号强度值的平均值来确定角度对障碍物的影响来判断其第一距离是否小于距离阈值,进而来确定是否启动DAT。其基于的原因为,对于超声波信号以及反射信号,一般反射信号为与超声波信号垂直的面的阻碍物将超声波信号反射过来的,角度对发射信号的强度的变化影响很大,本申请的技术方案选择的为角度变化的第一时间区间,在这个时间区间,由于电子设备的角度变化了,电子设备上的超声波传感器与阻碍物之间的角度也会发生变化,此种情况下阻碍物的距离一般与电子设备较远,因为较远距离的阻碍物,电子设备角度变化以后,相对于超声波信号垂直面的面积也会发生变化,这个面积变化在反射信号上主要表现是信号强度降低或增加。另外一种情况是阻碍物与电子设备的第一距离非常小,此种情况电子设备的角度变化以后,由于与阻碍物非常近,相对于超声波信号垂直面的面积变化不大,其在反射信号的表现来看就是信号强度基本不变,即m个信号强度值中的最大值与最小值差的绝对值低于差值阈值。此外,还有一种情况是阻碍物面积大但是距离比较远,此种情况电子设备角度的变化对阻碍物垂直面的面积影响也很小,但是由于距离比较远,所以其反射信号由于传输距离远,所以其信号强度的平均值会比较小,所以上述方案通过m个信号强度值的平均值大于信号强度阈值这个特征将该情况排除。所以通过上述两个方向的设置,即如m个信号强度值中的最大值与最小值差的绝对值低于差值阈值且m个信号强度值的平均值大于信号强度阈值的设置,将情况设定在阻碍物非常近的情况,从而对DAT的启动提供判断的依据,可以减少不必要的DAT切换,提高语音通话质量、降低功耗,提高用户体验度。When the angle sensor detects the angle change, the processor provided by the present application detects whether the frequency of the angle change is higher than the frequency threshold. If it is higher than the frequency threshold, the processor transmits the ultrasonic signal in the second time interval, receives the ultrasonic reflection signal, and collects the reflection signal. According to the n signal strength values of the n signal strength values, the absolute value of the difference between the maximum value and the minimum value of the n signal strength values and the average value of the n signal strength values are used to determine the influence of the angle on the obstacle to determine its first Whether the distance is less than the distance threshold is used to determine whether to start DAT. The reason for this is that, for ultrasonic signals and reflected signals, generally, the reflected signal is reflected by the obstacle on the surface perpendicular to the ultrasonic signal, and the angle has a great influence on the change of the intensity of the transmitted signal. The first time interval of the angle change is selected. In this time interval, due to the change of the angle of the electronic device, the angle between the ultrasonic sensor on the electronic device and the obstacle will also change. In this case, the distance of the obstacle will change. Generally, it is farther from the electronic equipment. Because of the obstacles at a long distance, after the angle of the electronic equipment changes, the area relative to the vertical plane of the ultrasonic signal will also change. This area change is mainly reflected in the reflected signal. The signal strength decreases or increases. Another situation is that the first distance between the obstacle and the electronic device is very small. In this case, after the angle of the electronic device changes, because it is very close to the obstacle, the area of the vertical plane relative to the ultrasonic signal does not change much. From the performance point of view, the signal strength is basically unchanged, that is, the absolute value of the difference between the maximum value and the minimum value among the m signal strength values is lower than the difference threshold. In addition, there is also a situation where the area of the obstacle is large but the distance is relatively far. In this case, the change of the angle of the electronic device has little effect on the area of the vertical surface of the obstacle, but because the distance is relatively long, the reflected signal is transmitted due to the long distance. , so the average value of its signal strength will be relatively small, so the above scheme excludes this situation by the feature that the average value of m signal strength values is greater than the signal strength threshold. Therefore, through the settings in the above two directions, that is, if the absolute value of the difference between the maximum value and the minimum value among the m signal strength values is lower than the difference threshold and the average value of the m signal strength values is greater than the signal strength threshold, the situation will be changed. It is set when the obstacle is very close, so as to provide a basis for judging the activation of DAT, which can reduce unnecessary DAT switching, improve the quality of voice calls, reduce power consumption, and improve user experience.

图5示出的是与本申请实施例提供的移动终端相关的手机的部分结构的框图。参考图5,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、传感器950、音频采集器960、无线保真(Wireless Fidelity,WiFi)模块970、应用处理器AP980、电源990以及传感器等部件。本领域技术人员可以理解,图5中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,例如该射频电路910可以连接多根天线。FIG. 5 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal provided by an embodiment of the present application. Referring to FIG. 5 , the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a sensor 950, an audio collector 960, a wireless fidelity (WiFi) module 970, an application processor AP980, a power supply 990 and components such as sensors. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 5 does not constitute a limitation on the mobile phone, and may include more or less components than the one shown, or combine some components, or arrange different components, such as this The RF circuit 910 can be connected to multiple antennas.

下面结合图5对手机的各个构成部件进行具体的介绍:The following is a detailed introduction to each component of the mobile phone in conjunction with Figure 5:

输入单元930可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控显示屏933、指纹识别装置931、人脸识别装置936、虹膜识别装置937以及其他输入设备932。输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理按键、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。其中,The input unit 930 may be used to receive inputted numerical or character information, and generate key signal input related to user setting and function control of the mobile phone. Specifically, the input unit 930 may include a touch display screen 933 , a fingerprint recognition device 931 , a face recognition device 936 , an iris recognition device 937 and other input devices 932 . The input unit 930 may also include other input devices 932 . Specifically, other input devices 932 may include, but are not limited to, one or more of physical keys, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like. in,

AP980,用于在语音通话时,检测所述语音通话的第一天线的信号强度以及触控显示屏是否处于熄屏状态;AP980, used for detecting the signal strength of the first antenna of the voice call and whether the touch screen is off during a voice call;

传感器950,用于如所述信号强度低于信号阈值且触控显示屏处于熄屏状态,检测所述第一天线与阻碍物之间的第一距离;a sensor 950, configured to detect a first distance between the first antenna and an obstacle if the signal strength is lower than a signal threshold and the touch display screen is in a screen-off state;

AP980,还用于依据所述第一距离确定是否启动动态天线调整DAT将所述语音通话切换至其他天线,所述其他天线为所述多根天线中除第一天线以外的天线。The AP 980 is further configured to determine, according to the first distance, whether to activate the dynamic antenna adjustment DAT to switch the voice call to another antenna, where the other antenna is an antenna other than the first antenna among the plurality of antennas.

可选的,AP980,具体用于确定所述第一距离是否小于距离阈值,如小于距离阈值且持续一时间,启动DAT将所述语音通话切换至其他天线。Optionally, the AP980 is specifically configured to determine whether the first distance is less than a distance threshold, and if it is less than the distance threshold and lasts for a period of time, start DAT to switch the voice call to another antenna.

可选的,传感器950,还用于如所述电子设备移动,再次检测第一天线与阻碍物之间的第二距离;Optionally, the sensor 950 is further configured to detect the second distance between the first antenna and the obstacle again as the electronic device moves;

AP980,还用于如所述第二距离大于距离阈值,启动DAT将所述语音通话切换回所述第一天线。The AP 980 is further configured to start the DAT to switch the voice call back to the first antenna if the second distance is greater than a distance threshold.

可选的,如传感器950包括:超声波传感器890和角度传感器891;Optionally, for example, the sensor 950 includes: an ultrasonic sensor 890 and an angle sensor 891;

角度传感器891,用于检测电子设备的角度;An angle sensor 891, used to detect the angle of the electronic device;

AP980,还用于如所述角度发生变化时,控制超声波传感器在第一时间区间内发射超声波信号,所述第一时间区间的起始时间为角度发生变化的第一时间t1,第一时间区间的持续时间为一设定值,接收所述超声波信号的反射信号,采集所述反射信号中n个信号强度值,如所述n个信号强度值中的最大值与最小值差值低于差值阈值且n个信号强度值的平均值大于信号强度阈值,确定第一距离小于距离阈值,启动DAT将语音通话切换至其他天线,所述n取大于等于2的整数。AP980 is also used to control the ultrasonic sensor to transmit ultrasonic signals in a first time interval when the angle changes. The starting time of the first time interval is the first time t1 when the angle changes, and the first time interval The duration is a set value, receive the reflected signal of the ultrasonic signal, collect n signal strength values in the reflected signal, such as the difference between the maximum value and the minimum value of the n signal strength values is lower than the difference value threshold and the average value of n signal strength values is greater than the signal strength threshold, determine that the first distance is less than the distance threshold, and start DAT to switch the voice call to other antennas, where n is an integer greater than or equal to 2.

可选的,角度传感器891,用于检测电子设备的角度,Optionally, the angle sensor 891 is used to detect the angle of the electronic device,

AP980,还用于如该角度变化的频率高于频率阈值时,控制超声波传感器在第二时间区间内发射超声波信号,该第二时间区间的起始时间为确定角度变化的频率高于频率阈值的第二时间t1,第二时间区间的持续时间为一设定值(例如2秒),接收该超声波信号的反射信号,采集反射信号中m个信号强度值,如m个信号强度值中的最大值与最小值差的绝对值低于差值阈值且m个信号强度值的平均值大于信号强度阈值,确定第一距离小于距离阈值,启动DAT将语音通话切换至其他天线。上述m取值为大于等于2的整数。AP980 is also used to control the ultrasonic sensor to transmit ultrasonic signals in a second time interval when the frequency of the angle change is higher than the frequency threshold, and the start time of the second time interval is to determine that the frequency of the angle change is higher than the frequency threshold. The second time t1, the duration of the second time interval is a set value (for example, 2 seconds), the reflected signal of the ultrasonic signal is received, and m signal strength values in the reflected signal are collected, such as the maximum value of the m signal strength values. If the absolute value of the difference between the value and the minimum value is lower than the difference threshold and the average value of m signal strength values is greater than the signal strength threshold, it is determined that the first distance is less than the distance threshold, and DAT is activated to switch the voice call to other antennas. The value of m above is an integer greater than or equal to 2.

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

此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Additionally, memory 920 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.

RF电路910可用于信息的接收和发送。通常,RF电路910包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统、通用分组无线服务、码分多址、宽带码分多址、长期演进、新空口、电子邮件、短消息服务等。RF circuitry 910 may be used for the reception and transmission of information. Typically, the RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 910 may also communicate with networks and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile Communications, General Packet Radio Service, Code Division Multiple Access, Wideband Code Division Multiple Access, Long Term Evolution, New Air Interface, Email, Short Message Service, etc. .

手机还可包括至少一种传感器950,比如超声波传感器、角度传感器、光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节触控显示屏的亮度,接近传感器可在手机移动到耳边时,关闭触控显示屏和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The cell phone may also include at least one sensor 950, such as ultrasonic sensors, angle sensors, light sensors, motion sensors, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the touch display screen according to the brightness of the ambient light, and the proximity sensor can turn off the touch display screen when the mobile phone is moved to the ear and/or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when it is stationary. games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. Repeat.

音频采集器960、扬声器961,传声器962可提供用户与手机之间的音频接口。音频采集器960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号播放;另一方面,传声器962将收集的声音信号转换为电信号,由音频采集器960接收后转换为音频数据,再将音频数据播放AP980处理后,经RF电路910以发送给比如另一手机,或者将音频数据播放至存储器920以便进一步处理。The audio collector 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone. The audio collector 960 can transmit the electrical signal converted from the received audio data to the speaker 961, and the speaker 961 converts it into a sound signal for playback; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, which is collected by the audio. The audio data is converted into audio data by the receiver 960 after being received, and then the audio data is processed by the AP 980 and sent to, for example, another mobile phone through the RF circuit 910, or the audio data is played to the memory 920 for further processing.

WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图5示出了WiFi模块970,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变申请的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970. It provides users with wireless broadband Internet access. Although FIG. 5 shows the WiFi module 970, it can be understood that it is not a necessary component of the mobile phone, and can be omitted as required within the scope of not changing the essence of the application.

手机还包括给各个部件供电的电源990(比如电池),可选的,电源可以通过电源管理系统与AP980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 990 (such as a battery) that supplies power to various components. Optionally, the power supply can be logically connected to the AP980 through the power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.

尽管未示出,手机还可以包括摄像头、蓝牙模块、补光装置、光线传感器等,在此不再赘述。Although not shown, the mobile phone may further include a camera, a Bluetooth module, a light-filling device, a light sensor, etc., which will not be repeated here.

可以看出,本申请提供的技术方案通过获取位置坐标以及时间来确定是否处于睡眠状态,如处于睡眠状态下,通过采集的图片判断是否包含婴儿,在包含婴儿时,控制无线收发器的通信功能,这样降低无线收发器的辐射对婴儿的影响,提高用户的体验度。It can be seen that the technical solution provided by this application determines whether it is in a sleep state by acquiring position coordinates and time. If it is in a sleep state, it is determined whether a baby is included through the collected pictures, and when a baby is included, the communication function of the wireless transceiver is controlled. , so as to reduce the influence of the radiation of the wireless transceiver on the baby and improve the user's experience.

本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种动态天线调整实现方法的部分或全部步骤。Embodiments of the present application further provide 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 one of the dynamic antenna adjustment implementation methods described in the foregoing method embodiments some or all of the steps.

本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种动态天线调整实现方法的部分或全部步骤。Embodiments of the present application further provide a computer program product, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to execute the methods described in the foregoing method embodiments Some or all of the steps of any dynamic antenna adjustment implementation method.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, 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 are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

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

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

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

所述集成的单元如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software program module and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art, or all or part of the technical solution, and the computer software product is stored in a memory, Several instructions are included to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. 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 skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant 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, referred to as: ROM), random access device (English: Random Access Memory, referred to as: RAM), magnetic disk or optical disk, etc.

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