CN110620837A - Receiver control method and electronic equipment - Google Patents

Receiver control method and electronic equipment Download PDF

Info

Publication number
CN110620837A
CN110620837A CN201911025739.7A CN201911025739A CN110620837A CN 110620837 A CN110620837 A CN 110620837A CN 201911025739 A CN201911025739 A CN 201911025739A CN 110620837 A CN110620837 A CN 110620837A
Authority
CN
China
Prior art keywords
earpiece
ear
electronic device
offset
audio
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.)
Granted
Application number
CN201911025739.7A
Other languages
Chinese (zh)
Other versions
CN110620837B (en
Inventor
廖敏江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201911025739.7A priority Critical patent/CN110620837B/en
Publication of CN110620837A publication Critical patent/CN110620837A/en
Application granted granted Critical
Publication of CN110620837B publication Critical patent/CN110620837B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/03Constructional features of telephone transmitters or receivers, e.g. telephone hand-sets

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

本发明提供一种听筒控制方法及电子设备,该方法包括:在听筒接收音频的情况下,检测接收所述音频的耳朵的位置;根据所述耳朵的位置调整所述电子设备的听筒的发声位置。本发明实施例当耳朵位置发生变化时能够减小耳朵感知到的音量发生的变化,从而提高了听筒的使用效果。

The present invention provides a method for controlling an earpiece and an electronic device, the method comprising: when the earpiece receives audio, detecting the position of an ear receiving the audio; and adjusting the sounding position of the earpiece of the electronic device according to the position of the ear . The embodiments of the present invention can reduce the volume change perceived by the ear when the position of the ear changes, thereby improving the use effect of the earpiece.

Description

一种听筒控制方法及电子设备Handset control method and electronic device

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种听筒控制方法及电子设备。The invention relates to the technical field of communication, in particular to a method for controlling an earpiece and electronic equipment.

背景技术Background technique

目前,全面屏手机已经普及,虽然提升了手机的屏占比,但是,高屏占比使手机听筒空间被压缩,这样,会导致用户接收到的音量受到听筒移动的影响,即声音衰减将会与耳廓与听筒之间位置的偏移量成正比,偏移越大,声音衰减越严重,用户接收到的音量就越小。如此,听筒在使用过程中必须紧贴耳廓才能保证良好的通话质量。然而,现有技术中,由于听筒在手机上的安装位置是固定不变的,当人体的耳朵位置发生变化时,从而导致耳朵感知到的音量发生较大的变化,使得听筒的使用效果较差。At present, full-screen mobile phones have become popular. Although the screen-to-body ratio of the mobile phone has been improved, the high screen-to-body ratio compresses the earpiece space of the mobile phone. In this way, the volume received by the user will be affected by the movement of the earpiece, that is, the sound attenuation will be reduced. It is proportional to the offset between the pinna and the earpiece, the greater the offset, the more serious the sound attenuation, and the lower the volume received by the user. In this way, the earpiece must be close to the pinna during use to ensure good call quality. However, in the prior art, since the installation position of the earpiece on the mobile phone is fixed, when the position of the ear of the human body changes, the volume perceived by the ear will change greatly, making the use of the earpiece less effective. .

发明内容Contents of the invention

本发明实施例提供一种听筒控制方法及电子设备,以解决现有技术中人体的耳朵位置发生变化时,导致耳朵感知到的音量发生较大的变化,使得听筒的使用效果较差的问题。Embodiments of the present invention provide an earpiece control method and an electronic device to solve the problem in the prior art that when the position of the human body's ear changes, the volume perceived by the ear changes greatly, resulting in poor use of the earpiece.

第一方面,本发明实施例提供了一种听筒控制方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for controlling a handset, the method including:

在听筒接收音频的情况下,检测接收所述音频的耳朵的位置;In the event that the earpiece receives audio, detecting the position of the ear receiving the audio;

根据所述耳朵的位置调整所述电子设备的听筒的发声位置。Adjusting the sound emitting position of the earpiece of the electronic device according to the position of the ear.

第二方面,本发明实施例还提供了一种电子设备,所述电子设备包括:In a second aspect, an embodiment of the present invention also provides an electronic device, the electronic device comprising:

检测模块,用于在听筒接收音频的情况下,检测接收所述音频的耳朵的位置;A detection module, configured to detect the position of the ear receiving the audio when the earpiece receives the audio;

调整模块,用于根据所述耳朵的位置调整所述电子设备的听筒的发声位置。An adjustment module, configured to adjust the sound emitting position of the earpiece of the electronic device according to the position of the ear.

第三方面,本发明实施例还提供了一种电子设备,所述电子设备包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述听筒控制方法的步骤。In the third aspect, the embodiment of the present invention also provides an electronic device, the electronic device includes: a processor, a memory, and a computer program stored in the memory and operable on the processor, the computer program When executed by the processor, the steps of the above-mentioned handset control method are realized.

第四方面,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述听筒控制方法的步骤。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned handset control method are implemented.

本发明实施例通过检测接收所述音频的耳朵的位置;并根据所述耳朵的位置调整所述电子设备的听筒的发声位置,这样能够控制听筒的发声位置根据耳朵的位置变化而自动进行调整,从而能够减小耳朵的位置变化时耳朵感知到的音量发生的变化,进而提高听筒的使用效果。The embodiment of the present invention detects the position of the ear receiving the audio; and adjusts the sounding position of the earpiece of the electronic device according to the position of the ear, so that the sounding position of the earpiece can be controlled to automatically adjust according to the position of the ear, Therefore, the change of the volume perceived by the ear when the position of the ear changes can be reduced, thereby improving the use effect of the earpiece.

附图说明Description of drawings

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

图1是本发明实施例提供的一种听筒控制方法的流程图;FIG. 1 is a flow chart of a method for controlling a handset provided by an embodiment of the present invention;

图2是本发明实施例提供的一种听筒控制方法中滑动安装的听筒控制示意图;Fig. 2 is a schematic diagram of a slidingly installed handset control in a handset control method provided by an embodiment of the present invention;

图3是本发明实施例提供的一种听筒控制方法中转动安装的听筒控制示意图;Fig. 3 is a schematic diagram of controlling a rotationally installed handset in a method for controlling the handset provided by an embodiment of the present invention;

图4是本发明实施例提供的一种听筒控制方法中安装有多个听筒的控制示意图;Fig. 4 is a control schematic diagram of multiple handsets installed in a handset control method provided by an embodiment of the present invention;

图5是本发明实施例提供的电子设备的结构图;FIG. 5 is a structural diagram of an electronic device provided by an embodiment of the present invention;

图6是实现本发明各个实施例的一种电子设备的硬件结构示意图。Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.

具体实施方式Detailed ways

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

参见图1,图1是本发明实施例提供的一种听筒控制方法的流程图,如图1所示,包括以下步骤:Referring to FIG. 1, FIG. 1 is a flowchart of a handset control method provided by an embodiment of the present invention. As shown in FIG. 1, it includes the following steps:

步骤101、在听筒接收音频的情况下,检测接收所述音频的耳朵的位置;Step 101, in the case that the earpiece receives audio, detect the position of the ear receiving the audio;

本发明实施例提供的听筒控制方法主要应用于电子设备,用于根据耳朵的位置自动调整听筒的发声位置,达到在耳朵的位置发生变化的情况下减小感知到的音量变化的目的。The earpiece control method provided by the embodiments of the present invention is mainly applied to electronic equipment, and is used to automatically adjust the sounding position of the earpiece according to the position of the ear, so as to reduce the perceived volume change when the position of the ear changes.

电子设备可以实时监听通话事件,若有通话请求,控制听筒启动,在听筒启动后,将会接收音频,并播放音频。所述电子设备在通话请求中可以是主叫端,也可以是被叫端,该通话事件可以是基于移动互联网的通话,也可以是社交软件上的语音通话。当然,电子设备还可以在听筒模式下启动听筒来播放多媒体文件,比如在听筒模式下启动听筒来接收并播放微信上的语音信息。The electronic device can monitor call events in real time, and if there is a call request, control the handset to start, and after the handset is started, it will receive audio and play the audio. The electronic device may be the calling terminal or the called terminal in the call request, and the call event may be a call based on the mobile Internet, or a voice call on social software. Of course, the electronic device can also activate the handset in the handset mode to play multimedia files, for example, start the handset in the handset mode to receive and play voice messages on WeChat.

所述电子设备可以对听筒进行上电,以控制所述听筒启动,在听筒启动后,电子设备可以在通话过程中实时检测所述耳朵的位置,也可以在通话过程中每隔预设时间检测所述耳朵的位置,该耳朵的位置可以理解为耳朵相对电子设备的位置。The electronic device can power on the handset to control the start of the handset. After the handset is started, the electronic device can detect the position of the ear in real time during a call, or detect the position of the ear every preset time during a call. The position of the ear, the position of the ear can be understood as the position of the ear relative to the electronic device.

本实施例中,检测接收所述音频的耳朵的位置通常可以理解为朝向或者靠近电子设备屏幕进行音频接听的耳朵。In this embodiment, detecting the position of the ear receiving the audio can generally be interpreted as the ear facing or approaching the screen of the electronic device for listening to the audio.

可选的,检测接收所述音频的耳朵的位置的方式根据人体的耳朵与电子设备的屏幕的接触与否不同而不同,具体包括:Optionally, the manner of detecting the position of the ear receiving the audio varies depending on whether the human ear is in contact with the screen of the electronic device, and specifically includes:

当耳朵与电子设备的屏幕接触时,根据所述屏幕检测到的触控信息确定所述耳朵的位置;When the ear is in contact with the screen of the electronic device, determining the position of the ear according to the touch information detected by the screen;

当耳朵与电子设备的屏幕未接触时,根据前置摄像头采集的画面信息确定所述耳朵的位置。When the ear is not in contact with the screen of the electronic device, the position of the ear is determined according to the picture information collected by the front camera.

比如,在听筒接收音频时,通过手机触屏检测人体的耳朵是否接触屏幕,若接触屏幕,根据接触位置获取耳朵的位置,取屏幕与耳朵接触最外沿的两点,将这两点的中点确定为耳朵的位置;若屏幕未接触耳朵,开启手机前置摄像头,通过耳朵识别获取出耳朵的位置。For example, when the earpiece is receiving audio, the touch screen of the mobile phone is used to detect whether the ear of the human body is in contact with the screen. If the ear is in contact with the screen, the position of the ear is obtained according to the contact position. point to determine the position of the ear; if the screen is not in contact with the ear, turn on the front camera of the mobile phone and obtain the position of the ear through ear recognition.

步骤102、根据所述耳朵的位置调整所述电子设备的听筒的发声位置。Step 102, adjust the sound emitting position of the earpiece of the electronic device according to the position of the ear.

该步骤中,电子设备的听筒安装方式决定了其调整方式,所述听筒在电子设备上可以有三种安装方式,相对对应三种调整方式;In this step, the installation method of the receiver of the electronic device determines its adjustment method, and the receiver may have three installation methods on the electronic device, corresponding to the three adjustment methods;

第一种为滑动安装,即听筒在电子设备上可以以预设滑轨进行滑动,相应的,电子设备可以根据所述耳朵的位置控制所述听筒进行滑动,以调整所述听筒的发声位置,达到对准所述耳朵的位置的目的;The first type is sliding installation, that is, the earpiece can slide on the electronic device with preset slide rails. Correspondingly, the electronic device can control the earpiece to slide according to the position of the ear, so as to adjust the sounding position of the earpiece. achieve the purpose of aligning the position of the ear;

第二种为转动安装,比如听筒安装于旋转部件内部,该旋转部件在旋转的过程中,带动听筒相对于电子设备进行转动,相应的,电子设备可以根据所述耳朵的位置控制所述听筒进行转动,以调整所述听筒的发声位置,达到对准所述耳朵的位置的目的;The second type is rotational installation. For example, the earpiece is installed inside the rotating part. During the rotation process, the rotating part drives the earpiece to rotate relative to the electronic device. Correspondingly, the electronic device can control the earpiece according to the position of the ear. Rotate to adjust the sounding position of the earpiece to achieve the purpose of aligning with the position of the ear;

第三种为电子设备上至少安装两个听筒,这些听筒可以固定安装,也可以活动安装,可以等间隔安装于电子设备上,也可以无规则安装于电子设备上,其具体安装形式不做详细阐述,相应的,电子设备可以根据所述耳朵的位置控制目标听筒接收音频,以调整听筒的发声位置,达到对准所述耳朵的位置的目的。The third is to install at least two earpieces on the electronic equipment. These earpieces can be fixed or movable, and can be installed on the electronic equipment at equal intervals or irregularly. The specific installation form will not be described in detail. To illustrate, correspondingly, the electronic device can control the target earpiece to receive audio according to the position of the ear, so as to adjust the sound emitting position of the earpiece to achieve the purpose of aligning with the position of the ear.

本发明实施例通过检测接收所述音频的耳朵的位置;并根据所述耳朵的位置调整所述电子设备的听筒的发声位置,这样能够控制听筒的发声位置根据耳朵的位置变化而自动进行调整,从而能够减小耳朵的位置变化时耳朵感知到的音量发生的变化,进而提高听筒的使用效果。The embodiment of the present invention detects the position of the ear receiving the audio; and adjusts the sounding position of the earpiece of the electronic device according to the position of the ear, so that the sounding position of the earpiece can be controlled to automatically adjust according to the position of the ear, Therefore, the change of the volume perceived by the ear when the position of the ear changes can be reduced, thereby improving the use effect of the earpiece.

进一步的,在一实例中,若上述听筒的位置为可调整的状态,所述步骤102具体包括:Further, in an example, if the position of the earpiece is adjustable, the step 102 specifically includes:

计算所述听筒与所述耳朵的位置的第一偏移量;calculating a first offset between the earpiece and the position of the ear;

根据所述第一偏移量对所述听筒的位置进行调整。The position of the earpiece is adjusted according to the first offset.

本实施例中,所述听筒活动安装于电子设备上,如图2所示,所述听筒以水平滑轨活动安装于电子设备上,可在水平滑轨上左右滑动,如图3所示,所述听筒集成于升降摄像头部件顶部,且该升降摄像头部件可左右旋转。In this embodiment, the handset is movably installed on the electronic device, as shown in Figure 2, and the handset is movably mounted on the electronic device with a horizontal slide rail, and can slide left and right on the horizontal slide rail, as shown in Figure 3, The earpiece is integrated on the top of the lifting camera part, and the lifting camera part can rotate left and right.

可选的,获取当前导音通道在电子设备上的位置,即听筒在电子设备上的位置,计算所述听筒与所述耳朵的位置的第一偏移量,所述第一偏移量可以为矢量,包括听筒相对于耳朵的位置的方向和相对距离。Optionally, acquire the position of the current sound guide channel on the electronic device, that is, the position of the earpiece on the electronic device, and calculate a first offset between the earpiece and the position of the ear, and the first offset may be is a vector that includes the direction and relative distance of the earpiece relative to the position of the ear.

上述听筒的安装方式不同,对应的调整过程也不同,下面将针对听筒的不同安装方式,详细阐述对应的调整过程。The above-mentioned earpieces are installed in different ways, and the corresponding adjustment processes are also different. The corresponding adjustment process will be described in detail below for different installation methods of the earpieces.

在一实施例中,当所述听筒为滑动安装时,所述根据所述第一偏移量对所述听筒的位置进行调整包括:In an embodiment, when the earpiece is installed in a sliding manner, the adjusting the position of the earpiece according to the first offset includes:

根据所述第一偏移量,确定所述听筒的移动方向和移动距离;determining the moving direction and moving distance of the earpiece according to the first offset;

按照所述移动方向和移动距离控制所述听筒移动。The movement of the earpiece is controlled according to the moving direction and moving distance.

如图2所示,听筒201以水平滑轨202安装于电子设备上,检测到耳朵接触屏幕且位于屏幕的左边,而听筒201的原始位置位于屏幕的中间位置,此时,电子设备控制所述听筒201向左滑动相应的移动距离即可使听筒对准耳朵。As shown in FIG. 2 , the earpiece 201 is installed on the electronic device with a horizontal slide rail 202 , and it is detected that the ear touches the screen and is located on the left side of the screen, while the original position of the earpiece 201 is located in the middle of the screen. At this time, the electronic device controls the The earpiece 201 can be aligned with the ear by sliding the earpiece 201 to the left for a corresponding moving distance.

本发明实施例在电子设备通话过程中的移动场景下,实现听筒的发声位置跟随耳朵位置的变化而变化,从而减小用户感知到的音量变化,改善听筒与耳朵相对位置发生变化场景下的听筒使用效果,保证通话音效,提升通话体验;并且,允许用户在使用电子设备通话时,减少电子设备紧贴耳朵带来的不适感。The embodiment of the present invention realizes that the sounding position of the earpiece changes according to the change of the ear position in the mobile scene during the call process of the electronic device, thereby reducing the volume change perceived by the user and improving the earpiece in the scene where the relative position of the earpiece and the ear changes. The use effect ensures the sound effect of the call and improves the call experience; and allows the user to reduce the discomfort caused by the electronic device being close to the ear when using the electronic device to make a call.

在另一实施例中,当所述听筒为转动安装时,所述根据所述第一偏移量对所述听筒的位置进行调整包括:In another embodiment, when the earpiece is rotatably installed, the adjusting the position of the earpiece according to the first offset includes:

根据所述第一偏移量,确定所述听筒的转动方向和转动角度;determining a rotation direction and a rotation angle of the earpiece according to the first offset;

按照所述转动方向和所述转动角度控制所述听筒转动。The rotation of the earpiece is controlled according to the rotation direction and the rotation angle.

如图3所示,所述听筒301安装于升降摄像头部件302顶部,所述升降摄像头部件为可旋转部件,检测到耳朵接触屏幕且位于屏幕的左边,而听筒301的原始位置位于屏幕的中间位置且垂直于所述电子设备,计算所述第一偏移量,且以电子设备水平和垂直方向为相对轴向,将该第一偏移量通过三角关系换算成转动角度,然后电子设备控制所述听筒301向左转动相应的转动角度即可使听筒对准耳朵。例如,听筒上通常设有发声孔,通过控制听筒旋转,改变发声孔的位置,从而改变听筒的发声位置。As shown in Figure 3, the earpiece 301 is installed on the top of the lifting camera part 302, the lifting camera part is a rotatable part, it is detected that the ear touches the screen and is located on the left side of the screen, and the original position of the earpiece 301 is located in the middle of the screen And perpendicular to the electronic device, calculate the first offset, and take the horizontal and vertical directions of the electronic device as relative axes, convert the first offset into a rotation angle through a triangular relationship, and then the electronic device controls the The earpiece 301 can be aligned with the ear by turning the earpiece 301 to the left by a corresponding rotation angle. For example, the earpiece is usually provided with a sounding hole, and the position of the sounding hole is changed by controlling the rotation of the earpiece, thereby changing the sounding position of the earpiece.

本发明实施例能够根据耳朵位置,通过控制听筒自适应旋转,来调整发声的方向和距离,以对准耳朵的外耳道位置,从而减小用户感知到的音量变化,保证通话质量和效果。According to the position of the ear, the embodiment of the present invention can adjust the direction and distance of the sound by controlling the adaptive rotation of the earpiece to align with the position of the external auditory canal of the ear, thereby reducing the volume change perceived by the user and ensuring the quality and effect of the call.

需要说明的是,在调整听筒出声位置的过程中或是听筒调节到极限位置也无法跟踪到耳朵位置时,为了进一步减小用户感知到的音量变化,还可以根据听筒相对耳朵位置的距离信息调节音量大小,比如,当检测到耳朵相对电子设备移动之后,检测听筒相对耳朵位置的距离信息,根据所述距离信息,调节听筒出声的音量。当距离信息从小变大时,调大听筒出声的音量,当距离信息从大变小时,调小听筒出声的音量,一方面,能够进一步减小用户感知到的音量变化,另一方面,能够避免耳朵靠近电子设备时感知到的音量比较尖锐,或者远离电子设备时无法感知到听筒的音量。It should be noted that, in the process of adjusting the sound output position of the earpiece or when the earpiece is adjusted to the extreme position and the ear position cannot be tracked, in order to further reduce the volume change perceived by the user, the distance information of the earpiece relative to the ear position can also be used. Adjust the volume, for example, after detecting that the ear moves relative to the electronic device, detect the distance information of the earpiece relative to the ear, and adjust the volume of the earpiece according to the distance information. When the distance information increases from small to large, turn up the volume of the earpiece, and when the distance information changes from large to small, turn down the volume of the earpiece. On the one hand, it can further reduce the volume change perceived by the user. On the other hand, It can avoid the sharper volume perceived when the ear is close to the electronic device, or the volume of the earpiece cannot be perceived when the ear is far away from the electronic device.

可选的,在另一实施例中,若所述听筒的数量至少为两个;所述步骤102具体包括:Optionally, in another embodiment, if the number of the handsets is at least two; the step 102 specifically includes:

根据各所述听筒与所述耳朵的位置的第二偏移量,确定用于发声的目标听筒;determining a target earpiece for sounding according to a second offset between each earpiece and the position of the ear;

控制所述目标听筒接收并播放音频。Control the target earpiece to receive and play audio.

本实施例中,电子设备上安装有至少两个听筒,这些听筒可以固定安装,也可以活动安装,可以等间隔安装于电子设备上,也可以无规则安装于电子设备上,计算各个听筒与所述耳朵的位置的第二偏移量,根据所述第二偏移量,确定用于发声的目标听筒,所述目标听筒可以为最小第二偏移量对应的听筒,即离耳朵位置距离最近的听筒。In this embodiment, at least two earpieces are installed on the electronic equipment, and these earpieces can be installed fixedly or movable, and can be installed on the electronic equipment at equal intervals, or can be installed irregularly on the electronic equipment. The second offset amount of the position of the ear, according to the second offset amount, determine the target earpiece for sounding, and the target earpiece may be the earpiece corresponding to the smallest second offset amount, that is, the earpiece that is closest to the ear position handset.

应理解,在本实施例中,控制所述目标听筒接收并播放音频可以理解为:控制目标听筒启动,在目标听筒启动的情况下,目标听筒即可接收音频,并发声。在其他实施例中,控制所述目标听筒接收并播放音频还可以理解为:各听筒一直处于启动状态,其是否接收音频需要进行控制,此时可以控制目标听筒接收音频,并发声。以下各实施例中以控制目标听筒启动视为控制目标听筒接收并播放音频为例进行详细说明。It should be understood that, in this embodiment, controlling the target earpiece to receive and play audio may be understood as: controlling the activation of the target earpiece. When the target earpiece is activated, the target earpiece can receive audio and make a sound. In other embodiments, controlling the target earpiece to receive and play audio can also be understood as: each earpiece is always activated, and whether it needs to control whether to receive audio, at this time, the target earpiece can be controlled to receive audio and make a sound. In the following embodiments, the control target earphone activation is regarded as controlling the target earpiece to receive and play audio as an example for detailed description.

如图4所示,该电子设备的顶端等间隔固定安装有三个听筒,分别是听筒401、听筒402和听筒403,检测到耳朵接触屏幕且位于屏幕的左边,而根据第二偏移量确定听筒403距离耳朵位置最近。As shown in Figure 4, three earpieces are fixedly installed at equal intervals on the top of the electronic device, namely the earpiece 401, the earpiece 402 and the earpiece 403. It is detected that the ear touches the screen and is located on the left side of the screen, and the earpiece is determined according to the second offset. 403 is the closest to the ear.

随后,电子设备确定听筒403是否处于开启状态,若已经开启,则保持各听筒状态不变,无需切换发声的听筒。Subsequently, the electronic device determines whether the earpiece 403 is turned on, and if it is already turned on, the state of each earpiece remains unchanged, without switching the earpiece that produces the sound.

若未开启,控制听筒403启动,比如,电子设备之前启动的是听筒401,当检测到耳朵移动后距离听筒403最近,则电子设备可以控制听筒403启动,并切换接收音频的听筒,此时,各听筒的状态为听筒401和听筒402处于关闭状态,听筒403处于开启状态;电子设备也可以控制听筒403启动,但是不切换发声的听筒,此时,采用两个听筒同时接收音频并发声,各听筒的状态为听筒401和听筒403处于开启状态,听筒402处于关闭状态。If it is not turned on, control the earpiece 403 to start. For example, the electronic device started the earpiece 401 before. When it detects that the ear moves and is closest to the earpiece 403, the electronic device can control the earpiece 403 to start and switch the earpiece for receiving audio. At this time, The state of each earpiece is that the earpiece 401 and the earpiece 402 are in the off state, and the earpiece 403 is in the on state; the electronic device can also control the earpiece 403 to start, but does not switch the earpiece for sounding. The state of the earpiece is that the earpiece 401 and the earpiece 403 are in the on state, and the earpiece 402 is in the off state.

需要说明的是,当多个听筒同时发声时,为了使用户感知到的声音协调,需要保持多个听筒的工作步调一致。It should be noted that, when multiple earpieces make sounds at the same time, in order to coordinate the sounds perceived by the user, it is necessary to keep the working steps of the multiple earpieces consistent.

本发明实施例在电子设备通话过程中的移动场景下,能够根据耳朵位置自由切换听筒,从而能够实现听筒的发声位置跟随耳朵位置的变化而变化,保证通话音效,提升用户体验。The embodiment of the present invention can freely switch the earpiece according to the position of the ear in the mobile scene during the call of the electronic device, so that the sounding position of the earpiece can change with the change of the ear position, ensure the sound effect of the call, and improve the user experience.

需要说明的是,本发明实施例中介绍的多种可选的实施方式,彼此可以相互结合实现,也可以单独实现,对此本发明实施例不作限定。It should be noted that the various optional implementation manners introduced in the embodiments of the present invention may be implemented in combination with each other, or may be implemented independently, which is not limited in this embodiment of the present invention.

参见图5,图5是本发明实施例提供的电子设备的结构图,如图5所示,电子设备500包括:Referring to FIG. 5, FIG. 5 is a structural diagram of an electronic device provided by an embodiment of the present invention. As shown in FIG. 5, the electronic device 500 includes:

检测模块501,用于在听筒接收音频的情况下,检测接收所述音频的耳朵的位置;A detection module 501, configured to detect the position of the ear receiving the audio when the earpiece receives the audio;

调整模块502,用于根据所述耳朵的位置调整所述电子设备的听筒的发声位置。The adjustment module 502 is configured to adjust the sound emitting position of the earpiece of the electronic device according to the position of the ear.

可选的,所述调整模块502包括:Optionally, the adjustment module 502 includes:

计算单元,用于计算所述听筒与所述耳朵的位置的第一偏移量;a calculation unit, configured to calculate a first offset between the earpiece and the ear;

调整单元,用于根据所述第一偏移量对所述听筒的位置进行调整。An adjustment unit, configured to adjust the position of the earpiece according to the first offset.

可选的,所述调整单元,具体用于根据所述第一偏移量,确定所述听筒的移动方向和移动距离;按照所述移动方向和移动距离控制所述听筒移动。Optionally, the adjustment unit is specifically configured to determine the moving direction and moving distance of the earpiece according to the first offset; and control the movement of the earpiece according to the moving direction and moving distance.

可选的,所述调整单元,具体用于根据所述第一偏移量,确定所述听筒的转动方向和转动角度;按照所述转动方向和所述转动角度控制所述听筒转动。Optionally, the adjusting unit is specifically configured to determine a rotation direction and a rotation angle of the earpiece according to the first offset; and control the rotation of the earpiece according to the rotation direction and the rotation angle.

可选的,所述听筒的数量至少为两个;所述调整模块502包括:Optionally, the number of the earpieces is at least two; the adjustment module 502 includes:

确定单元,用于根据各所述听筒与所述耳朵的位置的第二偏移量,确定用于发声的目标听筒;A determining unit, configured to determine a target earpiece for sounding according to a second offset between each of the earpieces and the position of the ear;

控制单元,用于控制所述目标听筒接收并播放音频。A control unit, configured to control the target earpiece to receive and play audio.

可选的,所述检测模块501,具体用于当耳朵与电子设备的屏幕接触时,根据所述屏幕检测到的耳朵信息确定所述耳朵的位置;当耳朵与电子设备的屏幕未接触时,根据前置摄像头采集的画面信息确定所述耳朵的位置。Optionally, the detection module 501 is specifically configured to determine the position of the ear according to the ear information detected by the screen when the ear is in contact with the screen of the electronic device; when the ear is not in contact with the screen of the electronic device, The position of the ear is determined according to the picture information collected by the front camera.

本发明实施例提供的电子设备能够实现上述方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。The electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the foregoing method embodiment, and to avoid repetition, details are not repeated here.

图6为实现本发明各个实施例的一种电子设备的硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.

该电子设备600包括但不限于:射频单元601、网络模块602、音频输出单元603、输入单元604、传感器605、显示单元606、用户输入单元607、接口单元608、存储器609、处理器610、以及电源611等部件。本领域技术人员可以理解,图6中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。The electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and Power supply 611 and other components. Those skilled in the art can understand that the structure of the electronic device shown in Figure 6 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than shown in the illustration, or combine certain components, or different components layout. In the embodiment of the present invention, electronic devices include but are not limited to mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted terminals, wearable devices, and pedometers.

其中,处理器610,用于在听筒接收音频的情况下,检测接收所述音频的耳朵的位置;根据所述耳朵的位置调整所述电子设备的听筒的发声位置。Wherein, the processor 610 is configured to detect the position of the ear receiving the audio when the earpiece receives the audio; and adjust the sounding position of the earpiece of the electronic device according to the position of the ear.

可选的,处理器610,还用于计算所述听筒与所述耳朵的位置的第一偏移量;根据所述第一偏移量对所述听筒的位置进行调整。Optionally, the processor 610 is further configured to calculate a first offset between the earpiece and the position of the ear; and adjust the position of the earpiece according to the first offset.

可选的,处理器610,还用于根据所述第一偏移量,确定所述听筒的移动方向和移动距离;按照所述移动方向和移动距离控制所述听筒移动;Optionally, the processor 610 is further configured to determine the moving direction and moving distance of the earpiece according to the first offset; and control the movement of the earpiece according to the moving direction and moving distance;

可选的,处理器610,还用于根据所述第一偏移量,确定所述听筒的转动方向和转动角度;按照所述转动方向和所述转动角度控制所述听筒转动。Optionally, the processor 610 is further configured to determine a rotation direction and a rotation angle of the earpiece according to the first offset; and control the rotation of the earpiece according to the rotation direction and the rotation angle.

可选的,所述听筒的数量至少为两个;处理器610,还用于根据各所述听筒与所述耳朵的位置的第二偏移量,确定用于发声的目标听筒;控制所述目标听筒接收并播放音频。Optionally, the number of the earpieces is at least two; the processor 610 is further configured to determine a target earpiece for sounding according to a second offset between each of the earpieces and the position of the ear; and control the The target earpiece receives and plays the audio.

可选的,处理器610,还用于当耳朵与电子设备的屏幕接触时,根据所述屏幕检测到的耳朵信息确定所述耳朵的位置;当耳朵与电子设备的屏幕未接触时,根据前置摄像头采集的画面信息确定所述耳朵的位置。Optionally, the processor 610 is further configured to determine the position of the ear according to the ear information detected by the screen when the ear is in contact with the screen of the electronic device; The position of the ear is determined using the picture information collected by the camera.

本发明实施例通过检测接收所述音频的耳朵的位置;并根据所述耳朵的位置调整所述电子设备的听筒的发声位置,这样能够控制听筒的发声位置根据耳朵的位置变化而自动进行调整,从而能够减小耳朵的位置变化时耳朵感知到的音量发生的变化,进而提高听筒的使用效果。The embodiment of the present invention detects the position of the ear receiving the audio; and adjusts the sounding position of the earpiece of the electronic device according to the position of the ear, so that the sounding position of the earpiece can be controlled to automatically adjust according to the position of the ear, Therefore, the change of the volume perceived by the ear when the position of the ear changes can be reduced, thereby improving the use effect of the earpiece.

应理解的是,本发明实施例中,射频单元601可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器610处理;另外,将上行的数据发送给基站。通常,射频单元601包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元601还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 can be used for receiving and sending signals during sending and receiving information or during a call. Specifically, the downlink data from the base station is received and processed by the processor 610; in addition, the Uplink data is sent to the base station. Generally, the radio frequency unit 601 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 601 can also communicate with the network and other devices through a wireless communication system.

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

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

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

电子设备600还包括至少一种传感器605,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板6061的亮度,接近传感器可在电子设备600移动到耳边时,关闭显示面板6061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器605还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The electronic device 600 also includes at least one sensor 605, 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 6061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 6061 and the / or backlighting. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is still, and can be used to identify the posture of electronic equipment (such as horizontal and vertical screen switching, related games) , magnetometer posture calibration), vibration recognition-related functions (such as pedometer, knocking), etc.; the sensor 605 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.

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

用户输入单元607可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元607包括触控面板6071以及其他输入设备6072。触控面板6071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板6071上或在触控面板6071附近的操作)。触控面板6071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器610,接收处理器610发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板6071。除了触控面板6071,用户输入单元607还可以包括其他输入设备6072。具体地,其他输入设备6072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 607 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072 . The touch panel 6071, also referred to as a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 6071 or near the touch panel 6071). operate). The touch panel 6071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and 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 sends it to the For the processor 610, receive the command sent by the processor 610 and execute it. In addition, the touch panel 6071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 6071 , the user input unit 607 may also include other input devices 6072 . Specifically, other input devices 6072 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 repeated here.

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

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

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

处理器610是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器609内的软件程序和/或模块,以及调用存储在存储器609内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器610可包括一个或多个处理单元;优选的,处理器610可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器610中。The processor 610 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 609, and calling data stored in the memory 609 , to perform various functions of the electronic equipment and process data, so as to monitor the electronic equipment as a whole. The processor 610 may include one or more processing units; preferably, the processor 610 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 processor mainly handles wireless communication. It can be understood that, the foregoing modem processor may not be integrated into the processor 610 .

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

另外,电子设备600包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 600 includes some functional modules not shown, which will not be repeated here.

优选的,本发明实施例还提供一种电子设备,包括处理器610,存储器609,存储在存储器609上并可在所述处理器610上运行的计算机程序,该计算机程序被处理器610执行时实现上述听筒控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, the embodiment of the present invention also provides an electronic device, including a processor 610, a memory 609, and a computer program stored in the memory 609 and operable on the processor 610. When the computer program is executed by the processor 610 Each process of the above embodiment of the handset control method can be realized and the same technical effect can be achieved. To avoid repetition, details are not repeated here.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述听筒控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the above-mentioned handset control method embodiment is realized, and the same technology can be achieved. Effect, in order to avoid repetition, will not repeat them here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

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

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

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

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

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

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (12)

1.一种听筒控制方法,应用于电子设备,其特征在于,包括:1. A handset control method, applied to electronic equipment, is characterized in that, comprising: 在听筒接收音频的情况下,检测接收所述音频的耳朵的位置;In the event that the earpiece receives audio, detecting the position of the ear receiving the audio; 根据所述耳朵的位置调整所述电子设备的听筒的发声位置。Adjusting the sound emitting position of the earpiece of the electronic device according to the position of the ear. 2.根据权利要求1所述的方法,其特征在于,所述根据所述耳朵的位置调整所述电子设备的听筒的发声位置包括:2. The method according to claim 1, wherein the adjusting the sounding position of the earpiece of the electronic device according to the position of the ear comprises: 计算所述听筒与所述耳朵的位置的第一偏移量;calculating a first offset between the earpiece and the position of the ear; 根据所述第一偏移量对所述听筒的位置进行调整。The position of the earpiece is adjusted according to the first offset. 3.根据权利要求2所述的方法,其特征在于,所述根据所述第一偏移量对所述听筒的位置进行调整包括:3. The method according to claim 2, wherein the adjusting the position of the earpiece according to the first offset comprises: 根据所述第一偏移量,确定所述听筒的移动方向和移动距离;determining the moving direction and moving distance of the earpiece according to the first offset; 按照所述移动方向和移动距离控制所述听筒移动。The movement of the earpiece is controlled according to the moving direction and moving distance. 4.根据权利要求2所述的方法,其特征在于,所述根据所述第一偏移量对所述听筒的位置进行调整包括:4. The method according to claim 2, wherein the adjusting the position of the earpiece according to the first offset comprises: 根据所述第一偏移量,确定所述听筒的转动方向和转动角度;determining a rotation direction and a rotation angle of the earpiece according to the first offset; 按照所述转动方向和所述转动角度控制所述听筒转动。The rotation of the earpiece is controlled according to the rotation direction and the rotation angle. 5.根据权利要求1所述的方法,其特征在于,所述听筒的数量至少为两个;所述根据所述耳朵的位置调整所述电子设备的听筒的发声位置包括:5. The method according to claim 1, wherein the number of the earpieces is at least two; said adjusting the sounding position of the earpiece of the electronic device according to the position of the ear comprises: 根据各所述听筒与所述耳朵的位置的第二偏移量,确定用于发声的目标听筒;determining a target earpiece for sounding according to a second offset between each earpiece and the position of the ear; 控制所述目标听筒接收并播放所述音频。controlling the target receiver to receive and play the audio. 6.一种电子设备,其特征在于,所述电子设备包括:6. An electronic device, characterized in that the electronic device comprises: 检测模块,用于在听筒接收音频的情况下,检测接收所述音频的耳朵的位置;A detection module, configured to detect the position of the ear receiving the audio when the earpiece receives the audio; 调整模块,用于根据所述耳朵的位置调整所述电子设备的听筒的发声位置。An adjustment module, configured to adjust the sound emitting position of the earpiece of the electronic device according to the position of the ear. 7.根据权利要求6所述的电子设备,其特征在于,所述调整模块包括:7. The electronic device according to claim 6, wherein the adjustment module comprises: 计算单元,用于计算所述听筒与所述耳朵的位置的第一偏移量;a calculation unit, configured to calculate a first offset between the earpiece and the ear; 调整单元,用于根据所述第一偏移量对所述听筒的位置进行调整。An adjustment unit, configured to adjust the position of the earpiece according to the first offset. 8.根据权利要求7所述的电子设备,其特征在于,所述调整单元,具体用于根据所述第一偏移量,确定所述听筒的移动方向和移动距离;按照所述移动方向和移动距离控制所述听筒移动。8. The electronic device according to claim 7, wherein the adjusting unit is specifically configured to determine the moving direction and moving distance of the earpiece according to the first offset; according to the moving direction and the moving distance Move distance controls the earpiece movement. 9.根据权利要求7所述的电子设备,其特征在于,所述调整单元,具体用于根据所述第一偏移量,确定所述听筒的转动方向和转动角度;按照所述转动方向和所述转动角度控制所述听筒转动。9. The electronic device according to claim 7, wherein the adjusting unit is specifically configured to determine the rotation direction and the rotation angle of the earpiece according to the first offset; according to the rotation direction and the rotation angle The rotation angle controls the rotation of the earpiece. 10.根据权利要求7所述的电子设备,其特征在于,所述听筒的数量至少为两个;所述调整模块包括:10. The electronic device according to claim 7, wherein the number of the earpieces is at least two; the adjustment module comprises: 确定单元,用于根据各所述听筒与所述耳朵的位置的第二偏移量,确定用于发声的目标听筒;A determining unit, configured to determine a target earpiece for sounding according to a second offset between each of the earpieces and the position of the ear; 控制单元,用于控制所述目标听筒接收并播放所述音频。A control unit, configured to control the target receiver to receive and play the audio. 11.一种电子设备,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至5中任一项所述的听筒控制方法的步骤。11. An electronic device, characterized by comprising a processor, a memory, and a computer program stored on the memory and operable on the processor, when the computer program is executed by the processor, the The steps of the earpiece control method described in any one of 1 to 5 are required. 12.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至5中任一项所述的听筒控制方法的步骤。12. A computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the steps of the handset control method according to any one of claims 1 to 5 are realized.
CN201911025739.7A 2019-10-25 2019-10-25 An earpiece control method and electronic device Active CN110620837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911025739.7A CN110620837B (en) 2019-10-25 2019-10-25 An earpiece control method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911025739.7A CN110620837B (en) 2019-10-25 2019-10-25 An earpiece control method and electronic device

Publications (2)

Publication Number Publication Date
CN110620837A true CN110620837A (en) 2019-12-27
CN110620837B CN110620837B (en) 2021-12-14

Family

ID=68926759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911025739.7A Active CN110620837B (en) 2019-10-25 2019-10-25 An earpiece control method and electronic device

Country Status (1)

Country Link
CN (1) CN110620837B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113271369A (en) * 2021-05-18 2021-08-17 维沃移动通信有限公司 Call control method and device of electronic equipment and electronic equipment
CN113572878A (en) * 2020-04-29 2021-10-29 维沃移动通信有限公司 Electronic device, control method and control device thereof, and readable storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201976158U (en) * 2010-06-17 2011-09-14 宇龙计算机通信科技(深圳)有限公司 Volume adjusting device and mobile terminal
JP2012034263A (en) * 2010-08-02 2012-02-16 Panasonic Corp Portable terminal device
CN102404430A (en) * 2010-09-13 2012-04-04 富泰华工业(深圳)有限公司 Mobile communication device and method for improving call quality thereof
CN104917898A (en) * 2015-06-17 2015-09-16 广东欧珀移动通信有限公司 Mobile terminal and control method of mobile terminal
CN107343076A (en) * 2017-08-18 2017-11-10 广东欧珀移动通信有限公司 Volume adjusting method and device, storage medium and mobile terminal
CN108196815A (en) * 2017-12-28 2018-06-22 维沃移动通信有限公司 Method for adjusting call sound and mobile terminal
CN108683795A (en) * 2018-03-30 2018-10-19 中兴通讯股份有限公司 Mobile terminal and its control method and computer readable storage medium
CN108762711A (en) * 2018-05-17 2018-11-06 Oppo广东移动通信有限公司 Method, device, electronic device and storage medium for screen sound generation
CN108924313A (en) * 2018-07-27 2018-11-30 维沃移动通信有限公司 A kind of electronic equipment and called answering method
CN109089192A (en) * 2018-08-03 2018-12-25 维沃移动通信有限公司 A kind of method and terminal device exporting voice
CN109189360A (en) * 2018-07-09 2019-01-11 Oppo广东移动通信有限公司 Screen sounding control method and device and electronic device
CN110072172A (en) * 2019-04-25 2019-07-30 广州小鹏汽车科技有限公司 A kind of output method and device of audio signal

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201976158U (en) * 2010-06-17 2011-09-14 宇龙计算机通信科技(深圳)有限公司 Volume adjusting device and mobile terminal
JP2012034263A (en) * 2010-08-02 2012-02-16 Panasonic Corp Portable terminal device
CN102404430A (en) * 2010-09-13 2012-04-04 富泰华工业(深圳)有限公司 Mobile communication device and method for improving call quality thereof
CN104917898A (en) * 2015-06-17 2015-09-16 广东欧珀移动通信有限公司 Mobile terminal and control method of mobile terminal
CN107343076A (en) * 2017-08-18 2017-11-10 广东欧珀移动通信有限公司 Volume adjusting method and device, storage medium and mobile terminal
CN108196815A (en) * 2017-12-28 2018-06-22 维沃移动通信有限公司 Method for adjusting call sound and mobile terminal
CN108683795A (en) * 2018-03-30 2018-10-19 中兴通讯股份有限公司 Mobile terminal and its control method and computer readable storage medium
CN108762711A (en) * 2018-05-17 2018-11-06 Oppo广东移动通信有限公司 Method, device, electronic device and storage medium for screen sound generation
CN109189360A (en) * 2018-07-09 2019-01-11 Oppo广东移动通信有限公司 Screen sounding control method and device and electronic device
CN108924313A (en) * 2018-07-27 2018-11-30 维沃移动通信有限公司 A kind of electronic equipment and called answering method
CN109089192A (en) * 2018-08-03 2018-12-25 维沃移动通信有限公司 A kind of method and terminal device exporting voice
CN110072172A (en) * 2019-04-25 2019-07-30 广州小鹏汽车科技有限公司 A kind of output method and device of audio signal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572878A (en) * 2020-04-29 2021-10-29 维沃移动通信有限公司 Electronic device, control method and control device thereof, and readable storage medium
CN113271369A (en) * 2021-05-18 2021-08-17 维沃移动通信有限公司 Call control method and device of electronic equipment and electronic equipment

Also Published As

Publication number Publication date
CN110620837B (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN107957839B (en) Display control method and mobile terminal
CN108182019B (en) Suspension control display processing method and mobile terminal
CN110730260B (en) Electronic device control method and electronic device
CN107798303A (en) A kind of method and mobile terminal for adjusting screen backlight
CN107943551A (en) A kind of screen display method and mobile terminal
CN111324235A (en) Screen refreshing frequency adjusting method and electronic equipment
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN111562896A (en) Screen projection method and electronic equipment
CN110891217B (en) A kind of earphone, earphone control method and electronic device
CN109951582B (en) A kind of mobile terminal and sound output control method
CN111147919A (en) A playback adjustment method, electronic device and computer-readable storage medium
US12120261B2 (en) Incoming call processing method and electronic device
CN108628515A (en) A kind of operating method and mobile terminal of multimedia content
CN110830861B (en) Telephone receiver control method and device and electronic equipment
CN110351407A (en) A kind of audio frequency playing method and mobile terminal
WO2021129835A1 (en) Volume control method and device, and computer-readable storage medium
CN111443815A (en) A vibration reminder method and electronic device
WO2021197311A1 (en) Volume adjustment display method and electronic apparatus
CN110769303A (en) Playing control method and device and mobile terminal
CN108632466A (en) Volume compensation method and mobile terminal
CN110620837A (en) Receiver control method and electronic equipment
WO2021208893A1 (en) Audio output mode switching method and electronic device
CN109889942B (en) A Type-C transfer cable, control method and terminal device
CN108696638B (en) Control method of mobile terminal and mobile terminal
CN108804071B (en) A kind of receiver driving method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant